Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue1575 add pv model #1766

Open
wants to merge 163 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 132 commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
929f0b7
Add initial version of PV model structure #1575
LauraMaier Jun 13, 2022
908c77d
Adapt package order to include electrical package #1575
LauraMaier Jun 14, 2022
d15e557
Add validation and examples package #1575
LauraMaier Jun 14, 2022
25c9682
Move PV Model in base classe package #1575
LauraMaier Jun 14, 2022
c8df97d
Restructure base classes #1575
LauraMaier Jun 14, 2022
b695d77
Add first version of icons #1575
LauraMaier Jun 14, 2022
e81d420
Merge branch 'master' into issue1575_addPVModel
LauraMaier Aug 2, 2022
dcc6f21
Rename PV System model and add package #1575 [skip-ci]
LauraMaier Aug 2, 2022
22c222d
Add initial PVSystem model with single diode #1575
LauraMaier Aug 2, 2022
a79a5bf
Adapt parameterization #1575
LauraMaier Oct 7, 2022
fe90fad
Merge branch 'master' into issue1575_addPVModel
LauraMaier Oct 7, 2022
49685fc
Change electrical icon #1575
LauraMaier Oct 7, 2022
6bd456f
Add interfaces for optical PV model #1575
LauraMaier Oct 7, 2022
ae3bc18
Add horizontal to tilt angle optical PV model with fixed tilt and azi…
LauraMaier Oct 7, 2022
5014b4d
Rafactor parameters and variables to match conventions #1575
LauraMaier Oct 7, 2022
3125854
Add simlpified Lambert W function #1575
LauraMaier Oct 11, 2022
4ae5396
Add 5 p modeling approach as electrical model #1575
LauraMaier Oct 11, 2022
fa62ded
Add 5p modeling approach electrical PV submodel #1575
LauraMaier Oct 11, 2022
37a30e0
Fix typo in reflectance #1575
LauraMaier Oct 11, 2022
58b5f7c
Add first PV example model for single diode model #1575
LauraMaier Oct 11, 2022
12993e5
First version of a 2 diode electrical PV model added (with / without …
nytschgeusen Oct 11, 2022
df1b413
Implement existing structure of electrical package of Buildings libra…
LauraMaier Oct 14, 2022
401cdd4
Merge branch 'master' into issue1575_addPVModel
LauraMaier Oct 21, 2022
0a0f4f6
Correct wrong within clauses with Buildings instead of IBPSA #1575
LauraMaier Oct 21, 2022
820eae1
Replace wrong Modelica path to quasistationary electrical model #1575
LauraMaier Oct 21, 2022
2579cdb
Adapt package structure to new structure #1575
LauraMaier Oct 21, 2022
833bef1
Update package structure and add new PV package icon #1575
LauraMaier Oct 21, 2022
d60b2ee
Refactor base data definition #1575
LauraMaier Oct 21, 2022
816b1b7
Add Base Data record for Single Diode Model and and exemplary data #1575
LauraMaier Oct 21, 2022
155055d
Add general record for PV models #1575
LauraMaier Oct 21, 2022
517e3a7
Some restructuring and addition of validation model #1575
LauraMaier Oct 21, 2022
d9f8406
Add electrical models from buildings library to repo #1575
LauraMaier Nov 3, 2022
af041f6
Add simulate and plot scripts and ref results from buildings for all …
LauraMaier Nov 3, 2022
9ea6990
Add further existing electrical models from Buildings #1575
LauraMaier Nov 4, 2022
f521594
Add further mdels #1575
LauraMaier Nov 4, 2022
925b06f
Add existing reference results #1575
LauraMaier Nov 4, 2022
df2ba25
Adapt paths in existing simulate and plots scripts #1575
LauraMaier Nov 4, 2022
6254c7e
Add ,missing reference results #1575
LauraMaier Nov 4, 2022
bce4b43
Add new simulate and plot script #1575
LauraMaier Nov 4, 2022
15d0a81
Delete unintentionally pushed simulate and plot scripts #1575
LauraMaier Nov 5, 2022
90ebc30
Replace wrong paths in existing simulate and plot scripts #1575
LauraMaier Nov 5, 2022
90f072c
Add further simulate and plot scripts #1575
LauraMaier Nov 5, 2022
9166efe
Change wrong simulate and plot scripts to make them the same as in Bu…
LauraMaier Nov 5, 2022
d4adcca
Add validation NIST data for PV model #1575
LauraMaier Nov 8, 2022
5fbce5b
change paths to absolute paths #1575
LauraMaier Nov 8, 2022
f111381
Adapt file path to relative path in resources for NIST data #1575
LauraMaier Nov 8, 2022
29776b3
Rename PVSystem to PVGenerators and add simulate and plot script #1575
LauraMaier Nov 8, 2022
02ab6fa
Merge branch 'master' into issue1575_addPVModel
LauraMaier Nov 17, 2022
d258c34
Update PV Example due to external calculation of tilted global radiat…
LauraMaier Nov 17, 2022
f219b0b
Refactor and fix some documentation #1575
LauraMaier Nov 17, 2022
325930a
Restructure so that package.mo is not in one file #1575
LauraMaier Nov 17, 2022
e214b81
Merge branch 'master' into issue1575_addPVModel
LauraMaier Dec 2, 2022
1f181ed
Add image resources and delete empty BaseClass package #1575
LauraMaier Dec 2, 2022
c89b177
Adapt missing AC models in Conversion package #1575
LauraMaier Dec 2, 2022
3672232
Adapt wrong Buildings related paths in revision section and unused mo…
LauraMaier Dec 2, 2022
70ca0d4
Adapted documentation of single diode model #1575
LauraMaier Dec 5, 2022
e2be53f
Add ThreePhasesUnbalanced, docu, and rearrange packages #1575
LauraMaier Dec 6, 2022
6a3f9fa
Adapt simulate and plot scripts #1575
LauraMaier Dec 6, 2022
625897e
Add ref results for ThreePhasesUnbalanced #1575
LauraMaier Dec 8, 2022
8dd66f7
Add simulate and plot scripts #1575
LauraMaier Dec 8, 2022
5ab8483
Add wind turbines models, ref results, simulate and plot scripts #1575
LauraMaier Dec 9, 2022
f7684ab
Readjust connections, rename partials, and add final units to some ou…
LauraMaier Dec 9, 2022
cabd001
model IBPSA.Electrical.DC.Sources.PVTwoDiodes added
nytschgeusen Dec 12, 2022
e566b29
Adapt documentation and parameter types #1575
LauraMaier Jan 10, 2023
ce39e2d
Merge branch 'master' into issue1575_addPVModel
LauraMaier Jan 10, 2023
7d75bcd
Adapt html code of single-diode model #1575
LauraMaier Jan 10, 2023
5b4c1ec
Replace embedded pictures by html code in documentation #1575
LauraMaier Jan 10, 2023
2653df6
Restructure PV model so that irradiation models are external #1575
LauraMaier Jan 12, 2023
e384da3
Delete empty package in Base Classes #1575
LauraMaier Jan 12, 2023
7e6b7a4
model IBPSA.Electrical.DC.Sources.PVTwoDiodes updated
nytschgeusen Feb 14, 2023
d975428
Further improvement of system model IBPSA.Electrical.DC.Sources.Valid…
nytschgeusen Feb 14, 2023
48dfd2d
First validation data set for Rooftop PV system added
nytschgeusen Mar 30, 2023
12f4d42
Merge branch 'master' into issue1575_addPVModel
LauraMaier Apr 10, 2023
86a5d03
Adapt validation data #1575
LauraMaier Apr 10, 2023
4b55574
adding new validation data & renaming old
BreadKM May 5, 2023
1b0c478
adapting Modelica model
BreadKM May 5, 2023
a1bb920
Adapt mos scripts and add partial validation model #1575
LauraMaier May 16, 2023
eb5cb40
Update simulation interval in PV validation models #1575
LauraMaier May 16, 2023
2abe874
Spring cleaning #1575
LauraMaier May 16, 2023
e2b89b1
Delete ageing since no validation for this available #1575
LauraMaier May 16, 2023
fa7d94f
reformating of example IBPSA.Electrical.DC.Sources.Validation.PVTwoDi…
nytschgeusen Jun 4, 2023
d0687de
model IBPSA.Electrical.DC.Sources.Validation.PVTwoDiodesRooftopBuildi…
nytschgeusen Jun 4, 2023
2371c0c
Add new validation models #1575
LauraMaier Jun 7, 2023
693b14c
Adapt validation use case #1575
LauraMaier Jun 15, 2023
58adc96
Merge branch 'issue1764_add_electrical_package' into issue1575_addPVM…
LauraMaier Jun 15, 2023
33070d7
Adapt html code #1575
LauraMaier Jun 16, 2023
04d3a92
Adapt html code #1575
LauraMaier Jun 16, 2023
1b2abcf
Correct html code #1575
LauraMaier Jun 16, 2023
14d24a1
Correct html code #1575
LauraMaier Jun 16, 2023
bf05c1f
Delete unused model ref results #1575
LauraMaier Jun 16, 2023
2e03f1a
Merge branch 'master' into issue1575_addPVModel
LauraMaier Aug 13, 2023
a5fe519
Adapt parameters and validation data #1575
LauraMaier Aug 13, 2023
20d8593
Restructure PV-related packages and models #1575
LauraMaier Aug 14, 2023
ea42694
Adapt package order #1575
LauraMaier Aug 14, 2023
df01560
Adapt package order PV #1575
LauraMaier Aug 14, 2023
b3221c9
Delete Twodiodes model; breakpoint #1575
LauraMaier Aug 28, 2023
f0ea882
Add new irradiation data #1575
LauraMaier Aug 28, 2023
b29b8c5
Merge branch 'master' into issue1575_addPVModel
LauraMaier Aug 28, 2023
6e263f8
Add NIST validation and final paper status #1575
LauraMaier Aug 31, 2023
9154944
Delete two-diodes model and update package structure and reorganize g…
LauraMaier Oct 5, 2023
be88ebc
Delete unnecessary files and update syntax #1575
LauraMaier Oct 5, 2023
c533d55
Add tolerance in experimental setting #1575
LauraMaier Oct 5, 2023
c582a5c
Update package order #1575
LauraMaier Oct 5, 2023
e85d6a0
Update package order #1575
LauraMaier Oct 5, 2023
69ef531
adapt package order #1575
LauraMaier Oct 5, 2023
d823e3b
Adapt package structure in Base Classes #1575
LauraMaier Oct 5, 2023
d532921
Adapt html code #1575
LauraMaier Oct 6, 2023
ac70d26
Add and update documentation #1575
LauraMaier Oct 6, 2023
d9bc6a6
Delete line colors in text annotation #1575
LauraMaier Oct 6, 2023
f64c567
Correct BOM errors #1575
LauraMaier Oct 6, 2023
7b635c2
Update documentation #1575
LauraMaier Oct 6, 2023
32da78f
Update doc #1575
LauraMaier Oct 6, 2023
031dddd
Adapt documentation #1575
LauraMaier Oct 6, 2023
9829c25
Change encoding #1575
LauraMaier Oct 6, 2023
42a459e
Adapt comments #1575
LauraMaier Oct 6, 2023
56a5bf7
Correct comments #1575
LauraMaier Oct 6, 2023
3dc48eb
Correct comments #1575
LauraMaier Oct 6, 2023
9efb33e
Adapt comments #1575
LauraMaier Oct 6, 2023
3b6fe36
Adapt comments #1575
LauraMaier Oct 6, 2023
5004c3f
Correct comments #1575
LauraMaier Oct 6, 2023
ae10ce0
Adapt comments #1575
LauraMaier Oct 6, 2023
c17683c
Adapt comments #1575
LauraMaier Oct 6, 2023
41fb9b3
Adapt comments #1575
LauraMaier Oct 6, 2023
85b46a4
test BOM hook
LauraMaier Oct 6, 2023
8ab493f
Change BOM setting manually #1575
LauraMaier Oct 6, 2023
e9c9b31
Merge branch 'master' into issue1575_addPVModel
LauraMaier Oct 6, 2023
0100780
Add comments and do refactoring #1575
LauraMaier Oct 6, 2023
aa801be
Adapt formatting #1575
LauraMaier Oct 8, 2023
5d04aad
Reorganize PV model #1575
LauraMaier Oct 13, 2023
7875491
Adapt units and cleanup #1575
LauraMaier Oct 13, 2023
d4fa081
Delete algorithm specification #1575
LauraMaier Oct 13, 2023
9829b07
Adapt wrong Buildings paths #1575
LauraMaier Oct 17, 2023
96d7d2f
Merge branch 'master' into issue1575_addPVModel
LauraMaier Dec 12, 2023
84a332a
Replace with master file due to unintended changes #1575
LauraMaier Dec 12, 2023
9281339
Replace with master version #1575
LauraMaier Dec 12, 2023
3eec2db
HTML formatting and code formatting #1575
LauraMaier Dec 12, 2023
7ae23d9
correct html #1575
LauraMaier Dec 12, 2023
ac01ba0
Minor changes #1575
LauraMaier Dec 12, 2023
449a93d
Modify html code and delete Icon package #1575
LauraMaier Dec 14, 2023
e42bd96
Delete Icon Package #1575
LauraMaier Dec 14, 2023
5cef094
Change from BOM #1575
LauraMaier Dec 14, 2023
67f2ead
Formatted file
mwetter Jan 3, 2024
ac64815
Added citation
mwetter Jan 3, 2024
9054f06
Added citation
mwetter Jan 3, 2024
b210eb0
Removed white spaces
mwetter Jan 3, 2024
1443223
Revised documentation, fixed capitalization of image
mwetter Jan 3, 2024
9f3c26b
Removed white spaces
mwetter Jan 3, 2024
1df4070
Formatted file
mwetter Jan 3, 2024
4b24bb7
Formatted text
mwetter Jan 3, 2024
45d7e1e
Formatted text
mwetter Jan 3, 2024
293a775
Corrected html
mwetter Jan 3, 2024
5e68913
Formatted file
mwetter Jan 4, 2024
06eff49
Formatted file
mwetter Jan 4, 2024
4591ddb
Formatted file
mwetter Jan 4, 2024
5c0078b
Formatted file
mwetter Jan 4, 2024
d2080e3
Formatted file
mwetter Jan 4, 2024
21586ef
Formatted file
mwetter Jan 4, 2024
3ef3df2
Formatted file
mwetter Jan 4, 2024
8dff789
Replaced ModelicaServices
mwetter Jan 4, 2024
93271a0
Rearranged icons and lines
mwetter Jan 4, 2024
38ea31a
Formatted text
mwetter Jan 4, 2024
79cd13a
Replaced ModelicaServices
mwetter Jan 4, 2024
8a9e769
Formatted text
mwetter Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
LauraMaier marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ model ReaderTMY3HDirNor
Modelica.Utilities.Files.loadResource("modelica://IBPSA/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"),
HSou=IBPSA.BoundaryConditions.Types.RadiationDataSource.Input_HGloHor_HDifHor)
"Weather data reader with radiation data obtained from the inputs' connectors"
annotation (Placement(transformation(extent={{68,-10},{88,10}})));
annotation (Placement(transformation(extent={{68,-8},{88,12}})));
protected
Modelica.Blocks.Sources.Sine HGloHor1(
f=1/86400,
Expand All @@ -31,12 +31,13 @@ equation
{-34,6}}, color={0,0,127}));
connect(HGloHor1.y, add.u2) annotation (Line(points={{-67,-20},{-50.5,-20},{-50.5,
-6},{-34,-6}}, color={0,0,127}));
connect(add.y, weaDatInpCon.HGloHor_in) annotation (Line(points={{-11,0},{28,0},
{28,-13},{67,-13}}, color={0,0,127}));
connect(add.y, weaDatInpCon.HGloHor_in) annotation (Line(points={{-11,0},{28,
0},{28,-11},{67,-11}},
color={0,0,127}));
connect(add.y, gaiHDifHor.u) annotation (Line(points={{-11,0},{-6,0},{-6,0},{
-6,20},{-2,20}}, color={0,0,127}));
connect(gaiHDifHor.y, weaDatInpCon.HDifHor_in) annotation (Line(points={{21,20},
{21,20},{50,20},{50,-7.6},{67,-7.6}}, color={0,0,127}));
{50,20},{50,-7.5},{67,-7.5}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Tolerance=1e-06),
__Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/BoundaryConditions/WeatherData/Validation/ReaderTMY3HDirNor.mos"
"Simulate and plot"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ model ACACTransformerFull
offset=0,
height=-4000*0.8) "Load power consumption profile"
annotation (Placement(transformation(extent={{70,40},{50,60}})));
IBPSA.Electrical.AC.OnePhase.Conversion.ACACTransformerFull
tra_cc(
IBPSA.Electrical.AC.OnePhase.Conversion.ACACTransformerFull tra_cc(
VABase=4000,
R1=0.01,
L1=0.01,
Expand Down
2 changes: 1 addition & 1 deletion IBPSA/Electrical/AC/package.mo
LauraMaier marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ Added documentation.
</li>
</ul>
</html>"));
end AC;
end AC;
17 changes: 17 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/Icons/package.mo
mwetter marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses;
package Icons
annotation(Documentation(info="<html>
<p>
This package contains icons for the models in
<a href=\"modelica://IBPSA.Electrical.BaseClasses.PV.BaseClasses\">IBPSA.Electrical.BaseClasses.PV.BaseClasses</a>.
</p>
</html>",
revisions="<html>
<ul>
<li>
Oct 6, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end Icons;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
partialPVIcon
77 changes: 77 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/Icons/partialPVIcon.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses.Icons;
partial model partialPVIcon "Partial model for basic PV model icon"
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
Rectangle(extent={{-100,100},{100,-100}},
lineColor={215,215,215},fillColor={215,215,215},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-62,30},{-34,2}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-30,30},{-2,2}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{2,30},{30,2}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-62,-2},{-34,-30}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-30,-2},{-2,-30}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{2,-2},{30,-30}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-62,-34},{-34,-62}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-30,62},{-2,34}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{2,62},{30,34}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-62,62},{-34,34}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-30,-34},{-2,-62}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{2,-34},{30,-62}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-94,62},{-66,34}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-94,30},{-66,2}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-94,-2},{-66,-30}},
lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{-94,-34},{-66,-62}},
lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{34,62},{62,34}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{34,30},{62,2}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{34,-2},{62,-30}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{34,-34},{62,-62}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{66,-34},{94,-62}},lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{66,-2},{94,-30}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{66,30},{94,2}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Rectangle(extent={{66,62},{94,34}}, lineColor={0,0,255},fillColor={0,0,255},
fillPattern = FillPattern.Solid),
Text(
extent={{-150,150},{150,110}},
textString="%name",
textColor={0,0,255})}),
Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{
100,100}})),
Documentation(info="<html>
<p>
This is a partial model containing the base icon of the PV-related models.
</p>
</html>",
revisions="<html>
<ul>
<li>
Oct 6, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end partialPVIcon;
43 changes: 43 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical;
block AirMass
"Air mass calculation depening on zenith angle and height of object"
extends Modelica.Blocks.Icons.Block;
parameter Modelica.Units.SI.Height alt "Height of object";

Modelica.Blocks.Interfaces.RealInput zenAng(final unit="rad", final displayUnit="deg") "Zenith angle for object"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput airMas(final unit="1")
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
protected
Modelica.Units.SI.Angle zen "Zenith angle internal use";
equation
// Restriction for zenith angle
zen = if zenAng <= Modelica.Constants.pi/2 then
zenAng
else
Modelica.Constants.pi/2 "Zenith angle";

airMas =
exp(-0.0001184*alt)/(cos(zen) + 0.5057*(96.080 -
zen*180/Modelica.Constants.pi)^(-1.634)) "Air mass";
LauraMaier marked this conversation as resolved.
Show resolved Hide resolved

annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html><p>The model computes the air mass, which is the number of particles in the atmosphere.</br>
It bases on an exact empirical approach by Kasten et al. and bases on the zenith angle of the object as well as its height.</p>
<h4>References</h4>
<p>
Kasten, F., &amp; Young, A. T. (1989). Revised optical air mass tables and
approximation formula. Applied optics, 28(22), 4735-4738.
<a href=\"https://doi.org/10.1364/AO.28.004735\">
https://doi.org/10.1364/AO.28.004735</a>
</p></html>",
revisions="<html>
<ul>
<li>
Jan 11, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end AirMass;
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical;
block AirMassModifier
"This block computes the air mass modifier based on selected PV technology"
extends Modelica.Blocks.Icons.Block;

parameter PVType PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
"Type of PV technology";

Modelica.Blocks.Interfaces.RealInput airMas(final unit="1") "Air mass of atmosphere"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput airMasMod(final unit="1")
"Air mass modifier depending on PV technology"
annotation (Placement(transformation(extent={{100,-10},{120,10}})));

// Air mass parameters based on PV technology. Mono-Si technology as default value
protected
parameter Real b0=if PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
then 0.935823 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI
then 0.918093 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI
then 0.938110 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous
then 1.10044085 else 0.935823 "Regression parameter 0 to calculate air mass modifier";
parameter Real b1=if PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
then 0.054289 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI
then 0.086257 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI
then 0.062191 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous
then -0.06142323 else 0.054289 "Regression parameter 1 to calculate air mass modifier";
parameter Real b2=if PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
then -0.008677 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI
then -0.024459 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI
then -0.015021 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous
then -0.00442732 else -0.008677 "Regression parameter 2 to calculate air mass modifier";
parameter Real b3=if PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
then 0.000527 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI
then 0.002816 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI
then 0.001217 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous
then 0.000631504 else 0.000527 "Regression parameter 3 to calculate air mass modifier";
parameter Real b4=if PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
then -0.000011 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI
then -0.000126 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI
then -0.000034 elseif PVTecTyp == IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous
then -0.000019184 else -0.000011 "Regression parameter 4 to calculate air mass modifier";

equation

airMasMod =if (b0 + b1*(airMas^1) + b2*(airMas^2) + b3*(airMas^3) + b4*(airMas^4)) <=
0 then 0 else b0 + b1*(airMas^1) + b2*(airMas^2) + b3*(airMas^3) + b4*(
Comment on lines +45 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the exponent ^1, and use regularization which avoids a time or state event, and it makes the model having a continuous derivative (which is important for NLP).

airMas^4);

annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html><p>The model computes the air mass modifier.</br>
The air mass modifier depends on the PV technology type and is automatically parameterized.</br>
The computation results from five parameters which have been determined empirically.
The parameters are found in Fanney et al. and De Soto et al.</br>
mwetter marked this conversation as resolved.
Show resolved Hide resolved
Even though the studies find a neglible influence on the overall PV performance,
this model accounts for a change in parameters based on the selected PV technology type.</br>
The air mass modifier is used to account for a change in the absorption ratio of a PV module
compared to standard conditions.</p>
<h4>References</h4>
<p>
Fanney, A. H., Dougherty, B. P., &amp; Davis, M. W. (2003).
Short-term characterization of building integrated photovoltaic panels.
J. Sol. Energy Eng., 125(1), 13-20.
<a href=\"https://doi.org/10.1115/1.1531642\">
https://doi.org/10.1115/1.1531642</a>
</p>
<p>
De Soto, W., Klein, S. A., &amp; Beckman, W. A. (2006).
Improvement and validation of a model for photovoltaic array performance.
Solar energy, 80(1), 78-88.
<a href=\"https://doi.org/10.1016/j.solener.2005.06.010\">
https://doi.org/10.1016/j.solener.2005.06.010</a>
</p>

</html>",
revisions="<html>
<ul>
<li>
Jan 11, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end AirMassModifier;
22 changes: 22 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/PVType.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical;
type PVType = enumeration(
MonoSI
"Single-crystalline Silicon PV technology",
PolySI "Poly-crystalline Silicon PV technology",
ThinFilmSI
"Thin film Silicon PV technology",
ThreeJuncAmorphous "Three-junction amorphous PV technology")
"Enumeration to define definition of the PV technology"
annotation(Documentation(info="<html>
<p>
Enumeration to define the PV material type used in the PV models.
</p>
</html>",
revisions="<html>
<ul>
<li>
Oct 6, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
19 changes: 19 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses;
package PVOptical "Models for computing irradiance-related boundary conditions for PV systems"

LauraMaier marked this conversation as resolved.
Show resolved Hide resolved

annotation(Documentation(info="<html>
<p>
This package contains base classes that are used to construct the models extending from
<a href=\"modelica://IBPSA.Electrical.BaseClasses.PV.PVOpticalAbsRat\">IBPSA.Electrical.BaseClasses.PV.PVOpticalAbsRat</a>.
</p>
</html>",
revisions="<html>
<ul>
<li>
Oct 6, 2023, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end PVOptical;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AirMass
AirMassModifier
PVType
Loading