CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Help !! UDF for second phase viscosity. (https://www.cfd-online.com/Forums/fluent/43450-help-udf-second-phase-viscosity.html)

yong January 23, 2007 15:03

Help !! UDF for second phase viscosity.
 
Hello. I need your help. I made the UDF for second phase viscosity, but there is some errors during calculation. ///// Error: divergence detected in AMG solver: vof-1 ///// I tried to solve this problem but still there is. I am not sure whether this error is from my UDF or others.

There is another question in my UDF code below. I used C_VOF(cell,thread) for volume fraction of second phase material. Is it correct?

Do I have to define the volume fraction equation for primary and second phase materials?

//////// DEFINE_PROPERTY(r_mu,cell,thread) {

real r_mu,lamda,p_mu,gamma, m, n, r_vof; gamma=C_STRAIN_RATE_MAG(cell,thread);

lamda=0.21;

p_mu=0.003;

r_vof=C_VOF(cell,thread);

m=120.28*pow(r_vof,3.)-51.123*pow(r_vof,2.)+14.305*r_vof+1;

n=0.8092*pow(r_vof,3.)-0.8246*pow(r_vof,2.)-0.3503*r_vof+1.;

r_mu=(m*pow((1.+pow(lamda*gamma, 2.)), ((n-1.)/2.))-(1.-r_vof))*(p_mu/r_vof); } ///

Sujith January 24, 2007 10:39

Re: Help !! UDF for second phase viscosity.
 
usage of c_vof is correct, C_VOF(cell,thread); the thread here is phase thread corresponding to the pahse where u are hookin this. It is not reqd to define vof as fluent will calculate it and give the value when C_VOF() is called.

In the end of code you should return the viscosity

--- return r_mu; }


yong January 24, 2007 11:11

Re: Help !! UDF for second phase viscosity.
 
Thank you, sujith!


All times are GMT -4. The time now is 21:38.