CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Divergence Detected in AMG solver- Species 0 (https://www.cfd-online.com/Forums/fluent/78160-divergence-detected-amg-solver-species-0-a.html)

elmcmaster July 14, 2010 07:41

Divergence Detected in AMG solver- Species 0
 
Hi all,

I am using fluent 12, I am simualting flow and water gas shift reaction through a packed bed reactor. I am also using compiled UDFs for custom reaction rates and zone specific diffusivities.

For testing I run the simulation on my windows 7 PC first, initially with reactions off and product species equations off, to get a converged coldflow result before enabling reactions and product equations, then iterate to get a steady converged soloution, before going on to do various unsteady calculations.

Using this same case file, and a Text journal, i intend to do exactly the same procedure but more in depth on my universities Parallel computer, which is Itanium 64 architecture, however, even though there are no problems on the Windows computer, the output text file from the console indicates that even before the first iteration is copleted, that there is:

Divergence in the AMG solver- species-0

Then it just hangs


I have tried reducing the under relaxation factors for the species, though the error still remains.

Any suggestions would be most welcome.

Thanks

Also, when i cange the pressure velocity coupling from simple to coupled its no longer says anything about divergence error, however the porous regions, which have fixed values of velocity set to 0, then dont obey the fixed values rule, it appears as though its an empty cylinder

Michael

chaozhong.qin July 15, 2010 15:49

Hi,
Try this:

In multigrid solver, change the method for species0 to F cycle, with stabilization.

Good Luck

elmcmaster July 16, 2010 07:24

Ok But...
 
Hi Steven,

Thanks for your reply.

I did try what you said with the f-cycle and bcgstab method, but it then said there was divergence in species 3(species 1 and 2 eqs are turned off), so i did the same for species 3, but then it said there was divergence in temperature/energy, so i did the same for it, though when i did that it just gave out this error:

Error: > (greater-than): invalid argument [2]: wrong type [not a number]
Error Object: 1.#qnan

I have no real idea what this is about except that it might be something to do with the UDF i am using for having different regions of diffusivity.

Any ideas?

Thanks

Michael

elmcmaster July 16, 2010 07:37

Steven, i also unloaded the UDF library, but the error:


Error: > (greater-than): invalid argument [2]: wrong type [not a number]
Error Object: 1.#qnan

Still occurs, so it mustnt have anything to do with the UDF

chaozhong.qin July 16, 2010 09:01

Hi,

If the source/sink term is very big due to the chemical reaction in your species transport equation. You should use the implicit formualtion for it to stabilize your calculation.

elmcmaster July 16, 2010 09:45

Yes, ok
 
Ok Steven I will try that, though the reaction rate is specified as a volumetric reaction, occuring only in the porous zones, I.e. The catalyst particles
the rate equation is defined through a compiled udf. The rate is only of the order of 2e-2 kgmol/m3s and is only moldy exothermic.

But yes, I will try the implicit method as you suggested, then get back to you, thanks again.

I will also try a bit more in depth Reading of the solver user and theory section.

elmcmaster July 19, 2010 10:00

Got it sorted!!!
 
Yo Steven, i got it sorted, the error with the Temp was caused by the residual being too small for single precision solver, run in double precision

Set F-cycle with stabalisation for the species and then it works fine


Thanks for your assistance

azadeh October 10, 2010 03:59

thanks
 
thank you very much Michael. you really help me:)

elmcmaster October 11, 2010 04:28

cheers azedeh, glad the soloutions to my problems could be of help to someone

whtrs October 11, 2010 10:23

hi

I have ever meet this kind of problem。
At begining, I stop the calculation of all specie equations and energy euqation, after some iterations,turn on those equations。And no divergence detected anymore. good luck to you!

depan

eegala April 12, 2011 02:08

error :divergence detected in AMG solver
 
Good post really. It had solved my problem

elmcmaster April 13, 2011 03:58

Great!
 
Great stuff, its good to know im not the only one having trouble, and that if we talk about it there may be ways to solve it.

Abhya March 10, 2013 09:22

