[Fluent Inc. Logo] return to home search
next up previous contents index

2.3.16 DEFINE_SOLAR_INTENSITY



Description


You can use the DEFINE_SOLAR_INTENSITY macro to define direct solar intensity or diffuse solar intensity UDFs for the solar load model. Click here to go to the User's Guide for more information on the solar load model.

figure   

Note that solar intensity UDFs are used with the Solar Model, which is available only for the 3d geometries in 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 FLUENT solver to your UDF. Your UDF will need to compute the direct or diffuse solar irradiation and return the real value (in $w/m^2$) to the solver.



Example


The following source code contains two UDFs: sol_direct_intensity computes the direct solar irradiation and returns it to the 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 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 panel in FLUENT. Note that the solar load model must be enabled. See Section  6.2.16 for details.


next up previous contents index Previous: 2.3.15 DEFINE_SCAT_PHASE_FUNC
Up: 2.3 Model-Specific DEFINE Macros
Next: 2.3.17 DEFINE_SOURCE
© Fluent Inc. 2006-09-13