Buildings.Fluid.SolarCollectors.BaseClasses

Package with base classes for Buildings.Fluid.SolarCollectors

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.SolarCollectors.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAEHeatLoss ASHRAEHeatLoss Calculate the heat loss of a solar collector per ASHRAE standard 93
Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAESolarGain ASHRAESolarGain Calculate the solar heat gain of a solar collector per ASHRAE Standard 93
Buildings.Fluid.SolarCollectors.BaseClasses.EN12975HeatLoss EN12975HeatLoss Calculate the heat loss of a solar collector per EN12975
Buildings.Fluid.SolarCollectors.BaseClasses.EN12975SolarGain EN12975SolarGain Model calculating solar gains per the EN12975 standard
Buildings.Fluid.SolarCollectors.BaseClasses.IAM IAM Function for incident angle modifier
Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss PartialHeatLoss Partial heat loss model on which ASHRAEHeatLoss and EN12975HeatLoss are based
Buildings.Fluid.SolarCollectors.BaseClasses.PartialParameters PartialParameters Partial model for parameters
Buildings.Fluid.SolarCollectors.BaseClasses.PartialSolarCollector PartialSolarCollector Partial model for solar collectors
Buildings.Fluid.SolarCollectors.BaseClasses.Examples Examples Collection of models that illustrate model use and test models

Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAEHeatLoss Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAEHeatLoss

Calculate the heat loss of a solar collector per ASHRAE standard 93

Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAEHeatLoss

Information

This component computes the heat loss from the solar thermal collector to the environment. It is designed for use with ratings data collected in accordance with ASHRAE Standard 93. A negative heat loss indicates that heat is being lost to the environment.

Model description

This model calculates the heat loss to the ambient, for each segment i ∈ {1, ..., nseg} where nseg is the number of segments, as

Qlos,i = -slope Ac ⁄ nseg (Tenv-Tflu,i)

where slope < 0 is the slope for the heat loss as specified in the ratings data, Ac is the collector area, Tenv is the environment temperature, and Tflu,i is the fluid temperature in segment i ∈ {1, ..., nseg}.

This model reduces the heat loss rate to 0 when the fluid temperature is within 1 Kelvin of the minimum temperature of the medium model. The calculation is performed using the Buildings.Utilities.Math.Functions.smoothHeaviside function.

Implementation

ASHRAE uses the collector fluid inlet temperature to compute the heat loss (see Duffie and Beckmann, p. 293). However, unless the environment temperature which was present during the collector rating is known, which is not the case, one cannot compute a log mean temperature difference that would improve the UA calculation. Hence, this model is using the fluid temperature of each segment to compute the heat loss to the environment.

References

ASHRAE 93-2010 -- Methods of Testing to Determine the Thermal Performance of Solar Collectors (ANSI approved).

J.A. Duffie and W.A. Beckman 2006, Solar Engineering of Thermal Processes (3rd Edition), John Wiley & Sons, Inc.

Extends from Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss (Partial heat loss model on which ASHRAEHeatLoss and EN12975HeatLoss are based).

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments
replaceable package MediumPartialMediumMedium in the component
CoefficientOfHeatTransferslope Slope from ratings data [W/(m2.K)]

Connectors

TypeNameDescription
input RealInputTEnvTemperature of surrounding environment [K]
input RealInputTFlu[nSeg]Temperature of the heat transfer fluid [K]
output RealOutputQLos_flow[nSeg]Limited heat loss rate at current conditions [W]

Modelica definition

block ASHRAEHeatLoss "Calculate the heat loss of a solar collector per ASHRAE standard 93" extends Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss( QLos_internal = -slope * A_c/nSeg * {dT[i] for i in 1:nSeg}); parameter Modelica.Units.SI.CoefficientOfHeatTransfer slope(final max=0) "Slope from ratings data"; end ASHRAEHeatLoss;

Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAESolarGain Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAESolarGain

Calculate the solar heat gain of a solar collector per ASHRAE Standard 93

Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAESolarGain

Information

This component computes the solar heat gain of the solar thermal collector. It only calculates the solar heat gain without considering the heat loss to the environment. This model uses ratings data according to ASHRAE93. The solar heat gain is calculated using Equations 18.298-18.302 in the referenced EnergyPlus documentation.

The solar radiation absorbed by the panel is identified using Eq 18.302 from the EnergyPlus documentation. It is

Qflow[i]=Ac/nSeg (FR(τα) K(τα)net (Gdir (1-shaCoe)+Gdif+Ggnd))

where Qflow[i] is the heat gain in each segment, Ac is the area of the collector, nSeg is the user-specified number of segments in the simulation, FR(τα) is the maximum collector efficiency, K(τα)net is the incidence angle modifier, Gdir is the direct solar radiation, shaCoe is the user-specified shading coefficient, Gsky is the diffuse solar radiation from the sky, and Ggnd is the diffuse radiation from the ground.

