You can use DEFINE_HEAT_FLUX to modify
the heat flux at a wall. Despite the name, a DEFINE_HEAT_FLUX UDF is not the means to specify the actual
heat flux entering a domain from the outside. To specify this type
of heat flux, you would simply use a DEFINE_PROFILE function in conjunction with a heat flux thermal boundary condition.
In contrast, a DEFINE_HEAT_FLUX UDF allows
you to modify the way in which the dependence between the flux entering
the domain and the wall and cell temperatures is modeled.
Important: This function allows you to modify the heat flux at walls adjacent to a solid. Note, however, that for solids since only heat conduction is occurring, any extra heat flux that you add in a heat flux UDF can have a detrimental effect on the solution of the energy equation. These effects will likely show up in conjugate heat transfer problems. To avoid this, you will need to make sure that your heat flux UDF excludes the walls adjacent to solids, or includes only the necessary walls adjacent to fluid zones.
DEFINE_HEAT_FLUX (name,f,t,c0,t0,cid,cir)
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
Index that identifies a wall face. |
|
|
Pointer to wall face thread on which heat flux function is to be applied. |
|
|
Cell index that identifies the cell next to the wall. |
|
|
Pointer to the adjacent cell’s thread. |
|
|
Array of fluid-side diffusive heat transfer coefficients. |
|
|
Array of radiative heat transfer coefficients. |
Function returns
void
There are seven arguments to DEFINE_HEAT_FLUX: name, f, t, c0, t0, cid, and cir.
You supply name, the name of the UDF. f, t, c0, and t0 are variables that are passed by
the ANSYS Fluent solver to your UDF. Arrays cir[] and cid[] contain the linearizations of
the radiative and diffusive heat fluxes, respectively, computed by ANSYS Fluent based
on the activated models. These arrays allow you to modify the heat
flux in any way that you choose. ANSYS Fluent computes the heat flux at
the wall using these arrays after the call to DEFINE_HEAT_FLUX, so the total heat flux at the wall
will be the currently computed heat flux (based on the activated models)
with any modifications as defined by your UDF.
The diffusive heat flux (qid) and radiative
heat flux (qir) are computed by ANSYS Fluent according
to the following equations:
qid = cid[0] + caf_fac*(cid[1]*C_T(c0,t0) - cid[2]*F_T(f,t)) - cid[3]*pow(F_T(f,t),4) qir = cir[0] + cir[1]*C_T(c0,t0) - cir[2]*F_T(f,t) - cir[3]*pow(F_T(f,t),4)
where caf_fac is the convective augmentation
factor defined using the define/boundary-conditions/wall text command (for further details, see Augmented Heat Transfer in the User's Guide).
The sum of qid and qir defines the total heat flux from the fluid to the wall (this direction
being positive flux), and, from an energy balance at the wall, equals
the heat flux of the surroundings (exterior to the domain). Note that
heat flux UDFs (defined using DEFINE_HEAT_FLUX) are called by ANSYS Fluent from within a loop over wall faces.
Important: In order for the solver to compute C_T and F_T, the values you supply to cid[1] and cid[2] should never
be zero.
Implementing ANSYS Fluent’s P-1 Radiation Model Using User-Defined
Scalars provides
an example of the P-1 radiation model implementation through a user-defined
scalar. An example of the usage of the DEFINE_HEAT_FLUX macro is included in that implementation.
After the UDF that you have defined using DEFINE_HEAT_FLUX is interpreted (Interpreting UDFs)
or compiled (Compiling UDFs), the name
of the argument that you supplied as the first DEFINE macro argument (for example, heat_flux)
will become visible and selectable in the User-Defined Function
Hooks dialog box in ANSYS Fluent. See Hooking DEFINE_HEAT_FLUX UDFs for details.