Hello.
Thanks for your answers, I reviewed what you said and took a closer look at sources, trying to understand the solver options setup mechanism in extent I can...
As I can see, for every variable the solver is selected automatically if not set by the user (Automatic option) so, in any case, I must determine the solver selected for velocity if I set the number of iterations in
cs_user_linear_solvers(). Then the function must select the solver type (multigrid or "simple") and set options accordingly.
I see that solver options for particular variable are set with
cs_sles_it_define(). Even if the multigrid solver is used for variable, the
cs_sles_it_define() function is called for it and maximum number of iteration is set (don't know how it affects the MG solver). Can I query the solver for velocity currently set in
cs_user_linear_solvers function? If not, or it's too complex, I think it's better to just limit precision at first stage and live with these rare "iteration spikes" at main stage of calculation. My knowledge is not enough to do some complex things with Saturne programming. But if I can determine parameters that are set with
cs_sles_it_define, than I can just query and then set similar options changing only number of iterations. Is there some kine of "cs_sles_it_query"? I didn't find resembling function in Doxygen. Also, if MG solver is used for velocity, I will likely have to tweak maximum cycles and/or coarse iterations leaving other options unchanged. Is there a function to query MG solver options like "cs_multigrid_
get_solver_options"?
That's why I' interested in this question. Here is my "Saturne monitoring" script output, table version. You see that at outer loop iteration 199 there was 785 "linear iterations" for velocity (solver and preconditioner are Automatic) while average "linear" iterations for velocity was around 40. So this one 199'th outer loop iteration consumed about 20x time for velocity field calculation compared with many of the same linear solvings for an average iteration.
Code: Select all
============================================================================================
| Itr (abs) | Faces Visc | Itr Vel | Itr Prs | VelMag Max | Prs Min | Prs Max |
| [---] | [%] | [---] | [---] | [m/s] | [Pa] | [Pa] |
============================================================================================
| 199 | 0 | 785 | 15 | 52.891 | -623.41 | 305.12 |
| 200 | 0 | 26 | 12 | 53.009 | -628.32 | 303.17 |
| 201 | 0 | 65 | 15 | 53.373 | -630.52 | 369.26 |
| 202 | 0 | 35 | 14 | 68.225 | -1010 | 516.88 |
| 203 | 0 | 47 | 15 | 85.909 | -1587.9 | 470.3 |
| 204 | 0 | 45 | 14 | 95.526 | -1945.1 | 350.34 |
| 205 | 0 | 42 | 15 | 69.466 | -1427.4 | 308.28 |
| 206 | 0 | 47 | 14 | 53.589 | -640.26 | 383.26 |
| 207 | 0 | 43 | 16 | 269.91 | -643.9 | 4276.4 |
| 208 | 0 | 55 | 16 | 428.81 | -648.75 | 9871.5 |
[/size]
Thanks for your attention.