Public Types | Public Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes
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:
Collaboration graph
[legend]

Public Types

enum  sunDirModel { mSunDirConstant, mSunDirTraking }
 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 ()
 Destructor. More...
 
const vector direction () const
 const acess to direction More...
 
vectordirection ()
 Non-const access to direction. More...
 
scalar directSolarRad ()
 Return direct solar irradiation. More...
 
scalar diffuseSolarRad ()
 Return diffuse solar irradiation. More...
 
scalar C ()
 Return C consntant. More...
 
scalar beta ()
 Return beta. More...
 
scalar tetha ()
 Return tetha. 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 NamedEnum< sunDirModel, 2 > sunDirectionModelTypeNames_
 Sun direction models. More...
 
static const NamedEnum< sunLModel, 3 > sunLoadModelTypeNames_
 Sun load models. More...
 

Private Member Functions

 solarCalculator (const solarCalculator &)
 Disallow default bitwise copy construct. More...
 
void operator= (const solarCalculator &)
 Disallow default bitwise assignment. More...
 
void init ()
 Init. More...
 
void calculateBetaTetha ()
 Calculate beta and tetha angles. More...
 
void calculateSunDirection ()
 Calculate Sun direction. More...
 

Private Attributes

const fvMeshmesh_
 Reference to mesh. More...
 
dictionary dict_
 Dictionary. More...
 
vector direction_
 Direction. More...
 
scalar directSolarRad_
 Direct solar irradiation. More...
 
scalar diffuseSolarRad_
 Diffuse solar irradiation on vertical surfaces. More...
 
scalar groundReflectivity_
 Ground reflectivity. More...
 
scalar A_
 Fair weather direct solar load model parameters. More...
 
scalar B_
 
scalar beta_
 
scalar tetha_
 
scalar Setrn_
 Maximum theoretical direct solar load model parameters. More...
 
scalar SunPrime_
 
scalar C_
 Diffusive solar load model parameters. More...
 
sunDirModel sunDirectionModel_
 Sun direction model. More...
 
sunLModel sunLoadModel_
 Sun load model. More...
 
autoPtr< coordinateSystemcoord_
 Grid coordinate system. More...
 
vector eastDir_
 East grid orientation. More...
 
vector gridUp_
 Up grid orientation. More...
 
scalar sunTrackingUpdateInterval_
 Interval in decimal hours to update Sun direction for SunDirTraking. More...
 
scalar startTime_
 Start time for the Sun position (decimal hours) 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) SunDirTraking : 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: 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 = 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 101 of file solarCalculator.H.

Member Enumeration Documentation

◆ sunDirModel

Sun direction models.

Enumerator
mSunDirConstant 
mSunDirTraking 

Definition at line 108 of file solarCalculator.H.

◆ sunLModel

enum sunLModel

Direct sun load models.

Enumerator
mSunLoadConstant 
mSunLoadFairWeatherConditions 
mSunLoadTheoreticalMaximum 

Definition at line 115 of file solarCalculator.H.

Constructor & Destructor Documentation

◆ solarCalculator() [1/2]

solarCalculator ( const solarCalculator )
private

Disallow default bitwise copy construct.

◆ solarCalculator() [2/2]

solarCalculator ( const dictionary dict,
const fvMesh mesh 
)

Construct from dictionary.

Definition at line 257 of file solarCalculator.C.

◆ ~solarCalculator()

Destructor.

Definition at line 292 of file solarCalculator.C.

Member Function Documentation

◆ operator=()

void operator= ( const solarCalculator )
private

Disallow default bitwise assignment.

◆ init()

void init ( )
private

Init.

Definition at line 173 of file solarCalculator.C.

References Foam::exit(), Foam::exp(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), Foam::nl, Foam::readScalar(), and Foam::sin().

Here is the call graph for this function:

◆ calculateBetaTetha()

void calculateBetaTetha ( )
private

◆ calculateSunDirection()

void calculateSunDirection ( )
private

Calculate Sun direction.

Definition at line 139 of file solarCalculator.C.