hey thread owner and all ppl replied thanks a lot .. it helped me too ... Changing the multigrid options to "F cycle" and BCG STAB .. does remove the erro but in the residual for the "H2O" i get this - "1.#QNBe+00" for all iterations
What does that mean ??

Kanarya April 17, 2013 07:31

heat tranfer between phases
 
hi,

I am simulating coal combustion with E-E model (gas-solid). when I am calculating without heat tranfer between phases it works fine but with gunn model it gives problem like 'temperature limited 5000'.
do you have any idea?

thanks in advance!
Quote:

Originally Posted by Abhya (Post 412937)
hey thread owner and all ppl replied thanks a lot .. it helped me too ... Changing the multigrid options to "F cycle" and BCG STAB .. does remove the erro but in the residual for the "H2O" i get this - "1.#QNBe+00" for all iterations
What does that mean ??


vasava April 17, 2013 08:04

The UDFs that work for a serial calculation does not necessarily work for parallel calculations. And while you use a cluster or a multi-core computer for parallel calculations the method used to partition the mesh also plays significant role in how the calculation takes place.

I recommend you to do all your calculations in the cluster. Also make sure that you modify your UDF in order to make it compatible for parallel process.

vasava April 17, 2013 08:08

Also some macros in UDFs rely on the initial values of variables. To avoid this you could initialize your case (hybrid initialization is a smart choice), hook the UDF and then continue calculations.

Kanarya April 17, 2013 09:14

thanks for the answer!But I am using 12.1 version and I am not using parallel option now. so I think in this version there is no option like hybrid in init.

do you have any other advise!

thanks again!
Quote:

Originally Posted by vasava (Post 421215)
Also some macros in UDFs rely on the initial values of variables. To avoid this you could initialize your case (hybrid initialization is a smart choice), hook the UDF and then continue calculations.


Kanarya April 17, 2013 10:21

hi,

are you working on gasification?
can you can tell me what is the Cp,thermal conductivity,molecular weight, standard state enthalpy and entropy properties for coal. I know that it differs for every type of coal but Can you give me a referance for that?

thanks in advance!
Quote:

Originally Posted by vasava (Post 421215)
Also some macros in UDFs rely on the initial values of variables. To avoid this you could initialize your case (hybrid initialization is a smart choice), hook the UDF and then continue calculations.


Deensquare June 26, 2014 09:31

Hello guys,
i am having similar problem, I am working on combustion of CH4 in an ion transport membrane, when i tried the cold cases, it converged but as soon as i activated the volumetric, there is divergence, i have errors like:

temperature limited to 1.000000e+000 in 4 cells on zone 2 in domain 1
temperature limited to 1.000000e+000 in 4 cells on zone 2 in domain 1
temperature limited to 5.000000e+003 in 2759 cells on zone 2 in domain 1
temperature limited to 1.000000e+000 in 832 cells on zone 3 in domain 1
temperature limited to 5.000000e+003 in 1161 cells on zone 3 in domain 1

absolute pressure limited to 1.0000+000 in 448 cells on zone 2
absolute pressure limited to 1.0000+000 in 291 cells on zone 3
absolute pressure limited to 5.0000+010 in 1 cells on zone 3

Error: Floating point error: invalid number

Error Object: ()

kindly help me out, i still have a long way to go in my thesis

sanjeetlimbu April 25, 2015 01:16

3 Attachment(s)
Hi I am using the chemkin for getting the autoignition for nheptane mixture:
for mixture heptane/N2/O2/AR: 0.562/58/30/10 mole fraction ratio

But unable to do it by any method .. I set the initial T=766K and Presuree= 14.1 bar

1. I tried the laminar rate- it showing error : flat Temp profile
2. If I check ISAT i gett some error about tbadhi

eegala April 25, 2015 06:03

Hi Sanjeet
 
Try these two methods,

1. First run the cold flow without energy equation, and then start the energy and species transport equations. Than give a high temperature by patching above 1400 K near the fuel + air mixing zone.

2. Reduce the time step to a very low value (around 10^-6 s) and run for some iterations and then increase the time step.

