Skip to content

Commit ba6b67a

Browse files
committed
Merge branch 'dev' into ms/#53-upgrate-to-scala3
# Conflicts: # CHANGELOG.md # src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgent.scala # src/main/scala/edu/ie3/simona/agent/participant/ParticipantAgentFundamentals.scala # src/main/scala/edu/ie3/simona/agent/participant/ServiceRegistration.scala # src/main/scala/edu/ie3/simona/agent/participant/data/Data.scala # src/main/scala/edu/ie3/simona/agent/participant/statedata/BaseStateData.scala # src/main/scala/edu/ie3/simona/agent/participant/statedata/DataCollectionStateData.scala # src/main/scala/edu/ie3/simona/agent/participant/statedata/ParticipantStateData.scala # src/main/scala/edu/ie3/simona/io/result/AccompaniedSimulationResult.scala # src/main/scala/edu/ie3/simona/model/participant/SystemParticipant.scala # src/test/scala/edu/ie3/simona/agent/em/EmAgentIT.scala # src/test/scala/edu/ie3/simona/event/listener/RuntimeEventListenerKafkaSpec.scala
2 parents 95b1614 + 76fd935 commit ba6b67a

File tree

146 files changed

+10079
-4742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+10079
-4742
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4646
- Throw exception if the slack node is not directly conected to a transformer. [#525](https://github.com/ie3-institute/simona/issues/525)
4747
- Added support for topologies without transformers and slack grids with multiple nodes [#1099](https://github.com/ie3-institute/simona/issues/1099)
4848
- Checking the number of slack nodes [#1122](https://github.com/ie3-institute/simona/issues/1122)
49+
- Enhance exception message in case of InvalidGridException [#1124](https://github.com/ie3-institute/simona/issues/1124)
50+
- Integration test for thermal grids [#1145](https://github.com/ie3-institute/simona/issues/1145)
51+
- Added `VoltageLimits` [#1133](https://github.com/ie3-institute/simona/issues/1133)
52+
- Introducing new ParticipantAgent and ParticipantModel [#1134](https://github.com/ie3-institute/simona/issues/1134)
4953

5054
### Changed
5155
- Adapted to changed data source in PSDM [#435](https://github.com/ie3-institute/simona/issues/435)
@@ -118,6 +122,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
118122
- Fixed SonarQube quality gate using the correct parameter '-Dsonar.qualitygate.wait=true' [#1072](https://github.com/ie3-institute/simona/issues/1072)
119123
- Updated `simonaAPI` to version `0.6.0` [#1080](https://github.com/ie3-institute/simona/issues/1080)
120124
- Enhanced title in `CITATION.cff` [#1088](https://github.com/ie3-institute/simona/issues/1088)
125+
- Refactor ThermalEnergyDemand definitions [#917](https://github.com/ie3-institute/simona/issues/917)
126+
- Rewrote PvModelIT from groovy to scala [#646](https://github.com/ie3-institute/simona/issues/646)
127+
- Fix negative required energy demand for thermalHouse [#1127](https://github.com/ie3-institute/simona/issues/1127)
128+
- Refactored EM messages [#1138](https://github.com/ie3-institute/simona/issues/1138)
129+
- `OperationInterval` should extend `RightOpenInterval` [#1142](https://github.com/ie3-institute/simona/issues/1142)
130+
- Enhance EmAggregate of SelfOpt to cope with other targetLimits [#1131](https://github.com/ie3-institute/simona/issues/1131)
131+
- Switched to `pureconfig` [#608](https://github.com/ie3-institute/simona/issues/608)
132+
- Removing generated methods and cleaning up in config [#1170](https://github.com/ie3-institute/simona/issues/1170)
133+
- Changed `pvInput` values in `PvInputTestData` to more realistic values [#1144](https://github.com/ie3-institute/simona/issues/1144)
134+
- Refactor `RuntimeConfig` [#1172](https://github.com/ie3-institute/simona/issues/1172)
121135
- Upgrated `scala2` to `scala3` [#53](https://github.com/ie3-institute/simona/issues/53)
122136

123137
### Fixed
@@ -163,6 +177,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163177
- Fixed SonarQube quality gate using the right link for PRs or Branches [#1061](https://github.com/ie3-institute/simona/issues/1061)
164178
- Fixed ignored EM strategy [#1091](https://github.com/ie3-institute/simona/issues/1091)
165179
- EM should output flex option results even if it has no parent [#1112](https://github.com/ie3-institute/simona/issues/1112)
180+
- Rename `PrimaryDataWithApparentPower` to `PrimaryDataWithComplexPower` [#1140](https://github.com/ie3-institute/simona/issues/1140)
181+
- Refactoring of `ThermalGrid.handleInfeed` to fix thermal storage recharge correctly when empty [#930](https://github.com/ie3-institute/simona/issues/930)
182+
- Move `ScheduleServiceActivation` out of `RegistrationResponseMessage` [#1143](https://github.com/ie3-institute/simona/issues/1143)
183+
- Check for runningHp when handling infeed to thermalGrid [#1167](https://github.com/ie3-institute/simona/issues/1167)
166184

167185
## [3.0.0] - 2023-08-07
168186

Jenkinsfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,9 @@ def determineDisplayName(String currentBranchName, String commitHash, String org
373373

374374
def publishReports(String relativeProjectDir) {
375375
// publish test reports
376-
publishHTML([allowMissing: true, alwaysLinkToLastBuild: true, escapeUnderscores: false, keepAll: true, reportDir: relativeProjectDir + '/build/reports/tests/allTests', reportFiles: 'index.html', reportName: "${relativeProjectDir}_java_tests_report", reportTitles: ''])
377376

378377
// publish scalatest reports for main project only (currently the only one with scala sources!)
379-
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, escapeUnderscores: false, keepAll: true, reportDir: relativeProjectDir + '/build/reports/tests/scalatest', reportFiles: 'index.html', reportName: "${relativeProjectDir}_scala_tests_report", reportTitles: ''])
378+
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, escapeUnderscores: false, keepAll: true, reportDir: relativeProjectDir + '/build/reports/tests/test', reportFiles: 'index.html', reportName: "${relativeProjectDir}_scala_tests_report", reportTitles: ''])
380379

381380
// publish scapegoat src report for main project only
382381
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, escapeUnderscores: false, keepAll: true, reportDir: relativeProjectDir + '/build/reports/scapegoat/src', reportFiles: 'scapegoat.html', reportName: "${relativeProjectDir}_scapegoat_src_report", reportTitles: ''])

build.gradle

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
22

33
plugins {
4-
id 'groovy' // groovy support
54
id 'java' // java support
65
id 'scala' // scala support
76
id 'signing'
@@ -13,7 +12,6 @@ plugins {
1312
id "com.github.johnrengelman.shadow" version "8.1.1" // fat jar
1413
id "org.sonarqube" version "6.0.1.5171" // sonarqube
1514
id "org.scoverage" version "8.1" // scala code coverage scoverage
16-
id "com.github.maiflai.scalatest" version "0.32" // run scalatest without specific spec task
1715
id 'org.hidetake.ssh' version '2.11.2'
1816
id 'net.thauvin.erik.gradle.semver' version '1.0.4' // semantic versioning
1917
id "application"
@@ -28,7 +26,6 @@ ext {
2826
pekkoVersion = '1.1.2'
2927
jtsVersion = '1.20.0'
3028
confluentKafkaVersion = '7.4.0'
31-
tscfgVersion = '1.2.4'
3229
scapegoatVersion = '3.1.4'
3330

3431
testContainerVersion = '0.41.8'
@@ -56,7 +53,6 @@ java {
5653

5754
apply from: scriptsLocation + 'spotless.gradle'
5855
apply from: scriptsLocation + 'checkJavaVersion.gradle'
59-
apply from: scriptsLocation + 'tscfg.gradle' // config tasks
6056
apply from: scriptsLocation + 'documentation.gradle' // documentation tasks + configuration
6157
apply from: scriptsLocation + 'tests.gradle' // tasks for tests
6258
apply from: scriptsLocation + 'sonarqube.gradle' // sonarqube config
@@ -110,13 +106,18 @@ dependencies {
110106
implementation "ch.qos.logback:logback-classic:1.5.16"
111107

112108
/* testing */
113-
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
114-
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.10.0'
115-
testImplementation 'org.mockito:mockito-core:5.15.2' // mocking framework
109+
// scalatest & junit
116110
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.19"
117-
testRuntimeOnly 'com.vladsch.flexmark:flexmark-all:0.64.8' //scalatest html output
118-
testImplementation group: 'org.pegdown', name: 'pegdown', version: '1.6.0'
119-
testImplementation "org.apache.pekko:pekko-testkit_${scalaVersion}:${pekkoVersion}" // pekko testkit
111+
testImplementation "org.junit.platform:junit-platform-launcher:1.11.4"
112+
testRuntimeOnly "org.junit.platform:junit-platform-engine:1.11.4"
113+
testRuntimeOnly "org.scalatestplus:junit-5-11_${scalaVersion}:3.2.19.0"
114+
115+
// mocking framework
116+
testImplementation 'org.mockito:mockito-core:5.15.2'
117+
testImplementation "org.scalatestplus:mockito-3-4_${scalaVersion}:3.2.10.0"
118+
119+
// pekko
120+
testImplementation "org.apache.pekko:pekko-testkit_${scalaVersion}:${pekkoVersion}"
120121
testImplementation "org.apache.pekko:pekko-actor-testkit-typed_${scalaVersion}:${pekkoVersion}"
121122

122123
// testcontainers
@@ -135,8 +136,8 @@ dependencies {
135136

136137
/* config */
137138
implementation 'com.typesafe:config:1.4.3'
138-
implementation "com.github.carueda:tscfg_2.13:$tscfgVersion"
139139
implementation "com.github.scopt:scopt_${scalaVersion}:4.1.0" // cmd args parser
140+
implementation "com.github.pureconfig:pureconfig_${scalaVersion}:0.17.8"
140141

141142
// JTS
142143
implementation ("org.locationtech.jts:jts-core:${jtsVersion}"){
@@ -159,7 +160,7 @@ dependencies {
159160
implementation 'tech.units:indriya:2.2.2' // quantities
160161
implementation "org.typelevel:squants_${scalaVersion}:1.8.3"
161162
implementation 'org.apache.commons:commons-csv:1.13.0'
162-
implementation 'org.scalanlp:breeze_2.13:2.1.0' // scientific calculations (http://www.scalanlp.org/)
163+
implementation "org.scalanlp:breeze_${scalaVersion}:2.1.0" // scientific calculations (http://www.scalanlp.org/)
163164
implementation 'de.lmu.ifi.dbs.elki:elki:0.7.5' // Statistics (for random load model)
164165
implementation 'org.jgrapht:jgrapht-core:1.5.2'
165166

@@ -210,6 +211,12 @@ tasks.withType(ScalaCompile) {
210211
"-P:scapegoat:disabledInspections:VariableShadowing",
211212
"-P:scapegoat:ignoredFiles:.*/SimonaConfig.scala" // see scapegoat-sbt page for this param
212213
]
214+
// increasing stack size required for our pureconfig configuration
215+
// see: https://github.com/pureconfig/pureconfig/issues/481#issuecomment-647760554
216+
scalaCompileOptions.forkOptions.jvmArgs = [
217+
'-Xss2m',
218+
'-XX:-UseGCOverheadLimit'
219+
]
213220
}
214221

215222
// separate scapegoat report for test classes

docs/readthedocs/_static/bibliography/bibtexAll.bib

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ @Article{Maleki.2017
1212
DOI = {10.3390/en10010134}
1313
}
1414

15-
@MISC{Itaca_Sun,
16-
author = {Itacanet},
17-
title = {The Sun As A Source Of Energy},
18-
howpublished={\url{https://www.itacanet.org/the-sun-as-a-source-of-energy/part-3-calculating-solar-angles/}}
19-
}
20-
2115
@article{Spencer.1971,
2216
added-at = {2018-06-18T21:23:34.000+0200},
2317
author = {Spencer, J. W.},
@@ -73,7 +67,7 @@ @book{Quaschning.2013
7367
author = {Quaschning, Volker},
7468
year = {2013},
7569
title = {Regenerative Energiesysteme: Technologie; Berechnung; Simulation},
76-
url = {http://ebooks.ciando.com/book/index.cfm/bok_id/471802},
70+
url = {https://www.hanser-elibrary.com/doi/book/10.3139/9783446435711},
7771
price = {39.99 EUR},
7872
address = {M{\"u}nchen},
7973
edition = {8., aktualisierte und erw. Aufl.},
@@ -92,7 +86,8 @@ @Inbook{Schoenberg.1929
9286
pages={1--280},
9387
abstract={Die ersten Versuche, Messungen der Lichtst{\"a}rke der Himmelsk{\"o}rper auszuf{\"u}hren, um auf diesem Wege Aufschl{\"u}sse {\"u}ber ihre Beschaffenheit zu erhalten, fallen in die Zeit jenes gewaltigen Aufschwungs, welchen die Optik durch die Arbeiten von Newton und Huygens am Ende des siebzehnten und zu Beginn des achtzehnten Jahrhunderts erfahren hatte. Schon Huygens1 selbst versuchte die Helligkeit des Sirius mit derjenigen der Sonne zu vergleichen, indem er das Sonnenlicht durch eine kleine {\"O}ffnung im verschlossenen Ende eines langen Rohres abschw{\"a}chte. Der schwedische Physiker Celsius2 suchte nach einem Gesetze der Lichtabnahme beleuchteter Fl{\"a}chen, doch waren seine Schlu{\ss}folgerungen, ebenso wie diejenigen von Huygens, infolge der Unzul{\"a}nglichkeit der angewandten Methoden nicht stichhaltig. Au{\ss}er der Formel der Lichtabnahme mit dem Quadrate der Entfernung besa{\ss} die Physik noch keinerlei R{\"u}stzeug an strengen Definitionen und Gesetzen und keinerlei Apparate zur Messung der Lichtst{\"a}rken. Buffon3 versuchte den Verlust zu bestimmen, den das Sonnenlicht bei Reflexion an gl{\"a}sernen Spiegeln erleidet. Aber erst die gro{\ss} angelegten Arbeiten von Pierre Bouguer4 5 (1698--1758) und Johann Heinrich Lambert (1728--1777) schufen die Grundlagen der Photometrie. In systematischer experimenteller Arbeit, die durch sinnreiche Theorien erl{\"a}utert wird, behandelt Bouguer ihre Hauptprobleme: die Absorption des Lichtes bei der Reflexion und beim Durchgang durch feste und fl{\"u}ssige K{\"o}rper sowie die diffuse Reflexion an matten Fl{\"a}chen und beim Durchgange durch tr{\"u}be Medien.},
9488
isbn={978-3-642-90703-6},
95-
doi={10.1007/978-3}
89+
doi={10.1007/978-3},
90+
url = {https://link.springer.com/chapter/10.1007/978-3-642-90703-6_1}
9691
}
9792

9893
@MISC{WikiAirMass,
@@ -122,7 +117,7 @@ @book{Iqbal.1983
122117
author = {Iqbal, Muhammad},
123118
year = {1983},
124119
title = {An Introduction To Solar Radiation},
125-
url = {http://site.ebrary.com/lib/alltitles/docDetail.action?docID=10678925},
120+
url = {https://books.google.de/books/about/An_Introduction_To_Solar_Radiation.html?id=3_qWce_mbPsC&redir_esc=y},
126121
address = {Oxford},
127122
publisher = {{Elsevier Science}},
128123
isbn = {9780123737502}
@@ -195,4 +190,19 @@ @MISC{Radiation_ECMWF
195190
author = {Robin Hogan},
196191
title = {Radiation Quantities in the ECMWF model and MARS},
197192
howpublished = {\url{https://www.ecmwf.int/sites/default/files/elibrary/2015/18490-radiation-quantities-ecmwf-model-and-mars.pdf}}
198-
}
193+
}
194+
195+
@misc{EN_50160,
196+
title = {EN 50160:2020-11, Voltage characteristics of electricity supplied by public electricity networks},
197+
publisher = {CENELEC},
198+
type = {NORM},
199+
year = {2022},
200+
date = {2022-12-01},
201+
}
202+
203+
@online{EU_2017/1485,
204+
author = {{The European Commission}},
205+
title = {COMMISSION REGULATION (EU) 2017/1485 of 2 August 2017 establishing a guideline on electricity transmission system operation},
206+
date = {2017-08-02},
207+
url = {https://eur-lex.europa.eu/legal-content/DE/TXT/?uri=CELEX%3A32017R1485},
208+
}

docs/readthedocs/config.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ Tba:
245245

246246
## Grid configuration
247247

248+
### Reference System
248249
The reference system contains a list of voltage levels. Each element includes the nominal apparent power, the nominal
249250
voltage and the separate configuration of each voltage level. The voltage level configuration is composed of the identifier
250251
and the nominal voltage.
@@ -268,6 +269,32 @@ simona.gridConfig.refSystems = [
268269
Further typical voltage levels which can be used in the simulation and the configuration of individual reference systems
269270
are described in the documentation of [reference system](models/reference_system).
270271

272+
### Voltage limits
273+
274+
The voltage limits contains a list of voltage levels. Each element includes the minimal and maximal allowed voltage and
275+
the separate configuration of each voltage level. The voltage level configuration is composed of the identifier and the
276+
nominal voltage.
277+
278+
The configuration of a voltage limits is optional. If no configuration is provided by the user, the default
279+
[voltage limits](models/voltage_limits) that includes all common german voltage levels is used. For those users
280+
who need other voltage levels than the common german voltage levels or different voltage limits, they can configure
281+
their limits as shown below.
282+
283+
The voltage limits can be configured as follows:
284+
285+
```
286+
simona.gridConfig.voltageLimits = [
287+
{vMin = 0.9, vMax = 1.1, voltLvls = [{id = "Lv", vNom = "0.4 kV"}]},
288+
{vMin = 0.9, vMax = 1.1, voltLvls = [{id = "Mv", vNom = "20 kV"}]},
289+
{vMin = 0.9, vMax = 1.1, voltLvls = [{id = "Hv", vNom = "110 kV"}]},
290+
{vMin = 0.9, vMax = 1.05, voltLvls = [{id = "EHV", vNom = "380 kV"}]},
291+
]
292+
```
293+
294+
Further typical voltage levels which can be used in the simulation and the configuration of individual voltage limits
295+
are described in the documentation of [voltage limits](models/voltage_limits).
296+
297+
271298
## Power flow configuration
272299

273300
Maximum allowed deviation in power between two sweeps, before overall convergence is assumed:

docs/readthedocs/models.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ models/three_winding_transformer_model
1717
models/reference_system
1818
models/thermal_grid_model
1919
models/thermal_house_model
20+
models/voltage_limits
2021
```
2122

2223
## System Participant Related Models

docs/readthedocs/models/pv_model.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ $$
127127
**References:**
128128

129129
* {cite:cts}`Maleki.2017`
130-
* {cite:cts}`Itaca_Sun`
130+
* {cite:cts}`Duffie.2013` p. 17 (formula 1.6.10)
131131

132132

133133
### Solar Altitude Angle
@@ -146,7 +146,7 @@ $$
146146
**References:**
147147

148148
* {cite:cts}`Maleki.2017` p. 5
149-
* {cite:cts}`Itaca_Sun`
149+
* {cite:cts}`Duffie.2013` p. 15 (formula 1.6.5) with $\sin (\alpha_s) = \cos (\theta_z)$
150150

151151

152152
### Zenith Angle
@@ -198,11 +198,11 @@ $$
198198
Calculating the air mass ratio by dividing the radius of the earth with approx. effective height of the atmosphere (each in kilometer)
199199

200200
$$
201-
airmassratio = (\frac{6371 km}{9 km}) = 707.8\overline{8}
201+
\mathrm{airmassratio} = (\frac{6371 km}{9 km}) = 707.8\overline{8}
202202
$$
203203

204204
$$
205-
airmass = \sqrt{(707.8\overline{8} \cdot \cos({\theta_z}))^2 +2 \cdot 707.8\overline{8} +1)} - 707.8\overline{8} \cdot \cos{(\theta_z)})
205+
\mathrm{airmass} = \sqrt{(707.8\overline{8} \cdot \cos({\theta_z}))^2 +2 \cdot 707.8\overline{8} +1)} - 707.8\overline{8} \cdot \cos{(\theta_z)})
206206
$$
207207

208208
**References:**
@@ -234,6 +234,8 @@ $$
234234

235235
* {cite:cts}`Zheng.2017` p. 53, formula 2.3b
236236
* {cite:cts}`Iqbal.1983`
237+
* {cite:cts}`Spencer.1971`
238+
* {cite:cts}`Duffie.2013` (the fifth ed. seems to have a typo in formula (1.4.1b): factor $0.000719$ is missing a zero)
237239

238240

239241
### Beam Radiation on Sloped Surface
@@ -274,7 +276,7 @@ b = (\cos(\phi) \cdot \cos(\delta)) \cdot (\sin(\omega_{2}) - \sin(\omega_{1}))
274276
$$
275277

276278
$$
277-
E_{beam,S} = E_{beam,H} \cdot \frac{a}{b}
279+
E_{\mathrm{beam},S} = E_{\mathrm{beam},H} \cdot \frac{a}{b}
278280
$$
279281

280282
**Please note:** $\frac{1}{180}\pi$ is omitted from these formulas, as we are already working with data in *radians*.
@@ -286,7 +288,7 @@ $$
286288
**$\omega_1$** = hour angle $\omega$\
287289
**$\omega_2$** = hour angle $\omega$ + 1 hour\
288290
**$\alpha_e$** = surface azimuth angle\
289-
**$E_{beam,H}$** = beam radiation (horizontal surface)
291+
**$E_{\mathrm{beam},H}$** = beam radiation (horizontal surface)
290292

291293
**Reference:**
292294

@@ -300,13 +302,15 @@ The diffuse radiation is computed using the Perez model, which divides the radia
300302
A cloud index is defined by
301303

302304
$$
303-
\epsilon = \frac{\frac{E_{dif,H} + E_{beam,H}}{E_{dif,H}} + 5.535 \cdot 10^{-6} \cdot \theta_{z}^3}{1 + 5.535 \cdot 10^{-6} \cdot \theta_{z}^3}
305+
\epsilon = \frac{\frac{E_{\mathrm{dif},H} + E_{\mathrm{beam},N}}{E_{\mathrm{dif},H}} + 5.535 \cdot 10^{-6} \cdot \theta_{z}^3}{1 + 5.535 \cdot 10^{-6} \cdot \theta_{z}^3}
304306
$$
305307

308+
with angle $\theta_z$ values in **degrees** ({cite:cts}`Duffie.2013` p. 94) and $E_{\mathrm{beam},N} = \frac{E_{\mathrm{beam},H}}{\cos (\theta_z)}$ ({cite:cts}`Duffie.2013` p. 95).
309+
306310
Calculating a brightness index
307311

308312
$$
309-
\Delta = m \cdot \frac{E_{dif,H}}{I_{0}}
313+
\Delta = m \cdot \frac{E_{\mathrm{dif},H}}{I_{0}}
310314
$$
311315

312316
**Perez Fij coefficients (Myers 2017):**
@@ -384,7 +388,7 @@ $$
384388
the diffuse radiation can be calculated:
385389

386390
$$
387-
E_{dif,S} = E_{dif,H} \cdot (\frac{1}{2} \cdot (1 +
391+
E_{\mathrm{dif},S} = E_{\mathrm{dif},H} \cdot (\frac{1}{2} \cdot (1 +
388392
cos(\gamma_{e})) \cdot (1- F_{1}) + \frac{a}{b} \cdot F_{1} +
389393
F_{2} \cdot \sin(\gamma_{e}))
390394
$$
@@ -396,25 +400,27 @@ $$
396400
**$\gamma_{e}$** = slope angle of the surface\
397401
**$I_{0}$** = Extraterrestrial Radiation\
398402
**$m$** = air mass\
399-
**$E_{beam,H}$** = beam radiation (horizontal surface)\
400-
**$E_{dif,H}$** = diffuse radiation (horizontal surface)
403+
**$E_{\mathrm{beam},H}$** = beam radiation (horizontal surface)\
404+
**$E_{\mathrm{beam},N}$** = beam radiation (normal incidence, thus radiation on a plane normal to the direction of the beam)\
405+
**$E_{\mathrm{dif},H}$** = diffuse radiation (horizontal surface)
401406

402407
**References:**
403408

404409
* {cite:cts}`Perez.1987`
405410
* {cite:cts}`Perez.1990`
406411
* {cite:cts}`Myers.2017` p. 96f
412+
* {cite:cts}`Duffie.2013` p. 95f
407413

408414

409415
### Reflected Radiation on Sloped Surface
410416

411417
$$
412-
E_{ref,S} = E_{Ges,H} \cdot \frac{\rho}{2} \cdot (1-
418+
E_{\mathrm{ref},S} = E_{\mathrm{Ges},H} \cdot \frac{\rho}{2} \cdot (1-
413419
\cos(\gamma_{e}))
414420
$$
415421

416422
*with*\
417-
**$E_{Ges,H}$** = total horizontal radiation ($E_{beam,H} + E_{dif,H})$\
423+
**$E_{\mathrm{Ges},H}$** = total horizontal radiation ($E_{\mathrm{beam},H} + E_{\mathrm{dif},H})$\
418424
**$\gamma_e$** = slope angle of the surface\
419425
**$\rho$** = albedo
420426

@@ -428,13 +434,13 @@ $$
428434
Received energy is calculated as the sum of all three types of irradiation.
429435

430436
$$
431-
E_{total} = E_{beam,S} + E_{dif,S} + E_{ref,S}
437+
E_{\mathrm{total}} = E_{\mathrm{beam},S} + E_{\mathrm{dif},S} + E_{\mathrm{ref},S}
432438
$$
433439

434440
*with*\
435-
**$E_{beam,S}$** = Beam radiation\
436-
**$E_{dif,S}$** = Diffuse radiation\
437-
**$E_{ref,S}$** = Reflected radiation
441+
**$E_{\mathrm{beam},S}$** = Beam radiation\
442+
**$E_{\mathrm{dif},S}$** = Diffuse radiation\
443+
**$E_{\mathrm{ref},S}$** = Reflected radiation
438444

439445
A generator correction factor (depending on month surface slope $\gamma_{e}$) and a temperature correction factor (depending on month) multiplied on top.
440446

0 commit comments

Comments
 (0)