CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Non newtonian viscosity UDF -Diveregence in AMG Solver error (https://www.cfd-online.com/Forums/fluent-udf/114082-non-newtonian-viscosity-udf-diveregence-amg-solver-error.html)

Josyula March 5, 2013 00:17

Non newtonian viscosity UDF -Diveregence in AMG Solver error
 
Hi,

I have written an UDF for implementing a non-newtonian viscosity model for blood. This is the UDF:-

#include "udf.h"
#define mu_plasma 0.0012
#define H 0.47
DEFINE_PROPERTY(cumul_viscosity,c,t)
{
real mu_blood,beta,gamma,a,b,d;
gamma = C_STRAIN_RATE_MAG(c,t);
beta = 1+(6.0/pow(gamma,0.75));
a = beta*(1-H);
b = (4.1*H)/(1.64-H);
d = mu_plasma*a;
mu_blood = pow(d,b);
return mu_blood;
}

I am getting 'Divergence in AMG solver - x momentum' error.

I tried reducing the time step size and URF. Nothing seems to work.

Any suggestions on how to resolve this?

Thank you.

vasava March 13, 2013 05:38

Do you start your simulation from zero. I mean do you initialize and then start calculating or you obtain an initial solution and then continue with Non-Newtonian calculations.

We had same problem with Non-Newtonian UDF. So we did the following.

1. Initialize the simulation for steady or transient case.
2. Run the simulation for Newtonian case for very short time or very few iterations say 10 iterations.
3. Continue simulation with non-Newtonian UDF.

This is just to obtain a non-zero solution so that UDF can be used. When everything is zero some times UDFs can act strange.

By the way are you calculating OSI as well. Do you have UDF for that?

Josyula March 15, 2013 22:05

Paritosh,
Thank you for your suggestion. I managed to run the case as suggested with a help from another member of this forum.
I am not calculating OSI for my case, as it is 2D and would be irrelevant.

vasava March 18, 2013 04:15

Hello Josyula

What exactly did you do? I am just curious.

Josyula March 19, 2013 00:05

I initialized the solution with Newtonian property of blood and let the simulation run for 1-2 iterations. After that, I stopped the simulation and hooked the Non-Newtonian UDF.


All times are GMT -4. The time now is 05:56.