The solar radiation equation indicates that the collector is divided into multiple segments. The number of segments used in the simulation is specified by the user via nSeg. The area of an individual segment is identified by dividing the collector area by the total number of segments. The term shaCoe is used to define the percentage of the collector that is shaded.

The incidence angle modifier used in the solar radiation equation is found using Eq 18.299 from the EnergyPlus documentation. It is

K(τα),net=(Gdir K(τα),dir +Gsky K(τα),sky +Ggnd K(τα),gnd) /(Gdir+Gsky+Ggnd)

where K(τα),net is the net incidence angle modified, Gdir is the (direct) beam radiation, K(τα),dir is the incidence angle modifier for (direct) beam radiation, Gsky is the diffuse radiation from the sky, K(τα),sky is the incidence angle modifier for radiation from the sky, Ggnd is the diffuse radiation from the ground, and K(τα),gnd is the incidence angle modifier for diffuse radiation from the ground.

Each incidence angle modifier is calculated using Eq 18.298 from the EnergyPlus documentation. It is

K(τα),x=1+b0 (1/cos(θ)-1)+b1 (1/cos(θ)-1)2

where x can refer to beam, sky or ground. θ is the incidence angle. For beam radiation θ is found via standard geometry. The incidence angle for sky and ground diffuse radiation are found using, respectively, Eq 18.300 and 18.301 from the EnergyPlus documentation. They are

θsky=59.68-0.1388 til+0.001497 til2
θgnd=90.0-0.5788 til+0.002693 til2

where θsky is the incidence angle for diffuse radiation from the sky, til is the tilt of the solar thermal collector, and θgnd is the incidence angle for diffuse radiation from the ground.

These two equations must be evaluated in degrees. The necessary unit conversions are made internally.

This model reduces the heat gain rate to 0 W when the fluid temperature is within 1 degree C of the maximum temperature of the medium model. The calculation is performed using the Buildings.Utilities.Math.Functions.smoothHeaviside function.

References

ASHRAE 93-2010 -- Methods of Testing to Determine the Thermal Performance of Solar Collectors (ANSI approved).

EnergyPlus 23.2.0 Engineering Reference.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), SolarCollectors.BaseClasses.PartialParameters (Partial model for parameters).

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the system
Realy_intercept y intercept(maximum efficiency) [1]
AngleincAngDat[:] Incidence angle modifier spline derivative coefficients [rad]
RealincAngModDat[size(incAngDat, 1)] Incidence angle modifier spline derivative coefficients [1]
Angletil Surface tilt [rad]
Shading
Booleanuse_shaCoe_infalseEnable input connector for shaCoe
RealshaCoe0Shading coefficient 0.0: no shading, 1.0: full shading

Connectors

TypeNameDescription
replaceable package MediumMedium in the system
input RealInputshaCoe_inShading coefficient
input RealInputTFlu[nSeg][K]
input RealInputHSkyDifTilDiffuse solar irradiation on a tilted surfce from the sky [W/m2]
input RealInputHGroDifTilDiffuse solar irradiation on a tilted surfce from the ground [W/m2]
input RealInputincAngIncidence angle of the sun beam on a tilted surface [rad]
input RealInputHDirTilDirect solar irradiation on a tilted surfce [W/m2]
output RealOutputQSol_flow[nSeg]Solar heat gain [W]

Modelica definition

