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

UDF Viscosity Depending on Shear Rate

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

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

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"
DEFINE_PROPERTY(cell_viscosity,c,t)
{
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

Reply

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
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 09:29
strain rate in UDF Paulina FLUENT 6 April 24, 2004 11:28
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 20:34.