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

UDF for solid density

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2012, 09:43
Default UDF for solid density
  #1
New Member
 
Join Date: Feb 2011
Location: France
Posts: 9
Rep Power: 15
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, 12:58
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,428
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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, 08:31
Default
  #3
New Member
 
Join Date: Feb 2011
Location: France
Posts: 9
Rep Power: 15
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


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 Off
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 08: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 12: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 12:08.