CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF Viscosity Depending on Shear Rate

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

Like Tree2Likes
  • 2 Post By mannobot

LinkBack Thread Tools Display Modes
Old   April 23, 2010, 09:46
Default UDF Viscosity Depending on Shear Rate
Join Date: Feb 2010
Posts: 50
Rep Power: 9
mannobot is on a distinguished road

I found a UDF which allows to define viscosity in terms of shear rate and temperature but I am not able to compile.

The UDF:

#include "udf.h"
real mu_lam;
real shear_rate;
real T = C_T(c,t);
shear_rate = sqrt(0.5*ND_SUM(ND_DOT((C_DUDX(c,t) + C_DUDX(c,t)), (C_DUDY(c,t) + C_DVDX(c,t)), (C_DUDZ(c,t) + C_DWDX(c,t)),\
(C_DUDX(c,t) + C_DUDX(c,t)),\
(C_DUDY(c,t) + C_DVDX(c,t)),\
(C_DUDZ(c,t) + C_DWDX(c,t))),\
ND_DOT((C_DVDX(c,t) + C_DUDY(c,t)), (C_DVDY(c,t) + C_DVDY(c,t)), (C_DVDZ(c,t) + C_DWDY(c,t)),\
(C_DVDX(c,t) + C_DUDY(c,t)),\
(C_DVDY(c,t) + C_DVDY(c,t)),\
(C_DVDZ(c,t) + C_DWDY(c,t))),\
ND_DOT((C_DWDX(c,t) + C_DUDZ(c,t)), (C_DWDY(c,t) + C_DVDZ(c,t)), (C_DWDZ(c,t) + C_DWDZ(c,t)),\
(C_DWDX(c,t) + C_DUDZ(c,t)),\
(C_DWDY(c,t) + C_DVDZ(c,t)),\
(C_DWDZ(c,t) + C_DWDZ(c,t)))));
mu_lam = T+shear_rate;
return mu_lam;

I do get the error:

udfname.c(18) : error C2017: Ungltige Escapesequenz

Please help!

Thank you
mannobot is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
strain rate in UDF Paulina FLUENT 11 November 20, 2014 04:06
UDF for Turbulent Viscosity Lourival Fluent UDF and Scheme Programming 3 October 13, 2012 03:09
Temperature and shear stress depending viscositiy mannobot FLUENT 0 April 22, 2010 03:56
UDF mass flow rate Juan FLUENT 2 December 22, 2007 10:29
Flux depending on wall shear stress in Fluent 5.2 Andreas Borg FLUENT 0 June 7, 2000 06:27

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