|
[Sponsors] |
UDF-Divergence detected in AMG solver: bin-0-fraction |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Amin
Join Date: Dec 2021
Posts: 20
Rep Power: 5 ![]() |
Hi to all.
I am simulating separation of water from oil by population balance method. The simulation works well, when I use default aggregation model(luo-model) or even user defined aggregation model introduced by documentation. But when I use my user defined function(It compiled without error), at first time step without any iteration, it gives the error "Divergence detected in AMG solver: bin-0-fraction Error at host: floating point exception Error at Node 0: floating point exception Error: floating point exception Error Object: #f " What is the source of this error? The user defined function is as follows: /************************************************** ********************** UDF that computes the particle aggregation rate ************************************************** ***********************/ #include "udf.h" #include "sg_pb.h" #include "sg_mphase.h" DEFINE_PB_COALESCENCE_RATE(aggregation_kernel,cell ,thread,d_1,thread_2,d_2) { real agg_kernel, mu, delta, e_ij, V_ij; real rho_o=850, rho_w=1000, mu_o=0.013, mu_w=0.001, g=9.81, eps=2.5; /* vaccum perimittivity =8.85e-12 */ real E_0=0.5e5; real K0 = M_PI/4.; /* aggregation rate constant */ mu=0.077; delta=(d_2/d_1); e_ij=1.8e-10*pow(((2.*delta*(rho_w-rho_o)*(1.-delta)*g*d_1)/(3.*eps*pow((1.+delta),2.)*pow(E_0,2.))),-0.55); V_ij=2.*(mu+1.)*(rho_w-rho_o)*pow(d_1,2.)*(1.-pow(delta,2.))*g/(3.*(3.*mu+2.)*mu_o); agg_kernel = K0*pow((d_1+d_2),2.0)*V_ij*e_ij; return agg_kernel; } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
Print some results to the screen. Maybe you made a mistake in typing the equations, and your rate is billions times too high or too low.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Amin
Join Date: Dec 2021
Posts: 20
Rep Power: 5 ![]() |
Quote:
diameter. I assumed that the unit is meter. Is that correct? |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
I understand that you did not get a result, that's why I tell you to print the value to the screen.
Change your UDF so that it prints the value to the screen, using Message(). Then compare that value to the value that you used in the models that did work.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
Amin
Join Date: Dec 2021
Posts: 20
Rep Power: 5 ![]() |
Quote:
. . . a=...e-16 . . . a=-nan(ind) . . . a=...e-17 . . . a=-nan(ind) What does the "-nan(ind)" mean? |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
It means a problem happened, like dividing be zero, and the result is not a number (nan=Not A Number).
To find out where it went wrong, print more intermediate results. Vij and Eij are good choices.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
Ignoring the Nan, your values are very low, numerically. I really don't know which values you expect, so I can not say that they are wrong, but I would surely verify that if I were you.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
Amin
Join Date: Dec 2021
Posts: 20
Rep Power: 5 ![]() |
Thank you very much pakk. The problem solved. It was duo to dividing by zero in Eij. Because in some cases, the ratio of diameter(delta) became one.
|
|
![]() |
![]() |
![]() |
Tags |
population balance method, udf converge |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two Phase Flow In Vertical Pipe | stonepreston | FLUENT | 2 | October 31, 2017 09:35 |
Fluidized Bed: Error: Divergence detected in AMG solver: pressure correction Error Ob | Mole89 | FLUENT | 5 | April 12, 2014 10:32 |
Divergence problem | Smaras | FLUENT | 13 | February 21, 2013 06:03 |
Quarter Burner mesh with periosic condition | SamCanuck | FLUENT | 2 | August 31, 2011 12:34 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |