|September 17, 2013, 05:01||
change fluent parameter via udf
Join Date: Jul 2011
Posts: 5Rep Power: 6
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?
|September 23, 2013, 07:09||
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41Rep Power: 5
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.
|January 19, 2015, 10:47||
How to access input parameters
Join Date: Sep 2013
Posts: 4Rep Power: 4
lorenz - how did you access the input parameters via scheme?
|January 20, 2015, 04:14||
Join Date: Nov 2013
Posts: 769Rep Power: 11
Look at the Fluent UDF manual. Section 3.6.2: Accessing a Scheme Variable in the Text Interface.
In this case, it would be:
|Thread||Thread Starter||Forum||Replies||Last Post|
|Two questions on Fluent UDF||Steven||Fluent UDF and Scheme Programming||4||September 20, 2013 16:30|
|UDF interpret in Fluent||wanghaojie||Fluent UDF and Scheme Programming||1||February 3, 2012 15:51|
|Fluent UDF Discontinuous Motion||lequi7||Fluent UDF and Scheme Programming||2||November 4, 2011 00:18|
|UDF to record FLUENT Solver variables...||mariachi||Fluent UDF and Scheme Programming||9||February 19, 2010 13:25|
|fluent UDF external library lapack problem||Rick||FLUENT||0||May 7, 2008 10:16|