BuildSysPro.BoundaryConditions.Solar.Utilities.CosDirSunVector

# .BuildSysPro.BoundaryConditions.Solar.Utilities.CosDirSunVector

Sun's direction cosines

## Information

Function computing the sun's direction cosines at (t0 + t) depending on longitude and latitude

Hypothesis and equations

The function returns the direction cosine of solar beam as a vector CosDir[3]

- CosDir[1]=sin(phi)*sin(delta)+cos(phi)*cos(delta)*cos(HA) (=sinh)
- CosDir[2]=cos(delta)*sin(HA)
- CosDir[3]=cos(delta)*sin(phi)*cos(HA)-sin(delta)*cos(phi)

Where:

- phi : latitude converted in radians
- delta : Sun's declination in radians
- HA : hour angle in radians

The year is supposed to be not bisextile.

Bibliography

H. BOUIA, "Amélioration du temps de calcul dans BuildSysPro par traitements numériques optimisés de la conduction et des calculs solaires", Note H-E14-2013-00715-FR, 03/2013.

Instructions for use

none

Known limits / Use precautions

none

Validations

Validated function - Hassan BOUIA 03/2013.

--------------------------------------------------------------
Licensed by EDF under a 3-clause BSD-license
Copyright © EDF 2009 - 2023
BuildSysPro version 3.6.0
Author : Hassan BOUIA, EDF (2013)
--------------------------------------------------------------

#### Interface

>     function CosDirSunVector
>       input Real t0 = 0 "Time in seconds at t=0";
>       input Modelica.Units.SI.Time t "Universal time in seconds";
>       input Modelica.Units.NonSI.Angle_deg longitude "Longitude in degrees";
>       input Modelica.Units.NonSI.Angle_deg latitude "Latitude in degrees";
>       output Real CosDir[3] "Sun's direction cosine";
>     end CosDirSunVector;

## Revisions

Benoît Charrier 01/2016 : Correction d'une erreur dans le calcul du quantième : remplacement de la ligne `Real d=mod((t+t0)/86400,365);` par `Real d=mod((t+t0)/86400,365)+1;`.

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos