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.

Very ill-conditioned preconditioner.

Please login with a confirmed email address before reporting spam

Hi-

I am modeling a fluid flow in a pipe that is ~15 meters long with a reducer on each end of the pipe. This pipe will eventually become a chemical reactor. I obtained the following message about the conditioner.


Failed to find a solution.
In segregated group 1:
Very ill-conditioned preconditioner.
The relative residual is more than 1000 times larger than the relative tolerance.
Returned solution has not converged.


Should I mesh the geometry differently, or is there another reason this is happening?

--
JDP


3 Replies Last Post Nov 27, 2015, 12:13 p.m. EST
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 May 10, 2011, 4:18 p.m. EDT
Hi

I believe first of all that you should check your BC's and change a few parameters to variables:

A Parameter is a constant that is evaluated once at the beginning (even before calling the solvers) of the model solving run, so your parameter "r" and Uinlet will be very "static", you should rather define them as Model1 Definitions Variables.

Then you should apply a inlet velocity >0, probably you have forgotten to copy over Uinlet, or it's the velocity filed BC conditions and normal inflow conditions that has been reset ?

Anyhow Uinlet the way you define it is only valid on the "inlet boundary", so if you create it as a variable you should do so for a local boundary variable, since r/R >1 in the large section.

I have noticed that I get often the negative fractional power error with such formulas for Uinlet, so I usually define a velocity profile with the v4 "step" function having it go from 1 to 0, at the radius of the pipe, with a steepness of about 1/5 to 1/10 of the pipe diameter

I would also add some initial conditions closer to the expected values, such as Uinlet there too, and a pressure drop, let's say simply taken from Poiseuille law for a straight laminar tube. My experience is that this is always better than just "0", but I must admit, that often "0" works well too. By calculating a few values for the initial conditions, you get also a clue about what you should expect

Once this was done it started to solve, but did not converge either ;)

I then can suggest to turn on the "plot while solving feature" to better follow and debug the process, you can also set the solver log to "detailed", you do not get much more info, but at least you see (sometimes) the scaling factors.

Final trick I might propose, if nothing else works: ramp up the velocity from close to "0" with a parametric "continuation" sweep of the stationary solver (see continuation tab)

Final tip: if you stay in "physics controlled mesh", you will notice that each time you change a parameter or something in the physics, then the solver will first remesh your geometry, as it detects that something might have changed. for your case it's quickly done, for a complex system it takes time. If you are happy with the default physics controlled mesh, you might want to consider changing/converting it to "user controlled", then it will not be remeshed automatically, it is up to you to remesh thereafter

--
Good luck
Ivar
Hi I believe first of all that you should check your BC's and change a few parameters to variables: A Parameter is a constant that is evaluated once at the beginning (even before calling the solvers) of the model solving run, so your parameter "r" and Uinlet will be very "static", you should rather define them as Model1 Definitions Variables. Then you should apply a inlet velocity >0, probably you have forgotten to copy over Uinlet, or it's the velocity filed BC conditions and normal inflow conditions that has been reset ? Anyhow Uinlet the way you define it is only valid on the "inlet boundary", so if you create it as a variable you should do so for a local boundary variable, since r/R >1 in the large section. I have noticed that I get often the negative fractional power error with such formulas for Uinlet, so I usually define a velocity profile with the v4 "step" function having it go from 1 to 0, at the radius of the pipe, with a steepness of about 1/5 to 1/10 of the pipe diameter I would also add some initial conditions closer to the expected values, such as Uinlet there too, and a pressure drop, let's say simply taken from Poiseuille law for a straight laminar tube. My experience is that this is always better than just "0", but I must admit, that often "0" works well too. By calculating a few values for the initial conditions, you get also a clue about what you should expect Once this was done it started to solve, but did not converge either ;) I then can suggest to turn on the "plot while solving feature" to better follow and debug the process, you can also set the solver log to "detailed", you do not get much more info, but at least you see (sometimes) the scaling factors. Final trick I might propose, if nothing else works: ramp up the velocity from close to "0" with a parametric "continuation" sweep of the stationary solver (see continuation tab) Final tip: if you stay in "physics controlled mesh", you will notice that each time you change a parameter or something in the physics, then the solver will first remesh your geometry, as it detects that something might have changed. for your case it's quickly done, for a complex system it takes time. If you are happy with the default physics controlled mesh, you might want to consider changing/converting it to "user controlled", then it will not be remeshed automatically, it is up to you to remesh thereafter -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 10, 2011, 4:36 p.m. EDT
Hi,

