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.

tuning time dependant solver

Please login with a confirmed email address before reporting spam

HI
I have a basic question here but cannot find its answer in the doc
I have a time dependant model that requires for proper solution a " small" time step says 1e-3. a bigger time step leads to convergence error
but on the other hand for post processing I only really need to store "snapshot every 0.1 sec and the large number of frame generated by the solver setting slows done considerably my post processing

Question: How can I set the time at which I want snapshot to be generated Independantly of the time step I have to impose to the solver for proper resolution? The time between snapshot being of course much larger than the solver time step ?

Thanks in advance.
JF

9 Replies Last Post 6 févr. 2010, 05:07 UTC−5
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 4 févr. 2010, 06:18 UTC−5
Hi

What if you try an indexed search on your doc pdf files, it took me 10 sec to identify "Guide.pdf" and then 10 more to get to page 392 (V3.5a) where there is a chapter devoted to time sequence settings :)

In fact many of the replies on the forum can be found by an indexed search of the doc files, there is a lot of stuff therein, but somtimes its not obvious to locate it ;)

Bonne lecture
Ivar

PS:
Autres choses, on me fait des remarques que nous devons nous efforcer à utiliser l'anglais sur le forum pour faciliter le suivi "mondial"
Hi What if you try an indexed search on your doc pdf files, it took me 10 sec to identify "Guide.pdf" and then 10 more to get to page 392 (V3.5a) where there is a chapter devoted to time sequence settings :) In fact many of the replies on the forum can be found by an indexed search of the doc files, there is a lot of stuff therein, but somtimes its not obvious to locate it ;) Bonne lecture Ivar PS: Autres choses, on me fait des remarques que nous devons nous efforcer à utiliser l'anglais sur le forum pour faciliter le suivi "mondial"

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 févr. 2010, 06:46 UTC−5
Ivar,
thank you for your prompt answer
of course I did what you suggeste a long time ago that but I guess I explained myself poorly in my previous post
According to the documentation, the output time step is for OUTPUT ONLY and my question should be trivial
UNFORTUNATELY what I have found is that there is a correlation between the convergence of the solution and the output time specifiec in the time stepping area as explained in p392.
the correlation is seen becasue if I specify a small out put time I get a correct solution BUT a large number of snapshot and if I ask for a small number of snapshot there I get a convergence failure .... which I canot understand based on the documentaito I read in the user guide [ p392 and subsequent...
I also tried to set a manual maximum time step in the time stepping tab equal to the small output time step that provide me with a solution and set a larger time step corresponding to my post processing requirement but then get another failure convergence.
So I believe that my question has merit in the sense that comsol doc [ p392 and subsequent ]APPARENTLY indicates that time stepping ONLY drive times where snapshot are taken but my experience demonstrate APPARENTLY otherwise.

I am sure there is a sublety somewhere but again not found obvjously in the documentation.
jean Francois

ps as for the language comment, I dont see that as a problem with me, even if I answered in french to a quesiton asked in french... but then does that mean this community will defacto exclude non english speaker....?
Ivar, thank you for your prompt answer of course I did what you suggeste a long time ago that but I guess I explained myself poorly in my previous post According to the documentation, the output time step is for OUTPUT ONLY and my question should be trivial UNFORTUNATELY what I have found is that there is a correlation between the convergence of the solution and the output time specifiec in the time stepping area as explained in p392. the correlation is seen becasue if I specify a small out put time I get a correct solution BUT a large number of snapshot and if I ask for a small number of snapshot there I get a convergence failure .... which I canot understand based on the documentaito I read in the user guide [ p392 and subsequent... I also tried to set a manual maximum time step in the time stepping tab equal to the small output time step that provide me with a solution and set a larger time step corresponding to my post processing requirement but then get another failure convergence. So I believe that my question has merit in the sense that comsol doc [ p392 and subsequent ]APPARENTLY indicates that time stepping ONLY drive times where snapshot are taken but my experience demonstrate APPARENTLY otherwise. I am sure there is a sublety somewhere but again not found obvjously in the documentation. jean Francois ps as for the language comment, I dont see that as a problem with me, even if I answered in french to a quesiton asked in french... but then does that mean this community will defacto exclude non english speaker....?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 févr. 2010, 11:20 UTC−5
Hi Jean Francois - Suppose your simulation will run for total_sim_time, with max_time_step set small enough to avoid convergence errors, and you want num_of_snapshots sets of output along the way. Here is a piece of code that I've had success with:

output_time_list = linspace(0, total_sim_time, num_of_snapshots);
fem.sol = femtime(fem, ...
'Maxstep', max_time_step, ...
'Tlist', output_time_list, ...
'Tout', 'Tlist');

Tom
Hi Jean Francois - Suppose your simulation will run for total_sim_time, with max_time_step set small enough to avoid convergence errors, and you want num_of_snapshots sets of output along the way. Here is a piece of code that I've had success with: output_time_list = linspace(0, total_sim_time, num_of_snapshots); fem.sol = femtime(fem, ... 'Maxstep', max_time_step, ... 'Tlist', output_time_list, ... 'Tout', 'Tlist'); Tom

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 févr. 2010, 16:26 UTC−5
Thanks a lot Thomas.
I will use your suggestion it should apparently solve my conundrum
Thanks a lot Thomas. I will use your suggestion it should apparently solve my conundrum

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 5 févr. 2010, 02:28 UTC−5
Hi

Yes, I should have expected that you had read the docs, sorry for that.

For the language issue, keep kool, I reacted too as you and answered in French, I mostly switch language without noticing it, but it's to help keeping the "rules" there basically to allow everyone to follow, more or less.
And I would have serious problems to get anything meaninful out, if the people from the East started to exchange with their language and signs, but a common language, even if difficult for several out there helps to keep a common denominator.

By the way do you know the most spoken language ? ...
No, not chinese, it's "internet english" ;)

Have a nice day
Ivar
Hi Yes, I should have expected that you had read the docs, sorry for that. For the language issue, keep kool, I reacted too as you and answered in French, I mostly switch language without noticing it, but it's to help keeping the "rules" there basically to allow everyone to follow, more or less. And I would have serious problems to get anything meaninful out, if the people from the East started to exchange with their language and signs, but a common language, even if difficult for several out there helps to keep a common denominator. By the way do you know the most spoken language ? ... No, not chinese, it's "internet english" ;) Have a nice day Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 févr. 2010, 03:27 UTC−5
Not a problem Ivar
but if Thomas has provided me with a practical fix,[ which mean thatobviously the problem is known...]
I stil would love to understand what is the relationship between time stepping [ defined as per p392 in the user guide in its most basic way] and the way comsol calculates its internal time step when solving a problem.

My reading of the doc is that they should be NO constraining relationship , Comsol doing its stuff and reporting result when asked to do so....but again
I have example that tell me otherwise..
and I usually like to understand what I am doing... :-)

