|
[Sponsors] |
Help. I cannot get the correct value of input parameters by using RP_Input_Parameter |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 14, 2019, 01:08 |
Help. I cannot get the correct value of input parameters by using RP_Input_Parameter
|
#1 |
New Member
tang lei
Join Date: Jan 2019
Location: Shenzhen China
Posts: 15
Rep Power: 7 |
Hello everyone.
I wanna know how to access the correct value of parameters in workbench. I creat a parameter named "Volume Flow" and registered it. After press "Print"., the information shows as follows; Input parameters available in udf side .................................................. ............................................... parameter-name current-value id-to-be-used-in-udf .................................................. ................................................ "Volume Flow" 1.23 real-1 .................................................. .............................................. I think this information shows that I creat the parameter successfully and the value of this parameter is 1.23 Then I tried to use a UDF to print the value on the screen to make sure that I can access the parameter. The UDF code is: DEFINE_INIT(initial,d) { real a; a=RP_Input_parameter("real-1"); printf("a= %f\n,a); } The result is always "a=-0.000000" no mater how did I adjust the value of "real-1" So have I missed something important? How can Iget the correct value of this parameter. please help. Thanks and regards. |
|
May 14, 2019, 01:30 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
DEFINE_ON_DEMAND(get_parameter) { real a; a=RP_Get_Input_Parameter("real-1"); Message("a= %f\n",a); } Last edited by AlexanderZ; May 17, 2019 at 00:07. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A UDF for mixture outlet variable derived from two other input parameters? | ebtedaei | FLUENT | 0 | July 12, 2017 02:17 |
Tutorial for running ANSYS/Fluent with continuous input parameters | chaitanya.mokashi | FLUENT | 0 | April 20, 2017 19:41 |
Real Geometry and input parameters of industrial boiler | Michail | Main CFD Forum | 2 | March 28, 2013 14:34 |
[Gmsh] discretizer - gmshToFoam | Andyjoe | OpenFOAM Meshing & Mesh Conversion | 13 | March 14, 2012 04:35 |
units of geometrical parameters lost | SoobY | ANSYS Meshing & Geometry | 2 | January 10, 2011 03:58 |