diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
index cba71fbc58..5cd2580241 100644
--- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo
@@ -25,15 +25,15 @@ partial model PartialPVElectrical
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,30},{-100,70}})));
+ 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,-50},{-100,-10}})));
+ 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,-90},{-100,-50}})));
+ 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}})));
diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo
index 838ee4533e..4da8c94693 100644
--- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo
@@ -38,14 +38,14 @@ protected
final parameter Real TCoeVOC(unit="V/K") = dat.TCoeVOC
"Temperature coefficient for open circuit voltage, <0";
- final parameter Modelica.Units.SI.LinearTemperatureCoefficient alphaISC=dat.alphaISC
- "Normalized temperature coefficient for short circuit current, >0";
+ final parameter Modelica.Units.SI.LinearTemperatureCoefficient alphaISC=
+ dat.alphaISC "Normalized temperature coefficient for short circuit current, >0";
- final parameter Modelica.Units.SI.LinearTemperatureCoefficient betaVOC=dat.betaVOC
- "Normalized temperature coefficient for open circuit voltage, <0";
+ final parameter Modelica.Units.SI.LinearTemperatureCoefficient betaVOC=
+ dat.betaVOC "Normalized temperature coefficient for open circuit voltage, <0";
- final parameter Modelica.Units.SI.LinearTemperatureCoefficient gammaPMP=dat.gammaPMP
- "Normalized temperature coefficient for power at MPP";
+ final parameter Modelica.Units.SI.LinearTemperatureCoefficient gammaPMP=
+ dat.gammaPMP "Normalized temperature coefficient for power at MPP";
final parameter Modelica.Units.SI.Temperature TCel0 = 25.0 + 273.15
"Thermodynamic cell temperature under standard conditions";
@@ -85,7 +85,8 @@ protected
smooth=Smooth.Bezier)}), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="
-
This is a partial model for the electrical surrogate model of a photovoltaic model modeled as a single diode circuit.
+
+ This is a partial model for the electrical surrogate model of a photovoltaic model modeled as a single diode circuit.
", revisions="
-
diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo
index e2b6359ae5..1487e56beb 100644
--- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo
@@ -2,7 +2,8 @@ within IBPSA.Electrical.BaseClasses.PV.BaseClasses;
partial model PartialPVOptical
- parameter PVOptical.PVType PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
+ parameter PVOptical.PVType PVTecTyp=
+ IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
"Type of PV technology";
parameter Boolean use_Til_in = false
@@ -18,21 +19,21 @@ partial model PartialPVOptical
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.RealInput zenAng(final unit="rad", final
displayUnit="deg") "Zenith angle for object"
- annotation (Placement(transformation(extent={{-140,50},{-100,90}}),
- iconTransformation(extent={{-140,50},{-100,90}})));
+ annotation (Placement(transformation(extent={{-140,60},{-100,100}}),
+ iconTransformation(extent={{-140,60},{-100,100}})));
Modelica.Blocks.Interfaces.RealInput HGloHor(final unit="W/m2") "Global horizontal irradiation"
- annotation (Placement(transformation(extent={{-140,-30},{-100,10}}),
- iconTransformation(extent={{-140,-30},{-100,10}})));
+ annotation (Placement(transformation(extent={{-140,-20},{-100,20}}),
+ iconTransformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealInput HDifHor(final unit="W/m2") "Diffuse horizontal irradiation"
- annotation (Placement(transformation(extent={{-140,-70},{-100,-30}}),
- iconTransformation(extent={{-140,-70},{-100,-30}})));
+ annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}),
+ iconTransformation(extent={{-140,-60},{-100,-20}})));
Modelica.Blocks.Interfaces.RealInput incAng(final unit="rad", final
displayUnit="deg") "Incidence angle"
- annotation (Placement(transformation(extent={{-140,10},{-100,50}}),
- iconTransformation(extent={{-140,10},{-100,50}})));
+ annotation (Placement(transformation(extent={{-140,20},{-100,60}}),
+ iconTransformation(extent={{-140,20},{-100,60}})));
Modelica.Blocks.Interfaces.RealInput tilSet(final unit="rad") if use_Til_in
"Conditional input for tilt angle control" annotation (Placement(
- transformation(extent={{-140,-110},{-100,-70}}),
+ transformation(extent={{-140,-100},{-100,-60}}),
iconTransformation(
extent={{-140,-80},{-100,-40}})));
diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo
index abde34748f..266875212b 100644
--- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo
@@ -9,20 +9,20 @@ partial model PartialPVThermal
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.RealInput TDryBul(final unit="K", final displayUnit="degC")
"Ambient temperature (dry bulb)"
- annotation (Placement(transformation(extent={{-140,70},{-100,110}}),
- iconTransformation(extent={{-140,70},{-100,110}})));
+ annotation (Placement(transformation(extent={{-140,60},{-100,100}}),
+ iconTransformation(extent={{-140,60},{-100,100}})));
Modelica.Blocks.Interfaces.RealInput winVel(final unit="m/s")
"Wind velocity"
- annotation (Placement(transformation(extent={{-140,10},{-100,50}}),
- iconTransformation(extent={{-140,10},{-100,50}})));
+ annotation (Placement(transformation(extent={{-140,20},{-100,60}}),
+ iconTransformation(extent={{-140,20},{-100,60}})));
Modelica.Blocks.Interfaces.RealInput HGloTil(final unit="W/m2")
"Total solar irradiance on the tilted surface"
- annotation (Placement(transformation(extent={{-140,-110},{-100,-70}}),
- iconTransformation(extent={{-140,-110},{-100,-70}})));
+ annotation (Placement(transformation(extent={{-140,-100},{-100,-60}}),
+ iconTransformation(extent={{-140,-100},{-100,-60}})));
Modelica.Blocks.Interfaces.RealInput eta(final unit="1")
"Efficiency of the PV module under operating conditions"
- annotation (Placement(transformation(extent={{-140,-50},{-100,-10}}),
- iconTransformation(extent={{-140,-50},{-100,-10}})));
+ annotation (Placement(transformation(extent={{-140,-60},{-100,-20}}),
+ iconTransformation(extent={{-140,-60},{-100,-20}})));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{120,100}}), graphics={
Text(extent={{-84,-68},{0,-102}},textString= "%name"),
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
index 92884b6f42..1c400a0fcc 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo
@@ -1,5 +1,6 @@
within IBPSA.Electrical.BaseClasses.PV;
-model PVElectricalSingleDiodeMPP "Analytical 5-p model for PV I-V characteristics with temperature dependency based on 5 parameters with automatic MPP control"
+model PVElectricalSingleDiodeMPP
+ "Analytical 5-p model for PV I-V characteristics with temperature dependency based on 5 parameters with automatic MPP control"
extends
IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVElectricalSingleDiode;
@@ -55,8 +56,8 @@ equation
a_0 =VOC0*(1 - TCel0*betaVOC)/(50.1 - TCel0*alphaISC);
- w_0 =IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a_0/
- VOC0) + 1));
+ w_0 =IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(
+ exp(1/(a_0/VOC0) + 1));
R_s0 =(a_0*(w_0 - 1) - VMP0)/IMP0;
@@ -76,14 +77,19 @@ equation
R_s = R_s0;
- IPh = if absRadRat > 0 then absRadRat*(I_ph0 + TCoeISC*(TCel - TCel0)) else 0;
+ IPh = if absRadRat > 0
+ then absRadRat*(I_ph0 + TCoeISC*(TCel - TCel0))
+ else 0;
- R_sh/R_sh0 = if noEvent(absRadRat > Modelica.Constants.eps) then 1/absRadRat else 0;
+ R_sh/R_sh0 = if noEvent(absRadRat > Modelica.Constants.eps)
+ then 1/absRadRat
+ else 0;
// Simplified power correlations at MPP using Lambert W function (Batzelis et al., 2016)
- I_mp =if noEvent(absRadRat <= Modelica.Constants.eps or w <= Modelica.Constants.eps)
- then 0 else IPh*(1 - 1/w) - a*(w - 1)/R_sh;
+ I_mp =if noEvent(absRadRat <= Modelica.Constants.eps
+ or w <= Modelica.Constants.eps)
+ then 0 else IPh*(1 - 1/w) - a*(w - 1)/R_sh;
V_mp = if absRadRat <= 0 then 0 else a*(w-1)-R_s*I_mp;
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo b/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo
index 43ccc787be..a7a85e0ad4 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo
@@ -35,7 +35,8 @@ model PVOpticalAbsRat
Real incAngMod(final unit="1", min=0) "Incidence angle modifier";
- Real incAngModGro(final unit="1", min=0) "Incidence angle modifier for ground refelction";
+ Real incAngModGro(final unit="1", min=0)
+ "Incidence angle modifier for ground refelction";
Real incAngModDif(final unit="1", min=0)
"Incidence angle modifier for diffuse radiation";
@@ -73,8 +74,8 @@ model PVOpticalAbsRat
//Conditional connectors
protected
-parameter Real tau_0(final unit="1")=exp(-(glaExtCoe*glaThi))*(1 - ((refInd - 1)/(
- refInd + 1))^2)
+ parameter Real tau_0(final unit="1")=exp(-(glaExtCoe*glaThi))*
+ (1 - ((refInd - 1)/(refInd + 1))^2)
"Transmittance at standard conditions (incAng=refAng=0)";
@@ -91,36 +92,45 @@ Modelica.Constants.pi/2*0.999) then asin(sin(incAng)/refInd) else
0;
//Refraction angle that the ground-reflected irradiation is refracted by due to the glazing
-refAngGro = if noEvent(incAngGro >= Modelica.Constants.eps and incAngGro <= Modelica.Constants.pi/2*
-0.999) then asin(sin(incAngGro)/refInd) else
-0;
+refAngGro = if noEvent(incAngGro >= Modelica.Constants.eps and
+ incAngGro <= Modelica.Constants.pi/2*0.999) then
+ asin(sin(incAngGro)/refInd)
+ else
+ 0;
//Refraction angle that the diffuse irradiation is refracted by due to the glazing
refAngDif =if noEvent(airMasMod.airMasMod >= Modelica.Constants.eps and
- incAngDif <= Modelica.Constants.pi/2*0.999) then asin(sin(incAngDif)/refInd)
- else 0;
+ incAngDif <= Modelica.Constants.pi/2*0.999)
+ then asin(sin(incAngDif)/refInd)
+ else 0;
//Transmission coefficient calculated based on the incidence angle
-tau = if noEvent(incAng >= Modelica.Constants.eps and incAng <= Modelica.Constants.pi/
-2*0.999 and refAng >= Modelica.Constants.eps) then exp(-(glaExtCoe*glaThi/cos(refAng)))*(1
-- 0.5*((sin(refAng - incAng)^2)/(sin(refAng + incAng)^2) + (
-tan(refAng - incAng)^2)/(tan(refAng + incAng)^2))) else
-0;
+tau = if noEvent(incAng >= Modelica.Constants.eps and
+ incAng <= Modelica.Constants.pi/2*0.999 and
+ refAng >= Modelica.Constants.eps) then
+ exp(-(glaExtCoe*glaThi/cos(refAng)))*
+ (1- 0.5*((sin(refAng - incAng)^2)/(sin(refAng + incAng)^2) +
+ (tan(refAng - incAng)^2)/(tan(refAng + incAng)^2))) else
+ 0;
//Transmission coefficient for the ground-reflected irradiation calculated based on the incidence angle
//of the ground-reflected irradiation
-tau_gro = if noEvent(incAngGro >= Modelica.Constants.eps and refAngGro >= Modelica.Constants.eps) then exp(-(
-glaExtCoe*glaThi/cos(refAngGro)))*(1 - 0.5*((sin(refAngGro - incAngGro)^2)/
-(sin(refAngGro + incAngGro)^2) + (tan(refAngGro - incAngGro)^2)/(tan(
-refAngGro + incAngGro)^2))) else
-0;
-
-//Transmission coefficient for the diffuse irradiation calculated based on the incidence angle
-//of the diffuse irradiation
- tau_dif = if noEvent(incAngDif >= Modelica.Constants.eps and refAngDif >=
- Modelica.Constants.eps) then exp(-(glaExtCoe*glaThi/cos(refAngDif)))*(1 -
- 0.5*((sin(refAngDif - incAngDif)^2)/(sin(refAngDif + incAngDif)^2) + (tan(
- refAngDif - incAngDif)^2)/(tan(refAngDif + incAngDif)^2))) else 0;
+tau_gro = if noEvent(incAngGro >= Modelica.Constants.eps and
+ refAngGro >= Modelica.Constants.eps) then
+ exp(-(glaExtCoe*glaThi/cos(refAngGro)))*
+ (1 - 0.5*((sin(refAngGro - incAngGro)^2)/(sin(refAngGro + incAngGro)^2)
+ + (tan(refAngGro - incAngGro)^2)/(tan(refAngGro + incAngGro)^2)))
+ else 0;
+
+//Transmission coefficient for the diffuse irradiation calculated based
+//on the incidence angle of the diffuse irradiation
+ tau_dif = if noEvent(incAngDif >= Modelica.Constants.eps and
+ refAngDif >= Modelica.Constants.eps) then
+ exp(-(glaExtCoe*glaThi/cos(refAngDif)))*
+ (1 - 0.5*((sin(refAngDif - incAngDif)^2)/
+ (sin(refAngDif + incAngDif)^2) +
+ (tan(refAngDif - incAngDif)^2)/(tan(refAngDif + incAngDif)^2)))
+ else 0;
//Incidence angle modifier to account for relation of transmitted irradiation
//at operating conditions compared to standard conditions
@@ -133,29 +143,34 @@ incAngModGro = tau_gro/tau_0;
incAngModDif =tau_dif/tau_0;
//Incidence angle of the ground-reflected irradiation
-incAngGro =(90 - 0.5788*Til_in_int*180/Modelica.Constants.pi + 0.002693*(
- Til_in_int*180/Modelica.Constants.pi)^2)*Modelica.Constants.pi/180;
+incAngGro =(90 - 0.5788*Til_in_int*180/Modelica.Constants.pi +
+ 0.002693*(Til_in_int*180/Modelica.Constants.pi)^2)*
+ Modelica.Constants.pi/180;
//Incidence angle of the diffuse irradiation
-incAngDif =(59.7 - 0.1388*Til_in_int*180/Modelica.Constants.pi + 0.001497*(
- Til_in_int*180/Modelica.Constants.pi)^2)*Modelica.Constants.pi/180;
+incAngDif =(59.7 - 0.1388*Til_in_int*180/Modelica.Constants.pi +
+ 0.001497*(Til_in_int*180/Modelica.Constants.pi)^2)*
+ Modelica.Constants.pi/180;
//Geometrical relation of normal to horizontal irradiation
-R_b = if noEvent((zen >= Modelica.Constants.pi/2*0.999) or (cos(incAng)
-> cos(zen)*4)) then 4 else (cos(incAng)/cos(zen));
+R_b = if noEvent((zen >= Modelica.Constants.pi/2*0.999) or
+ (cos(incAng)> cos(zen)*4))
+ then 4
+ else (cos(incAng)/cos(zen));
HGloHor = HDirHor + HDifHor;
//Computes the absorption irradiation ratio for operating conditions following De Soto et al.
-absRadRat =if noEvent(HGloHor <= 0.1) then 0 else airMasMod.airMasMod*(HDirHor/
- HGloHor0*R_b*incAngMod + HDifHor/HGloHor0*incAngModDif*(0.5*(1 + cos(
- Til_in_int))) + HGloHor/HGloHor0*groRef*incAngModGro*(1 - cos(Til_in_int))/
- 2);
+absRadRat =if noEvent(HGloHor <= 0.1) then 0
+ else airMasMod.airMasMod*(HDirHor/HGloHor0*R_b*incAngMod
+ + HDifHor/HGloHor0*incAngModDif*(0.5*(1 + cos(
+ Til_in_int))) + HGloHor/HGloHor0*groRef*incAngModGro*
+ (1 - cos(Til_in_int))/2);
connect(airMas.airMas, airMasMod.airMas)
annotation (Line(points={{-39,70},{18,70}}, color={0,0,127}));
- connect(zenAng, airMas.zenAng) annotation (Line(points={{-120,70},{-92,70},{-92,
+ connect(zenAng, airMas.zenAng) annotation (Line(points={{-120,80},{-92,80},{-92,
70},{-62,70}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountCloseToGround.mo b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountCloseToGround.mo
index 4cb92b62d7..9fadfcd8d0 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountCloseToGround.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountCloseToGround.mo
@@ -5,10 +5,7 @@ extends IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVThermalEmp;
equation
- TCel = if noEvent(HGloTil >= Modelica.Constants.eps) then
- HGloTil*(exp(-2.98-0.0471*winVel))+(TDryBul)+HGloTil/1000*1
- else
- (TDryBul);
+ TCel = HGloTil*(exp(-2.98-0.0471*winVel))+(TDryBul)+HGloTil/1000;
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountContactToGround.mo b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountContactToGround.mo
index 6f5418f2cb..0be624df3e 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountContactToGround.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountContactToGround.mo
@@ -5,7 +5,7 @@ extends IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVThermalEmp;
equation
- TCel = if HGloTil >= 0.01 then HGloTil*(exp(-2.81-0.0455*winVel))+TDryBul else TDryBul;
+ TCel = HGloTil*(exp(-2.81-0.0455*winVel))+TDryBul;
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
diff --git a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo
index c05dc84ddf..375913354b 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo
@@ -10,9 +10,8 @@ model PVThermalEmpMountOpenRack
equation
- TCel =if noEvent(HGloTil >= Modelica.Constants.eps) then (TDryBul) + (TNOCT -
- TDryBul0)*HGloTil/HNOCT*9.5/(5.7 + 3.8*winVel)*(1 - eta/coeTranAbs) else (
- TDryBul);
+ TCel = TDryBul + (TNOCT - TDryBul0)*HGloTil/HNOCT*9.5/(5.7 + 3.8*winVel)*
+ (1 - eta/coeTranAbs);
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="
diff --git a/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo b/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo
index 04e6f95476..9df83b6264 100644
--- a/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo
+++ b/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo
@@ -6,7 +6,8 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track
replaceable parameter Data.PV.Generic dat constrainedby
IBPSA.Electrical.Data.PV.Generic "PV Panel data definition"
annotation (choicesAllMatching=true);
- parameter BaseClasses.PVOptical.PVType PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
+ parameter BaseClasses.PVOptical.PVType PVTecTyp=
+ IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI
"Type of PV technology";
parameter Integer nMod(min=1) "Amount of modules per system";
@@ -52,24 +53,24 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track
"Global irradiation on tilted surface"
annotation (Placement(transformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,-60}),
+ origin={-120,-70}),
iconTransformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,-60})));
+ origin={-120,-70})));
Modelica.Blocks.Interfaces.RealInput TDryBul(final unit="K") "Ambient dry bulb temperature"
annotation (Placement(transformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,0}),
+ origin={-120,-10}),
iconTransformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,0})));
+ origin={-120,-10})));
Modelica.Blocks.Interfaces.RealInput vWinSpe(final unit="m/s") "Wind speed" annotation (
Placement(transformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,30}), iconTransformation(
+ origin={-120,20}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,30})));
+ origin={-120,20})));
Modelica.Blocks.Interfaces.RealOutput PDC(final unit="W") "DC Power output"
annotation (Placement(transformation(extent={{100,-10},{120,10}}),
@@ -92,34 +93,36 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track
Modelica.Blocks.Interfaces.RealInput tilSet(final unit="rad") if use_Til_in
"Conditional input for tilt angle control" annotation (Placement(
transformation(extent={{20,20},{-20,-20}},
- rotation=-90,
- origin={0,-120}), iconTransformation(
+ rotation=180,
+ origin={-120,110}), iconTransformation(
extent={{20,20},{-20,-20}},
- rotation=-90,
- origin={0,-120})));
+ rotation=180,
+ origin={-120,110})));
Modelica.Blocks.Interfaces.RealInput HGloHor(final unit="W/m2")
"Global irradiation on horizontal surface" annotation (Placement(
transformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,-30}), iconTransformation(extent={{-20,-20},
+ origin={-120,-40}), iconTransformation(extent={{-20,-20},
{20,20}},
rotation=0,
- origin={-120,-30})));
+ origin={-120,-40})));
Modelica.Blocks.Interfaces.RealInput HDifHor(final unit="W/m2") if use_HDifHor
"Diffuse irradiation on horizontal surface" annotation (Placement(
transformation(extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,-90}), iconTransformation(
+ origin={-120,-100}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=0,
- origin={-120,-90})));
+ origin={-120,-100})));
Modelica.Blocks.Interfaces.RealInput incAng(final unit="rad") if use_incAng
"Incidence angle of irradiation"
- annotation (Placement(transformation(extent={{-20,-20},{20,20}}, rotation=0)));
+ annotation (Placement(transformation(extent={{-140,30},{-100,70}},
+ rotation=0)));
Modelica.Blocks.Interfaces.RealInput zenAng(final unit="rad") if use_zenAng
"Zenith angle of irradiation"
- annotation (Placement(transformation(extent={{-20,-20},{20,20}}, rotation=0)));
+ annotation (Placement(transformation(extent={{-140,60},{-100,100}},
+ rotation=0)));
protected
Modelica.Blocks.Interfaces.RealInput Til_in_int
@@ -149,6 +152,6 @@ First implementation.
"),
- Diagram(coordinateSystem(extent={{-100,-100},{100,100}})),
- Icon(coordinateSystem(extent={{-100,-100},{100,100}})));
+ Diagram(coordinateSystem(extent={{-100,-120},{100,120}})),
+ Icon(coordinateSystem(extent={{-100,-120},{100,120}})));
end PartialPVSystem;
diff --git a/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo b/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo
index 9e55ff7214..c89a989deb 100644
--- a/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo
+++ b/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo
@@ -10,36 +10,37 @@ model PVSingleDiode
final glaThi=glaThi,
final refInd=refInd),
redeclare IBPSA.Electrical.BaseClasses.PV.PVElectricalSingleDiodeMPP PVEle(
- redeclare IBPSA.Electrical.Data.PV.SingleDiodeData data=dat),
- PVThe(redeclare IBPSA.Electrical.Data.PV.SingleDiodeData data=dat),
+ redeclare IBPSA.Electrical.Data.PV.SingleDiodeData dat=dat),
+ PVThe(redeclare IBPSA.Electrical.Data.PV.SingleDiodeData dat=dat),
replaceable IBPSA.Electrical.Data.PV.SingleDiodeData dat);
equation
connect(PVEle.eta, PVThe.eta) annotation (Line(points={{-3.4,-53.75},{40,-53.75},
- {40,-20},{-72,-20},{-72,-11.8},{-17.0909,-11.8}}, color={0,0,127}));
+ {40,-20},{-72,-20},{-72,-12.4},{-17.0909,-12.4}}, color={0,0,127}));
connect(PVThe.TCel, PVEle.TCel) annotation (Line(points={{-4.54545,-10},{0,-10},
- {0,-14},{-58,-14},{-58,-46.25},{-17.2,-46.25}}, color={0,0,127}));
- connect(PVEle.P, PDC) annotation (Line(points={{-3.4,-46.25},{20,-46.25},{20,
- -40},{60,-40},{60,0},{110,0}}, color={0,0,127}));
- connect(PVOpt.absRadRat, PVEle.absRadRat) annotation (Line(points={{-4.54545,
- 30},{20,30},{20,-34},{-64,-34},{-64,-52.25},{-17.2,-52.25}}, color={0,
+ {0,-14},{-58,-14},{-58,-47},{-17.2,-47}}, color={0,0,127}));
+ connect(PVOpt.absRadRat, PVEle.absRadRat) annotation (Line(points={{-4.54545,30},
+ {20,30},{20,-34},{-64,-34},{-64,-50},{-17.2,-50}}, color={0,
0,127}));
- connect(HGloTil, PVEle.HGloTil) annotation (Line(points={{-120,-60},{-100,-60},
- {-100,-54},{-68,-54},{-68,-55.25},{-17.2,-55.25}}, color={0,0,127}));
- connect(TDryBul, PVThe.TDryBul) annotation (Line(points={{-120,0},{-60,0},{-60,
- -4.6},{-17.0909,-4.6}}, color={0,0,127}));
- connect(HGloTil, PVThe.HGloTil) annotation (Line(points={{-120,-60},{-80,-60},
- {-80,6},{-40,6},{-40,-15.4},{-17.0909,-15.4}}, color={0,0,127}));
- connect(vWinSpe, PVThe.winVel) annotation (Line(points={{-120,30},{-40,30},{-40,
- 28},{-52,28},{-52,-8.2},{-17.0909,-8.2}}, color={0,0,127}));
- connect(zenAng, PVOpt.zenAng) annotation (Line(points={{-120,90},{-44,90},{-44,
- 34.2},{-17.0909,34.2}}, color={0,0,127}));
- connect(incAng, PVOpt.incAng) annotation (Line(points={{-120,60},{-120,64},{-22,
- 64},{-22,31.8},{-17.0909,31.8}}, color={0,0,127}));
- connect(HDifHor, PVOpt.HDifHor) annotation (Line(points={{-120,-90},{-120,70},
- {-72,70},{-72,27},{-17.0909,27}}, color={0,0,127}));
- connect(HGloHor, PVOpt.HGloHor) annotation (Line(points={{-120,-30},{-20,-30},
- {-20,29.4},{-17.0909,29.4}}, color={0,0,127}));
+ connect(TDryBul, PVThe.TDryBul) annotation (Line(points={{-120,-10},{-60,-10},
+ {-60,-5.2},{-17.0909,-5.2}},
+ color={0,0,127}));
+ connect(zenAng, PVOpt.zenAng) annotation (Line(points={{-120,80},{-40,80},{-40,
+ 34.8},{-17.0909,34.8}}, color={0,0,127}));
+ connect(HGloHor, PVOpt.HGloHor) annotation (Line(points={{-120,-40},{-20,-40},
+ {-20,30},{-17.0909,30}}, color={0,0,127}));
+ connect(incAng, PVOpt.incAng) annotation (Line(points={{-120,50},{-60,50},{-60,
+ 32.4},{-17.0909,32.4}}, color={0,0,127}));
+ connect(vWinSpe, PVThe.winVel) annotation (Line(points={{-120,20},{-80,20},{-80,
+ -8},{-18,-8},{-18,-7.6},{-17.0909,-7.6}}, color={0,0,127}));
+ connect(HGloTil, PVEle.HGloTil) annotation (Line(points={{-120,-70},{-80,-70},
+ {-80,-72},{-40,-72},{-40,-53},{-17.2,-53}}, color={0,0,127}));
+ connect(HGloTil, PVThe.HGloTil) annotation (Line(points={{-120,-70},{-80,-70},
+ {-80,-18},{-17.0909,-18},{-17.0909,-14.8}}, color={0,0,127}));
+ connect(HDifHor, PVOpt.HDifHor) annotation (Line(points={{-120,-100},{-60,-100},
+ {-60,27.6},{-17.0909,27.6}}, color={0,0,127}));
+ connect(PVEle.P, PDC) annotation (Line(points={{-3.4,-46.25},{96,-46.25},{96,0},
+ {110,0}}, color={0,0,127}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="
diff --git a/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo b/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo
index 2e8110f9ca..0b88652764 100644
--- a/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo
+++ b/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo
@@ -8,7 +8,8 @@ partial model partialPVRooftopBuildingValidation
"Longitude";
parameter Modelica.Units.SI.Angle lat=0.9128072
"Latitude";
- parameter Modelica.Units.SI.Time nDay=(31+28+31+30+31+30+28)*24*3600 "Day at which simulation starts";
+ parameter Modelica.Units.SI.Time nDay=(31+28+31+30+31+30+28)*24*3600
+ "Day at which simulation starts";
parameter Modelica.Units.SI.Angle azi=27.5*Modelica.Constants.pi/180
"Surface azimuth. azi=-90 degree if surface outward unit normal points toward east; azi=0 if it points toward south";
parameter Modelica.Units.SI.Angle til=2*Modelica.Constants.pi/180
@@ -37,7 +38,7 @@ partial model partialPVRooftopBuildingValidation
BoundaryConditions.SolarIrradiation.GlobalPerezTiltedSurface HGloTil(til=til,
azi=azi,
rho=rho)
- annotation (Placement(transformation(extent={{0,40},{20,60}})));
+ annotation (Placement(transformation(extent={{0,20},{20,40}})));
Modelica.Blocks.Sources.CombiTimeTable MeaDatHGloHor(
tableOnFile=true,
@@ -117,36 +118,47 @@ partial model partialPVRooftopBuildingValidation
Modelica.Blocks.Interfaces.RealOutput TModMea(final unit="degC") "Measure module temperature"
annotation (Placement(transformation(extent={{100,-50},{120,-30}})));
- Modelica.Blocks.Interfaces.RealOutput SolHouAng(final unit="rad") "Solar hour angle"
- annotation (Placement(transformation(extent={{100,-72},{120,-52}})));
- Modelica.Blocks.Interfaces.RealOutput SolDec(final unit="rad")
- "Solar decimal angle"
- annotation (Placement(transformation(extent={{100,-90},{120,-70}})));
- Modelica.Blocks.Interfaces.RealOutput CloTim(final unit="s") "Clock time"
- annotation (Placement(transformation(extent={{100,-110},{120,-90}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughSolHouAng
+ "Pass through for solar hour angle"
+ annotation (Placement(transformation(extent={{-40,-100},{-20,-80}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughCloTim
+ "Pass through for clock time"
+ annotation (Placement(transformation(extent={{0,-100},{20,-80}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughSolDec
+ "Pass through for solar decimal angle"
+ annotation (Placement(transformation(extent={{40,-100},{60,-80}})));
equation
//Approximation of diffuse horizontal irradiation still necessary because
//the validation data does not contain this information so far
HGloHor=MeaDatHGloHor.y[1];
- solDec=SolDec;
- solHouAng=SolHouAng;
- cloTim=CloTim;
- k_t =if HGloHor <= 0.01 then 0 else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
- cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*(cos(lat)*cos(
- SolDec)*cos(SolHouAng) + sin(lat)*sin(SolDec))))))) "Factor needed for Erbs diffuse fraction relation";
+ solHouAng = realPassThroughSolHouAng.y;
+ solDec=realPassThroughSolDec.y;
+ cloTim=realPassThroughCloTim.y;
+
+ k_t =if HGloHor <= 0.01
+ then 0
+ else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
+ cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*
+ (cos(lat)*cos(solDec)*cos(solHouAng) + sin(lat)*sin(solDec)))))))
+ "Factor needed for Erbs diffuse fraction relation";
// Erbs diffuse fraction relation
- HDifHor = if HGloHor <= 0.01 then 0 elseif k_t <= 0.22 then (HGloHor)*(1.0 - 0.09
- *k_t) elseif k_t > 0.8 then (HGloHor)*0.165 else (HGloHor)*(0.9511 - 0.1604*
- k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
+ HDifHor = if HGloHor <= 0.01
+ then 0
+ elseif k_t <= 0.22
+ then (HGloHor)*(1.0 - 0.09*k_t)
+ elseif k_t > 0.8
+ then (HGloHor)*0.165
+ else (HGloHor)*
+ (0.9511 - 0.1604*k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
connect(MeaDatPVPDC.y[1], PDCMea)
annotation (Line(points={{81,-10},{96,-10},{96,0},{110,0}},
color={0,0,127}));
connect(weaDat.weaBus, HGloTil.weaBus) annotation (Line(
- points={{-40,10},{-6,10},{-6,50},{0,50}},
+ points={{-40,10},{-6,10},{-6,30},{0,30}},
color={255,204,51},
thickness=0.5));
connect(MeaDatTDryBul.y[1], from_degC.u) annotation (Line(points={{-79,-50},{
@@ -165,7 +177,7 @@ equation
color={255,204,51},
thickness=0.5));
connect(weaBus.solZen, zen.u) annotation (Line(
- points={{-40,40},{-40,-64},{-30,-64},{-30,-50},{-22,-50}},
+ points={{-39.95,40.05},{-39.95,-50},{-22,-50}},
color={255,204,51},
thickness=0.5));
connect(MeaDatTMod.y[1], TModMea)
@@ -175,16 +187,18 @@ equation
{-68,10},{-68,6.1},{-61,6.1}}, color={0,0,127}));
connect(souDifHor.y, weaDat.HDifHor_in) annotation (Line(points={{-79,-24},{-74,
-24},{-74,0.5},{-61,0.5}}, color={0,0,127}));
- connect(weaBus.solHouAng, SolHouAng) annotation (Line(
- points={{-40,40},{-40,-66},{94,-66},{94,-62},{110,-62}},
+ connect(weaBus.solHouAng, realPassThroughSolHouAng.u) annotation (Line(
+ points={{-39.95,40.05},{-39.95,-38},{-36,-38},{-36,-78},{-46,-78},{-46,-90},
+ {-42,-90}},
color={255,204,51},
thickness=0.5));
- connect(weaBus.solDec, SolDec) annotation (Line(
- points={{-40,40},{-40,-80},{110,-80}},
+ connect(weaBus.cloTim, realPassThroughCloTim.u) annotation (Line(
+ points={{-39.95,40.05},{-39.95,-76},{-12,-76},{-12,-74},{-8,-74},{-8,-90},
+ {-2,-90}},
color={255,204,51},
thickness=0.5));
- connect(weaBus.cloTim, CloTim) annotation (Line(
- points={{-40,40},{-40,-100},{110,-100}},
+ connect(weaBus.solDec, realPassThroughSolDec.u) annotation (Line(
+ points={{-39.95,40.05},{-4,40.05},{-4,44},{32,44},{32,-90},{38,-90}},
color={255,204,51},
thickness=0.5));
annotation (
diff --git a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo
index 42295fadb8..137a5594dd 100644
--- a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo
+++ b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo
@@ -14,7 +14,8 @@ model PVSingleDiodeNISTValidation
parameter Modelica.Units.SI.Angle til=10*Modelica.Constants.pi/180
"Surface tilt. til=90 degree for walls; til=0 for ceilings; til=180 for roof";
- parameter Modelica.Units.SI.Time nDay=(31+28+31+30+31+14)*24*3600 "Day at which simulation starts";
+ parameter Modelica.Units.SI.Time nDay=(31+28+31+30+31+14)*24*3600
+ "Day at which simulation starts";
parameter Real alt(final unit="m")= 0.08 "Site altitude";
@@ -38,7 +39,7 @@ model PVSingleDiodeNISTValidation
fileName=ModelicaServices.ExternalReferences.loadResource("modelica://IBPSA/Resources/Data/Electrical/DC/Sources/Validation/NIST_onemin_Roof_2016.txt"),
columns={3,5,2,4},
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
- "The PVSystem model is validaded with measurement data from: https://pvdata.nist.gov/ "
+ "The PVSystem model is validaded with measurement data from: https://pvdata.nist.gov/. 1 - Air temperature in degC, 2 - Wind speed in m/s, 3 - Global horizontal irradiance in W/m2, 4 - Ouput power in kW"
annotation (Placement(transformation(extent={{-96,-10},{-76,10}})));
PVSingleDiode pVSinDio(
@@ -49,7 +50,8 @@ model PVSingleDiodeNISTValidation
alt=alt,
til=til,
redeclare IBPSA.Electrical.BaseClasses.PV.PVThermalEmpMountCloseToGround
- PVThe) "Single-diode PV model" annotation (Placement(transformation(extent={{60,0},{80,20}})));
+ PVThe) "Single-diode PV model" annotation (Placement(transformation(extent={{60,-2},
+ {80,22}})));
Modelica.Blocks.Interfaces.RealOutput PDCSim "Simulated DC output power"
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
@@ -62,7 +64,7 @@ model PVSingleDiodeNISTValidation
til=til,
azi=azi,
rho=rho) "Global irradiation on tilted surface"
- annotation (Placement(transformation(extent={{0,40},{20,60}})));
+ annotation (Placement(transformation(extent={{20,20},{40,40}})));
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=ModelicaServices.ExternalReferences.loadResource(
"modelica://IBPSA/Resources/weatherdata/USA_MD_Baltimore-Washington.Intl.AP.724060_TMY3.mos"),
@@ -76,7 +78,7 @@ model PVSingleDiodeNISTValidation
"Number of validation day (July 28th 2023) in seconds"
annotation (Placement(transformation(extent={{-96,54},{-80,70}})));
BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
- annotation (Placement(transformation(extent={{-16,-10},{4,10}})));
+ annotation (Placement(transformation(extent={{-18,-10},{2,10}})));
Modelica.Blocks.Math.UnitConversions.From_degC from_degC "From deg C to K"
annotation (Placement(transformation(extent={{-62,-4},{-54,4}})));
Modelica.Blocks.Sources.RealExpression souDifHor(y=HDifHor)
@@ -84,40 +86,49 @@ model PVSingleDiodeNISTValidation
annotation (Placement(transformation(extent={{-78,-40},{-58,-20}})));
Modelica.Blocks.Interfaces.RealOutput PDCMea "Measured DC output power"
annotation (Placement(transformation(extent={{100,-30},{120,-10}})));
- Modelica.Blocks.Interfaces.RealOutput SolHouAng(final unit="rad") "Solar hour angle"
- annotation (Placement(transformation(extent={{100,-62},{120,-42}})));
- Modelica.Blocks.Interfaces.RealOutput SolDec(final unit="rad")
- "Solar decimal angle"
- annotation (Placement(transformation(extent={{100,-80},{120,-60}})));
- Modelica.Blocks.Interfaces.RealOutput CloTim(final unit="s") "Clock time"
- annotation (Placement(transformation(extent={{100,-100},{120,-80}})));
Modelica.Blocks.Math.Gain frokWToW(k=1000)
"From Kilowatt to Watt transformation"
annotation (Placement(transformation(extent={{72,-26},{84,-14}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughSolHouAng
+ "Pass through for solar hour angle"
+ annotation (Placement(transformation(extent={{0,80},{20,100}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughCloTim
+ "Pass through for clock time"
+ annotation (Placement(transformation(extent={{40,60},{60,80}})));
+ Modelica.Blocks.Routing.RealPassThrough realPassThroughSolDec
+ "Pass through for solar decimal angle"
+ annotation (Placement(transformation(extent={{80,40},{100,60}})));
equation
//Approximation of diffuse horizontal irradiation still necessary because
//the validation data does not contain this information so far
+ solHouAng = realPassThroughSolHouAng.y;
+ solDec=realPassThroughSolDec.y;
+ cloTim=realPassThroughCloTim.y;
HGloHor=NISTdat.y[3];
- solDec=SolDec;
- solHouAng=SolHouAng;
- cloTim=CloTim;
- k_t =if HGloHor <= 0.01 then 0 else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
- cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*(cos(lat)*cos(
- SolDec)*cos(SolHouAng) + sin(lat)*sin(SolDec)))))));
+ k_t =if HGloHor <= 0.01
+ then 0
+ else min(1, max(0, (HGloHor/(GSC*(1 + 0.033*
+ cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)*
+ (cos(lat)*cos(solDec)*cos(solHouAng) + sin(lat)*sin(solDec)))))));
// Erbs diffuse fraction relation
- HDifHor = if HGloHor <= 0.01 then 0 elseif k_t <= 0.22 then (HGloHor)*(1.0 - 0.09
- *k_t) elseif k_t > 0.8 then (HGloHor)*0.165 else (HGloHor)*(0.9511 - 0.1604*
- k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
+ HDifHor = if HGloHor <= 0.01
+ then 0
+ elseif k_t <= 0.22
+ then (HGloHor)*(1.0 - 0.09*k_t)
+ elseif k_t > 0.8
+ then (HGloHor)*0.165
+ else (HGloHor)*
+ (0.9511 - 0.1604*k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4);
connect(pVSinDio.PDC, PDCSim) annotation (Line(points={{81,10},{96,10},{96,0},
{110,0}}, color={0,0,127}));
connect(zen.y, pVSinDio.zenAng) annotation (Line(points={{21,-70},{54,-70},{54,
- 10},{70,10}}, color={0,0,127}));
+ 18},{58,18}}, color={0,0,127}));
connect(weaDat.weaBus, weaBus) annotation (Line(
- points={{-20,0},{-6,0}},
+ points={{-20,0},{-8,0}},
color={255,204,51},
thickness=0.5));
connect(NISTdat.y[1], from_degC.u)
@@ -127,42 +138,30 @@ equation
connect(NISTdat.y[2], weaDat.winSpe_in) annotation (Line(points={{-75,0},{-68,
0},{-68,-8},{-46,-8},{-46,-3.9},{-41,-3.9}}, color={0,0,127}));
connect(souDifHor.y, pVSinDio.HDifHor)
- annotation (Line(points={{-57,-30},{58,-30},{58,1}}, color={0,0,127}));
+ annotation (Line(points={{-57,-30},{58,-30},{58,0}}, color={0,0,127}));
connect(NISTdat.y[3], pVSinDio.HGloHor) annotation (Line(points={{-75,0},{-68,
- 0},{-68,-16},{32,-16},{32,7},{58,7}}, color={0,0,127}));
+ 0},{-68,-16},{32,-16},{32,6},{58,6}}, color={0,0,127}));
connect(HGloTil.H, pVSinDio.HGloTil)
- annotation (Line(points={{21,50},{32,50},{32,4},{58,4}}, color={0,0,127}));
+ annotation (Line(points={{41,30},{46,30},{46,3},{58,3}}, color={0,0,127}));
connect(weaBus, HGloTil.weaBus) annotation (Line(
- points={{-6,0},{-6,50},{0,50}},
+ points={{-8,0},{-8,30},{20,30}},
color={255,204,51},
thickness=0.5));
connect(incAng.y, pVSinDio.incAng) annotation (Line(points={{-19.2,-50},{-12,-50},
- {-12,-14},{30,-14},{30,10},{70,10}}, color={0,0,127}));
+ {-12,-14},{30,-14},{30,15},{58,15}}, color={0,0,127}));
connect(NISTdat.y[2], pVSinDio.vWinSpe) annotation (Line(points={{-75,0},{-68,
- 0},{-68,-8},{-44,-8},{-44,-16},{32,-16},{32,6},{52,6},{52,13},{58,13}},
+ 0},{-68,-8},{-44,-8},{-44,-16},{32,-16},{32,6},{52,6},{52,12},{58,12}},
color={0,0,127}));
connect(weaBus, incAng.weaBus) annotation (Line(
- points={{-6,0},{-6,-24},{-46,-24},{-46,-50},{-36,-50}},
+ points={{-8,0},{-8,-24},{-46,-24},{-46,-50},{-36,-50}},
color={255,204,51},
thickness=0.5));
connect(weaBus.solZen, zen.u) annotation (Line(
- points={{-6,0},{-6,-54},{-12,-54},{-12,-70},{-2,-70}},
- color={255,204,51},
- thickness=0.5));
- connect(weaBus.solHouAng,SolHouAng) annotation (Line(
- points={{-6,0},{-6,-52},{110,-52}},
- color={255,204,51},
- thickness=0.5));
- connect(weaBus.solDec,SolDec) annotation (Line(
- points={{-6,0},{-6,-70},{110,-70}},
- color={255,204,51},
- thickness=0.5));
- connect(weaBus.cloTim,CloTim) annotation (Line(
- points={{-6,0},{-6,-90},{110,-90}},
+ points={{-7.95,0.05},{-7.95,-54},{-12,-54},{-12,-70},{-2,-70}},
color={255,204,51},
thickness=0.5));
connect(from_degC.y, pVSinDio.TDryBul)
- annotation (Line(points={{-53.6,0},{58,0},{58,10}}, color={0,0,127}));
+ annotation (Line(points={{-53.6,0},{58,0},{58,9}}, color={0,0,127}));
connect(souDifHor.y, weaDat.HDifHor_in) annotation (Line(points={{-57,-30},{-48,
-30},{-48,-18},{-41,-18},{-41,-9.5}}, color={0,0,127}));
connect(NISTdat.y[3], weaDat.HGloHor_in) annotation (Line(points={{-75,0},{-68,
@@ -171,12 +170,20 @@ equation
annotation (Line(points={{84.6,-20},{110,-20}}, color={0,0,127}));
connect(NISTdat.y[4], frokWToW.u) annotation (Line(points={{-75,0},{-68,0},{-68,
-16},{64,-16},{64,-20},{70.8,-20}}, color={0,0,127}));
+ connect(weaBus.solHouAng, realPassThroughSolHouAng.u) annotation (Line(
+ points={{-7.95,0.05},{-7.95,84},{-8,84},{-8,90},{-2,90}},
+ color={255,204,51},
+ thickness=0.5));
+ connect(weaBus.cloTim, realPassThroughCloTim.u) annotation (Line(
+ points={{-7.95,0.05},{8,0.05},{8,70},{38,70}},
+ color={255,204,51},
+ thickness=0.5));
+ connect(weaBus.solDec, realPassThroughSolDec.u) annotation (Line(
+ points={{-7.95,0.05},{48,0.05},{48,50},{78,50}},
+ color={255,204,51},
+ thickness=0.5));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
- coordinateSystem(preserveAspectRatio=false), graphics={Text(
- extent={{-94,46},{-36,12}},
- horizontalAlignment=TextAlignment.Left,
- textString="1 - Air temperature in degC, 2 - Wind speed in m/s, 3 - Global horizontal irradiance in W/m2, 4 - Ouput power in kW",
- textColor={0,0,0})}),
+ coordinateSystem(preserveAspectRatio=false)),
experiment(
StopTime=86400,
Interval=300,