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.
solver configuration setting
Posted 09.01.2012, 12:01 GMT-5 Computational Fluid Dynamics (CFD), Studies & Solvers Version 4.2, Version 4.2a 8 Replies
Please login with a confirmed email address before reporting spam
Hi:
Would some one teach me what the solver configuration means? When I follow the inkjet model, it says set "dependent variables 2, mod1_u, scale" as 10, and set "mod1_p" as1e4. What does that mean?
Thanks a lot.
Please login with a confirmed email address before reporting spam
That is proposing "manual scaling" it comes from the very large difference in absolute values that you get with different physics and different dependent variables.
From the numerical simulation (mathematics of binary number theory) the rule is keep all values close to "1" because there you have the best "resolution" (binary numbers are just a (poor) approximation of the Real numbers).
Normally COMSOL has some build in rules to set the scaling values for the dependent variables, but when you add new ones, or in given cases COMSOL might choose a poor value and the results, or even the convergence might be poor or even fail.
Take FSI with pressures p in 1E5 [Pa] displacements u in 1E-6 [m] and velocities U in 1 [m/s], if you divide the P values by 1E5, and multiply the u values by 1E6 you get all three unknowns to start close to "1", this to ease the matrix inversions and factorisations.
BUT you need to correct the results by adjusting back the 1e5 and 1e-6 ! Normally COMSOL knows how to do that internally to keep the results coherent ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thank you very much.
I am still not sure if I can choose the right manual scaling when running my simulation, is there any tutorials or discussions on that topic?
Please login with a confirmed email address before reporting spam
The "right value", from my understanding, is approximately the average value you expect to get, a factor 10 above or below seldom gives problems, it not an exact science, as often the solver scans orders of magnitude when solving.
As I said mostly COMSOL looks after the scaling for you (it tells you the values used in the solver log), but when you add specific ODE or PDE variables, then it's often usful to give a manual scaling, as then you mostly (should) know better than COMSOL what to expect ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
in some cases you need to test and try a litle, starting somewhre "in between". Wat I have not done so far, is to try to run twice the same study, by using the the frst results as initial conditions for the second study and see if COMSOL uses the same scaling by default, or if it is clever enough to analyse the initial conditions to get a "better" guess. But even then COMSOL might get fooled, nothing better than looking over its shoulder and and tweaking a little by yourself, so long you understad what is happening
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
... As I said mostly COMSOL looks after the scaling for you (it tells you the values used in the solver log) ...
Ivar
Hi Ivar,
Could you give me a hint about where to find this (in which log). The log I identify as the solver log is the one under the "Time-Dependent Solver 1" node. For example, I just ran a simulation, and it said:
Time-Dependent Solver 1 in Solver 1 started at 3-May-2012 17:27:32.
Time-dependent solver (Generalized-alpha)
Number of degrees of freedom solved for: 205.
Nonsymmetric matrix found.
Step Time Stepsize Res Jac Sol Order Tfail NLfail
0 0 out 4 3 4 0
1 1e-009 1e-009 out 5 4 5 2 0 0
2 2e-009 1e-009 out 6 4 6 2 0 0
3 3e-009 1e-009 out 7 4 7 2 0 0
4 4e-009 1e-009 out 8 4 8 2 0 0
5 5e-009 1e-009 out 9 4 9 2 0 0
6 6e-009 1e-009 out 10 4 10 2 0 0
7 7e-009 1e-009 out 11 4 11 2 0 0
8 8e-009 1e-009 out 12 4 12 2 0 0
9 9e-009 1e-009 out 13 4 13 2 0 0
1e-008 - out
10 1e-008 1e-009 14 4 14 2 0 0
Time-Dependent Solver 1 in Solver 1: Solution time: 1 s.
Where I don't think the information about variable scaling appears.
Is this not the right log? Or do I need to enable something?
Evgeni
Please login with a confirmed email address before reporting spam
indeed I do not see it there, there is a "log detailed" option in one of the solver nodes, try that, but I thought that in 4.2a it was always there, maybe not ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I searched for "log detailed", which gave me the page "COMSOL Multiphysics > Solver API > Solution Object Data", and the corresponding section was the "Advanced" node under the "Time-Dependent Solver 1" (in my case). It has a "Solver log" field. I'm sure I've looked there a few times, but never noticed it.
Many thanks!
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.
Suggested Content
- BLOG How to Use Job Sequences to Save Data After Solving Your Model
- KNOWLEDGE BASE The Magnetic and Electric Fields Interface with Electrical Circuit Gives an Unexpected Error for Transient Studies
- FORUM what values are taken for the "automatic" setting of Interpolation?
- FORUM four-sided simple support condition setting
- FORUM "Smart" manipulation of Solver Stepsize