Discussion ClosedThis 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.

rectangular input

Hyun Kwon engineering

Please login with a confirmed email address before reporting spam

I would like to add a concentration only for a predetermined time, i.e. rectangular input instead of step input. How should I type this in the COMSOL as a expression? Will it take anything like this?

C0*( u(t)-u(t-2))

1 Reply Last Post 2009年7月21日 GMT+2 00:25
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 2009年7月21日 GMT+2 00:25
Hi

why u(t) ? what do you mean by that ?
u for me has a default dimension of [m] in COMSOL, check carefully your dimensions.

But you could use a C0*(t>0.5)*(t<1), this would make a step function between 0.5 and 1.

Now, do not forget that this step function does not have any defined derivative at the discontinuities, so your solver will probably not manage to pass the steps !

The are the Heaviside functions (fldc1hs, flc2hs, flsmhs, flsmsign ...) to make smooter steps with contiuous derivatives, they work mostly better, see the doc .

By the there was another discussion about steps functions about a month ago

Good luck
Ivar
Hi why u(t) ? what do you mean by that ? u for me has a default dimension of [m] in COMSOL, check carefully your dimensions. But you could use a C0*(t>0.5)*(t

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

Baidu
map