CFD is quite a tough nut to crack. Besides the suggestions by mr Ivar, I would like to add some of my own (I work mostly with CFD).

First thing you need to check is Reynolds number = density*velocity*diameter/viscosity and then decide whether you have turbulent or laminar flow (ill-preconditioning usually happens with turbulence and your error message talks about segregated error group 1...).

Second you need to mesh your geometry according to the type of flow (laminar or turbulent), if it is laminar you can just use the settings by Comsol, if not you may need to tweek them a bit especially the boundary layer section, which must have a very thin first layer for turbulent flows.

Third, Compute the entrance length using the Reynolds number just calculated and refine the mesh wherever you may need or even switch to a different physics.

Fourth, check your Boundary Conditions, inlet and outlet may have different dimensions (i.e. velocity at inlet and pressure at outlet), make sure that inlet condition is consistent with the entrance length calculated above.

Fifth check your results: turbulent flows must have a wall plus distance of about 11.06 everywhere and the wall distance must be very small compared to the diameter.

Sixth refine the mesh if necessary and use the previous solution to start a new study.

Seventh, come back for extra help? ;-)

Cheers
Hi, CFD is quite a tough nut to crack. Besides the suggestions by mr Ivar, I would like to add some of my own (I work mostly with CFD). First thing you need to check is Reynolds number = density*velocity*diameter/viscosity and then decide whether you have turbulent or laminar flow (ill-preconditioning usually happens with turbulence and your error message talks about segregated error group 1...). Second you need to mesh your geometry according to the type of flow (laminar or turbulent), if it is laminar you can just use the settings by Comsol, if not you may need to tweek them a bit especially the boundary layer section, which must have a very thin first layer for turbulent flows. Third, Compute the entrance length using the Reynolds number just calculated and refine the mesh wherever you may need or even switch to a different physics. Fourth, check your Boundary Conditions, inlet and outlet may have different dimensions (i.e. velocity at inlet and pressure at outlet), make sure that inlet condition is consistent with the entrance length calculated above. Fifth check your results: turbulent flows must have a wall plus distance of about 11.06 everywhere and the wall distance must be very small compared to the diameter. Sixth refine the mesh if necessary and use the previous solution to start a new study. Seventh, come back for extra help? ;-) Cheers

Sebastián Gómez Cardona

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Nov 27, 2015, 12:13 p.m. EST
Dear Mr. Ivar,

Looking for a solution in the blog entries of comsol for the error message: Very ill-conditioned preconditioner I found a reply by you to this issue. I'm working with the low-Re k-epsilon model in a complex geometry. I tried refining the mesh, change the initial values but nothing works. I can't add you my geometry because of the file size so I'd like you share to me your e-mail contact if it is possible in order to attaching the file. I hope you can help me with this problem, since even Comsol support can't.

Best regards
Dear Mr. Ivar, Looking for a solution in the blog entries of comsol for the error message: Very ill-conditioned preconditioner I found a reply by you to this issue. I'm working with the low-Re k-epsilon model in a complex geometry. I tried refining the mesh, change the initial values but nothing works. I can't add you my geometry because of the file size so I'd like you share to me your e-mail contact if it is possible in order to attaching the file. I hope you can help me with this problem, since even Comsol support can't. Best regards

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.