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

Assign limit in udf for Temperaure and Pressure

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2012, 10:45
Default Assign limit in udf for Temperaure and Pressure
  #1
New Member
 
Yogini Patel
Join Date: Jan 2010
Location: Finland
Posts: 15
Rep Power: 16
Yogini is on a distinguished road
Hello,

I am writing my udf in fluent for material properties. Where I have to assign certain limit for both temperature and pressure in the beginning of the udf.

Also this bounded value, I want to use it in other properties in the same udf.

Can any one give me some ideas how I can define limit in udf ?

Thank you

BR,
-Yogini
Yogini is offline   Reply With Quote

Old   October 16, 2012, 21:25
Default
  #2
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Yogini View Post
Hello,

I am writing my udf in fluent for material properties. Where I have to assign certain limit for both temperature and pressure in the beginning of the udf.

Also this bounded value, I want to use it in other properties in the same udf.

Can any one give me some ideas how I can define limit in udf ?

Thank you

BR,
-Yogini

You can establish a loop over either faces or cells and check the parameters you wish. If their values would have exceeded maximum range, you can be informed by an if-clause, for example:

if (C_P(c,t) > 1e+10)
Error("pressure has exceeded maximum range");

Above command lines will stop UDF procedure.

Goodluck
syavash is offline   Reply With Quote

Old   October 17, 2012, 10:11
Default
  #3
New Member
 
Yogini Patel
Join Date: Jan 2010
Location: Finland
Posts: 15
Rep Power: 16
Yogini is on a distinguished road
Hello,

Thank you for your reply.

In my case I am using wet-steam udf for calculating thermodynamical properties (like, P, T, Cp, Cv, rho, etc). All are the functions of T and Rho in polynomial form.

In my case, the calculated values in fluent increased too much. That's why I want to set a certain limit for Temp. and rho. Like one example,

P = f(T,rho),

if T > 360 K then T = 360 K
else T = T

Same for rho also.

I want to put this 'if-else' clause in my udf, can you guide me how to write it?

-Yogini
Yogini is offline   Reply With Quote

Old   October 17, 2012, 11:44
Default
  #4
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by Yogini View Post
Hello,

Thank you for your reply.

In my case I am using wet-steam udf for calculating thermodynamical properties (like, P, T, Cp, Cv, rho, etc). All are the functions of T and Rho in polynomial form.

In my case, the calculated values in fluent increased too much. That's why I want to set a certain limit for Temp. and rho. Like one example,

P = f(T,rho),

if T > 360 K then T = 360 K
else T = T

Same for rho also.

I want to put this 'if-else' clause in my udf, can you guide me how to write it?

-Yogini

Tell us more about your UDF. What kind of Macro is used?
syavash 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
calculation average pressure in a plane with UDF Vitalij FLUENT 1 April 10, 2007 03:39
Setting pressure value for specific cells, UDF Amir FLUENT 2 September 1, 2005 18:59
UDF CALL FOR PRESSURE D Harvey FLUENT 2 June 3, 2004 21:46
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44


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