Public Types | Public Member Functions | Static Public Attributes | List of all members
solarCalculator Class Reference

A solar calculator model providing models for the solar direction and solar loads. More...

Collaboration diagram for solarCalculator:
Collaboration graph
[legend]

Public Types

enum  sunDirModel { mSunDirConstant, mSunDirTracking }
 
enum  sunLModel { mSunLoadConstant, mSunLoadTimeDependent, mSunLoadFairWeatherConditions, mSunLoadTheoreticalMaximum }
 

Public Member Functions

 ClassName ("solarCalculator")
 
 solarCalculator (const dictionary &, const fvMesh &)
 
 ~solarCalculator ()=default
 
void correctSunDirection ()
 
void correctDirectSolarRad ()
 
void correctDiffuseSolarRad ()
 
const sunDirModelsunDirectionModel () const noexcept
 
const sunLModelsunLoadModel () const noexcept
 
vectordirection ()
 
const vectordirection () const noexcept
 
scalar & directSolarRad ()
 
const scalar & directSolarRad () const noexcept
 
scalar & diffuseSolarRad ()
 
const scalar & diffuseSolarRad () const noexcept
 
scalar C () const noexcept
 
scalar beta () const noexcept
 
scalar theta () const noexcept
 
scalar groundReflectivity () const noexcept
 
const coordinateSystemcoord () const noexcept
 
scalar sunTrackingUpdateInterval () const noexcept
 
scalar startTime () const noexcept
 

Static Public Attributes

static const Enum< sunDirModelsunDirectionModelTypeNames_
 
static const Enum< sunLModelsunLModelTypeNames_
 

Detailed Description

A solar calculator model providing models for the solar direction and solar loads.

Available models for the solar direction:

Available models for the solar load:

Usage
Minimal examples by using 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;
Note
  • The sunDirectionModel:tracking can only be used in transient calculations.
  • The keyword sunTrackingUpdateInterval (in hours) specifies on which interval is the Sun direction updated.
  • The diffuse on vertical/horizontal walls and ground-reflected radiation are calculated following the ASHRAE Handbook.
  • The range of skyCloudCoverFraction is [0,1].
Source files

Definition at line 440 of file solarCalculator.H.

Member Enumeration Documentation

◆ sunDirModel

Enumerator
mSunDirConstant 
mSunDirTracking 

Definition at line 447 of file solarCalculator.H.

◆ sunLModel

enum sunLModel
Enumerator
mSunLoadConstant 
mSunLoadTimeDependent 
mSunLoadFairWeatherConditions 
mSunLoadTheoreticalMaximum 

Definition at line 457 of file solarCalculator.H.

Constructor & Destructor Documentation

◆ solarCalculator()

solarCalculator ( const dictionary dict,
const fvMesh mesh 
)

Definition at line 262 of file solarCalculator.C.

◆ ~solarCalculator()

~solarCalculator ( )
default

Member Function Documentation

◆ ClassName()

ClassName ( "solarCalculator"  )

◆ correctSunDirection()

void correctSunDirection ( )

Definition at line 300 of file solarCalculator.C.

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

Here is the call graph for this function:

◆ correctDirectSolarRad()

void correctDirectSolarRad ( )

Definition at line 311 of file solarCalculator.C.

◆ correctDiffuseSolarRad()

void correctDiffuseSolarRad ( )

Definition at line 320 of file solarCalculator.C.

◆ sunDirectionModel()

const sunDirModel& sunDirectionModel ( ) const
inlinenoexcept

Definition at line 605 of file solarCalculator.H.

◆ sunLoadModel()

const sunLModel& sunLoadModel ( ) const
inlinenoexcept

Definition at line 611 of file solarCalculator.H.

◆ direction() [1/2]

vector& direction ( )
inline

Definition at line 617 of file solarCalculator.H.

◆ direction() [2/2]

const vector& direction ( ) const
inlinenoexcept

Definition at line 623 of file solarCalculator.H.

◆ directSolarRad() [1/2]

scalar& directSolarRad ( )
inline

Definition at line 629 of file solarCalculator.H.

◆ directSolarRad() [2/2]

const scalar& directSolarRad ( ) const
inlinenoexcept

Definition at line 635 of file solarCalculator.H.

◆ diffuseSolarRad() [1/2]

scalar& diffuseSolarRad ( )
inline

Definition at line 641 of file solarCalculator.H.

◆ diffuseSolarRad() [2/2]

const scalar& diffuseSolarRad ( ) const
inlinenoexcept

Definition at line 647 of file solarCalculator.H.

◆ C()

scalar C ( ) const
inlinenoexcept

Definition at line 653 of file solarCalculator.H.

◆ beta()

scalar beta ( ) const
inlinenoexcept

Definition at line 659 of file solarCalculator.H.

◆ theta()

scalar theta ( ) const
inlinenoexcept

Definition at line 665 of file solarCalculator.H.

◆ groundReflectivity()

scalar groundReflectivity ( ) const
inlinenoexcept

Definition at line 671 of file solarCalculator.H.

◆ coord()

const coordinateSystem& coord ( ) const
inlinenoexcept

Definition at line 677 of file solarCalculator.H.

◆ sunTrackingUpdateInterval()

scalar sunTrackingUpdateInterval ( ) const
inlinenoexcept

Definition at line 683 of file solarCalculator.H.

◆ startTime()

scalar startTime ( ) const
inlinenoexcept

Definition at line 689 of file solarCalculator.H.

Member Data Documentation

◆ sunDirectionModelTypeNames_

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

Definition at line 454 of file solarCalculator.H.

◆ sunLModelTypeNames_

const Foam::Enum< Foam::solarCalculator::sunLModel > sunLModelTypeNames_
static

Definition at line 466 of file solarCalculator.H.


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