2.3.43.  DEFINE_TRANSIENT_PROFILE

2.3.43.1. Description

You can use the DEFINE_TRANSIENT_PROFILE macro to specify cell zone conditions that vary over time (for example, the rotation rate of a fan rotor zone at machine startup). Using this macro, you can replace the default transient profile interpolation method in ANSYS Fluent or provide an analytic expression for the corresponding variable.

2.3.43.2. Usage

DEFINE_TRANSIENT_PROFILE (name, current_time)

Argument Type

Description

symbol name

UDF name.

real current_time

Current time.

Function returns

real

There are two arguments to DEFINE_TRANSIENT_PROFILE: name and current_time. You supply name, and then current_time is passed by the ANSYS Fluent solver to your UDF. Your UDF will need to compute the real value of the corresponding variable, to which the function is assigned.

2.3.43.3. Example

The following UDF, named rotation_rate_ramp, computes the rotation rate of a cell zone, simulating startup behavior. The angular velocity is increased linearly in time up to a flow time of 0.1 s, after which it remains constant. The source can be interpreted or compiled.

 #include "udf.h"
 
 DEFINE_TRANSIENT_PROFILE(rotation_rate_ramp,time)
 {
  real rotation_rate = 0.0;
 if (time < 0.1)
		{
 			 rotation_rate = 2500.0 * time;
		}
 else
		{
			rotation_rate = 250.0;
		}
	return rotation_rate; 
} 

2.3.43.4. Hooking a Transient Profile UDF to ANSYS Fluent

After the UDF that you have defined using DEFINE_TRANSIENT_PROFILE is interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name that you specified in the DEFINE macro argument will become visible and selectable in the cell zone condition dialog boxes. See Hooking DEFINE_TRANSIENT_PROFILE UDFs for details.


Release 18.2 - © ANSYS, Inc. All rights reserved.