A solar calculator model providing models for the solar direction and solar loads. More...
#include <solarCalculator.H>

Public Types | |
| enum | sunDirModel { mSunDirConstant , mSunDirTracking } |
| Options for the Sun direction models. More... | |
| enum | sunLModel { mSunLoadConstant , mSunLoadTimeDependent , mSunLoadFairWeatherConditions , mSunLoadTheoreticalMaximum } |
| Options for the Sun load models. More... | |
Public Member Functions | |
| ClassName ("solarCalculator") | |
| solarCalculator (const dictionary &, const fvMesh &) | |
| Construct from dictionary. | |
| ~solarCalculator ()=default | |
| Destructor. | |
| void | correctSunDirection () |
| Correct the Sun direction. | |
| void | correctDirectSolarRad () |
| Correct direct solar irradiation. | |
| void | correctDiffuseSolarRad () |
| Correct diffuse solar irradiation. | |
| tmp< scalarField > | diffuseSolarRad (const vectorField &n) const |
| Return the diffusive solar irradiation for sunLoadModel = fairWeather or for sunLoadModel = theoreticalMaximum. | |
| const sunDirModel & | sunDirectionModel () const noexcept |
| Return const access to the Sun direction model. | |
| const sunLModel & | sunLoadModel () const noexcept |
| Return const access to the Sun load model. | |
| vector & | direction () |
| Return non-const access to the Sun direction. | |
| const vector & | direction () const noexcept |
| Return const access to the Sun direction. | |
| scalar & | directSolarRad () |
| Return non-const access to the direct solar irradiation. | |
| const scalar & | directSolarRad () const noexcept |
| Return const access to the direct solar irradiation. | |
| scalar & | diffuseSolarRad () |
| Return non-const access to the diffuse solar irradiation. | |
| const scalar & | diffuseSolarRad () const noexcept |
| Return const access to the diffuse solar irradiation. | |
| scalar | C () const noexcept |
| Return const access to the C constant. | |
| scalar | beta () const noexcept |
| Return const access to beta. | |
| scalar | theta () const noexcept |
| Return const access to theta. | |
| scalar | groundReflectivity () const noexcept |
| Return const access to the ground reflectivity. | |
| const coordinateSystem & | coord () const noexcept |
| Return const access to the coordinate system. | |
| scalar | sunTrackingUpdateInterval () const noexcept |
| Return const access to sunTrackingUpdateInterval. | |
| scalar | startTime () const noexcept |
| Return const access to startTime. | |
Static Public Attributes | |
| static const Enum< sunDirModel > | sunDirectionModelTypeNames_ |
| Names for sunDirModel. | |
| static const Enum< sunLModel > | sunLModelTypeNames_ |
| Names for sunLModel. | |
A solar calculator model providing models for the solar direction and solar loads.
Available models for the solar direction:
constant: Constant sunbeam direction.tracking: Transient model calculating sunbeam direction based on a given set of parameters.Available models for the solar load:
constant: Constant solar load.timeDependent: Time-dependent solar load.fairWeather: Solar fluxes are calculated following the "Fair Weather Conditions Method from the ASHRAE Handbook".theoreticalMaximum: Theoretically maximum solar load.constant/radiationProperties:sunDirectionModel - Option-1:
solarLoadCoeffs
{
sunDirectionModel constant;
sunDirection (1 0 -1);
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
sunDirection | Sunbeam direction | vector | no | calculated |
sunDirectionModel - Option-2:
solarLoadCoeffs
{
sunDirectionModel tracking;
sunTrackingUpdateInterval 800;
localStandardMeridian 9;
startDay 204;
startTime 15;
longitude 139.74;
latitude 35.658;
gridUp (0 0 1);
gridEast (1 0 0);
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
sunTrackingUpdateInterval | Interval to update the Sun direction [decimal hours] | scalar | yes | - |
localStandardMeridian | GMT (Local Zone Meridian) [decimal hours] | scalar | yes | - |
startDay | Day from 1 to 365 | scalar | yes | - |
startTime | Start time for the Sun position [decimal hours] | scalar | yes | - |
longitude | Geographic coordinate specifying the east–west position of a point on the surface of a planetary body [degree] | scalar | yes | - |
latitude | Geographic coordinate specifying the north–south position of a point on the surface of a planetary body [degree] | scalar | yes | - |
gridUp | Grid orientation upwards | vector | yes | - |
gridEast | Grid orientation eastwards | vector | yes | - |
sunLoadModel - Option-1:
solarLoadCoeffs
{
sunLoadModel constant;
directSolarRad 100;
diffuseSolarRad 0;
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
directSolarRad | Direct solar irradiation [W/m2] | scalar | yes | - |
diffuseSolarRad | Diffuse solar irradiation on vertical surfaces [W/m2] | scalar | yes | - |
sunLoadModel - Option-2:
solarLoadCoeffs
{
sunLoadModel timeDependent;
directSolarRad <Function1<scalar>>;
diffuseSolarRad <Function1<scalar>>;
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
directSolarRad | Time-series of direct solar irradiation [W/m2] | Function1<scalar> | yes | - |
diffuseSolarRad | Time-series of diffuse solar irradiation on vertical surfaces [W/m2] | Function1<scalar> | yes | - |
sunLoadModel - Option-3:
solarLoadCoeffs
{
sunLoadModel fairWeather;
skyCloudCoverFraction 0.25;
groundReflectivity 1.0;
A 0.1;
B 0.2;
C 0.058;
beta 0.15;
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
A | Apparent solar irradiation at air mass m = 0 | scalar | yes | - |
B | Atmospheric extinction coefficient | scalar | yes | - |
C | Solar diffusivity constant | scalar | yes | - |
groundReflectivity | Ground reflectivity | scalar | yes | - |
skyCloudCoverFraction | Fraction of sky covered by clouds [0,1] | scalar | no | 0 |
beta | Solar altitude (in degrees) above the horizontal | scalar | no | calculated |
In this model the flux is calculated as:
directSolarRad = (1 - 0.75*skyCloudCoverFraction^3)*A/exp(B/sin(beta));
sunLoadModel - Option-4:
solarLoadCoeffs
{
sunLoadModel theoreticalMaximum;
Setrn 1.0;
SunPrime 4.0;
groundReflectivity 1.0;
C 0.058;
}
where the entries mean:
| Property | Description | Type | Reqd | Deflt |
|---|---|---|---|---|
Setrn | Parameter in maximum theoretical direct solar model | scalar | yes | - |
SunPrime | Parameter in maximum theoretical direct solar model | scalar | yes | - |
groundReflectivity | Ground reflectivity | scalar | yes | - |
C | Solar diffusivity constant | scalar | yes | - |
In this model the flux is calculated as:
directSolarRad = Setrn*SunPrime;
sunDirectionModel:tracking can only be used in transient calculations.sunTrackingUpdateInterval (in hours) specifies on which interval is the Sun direction updated.skyCloudCoverFraction is [0,1].Definition at line 440 of file solarCalculator.H.
| enum sunDirModel |
Options for the Sun direction models.
| Enumerator | |
|---|---|
| mSunDirConstant | |
| mSunDirTracking | |
Definition at line 449 of file solarCalculator.H.
| enum sunLModel |
Options for the Sun load models.
| Enumerator | |
|---|---|
| mSunLoadConstant | |
| mSunLoadTimeDependent | |
| mSunLoadFairWeatherConditions | |
| mSunLoadTheoreticalMaximum | |
Definition at line 463 of file solarCalculator.H.
| solarCalculator | ( | const dictionary & | dict, |
| const fvMesh & | mesh ) |
Construct from dictionary.
Definition at line 261 of file solarCalculator.C.
References dict, mesh, sunDirectionModelTypeNames_, sunLModelTypeNames_, and Foam::Zero.
|
default |
Destructor.
References n.
| ClassName | ( | "solarCalculator" | ) |
| void correctSunDirection | ( | ) |
Correct the Sun direction.
Definition at line 300 of file solarCalculator.C.
References Foam::exp(), Foam::max(), mSunDirTracking, and Foam::sin().

| void correctDirectSolarRad | ( | ) |
Correct direct solar irradiation.
Definition at line 311 of file solarCalculator.C.
References mSunLoadTimeDependent.
| void correctDiffuseSolarRad | ( | ) |
Correct diffuse solar irradiation.
Definition at line 320 of file solarCalculator.C.
References mSunLoadTimeDependent.
| Foam::tmp< Foam::scalarField > diffuseSolarRad | ( | const vectorField & | n | ) | const |
Return the diffusive solar irradiation for sunLoadModel = fairWeather or for sunLoadModel = theoreticalMaximum.
Definition at line 329 of file solarCalculator.C.
References forAll, n, tmp< T >::New(), Foam::sin(), Foam::sqr(), and Y.

|
inlinenoexcept |
Return const access to the Sun direction model.
Definition at line 680 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to the Sun load model.
Definition at line 688 of file solarCalculator.H.
References Foam::noexcept.
Return non-const access to the Sun direction.
Definition at line 696 of file solarCalculator.H.
Return const access to the Sun direction.
Definition at line 704 of file solarCalculator.H.
References Foam::noexcept.
|
inline |
Return non-const access to the direct solar irradiation.
Definition at line 712 of file solarCalculator.H.
|
inlinenoexcept |
Return const access to the direct solar irradiation.
Definition at line 720 of file solarCalculator.H.
References Foam::noexcept.
|
inline |
Return non-const access to the diffuse solar irradiation.
Definition at line 728 of file solarCalculator.H.
|
inlinenoexcept |
Return const access to the diffuse solar irradiation.
Definition at line 736 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to the C constant.
Definition at line 744 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to beta.
Definition at line 752 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to theta.
Definition at line 760 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to the ground reflectivity.
Definition at line 768 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to the coordinate system.
Definition at line 776 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to sunTrackingUpdateInterval.
Definition at line 784 of file solarCalculator.H.
References Foam::noexcept.
|
inlinenoexcept |
Return const access to startTime.
Definition at line 792 of file solarCalculator.H.
References Foam::noexcept.
|
static |
Names for sunDirModel.
Definition at line 458 of file solarCalculator.H.
Referenced by solarCalculator().
|
static |
Names for sunLModel.
Definition at line 474 of file solarCalculator.H.
Referenced by solarCalculator().