CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF for defining granular viscosity in mixture model (https://www.cfd-online.com/Forums/fluent-udf/74157-udf-defining-granular-viscosity-mixture-model.html)

priyanka.asp March 25, 2010 13:32

UDF for defining granular viscosity in mixture model
 
Hello all,

I am new to fluent and I want to use a UDF for defining the granualar viscosity of the secondary phase in the mixture model :
mu= -0.188 + 537.42*Volume fraction.

I had written the follwoing UDF.

#include "udf.h"
DEFINE_PROPERTY(solid_viscosity,cell, thread)
{
real mu;
real vf=C_T(cell,thread);
mu=-0.188+537.42*vf;
return mu;
}

This is correct? And how can I use this in my case. Can anyone help?

Thanks

Siddiqui May 21, 2017 12:42

I think you need to use DEFINE_ADJUST macros to modify the volume fraction using C_VOF(cell,thread)*constant; save this in user defined memory then use this User defined memory in DEFINE_PROPERTY macro like mu=C_UDMI(cell,thread,i).


All times are GMT -4. The time now is 21:31.