Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

calling a waveform from Definition node

Dear all,

I want to apply AC voltage to an electrode. I built my desired stimulation waveform from Definition node. How can I call this function? Do I have to enter function name in Electric Current part or Terminal name? Please let me know where is my problem since I am not sure that this waveform is considered during computing process.

Kind regards,

2 Replies Last Post 07/05/2013, 10:24 GMT-04:00
Posted: 4 years ago 07/05/2013, 07:33 GMT-04:00
Hi

if it's a true AC signal its better to enter "just" the amplitude in the port port/terminal BC entry and fix the frequency(-ies) in the frequency domain solver node and off you go

If you desire defining a transient time signal with a function depending on "t" the default name for time in COMSOL (default units = seconds) then choose your an1(t) or whatever your function is called. now if your field goes orange, it could be that you have not defined units (in the Definition functions ...) for the argument "t" then use a an1(t[1/s]) to make t without units in the correct dimension (or t[1/h] if you expect entries in hours...), or you might need to multiply by a *1[W/m^2] or whatever units applies

for a time dependent function use the time/transient solver, it will map "t" from the range you define in the solver node.

Another point: learn the difference between a port/terminal (lumped BC) and the Electric Potential BC, chec the doc, if its a conductor use the terminal BC as this one gives you also lumped results such as impedance voltage current ...

--
Good luck
Ivar
Hi if it's a true AC signal its better to enter "just" the amplitude in the port port/terminal BC entry and fix the frequency(-ies) in the frequency domain solver node and off you go If you desire defining a transient time signal with a function depending on "t" the default name for time in COMSOL (default units = seconds) then choose your an1(t) or whatever your function is called. now if your field goes orange, it could be that you have not defined units (in the Definition functions ...) for the argument "t" then use a an1(t[1/s]) to make t without units in the correct dimension (or t[1/h] if you expect entries in hours...), or you might need to multiply by a *1[W/m^2] or whatever units applies for a time dependent function use the time/transient solver, it will map "t" from the range you define in the solver node. Another point: learn the difference between a port/terminal (lumped BC) and the Electric Potential BC, chec the doc, if its a conductor use the terminal BC as this one gives you also lumped results such as impedance voltage current ... -- Good luck Ivar

Posted: 4 years ago 07/05/2013, 10:24 GMT-04:00
Hi Ivar,
My model is a kind of capacitive coupling.
I defined my waveform as follows:

pw1
start end function
0 .0003 1
.0003 .0006 -1
.0006 .016 0
then=>
an1
Expresion:pw1(mod(t[1/s],.016))
argument:t
make periodic
lower limit=0
upper limit=1
plot parameters:t lower limit=0 upper limit=5
then I enter an1 in Terminal name part and compute the model. it worked. then I wanted to understand if the simulation workes correctly or not. so I changed the Expresion as follows:
Expresion:pw1(mod(t[1/s],.0000016))
but nothing changes. why this happens. Please guide me Ivar.
Regards,
Hi Ivar, My model is a kind of capacitive coupling. I defined my waveform as follows: pw1 start end function 0 .0003 1 .0003 .0006 -1 .0006 .016 0 then=> an1 Expresion:pw1(mod(t[1/s],.016)) argument:t make periodic lower limit=0 upper limit=1 plot parameters:t lower limit=0 upper limit=5 then I enter an1 in Terminal name part and compute the model. it worked. then I wanted to understand if the simulation workes correctly or not. so I changed the Expresion as follows: Expresion:pw1(mod(t[1/s],.0000016)) but nothing changes. why this happens. Please guide me Ivar. Regards,

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.