CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Help!UDF viscosity

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2014, 07:46
Default Help!UDF viscosity
  #1
New Member
 
Weiliang Hou
Join Date: May 2014
Posts: 1
Rep Power: 0
wyqhwl is on a distinguished road
I write a UDF viscosity code.I want to define a kind of non-newtonian fuild in laminar flow, and its viscosity is changed with time. But the viscosity is homegeneous in stirring and not shear thinning.The code is here.So I want to how I can modify this code. Thank you very much!

#include "udf.h"
DEFINE_PROPERTY(cell_viscosity,c,t)
{
real time,vis, s_mag,n,kp;
time = RP_Get_Real("flow-time");
s_mag=C_STRAIN_RATE_MAG(c,t);
if(time<32400)
{
kp=0.095552*pow(time/3600,4)-2.5696*pow(time/3600,3)+25.13*pow(time/3600,2)-107.13*time/3600+179;
n=0.000075452*pow(time/3600,6)-0.0020979*pow(time/3600,5)+0.022364*pow(time/3600,4)-0.11435*pow(time/3600,3)+0.28236*pow(time/3600,2)-0.23947*time/3600+0.214;
}
else
{
kp=3.82832;
n=0.518373;
}
s_mag=38.211*pow(1.11,2/n)*pow(n*(pow(1.11,2/n-1)-1)/(2-n)/0.11,1/(n-1))/(pow(1.21,2/n)-1)/n;
vis=kp*pow(s_mag,(n-1));
return vis;
}
wyqhwl is offline   Reply With Quote

Reply

Tags
non-newtonian fluid, viscosity udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with divergence TDK FLUENT 13 December 14, 2018 06:00
Ratio of eddy viscosity to molecular viscosity : Laminar or turbulent flow? JuPa CFX 7 September 9, 2013 07:45
Too low temperature at combustor outlet romekr FLUENT 2 February 6, 2012 10:02
modelling solids viscosity in eulerian multiphase model derkaiser FLUENT 1 December 5, 2011 03:42
kinematic viscosity at diff temperatures,pressures Mecobio Main CFD Forum 0 November 7, 2005 12:55


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