CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

UDF for solid density

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 10, 2012, 08:43
Default UDF for solid density
  #1
New Member
 
Join Date: Feb 2011
Location: France
Posts: 6
Rep Power: 6
gghazal is on a distinguished road
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
gghazal is offline   Reply With Quote

Old   October 11, 2012, 11:58
Default
  #2
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,107
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
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".
flotus1 is offline   Reply With Quote

Old   October 12, 2012, 07:31
Default
  #3
New Member
 
Join Date: Feb 2011
Location: France
Posts: 6
Rep Power: 6
gghazal is on a distinguished road
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 !
gghazal is offline   Reply With Quote

Old   November 13, 2012, 04:10
Default
  #4
New Member
 
Join Date: Nov 2012
Posts: 1
Rep Power: 0
Posco_steel is on a distinguished road
I have similar problem. I would appreciate a quick response.

Help us.
Posco_steel is offline   Reply With Quote

Reply

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
Error using UDF to modify density NRD FLUENT 1 July 13, 2011 07:35
UDF: Density Cell Gradient Vector Macros matteo FLUENT 0 December 1, 2007 13:14
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01
UDF : derivate of density D.Stratmann FLUENT 2 February 2, 2001 04:02


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