CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Can I accesses the Output Parameters in UDF ? (https://www.cfd-online.com/Forums/fluent/224959-can-i-accesses-output-parameters-udf.html)

juifu March 9, 2020 22:38

Can I accesses the Output Parameters in UDF ?
 
2 Attachment(s)
Hello

In fluent Report Definitions

Attachment 75456

The force on the object be created as a output parameter

Attachment 75455

The question is: can I accesses this/these output parameters in UDF?

Thanks

AlexanderZ March 10, 2020 03:10

Code:

RP_Get_Input_Parameter("variablename")
Returns the input parameter value of variable name

For parallel solver must be executed on host

juifu March 10, 2020 04:45

1 Attachment(s)
Quote:

Originally Posted by AlexanderZ (Post 761045)
Code:

RP_Get_Input_Parameter("variablename")
Returns the input parameter value of variable name

For parallel solver must be executed on host

Hi Alexander:

I tried this method before

but the GUI show

Attachment 75460

when the parameter use as "Input Parameters"

so I use "Output Parameter" instead

vinerm March 10, 2020 07:46

Output Parameter
 
As of today, Fluent does not provide option to access output parameter value in C or Scheme Based UDF. So, there are at least two alternatives. One is to define the output parameter within the UDF, i.e., whatever output parameter is pointing to can be extracted within C UDF using DEFINE_ functions. Second is to define an rpvar and fetch value of output parameter and assign it to newly defined rpvar. rpvar value can be fetched in a UDF using RP_Get_Real or RP_Get_Integer.


All times are GMT -4. The time now is 20:22.