CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   RP_Get_Real (https://www.cfd-online.com/Forums/fluent/37209-rp_get_real.html)

evandro991 July 9, 2005 04:32

RP_Get_Real
 
Does anybody know how to get the values of Gas Constant, Especific Heat, etc, through RP_Get_Real command and/or where can I to find more information about this?

ZAB August 27, 2017 21:39

Reading values in UDF from RP_GET_REAL
 
Its too late, but someone else could benifit
First you need to create a scheme variable by typing in the followong command in either the fluent or in a file fileName.scm and reading it from Menu->File->Read->Scheme...
Code:

(rp-var-define 'gas-constant 8.314459 'real #f)
Then you can use the following command in your UDF file which should then be able to access your variable named gas-constant defined in scheme.
Code:

real R;
R = RP_GET_REAL("gas_constant");

you can use as many values in your UDF as you want with same procedure

soumitra2102 December 1, 2019 23:13

Quote:

Originally Posted by ZAB (Post 662087)
Its too late, but someone else could benifit

It did.

P.S. I think the UDF must be Compiled not just Interpreted.

Thanks


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