|
[Sponsors] |
Temperature dependent Non-Newtonian viscosity UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2013, 07:31 |
Temperature dependent Non-Newtonian viscosity UDF
|
#1 |
New Member
Join Date: Dec 2012
Posts: 11
Rep Power: 13 |
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??? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
Please Help! Temperature profile UDF for 3D geometry | subhankar_bhandari | FLUENT | 2 | April 16, 2011 06:30 |
Help please! UDF for Temperature profile in 3D | subhankar_bhandari | Fluent UDF and Scheme Programming | 2 | August 16, 2010 09:37 |
how to write a 3D linear temperature of UDF | venus | FLUENT | 1 | October 28, 2008 03:46 |
udf variable for wall temperature | Kiran | FLUENT | 0 | July 31, 2008 09:31 |