block ASHRAESolarGain "Calculate the solar heat gain of a solar collector per ASHRAE Standard 93" extends Modelica.Blocks.Icons.Block; extends SolarCollectors.BaseClasses.PartialParameters; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the system"; parameter Real y_intercept(final unit="1") "y intercept(maximum efficiency)"; parameter Modelica.Units.SI.Angle[:] incAngDat "Incidence angle modifier spline derivative coefficients"; parameter Real[size(incAngDat,1)] incAngModDat( each final unit="1") "Incidence angle modifier spline derivative coefficients"; parameter Boolean use_shaCoe_in = false "Enable input connector for shaCoe"; parameter Real shaCoe( min=0.0, max=1.0) = 0 "Shading coefficient 0.0: no shading, 1.0: full shading"; parameter Modelica.Units.SI.Angle til "Surface tilt"; Modelica.Blocks.Interfaces.RealInput shaCoe_in if use_shaCoe_in "Shading coefficient"; Modelica.Blocks.Interfaces.RealInput TFlu[nSeg]( each unit = "K", each displayUnit="degC", each quantity="ThermodynamicTemperature"); Modelica.Blocks.Interfaces.RealInput HSkyDifTil( unit="W/m2", quantity="RadiantEnergyFluenceRate") "Diffuse solar irradiation on a tilted surfce from the sky"; Modelica.Blocks.Interfaces.RealInput HGroDifTil( unit="W/m2", quantity="RadiantEnergyFluenceRate") "Diffuse solar irradiation on a tilted surfce from the ground"; Modelica.Blocks.Interfaces.RealInput incAng( quantity="Angle", unit="rad", displayUnit="deg") "Incidence angle of the sun beam on a tilted surface"; Modelica.Blocks.Interfaces.RealInput HDirTil( unit="W/m2", quantity="RadiantEnergyFluenceRate") "Direct solar irradiation on a tilted surfce"; Modelica.Blocks.Interfaces.RealOutput QSol_flow[nSeg](each final unit="W") "Solar heat gain"; protected constant Modelica.Units.SI.TemperatureDifference dTMax=1 "Safety temperature difference to prevent TFlu > Medium.T_max"; final parameter Modelica.Units.SI.Temperature TMedMax=Medium.T_max - dTMax "Fluid temperature above which there will be no heat gain computed to prevent TFlu > Medium.T_max"; final parameter Modelica.Units.SI.Temperature TMedMax2=TMedMax - dTMax "Fluid temperature above which there will be no heat gain computed to prevent TFlu > Medium.T_max"; final parameter Real iamSky(fixed=false) "Incident angle modifier for diffuse solar radiation from the sky"; final parameter Real iamGro(fixed=false) "Incident angle modifier for diffuse solar radiation from the ground"; final parameter Modelica.Units.SI.Angle incAngSky(fixed=false) "Incident angle of diffuse radiation from the sky"; final parameter Modelica.Units.SI.Angle incAngGro(fixed=false) "Incident angle of diffuse radiation from the ground"; final parameter Real tilDeg( unit = "deg") = Modelica.Units.Conversions.to_deg(til) "Surface tilt angle in degrees"; final parameter Modelica.Units.SI.HeatFlux HTotMin=1 "Minimum HTot to avoid div/0"; final parameter Real HMinDel = 0.001 "Delta of the smoothing function for HTot"; Real iamBea "Incident angle modifier for direct solar radiation"; Real iam "Weighted incident angle modifier"; Modelica.Blocks.Interfaces.RealInput shaCoe_internal "Internally used shading coefficient"; parameter Real[size(incAngDat, 1)] dMonotone(each fixed=false) "Derivatives"; initial algorithm dMonotone := Buildings.Utilities.Math.Functions.splineDerivatives( x=incAngDat, y=incAngModDat, ensureMonotonicity=false); initial equation // EnergyPlus 23.2.0 Engineering Reference Eq 18.300 incAngSky =Modelica.Units.Conversions.from_deg(59.68 - 0.1388*(tilDeg) + 0.001497*(tilDeg)^2); // Diffuse radiation from the sky // EnergyPlus 23.2.0 Engineering Reference Eq 18.298 iamSky = SolarCollectors.BaseClasses.IAM(incAngSky, incAngDat, incAngModDat, dMonotone); // EnergyPlus 23.2.0 Engineering Reference Eq 18.301 incAngGro =Modelica.Units.Conversions.from_deg(90 - 0.5788*(tilDeg) + 0.002693*(tilDeg)^2); // Diffuse radiation from the ground // EnergyPlus 23.2.0 Engineering Reference Eq 18.298 iamGro = SolarCollectors.BaseClasses.IAM(incAngGro, incAngDat, incAngModDat, dMonotone); equation connect(shaCoe_internal, shaCoe_in); if not use_shaCoe_in then shaCoe_internal = shaCoe; end if; // EnergyPlus 23.2.0 Engineering Reference Eq 18.298 iamBea = SolarCollectors.BaseClasses.IAM(incAng, incAngDat, incAngModDat, dMonotone); // EnergyPlus 23.2.0 Engineering Reference Eq 18.299 iam = (HDirTil*iamBea + HSkyDifTil*iamSky + HGroDifTil*iamGro)/ Buildings.Utilities.Math.Functions.smoothMax(( HDirTil + HSkyDifTil + HGroDifTil), HTotMin, HMinDel); // Modified from EnergyPlus 23.2.0 Engineering Reference Eq 18.302 // by applying shade effect for direct solar radiation // Only solar heat gain is considered here for i in 1 : nSeg loop QSol_flow[i] = A_c/nSeg*(y_intercept*iam* (HDirTil*(1.0 - shaCoe_internal) + HSkyDifTil + HGroDifTil))* smooth(1, if TFlu[i] < TMedMax2 then 1 else Buildings.Utilities.Math.Functions.smoothHeaviside(TMedMax-TFlu[i], dTMax)); end for; end ASHRAESolarGain;

Buildings.Fluid.SolarCollectors.BaseClasses.EN12975HeatLoss Buildings.Fluid.SolarCollectors.BaseClasses.EN12975HeatLoss

