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 solid density (https://www.cfd-online.com/Forums/fluent-udf/107958-udf-solid-density.html)

gghazal October 10, 2012 08:43

UDF for solid density
 
Hello everyone !

I have a conjugated heat transfer problem where water is cooling a multi-constituant wall.

I want to avoid setting different zones in my msh so I implemented a UDF to change the properties of the solid depending on the location. So the UDF is really simple :

DEFINE_PROPERTY(density,c,t)
{
real ro;
C_CENTROID(x,c,t);
if (x[0]>0.17)
ro=1650;
else
ro=7800;
C_UDMI(c,t,dens)=ro;
return ro;

The UDF compiles well and runs but when I plot contours of density all, it does not show the correct values I had put in the UDF. However the UDM values are correct !

Wich values are used in the calculations : the values showed in the contour for density all or the values showed in the contour for the UDM ??

Thank you for your help !!

GG

flotus1 October 11, 2012 11:58

I did something similar, defining the thermal conductivity of a fluid.

I would remove the line "C_UDMI(c,t,dens)=ro;"

Then in fluent, in the material tab, select user defined as the specification method for density and choose you UDF "density".

gghazal October 12, 2012 07:31

Thats what I did.
The UDM was just a test to try and figure out the problem ...

If I plot contours of density I dont get the correct values. But contours of UDM is ok !

Posco_steel November 13, 2012 03:10

I have similar problem. I would appreciate a quick response.

Help us.


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