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.

Times to solve - Times to store

Please login with a confirmed email address before reporting spam

Hello, this is a quick one ;-)

Lest say I want to solve a problem with a certain time stepping: t=0:0.01:10, but then I only want to store certain values, for example t=0:0.1:0

Is there any way??

Best regards



5 Replies Last Post 2012/07/19 3:58 GMT-4
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 2012/06/13 15:24 GMT-4
Hi

for me it's no, or at least I do not know of any way,
But on the other hand, if you specify a 0:0.1:1 and use an intermediate or free time stepping COMSOL will adapt to choose smaller steps if required (with free it might skip several of your values too, be aware!), you can probably also tweak some of the other parameters to force COMSOl to choose small steps to have enough intermediate points.

But if you have an oscillating BC hence expect aan oscillating or periodic solution, you should use intermediate and enough steps to be sure COSMOL is seeing all oscillations, in this case COMSOL might choose very small intermediate steps, but you will anyhow have many outputs, so if you want only each maximum (provided you know when it is) I do not see how to restrain the save times

--
Good luck
Ivar
Hi for me it's no, or at least I do not know of any way, But on the other hand, if you specify a 0:0.1:1 and use an intermediate or free time stepping COMSOL will adapt to choose smaller steps if required (with free it might skip several of your values too, be aware!), you can probably also tweak some of the other parameters to force COMSOl to choose small steps to have enough intermediate points. But if you have an oscillating BC hence expect aan oscillating or periodic solution, you should use intermediate and enough steps to be sure COSMOL is seeing all oscillations, in this case COMSOL might choose very small intermediate steps, but you will anyhow have many outputs, so if you want only each maximum (provided you know when it is) I do not see how to restrain the save times -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012/07/18 7:37 GMT-4
Hi Jon,

I found several questions like yours in the discussion forum in the past and I would be interested in a solution of this problem as well.

For some specific problems it is quite important to restrict the solver to small time steps, as this does have a significant impact on keeping the mass balance correct (mesh size is the other important player here).
So I would like to compute the problem with rather small time steps, but in my case for a very long time span.
The resulting file size is far too large and plotting the results takes a long time. It would be fine to store only every 10th time step (for example). This would reduce the file size significantly.

Storing different (i.e. less) time steps than the solver took does not seem to be possible even with version 4.3
I would like to file this as an important wish to the Comsol developing team for future releases.

Best regards,
Juergen

Hi Jon, I found several questions like yours in the discussion forum in the past and I would be interested in a solution of this problem as well. For some specific problems it is quite important to restrict the solver to small time steps, as this does have a significant impact on keeping the mass balance correct (mesh size is the other important player here). So I would like to compute the problem with rather small time steps, but in my case for a very long time span. The resulting file size is far too large and plotting the results takes a long time. It would be fine to store only every 10th time step (for example). This would reduce the file size significantly. Storing different (i.e. less) time steps than the solver took does not seem to be possible even with version 4.3 I would like to file this as an important wish to the Comsol developing team for future releases. Best regards, Juergen

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012/07/19 3:50 GMT-4
Storing different (i.e. less) time steps than the solver took does not seem to be possible even with version 4.3
I would like to file this as an important wish to the Comsol developing team for future releases.

I don't agree with this assessment. In all Comsol versions I've ever used, there has been a clear distinction between "time steps taken by solver" and "times to store". Usually, the time list you define in the study settings are the times for which the solution will be saved. The actual time stepping can be controlled via the solver settings. For example, when you use the BDF time stepper, you can tell it to make no steps larger than 1 ms, even though the "times to store" are spaced 1 second apart.

[quote]Storing different (i.e. less) time steps than the solver took does not seem to be possible even with version 4.3 I would like to file this as an important wish to the Comsol developing team for future releases.[/quote] I don't agree with this assessment. In all Comsol versions I've ever used, there has been a clear distinction between "time steps taken by solver" and "times to store". Usually, the time list you define in the study settings are the times for which the solution will be saved. The actual time stepping can be controlled via the solver settings. For example, when you use the BDF time stepper, you can tell it to make no steps larger than 1 ms, even though the "times to store" are spaced 1 second apart.

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 2012/07/19 3:51 GMT-4
Hi

and there is an option somewhere to store all steps

--
Good luck
Ivar
Hi and there is an option somewhere to store all steps -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012/07/19 3:58 GMT-4
and there is an option somewhere to store all steps

Yes, that's right. (And is why I wrote "usually".) One can, in fact, override the default behavior (as described above) by changing "Times to store" from "Specified values" to "Steps taken by solver". This option can be found in the "Output" section of the time-dependent solver's settings.

[quote]and there is an option somewhere to store all steps[/quote] Yes, that's right. (And is why I wrote "usually".) One can, in fact, override the default behavior (as described above) by changing "Times to store" from "Specified values" to "Steps taken by solver". This option can be found in the "Output" section of the time-dependent solver's settings.

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.