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

Temperature dependent Non-Newtonian viscosity UDF

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2013, 06:31
Default Temperature dependent Non-Newtonian viscosity UDF
  #1
New Member
 
Join Date: Dec 2012
Posts: 11
Rep Power: 13
cric92 is on a distinguished road
Hi, I am trying to write a UDF for Temperature dependent non Newtonian viscosity.. The following UDF works,

#include "udf.h"

DEFINE_PROPERTY(u_visc,c,t)

{
real temp,mu,strain,Q,A,R,n,Y,alpha;
Q= 1e5;
A=5e13;
R=8.314;
n=5.86;
alpha=0.0118;
temp=C_T(c,t);
strain=C_STRAIN_RATE_MAG(c,t);
Y=strain*exp(Q/(R*temp))/A;

mu=pow(Y,(-1/n))+pow((1+pow(Y,(2/n))),0.5);
mu=(1/(3*alpha*strain))*log(mu);

return mu;
}

But however when I try to calculate the value of strain rate by the gradients of velocity using the following formula, instead of UDF command C_STRAIN_RATE_MAG(c,t), my solution diverges.

strain=(2/3)*(pow(C_DUDX(c,t),2)+pow(C_DVDY(c,t),2)+pow(C_DW DZ(c,t),2)+0.5*pow((C_DUDY(c,t)+C_DVDX(c,t),2)+0.5 *pow((C_DUDZ(c,t)+C_DWDX(c,t)),2)+0.5*pow((C_DWDY( c,t)+C_DVDZ(c,t)),2);

strain=pow(strain,0.5);


What might be the problem that is causing the solution to diverge???
cric92 is offline   Reply With Quote

Reply

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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Please Help! Temperature profile UDF for 3D geometry subhankar_bhandari FLUENT 2 April 16, 2011 05:30
Help please! UDF for Temperature profile in 3D subhankar_bhandari Fluent UDF and Scheme Programming 2 August 16, 2010 08:37
how to write a 3D linear temperature of UDF venus FLUENT 1 October 28, 2008 02:46
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 08:31


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