CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Assign limit in udf for Temperaure and Pressure (http://www.cfd-online.com/Forums/fluent-udf/108126-assign-limit-udf-temperaure-pressure.html)

 Yogini October 15, 2012 10:45

Assign limit in udf for Temperaure and Pressure

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

 syavash October 16, 2012 21:25

Quote:
 Originally Posted by Yogini (Post 386699) 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

 Yogini October 17, 2012 10:11

Hello,

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

 syavash October 17, 2012 11:44

Quote:
 Originally Posted by Yogini (Post 387099) 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?

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