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/)
-   -   find formula from udf code (https://www.cfd-online.com/Forums/fluent-udf/127411-find-formula-udf-code.html)

shahrbanoo December 10, 2013 13:28

find formula from udf code
 
Hi every body
I have a udf code from someone else for defining viscosity of blood
I want to know what was the formula that he used. could u please help me?
# include "udf.h"
# define n 0.67
# define alpha 1.0
# define muo 0.0042
DEFINE_PROPERTY(Power_law_model,cell,thread)
{
float visc,trace;
float u[3],v[3],w[3];
int i;
for(i=0; i<3; i++)
{
u[i] = C_U_G(cell,thread)[i];
v[i] = C_V_G(cell,thread)[i];
w[i] = C_W_G(cell,thread)[i];
}
trace = 0.5*(2*pow(u[0],2) + pow(v[0]+u[1],2) + 2*pow(v[1],2) + pow(v[2]+w[1],2) + 2*pow(w[2],2) + pow(w[0]+u[2],2));
visc = 0.5*muo*pow(1+alpha*trace,0.67);
return visc;
}


All times are GMT -4. The time now is 14:34.