|
[Sponsors] |
October 11, 2014, 14:18 |
Accessing output parameter value in scheme
|
#1 |
New Member
Join Date: Apr 2013
Posts: 17
Rep Power: 13 |
Dear all,
Does anybody know if there is a way to access output parameter value in scheme file? I create UDM in UDF which is defined for each cell of the domain. I need to use the maximum (on the domain) value of the UDM in my scheme file. For that I create output parameter in my journal file using command: define/parameters/o-p/create/surface-integral "parameter-1" facet-max udm-2 soutlet1_3_1 () I want to use the value of the parameter-1 (or maximum value of the udm-2) in my scheme. For that I tried to create scheme variable having the value of the parameter-1 using command: (rp-var-define 'press_diff (rpgetvar 'parameter-1) 'double #f) but it didn't work. I get the message: Error: rp-var-value: undefined variable Error-Object: parameter-1 nnvoro |
|
October 11, 2014, 15:53 |
|
#2 |
New Member
Join Date: Apr 2013
Posts: 17
Rep Power: 13 |
I think I might try to do that in a slightly different way which looks more complicated to me.
I will calculate average value of the udm (in my particular case max and average value are the same) in udf: real a=0.0; int c_count = 0; thread_loop_c(ct,d) { begin_c_loop(c,ct) { a+=C_UDMI(c,ct,2); c_count++; } end_c_loop(c,ct) } a = a/c_count; And then export the value to the fluent in the udf using command: RP_Set_Real("press_diff",a); In the journal file I should have the command which creates and initializes variable "press_diff", this command should be executed before executing udf: (if (not (rp-var-object 'press_diff))(rp-var-define 'press_diff 0 'double #f)) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of QUICK scheme | Romuald Skoda | Main CFD Forum | 11 | November 6, 2017 22:20 |
Use of upwind scheme for interpolation of u/v | quarkz | Main CFD Forum | 6 | August 30, 2011 05:10 |
Questions about data output | aki_yafuji | OpenFOAM Running, Solving & CFD | 3 | September 9, 2010 02:59 |
lift and drag on ship superstructures | vaina74 | OpenFOAM Running, Solving & CFD | 3 | June 8, 2010 13:30 |
[Other] Output Format of MetaMesh | t42 | OpenFOAM Meshing & Mesh Conversion | 0 | August 3, 2007 05:28 |