CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

find formula from udf code

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   December 10, 2013, 14:28
Default find formula from udf code
Join Date: Mar 2013
Posts: 63
Rep Power: 6
shahrbanoo is on a distinguished road
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
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;
shahrbanoo is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I find the code about Uprime2Mean and Pprime2mean Sunxing OpenFOAM 4 April 16, 2013 04:23
flapping wing UDF code yahya_azizi Fluent UDF and Scheme Programming 1 July 24, 2012 06:24
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
Brownian Motion UDF Code Confuser FLUENT 1 November 1, 2005 11:37
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56

All times are GMT -4. The time now is 08:10.