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

UDF Viscosity Depending on Shear Rate

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By mannobot

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2010, 10:46
Default UDF Viscosity Depending on Shear Rate
  #1
Member
 
Join Date: Feb 2010
Posts: 50
Rep Power: 16
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


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
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 04:09
Temperature and shear stress depending viscositiy mannobot FLUENT 0 April 22, 2010 04: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 07:27


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