# Discussion Forum

## calling a waveform from Definition node

 Topics: 4.3a, AC/DC Module
RSS feed   |   Turn on email notifications   |   2 Replies   Last post: May 7, 2013 2:24pm UTC

Natasa Arefi

May 7, 2013 9:57am UTC

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,

Ivar Kjelberg

May 7, 2013 11:33am UTC in response to Natasa Arefi

Re: calling a waveform from Definition node

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

Natasa Arefi

May 7, 2013 2:24pm UTC in response to Ivar Kjelberg

Re: calling a waveform from Definition node

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,

Rules and guidelines