solarCalculator Class Reference

The solar calculator model provides information about the Sun direction and Sun load model. The available models are: More...

Collaboration diagram for solarCalculator:
[legend]

Public Types

enum  sunDirModel { mSunDirConstant, mSunDirTracking }
 Sun direction models. More...
 
enum  sunLModel { mSunLoadConstant, mSunLoadFairWeatherConditions, mSunLoadTheoreticalMaximum }
 Direct sun load models. More...
 

Public Member Functions

 ClassName ("solarCalculator")
 
 solarCalculator (const dictionary &, const fvMesh &)
 Construct from dictionary. More...
 
 ~solarCalculator ()=default
 Destructor. More...
 
const vectordirection () const
 const access to direction More...
 
vectordirection ()
 Non-const access to direction. More...
 
scalar & directSolarRad ()
 Return direct solar irradiation. More...
 
const scalar & directSolarRad () const
 Return const access to direct solar irradiation. More...
 
scalar & diffuseSolarRad ()
 Return diffuse solar irradiation. More...
 
const scalar & diffuseSolarRad () const
 Return diffuse solar irradiation. More...
 
scalar C ()
 Return C constant. More...
 
scalar beta ()
 Return beta. More...
 
scalar theta ()
 Return theta. More...
 
sunDirModel sunDirectionModel () const
 Return Sun direction model. More...
 
sunLModel sunLoadModel () const
 Return Sun load model. More...
 
scalar groundReflectivity ()
 Return groundReflectivity. More...
 
const coordinateSystemcoord ()
 Return coordinateSystem. More...
 
scalar sunTrackingUpdateInterval ()
 Return sunTrackingUpdateInterval. More...
 
scalar startTime ()
 Return startTime. More...
 
void correctSunDirection ()
 Recalculate. More...
 

Static Protected Attributes

static const Enum< sunDirModelsunDirectionModelTypeNames_
 Sun direction models. More...
 
static const Enum< sunLModelsunLoadModelTypeNames_
 Sun load models. More...
 

Detailed Description

The solar calculator model provides information about the Sun direction and Sun load model. The available models are:

For the Sun direction: 1) SunDirConstant : the direction is given in 'sunDirection' 2) SunDirTracking : the direction is calculated from the following parameters: localStandardMeridian : GMT (Local Zone Meridian) in hours startDay : day from 1 to 365) startTime: in hours longitude: in degrees latitude: in degrees gridUp: grid orientation upwards gridEast grid orientation eastwards

This model should be use in transient calculations. The keyword 'sunTrackingUpdateInterval' (in hours) specifies on which interval is the Sun direction updated.

Solar Load models available: 1) SunLoadConstant: direct and diffusive heat fluxes are provided by the entries 'directSolarRad' and 'diffuseSolarRad'

2) SunLoadFairWeatherConditions: The solar fluxes are calculated following the Fair Weather Conditions Method from the ASHRAE Handbook. The entries are: skyCloudCoverFraction: Fraction of sky covered by clouds (0-1) A : Apparent solar irradiation at air mass m = 0 B : Atmospheric extinction coefficient beta: Solar altitude (in degrees) above the horizontal. This can be read or calculated providing the respective parameters for Sun position explained above. groundReflectivity : ground reflectivity

In this model the flux is calculated as:

directSolarRad = (1 - 0.75*skyCloudCoverFraction^3)*A/exp(B/sin(beta));

3) SunLoadTheoreticalMaximum: The entries are: Setrn SunPrime: groundReflectivity : ground reflectivity

In this model the flux is calculated as:

directSolarRad = Setrn*SunPrime;

The diffuse on vertical/horizontal walls and ground-reflected radiation are calculated following the ASHRAE Handbook.

Source files

Definition at line 105 of file solarCalculator.H.

Member Enumeration Documentation

◆ sunDirModel

Sun direction models.

Enumerator
mSunDirConstant 
mSunDirTracking 

Definition at line 112 of file solarCalculator.H.

◆ sunLModel

enum sunLModel

Direct sun load models.

Enumerator
mSunLoadConstant 
mSunLoadFairWeatherConditions 
mSunLoadTheoreticalMaximum 

Definition at line 119 of file solarCalculator.H.

Constructor & Destructor Documentation

◆ solarCalculator()

solarCalculator ( const dictionary dict,
const fvMesh mesh 
)

Construct from dictionary.

Definition at line 239 of file solarCalculator.C.

References init().

Here is the call graph for this function:

◆ ~solarCalculator()

~solarCalculator ( )
default

Destructor.

Member Function Documentation

◆ ClassName()

ClassName ( "solarCalculator"  )

◆ direction() [1/2]

const vector& direction ( ) const
inline

const access to direction

Definition at line 239 of file solarCalculator.H.

◆ direction() [2/2]

vector& direction ( )
inline

Non-const access to direction.

Definition at line 245 of file solarCalculator.H.

◆ directSolarRad() [1/2]

scalar& directSolarRad ( )
inline

Return direct solar irradiation.

Definition at line 251 of file solarCalculator.H.

◆ directSolarRad() [2/2]

const scalar& directSolarRad ( ) const
inline

Return const access to direct solar irradiation.

Definition at line 257 of file solarCalculator.H.

◆ diffuseSolarRad() [1/2]

scalar& diffuseSolarRad ( )
inline

Return diffuse solar irradiation.

Definition at line 263 of file solarCalculator.H.

◆ diffuseSolarRad() [2/2]

const scalar& diffuseSolarRad ( ) const
inline

Return diffuse solar irradiation.

Definition at line 269 of file solarCalculator.H.

◆ C()

scalar C ( )
inline

Return C constant.

Definition at line 275 of file solarCalculator.H.

◆ beta()

scalar beta ( )
inline

Return beta.

Definition at line 281 of file solarCalculator.H.

◆ theta()

scalar theta ( )
inline

Return theta.

Definition at line 287 of file solarCalculator.H.

◆ sunDirectionModel()

sunDirModel sunDirectionModel ( ) const
inline

Return Sun direction model.

Definition at line 293 of file solarCalculator.H.

◆ sunLoadModel()

sunLModel sunLoadModel ( ) const
inline

Return Sun load model.

Definition at line 299 of file solarCalculator.H.

◆ groundReflectivity()

scalar groundReflectivity ( )
inline

Return groundReflectivity.

Definition at line 305 of file solarCalculator.H.

◆ coord()

const coordinateSystem& coord ( )
inline

Return coordinateSystem.

Definition at line 311 of file solarCalculator.H.

◆ sunTrackingUpdateInterval()

scalar sunTrackingUpdateInterval ( )
inline

Return sunTrackingUpdateInterval.

Definition at line 317 of file solarCalculator.H.

◆ startTime()

scalar startTime ( )
inline

Return startTime.

Definition at line 323 of file solarCalculator.H.

◆ correctSunDirection()

void correctSunDirection ( )

Recalculate.

Definition at line 271 of file solarCalculator.C.

References Foam::exp(), Foam::max(), and Foam::sin().

Here is the call graph for this function:

Member Data Documentation

◆ sunDirectionModelTypeNames_

const Foam::Enum< Foam::solarCalculator::sunDirModel > sunDirectionModelTypeNames_
staticprotected

Sun direction models.

Definition at line 130 of file solarCalculator.H.

◆ sunLoadModelTypeNames_

const Foam::Enum< Foam::solarCalculator::sunLModel > sunLoadModelTypeNames_
staticprotected

Sun load models.

Definition at line 133 of file solarCalculator.H.


The documentation for this class was generated from the following files: