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 give different time steps in a solution?

Please login with a confirmed email address before reporting spam

In a single solution, I separate the total time into several time ranges, and I want to set different time steps for different time range, for example, for time range (t1,t2), the time step is dt1, for time range (t3,t4), it is dt2, ------. Can comsol do this?

6 Replies Last Post Jul 5, 2017, 11:09 p.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 Apr 26, 2011, 12:54 a.m. EDT
Hi

the time field in the transient solver accepts a set "{}" that can be a space or comma separated list of any type, a single range(,,) or multiple chained "range(,,) range(,,) ..." or a mixture, or even 10^{range(,,)}.

Only conditions, the values should be monotonously increasing (or decreasing), none two equal values, nor any inversion

--
Good luck
Ivar
Hi the time field in the transient solver accepts a set "{}" that can be a space or comma separated list of any type, a single range(,,) or multiple chained "range(,,) range(,,) ..." or a mixture, or even 10^{range(,,)}. Only conditions, the values should be monotonously increasing (or decreasing), none two equal values, nor any inversion -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 26, 2011, 9:33 a.m. EDT

Hi

the time field in the transient solver accepts a set "{}" that can be a space or comma separated list of any type, a single range(,,) or multiple chained "range(,,) range(,,) ..." or a mixture, or even 10^{range(,,)}.

Only conditions, the values should be monotonously increasing (or decreasing), none two equal values, nor any inversion

--
Good luck
Ivar


Thank you, Ivar, but I mean the time step of computation (which is a similar parameter of grid spacing), not the time edit field. I think these two time steps are different.
[QUOTE] Hi the time field in the transient solver accepts a set "{}" that can be a space or comma separated list of any type, a single range(,,) or multiple chained "range(,,) range(,,) ..." or a mixture, or even 10^{range(,,)}. Only conditions, the values should be monotonously increasing (or decreasing), none two equal values, nor any inversion -- Good luck Ivar [/QUOTE] Thank you, Ivar, but I mean the time step of computation (which is a similar parameter of grid spacing), not the time edit field. I think these two time steps are different.

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 Apr 26, 2011, 3:00 p.m. EDT
Hi

that depends on your Solver Time Stepping settings, "Automatic" (the default) means COMSOL governs and might decide to take different time steps than those you specify, and will generate the results at your specified values via an interpolation of its solver step values.

If you use "Strict" it will only calculate your define time steps, with "Intermediate" it chooses a point in-between your time steps. The two latter are typically used for periodic responses, while "Automatic" is well suited for asymptomatic solutions, such as those from diffusion equation based analysis

--
Good luck
Ivar
Hi that depends on your Solver Time Stepping settings, "Automatic" (the default) means COMSOL governs and might decide to take different time steps than those you specify, and will generate the results at your specified values via an interpolation of its solver step values. If you use "Strict" it will only calculate your define time steps, with "Intermediate" it chooses a point in-between your time steps. The two latter are typically used for periodic responses, while "Automatic" is well suited for asymptomatic solutions, such as those from diffusion equation based analysis -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 26, 2011, 4:30 p.m. EDT

Hi

that depends on your Solver Time Stepping settings, "Automatic" (the default) means COMSOL governs and might decide to take different time steps than those you specify, and will generate the results at your specified values via an interpolation of its solver step values.

If you use "Strict" it will only calculate your define time steps, with "Intermediate" it chooses a point in-between your time steps. The two latter are typically used for periodic responses, while "Automatic" is well suited for asymptomatic solutions, such as those from diffusion equation based analysis

--
Good luck
Ivar


I think if I make an example, my question will be much clear. If I input several time ranges in the Time edit field, like range( , , ), range( , , ), --- and in the time stepping settings, the Method I chose BDF, the Steps taken by solver I chose Free, the Initial step box was unchecked, the Maximum step box was checked and need to input a value. I want the different time ranges in the Time edit field have different Maximum steps. Can comsol do this?
[QUOTE] Hi that depends on your Solver Time Stepping settings, "Automatic" (the default) means COMSOL governs and might decide to take different time steps than those you specify, and will generate the results at your specified values via an interpolation of its solver step values. If you use "Strict" it will only calculate your define time steps, with "Intermediate" it chooses a point in-between your time steps. The two latter are typically used for periodic responses, while "Automatic" is well suited for asymptomatic solutions, such as those from diffusion equation based analysis -- Good luck Ivar [/QUOTE] I think if I make an example, my question will be much clear. If I input several time ranges in the Time edit field, like range( , , ), range( , , ), --- and in the time stepping settings, the Method I chose BDF, the Steps taken by solver I chose Free, the Initial step box was unchecked, the Maximum step box was checked and need to input a value. I want the different time ranges in the Time edit field have different Maximum steps. Can comsol do this?

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 Apr 26, 2011, 5:06 p.m. EDT
Hi

Indeed it's somewhat confusing, with all these settings that also changes with the physics chosen ;)

But I believe I'm not to far off:

If you leave BDF "Free", COMSOL decides, + you might restrict, globally, the initial step and max step. (but once, not per region, without chaining several times series solver sequences). And there is another setting to decide if you store only the values you have given or all values used by the Solver

If you decide for BDF "Strict", you have full control with your range values (here you might chain ranges), which are the ones solved and stored at output

Do we agree ?

So I suppose it's rather no for your question of multiple max steps in "free mode".

But as I said too, if you chain several time solvers in sequence, using the last step of the previous to start the first step of the next solver sequence you might get to your point. But you must store and restart the initial conditions, and there something is not working for me, I'm expecting a reply from support, one of these days. If you do not store, you loose the values of all but last time series

--
Good luck
Ivar
Hi Indeed it's somewhat confusing, with all these settings that also changes with the physics chosen ;) But I believe I'm not to far off: If you leave BDF "Free", COMSOL decides, + you might restrict, globally, the initial step and max step. (but once, not per region, without chaining several times series solver sequences). And there is another setting to decide if you store only the values you have given or all values used by the Solver If you decide for BDF "Strict", you have full control with your range values (here you might chain ranges), which are the ones solved and stored at output Do we agree ? So I suppose it's rather no for your question of multiple max steps in "free mode". But as I said too, if you chain several time solvers in sequence, using the last step of the previous to start the first step of the next solver sequence you might get to your point. But you must store and restart the initial conditions, and there something is not working for me, I'm expecting a reply from support, one of these days. If you do not store, you loose the values of all but last time series -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Jul 5, 2017, 11:09 p.m. EDT
Hello Ivar,

You mentioned that the result solved at the 'Time Steps Taken by Solver' can be recorded. However, when I do a parametric sweep, I can only see the result of 'Time Steps Taken by Solver' on the last parametric value.

Is there a way to save all the results of the 'Time Steps Taken by Solver' on all the parametric value?

Thank you in advance.
Yu Hui
Hello Ivar, You mentioned that the result solved at the 'Time Steps Taken by Solver' can be recorded. However, when I do a parametric sweep, I can only see the result of 'Time Steps Taken by Solver' on the last parametric value. Is there a way to save all the results of the 'Time Steps Taken by Solver' on all the parametric value? Thank you in advance. Yu Hui

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.