Calculate the heat loss of a solar collector per EN12975

Buildings.Fluid.SolarCollectors.BaseClasses.EN12975HeatLoss

Information

This component computes the heat loss from the solar thermal collector to the environment. It is designed anticipating ratings data collected in accordance with EN12975. A negative heat loss indicates that heat is being lost to the environment.

This model calculates the heat loss to the ambient, for each segment i ∈ {1, ..., nseg} where nseg is the number of segments, as

Qlos,i = Ac ⁄ nseg (Tenv-Tflu,i) (a1 - a2 (Tenv-Tflu,i))

where a1 > 0 is the heat loss coefficient from EN12975 ratings data, a2 ≥ 0 is the temperature dependence of heat loss from EN12975 ratings data, Ac is the collector area, Tenv is the environment temperature and Tflu,i is the fluid temperature in segment i ∈ {1, ..., nseg}.

This model reduces the heat loss rate to 0 when the fluid temperature is within 1 Kelvin of the minimum temperature of the medium model. The calculation is performed using the Buildings.Utilities.Math.Functions.smoothHeaviside function.

Implementation

EN 12975 uses the arithmetic average temperature of the collector fluid inlet and outlet temperature to compute the heat loss (see Duffie and Beckmann, p. 293). However, unless the environment temperature that was present during the collector rating is known, which is not the case, one cannot compute a log mean temperature difference that would improve the UA calculation. Hence, this model is using the fluid temperature of each segment to compute the heat loss to the environment. If the arithmetic average temperature were used, then segments at the collector outlet could be cooled below the ambient temperature, which violates the 2nd law of Thermodynamics.

References

CEN 2006, European Standard 12975-1:2006, European Committee for Standardization

Extends from Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss (Partial heat loss model on which ASHRAEHeatLoss and EN12975HeatLoss are based).

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments
replaceable package MediumPartialMediumMedium in the component
CoefficientOfHeatTransfera1 a1 from ratings data [W/(m2.K)]
Reala2 a2 from ratings data [W/(m2.K2)]

Connectors

TypeNameDescription
input RealInputTEnvTemperature of surrounding environment [K]
input RealInputTFlu[nSeg]Temperature of the heat transfer fluid [K]
output RealOutputQLos_flow[nSeg]Limited heat loss rate at current conditions [W]

Modelica definition

block EN12975HeatLoss "Calculate the heat loss of a solar collector per EN12975" extends Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss( QLos_internal = A_c/nSeg * {dT[i] * (a1 - a2 * dT[i]) for i in 1:nSeg}); parameter Modelica.Units.SI.CoefficientOfHeatTransfer a1(final min=0) "a1 from ratings data"; parameter Real a2(final unit = "W/(m2.K2)", final min=0) "a2 from ratings data"; end EN12975HeatLoss;

Buildings.Fluid.SolarCollectors.BaseClasses.EN12975SolarGain Buildings.Fluid.SolarCollectors.BaseClasses.EN12975SolarGain

Model calculating solar gains per the EN12975 standard

Buildings.Fluid.SolarCollectors.BaseClasses.EN12975SolarGain

Information

This component computes the solar heat gain of the solar thermal collector. It only calculates the solar heat gain without considering the heat loss to the environment. This model uses ratings data according to EN12975. The solar heat gain is calculated using Equations 18.298 and 18.302 in the referenced EnergyPlus documentation. The calculation is modified to use coefficients from EN12975.

The equation used to calculate solar gain is a modified version of Eq 18.302 from the EnergyPlus documentation. It is

Qflow[i] = Ac/nSeg η0 (K (τα),dir Gdir (1-shaCoe)+Kdif G dif),

where Qflow[i] is the heat gained in each segment, Ac is the area of the collector, nSeg is the number of segments in the collector, η0 is the maximum efficiency of the collector, K(τα),dir is the incidence angle modifier for (direct) beam radiation, Gdir is the current beam radiation on the collector, shaCoe is the shading coefficient, Kdif is the incidence angle modifier for diffuse radiation, and Gdif is the diffuse radiation striking the surface.

The solar radiation equation indicates that the collector is divided into multiple segments. The number of segments used in the simulation is specified by the user via nSeg. The area of an individual segment is identified by dividing the collector area by the total number of segments. The term shaCoe is used to define the percentage of the collector that is shaded.

The main difference between this model and the ASHRAE model is the handling of diffuse radiation. The ASHRAE model contains calculated incidence angle modifiers for both sky and ground diffuse radiation, while this model uses a coefficient from test data for diffuse radiation.

The incidence angle modifier is calculated using Eq 18.298 from the EnergyPlus documentation. It is

K(τα),x=1+b0 (1/cos(θ)-1)+b1 (1/cos(θ)-1)2

