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.

Defining a periodic rectangle function

Please login with a confirmed email address before reporting spam

Hi everyone,

I want to define a periodic rectangle current signal, where the pulse and pause times should be the input parameters.

For that I created a rectangle function under Global. There I defined the lower and upper limits of my signal. I think the second step should be creating an "Analytic" so that the periodicity can be introduced. I am stuck at this step.

Can anyone please help me to solve this problem?

Thanks a lot,

Bartu


6 Replies Last Post Jul 4, 2016, 9:12 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 27, 2014, 6:28 a.m. EDT
I made this calculations once, when I needed a pulsed boundary condition with an arbitrary pulse duty cycle. I cannot recall any more, how I did it but, please, here you have it attached. It works, I can guarantee :)

Lasse
I made this calculations once, when I needed a pulsed boundary condition with an arbitrary pulse duty cycle. I cannot recall any more, how I did it but, please, here you have it attached. It works, I can guarantee :) Lasse


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 27, 2014, 6:33 a.m. EDT
But if you just need a square wave signal use

y = sign(sin(2pi*t/T))

where T is the pulse period. It is easy to modify this according to your needs.

Lasse
But if you just need a square wave signal use y = sign(sin(2pi*t/T)) where T is the pulse period. It is easy to modify this according to your needs. Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Oct 9, 2015, 5:07 p.m. EDT
Thanks a lot Lasse, it worked for me very well!
Thanks a lot Lasse, it worked for me very well!

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Mar 8, 2016, 5:41 a.m. EST
can you please tell me what is t
can you please tell me what is t

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Mar 8, 2016, 10:56 a.m. EST
Please see my post here
www.comsol.com/community/forums/general/thread/103901/
for a simpler and more flexible way to define periodic functions in COMSOL.
Best regards,
Jeff
Please see my post here www.comsol.com/community/forums/general/thread/103901/ for a simpler and more flexible way to define periodic functions in COMSOL. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jul 4, 2016, 9:12 p.m. EDT
Hi everyone,
I want to solve the following couple ordinary equation by comsol, which I(t) is pulse current. when I used the sin (t) as I(t) i got some results. but when i use I = sign(sin(2pi*t/T)) as Lasse introduced, i got some errors. I would appreciate if kindly help me.

Nt=I(t)/(q*Va)+g0*(N-N0)*S/(1+eps*S)+N/tan
St= eta*g0*(N-N0)*S/(1+eps*S)-eta*beta*N/tan+S/tap
Hi everyone, I want to solve the following couple ordinary equation by comsol, which I(t) is pulse current. when I used the sin (t) as I(t) i got some results. but when i use I = sign(sin(2pi*t/T)) as Lasse introduced, i got some errors. I would appreciate if kindly help me. Nt=I(t)/(q*Va)+g0*(N-N0)*S/(1+eps*S)+N/tan St= eta*g0*(N-N0)*S/(1+eps*S)-eta*beta*N/tan+S/tap

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.