change fluent parameter via udf
I use in my simulation some input parameters (for example for the inlet temperature or for the flow rate ratio of an outflow). I have found out how to acess these variables via scheme. But is there also a way to access and change these parameters with an udf function?
Yes, it is possible. So take the following example:
In FLUENT, define your scheme variable 'x'
(rp-var-define 'x 0 'integer #f)
Now you have defined an integer variable x with 0 as its value.
To set this in a UDF
Now you have set the scheme variable x to 3.
Two notes: Your variable must be a string in the UDF and the Integer portion changes based on the type of variable you have.
You can also access your variable in a UDF by:
y = RP_Get_Integer("x");
Now y is equal to your value set in the scheme variable x.
Please respond if you need more help.
How to access input parameters
lorenz - how did you access the input parameters via scheme?
Look at the Fluent UDF manual. Section 3.6.2: Accessing a Scheme Variable in the Text Interface.
In this case, it would be:
|All times are GMT -4. The time now is 19:20.|