DEFINE_REPORT_DEFINITION_FN is a macro that you can use to
specify a UDF for reporting a single-valued expression that can be plotted, written, or
printed to the console as a report definition.
The DEFINE_REPORT_DEFINITION_FN macro takes a single
argument, name, as the name of the function you are creating. Your
user-defined function should return a real value that will be the value of the report
definition.
Note: If you need to access the value of another report definition, use the Get_Report_Definition_Values
macro.
DEFINE_REPORT_DEFINITION_FN (name)
|
Argument Type |
Description |
|
|
name of the user defined report definition function |
Function returns
real
This function computes the volumetric flow rate at an inlet, demonstrating the ability to perform operations on an input variable and output the result for plotting, printing, or writing to a file as part of a user-defined report definition.
#include "udf.h"
DEFINE_REPORT_DEFINITION_FN(volume_flow_rate_inlet)
{
real inlet_velocity = Get_Input_Parameter("vel_in");
real inlet_area = 0.015607214;
real volumeFlow = inlet_velocity*inlet_area;
return volumeFlow;
}Note: This example uses the Get_Input_Parameter API, indicating
that this Fluent case file has the inlet velocity specified as an input
parameter.
After the UDF that you have defined using
DEFINE_REPORT_DEFINITION_FN is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that you supplied as
the first DEFINE macro argument (for example,
on_demand_calc) will become visible and selectable in the
User Defined Report Definition dialog box in Fluent. See User Defined Report Definition Function Hooking in the Fluent User's Guide for details.