
[Sponsors] 
September 6, 2013, 02:47 
UDF diffusivity (strain rate)UDS

#1 
Senior Member
Join Date: Feb 2011
Posts: 140
Rep Power: 7 
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.95e11 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.5e10 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_INFDELTA_N*exp((1.+fabs(strain)/C)*exp(D/fabs(strain))); mu = 0.1*lambda*pow(fabs(strain),(n1.)); return mu; } DEFINE_DIFFUSIVITY(diffusivity, c, t, i) { strain = C_STRAIN_RATE_MAG(c, t); d = 0.53*Dconst+5.292e9*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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
libOpenSMOKE  Tobi  OpenFOAM Programming & Development  510  January 13, 2017 08:45 
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 