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 160 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
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
3 changes: 2 additions & 1 deletion IBPSA/Electrical/AC/OnePhase/Loads/Capacitive.mo
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ equation
annotation (
defaultComponentName="loa",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
-100},{100,100}}),
graphics={
Rectangle(
extent={{-80,40},{80,-40}},
lineColor={0,0,0},
Expand Down
3 changes: 2 additions & 1 deletion IBPSA/Electrical/AC/ThreePhasesBalanced/Loads/Capacitive.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ model Capacitive "Model of a capacitive and resistive load"
annotation (
defaultComponentName="loa",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
-100},{100,100}}),
graphics={
Rectangle(
extent={{-80,80},{80,-80}},
lineColor={0,0,0},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ equation
color={0,120,120},
smooth=Smooth.None));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
-100},{100,100}}),
graphics={
Text(
extent={{-60,100},{60,80}},
textColor={0,0,0},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ equation
color={127,0,127},
smooth=Smooth.None));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={Text(
-100},{100,100}}),
graphics={Text(
extent={{-80,80},{0,74}},
textColor={0,0,0},
pattern=LinePattern.Dash,
Expand Down
45 changes: 45 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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";

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

The air mass is not equal to the number of particles in the atmosphere.

It is based on an exact empirical approach by Kasten et al. and bases on the zenith angle of the object as well as its height.
Copy link
Contributor

Choose a reason for hiding this comment

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

The approach is either empirical (which is here the case) or exact, but not both.

</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,93 @@
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.</p>
<p>
The air mass modifier depends on the PV technology type and is automatically parameterized.
</p>
<p>
The computation results from five parameters which have been determined empirically.
The parameters are found in Fanney et al. 2003 and De Soto et al. 2006.
</p>
<p>
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.
</p>
<p>
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;
20 changes: 20 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/PVType.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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"
extends Modelica.Icons.Package;

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
99 changes: 99 additions & 0 deletions IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
within IBPSA.Electrical.BaseClasses.PV.BaseClasses;
partial model PartialPVElectrical
"Partial electrical model for PV module model"

replaceable parameter Data.PV.Generic dat constrainedby
IBPSA.Electrical.Data.PV.Generic "PV Panel data definition"
annotation (choicesAllMatching);

// Adjustable parameters

parameter Integer nMod "Number of connected PV modules";

final parameter Modelica.Units.SI.Area AMod=dat.AMod
"Area of one module (housing)";

final parameter Integer nSer=dat.nSer
"Number of cells connected in series on the PV panel";

final parameter Integer nPar=dat.nPar
"Number of parallel connected cells within the PV module";

final parameter Modelica.Units.SI.Energy Eg0 = dat.Eg0
"Band gap energy under standard conditions";

Modelica.Units.SI.ElectricCurrent IPh "Photo current";
Modelica.Blocks.Interfaces.RealInput TCel(final unit="K",final displayUnit="degC")
"Cell temperature"
annotation (Placement(transformation(extent={{-140,20},{-100,60}})));

public
Modelica.Blocks.Interfaces.RealInput absRadRat(final unit="1")
"Ratio of absorbed radiation under operating conditions to standard conditions"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealInput HGloTil(final unit="W/m2")
"Total solar irradiance on the tilted surface"
annotation (Placement(transformation(extent={{-140,-60},{-100,-20}})));
Modelica.Blocks.Interfaces.RealOutput eta(final unit="1")
"Efficiency of the PV module under operating conditions"
annotation (Placement(transformation(extent={{100,-60},{120,-40}})));
Modelica.Blocks.Interfaces.RealOutput P(final unit="W")
"DC power output"
annotation (Placement(transformation(extent={{100,40},{120,60}})));

protected
final constant Real e(unit = "C") = Modelica.Constants.F/Modelica.Constants.N_A
"Elementary charge";
final constant Real k(unit = "J/K") = Modelica.Constants.R/Modelica.Constants.N_A
"Boltzmann constant";

annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},
{100,100}}),
graphics={
Rectangle(
lineColor={0,0,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
extent={{-100,100},{100,-100}}),
Line(
points={{-66,-64},{-66,88}},
color={0,0,0},
arrow={Arrow.None,Arrow.Filled},
thickness=0.5),
Line(
points={{-66,-64},{64,-64}},
color={0,0,0},
arrow={Arrow.None,Arrow.Filled},
thickness=0.5),
Text(
extent={{-72,80},{-102,68}},
lineThickness=0.5,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="I"),
Text(
extent={{80,-80},{50,-92}},
lineThickness=0.5,
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
textString="U"),
Line(
points={{-66,54},{-66,54},{-6,54},{12,50},{22,42},{32,28},{38,8},{
42,-14},{44,-44},{44,-64}},
color={0,0,0},
thickness=0.5,
smooth=Smooth.Bezier)}), Diagram(
coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})),
Documentation(info="<html>
<p>
This is a partial model for the electrical surrogate models of a photovoltaic module.
</p>
</html>", revisions="<html>
<ul>
<li>
Nov 17, 2022, by Laura Maier:<br/>
First implementation.
</li>
</ul>
</html>"));
end PartialPVElectrical;
Loading