You can use the DEFINE_SOLAR_INTENSITY macro to define direct solar intensity or diffuse solar intensity
UDFs for the solar load model. See Modeling Heat Transfer in the User’s
Guide for more information on the solar load model.
Important: Note that solar intensity UDFs are used with the Solar Model, which is available only for the 3D geometries in ANSYS Fluent.
DEFINE_SOLAR_INTENSITY (name, sum_x, sun_y, sun_z, S_hour, S_minute)
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
x component of the sun direction vector. |
|
|
y component of the sun direction vector. |
|
|
z component of the sun direction vector. |
|
|
Time in hours. |
|
|
Time in minutes. |
Function returns
real
There are six arguments to DEFINE_SOLAR_INTENSITY: name, sun_x, sun_y, sun_z, S_hour, and S_minute. You provide the name of your user-defined function. The variables sun_x, sun_y, sun_z, S_hour, and S_minute are passed by the ANSYS Fluent solver to your UDF. Your UDF will need
to compute the direct or diffuse solar irradiation and return the real value (in ) to the solver.
The following source code contains two UDFs: sol_direct_intensity computes the direct solar irradiation and returns it to the ANSYS Fluent solver,
and sol_diffuse_intensity computes the diffuse
solar irradiation.
#include "udf.h"
DEFINE_SOLAR_INTENSITY(sol_direct_intensity,sun_x,sun_y,sun_z,hour,minute)
{
real intensity;
intensity = 1019;
printf("solar-time=%f intensity=%e\n", minute, intensity);
return intensity;
}
DEFINE_SOLAR_INTENSITY(sol_diffuse_intensity,sun_x,sun_y,sun_z,hour,minute)
{
real intensity;
intensity = 275;
printf("solar-time=%f intensity-diff=%e\n", minute, intensity);
return intensity;
}
After the UDF that you have defined using DEFINE_SOLAR_INTENSITY is interpreted (Interpreting UDFs)
or compiled (Compiling UDFs), the name
that you specified (for example, sol_direct_intensity) in the DEFINE macro argument will become
visible and selectable for Direct Solar Irradiation and Diffuse Solar Irradiation in the Radiation Model dialog box in ANSYS Fluent. Note that the
solar load model must be enabled. See Hooking DEFINE_SOLAR_INTENSITY UDFs for details.