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
29 mag 2012, 13:54 GMT-4
Hi
you have 2 types of paremeter sweep solver sequences:
1) the Parametric Sweep Node you put explicitely in front of your solver study sequence, this one loops around the full model, including parameters, geometry, mesh, physics and study nodes. It will restart each solver sequence with the initial conditions you specified !
2) the solver "continuation parameter sweep" typically for steady state solvers, but also in some sens for frequency domain and temporal solvers. These do NOT loop around the geometry and mesh nodes (so you geometry or topology is not changes), and each solver parameter step is using the PREVIOUSLY solved solution as initial condition for the next step.
1) is used when you change the geometry by a Pareameter sweep, 2) should be used when you build a sequence of increasing or decreasing BC conditions, or frequency sweep or ..., you gain time to solve, then by reusing "better" initial conditions
Your second question concerns the steps of the solver:
Mostly COMSOL decides for "free" running stepping, that is it adapts the steps to the results as progressing, by using internal residuals and norms and the Jacobian of the model to guess next step and decide how far it "throughs" the step, into the multidomain of unknown results. Mostly it does this to minimise integration errors, but the non linear models can easily too get into a loop and you see the progress bar move left and right endlessly. Furthermore, the free running algorithm assumes a more or less assymptotically converging process, so it tries to regularly double the step size, which is very efficient for most diffsion type equations, but can be catastrophic for repetitive BC conditions, as the solver will skip many oscillations and smoothen the response completly. That is why for time stepping, you should always ask yourself if the BC and the solution is a HT or diffusion problem converging assymptotically (more or less) or do you have oscilalting BC defined ? if so, use intermediate or strict stepping, this will enforce at least one step inbetween your defined steps (free might interpolate, sometimes wrongly, many if not all of your steps from 2 true solver steps and results).
here is the time discrete solver too ,that enforeces a strict, regular, time stepping, and many intermediate cases obtained by tweaking all the solver parameters. You can observe this on your solver log section, the "out" flag indicates when COMSOL stores the results you asked for, if you see several consecutive "out" without any solver steps, you know that COMSOL is interpolating (which might be perfectly valid), if you see many step in between the out then the convergence is difficult and either you should increase the steps to store as there might be interesting physics going on, not to be missed, or you should reduce some other resolution parameter, or increase the step amplification, all depends on the solver. Tweaking the solver is tricky and require experience and knowledge (often of the expected result). personally I mostly use the default from COMSOL.
So there is no clear response if the results are better by forcing less intermediate results, it all depends on the model and the non linearities.
The best way I know about , to improve convergence, is to give intial conditions as close a possible to the final results (for the starting BC values), all "0", as is the default by COMSO,L is far from optimum for many cases, but as good as any other starting point still, so often perfectly acceptable.
--
Have fun Comsoling
Ivar
Hi
you have 2 types of paremeter sweep solver sequences:
1) the Parametric Sweep Node you put explicitely in front of your solver study sequence, this one loops around the full model, including parameters, geometry, mesh, physics and study nodes. It will restart each solver sequence with the initial conditions you specified !
2) the solver "continuation parameter sweep" typically for steady state solvers, but also in some sens for frequency domain and temporal solvers. These do NOT loop around the geometry and mesh nodes (so you geometry or topology is not changes), and each solver parameter step is using the PREVIOUSLY solved solution as initial condition for the next step.
1) is used when you change the geometry by a Pareameter sweep, 2) should be used when you build a sequence of increasing or decreasing BC conditions, or frequency sweep or ..., you gain time to solve, then by reusing "better" initial conditions
Your second question concerns the steps of the solver:
Mostly COMSOL decides for "free" running stepping, that is it adapts the steps to the results as progressing, by using internal residuals and norms and the Jacobian of the model to guess next step and decide how far it "throughs" the step, into the multidomain of unknown results. Mostly it does this to minimise integration errors, but the non linear models can easily too get into a loop and you see the progress bar move left and right endlessly. Furthermore, the free running algorithm assumes a more or less assymptotically converging process, so it tries to regularly double the step size, which is very efficient for most diffsion type equations, but can be catastrophic for repetitive BC conditions, as the solver will skip many oscillations and smoothen the response completly. That is why for time stepping, you should always ask yourself if the BC and the solution is a HT or diffusion problem converging assymptotically (more or less) or do you have oscilalting BC defined ? if so, use intermediate or strict stepping, this will enforce at least one step inbetween your defined steps (free might interpolate, sometimes wrongly, many if not all of your steps from 2 true solver steps and results).
here is the time discrete solver too ,that enforeces a strict, regular, time stepping, and many intermediate cases obtained by tweaking all the solver parameters. You can observe this on your solver log section, the "out" flag indicates when COMSOL stores the results you asked for, if you see several consecutive "out" without any solver steps, you know that COMSOL is interpolating (which might be perfectly valid), if you see many step in between the out then the convergence is difficult and either you should increase the steps to store as there might be interesting physics going on, not to be missed, or you should reduce some other resolution parameter, or increase the step amplification, all depends on the solver. Tweaking the solver is tricky and require experience and knowledge (often of the expected result). personally I mostly use the default from COMSOL.
So there is no clear response if the results are better by forcing less intermediate results, it all depends on the model and the non linearities.
The best way I know about , to improve convergence, is to give intial conditions as close a possible to the final results (for the starting BC values), all "0", as is the default by COMSO,L is far from optimum for many cases, but as good as any other starting point still, so often perfectly acceptable.
--
Have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
30 mag 2012, 04:16 GMT-4
Thanks Ivar, you've been very clear!
I will try to use the continuation parameter sweep and study the better BCs form my model.
Thanks a lot.
Francesca
Thanks Ivar, you've been very clear!
I will try to use the continuation parameter sweep and study the better BCs form my model.
Thanks a lot.
Francesca