where K(τα),dir is the incidence angle modifier for beam radiation, b0 is the first incidence angle modifier coefficient, b1 is the second incidence angle modifier coefficient, and θ is the incidence angle.

This model reduces the heat gain rate to 0 W when the fluid temperature is within 1 degree C of the maximum temperature of the medium model. The calculation is performed using the Buildings.Utilities.Math.Functions.smoothHeaviside function.

References

CEN 2022, European Standard 12975:2022, European Committee for Standardization

EnergyPlus 23.2.0 Engineering Reference

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), SolarCollectors.BaseClasses.PartialParameters (Partial model for parameters).

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the system
Realeta0 Optical efficiency (maximum efficiency) [1]
AngleincAngDat[:] Incidence angle modifier spline derivative coefficients [rad]
RealincAngModDat[size(incAngDat, 1)] Incidence angle modifier spline derivative coefficients [1]
RealiamDiff Incidence angle modifier for diffuse radiation
Shading
Booleanuse_shaCoe_infalseEnables an input connector for shaCoe
RealshaCoe0Shading coefficient 0.0: no shading, 1.0: full shading

Connectors

TypeNameDescription
replaceable package MediumMedium in the system
input RealInputshaCoe_inTime varying input for the shading coefficient
input RealInputHSkyDifTilDiffuse solar irradiation on a tilted surfce from the sky [W/m2]
input RealInputincAngIncidence angle of the sun beam on a tilted surface [rad]
input RealInputHDirTilDirect solar irradiation on a tilted surfce [W/m2]
output RealOutputQSol_flow[nSeg]Solar heat gain [W]
input RealInputTFlu[nSeg][K]

Modelica definition

model EN12975SolarGain "Model calculating solar gains per the EN12975 standard" extends Modelica.Blocks.Icons.Block; extends SolarCollectors.BaseClasses.PartialParameters; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the system"; parameter Real eta0(final unit="1") "Optical efficiency (maximum efficiency)"; parameter Modelica.Units.SI.Angle[:] incAngDat "Incidence angle modifier spline derivative coefficients"; parameter Real[size(incAngDat,1)] incAngModDat(each final unit="1") "Incidence angle modifier spline derivative coefficients"; parameter Boolean use_shaCoe_in = false "Enables an input connector for shaCoe"; parameter Real shaCoe( min=0.0, max=1.0) = 0 "Shading coefficient 0.0: no shading, 1.0: full shading"; parameter Real iamDiff "Incidence angle modifier for diffuse radiation"; Modelica.Blocks.Interfaces.RealInput shaCoe_in if use_shaCoe_in "Time varying input for the shading coefficient"; Modelica.Blocks.Interfaces.RealInput HSkyDifTil( unit="W/m2", quantity="RadiantEnergyFluenceRate") "Diffuse solar irradiation on a tilted surfce from the sky"; Modelica.Blocks.Interfaces.RealInput incAng( quantity="Angle", unit="rad", displayUnit="deg") "Incidence angle of the sun beam on a tilted surface"; Modelica.Blocks.Interfaces.RealInput HDirTil( unit="W/m2", quantity="RadiantEnergyFluenceRate") "Direct solar irradiation on a tilted surfce"; Modelica.Blocks.Interfaces.RealOutput QSol_flow[nSeg](each final unit="W") "Solar heat gain"; Modelica.Blocks.Interfaces.RealInput TFlu[nSeg]( each final unit="K", each displayUnit="degC", each final quantity="ThermodynamicTemperature"); protected constant Modelica.Units.SI.TemperatureDifference dTMax=1 "Safety temperature difference to prevent TFlu > Medium.T_max"; final parameter Modelica.Units.SI.Temperature TMedMax=Medium.T_max - dTMax "Fluid temperature above which there will be no heat gain computed to prevent TFlu > Medium.T_max"; final parameter Modelica.Units.SI.Temperature TMedMax2=TMedMax - dTMax "Fluid temperature above which there will be no heat gain computed to prevent TFlu > Medium.T_max"; Real iamBea "Incidence angle modifier for director solar radiation"; Modelica.Blocks.Interfaces.RealInput shaCoe_internal "Internally used shaCoe"; parameter Real[size(incAngDat, 1)] dMonotone(each fixed=false) "Derivatives"; initial algorithm dMonotone := Buildings.Utilities.Math.Functions.splineDerivatives( x=incAngDat, y=incAngModDat, ensureMonotonicity=false); equation connect(shaCoe_internal, shaCoe_in); if not use_shaCoe_in then shaCoe_internal = shaCoe; end if; // EnergyPlus 23.2.0 Engineering Reference Eq 18.298 iamBea = SolarCollectors.BaseClasses.IAM(incAng, incAngDat, incAngModDat, dMonotone); // Modified from EnergyPlus 23.2.0 Engineering Reference Eq 18.302 // by applying shade effect for direct solar radiation // Only solar heat gain is considered here for i in 1 : nSeg loop QSol_flow[i] = A_c/nSeg*(eta0*(iamBea*HDirTil*(1.0 - shaCoe_internal) + iamDiff * HSkyDifTil))* smooth(1, if TFlu[i] < TMedMax2 then 1 else Buildings.Utilities.Math.Functions.smoothHeaviside(TMedMax-TFlu[i], dTMax)); end for; end EN12975SolarGain;

