Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

AC square wave from electrode

Please login with a confirmed email address before reporting spam

Hi,

I am modeling a forearm with skin, muscle, fat, and nerves. I have a 9mA current delivered from an electrode with a frequency of 100Hz and pulse width of 100μs. I am using a time dependent study from 0 to 1 seconds with a time step of 0.1s. I used a global equation equal to 2pift and when I try to compute, it says I have a problem with initial values. How do I fix this problem? Should I be defining my pulse width anywhere other than global parameters?

Thank you


1 Reply Last Post 17 dic 2020, 13:37 GMT-5
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 17 dic 2020, 13:37 GMT-5
Updated: 4 years ago 17 dic 2020, 13:39 GMT-5

First, excuse me for not fully understanding your field. You mentioned a square wave. But you also mentioned "a global equation equal to 2pift." That notation would seem to imply some kind of sinusoidal wave, with an angular frequency omega = 2pif. I have no idea why that would be relevant to a square wave model. You also refer to a "frequency" of 100 Hz and pulse width of 100μs. A sinusoidal wave (which is what one would normally be talking about, if using "Hz" as a unit) of 100 Hz has a period of .01 second, which is much longer than 100μs (so one could never fit a 100 Hz sinusoidal wave into a 100μs pulse). So, I'm guessing that by "100 Hz" you actually meant to refer to a pulse repetition rate. That is, you have a train of square pulses that are each 100μs wide, at 100 pps (pps = pulses per sec). Right? Ok, let's assume that. Next, I see you are using a time-step of 0.1 sec. If so, that is potentially a big problem. After all, you can't possibly resolve (in time) any detailed physics that occurs during a 100μs pulse if using a 0.1s timestep! In general, time steps have to be short compared to the time scales of the time-dependent behaviors in your model. I suggest you post your model to the forum so that others may review it and offer more detailed assistance.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
First, excuse me for not fully understanding your field. You mentioned a square wave. But you also mentioned "a global equation equal to 2pift." That notation would seem to imply some kind of sinusoidal wave, with an angular frequency omega = 2pif. I have no idea why that would be relevant to a square wave model. You also refer to a "frequency" of 100 Hz and pulse width of 100μs. A sinusoidal wave (which is what one would normally be talking about, if using "Hz" as a unit) of 100 Hz has a period of .01 second, which is much longer than 100μs (so one could never fit a 100 Hz sinusoidal wave into a 100μs pulse). So, I'm guessing that by "100 Hz" you actually meant to refer to a *pulse repetition rate*. That is, you have a train of square pulses that are each 100μs wide, at 100 pps (pps = pulses per sec). Right? Ok, let's assume that. Next, I see you are using a time-step of 0.1 sec. If so, that is potentially a big problem. After all, you can't possibly resolve (in time) any detailed physics that occurs during a 100μs pulse if using a 0.1s timestep! In general, time steps have to be short compared to the time scales of the time-dependent behaviors in your model. I suggest you post your model to the forum so that others may review it and offer more detailed assistance.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.