The errors in combustion simulations occurs due to very high local gradients due to ignition.

sanjeetlimbu April 25, 2015 09:58

Thanks for help!

actually i was doing patch with 766K for whole body (my case is autoignition for a closed system vessel, so not inlet point to patch).. doing the same cold flow step calculation to initialise. but could not get ignition

If I do with 1400K as you adviced... Will it show the low temperature two stage ignition which that fuel mixture show at 766K.

Anyway I will try with 1400 and see...

thanks again

sanjeetlimbu April 25, 2015 16:54

3 Attachment(s)
Dear Sir


I tried using the cold flow+ patch at 1400K the body -part in mesh , but no combustion observed , only the temp raised....

I tried then 900K but no raise observed in products _ CO2 or H20 in mole fraction...

In both cases the temperature just climbs to the patch value and there is no temp /pressure raise after than

sanjeetlimbu April 26, 2015 00:37

Dear sir...

Can i get autoignition using chemical equilibrium- in partially premixed

As I tried the flamelet , but getting some error about the scaler mixture fraction limit grater than domain largest mixture fraction.

Since I used the equilibrium, and can you guide me how to achieve autoignition by any method... I am facing huge problem

sanjeetlimbu April 26, 2015 21:19

Pl reply I think that due to some setting the reaction not happening - its seem suppressed chemistry case

Maryam-A November 8, 2015 00:58

question
 
