|
[Sponsors] |
September 17, 2013, 06:01 |
change fluent parameter via udf
|
#1 |
New Member
Manuel Lorenz
Join Date: Jul 2011
Posts: 5
Rep Power: 15 |
Hi,
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? Thanks... |
|
September 23, 2013, 08:09 |
|
#2 |
Member
Christopher Hershey
Join Date: Feb 2012
Location: East Lansing, Michigan
Posts: 41
Rep Power: 14 |
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 RP_Set_Integer("x",3) 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
|
#3 |
New Member
Anders Simonsen
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Hello.
lorenz - how did you access the input parameters via scheme? Regards Anders |
|
January 20, 2015, 04:14 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Look at the Fluent UDF manual. Section 3.6.2: Accessing a Scheme Variable in the Text Interface.
In this case, it would be: Code:
(%rpgetvar ’x) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to record FLUENT Solver variables... | mariachi | Fluent UDF and Scheme Programming | 11 | September 24, 2019 01:07 |
Two questions on Fluent UDF | Steven | Fluent UDF and Scheme Programming | 7 | March 23, 2018 04:22 |
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 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |