CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF diffusivity (strain rate)-UDS

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

LinkBack Thread Tools Display Modes
Old   September 6, 2013, 02:47
Default UDF diffusivity (strain rate)-UDS
Senior Member
Join Date: Feb 2011
Posts: 139
Rep Power: 7
Lilly is on a distinguished road
Dear all,

maybe I am more lucky in this UDF forum concerning the questions about my UDF:

I have got a probelm with a UDF describing the mass diffusivity of my species which should be calculated using the strain rate (or shear rate) of my fluid. I also used the strain rate for the calculation of the viscosity of the fluid and this seems to work fine (when I take a look at the results), but for any reason the strain rate seems to be set to zero for the calculation of the diffusivity (the value of the diffusivity is constant 7.95e-11 m^2/s even though the strain rate as shown at the contour plots lies in the range of 0.3 and 4000 1/s)
This is the UDF I am using (I also tried several variations):

#include "udf.h"
#include "math.h"

#define MU_INF 0.035
#define N_INF 1
#define DELTA_MU 0.25
#define DELTA_N 0.45
#define A 50
#define B 3
#define C 50
#define D 4
#define Dconst 1.5e-10

real mu;
real lambda;
real n;
real strain;
real d;

DEFINE_PROPERTY(cell_viscosity, c, t)
strain = C_STRAIN_RATE_MAG(c, t);
lambda = MU_INF+DELTA_MU*exp(-(1.+fabs(strain)/A)*exp(-B/fabs(strain)));
n = N_INF-DELTA_N*exp(-(1.+fabs(strain)/C)*exp(-D/fabs(strain)));
mu = 0.1*lambda*pow(fabs(strain),(n-1.));

return mu;

DEFINE_DIFFUSIVITY(diffusivity, c, t, i)
strain = C_STRAIN_RATE_MAG(c, t);
d = 0.53*Dconst+5.292e-9*strain;

return d;

Does anybody have an idea?

Another question is: is the strain rate and the shear rate calculated/read out the same way in Fluent (C_STRAIN_RATE_MAG)?

Another thing is: I am a little confused about the UDS. Do I always have to specify a UDS if I am modelling a changing mass diffusivity as mentioned in my UDF?
Or do I not need to specify a UDF since I am using the "Species Transport" model anyway?

Does sombebody have a good explanation about what UDS are and what they are for (since I was a little confused about the information I received at the Fluent manual).

It would be really kind, if somebody could help me since I didn' have any success yet!
Lilly 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
libOpenSMOKE Tobi OpenFOAM Programming & Development 507 March 4, 2016 05:30
define volumetric reaction rate via UDF but how to set default Arrhenius rate richard ben Fluent UDF and Scheme Programming 0 May 11, 2013 08:05
connection between udf and uds a.maroofi Fluent UDF and Scheme Programming 1 September 19, 2010 08:46
volume flow rate error in udf jjchristophe Fluent UDF and Scheme Programming 1 July 13, 2010 04:23
Strain rate. MM? Main CFD Forum 1 February 15, 2006 09:55

All times are GMT -4. The time now is 18:24.