Hello everybody
I used uds for adding transport equation of particles to investigate Brownian motion and thermophoresis ,but see divergence detected for x-momentum:( .
I reduced all URF and tried different solving method but no help:(
after that I did try what you said with the f-cycle and bcgstab method, but it then said there was divergence in Y-Momentum:confused:, so i did the same for it, but then it said there was divergence in temperature:confused:, so i did the same for it, and the same for uds.

when i did that it just gave out this error:

Error: > (greater-than): invalid argument [2]: wrong type [not a number]
Error Object: 1.#qnan


Any ideas?
Please help me it took me much time to define source term,convection flux and boundary flux according to manual (no help from my supervisor :()

Thanks

Abhya November 8, 2015 04:11

Quote:

Originally Posted by Maryam-A (Post 572399)
Hello everybody
I used uds for adding transport equation of particles to investigate Brownian motion and thermophoresis ,but see divergence detected for x-momentum:( .
I reduced all URF and tried different solving method but no help:(
after that I did try what you said with the f-cycle and bcgstab method, but it then said there was divergence in Y-Momentum:confused:, so i did the same for it, but then it said there was divergence in temperature:confused:, so i did the same for it, and the same for uds.

when i did that it just gave out this error:

Error: > (greater-than): invalid argument [2]: wrong type [not a number]
Error Object: 1.#qnan


Any ideas?
Please help me it took me much time to define source term,convection flux and boundary flux according to manual (no help from my supervisor :()

Thanks

Try getting a flow field close to the physical field without the source terms first, after sufficient convergence switch on the source terms (keep all solver parameters to the default values)

Maryam-A November 8, 2015 10:52

Thankyou for your advice
I tried it before, but no change:(

when I used default mass flow rate(as convection flux of uds equation), it ran without problem but as you know I wanted to investigate effect of Brownian and Thermophresis of particle,so I should use udf for convection flux of equation by particle's density and I think this causes all the problems about divergence:confused:

any idea?
help me plz :(

maryam

Maryam-A November 14, 2015 00:19

I still cant solve divergence detected problem in -x momentum:(
I really dont know why and what part of my code causes this problem:confused:
please help me

maryam

Maryam-A November 14, 2015 00:43

maybe mu-uds-flux-function leads to divergence, because I see problem as soon as active this part in uds panel.

this is:

DEFINE_UDS_FLUX(my_uds_flux,f,t,i)
{
cell_t c0, c1 = -1;
Thread *t0, *t1 = NULL;

real NV_VEC(psi_vec), NV_VEC(A), flux = 0.0;

c0 = F_C0(f,t);
t0 = F_C0_THREAD(f,t);
F_AREA(A, f, t);

/* If face lies at domain boundary, use face values; */
/* If face lies IN the domain, use average of adjacent cells. */

if (BOUNDARY_FACE_THREAD_P(t)) /*Most face values will be available*/
{

NV_DS(psi_vec, =, F_U(f,t), F_V(f,t),F_W(f,t), *, ro_p);

flux = NV_DOT(psi_vec, A); /* flux through Face */
}
else
{
c1 = F_C1(f,t); /* Get cell on other side of face */
t1 = F_C1_THREAD(f,t);

NV_DS(psi_vec, =, C_U(c0,t0),C_V(c0,t0),C_W(c0,t0),*,ro_p);
NV_DS(psi_vec, +=, C_U(c1,t1),C_V(c1,t1),C_W(c1,t1),*,ro_p);

flux = NV_DOT(psi_vec, A)/2.0; /* Average flux through face */

}

/* Fluent will multiply the returned value by phi_f (the scalar's
value at the face) to get the "complete'' advective term. */

return flux;
}

***********************************************
help me plz:(

Farzaneh* November 23, 2015 15:41

Hi everybody
I'm modeling the plume of an industrial stack with fluent, to find the concentration of SO2 in a special distance of stack, and there are 9 components that coming out from the stack.
the temperature of stack is 141 degree of centigrade and the ambient temperature is 15 degree.
when I define just SO2 for the outlet of stack, the solution will be converge. but when I inter all of components, at final it's diverged and I see these messages:
divergence of temperature
divergence of species-1
divergence of species-2

could you help me please? I think I make a mistake in the definition of mixture that comes out from the stack.

Farzaneh

bo_5042 August 21, 2019 21:06

Thanks, everyone. This thread really helped me. I'll describe my case for future readers.

I'm using ANSYS FLUENT 18.2 to develop a transient model for a reactive packed bed. The model diverges in the middle of the simulation without obvious fluctuation in any of the observed parameters. The error messages are:

Code:

# Divergence detected in AMG for mp-x-momentum: protective actions enabled!
# Divergence detected in AMG for mp-x-momentum, temporarily solve with BCGSTAB!
# Divergence detected in AMG for mp-y-momentum: protective actions enabled!
# Divergence detected in AMG for mp-y-momentum, temporarily solve with BCGSTAB!
# Divergence detected in AMG for mp-z-momentum: protective actions enabled!
# Divergence detected in AMG for mp-z-momentum, temporarily solve with BCGSTAB!

Divergence detected in AMG solver: pressure correction# Divergence detected in AMG for gas-species-0: protective actions enabled!
# Divergence detected in AMG for gas-species-0, temporarily solve with BCGSTAB!

I changed the cycle type of all species from the default "Flexible" to "F-cycle" in Advanced Solution Control. The BCGSTAB is used. The problem is solved.

mz_uon January 15, 2022 10:39

Hey Depan

For how long did you run your simulation? Does anyone have any suggestions?
(Although this is quite an old post)

Quote:

Originally Posted by whtrs (Post 278695)
hi

I have ever meet this kind of problem。
At begining, I stop the calculation of all specie equations and energy euqation, after some iterations,turn on those equations。And no divergence detected anymore. good luck to you!

depan


Amanpreet February 15, 2023 03:54

Divergence in AMG Solver
 
Hello
i am facing the issue while simulating a model in icepak.
what i do to resolve this issue
1. Refine the mesh
2. Change the under relaxation setting.

Every time solution diverges and error shows "divergence detected in AMG solver: species-0 "
Please help to resolve this
Thanks

mz_uon February 15, 2023 10:08

Quote:

Originally Posted by Amanpreet (Post 844586)
Hello
i am facing the issue while simulating a model in icepak.
what i do to resolve this issue
1. Refine the mesh
2. Change the under relaxation setting.

Every time solution diverges and error shows "divergence detected in AMG solver: species-0 "
Please help to resolve this
Thanks

Hello Amanpreet

See my earlier post. How I resolved this was by solving only a few equations and after some amount of simulation initiating other equations.


All times are GMT -4. The time now is 00:25.