CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Scheme is not using the updated value from UDF calculated

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2020, 07:39
Default Scheme is not using the updated value from UDF calculated
  #1
Member
 
Deutschland
Join Date: Jun 2020
Location: https://t.me/pump_upp
Posts: 43
Rep Power: 6
schwaral is on a distinguished road
Send a message via ICQ to schwaral Send a message via AIM to schwaral Send a message via Yahoo to schwaral
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
schwaral is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:38.