Buildings.Fluid.SolarCollectors.BaseClasses.IAM Buildings.Fluid.SolarCollectors.BaseClasses.IAM

Function for incident angle modifier

Information

Overview

This function computes the incidence angle modifier for solar irradiation striking the surface of the solar thermal collector. It is calculated using cubic spline interpolation and measurement data for the incident angle modifier provided in data sheets.

References

EnergyPlus 23.2.0 Engineering Reference

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AngleincAng Incident angle [rad]
AngleincAngDat[:] Incident angle data [rad]
RealincAngModDat[size(incAngDat, 1)] Incident angle modifier data [1]
RealdMonotone[size(incAngDat, 1)] Incident angle modifier spline derivatives

Outputs

TypeNameDescription
RealincAngModIncident angle modifier coefficient

Modelica definition

function IAM "Function for incident angle modifier" extends Modelica.Icons.Function; input Modelica.Units.SI.Angle incAng "Incident angle"; input Modelica.Units.SI.Angle[:] incAngDat "Incident angle data"; input Real[size(incAngDat,1)] incAngModDat( each final min=0, each final max=1, each final unit="1") "Incident angle modifier data"; input Real[size(incAngDat,1)] dMonotone "Incident angle modifier spline derivatives"; output Real incAngMod "Incident angle modifier coefficient"; protected Integer i "Counter to pick the interpolation interval"; constant Real delta = 0.0001 "Width of the smoothing function"; algorithm i := 1; for j in 1:size(incAngDat, 1) - 1 loop if incAng > incAngDat[j] then i := j; end if; end for; // Extrapolate or interpolate the data and sets its value to 0 if // the incident angle modifier becomes negative. incAngMod := Buildings.Utilities.Math.Functions.smoothMax( x1 = Buildings.Utilities.Math.Functions.cubicHermiteLinearExtrapolation( x=incAng, x1=incAngDat[i], x2=incAngDat[i + 1], y1=incAngModDat[i], y2=incAngModDat[i + 1], y1d=dMonotone[i], y2d=dMonotone[i + 1]), x2 = 0, deltaX = delta); end IAM;

Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss

Partial heat loss model on which ASHRAEHeatLoss and EN12975HeatLoss are based

Buildings.Fluid.SolarCollectors.BaseClasses.PartialHeatLoss

Information

This component is a partial model used as the base for Buildings.Fluid.SolarCollectors.BaseClasses.ASHRAEHeatLoss and Buildings.Fluid.SolarCollectors.BaseClasses.EN12975HeatLoss. It contains the input, output and parameter declarations which are common to both models. More detailed information is available in the documentation of the extending classes.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), SolarCollectors.BaseClasses.PartialParameters (Partial model for parameters).

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
input RealInputTEnvTemperature of surrounding environment [K]
input RealInputTFlu[nSeg]Temperature of the heat transfer fluid [K]
output RealOutputQLos_flow[nSeg]Limited heat loss rate at current conditions [W]

Modelica definition

block PartialHeatLoss "Partial heat loss model on which ASHRAEHeatLoss and EN12975HeatLoss are based" extends Modelica.Blocks.Icons.Block; extends SolarCollectors.BaseClasses.PartialParameters; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; Modelica.Blocks.Interfaces.RealInput TEnv( quantity="ThermodynamicTemperature", unit="K", displayUnit="degC") "Temperature of surrounding environment"; Modelica.Blocks.Interfaces.RealInput TFlu[nSeg]( each quantity="ThermodynamicTemperature", each unit = "K", each displayUnit="degC") "Temperature of the heat transfer fluid"; Modelica.Blocks.Interfaces.RealOutput QLos_flow[nSeg]( each quantity="HeatFlowRate", each unit="W", each displayUnit="W") = {QLos_internal[i]*smooth(1, if TFlu[i] > TMedMin2 then 1 else Buildings.Utilities.Math.Functions.smoothHeaviside(TFlu[i] - TMedMin, dTMin)) for i in 1:nSeg} "Limited heat loss rate at current conditions"; protected constant Modelica.Units.SI.Temperature dTMin=1 "Safety temperature difference to prevent TFlu < Medium.T_min"; final parameter Modelica.Units.SI.Temperature TMedMin=Medium.T_min + dTMin "Fluid temperature below which there will be no heat loss computed to prevent TFlu < Medium.T_min"; final parameter Modelica.Units.SI.Temperature TMedMin2=TMedMin + dTMin "Fluid temperature below which there will be no heat loss computed to prevent TFlu < Medium.T_min"; input Modelica.Units.SI.HeatFlowRate QLos_internal[nSeg] "Heat loss rate at current conditions for each segment"; Modelica.Units.SI.TemperatureDifference dT[nSeg]={TEnv - TFlu[i] for i in 1: nSeg} "Environment minus collector fluid temperature"; end PartialHeatLoss;

