|
[Sponsors] |
Scheme is not using the updated value from UDF calculated |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 28, 2020, 07:39 |
Scheme is not using the updated value from UDF calculated
|
#1 |
Member
|
Workflow:
1. Define RP Variable --> working great 2. Set Value with UDF --> working fine 3. Use Scheme to change Boundary Conditions die to the new value of RP Variable Somehow scheme is not reading the updated value but always the initialized value of the rp variable. So I think the workflow is wrong? Below is Output with the scheme code and the UDF. DEFINE_ADJUST(adjust_UDS_bc, d) { int zone_ID = 9; Thread* t = Lookup_Thread(d, zone_ID); if (fnew >= 0) { RP_Set_Integer("veldirect", 0); } else { RP_Set_Integer("veldirect", 1); } } reversed flow in 20 faces on pressure-outlet 11. 900 7.1974e-03 4.2344e-05 2.3118e-06 1.3848e-16 1.0680e-05 0:00:00 1 veldirect: 1 reversed flow in 20 faces on pressure-outlet 11. 901 5.9673e-03 4.3454e-05 2.0997e-06 1.3159e-16 6.8316e-06 0:00:00 0 (ti-read-journal "testjournal.jou") Reading journal file testjournal.jou... > (cond ((= (%rpgetvar 'veldirect) 1) (ti-menu-load-string "define/boundary-conditions/velocity-inlet/9 yes yes yes yes udf velinlet::libudf no 0 no 1 no 0 no 300 yes no 0") ) ((= (%rpgetvar 'veldirect) 0) (ti-menu-load-string "define/boundary-conditions/velocity-inlet/9 yes yes yes yes udf velinlet::libudf no 0 no 1 no 0 no 300 no yes no 0.8") ) ) define/boundary-conditions/velocity-inlet/9(inlet) yes yes yes yes udf velinlet::libudf no 0 no 1 no 0 no 300 no yes no 0.8#t #f |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wallHeatFlux utility for an incompressible case | Mr.Jingles | OpenFOAM Post-Processing | 67 | April 6, 2023 04:25 |
Replicating Scalable Wall Function with a UDF | yousefaz | FLUENT | 0 | August 4, 2017 03:30 |
Communication between UDF and Scheme | 3DmaniacSLDWRKS | Fluent UDF and Scheme Programming | 0 | August 16, 2011 13:54 |
How to combine UDF and Scheme? | ali hemmati | Fluent UDF and Scheme Programming | 3 | March 19, 2011 15:45 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 12:29 |