|
[Sponsors] |
April 23, 2010, 10:46 |
UDF Viscosity Depending on Shear Rate
|
#1 |
Member
Join Date: Feb 2010
Posts: 50
Rep Power: 16 |
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 |
|
|
|
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 |