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.

Can I define time step?

Please login with a confirmed email address before reporting spam

Hi,

Can I define time step?

For example

0<t<1 : time step = 0.001

1<t<5 : time step = 1

5<t<6 : time step = 0.001

Best regards.

3 Replies Last Post Sep 19, 2011, 9:27 a.m. EDT
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: 1 decade ago Sep 19, 2011, 5:38 a.m. EDT
Hi

check the "definition - function tab" and fiddle a little with the formulas, it shoudl work out nicely

--
Good luck
Ivar
Hi check the "definition - function tab" and fiddle a little with the formulas, it shoudl work out nicely -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 19, 2011, 6:55 a.m. EDT
Dear, Ivar

I defined the analytic function in definition for "ttt"

0.001*(0<t<1)+1*(1<t<5)+0.001*(5<t<6)



0<t<1 : time step = 0.001

1<t<5 : time step = 1

5<t<6 : time step = 0.001

and then typed ttt in generalized alpha transient solver manual time step field.

But i got expression error message.

Can you help?

Best regards, Ji young park
Dear, Ivar I defined the analytic function in definition for "ttt" 0.001*(0

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: 1 decade ago Sep 19, 2011, 9:27 a.m. EDT
Hi

you can also use "t" and not "ttt" if I understand you right

I would rather write the operator as

f(t) = 0.001+(1-0.001)*(0<t)*(t<5)

you have fewer tests, or with an if(,,) (see the doc)

and then when you call "f(t)" you write "f(t[1/s])" to get a unitless "t" value expressed in seconds (or whatever unit you prefere.

I'm not fully sure the "0<t<1" double boolean is correctly parsed in COMSOL ?

--
Good luck
Ivar
Hi you can also use "t" and not "ttt" if I understand you right I would rather write the operator as f(t) = 0.001+(1-0.001)*(0

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.