diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo index 1d540af10f..5eb7b13b55 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo @@ -15,11 +15,11 @@ equation zen = if zenAng <= Modelica.Constants.pi/2 then zenAng else - Modelica.Constants.pi/2; + Modelica.Constants.pi/2 "Zenith angle"; airMas = exp(-0.0001184*alt)/(cos(zen) + 0.5057*(96.080 - - zen*180/Modelica.Constants.pi)^(-1.634)); + zen*180/Modelica.Constants.pi)^(-1.634)) "Air mass"; annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)), diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo index b425f20676..2c7801b04c 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo @@ -3,8 +3,8 @@ block AirMassModifier "This block computes the air mass modifier based on selected PV technology" extends Modelica.Blocks.Icons.Block; - parameter IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType PVTechType=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType. - MonoSI "Type of PV technology"; + 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}}))); @@ -14,43 +14,37 @@ block AirMassModifier // Air mass parameters based on PV technology. Mono-Si technology as default value protected -parameter Real b_0= - if PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI then 0.935823 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI then 0.918093 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI then 0.938110 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous then 1.10044085 - else 0.935823; -parameter Real b_1= - if PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI then 0.054289 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI then 0.086257 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI then 0.062191 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous then -0.06142323 - else 0.054289; -parameter Real b_2= - if PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI then -0.008677 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI then -0.024459 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI then -0.015021 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous then -0.00442732 - else -0.008677; -parameter Real b_3= - if PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI then 0.000527 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI then 0.002816 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI then 0.001217 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous then 0.000631504 - else 0.000527; -parameter Real b_4= - if PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI then -0.000011 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.PolySI then -0.000126 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI then -0.000034 - elseif PVTechType ==IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThreeJuncAmorphous then -0.000019184 - else -0.000011; + 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 (b_0 + b_1*(airMas^1) + b_2*(airMas^2) + b_3*( -airMas^3) + b_4*(airMas^4)) <= 0 then -0 else -b_0 + b_1*(airMas^1) + b_2*(airMas^2) + b_3*(airMas^3) + b_4*(airMas^4); +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*( + airMas^4); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)), diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo index a1d8d377d3..cba71fbc58 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectrical.mo @@ -2,29 +2,27 @@ within IBPSA.Electrical.BaseClasses.PV.BaseClasses; partial model PartialPVElectrical "Partial electrical model for PV module model" - replaceable parameter IBPSA.Electrical.Data.PV.Generic data constrainedby + replaceable parameter Data.PV.Generic dat constrainedby IBPSA.Electrical.Data.PV.Generic "PV Panel data definition" annotation (choicesAllMatching); // Adjustable parameters - parameter Integer n_mod "Number of connected PV modules"; + parameter Integer nMod "Number of connected PV modules"; - final parameter Modelica.Units.SI.Area A_mod=data.A_mod + final parameter Modelica.Units.SI.Area AMod=dat.AMod "Area of one module (housing)"; - final parameter Integer n_ser=data.n_ser + final parameter Integer nSer=dat.nSer "Number of cells connected in series on the PV panel"; - final parameter Integer n_par = data.n_par + final parameter Integer nPar=dat.nPar "Number of parallel connected cells within the PV module"; - final parameter Real Eg0( - unit = "eV") = data.Eg0 + final parameter Real Eg0(unit="eV") = dat.Eg0 "Band gap energy under standard conditions"; - Modelica.Units.SI.ElectricCurrent I_ph - "Photo current"; + 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}}))); diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo index 0c6d09853a..838ee4533e 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVElectricalSingleDiode.mo @@ -2,49 +2,49 @@ within IBPSA.Electrical.BaseClasses.PV.BaseClasses; partial model PartialPVElectricalSingleDiode "Partial electrical model for PV module model following the single diode approach" extends IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVElectrical( - redeclare IBPSA.Electrical.Data.PV.SingleDiodeData data); + redeclare IBPSA.Electrical.Data.PV.SingleDiodeData dat); - replaceable parameter IBPSA.Electrical.Data.PV.SingleDiodeData data + replaceable parameter Data.PV.SingleDiodeData dat constrainedby IBPSA.Electrical.Data.PV.SingleDiodeData "PV Panel data definition" annotation (choicesAllMatching); // Parameters from module data sheet protected - final parameter Modelica.Units.SI.Efficiency eta_0=data.eta_0 + final parameter Modelica.Units.SI.Efficiency eta0=dat.eta0 "Efficiency under standard conditions"; - final parameter Modelica.Units.SI.Area A_pan=data.A_pan + final parameter Modelica.Units.SI.Area APan=dat.APan "Area of one Panel, must not be confused with area of the whole module"; - final parameter Modelica.Units.SI.Voltage V_oc0=data.V_oc0 + final parameter Modelica.Units.SI.Voltage VOC0=dat.VOC0 "Open circuit voltage under standard conditions"; - final parameter Modelica.Units.SI.ElectricCurrent I_sc0=data.I_sc0 + final parameter Modelica.Units.SI.ElectricCurrent ISC0=dat.ISC0 "Short circuit current under standard conditions"; - final parameter Modelica.Units.SI.Voltage V_mp0=data.V_mp0 + final parameter Modelica.Units.SI.Voltage VMP0=dat.VMP0 "MPP voltage under standard conditions"; - final parameter Modelica.Units.SI.ElectricCurrent I_mp0=data.I_mp0 + final parameter Modelica.Units.SI.ElectricCurrent IMP0=dat.IMP0 "MPP current under standard conditions"; - final parameter Modelica.Units.SI.Power P_Max=data.P_mp0*1.05 + final parameter Modelica.Units.SI.Power PMax=dat.PMP0*1.05 "Maximal power of one PV module under standard conditions. P_MPP with 5 perc tolerance. This is used to limit DCOutputPower."; - final parameter Real TCoeff_Isc(unit = "A/K")=data.TCoeff_Isc - "Temperature coefficient for short circuit current, >0"; + final parameter Real TCoeISC(unit="A/K") = dat.TCoeISC + "Temperature coefficient for short circuit current, >0"; - final parameter Real TCoeff_Voc(unit = "V/K")=data.TCoeff_Voc - "Temperature coefficient for open circuit voltage, <0"; + final parameter Real TCoeVOC(unit="V/K") = dat.TCoeVOC + "Temperature coefficient for open circuit voltage, <0"; - final parameter Modelica.Units.SI.LinearTemperatureCoefficient alpha_Isc=data.alpha_Isc + final parameter Modelica.Units.SI.LinearTemperatureCoefficient alphaISC=dat.alphaISC "Normalized temperature coefficient for short circuit current, >0"; - final parameter Modelica.Units.SI.LinearTemperatureCoefficient beta_Voc=data.beta_Voc + final parameter Modelica.Units.SI.LinearTemperatureCoefficient betaVOC=dat.betaVOC "Normalized temperature coefficient for open circuit voltage, <0"; - final parameter Modelica.Units.SI.LinearTemperatureCoefficient gamma_Pmp=data.gamma_Pmp + 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 diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo index f1f57de0ee..e2b6359ae5 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVOptical.mo @@ -2,8 +2,7 @@ within IBPSA.Electrical.BaseClasses.PV.BaseClasses; partial model PartialPVOptical - parameter BaseClasses.PVOptical.PVType PVTechType= - 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 @@ -38,14 +37,14 @@ Modelica.Blocks.Interfaces.RealInput tilSet(final unit="rad") if use_Til_in extent={{-140,-80},{-100,-40}}))); protected - Modelica.Blocks.Interfaces.RealInput Til_in_internal - "Needed to connect to conditional tilt connector"; + Modelica.Blocks.Interfaces.RealInput Til_in_int + "Needed to connect to conditional tilt connector"; equation - connect(tilSet, Til_in_internal); + connect(tilSet, Til_in_int); if not use_Til_in then - Til_in_internal = til; + Til_in_int = til; end if; annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo index 6d95875aca..abde34748f 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermal.mo @@ -1,9 +1,8 @@ within IBPSA.Electrical.BaseClasses.PV.BaseClasses; partial model PartialPVThermal "Partial model for computing the cell temperature of a PV moduleConnector for PV record data" - replaceable parameter IBPSA.Electrical.Data.PV.Generic data constrainedby - IBPSA.Electrical.Data.PV.Generic - "PV Panel data definition" + replaceable parameter Data.PV.Generic dat constrainedby + IBPSA.Electrical.Data.PV.Generic "PV Panel data definition" annotation (choicesAllMatching); Modelica.Blocks.Interfaces.RealOutput TCel(final unit="K", final displayUnit="degC") "Cell temperature" diff --git a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermalEmp.mo b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermalEmp.mo index c0d5bf3aa3..f02d6e82af 100644 --- a/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermalEmp.mo +++ b/IBPSA/Electrical/BaseClasses/PV/BaseClasses/PartialPVThermalEmp.mo @@ -3,7 +3,7 @@ partial model PartialPVThermalEmp "Empirical thermal models for PV cells to calculate cell temperature" extends IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVThermal; - final parameter Modelica.Units.SI.Temperature T_NOCT=data.T_NOCT + final parameter Modelica.Units.SI.Temperature TNOCT=dat.TNOCT "Cell temperature under NOCT conditions"; final parameter Modelica.Units.SI.Irradiance HNOCT= 800 diff --git a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo index cb2cea2e58..92884b6f42 100644 --- a/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo +++ b/IBPSA/Electrical/BaseClasses/PV/PVElectricalSingleDiodeMPP.mo @@ -25,7 +25,8 @@ model PVElectricalSingleDiodeMPP "Analytical 5-p model for PV I-V characteristic constant Real q(unit = "C")= 1.602176620924561e-19 "Elementary charge"; - Modelica.Units.SI.ElectricCurrent I_mp(start=0.5*I_mp0) "MPP current at operating conditions"; + Modelica.Units.SI.ElectricCurrent I_mp(start=0.5*IMP0) + "MPP current at operating conditions"; Modelica.Units.SI.Voltage V_mp "MPP voltage at operating conditions"; @@ -52,17 +53,18 @@ equation // Analytical parameter extraction equations under standard conditions (Batzelis et al., 2016) - a_0 = V_oc0*(1-TCel0*beta_Voc)/(50.1-TCel0*alpha_Isc); + a_0 =VOC0*(1 - TCel0*betaVOC)/(50.1 - TCel0*alphaISC); - w_0 = IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a_0/V_oc0) + 1)); + w_0 =IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a_0/ + VOC0) + 1)); - R_s0 = (a_0*(w_0-1)-V_mp0)/I_mp0; + R_s0 =(a_0*(w_0 - 1) - VMP0)/IMP0; - R_sh0 = a_0*(w_0-1)/(I_sc0*(1-1/w_0)-I_mp0); + R_sh0 =a_0*(w_0 - 1)/(ISC0*(1 - 1/w_0) - IMP0); - I_ph0 = (1+R_s0/R_sh0)*I_sc0; + I_ph0 =(1 + R_s0/R_sh0)*ISC0; - I_s0 = I_ph0*exp(-1/(a_0/V_oc0)); + I_s0 =I_ph0*exp(-1/(a_0/VOC0)); // Parameter extrapolation equations to operating conditions (DeSoto et al., 2006) @@ -70,22 +72,23 @@ equation I_s/I_s0 = (TCel/TCel0)^3*exp(1/k*(Eg0*q/TCel0-Eg/TCel)); - Eg/(Eg0*q) = 1-data.C*(TCel-TCel0); + Eg/(Eg0*q) =1 - dat.C*(TCel - TCel0); R_s = R_s0; - I_ph = if absRadRat > 0 then absRadRat*(I_ph0+TCoeff_Isc*(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; // 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 I_ph*(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; - V_oc = if I_ph >= Modelica.Constants.eps*10 then a*log(abs((I_ph/I_s+1))) else 0; + V_oc =if IPh >= Modelica.Constants.eps*10 then a*log(abs((IPh/I_s + 1))) + else 0; w = if noEvent(V_oc >= Modelica.Constants.eps) then IBPSA.Electrical.BaseClasses.PV.BaseClasses.lambertWSimple(exp(1/(a/V_oc) @@ -95,11 +98,11 @@ equation // Efficiency and Performance eta=if noEvent(HGloTil <= Modelica.Constants.eps*10) then 0 else P_mod/( - HGloTil*A_pan); + HGloTil*APan); P_mod = V_mp*I_mp; - P=max(0, min(P_Max*n_mod, P_mod*n_mod)); + P=max(0, min(PMax*nMod, P_mod*nMod)); annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-80}, {100,80}})), Diagram( diff --git a/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo b/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo index ccc7f7693c..43ccc787be 100644 --- a/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo +++ b/IBPSA/Electrical/BaseClasses/PV/PVOpticalAbsRat.mo @@ -53,18 +53,18 @@ model PVOpticalAbsRat Real tau_gro(final unit="1", min=0) "Transmittance of the cover system for ground reflection"; - Real tau_diff(final unit="1", min=0) - "Transmittance of the cover system for diffuse radiation"; + Real tau_dif(final unit="1", min=0) + "Transmittance of the cover system for diffuse radiation"; Real R_b(final unit="1", min=0) "Ratio of irradiance on tilted surface to horizontal surface"; Modelica.Units.SI.Angle zen "Zenith angle"; - BaseClasses.PVOptical.AirMass airMass(final alt=alt) "Air mass computation" + BaseClasses.PVOptical.AirMass airMas(final alt=alt) "Air mass computation" annotation (Placement(transformation(extent={{-60,60},{-40,80}}))); - BaseClasses.PVOptical.AirMassModifier airMassModifier(final PVTechType= - PVTechType) "Air mass modifier computation depending on PV type" + BaseClasses.PVOptical.AirMassModifier airMasMod(final PVTecTyp=PVTecTyp) + "Air mass modifier computation depending on PV type" annotation (Placement(transformation(extent={{20,60},{40,80}}))); Modelica.Blocks.Interfaces.RealOutput absRadRat(final unit="1") "Ratio of absorbed radiation under operating conditions to standard conditions" @@ -96,9 +96,9 @@ refAngGro = if noEvent(incAngGro >= Modelica.Constants.eps and incAngGro <= Mode 0; //Refraction angle that the diffuse irradiation is refracted by due to the glazing -refAngDif = if noEvent(airMassModifier.airMasMod >= Modelica.Constants.eps and incAngDif <= Modelica.Constants.pi/2* -0.999) then asin(sin(incAngDif)/refInd) else -0; +refAngDif =if noEvent(airMasMod.airMasMod >= Modelica.Constants.eps and + 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/ @@ -117,11 +117,10 @@ refAngGro + incAngGro)^2))) else //Transmission coefficient for the diffuse irradiation calculated based on the incidence angle //of the diffuse irradiation -tau_diff = 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_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 @@ -131,15 +130,15 @@ incAngMod = tau/tau_0; incAngModGro = tau_gro/tau_0; //For the diffuse irradiation -incAngModDif = tau_diff/tau_0; +incAngModDif =tau_dif/tau_0; //Incidence angle of the ground-reflected irradiation -incAngGro = (90 - 0.5788*Til_in_internal*180/Modelica.Constants.pi + 0.002693*(Til_in_internal*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_internal*180/Modelica.Constants.pi + 0.001497*(Til_in_internal*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) @@ -149,17 +148,15 @@ 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 - airMassModifier.airMasMod*(HDirHor/HGloHor0*R_b*incAngMod - +HDifHor/HGloHor0*incAngModDif*(0.5*(1+cos(Til_in_internal))) - +HGloHor/HGloHor0*groRef*incAngModGro*(1-cos(Til_in_internal))/2); - - connect(airMass.airMas, airMassModifier.airMas) annotation (Line(points={{-39,70}, - {18,70}}, color={0,0,127})); - connect(zenAng, airMass.zenAng) - annotation (Line(points={{-120,70},{-92,70},{-92,70},{-62,70}}, - color={0,0,127})); +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, + 70},{-62,70}}, color={0,0,127})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)), Documentation(info=" diff --git a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo index c9931d1241..c05dc84ddf 100644 --- a/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo +++ b/IBPSA/Electrical/BaseClasses/PV/PVThermalEmpMountOpenRack.mo @@ -5,14 +5,14 @@ model PVThermalEmpMountOpenRack final parameter Modelica.Units.SI.Temperature TDryBul0=293.15 "Reference ambient temperature"; - final parameter Real coeff_trans_abs = 0.9 - "Module specific coefficient as a product of transmission and absorption. It is usually unknown and set to 0.9 in literature"; + final parameter Real coeTranAbs=0.9 + "Module specific coefficient as a product of transmission and absorption. It is usually unknown and set to 0.9 in literature"; equation - TCel =if noEvent(HGloTil >= Modelica.Constants.eps) then (TDryBul) + (T_NOCT - - TDryBul0)*HGloTil/HNOCT*9.5/(5.7 + 3.8*winVel)*(1 - eta/coeff_trans_abs) - else (TDryBul); + 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); 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 2b4f6143df..04e6f95476 100644 --- a/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo +++ b/IBPSA/Electrical/BaseClasses/PV/PartialPVSystem.mo @@ -3,15 +3,13 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track extends IBPSA.Electrical.BaseClasses.PV.BaseClasses.Icons.partialPVIcon; - replaceable parameter IBPSA.Electrical.Data.PV.Generic data constrainedby + replaceable parameter Data.PV.Generic dat constrainedby IBPSA.Electrical.Data.PV.Generic "PV Panel data definition" annotation (choicesAllMatching=true); - parameter BaseClasses.PVOptical.PVType PVTechType= - 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 n_mod(min=1) - "Amount of modules per system"; + parameter Integer nMod(min=1) "Amount of modules per system"; parameter Real groRef(unit="1")=0.2 "Ground reflectance" @@ -76,22 +74,19 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track Modelica.Blocks.Interfaces.RealOutput PDC(final unit="W") "DC Power output" annotation (Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(extent={{100,-10},{120,10}}))); - replaceable IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVOptical PVOptical( - final use_Til_in = use_Til_in, - final PVTechType=PVTechType) - "Model with optical characteristics" - annotation (Placement(transformation(extent={{-16,24},{-4,36}}))); - replaceable IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVThermal PVThermal - "Model with thermal characteristics" + replaceable BaseClasses.PartialPVOptical PVOpt(final use_Til_in=use_Til_in, + final PVTecTyp=PVTecTyp) "Model with optical characteristics" + annotation (Placement(transformation(extent={{-16,24},{-4,36}}))); + replaceable BaseClasses.PartialPVThermal PVThe + "Model with thermal characteristics" annotation ( choicesAllMatching=true, Dialog(tab="Module mounting and specifications"), - Placement(transformation(extent={{-16,-16},{-4,-4}}))); + Placement(transformation(extent={{-16,-16},{-4,-4}}))); - replaceable IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVElectrical PVElectrical( - final n_mod=n_mod) - "Model with electrical characteristics" - annotation (Placement(transformation(extent={{-16,-56},{-4,-44}}))); + replaceable BaseClasses.PartialPVElectrical PVEle(final nMod=nMod) + "Model with electrical characteristics" + annotation (Placement(transformation(extent={{-16,-56},{-4,-44}}))); //Conditional connectors Modelica.Blocks.Interfaces.RealInput tilSet(final unit="rad") if use_Til_in @@ -119,32 +114,23 @@ partial model PartialPVSystem "Base PV model with internal or external MPP track extent={{-20,-20},{20,20}}, rotation=0, origin={-120,-90}))); - Modelica.Blocks.Interfaces.RealInput incAngle(final unit="rad") if use_incAng + 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, - origin={-120,60}), - iconTransformation(extent={{-20,-20},{20,20}}, - rotation=0, - origin={-120,60}))); - Modelica.Blocks.Interfaces.RealInput zenAngle(final unit="rad") if use_zenAng "Zenith angle of irradiation" - annotation (Placement(transformation(extent={{-20,-20},{20,20}}, - rotation=0, - origin={-120,90}), - iconTransformation(extent={{-20,-20},{20,20}}, - rotation=0, - origin={-120,90}))); + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, 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))); protected - Modelica.Blocks.Interfaces.RealInput Til_in_internal - "Needed to connect to conditional tilt connector"; + Modelica.Blocks.Interfaces.RealInput Til_in_int + "Needed to connect to conditional tilt connector"; equation - connect(tilSet, Til_in_internal); - connect(PVOptical.tilSet, Til_in_internal); + connect(tilSet, Til_in_int); + connect(PVOpt.tilSet, Til_in_int); if not use_Til_in then - Til_in_internal = til; + Til_in_int = til; end if; annotation(Documentation(info="
diff --git a/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo b/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo index b8566fb46a..9e55ff7214 100644 --- a/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo +++ b/IBPSA/Electrical/DC/Sources/PVSingleDiode.mo @@ -1,52 +1,45 @@ -within IBPSA.Electrical.DC.Sources; +within IBPSA.Electrical.DC.Sources; model PVSingleDiode "Photovoltaic module model based on single diode approach" extends IBPSA.Electrical.BaseClasses.PV.PartialPVSystem( - replaceable IBPSA.Electrical.Data.PV.SingleDiodeData data, - redeclare IBPSA.Electrical.BaseClasses.PV.PVOpticalAbsRat - PVOptical( - final alt=alt, - final til=til, - final groRef=groRef, - final glaExtCoe=glaExtCoe, - final glaThi=glaThi, - final refInd=refInd), - redeclare IBPSA.Electrical.BaseClasses.PV.PVElectricalSingleDiodeMPP - PVElectrical(redeclare IBPSA.Electrical.Data.PV.SingleDiodeData - data=data), - replaceable IBPSA.Electrical.BaseClasses.PV.BaseClasses.PartialPVThermalEmp - PVThermal( - redeclare IBPSA.Electrical.Data.PV.SingleDiodeData data=data)); + redeclare IBPSA.Electrical.BaseClasses.PV.PVOpticalAbsRat PVOpt( + final alt=alt, + final til=til, + final groRef=groRef, + final glaExtCoe=glaExtCoe, + 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), + replaceable IBPSA.Electrical.Data.PV.SingleDiodeData dat); equation - connect(PVElectrical.eta, PVThermal.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})); - connect(PVThermal.TCel, PVElectrical.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(PVElectrical.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(PVOptical.absRadRat, PVElectrical.absRadRat) annotation (Line(points={{-4.54545,30},{20,30},{20,-34},{-64,-34},{-64,-52.25}, - {-17.2,-52.25}},color={0,0,127})); - connect(HGloTil, PVElectrical.HGloTil) annotation (Line(points={{-120,-60},{-100, - -60},{-100,-54},{-68,-54},{-68,-55.25},{-17.2,-55.25}}, color={0, + 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})); + 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,127})); - connect(TDryBul, PVThermal.TDryBul) annotation (Line(points={{-120,0},{-60,0}, - {-60,-4.6},{-17.0909,-4.6}}, color={0,0,127})); - connect(HGloTil, PVThermal.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, PVThermal.winVel) annotation (Line(points={{-120,30},{-40,30}, - {-40,28},{-52,28},{-52,-8.2},{-17.0909,-8.2}}, color={0,0,127})); - connect(zenAngle, PVOptical.zenAng) annotation (Line(points={{-120,90},{-44,90}, - {-44,34.2},{-17.0909,34.2}}, color={0,0,127})); - connect(incAngle, PVOptical.incAng) annotation (Line(points={{-120,60},{-120,64}, - {-22,64},{-22,31.8},{-17.0909,31.8}}, color={0,0,127})); - connect(HDifHor, PVOptical.HDifHor) annotation (Line(points={{-120,-90},{-120, - 70},{-72,70},{-72,27},{-17.0909,27}}, color={0,0,127})); - connect(HGloHor, PVOptical.HGloHor) annotation (Line(points={{-120,-30},{-20,-30}, - {-20,29.4},{-17.0909,29.4}}, 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})); 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 c10f9819a1..2e8110f9ca 100644 --- a/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo +++ b/IBPSA/Electrical/DC/Sources/Validation/BaseClasses/partialPVRooftopBuildingValidation.mo @@ -17,17 +17,16 @@ partial model partialPVRooftopBuildingValidation parameter Real rho=0.2 "Ground reflectance"; - constant Real G_sc( + constant Real GSC( final quantity="Irradiance", - final unit = "W/m2") = 1376 - "Solar constant"; + final unit="W/m2") = 1376 "Solar constant"; - Modelica.Units.SI.Irradiance HGloHor; - Modelica.Units.SI.Irradiance HGloHorDif; + Modelica.Units.SI.Irradiance HGloHor "Global horizontal irradiation"; + Modelica.Units.SI.Irradiance HDifHor "Diffuse horizontal irradiation"; Real k_t(final unit="1", start=0.5) "Clearness index"; - Modelica.Units.SI.Angle solDec; - Modelica.Units.SI.Angle solHouAng; - Modelica.Units.SI.Time cloTim; + Modelica.Units.SI.Angle solDec "Solar decimal angle"; + Modelica.Units.SI.Angle solHouAng "Solar hour angle"; + Modelica.Units.SI.Time cloTim "Clock time"; Modelica.Blocks.Interfaces.RealOutput PDCSim(final unit="W") "Simulated DC output power" @@ -84,7 +83,8 @@ partial model partialPVRooftopBuildingValidation "This file contains the DC power output of two selected modules. The PVSystem model is validaded with measurement data from Rooftop building: http://www.solar-rooftop.de." annotation (Placement(transformation(extent={{60,-20},{80,0}}))); - Modelica.Blocks.Sources.RealExpression souGloHorDif(y=HGloHorDif) + Modelica.Blocks.Sources.RealExpression souDifHor(y=HDifHor) + "Source for diffuse horizontal irradiation" annotation (Placement(transformation(extent={{-100,-34},{-80,-14}}))); BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=ModelicaServices.ExternalReferences.loadResource( @@ -94,7 +94,7 @@ partial model partialPVRooftopBuildingValidation HSou=IBPSA.BoundaryConditions.Types.RadiationDataSource.Input_HGloHor_HDifHor) annotation (Placement(transformation(extent={{-60,0},{-40,20}}))); - Modelica.Blocks.Math.UnitConversions.From_degC from_degC + Modelica.Blocks.Math.UnitConversions.From_degC from_degC "From degC to K" annotation (Placement(transformation(extent={{-60,-60},{-40,-40}}))); Modelica.Blocks.Sources.Constant sounDay(k=nDay) "Number of validation day (July 28th 2023) in seconds" @@ -103,7 +103,7 @@ partial model partialPVRooftopBuildingValidation annotation (Placement(transformation(extent={{0,-20},{20,0}}))); BoundaryConditions.WeatherData.Bus weaBus "Weather data bus" annotation (Placement(transformation(extent={{-50,30},{-30,50}}))); - Modelica.Blocks.Routing.RealPassThrough zen + Modelica.Blocks.Routing.RealPassThrough zen "Zenith angle" annotation (Placement(transformation(extent={{-20,-60},{0,-40}}))); Modelica.Blocks.Sources.CombiTimeTable MeaDatTMod( tableOnFile=true, @@ -133,19 +133,14 @@ equation solHouAng=SolHouAng; cloTim=CloTim; - k_t = if HGloHor <= 0.01 then 0 else min(1, max(0, (HGloHor/(G_sc* - (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))))))) "Factor needed for Erbs diffuse fraction relation"; // Erbs diffuse fraction relation - HGloHorDif = 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}}, @@ -178,8 +173,8 @@ equation color={0,0,127})); connect(MeaDatWinAngSpe.y[2], weaDat.winSpe_in) annotation (Line(points={{-79,10}, {-68,10},{-68,6.1},{-61,6.1}}, color={0,0,127})); - connect(souGloHorDif.y, weaDat.HDifHor_in) annotation (Line(points={{-79,-24}, - {-74,-24},{-74,0.5},{-61,0.5}}, 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}}, color={255,204,51}, diff --git a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo index 068aa060a1..42295fadb8 100644 --- a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo +++ b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeNISTValidation.mo @@ -21,19 +21,18 @@ model PVSingleDiodeNISTValidation parameter Real rho=0.2 "Ground reflectance"; - constant Real G_sc( + constant Real GSC( final quantity="Irradiance", - final unit = "W/m2") = 1376 - "Solar constant"; + final unit="W/m2") = 1376 "Solar constant"; - Modelica.Units.SI.Irradiance HGloHor; - Modelica.Units.SI.Irradiance HGloHorDif; + Modelica.Units.SI.Irradiance HGloHor "Global horizontal irradiation"; + Modelica.Units.SI.Irradiance HDifHor "Diffuse horizontal irradiation"; Real k_t(final unit="1", start=0.5) "Clearness index"; - Modelica.Units.SI.Angle solDec; - Modelica.Units.SI.Angle solHouAng; - Modelica.Units.SI.Time cloTim; + Modelica.Units.SI.Angle solDec "Solar decimal angle"; + Modelica.Units.SI.Angle solHouAng "Solar hour angle"; + Modelica.Units.SI.Time cloTim "Clock time"; - Modelica.Blocks.Sources.CombiTimeTable NISTdata( + Modelica.Blocks.Sources.CombiTimeTable NISTdat( tableOnFile=true, tableName="Roof2016", fileName=ModelicaServices.ExternalReferences.loadResource("modelica://IBPSA/Resources/Data/Electrical/DC/Sources/Validation/NIST_onemin_Roof_2016.txt"), @@ -42,28 +41,27 @@ model PVSingleDiodeNISTValidation "The PVSystem model is validaded with measurement data from: https://pvdata.nist.gov/ " annotation (Placement(transformation(extent={{-96,-10},{-76,10}}))); - PVSingleDiode pVSingleDiode( - redeclare IBPSA.Electrical.Data.PV.SingleDiodeSharpNUU235F2 data, - PVTechType=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI, - n_mod=312, + PVSingleDiode pVSinDio( + redeclare IBPSA.Electrical.Data.PV.SingleDiodeSharpNUU235F2 dat, + PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.MonoSI, + nMod=312, groRef=rho, alt=alt, til=til, redeclare IBPSA.Electrical.BaseClasses.PV.PVThermalEmpMountCloseToGround - PVThermal) - annotation (Placement(transformation(extent={{60,0},{80,20}}))); + PVThe) "Single-diode PV model" annotation (Placement(transformation(extent={{60,0},{80,20}}))); Modelica.Blocks.Interfaces.RealOutput PDCSim "Simulated DC output power" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); - BoundaryConditions.SolarGeometry.IncidenceAngle incAng(azi=azi, til=til) + BoundaryConditions.SolarGeometry.IncidenceAngle incAng(azi=azi, til=til) "Incidence angle" annotation (Placement(transformation(extent={{-36,-58},{-20,-42}}))); - Modelica.Blocks.Routing.RealPassThrough zen + Modelica.Blocks.Routing.RealPassThrough zen "Zenith angle" annotation (Placement(transformation(extent={{0,-80},{20,-60}}))); BoundaryConditions.SolarIrradiation.GlobalPerezTiltedSurface HGloTil( H(start=100), til=til, azi=azi, - rho=rho) + rho=rho) "Global irradiation on tilted surface" annotation (Placement(transformation(extent={{0,40},{20,60}}))); BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=ModelicaServices.ExternalReferences.loadResource( @@ -71,7 +69,7 @@ model PVSingleDiodeNISTValidation computeWetBulbTemperature=false, TDryBulSou=IBPSA.BoundaryConditions.Types.DataSource.Input, winSpeSou=IBPSA.BoundaryConditions.Types.DataSource.Input, - HSou=IBPSA.BoundaryConditions.Types.RadiationDataSource.Input_HGloHor_HDifHor) + HSou=IBPSA.BoundaryConditions.Types.RadiationDataSource.Input_HGloHor_HDifHor) "Weather data reader" annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); Modelica.Blocks.Sources.Constant sounDay(k=nDay) @@ -79,9 +77,10 @@ model PVSingleDiodeNISTValidation annotation (Placement(transformation(extent={{-96,54},{-80,70}}))); BoundaryConditions.WeatherData.Bus weaBus "Weather data bus" annotation (Placement(transformation(extent={{-16,-10},{4,10}}))); - Modelica.Blocks.Math.UnitConversions.From_degC from_degC + 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 souGloHorDif(y=HGloHorDif) + Modelica.Blocks.Sources.RealExpression souDifHor(y=HDifHor) + "Source for diffuse horizontal irradiation" 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}}))); @@ -92,7 +91,7 @@ model PVSingleDiodeNISTValidation 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 frokW_toW(k=1000) + Modelica.Blocks.Math.Gain frokWToW(k=1000) "From Kilowatt to Watt transformation" annotation (Placement(transformation(extent={{72,-26},{84,-14}}))); equation @@ -100,56 +99,48 @@ equation //Approximation of diffuse horizontal irradiation still necessary because //the validation data does not contain this information so far - HGloHor=NISTdata.y[3]; + HGloHor=NISTdat.y[3]; solDec=SolDec; solHouAng=SolHouAng; cloTim=CloTim; - k_t = if HGloHor <= 0.01 then 0 else min(1, max(0, (HGloHor/(G_sc* - (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 - HGloHorDif = 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(pVSingleDiode.PDC, PDCSim) - annotation (Line(points={{81,10},{96,10},{96,0},{110,0}}, - color={0,0,127})); - connect(zen.y, pVSingleDiode.zenAngle) annotation (Line(points={{21,-70},{54, - -70},{54,19},{58,19}}, - color={0,0,127})); + 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})); connect(weaDat.weaBus, weaBus) annotation (Line( points={{-20,0},{-6,0}}, color={255,204,51}, thickness=0.5)); - connect(NISTdata.y[1], from_degC.u) + connect(NISTdat.y[1], from_degC.u) annotation (Line(points={{-75,0},{-62.8,0}}, color={0,0,127})); connect(from_degC.y, weaDat.TDryBul_in) annotation (Line(points={{-53.6,0},{-46, 0},{-46,9},{-41,9}}, color={0,0,127})); - connect(NISTdata.y[2], weaDat.winSpe_in) annotation (Line(points={{-75,0},{-68, + 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(souGloHorDif.y, pVSingleDiode.HDifHor) + connect(souDifHor.y, pVSinDio.HDifHor) annotation (Line(points={{-57,-30},{58,-30},{58,1}}, color={0,0,127})); - connect(NISTdata.y[3], pVSingleDiode.HGloHor) annotation (Line(points={{-75,0}, - {-68,0},{-68,-16},{32,-16},{32,7},{58,7}}, color={0,0,127})); - connect(HGloTil.H, pVSingleDiode.HGloTil) + 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})); + connect(HGloTil.H, pVSinDio.HGloTil) annotation (Line(points={{21,50},{32,50},{32,4},{58,4}}, color={0,0,127})); connect(weaBus, HGloTil.weaBus) annotation (Line( points={{-6,0},{-6,50},{0,50}}, color={255,204,51}, thickness=0.5)); - connect(incAng.y, pVSingleDiode.incAngle) annotation (Line(points={{-19.2,-50}, - {-12,-50},{-12,-14},{30,-14},{30,16},{58,16}}, color={0,0,127})); - connect(NISTdata.y[2], pVSingleDiode.vWinSpe) annotation (Line(points={{-75,0}, - {-68,0},{-68,-8},{-44,-8},{-44,-16},{32,-16},{32,6},{52,6},{52,13},{ - 58,13}}, - color={0,0,127})); + 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})); + 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}}, + color={0,0,127})); connect(weaBus, incAng.weaBus) annotation (Line( points={{-6,0},{-6,-24},{-46,-24},{-46,-50},{-36,-50}}, color={255,204,51}, @@ -170,16 +161,16 @@ equation points={{-6,0},{-6,-90},{110,-90}}, color={255,204,51}, thickness=0.5)); - connect(from_degC.y, pVSingleDiode.TDryBul) + connect(from_degC.y, pVSinDio.TDryBul) annotation (Line(points={{-53.6,0},{58,0},{58,10}}, color={0,0,127})); - connect(souGloHorDif.y, weaDat.HDifHor_in) annotation (Line(points={{-57,-30}, - {-48,-30},{-48,-18},{-41,-18},{-41,-9.5}}, color={0,0,127})); - connect(NISTdata.y[3], weaDat.HGloHor_in) annotation (Line(points={{-75,0},{-68, + 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, 0},{-68,-13},{-41,-13}}, color={0,0,127})); - connect(frokW_toW.y, PDCMea) + connect(frokWToW.y, PDCMea) annotation (Line(points={{84.6,-20},{110,-20}}, color={0,0,127})); - connect(NISTdata.y[4], frokW_toW.u) annotation (Line(points={{-75,0},{-68,0}, - {-68,-16},{64,-16},{64,-20},{70.8,-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})); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false), graphics={Text( extent={{-94,46},{-36,12}}, diff --git a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeRooftopBuildingValidation.mo b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeRooftopBuildingValidation.mo index f77146204f..5573de8aeb 100644 --- a/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeRooftopBuildingValidation.mo +++ b/IBPSA/Electrical/DC/Sources/Validation/PVSingleDiodeRooftopBuildingValidation.mo @@ -6,75 +6,71 @@ model PVSingleDiodeRooftopBuildingValidation HGloTil(H(start=100))); extends Modelica.Icons.Example; - IBPSA.Electrical.DC.Sources.PVSingleDiode pVSystem1Diode115Wp( - PVTechType=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI, + PVSingleDiode pVSys1Dio115Wp( + PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI, use_Til_in=false, til(displayUnit="rad") = til, - n_mod=2, - redeclare IBPSA.Electrical.Data.PV.SingleDiodeSolibroSL2CIGS115 data, + nMod=2, + redeclare IBPSA.Electrical.Data.PV.SingleDiodeSolibroSL2CIGS115 dat, groRef=rho, alt=0.08, redeclare IBPSA.Electrical.BaseClasses.PV.PVThermalEmpMountCloseToGround - PVThermal) "PV modules with a peak power of 115 Wp" + PVThe) "PV modules with a peak power of 115 Wp" annotation (Placement(transformation(extent={{60,20},{80,40}}))); - PVSingleDiode pVSystem1Diode120Wp( - PVTechType=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI, + PVSingleDiode pVSys1Dio120Wp( + PVTecTyp=IBPSA.Electrical.BaseClasses.PV.BaseClasses.PVOptical.PVType.ThinFilmSI, use_Til_in=false, til(displayUnit="rad") = til, - n_mod=4, - redeclare IBPSA.Electrical.Data.PV.SingleDiodeSolibroSL2CIGS120 data, + nMod=4, + redeclare IBPSA.Electrical.Data.PV.SingleDiodeSolibroSL2CIGS120 dat, groRef=rho, alt=0.08, redeclare IBPSA.Electrical.BaseClasses.PV.PVThermalEmpMountCloseToGround - PVThermal) "PV modules with a peak power of 120 Wp" + PVThe) "PV modules with a peak power of 120 Wp" annotation (Placement(transformation(extent={{60,60},{80,80}}))); - Modelica.Blocks.Math.Add add + Modelica.Blocks.Math.Add add "Adds both module DC power outputs" annotation (Placement(transformation(extent={{86,24},{96,34}}))); equation - connect(HGloTil.H, pVSystem1Diode115Wp.HGloTil) annotation (Line(points={{21,50}, - {50,50},{50,24},{58,24}}, color={0,0,127})); - connect(MeaDatHGloHor.y[1], pVSystem1Diode115Wp.HGloHor) annotation (Line( - points={{-79,-90},{-16,-90},{-16,-84},{44,-84},{44,27},{58,27}}, color={ - 0,0,127})); - connect(from_degC.y, pVSystem1Diode115Wp.TDryBul) annotation (Line(points={{-39, - -50},{-34,-50},{-34,26},{46,26},{46,30},{58,30}}, color={0,0,127})); - connect(MeaDatWinAngSpe.y[2], pVSystem1Diode115Wp.vWinSpe) annotation (Line( - points={{-79,10},{-68,10},{-68,84},{46,84},{46,33},{58,33}}, color={0,0, - 127})); + connect(HGloTil.H, pVSys1Dio115Wp.HGloTil) annotation (Line(points={{21,50},{50, + 50},{50,24},{58,24}}, color={0,0,127})); + connect(MeaDatHGloHor.y[1], pVSys1Dio115Wp.HGloHor) annotation (Line(points={{ + -79,-90},{-16,-90},{-16,-84},{44,-84},{44,27},{58,27}}, color={0,0,127})); + connect(from_degC.y, pVSys1Dio115Wp.TDryBul) annotation (Line(points={{-39,-50}, + {-34,-50},{-34,26},{46,26},{46,30},{58,30}}, color={0,0,127})); + connect(MeaDatWinAngSpe.y[2], pVSys1Dio115Wp.vWinSpe) annotation (Line(points= + {{-79,10},{-68,10},{-68,84},{46,84},{46,33},{58,33}}, color={0,0,127})); connect(add.y, PDCSim) annotation (Line(points={{96.5,29},{96.5,30},{110,30}}, color={0,0,127})); - connect(pVSystem1Diode120Wp.PDC, add.u1) + connect(pVSys1Dio120Wp.PDC, add.u1) annotation (Line(points={{81,70},{85,70},{85,32}}, color={0,0,127})); - connect(pVSystem1Diode115Wp.PDC, add.u2) + connect(pVSys1Dio115Wp.PDC, add.u2) annotation (Line(points={{81,30},{81,26},{85,26}}, color={0,0,127})); - connect(zen.y, pVSystem1Diode120Wp.zenAngle) annotation (Line(points={{1,-50}, - {14,-50},{14,-22},{34,-22},{34,38},{52,38},{52,79},{58,79}}, color={0, + connect(zen.y, pVSys1Dio120Wp.zenAng) annotation (Line(points={{1,-50},{14,-50}, + {14,-22},{34,-22},{34,38},{52,38},{52,70},{70,70}}, color={0,0,127})); + connect(incAng.y, pVSys1Dio120Wp.incAng) annotation (Line(points={{21,-10},{52, + -10},{52,70},{70,70}}, color={0,0,127})); + connect(MeaDatWinAngSpe.y[2], pVSys1Dio120Wp.vWinSpe) annotation (Line(points= + {{-79,10},{-68,10},{-68,84},{46,84},{46,73},{58,73}}, color={0,0,127})); + connect(from_degC.y, pVSys1Dio120Wp.TDryBul) annotation (Line(points={{-39,-50}, + {-34,-50},{-34,26},{46,26},{46,30},{52,30},{52,70},{58,70}}, color={0, 0,127})); - connect(incAng.y, pVSystem1Diode120Wp.incAngle) annotation (Line(points={{21,-10}, - {52,-10},{52,76},{58,76}}, color={0,0,127})); - connect(MeaDatWinAngSpe.y[2], pVSystem1Diode120Wp.vWinSpe) annotation (Line( - points={{-79,10},{-68,10},{-68,84},{46,84},{46,73},{58,73}}, color={0,0, - 127})); - connect(from_degC.y, pVSystem1Diode120Wp.TDryBul) annotation (Line(points={{-39, - -50},{-34,-50},{-34,26},{46,26},{46,30},{52,30},{52,70},{58,70}}, - color={0,0,127})); - connect(MeaDatHGloHor.y[1], pVSystem1Diode120Wp.HGloHor) annotation (Line( - points={{-79,-90},{-16,-90},{-16,-84},{44,-84},{44,26},{52,26},{52,67},{ - 58,67}}, color={0,0,127})); - connect(HGloTil.H, pVSystem1Diode120Wp.HGloTil) annotation (Line(points={{21,50}, - {50,50},{50,64},{58,64}}, color={0,0,127})); - connect(souGloHorDif.y, pVSystem1Diode120Wp.HDifHor) annotation (Line(points={ - {-79,-24},{-74,-24},{-74,88},{-66,88},{-66,76},{54,76},{54,61},{58,61}}, - color={0,0,127})); - connect(incAng.y, pVSystem1Diode115Wp.incAngle) annotation (Line(points={{21,-10}, - {52,-10},{52,36},{58,36}}, color={0,0,127})); - connect(zen.y, pVSystem1Diode115Wp.zenAngle) annotation (Line(points={{1,-50}, - {14,-50},{14,-22},{34,-22},{34,39},{58,39}}, color={0,0,127})); - connect(souGloHorDif.y, pVSystem1Diode115Wp.HDifHor) annotation (Line(points={ - {-79,-24},{-74,-24},{-74,88},{-66,88},{-66,76},{54,76},{54,21},{58,21}}, + connect(MeaDatHGloHor.y[1], pVSys1Dio120Wp.HGloHor) annotation (Line(points={{ + -79,-90},{-16,-90},{-16,-84},{44,-84},{44,26},{52,26},{52,67},{58,67}}, color={0,0,127})); + connect(HGloTil.H, pVSys1Dio120Wp.HGloTil) annotation (Line(points={{21,50},{50, + 50},{50,64},{58,64}}, color={0,0,127})); + connect(souDifHor.y, pVSys1Dio120Wp.HDifHor) annotation (Line(points={{-79,-24}, + {-74,-24},{-74,88},{-66,88},{-66,76},{54,76},{54,61},{58,61}}, color= + {0,0,127})); + connect(incAng.y, pVSys1Dio115Wp.incAng) annotation (Line(points={{21,-10},{52, + -10},{52,30},{70,30}}, color={0,0,127})); + connect(zen.y, pVSys1Dio115Wp.zenAng) annotation (Line(points={{1,-50},{14,-50}, + {14,-22},{34,-22},{34,30},{70,30}}, color={0,0,127})); + connect(souDifHor.y, pVSys1Dio115Wp.HDifHor) annotation (Line(points={{-79,-24}, + {-74,-24},{-74,88},{-66,88},{-66,76},{54,76},{54,21},{58,21}}, color= + {0,0,127})); annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{100, 100}})), diff --git a/IBPSA/Electrical/Data/PV/Generic.mo b/IBPSA/Electrical/Data/PV/Generic.mo index d0f8bfe364..a27e703ffc 100644 --- a/IBPSA/Electrical/Data/PV/Generic.mo +++ b/IBPSA/Electrical/Data/PV/Generic.mo @@ -2,21 +2,19 @@ within IBPSA.Electrical.Data.PV; record Generic "Basic record of a PV cell" extends Modelica.Icons.Record; - parameter Integer n_ser - "Number of cells connected in series on the PV panel" + parameter Integer nSer "Number of cells connected in series on the PV panel" annotation(Dialog(group="General")); - parameter Integer n_par - "Number of parallel cell circuits on the PV panel" + parameter Integer nPar "Number of parallel cell circuits on the PV panel" annotation(Dialog(group="General")); - parameter Modelica.Units.SI.Area A_cel - "Area of a single cell. If not found in data sheet, use A_cel = ((V_mp0*I_mp0)/(1000*eta_0))/n_ser" + parameter Modelica.Units.SI.Area ACel + "Area of a single cell. If not found in data sheet, use ACel = ((V_mp0*I_mp0)/(1000*eta_0))/n_ser" annotation (Dialog(group="Cell specific: Geometrical data")); - parameter Modelica.Units.SI.Area A_pan=A_cel*n_ser*n_par + parameter Modelica.Units.SI.Area APan=ACel*nSer*nPar "Area of one Panel, must not be confused with area of the whole module" annotation (Dialog(group="Cell specific: Geometrical data")); - parameter Modelica.Units.SI.Area A_mod "Area of one module (housing)" + parameter Modelica.Units.SI.Area AMod "Area of one module (housing)" annotation (Dialog(group="Cell specific: Geometrical data")); - parameter Modelica.Units.SI.Temperature T_NOCT + parameter Modelica.Units.SI.Temperature TNOCT "Cell temperature under NOCT conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); parameter Real Eg0(unit = "eV") diff --git a/IBPSA/Electrical/Data/PV/SingleDiodeData.mo b/IBPSA/Electrical/Data/PV/SingleDiodeData.mo index 7a5742f20f..aa05a52d8d 100644 --- a/IBPSA/Electrical/Data/PV/SingleDiodeData.mo +++ b/IBPSA/Electrical/Data/PV/SingleDiodeData.mo @@ -4,40 +4,38 @@ record SingleDiodeData extends Modelica.Icons.Record; extends IBPSA.Electrical.Data.PV.Generic; - parameter Modelica.Units.SI.Efficiency eta_0 + parameter Modelica.Units.SI.Efficiency eta0 "Efficiency under standard conditions. If not found in data sheet, use eta_0 = ((V_mp0*I_mp0)/(1000*A_cel*n_ser))" annotation (Dialog(group="General")); - parameter Modelica.Units.SI.ElectricCurrent I_mp0 + parameter Modelica.Units.SI.ElectricCurrent IMP0 "MPP current under standard conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.Power P_mp0 + parameter Modelica.Units.SI.Power PMP0 "MPP power of one PV module under standard conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Real TCoeff_Isc(unit = "A/K") + parameter Real TCoeISC(unit="A/K") "Temperature coefficient for short circuit current, >0. If not found in data sheet, use TCoeff_Isc=alpha_Isc*I_sc0 and type in alpha_Isc manually" annotation(Dialog(group="Cell specific: Electrical characteristics")); - parameter Real TCoeff_Voc(unit = "V/K") + parameter Real TCoeVOC(unit="V/K") "Temperature coefficient for open circuit voltage, <0. If not found in data sheet, use TCoeff_Voc=beta_Voc*V_oc0 and type in beta_Voc manually" annotation(Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.LinearTemperatureCoefficient alpha_Isc= - TCoeff_Isc/I_sc0 - "Normalized temperature coefficient for short circuit current, >0" + parameter Modelica.Units.SI.LinearTemperatureCoefficient alphaISC=TCoeISC/ + ISC0 "Normalized temperature coefficient for short circuit current, >0" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.LinearTemperatureCoefficient beta_Voc=TCoeff_Voc/ - V_oc0 + parameter Modelica.Units.SI.LinearTemperatureCoefficient betaVOC=TCoeVOC/VOC0 "Normalized temperature coefficient for open circuit voltage, <0" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.LinearTemperatureCoefficient gamma_Pmp + parameter Modelica.Units.SI.LinearTemperatureCoefficient gammaPMP "Normalized temperature coefficient for power at MPP" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.Voltage V_oc0 + parameter Modelica.Units.SI.Voltage VOC0 "Open circuit voltage under standard conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.ElectricCurrent I_sc0 + parameter Modelica.Units.SI.ElectricCurrent ISC0 "Short circuit current under standard conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); - parameter Modelica.Units.SI.Voltage V_mp0 + parameter Modelica.Units.SI.Voltage VMP0 "MPP voltage under standard conditions" annotation (Dialog(group="Cell specific: Electrical characteristics")); parameter Real C diff --git a/IBPSA/Electrical/Data/PV/SingleDiodeSharpNUU235F2.mo b/IBPSA/Electrical/Data/PV/SingleDiodeSharpNUU235F2.mo index 5679cdf8d9..1bafb82878 100644 --- a/IBPSA/Electrical/Data/PV/SingleDiodeSharpNUU235F2.mo +++ b/IBPSA/Electrical/Data/PV/SingleDiodeSharpNUU235F2.mo @@ -1,22 +1,22 @@ within IBPSA.Electrical.Data.PV; record SingleDiodeSharpNUU235F2 "Single-diode record for Sharp NU-U235F2 modules" - extends IBPSA.Electrical.Data.PV.SingleDiodeData( - n_ser=60, - n_par=1, - A_cel=((V_mp0*I_mp0)/(1000*eta_0))/n_ser, - A_mod=0.994*1.640, - eta_0=0.144, - V_oc0=37, - I_sc0=8.6, - V_mp0=30, - I_mp0=7.84, - P_mp0=235, - TCoeff_Isc=0.00053*I_sc0, - TCoeff_Voc=-0.00351*V_oc0, - gamma_Pmp=-0.00485, - T_NOCT=47.5 + 273.15, - Eg0 = 1.107, + extends IBPSA.Electrical.Data.PV.SingleDiodeData( + nSer=60, + nPar=1, + ACel=((VMP0*IMP0)/(1000*eta0))/nSer, + AMod=0.994*1.640, + eta0=0.144, + VOC0=37, + ISC0=8.6, + VMP0=30, + IMP0=7.84, + PMP0=235, + TCoeISC=0.00053*ISC0, + TCoeVOC=-0.00351*VOC0, + gammaPMP=-0.00485, + TNOCT=47.5 + 273.15, + Eg0=1.107, C=0.0002677); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)),Documentation(info=" diff --git a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS110.mo b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS110.mo index 1eb5070cb7..56f2db9bcd 100644 --- a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS110.mo +++ b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS110.mo @@ -1,21 +1,21 @@ within IBPSA.Electrical.Data.PV; record SingleDiodeSolibroSL2CIGS110 "Single-diode record for Solibro SL2 CIGS 110 Wp" - extends IBPSA.Electrical.Data.PV.SingleDiodeData( - n_ser=150, - n_par=1, - A_cel=((V_mp0*I_mp0)/(1000*eta_0))/n_ser, - A_mod=0.7895*1.190, - eta_0=0.116, - V_oc0=93.3, - I_sc0=1.69, - V_mp0=72.4, - I_mp0=1.52, - P_mp0=110, - TCoeff_Isc=0.000676, - TCoeff_Voc=-0.27, - gamma_Pmp=-0.0038, - T_NOCT=51 + 273.15, - Eg0 = 1.107, + extends IBPSA.Electrical.Data.PV.SingleDiodeData( + nSer=150, + nPar=1, + ACel=((VMP0*IMP0)/(1000*eta0))/nSer, + AMod=0.7895*1.190, + eta0=0.116, + VOC0=93.3, + ISC0=1.69, + VMP0=72.4, + IMP0=1.52, + PMP0=110, + TCoeISC=0.000676, + TCoeVOC=-0.27, + gammaPMP=-0.0038, + TNOCT=51 + 273.15, + Eg0=1.107, C=0.0002677); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)),Documentation(info=" diff --git a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS115.mo b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS115.mo index 92348091b0..fe62dc908e 100644 --- a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS115.mo +++ b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS115.mo @@ -1,22 +1,22 @@ within IBPSA.Electrical.Data.PV; record SingleDiodeSolibroSL2CIGS115 "Single-diode record for Solibro SL2 CIGS 115 Wp" - extends IBPSA.Electrical.Data.PV.SingleDiodeData( - n_ser=150, - n_par=1, - A_cel=((V_mp0*I_mp0)/(1000*eta_0))/n_ser, - A_mod=0.7895*1.190, - eta_0=0.122, - V_oc0=101.2, - I_sc0=1.69, - V_mp0=81.0, - I_mp0=1.42, - P_mp0=115, - TCoeff_Isc=0.000169, - TCoeff_Voc=-0.27324, - gamma_Pmp=-0.0032, - T_NOCT=42 + 273.15, - Eg0 = 1.107, + extends IBPSA.Electrical.Data.PV.SingleDiodeData( + nSer=150, + nPar=1, + ACel=((VMP0*IMP0)/(1000*eta0))/nSer, + AMod=0.7895*1.190, + eta0=0.122, + VOC0=101.2, + ISC0=1.69, + VMP0=81.0, + IMP0=1.42, + PMP0=115, + TCoeISC=0.000169, + TCoeVOC=-0.27324, + gammaPMP=-0.0032, + TNOCT=42 + 273.15, + Eg0=1.107, C=0.0002677); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)),Documentation(info=" diff --git a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS120.mo b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS120.mo index 220b40a931..c8d6dcb794 100644 --- a/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS120.mo +++ b/IBPSA/Electrical/Data/PV/SingleDiodeSolibroSL2CIGS120.mo @@ -1,22 +1,22 @@ within IBPSA.Electrical.Data.PV; record SingleDiodeSolibroSL2CIGS120 "Single-diode record for Solibro SL2 CIGS 120 Wp" - extends IBPSA.Electrical.Data.PV.SingleDiodeData( - n_ser=150, - n_par=1, - A_cel=((V_mp0*I_mp0)/(1000*eta_0))/n_ser, - A_mod=0.7895*1.190, - eta_0=0.128, - V_oc0=102.3, - I_sc0=1.71, - V_mp0=82.2, - I_mp0=1.46, - P_mp0=120, - TCoeff_Isc=0.000171, - TCoeff_Voc=-0.27621, - gamma_Pmp=-0.0032, - T_NOCT=42 + 273.15, - Eg0 = 1.107, + extends IBPSA.Electrical.Data.PV.SingleDiodeData( + nSer=150, + nPar=1, + ACel=((VMP0*IMP0)/(1000*eta0))/nSer, + AMod=0.7895*1.190, + eta0=0.128, + VOC0=102.3, + ISC0=1.71, + VMP0=82.2, + IMP0=1.46, + PMP0=120, + TCoeISC=0.000171, + TCoeVOC=-0.27621, + gammaPMP=-0.0032, + TNOCT=42 + 273.15, + Eg0=1.107, C=0.0002677); annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( coordinateSystem(preserveAspectRatio=false)),Documentation(info="