so do you have any clue on that?

As for the language I am very ¨KOOL¨ and use Internet english for myself but i will have no problem if a group of people where choosing another language .. they will just not get as much support as they could expect if they were using english but then it will be their choice...
Have a great day !
JF
Not a problem Ivar but if Thomas has provided me with a practical fix,[ which mean thatobviously the problem is known...] I stil would love to understand what is the relationship between time stepping [ defined as per p392 in the user guide in its most basic way] and the way comsol calculates its internal time step when solving a problem. My reading of the doc is that they should be NO constraining relationship , Comsol doing its stuff and reporting result when asked to do so....but again I have example that tell me otherwise.. and I usually like to understand what I am doing... :-) so do you have any clue on that? As for the language I am very ¨KOOL¨ and use Internet english for myself but i will have no problem if a group of people where choosing another language .. they will just not get as much support as they could expect if they were using english but then it will be their choice... Have a great day ! JF

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 5 févr. 2010, 16:02 UTC−5
Hi Jean-François

Well when I get really stuck and need help, I use COMSOL support, to now they have been very efficient.
But usually I also fight several hours before I ask them, I do not like to not be able to understand by myself (encore ces doubles négations du français qui passent mal en anglais). I can only confirm that there are several domains where the COMSOL jump rather quickly over difficult subjects, often too I believe they search to protect themself from being too obviously copied. COMSOL is shaking up the traditional FEM software industry with their very general and new multiphysics approach.

When you explain well your case the reply from support is just better

Good luck
Ivar
Hi Jean-François Well when I get really stuck and need help, I use COMSOL support, to now they have been very efficient. But usually I also fight several hours before I ask them, I do not like to not be able to understand by myself (encore ces doubles négations du français qui passent mal en anglais). I can only confirm that there are several domains where the COMSOL jump rather quickly over difficult subjects, often too I believe they search to protect themself from being too obviously copied. COMSOL is shaking up the traditional FEM software industry with their very general and new multiphysics approach. When you explain well your case the reply from support is just better Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 févr. 2010, 01:53 UTC−5
Ivar
thank you for the advice..
duly noted.
btw i feel the same as you do and feel the need to understand what i do ...:-)
I also found a practical way to resolve my initial worry [ slow post processing due to the very large and ünnecessary for post processing¨number of snapshot generated by comsol which is to use interpolated time in the post processing phase of the work and I can extract exactly the snapshot i want . so I learned something in the process lol

Now having say that I still believe the documentation on the solving process is ambiguous and possibly misleading as written on this issue
jf
Ivar thank you for the advice.. duly noted. btw i feel the same as you do and feel the need to understand what i do ...:-) I also found a practical way to resolve my initial worry [ slow post processing due to the very large and ünnecessary for post processing¨number of snapshot generated by comsol which is to use interpolated time in the post processing phase of the work and I can extract exactly the snapshot i want . so I learned something in the process lol Now having say that I still believe the documentation on the solving process is ambiguous and possibly misleading as written on this issue jf

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 6 févr. 2010, 05:07 UTC−5
Hi

by the way have you checked the "mlinterface.pdf", in particular the "FEM.EVENT—EXPLICIT AND IMPLICIT EVENTS" p.46, you might find some usefull info there, its a quick guess. I'm not sure its what you need

Good luck
Ivar
Hi by the way have you checked the "mlinterface.pdf", in particular the "FEM.EVENT—EXPLICIT AND IMPLICIT EVENTS" p.46, you might find some usefull info there, its a quick guess. I'm not sure its what you need Good luck Ivar

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.