-
Notifications
You must be signed in to change notification settings - Fork 84
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
base: master
Are you sure you want to change the base?
Issue1575 add pv model #1766
Changes from all commits
929f0b7
908c77d
d15e557
25c9682
c8df97d
b695d77
e81d420
dcc6f21
22c222d
a79a5bf
fe90fad
49685fc
6bd456f
ae3bc18
5014b4d
3125854
4ae5396
fa62ded
37a30e0
58b5f7c
12993e5
df1b413
401cdd4
0a0f4f6
820eae1
2579cdb
833bef1
d60b2ee
816b1b7
155055d
517e3a7
d9f8406
af041f6
9ea6990
f521594
925b06f
df2ba25
6254c7e
bce4b43
15d0a81
90ebc30
90f072c
9166efe
d4adcca
5fbce5b
f111381
29776b3
02ab6fa
d258c34
f219b0b
325930a
e214b81
1f181ed
c89b177
3672232
70ca0d4
e2be53f
6a3f9fa
625897e
8dd66f7
5ab8483
f7684ab
cabd001
e566b29
ce39e2d
7d75bcd
5b4c1ec
2653df6
e384da3
7e6b7a4
d975428
48dfd2d
12f4d42
86a5d03
4b55574
1b0c478
a1bb920
eb5cb40
2abe874
e2b89b1
fa7d94f
d0687de
2371c0c
693b14c
58adc96
33070d7
04d3a92
1b2abcf
14d24a1
bf05c1f
2e03f1a
a5fe519
20d8593
ea42694
df01560
b3221c9
f0ea882
b29b8c5
6e263f8
9154944
be88ebc
c533d55
c582a5c
e85d6a0
69ef531
d823e3b
d532921
ac70d26
d9bc6a6
f64c567
7b635c2
32da78f
031dddd
9829c25
42a459e
56a5bf7
3dc48eb
9efb33e
3b6fe36
5004c3f
ae10ce0
c17683c
41fb9b3
85b46a4
8ab493f
e9c9b31
0100780
aa801be
5d04aad
7875491
d4fa081
9829b07
96d7d2f
84a332a
9281339
3eec2db
7ae23d9
ac01ba0
449a93d
e42bd96
5cef094
67f2ead
ac64815
9054f06
b210eb0
1443223
9f3c26b
1df4070
4b24bb7
45d7e1e
293a775
5e68913
06eff49
4591ddb
5c0078b
d2080e3
21586ef
3ef3df2
8dff789
93271a0
38ea31a
79cd13a
8a9e769
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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> | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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., & 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the exponent |
||
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., & 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., & 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; |
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>")); |
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 |
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; |
There was a problem hiding this comment.
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.