|
|
Description
You can use the DEFINE_SOLAR_INTENSITY macro to define direct solar intensity or diffuse solar intensity UDFs for the solar load model. See this chapter in the separate User's Guide for more information on the solar load model.
|
|
Note that solar intensity UDFs are used with the Solar Model, which is available only for the 3d geometries in
ANSYS FLUENT.
|
Usage
| DEFINE_SOLAR_INTENSITY( name, sum_x, sun_y, sun_z, S_hour, S_minute) |
| Argument Type | Description |
| symbol name | UDF name. |
| real sun_x | x component of the sun direction vector. |
| real sun_y | y component of the sun direction vector. |
| real sun_z | z component of the sun direction vector. |
| real S_hour | Time in hours. |
| real S_minute | 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.
Example
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;
}
|
Hooking a Solar Intensity UDF to
ANSYS FLUENT
After the UDF that you have defined using DEFINE_SOLAR_INTENSITY is interpreted (Chapter 4) or compiled (Chapter 5), the name that you specified (e.g., 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 Section 6.2.18 for details.