# Temperature dependent Non-Newtonian viscosity UDF

 Register Blogs Members List Search Today's Posts Mark Forums Read April 14, 2013, 07:31 Temperature dependent Non-Newtonian viscosity UDF #1 New Member   Join Date: Dec 2012 Posts: 11 Rep Power: 12 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???  Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded 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 Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post Mihail CFX 7 September 7, 2014 07:27 subhankar_bhandari FLUENT 2 April 16, 2011 06:30 subhankar_bhandari Fluent UDF and Scheme Programming 2 August 16, 2010 09:37 venus FLUENT 1 October 28, 2008 03:46 Kiran FLUENT 0 July 31, 2008 09:31