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 4 juil. 2016, 21:12 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 27 oct. 2014, 06:28 UTC−4
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: 10 years ago 27 oct. 2014, 06:33 UTC−4
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 9 oct. 2015, 17:07 UTC−4
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: 8 years ago 8 mars 2016, 05:41 UTC−5
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: 8 years ago 8 mars 2016, 10:56 UTC−5
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 4 juil. 2016, 21:12 UTC−4
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.