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

viscosity in UDF!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2007, 02:12
Default viscosity in UDF!
  #1
denhan
Guest
 
Posts: n/a
Recently i have been modelling a stir model, but the material viscosity was related strain rate and temperature, so i use UDF in fluent. i select standard K-E model, but when i start compute ,the fluent will send wrong message: "floating point error", the behaid is my program: #include "udf.h"

#define Q 183890 #define R 8.314 #define RFA 0.0108E-6 #define N 7.7563 #define AA 1.44E+14

DEFINE_PROPERTY(cell_viscosity,cell,thread) {

real e_s;

real z_h;

real stress;

real viscosity;

real mm;

temp = C_T( cell, thread );

e_s = C_STRAIN_RATE_MAG( cell, thread );

z_h = e_s * exp( Q / ( R * TT ) );

mm = pow( z_h/AA, 1/N ) + sqrt( pow( z_h/AA, 2/N) + 1 );

stress = log( mm );

viscosity = stress / ( 3 * e_s * RFA);

return viscosity; }

please help me! thanks

  Reply With Quote

Reply


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
UDF for Turbulent Viscosity Lourival Fluent UDF and Scheme Programming 3 October 13, 2012 04:09
writin udf for non-newtonian viscosity zolfaghari FLUENT 0 September 19, 2007 06:32
subgrid turbulent viscosity for UDF in LES David TAIEB FLUENT 0 April 2, 2007 09:27
VISCOSITY UDF AdN FLUENT 0 May 23, 2006 06:33
Help - UDF for solid shear viscosity nbh2801 FLUENT 0 April 21, 2006 08:49


All times are GMT -4. The time now is 05:40.