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

can user define a location dependent density in Define_property udf macro?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2019, 15:11
Default can user define a location dependent density in Define_property udf macro?
  #1
Member
 
Peter Maroul
Join Date: May 2018
Posts: 52
Rep Power: 7
Pmaroul is on a distinguished road
Hello all;

Can anyone describe me if the user is able to define the viscosity or density as a function of location by UDf writing in Define_proprties macro?

For example :

suppose :

\rho =1000+0.00001x+0.00001y\

How can the user implement this function in FLUENT?

Thanks a lot for any answer.

P.Maroul
Pmaroul is offline   Reply With Quote

Old   January 21, 2019, 07:23
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
The Fluent manual shows how to make it depend on temperature. The example reads temperature as
Code:
real T = C_T(c,t);
If instead of temperature you want the coordinates, then just use the coordinate:
Code:
real xc[ND_ND];
C_CENTROID(xc,c,t);
Now, the x-coordinate is stored as xc[0], and the y-coordinate as xc[1]. So your equation would become
Code:
1000+0.00001*cx[0]+0.00001*cx[1]
pakk is offline   Reply With Quote

Old   January 21, 2019, 15:34
Thumbs up
  #3
Member
 
Peter Maroul
Join Date: May 2018
Posts: 52
Rep Power: 7
Pmaroul is on a distinguished road
Thank you Sir for your kind help.

That worked excellent.

Good Luck and best wishes.
Pmaroul is offline   Reply With Quote

Reply

Tags
define_property, density, udf, viscosity


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
Time dependent sinus velocity inlet UDF LinW Fluent UDF and Scheme Programming 2 December 7, 2018 11:22
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
UDF FOR UNSTEADY TIME STEP mayur FLUENT 3 August 9, 2006 10:19
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 10:55


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