# Help！UDF viscosity

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

 May 5, 2014, 07:46 Help！UDF viscosity #1 New Member   Weiliang Hou Join Date: May 2014 Posts: 1 Rep Power: 0 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; }

 Tags non-newtonian fluid, viscosity udf

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post TDK FLUENT 11 July 31, 2016 06:03 JuPa CFX 7 September 9, 2013 07:45 romekr FLUENT 2 February 6, 2012 11:02 derkaiser FLUENT 1 December 5, 2011 04:42 Mecobio Main CFD Forum 0 November 7, 2005 13:55

All times are GMT -4. The time now is 11:54.