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

Linking UDF and workbench parameter

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2021, 12:44
Lightbulb Linking UDF and workbench parameter
  #1
New Member
 
saeed akhavan
Join Date: Aug 2016
Posts: 4
Rep Power: 10
saeedakhavan is on a distinguished road
Hi.
I need to calculate some variables in an UDF and pass these variables to workbench parameters (i.e., updating parameters by UDF) for optimization purposes. Any suggestions?
saeedakhavan is offline   Reply With Quote

Old   April 15, 2021, 02:19
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may get input parameter in UDF using macro
Code:
RP_Get_Input_Parameter("variablename")
more information in Ansys Fluent Customization manual
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   April 15, 2021, 02:25
Default
  #3
New Member
 
saeed akhavan
Join Date: Aug 2016
Posts: 4
Rep Power: 10
saeedakhavan is on a distinguished road
Thank you for your response Alexander.

I suppose RP_Get_Input_Parameter() just reads the workbench parameter value within the UDF. It can not change the parameter value. Am I wrong?
saeedakhavan is offline   Reply With Quote

Old   April 15, 2021, 03:20
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may try to use
Code:
RP_Set_Real("name",value)
also there is a macro called DEFINE_OUTPUT_PARAMETER
which I've never used actually
saeedakhavan likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
fluent - udf, parameters


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
Modify parameter from scheme or UDF theophile Fluent UDF and Scheme Programming 3 April 14, 2021 12:54
Sutile and Tricky : Drive Fluent UDF parameters directly from workbench amscosta Fluent UDF and Scheme Programming 4 July 21, 2020 17:50
UDF input parameter "unable to find rpvar" sergiocavaleirocosta Fluent UDF and Scheme Programming 4 March 26, 2019 08:57
Error in UDF calling parameters from ANSYS WorkBench anand32 Fluent UDF and Scheme Programming 0 April 6, 2018 20:52
implementing UDF for fluent in workbench for running multiple simulations faizan_habib7 Fluent UDF and Scheme Programming 0 March 18, 2016 23:29


All times are GMT -4. The time now is 11:34.