References Foam::cos(), Foam::endl(), Foam::Info, Foam::mag(), Foam::sin(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ ClassName()

ClassName ( "solarCalculator"  )

◆ direction() [1/2]

const vector direction ( ) const
inline

const acess to direction

Definition at line 231 of file solarCalculator.H.

References solarCalculator::direction_.

Referenced by solarLoad::updateHitFaces(), and solarHeatLoad::updateHitFaces().

Here is the caller graph for this function:

◆ direction() [2/2]

vector& direction ( )
inline

Non-const access to direction.

Definition at line 237 of file solarCalculator.H.

References solarCalculator::direction_.

◆ directSolarRad()

scalar directSolarRad ( )
inline

Return direct solar irradiation.

Definition at line 243 of file solarCalculator.H.

References solarCalculator::directSolarRad_.

◆ diffuseSolarRad()

scalar diffuseSolarRad ( )
inline

Return diffuse solar irradiation.

Definition at line 249 of file solarCalculator.H.

References solarCalculator::diffuseSolarRad_.

◆ C()

scalar C ( )
inline

Return C consntant.

Definition at line 255 of file solarCalculator.H.

References solarCalculator::C_.

◆ beta()

scalar beta ( )
inline

Return beta.

Definition at line 261 of file solarCalculator.H.

References solarCalculator::beta_.

◆ tetha()

scalar tetha ( )
inline

Return tetha.

Definition at line 267 of file solarCalculator.H.

References solarCalculator::tetha_.

◆ sunDirectionModel()

sunDirModel sunDirectionModel ( ) const
inline

Return Sun direction model.

Definition at line 273 of file solarCalculator.H.

References solarCalculator::sunDirectionModel_.

Referenced by solarLoad::updateHitFaces(), and solarHeatLoad::updateHitFaces().

Here is the caller graph for this function:

◆ sunLoadModel()

sunLModel sunLoadModel ( ) const
inline

Return Sun load model.

Definition at line 279 of file solarCalculator.H.

References solarCalculator::sunLoadModel_.

◆ groundReflectivity()

scalar groundReflectivity ( )
inline

Return groundReflectivity.

Definition at line 285 of file solarCalculator.H.

References solarCalculator::groundReflectivity_.

◆ coord()

const coordinateSystem& coord ( )
inline

Return coordinateSystem.

Definition at line 291 of file solarCalculator.H.

References solarCalculator::coord_.

◆ sunTrackingUpdateInterval()

scalar sunTrackingUpdateInterval ( )
inline

Return sunTrackingUpdateInterval.

Definition at line 297 of file solarCalculator.H.

References solarCalculator::sunTrackingUpdateInterval_.

Referenced by solarLoad::updateHitFaces(), and solarHeatLoad::updateHitFaces().

Here is the caller graph for this function:

◆ startTime()

scalar startTime ( )
inline

Return startTime.

Definition at line 303 of file solarCalculator.H.

References solarCalculator::startTime_.

◆ correctSunDirection()

void correctSunDirection ( )

Recalculate.

Definition at line 298 of file solarCalculator.C.

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

Referenced by solarLoad::updateHitFaces(), and solarHeatLoad::updateHitFaces().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ sunDirectionModelTypeNames_

const Foam::NamedEnum< Foam::solarCalculator::sunDirModel, 2 > sunDirectionModelTypeNames_
staticprotected

Sun direction models.

Definition at line 126 of file solarCalculator.H.

◆ sunLoadModelTypeNames_

const Foam::NamedEnum< Foam::solarCalculator::sunLModel, 3 > sunLoadModelTypeNames_
staticprotected

Sun load models.

Definition at line 129 of file solarCalculator.H.

◆ mesh_

const fvMesh& mesh_
private

Reference to mesh.

Definition at line 137 of file solarCalculator.H.

Referenced by solarCalculator::calculateBetaTetha().

◆ dict_

dictionary dict_
private

Dictionary.

Definition at line 140 of file solarCalculator.H.

Referenced by solarCalculator::calculateBetaTetha().

◆ direction_

vector direction_
private

Direction.

Definition at line 143 of file solarCalculator.H.

Referenced by solarCalculator::direction().

◆ directSolarRad_

scalar directSolarRad_
private

Direct solar irradiation.

Definition at line 146 of file solarCalculator.H.

Referenced by solarCalculator::directSolarRad().

◆ diffuseSolarRad_

scalar diffuseSolarRad_
private

Diffuse solar irradiation on vertical surfaces.

Definition at line 149 of file solarCalculator.H.

Referenced by solarCalculator::diffuseSolarRad().

◆ groundReflectivity_

scalar groundReflectivity_
private

Ground reflectivity.

Definition at line 152 of file solarCalculator.H.

Referenced by solarCalculator::groundReflectivity().

◆ A_

scalar A_
private

Fair weather direct solar load model parameters.

Definition at line 155 of file solarCalculator.H.

◆ B_

scalar B_
private

Definition at line 156 of file solarCalculator.H.

◆ beta_

scalar beta_
private

◆ tetha_

scalar tetha_
private

◆ Setrn_

scalar Setrn_
private

Maximum theoretical direct solar load model parameters.

Definition at line 162 of file solarCalculator.H.

◆ SunPrime_

scalar SunPrime_
private

Definition at line 163 of file solarCalculator.H.

◆ C_

scalar C_
private

Diffusive solar load model parameters.

Definition at line 167 of file solarCalculator.H.

Referenced by solarCalculator::C().

◆ sunDirectionModel_

sunDirModel sunDirectionModel_
private

Sun direction model.

Definition at line 170 of file solarCalculator.H.

Referenced by solarCalculator::calculateBetaTetha(), and solarCalculator::sunDirectionModel().

◆ sunLoadModel_

sunLModel sunLoadModel_
private

Sun load model.

Definition at line 173 of file solarCalculator.H.

Referenced by solarCalculator::sunLoadModel().

◆ coord_

autoPtr<coordinateSystem> coord_
private

Grid coordinate system.

Definition at line 176 of file solarCalculator.H.

Referenced by solarCalculator::coord().

◆ eastDir_

vector eastDir_
private

East grid orientation.

Definition at line 179 of file solarCalculator.H.

◆ gridUp_

vector gridUp_
private

Up grid orientation.

Definition at line 182 of file solarCalculator.H.

◆ sunTrackingUpdateInterval_

scalar sunTrackingUpdateInterval_
private

Interval in decimal hours to update Sun direction for SunDirTraking.

Definition at line 185 of file solarCalculator.H.

Referenced by solarCalculator::sunTrackingUpdateInterval().

◆ startTime_

scalar startTime_
private

Start time for the Sun position (decimal hours)

Definition at line 188 of file solarCalculator.H.

Referenced by solarCalculator::calculateBetaTetha(), and solarCalculator::startTime().


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