CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   HELP: Divergence detected in AMG solver: pressure correction (https://www.cfd-online.com/Forums/fluent/185033-help-divergence-detected-amg-solver-pressure-correction.html)

ckkhiew1993 March 17, 2017 03:02

HELP: Divergence detected in AMG solver: pressure correction
 
Hi everyone! I am facing this problem once I click calculate in Fluent simulation.

I plan to use fully developed velocity profile at my inlet of straight pipe so I tried to use UDF and the code is:

#include "udf.h"
#include "math.h"
DEFINE_PROFILE(inlet_x_velocity, thread, index)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real z;
real a, n, d, Umax, Umean;
face_t f;
begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/
{
F_CENTROID(x,f,thread);
y =x[1];
z =x[2];

n = 7;
d = 0.797; /* m */
Umean = 1; /* m/s */

Umax = Umean*(((n+1)*(2*n+1))/(2*pow(n,2)));
F_PROFILE(f, thread, index) = Umax*pow(1-sqrt(pow(y,2)+pow(z,2))/(d/2),(1/n));
}
end_f_loop(f, thread)
}

However, when I click calculate, it appears "Divergence detected in AMG solver: pressure correction". May I know how to solve this problem? Thank you so much.


All times are GMT -4. The time now is 03:43.