Buildings.Fluid.SolarCollectors.BaseClasses.PartialParameters

Partial model for parameters

Information

Partial parameters used in all solar collector models

Parameters

TypeNameDefaultDescription
AreaA_c Area of the collector [m2]
IntegernSeg3Number of segments

Modelica definition

block PartialParameters "Partial model for parameters" parameter Modelica.Units.SI.Area A_c "Area of the collector"; parameter Integer nSeg=3 "Number of segments"; end PartialParameters;

Buildings.Fluid.SolarCollectors.BaseClasses.PartialSolarCollector Buildings.Fluid.SolarCollectors.BaseClasses.PartialSolarCollector

Partial model for solar collectors

Buildings.Fluid.SolarCollectors.BaseClasses.PartialSolarCollector

Information

This component is a partial model of a solar thermal collector. It can be expanded to create solar collector models based on either ASHRAE93 or EN12975 ratings data.

References

EnergyPlus 23.2.0 Engineering Reference

Extends from Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters (Parameters for flow resistance for models with two ports), Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
IntegernSeg3Number of segments used to discretize the collector model
Angleazi Surface azimuth (0 for south-facing; -90 degree for east-facing; +90 degree for west facing [rad]
Angletil Surface tilt (0 for horizontally mounted collector) [rad]
Realrho Ground reflectance [1]
HeatCapacityCTotif per.CTyp == Buildings.Flu...Heat capacity of solar collector with fluid [J/K]
GenericASHRAE93perredeclare parameter Building...Performance data
Nominal condition
PressureDifferencedp_nominaldp_nominal_finalPressure difference [Pa]
MassFlowRatem_flow_nominalm_flow_nominal_finalNominal mass flow rate [kg/s]
Shading
Booleanuse_shaCoe_infalseEnables an input connector for shaCoe
RealshaCoe0Shading coefficient. 0.0: no shading, 1.0: full shading
Area declarations
NumberSelectionnColTypeBuildings.Fluid.SolarCollect...Selection of area specification format
IntegernPanels0Desired number of panels in the simulation
AreatotalArea0Total area of panels in the simulation [m2]
Configuration declarations
SystemConfigurationsysConfigBuildings.Fluid.SolarCollect...Selection of system configuration
IntegernPanelsPar0Number of array panels in parallel
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the volume
Advanced
Dynamics
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Flow resistance
BooleancomputeFlowResistance(abs(dp_nominal) > Modelica....=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputshaCoe_inShading coefficient
BusweaBusWeather data bus

Modelica definition

partial model PartialSolarCollector "Partial model for solar collectors" extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations; extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters( final dp_nominal = dp_nominal_final, final computeFlowResistance=(abs(dp_nominal) > Modelica.Constants.eps)); extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( final m_flow_nominal=m_flow_nominal_final); constant Boolean homotopyInitialization = true "= true, use homotopy method"; parameter Integer nSeg = 3 "Number of segments used to discretize the collector model"; parameter Modelica.Units.SI.Angle azi(displayUnit="deg") "Surface azimuth (0 for south-facing; -90 degree for east-facing; +90 degree for west facing"; parameter Modelica.Units.SI.Angle til(displayUnit="deg") "Surface tilt (0 for horizontally mounted collector)"; parameter Real rho( final min=0, final max=1, final unit = "1") "Ground reflectance"; parameter Modelica.Units.SI.HeatCapacity CTot= if per.CTyp==Buildings.Fluid.SolarCollectors.Types.HeatCapacity.TotalCapacity then per.C elseif per.CTyp==Buildings.Fluid.SolarCollectors.Types.HeatCapacity.DryCapacity then per.C+rho_default*per.V*cp_default else 385*per.mDry+rho_default*per.V*cp_default "Heat capacity of solar collector with fluid"; parameter Boolean use_shaCoe_in = false "Enables an input connector for shaCoe"; parameter Real shaCoe( min=0.0, max=1.0) = 0 "Shading coefficient. 0.0: no shading, 1.0: full shading"; parameter Buildings.Fluid.SolarCollectors.Types.NumberSelection nColType= Buildings.Fluid.SolarCollectors.Types.NumberSelection.Number "Selection of area specification format"; parameter Integer nPanels= 0 "Desired number of panels in the simulation"; parameter Modelica.Units.SI.Area totalArea=0 "Total area of panels in the simulation"; parameter Buildings.Fluid.SolarCollectors.Types.SystemConfiguration sysConfig= Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series "Selection of system configuration"; parameter Integer nPanelsPar=0 "Number of array panels in parallel"; Modelica.Blocks.Interfaces.RealInput shaCoe_in if use_shaCoe_in "Shading coefficient"; Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Buildings.BoundaryConditions.SolarIrradiation.DiffusePerez HDifTilIso( final outSkyCon=true, final outGroCon=true, final til=til, final azi=azi, final rho=rho) "Diffuse solar irradiation on a tilted surface"; Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil( final til=til, final azi=azi) "Direct solar irradiation on a tilted surface"; Buildings.Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = Medium, allowFlowReversal=allowFlowReversal) "Mass flow rate sensor"; Buildings.Fluid.FixedResistances.PressureDrop res( redeclare final package Medium = Medium, final from_dp=from_dp, final show_T=show_T, final m_flow_nominal=m_flow_nominal, final allowFlowReversal=allowFlowReversal, final linearized=linearizeFlowResistance, final homotopyInitialization=homotopyInitialization, deltaM=deltaM, final dp_nominal=dp_nominal_final) "Flow resistance"; // The size of the liquid volume has been increased to also add // the heat capacity of the metal. Buildings.Fluid.MixingVolumes.MixingVolume vol[nSeg]( each nPorts=2, redeclare package Medium = Medium, each final m_flow_nominal=m_flow_nominal, each final energyDynamics=energyDynamics, each final p_start=p_start, each final T_start=T_start, each final m_flow_small=m_flow_small, each final V=CTot/cp_default/rho_default*nPanels_internal/nSeg, each final massDynamics=massDynamics, each final X_start=X_start, each final C_start=C_start, each final C_nominal=C_nominal, each final mSenFac=mSenFac, each final allowFlowReversal=allowFlowReversal, each final prescribedHeatFlowRate=false) "Volume of fluid in one segment of the solar collector"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen[nSeg] "Temperature sensor"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow QGai[nSeg] "Rate of solar heat gain"; Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow QLos[nSeg] "Rate of heat loss"; replaceable parameter Buildings.Fluid.SolarCollectors.Data.GenericASHRAE93 per constrainedby Buildings.Fluid.SolarCollectors.Data.BaseClasses.Generic "Performance data"; protected Modelica.Blocks.Interfaces.RealInput shaCoe_internal "Internally used shading coefficient"; final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal_final( displayUnit="kg/s") = nPanelsPar_internal*per.mperA_flow_nominal*per.A "Nominal mass flow rate through the system of collectors"; final parameter Modelica.Units.SI.PressureDifference dp_nominal_final( displayUnit="Pa") = nPanelsSer_internal*per.dp_nominal "Nominal pressure loss across the system of collectors"; parameter Modelica.Units.SI.Area ATot_internal=nPanels_internal*per.A "Area used in the simulation"; parameter Real nPanels_internal= if nColType == Buildings.Fluid.SolarCollectors.Types.NumberSelection.Number then nPanels else totalArea/per.A "Number of panels used in the simulation"; parameter Real nPanelsSer_internal= if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series then nPanels_internal else if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel then 1 else nPanels_internal/nPanelsPar_internal "Number of panels in series"; parameter Real nPanelsPar_internal= if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel then nPanels_internal else if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series then 1 else nPanelsPar "Number of panels in parallel"; parameter Medium.ThermodynamicState sta_default = Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default[1:Medium.nXi]) "Medium state at default properties"; parameter Modelica.Units.SI.SpecificHeatCapacity cp_default= Medium.specificHeatCapacityCp(sta_default) "Specific heat capacity of the fluid"; parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default) "Density, used to compute fluid mass"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); assert(mod(ATot_internal,per.A)/per.A <= 0.01, "In " + getInstanceName() + ": The total collector area is not an exact multitude of a single collector's area.", level = AssertionLevel.warning); equation connect(shaCoe_internal,shaCoe_in); if not use_shaCoe_in then shaCoe_internal=shaCoe; end if; connect(weaBus, HDifTilIso.weaBus); connect(weaBus, HDirTil.weaBus); connect(port_a, senMasFlo.port_a); connect(senMasFlo.port_b, res.port_a); connect(vol[nSeg].ports[2], port_b); connect(vol[1].ports[1], res.port_b); for i in 1:(nSeg - 1) loop connect(vol[i].ports[2], vol[i + 1].ports[1]); end for; connect(vol.heatPort, temSen.port); connect(QGai.port, vol.heatPort); connect(QLos.port, vol.heatPort); end PartialSolarCollector;