Buildings.HeatTransfer.WindowsBeta
package.
Extends from Modelica.Fluid.Icons.BaseClassLibrary (Icon for library).
Name | Description |
---|---|
Shade | Model for long-wave radiative heat balance of a layer that may or may not have a shade |
PartialConvection | Partial model for heat convection between a possibly shaded window that can be outside or inside the room |
GlassLayer | Model for a glass layer of a window assembly |
CenterOfGlass | Model for center of glass of a window construction |
GasConvection | Model for heat convection through gas in a window assembly |
ThermalConductor | Lumped thermal element with variable area, transporting heat without storing it |
ShadingSignal | Converts the shading signal to be strictly bigger than 0 and smaller than 1 |
ExteriorConvectionCoefficient | Model for the heat transfer coefficient at the outside of the window |
InteriorConvectionCoefficient | Model for the heat transfer coefficient at the inside of the window |
PartialRadiation | Partial model for variables and data used in radiation calculation |
AbsorbedRadiation | Absorbed radiation by window |
TransmittedRadiation | Transmitted radiation through window |
WindowRadiation | Calculation radiation for window |
RadiationBaseData | Define base parameters for window radiation calculation |
RadiationData | Radiation property of a window |
convectionVerticalCavity | Free convection in vertical cavity |
convectionHorizontalCavity | Free convection in horizontal cavity |
nusseltHorizontalCavityEnhanced | Nusselt number for horizontal cavity, bottom surface warmer than top surface |
nusseltHorizontalCavityReduced | Nusselt number for horizontal cavity, bottom surface colder than top surface |
smoothInterpolation | Get interpolated data without triggering events |
Examples | Collection of models that illustrate model use and test models |
Model for the convective and the long-wave radiative heat balance of a shade that is in the outside or the room-side of a window.
The input port QAbs_flow
needs to be connected to the short-wave radiation
that is absorbed by the shade.
The convective heat balance is based on the model described by Wright (2008), which can be shown as a convective heat resistance model as follows:
Wright (2008) reports that if the shading layer is far enough from the window, the boundary layers associated with each surface will not interfere with each other. In this case, it is reasonable to consider each surface on an individual basis by setting the convective heat transfer coefficient shown in grey to zero, and setting the black depicted convective heat transfer coefficients to h=4 W/m2 K. In the here implemented model, the grey depicted convective heat transfer coefficient is set set to h' = k h, where 0 ≤ k ≤ 1 is a parameter.
Type | Name | Default | Description |
---|---|---|---|
Area | A | Heat transfer area [m2] | |
Emissivity | epsLW_air | Long wave emissivity of surface that faces air [1] | |
Emissivity | epsLW_glass | Long wave emissivity of surface that faces glass [1] | |
TransmissionCoefficient | tauLW_air | Long wave transmissivity of shade for radiation coming from the exterior or the room [1] | |
TransmissionCoefficient | tauLW_glass | Long wave transmissivity of shade for radiation coming from the glass [1] | |
Boolean | thisSideHasShade | Set to true if this side of the window has a shade | |
Boolean | linearize | false | Set to true to linearize emissive power |
Temperature | T0 | 293.15 | Temperature used to linearize radiative heat transfer [K] |
Real | k | 1 | Coefficient used to scale convection between shade and glass |
Type | Name | Description |
---|---|---|
input RealInput | u | Input connector, used to scale the surface area to take into account an operable shading device |
input RealInput | Gc | Signal representing the convective thermal conductance in [W/K] |
input RealInput | QAbs_flow | Solar radiation absorbed by shade [W] |
input RadiosityInflow | JIn_air | Incoming radiosity at the air-side surface of the shade [W] |
input RadiosityInflow | JIn_glass | Incoming radiosity at the glass-side surface of the shade [W] |
output RadiosityOutflow | JOut_air | Outgoing radiosity at the air-side surface of the shade [W] |
output RadiosityOutflow | JOut_glass | Outgoing radiosity at the glass-side surface of the shade [W] |
HeatPort_a | air | Port that connects to the air (room or outside) |
HeatPort_b | glass | Heat port that connects to shaded part of glass |
HeatPort_a | sha | Heat port to shade |
model Shade "Model for long-wave radiative heat balance of a layer that may or may not have a shade" parameter Modelica.SIunits.Area A "Heat transfer area"; parameter Modelica.SIunits.Emissivity epsLW_air "Long wave emissivity of surface that faces air"; parameter Modelica.SIunits.Emissivity epsLW_glass "Long wave emissivity of surface that faces glass"; parameter Modelica.SIunits.TransmissionCoefficient tauLW_air "Long wave transmissivity of shade for radiation coming from the exterior or the room"; parameter Modelica.SIunits.TransmissionCoefficient tauLW_glass "Long wave transmissivity of shade for radiation coming from the glass"; parameter Boolean thisSideHasShade "Set to true if this side of the window has a shade"; final parameter Modelica.SIunits.ReflectionCoefficient rhoLW_air=1-epsLW_air-tauLW_air "Long wave reflectivity of surface that faces air"; final parameter Modelica.SIunits.ReflectionCoefficient rhoLW_glass=1-epsLW_glass-tauLW_glass "Long wave reflectivity of surface that faces glass"; parameter Boolean linearize = false "Set to true to linearize emissive power"; parameter Modelica.SIunits.Temperature T0=293.15 "Temperature used to linearize radiative heat transfer"; parameter Real k(min=0, max=1)=1 "Coefficient used to scale convection between shade and glass";Modelica.Blocks.Interfaces.RealInput u "Input connector, used to scale the surface area to take into account an operable shading device"; Modelica.Blocks.Interfaces.RealInput Gc "Signal representing the convective thermal conductance in [W/K]"; Modelica.Blocks.Interfaces.RealInput QAbs_flow(unit="W", quantity="Power") "Solar radiation absorbed by shade"; Interfaces.RadiosityInflow JIn_air(start=A*0.8*Modelica.Constants.sigma*293.15^4) "Incoming radiosity at the air-side surface of the shade"; Interfaces.RadiosityInflow JIn_glass(start=A*0.8*Modelica.Constants.sigma*293.15^4) "Incoming radiosity at the glass-side surface of the shade"; Interfaces.RadiosityOutflow JOut_air "Outgoing radiosity at the air-side surface of the shade"; Interfaces.RadiosityOutflow JOut_glass "Outgoing radiosity at the glass-side surface of the shade"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a air "Port that connects to the air (room or outside)"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b glass "Heat port that connects to shaded part of glass"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a sha(T(start=293.15)) "Heat port to shade"; protected final parameter Real T03(min=0, unit="K3")=T0^3 "3rd power of temperature T0"; Real T4(min=1E8, start=293.15^4, nominal=1E10, unit="K4") "4th power of temperature"; Modelica.SIunits.RadiantPower E_air "Emissive power of surface that faces air"; Modelica.SIunits.RadiantPower E_glass "Emissive power of surface that faces glass"; equation if thisSideHasShade then // Radiosities that are outgoing from the surface, which are // equal to the long-wave emissivity plus the reflected incoming // radiosity plus the radiosity that is transmitted from the // other surface. T4 = if linearize then T03 * sha.T else (sha.T)^4; E_air = u * A * epsLW_air * Modelica.Constants.sigma * T4; E_glass = u * A * epsLW_glass * Modelica.Constants.sigma * T4; // Radiosity outgoing from shade towards air side and glass side JOut_air = - E_air - tauLW_glass * JIn_glass - rhoLW_air*JIn_air; JOut_glass = - E_glass - tauLW_air * JIn_air - rhoLW_glass*JIn_glass; // Heat balance of shade // The term 2*Gc is to combine the parallel convective heat transfer resistances, // see figure in info section. QAbs_flow + epsLW_air*JIn_air + epsLW_glass*JIn_glass = -Gc*(2*(air.T-sha.T)+k*(glass.T-sha.T))+E_air+E_glass; // Convective heat flow at air node air.Q_flow = Gc*(2*(air.T-sha.T) + (air.T-glass.T)); // Convective heat flow at glass node glass.Q_flow = Gc*((glass.T-air.T)+k*(glass.T-sha.T)); else air.Q_flow = Gc*(air.T-glass.T); glass.Q_flow = -air.Q_flow; sha.T = (air.T+glass.T)/2; T4 = T03 * T0; E_air = 0; E_glass = 0; JOut_air = -JIn_glass; JOut_glass = -JIn_air; end if;end Shade;
Partial model for heat convection of a window surface with or without shade, that is outside or inside the room.
Convective heat transfer is modeled between the heat port air
and the shade, if present, the glass and the frame.
If the parameter haveShade
is set to true
, then a shade
is present and the input port QAbs_flow
needs to be connected to
a model that computes the short-wave radiation that is absorbed by the shade.
If haveShade=true
, then the model shade
and the
connectors QAbs_flow
, glaSha
,
JInSha
and JOutSha
are removed.
This allows using the model as a base class for windows with inside shade, outside shade, or no shade.
Type | Name | Default | Description |
---|---|---|---|
Area | A | Heat transfer area of frame and window [m2] | |
Real | fFra | Fraction of window frame divided by total window area | |
Boolean | linearizeRadiation | Set to true to linearize emissive power | |
Shading | |||
Emissivity | epsLWSha_air | Long wave emissivity of shade surface that faces air [1] | |
Emissivity | epsLWSha_glass | Long wave emissivity of shade surface that faces glass [1] | |
TransmissionCoefficient | tauLWSha_air | Long wave transmissivity of shade for radiation coming from the exterior or the room [1] | |
TransmissionCoefficient | tauLWSha_glass | Long wave transmissivity of shade for radiation coming from the glass [1] | |
Boolean | haveExteriorShade | Set to true if window has exterior shade (at surface a) | |
Boolean | haveInteriorShade | Set to true if window has interior shade (at surface b) | |
Boolean | thisSideHasShade | Set to true if this side of the model has a shade |
Type | Name | Description |
---|---|---|
input RealInput | uSha | Input connector, used to scale the surface area to take into account an operable shading device, 0: unshaded; 1: fully shaded |
HeatPort_a | air | Port that connects to the air (room or outside) |
HeatPort_b | glaUns | Heat port that connects to unshaded part of glass |
HeatPort_b | glaSha | Heat port that connects to shaded part of glass |
HeatPort_a | frame | Heat port at window frame |
output RadiosityOutflow | JOutUns | Outgoing radiosity that connects to unshaded part of glass [W] |
input RadiosityInflow | JInUns | Incoming radiosity that connects to unshaded part of glass [W] |
output RadiosityOutflow | JOutSha | Outgoing radiosity that connects to shaded part of glass [W] |
input RadiosityInflow | JInSha | Incoming radiosity that connects to shaded part of glass [W] |
input RealInput | QAbs_flow | Solar radiation absorbed by shade [W] |
partial model PartialConvection "Partial model for heat convection between a possibly shaded window that can be outside or inside the room" parameter Modelica.SIunits.Area A "Heat transfer area of frame and window"; parameter Real fFra "Fraction of window frame divided by total window area"; final parameter Modelica.SIunits.Area AFra = fFra * A "Frame area"; final parameter Modelica.SIunits.Area AGla = A-AFra "Glass area"; parameter Modelica.SIunits.Emissivity epsLWSha_air "Long wave emissivity of shade surface that faces air"; parameter Modelica.SIunits.Emissivity epsLWSha_glass "Long wave emissivity of shade surface that faces glass"; parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_air "Long wave transmissivity of shade for radiation coming from the exterior or the room"; parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_glass "Long wave transmissivity of shade for radiation coming from the glass"; parameter Boolean linearizeRadiation "Set to true to linearize emissive power"; parameter Boolean haveExteriorShade "Set to true if window has exterior shade (at surface a)"; parameter Boolean haveInteriorShade "Set to true if window has interior shade (at surface b)"; final parameter Boolean windowHasShade = haveExteriorShade or haveInteriorShade "Set to true if window system has a shade"; parameter Boolean thisSideHasShade "Set to true if this side of the model has a shade";Modelica.Blocks.Interfaces.RealInput uSha if windowHasShade "Input connector, used to scale the surface area to take into account an operable shading device, 0: unshaded; 1: fully shaded"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a air "Port that connects to the air (room or outside)"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b glaUns "Heat port that connects to unshaded part of glass"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b glaSha if windowHasShade "Heat port that connects to shaded part of glass"; Modelica.Thermal.HeatTransfer.Components.Convection conWinUns "Convection from unshaded part of window to outside or room air"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a frame "Heat port at window frame"; Modelica.Thermal.HeatTransfer.Components.Convection conFra "Convective heat transfer between air and frame"; protected Modelica.Blocks.Math.Product proUns "Product for unshaded part of window"; Modelica.Blocks.Math.Product proSha if windowHasShade "Product for shaded part of window"; public ShadingSignal shaSig(haveShade=windowHasShade) "Conversion for shading signal"; Shade shade( final thisSideHasShade = thisSideHasShade, final A=AGla, final linearize=linearizeRadiation, final epsLW_air=if thisSideHasShade then epsLWSha_air else 0, final epsLW_glass=if thisSideHasShade then epsLWSha_glass else 0, final tauLW_air=if thisSideHasShade then tauLWSha_air else 1, final tauLW_glass=if thisSideHasShade then tauLWSha_glass else 1) if windowHasShade "Heat balance of shade"; Interfaces.RadiosityOutflow JOutUns "Outgoing radiosity that connects to unshaded part of glass"; Interfaces.RadiosityInflow JInUns "Incoming radiosity that connects to unshaded part of glass"; public Interfaces.RadiosityOutflow JOutSha if windowHasShade "Outgoing radiosity that connects to shaded part of glass"; Interfaces.RadiosityInflow JInSha if windowHasShade "Incoming radiosity that connects to shaded part of glass"; protected Radiosity.RadiositySplitter radShaOut "Radiosity that strikes shading device"; public Modelica.Blocks.Interfaces.RealInput QAbs_flow(unit="W", quantity="Power") if windowHasShade "Solar radiation absorbed by shade"; initial equation assert(( thisSideHasShade and windowHasShade) or (not thisSideHasShade), "Parameters \"thisSideHasShade\" and \"windowHasShade\" are not consistent. Check parameters"); equationconnect(conWinUns.fluid, air); connect(conFra.fluid, air); connect(conFra.solid, frame); connect(glaUns, conWinUns.solid); connect(proUns.y, conWinUns.Gc); connect(uSha, shaSig.u); connect(proSha.u2, shaSig.y); connect(shaSig.yCom, proUns.u1); connect(shade.Gc, proSha.y); connect(shade.air, air); connect(shade.glass, glaSha); connect(radShaOut.JOut_2,JOutUns); connect(shade.JOut_glass,JOutSha); connect(shade.JIn_glass,JInSha); connect(shaSig.y,radShaOut. u); connect(radShaOut.JOut_1, shade.JIn_air); connect(shade.u, shaSig.y); connect(shade.QAbs_flow, QAbs_flow); end PartialConvection;
QAbs_flow
needs to be connected to the short-wave radiation that is absorbed
by the glass pane.
The model computes the heat conduction between the two glass surfaces.
The heat flow QAbs_flow
is added at the center of the glass.
The model also computes the long-wave radiative heat balance using an instance
of the model
Buildings.HeatTransfer.Radiosity.WindowPane.
Extends from Buildings.HeatTransfer.Radiosity.BaseClasses.RadiosityTwoSurfaces (Model for the radiosity balance of a device with two surfaces), Buildings.HeatTransfer.Radiosity.BaseClasses.ParametersTwoSurfaces (Parameters that are used to model two surfaces with the same area).
Type | Name | Default | Description |
---|---|---|---|
Area | A | Surface area [m2] | |
Emissivity | epsLW_a | Long wave emissivity of surface a [1] | |
Emissivity | epsLW_b | Long wave emissivity of surface b [1] | |
ReflectionCoefficient | rhoLW_a | 1 - epsLW_a - tauLW | Long wave reflectivity of surface a [1] |
ReflectionCoefficient | rhoLW_b | 1 - epsLW_b - tauLW | Long wave reflectivity of surface b [1] |
TransmissionCoefficient | tauLW | Long wave transmissivity of glass pane [1] | |
Boolean | linearize | false | Set to true to linearize emissive power |
Temperature | T0 | 293.15 | Temperature used to linearize radiative heat transfer [K] |
Length | x | Material thickness [m] | |
ThermalConductivity | k | Thermal conductivity [W/(m.K)] |
Type | Name | Description |
---|---|---|
input RadiosityInflow | JIn_a | Incoming radiosity at surface a [W] |
input RadiosityInflow | JIn_b | Incoming radiosity at surface b [W] |
output RadiosityOutflow | JOut_a | Outgoing radiosity at surface a [W] |
output RadiosityOutflow | JOut_b | Outgoing radiosity at surface b [W] |
input RealInput | u | Input connector, used to scale the surface area to take into account an operable shading device |
HeatPort_a | port_a | Heat port at surface a |
HeatPort_b | port_b | Heat port at surface b |
input RealInput | QAbs_flow | Solar radiation absorbed by glass [W] |
model GlassLayer "Model for a glass layer of a window assembly" extends Buildings.HeatTransfer.Radiosity.BaseClasses.RadiosityTwoSurfaces; extends Buildings.HeatTransfer.Radiosity.BaseClasses.ParametersTwoSurfaces( final rhoLW_a=1-epsLW_a-tauLW, final rhoLW_b=1-epsLW_b-tauLW); parameter Modelica.SIunits.Length x "Material thickness"; parameter Modelica.SIunits.ThermalConductivity k "Thermal conductivity"; parameter Modelica.SIunits.Area A "Heat transfer area"; parameter Modelica.SIunits.Emissivity epsLW_a "Long wave emissivity of surface a (usually room-facing surface)"; parameter Modelica.SIunits.Emissivity epsLW_b "Long wave emissivity of surface b (usually outside-facing surface)"; parameter Modelica.SIunits.Emissivity tauLW "Long wave transmittance of glass";Modelica.Blocks.Interfaces.RealInput u "Input connector, used to scale the surface area to take into account an operable shading device"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a(T(start=293.15, nominal=293.15)) "Heat port at surface a"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b(T(start=293.15, nominal=293.15)) "Heat port at surface b"; Modelica.Blocks.Interfaces.RealInput QAbs_flow(unit="W", quantity="Power") "Solar radiation absorbed by glass"; parameter Boolean linearize=false "Set to true to linearize emissive power"; //protected Real T4_a(min=1E8, unit="K4", start=293.15^4, nominal=1E10) "4th power of temperature at surface a"; Real T4_b(min=1E8, unit="K4", start=293.15^4, nominal=1E10) "4th power of temperature at surface b"; Modelica.SIunits.HeatFlowRate E_a(min=0, nominal=1E2) "Emissive power of surface a"; Modelica.SIunits.HeatFlowRate E_b(min=0, nominal=1E2) "Emissive power of surface b"; final parameter Modelica.SIunits.ThermalResistance R = x/2/k/A "Thermal resistance from surface of glass to center of glass"; equation // Heat balance of surface node // These equations are from Window 6 Technical report, (2.1-14) to (2.1-17) 0 = port_a.Q_flow + port_b.Q_flow + QAbs_flow + JIn_a + JIn_b + JOut_a + JOut_b; //port_b.T-port_a.T = R/u * (2*port_b.Q_flow+QAbs_flow); u * (port_b.T-port_a.T) = 2*R * (-port_a.Q_flow-QAbs_flow/2-(epsLW_a*JIn_a-E_a)); // Radiosity balance T4_a = if linearize then T03 * port_a.T else port_a.T^4; T4_b = if linearize then T03 * port_b.T else port_b.T^4; // Emissive power E_a = u * A * epsLW_a * Modelica.Constants.sigma * T4_a; E_b = u * A * epsLW_b * Modelica.Constants.sigma * T4_b; // Radiosities that are outgoing from the surface, which are // equal to the long-wave emissivity plus the reflected incoming // radiosity plus the radiosity that is transmitted from the // other surface. -JOut_a = E_a + rhoLW_a * JIn_a + tauLW * JIn_b; -JOut_b = E_b + rhoLW_b * JIn_b + tauLW * JIn_a;end GlassLayer;
glaSys
.
The model contains these main component models:
extSha
and intSha
for the heat balance of the shade, modeled using
Buildings.HeatTransfer.WindowsBeta.BaseClasses.Shade.
glass
for the heat conduction and the
long-wave radiative heat balance of the glass layers.
There can be an arbitrary number of glass layers, which are all modeled using
instances of
Buildings.HeatTransfer.WindowsBeta.BaseClasses.GlassLayer.
gas
for the gas layers. There is one model of a
gas layer between each window panes. The gas layers are modeled using instances of
Buildings.HeatTransfer.WindowsBeta.BaseClasses.GasConvection.
Extends from Buildings.HeatTransfer.Radiosity.BaseClasses.RadiosityTwoSurfaces (Model for the radiosity balance of a device with two surfaces).
Type | Name | Default | Description |
---|---|---|---|
Area | A | Surface area [m2] | |
Angle | til | Surface tilt (only 90 degrees=vertical is implemented) [rad] | |
Generic | glaSys | Glazing system | |
Boolean | linearize | false | Set to true to linearize emissive power |
Type | Name | Description |
---|---|---|
input RadiosityInflow | JIn_a | Incoming radiosity at surface a [W] |
input RadiosityInflow | JIn_b | Incoming radiosity at surface b [W] |
output RadiosityOutflow | JOut_a | Outgoing radiosity at surface a [W] |
output RadiosityOutflow | JOut_b | Outgoing radiosity at surface b [W] |
input RealInput | u | Input connector, used to scale the surface area to take into account an operable shading device |
HeatPort_a | glass_a | Heat port connected to the outside facing surface of the glass |
HeatPort_b | glass_b | Heat port connected to the room-facing surface of the glass |
input RealInput | QAbs_flow[size(glass, 1)] | Solar radiation absorbed by glass [W] |
model CenterOfGlass "Model for center of glass of a window construction" extends Buildings.HeatTransfer.Radiosity.BaseClasses.RadiosityTwoSurfaces; parameter Modelica.SIunits.Area A "Heat transfer area"; parameter Modelica.SIunits.Angle til(displayUnit="deg") "Surface tilt (only 90 degrees=vertical is implemented)";parameter Buildings.HeatTransfer.Data.GlazingSystems.Generic glaSys "Glazing system"; Modelica.Blocks.Interfaces.RealInput u "Input connector, used to scale the surface area to take into account an operable shading device"; Buildings.HeatTransfer.WindowsBeta.BaseClasses.GlassLayer[glaSys.nLay] glass( each final A=A, final x[:]=glaSys.glass.x, final k[:]=glaSys.glass.k, final epsLW_a[:]=glaSys.glass.epsLW_a, final epsLW_b[:]=glaSys.glass.epsLW_a, final tauLW[:]=glaSys.glass.tauLW, each final linearize=linearize) "Window glass layer"; Buildings.HeatTransfer.WindowsBeta.BaseClasses.GasConvection gas[glaSys.nLay-1]( each final A=A, final gas[:]=glaSys.gas, each final til=til, each linearize=linearize) "Window gas layer"; // Note that the interior shade is flipped horizontally. Hence, surfaces a and b are exchanged, // i.e., surface a faces the room, while surface b faces the windowModelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glass_a "Heat port connected to the outside facing surface of the glass"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b glass_b "Heat port connected to the room-facing surface of the glass"; parameter Boolean linearize=false "Set to true to linearize emissive power";Modelica.Blocks.Interfaces.RealInput QAbs_flow[size(glass, 1)](each unit="W", each quantity = "Power") "Solar radiation absorbed by glass"; equation for i in 1:glaSys.nLay-1 loopconnect(glass[i].port_b, gas[i].port_a); connect(gas[i].port_b, glass[i+1].port_a); connect(glass[i].JOut_b, glass[i+1].JIn_a); connect(glass[i].JIn_b, glass[i+1].JOut_a); connect(u, gas[i].u); end for; for i in 1:glaSys.nLay loopconnect(u, glass[i].u); end for;connect(glass_b, glass[glaSys.nLay].port_b); connect(glass_a, glass[1].port_a); connect(JIn_a, glass[1].JIn_a); connect(glass[1].JOut_a, JOut_a); connect(glass[glaSys.nLay].JOut_b, JOut_b); connect(JIn_b, glass[glaSys.nLay].JIn_b); connect(glass.QAbs_flow, QAbs_flow); end CenterOfGlass;
To use this model, set the parameter til
to a value defined in
Buildings.RoomsBeta.Types.Tilt.
If the parameter linearize
is set to true
,
then all equations are linearized.
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Extends from Modelica.Thermal.HeatTransfer.Interfaces.Element1D (Partial heat transfer element with two HeatPort connectors that does not store energy), Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
Generic | gas | Thermophysical properties of gas fill | |
Area | A | Heat transfer area [m2] | |
Area | h | sqrt(A) | Height of window [m2] |
Angle | til | Surface tilt (only 0, 90 and 180 degrees are implemented) [rad] | |
Boolean | linearize | false | Set to true to linearize emissive power |
Temperature | T0 | 293.15 | Temperature used to compute thermophysical properties [K] |
Type | Name | Description |
---|---|---|
input RealInput | u | Input connector, used to scale the surface area to take into account an operable shading device |
model GasConvection "Model for heat convection through gas in a window assembly" extends Modelica.Thermal.HeatTransfer.Interfaces.Element1D( port_a(T(start=293.15)), port_b(T(start=293.15))); extends Buildings.BaseClasses.BaseIcon; parameter Buildings.HeatTransfer.Data.Gases.Generic gas "Thermophysical properties of gas fill"; parameter Modelica.SIunits.Area A "Heat transfer area"; parameter Modelica.SIunits.Area h(min=0) = sqrt(A) "Height of window"; parameter Modelica.SIunits.Angle til(displayUnit="deg") "Surface tilt (only 0, 90 and 180 degrees are implemented)"; parameter Boolean linearize=false "Set to true to linearize emissive power";Modelica.Blocks.Interfaces.RealInput u "Input connector, used to scale the surface area to take into account an operable shading device"; parameter Modelica.SIunits.Temperature T0 = 293.15 "Temperature used to compute thermophysical properties"; Modelica.SIunits.CoefficientOfHeatTransfer hCon(min=0, start=3) "Convective heat transfer coefficient"; Modelica.SIunits.HeatFlux q_flow "Convective heat flux"; Real Nu(min=0) "Nusselt number"; Real Ra(min=0) "Raleigh number"; protected Modelica.SIunits.Temperature T_a "Temperature used for thermophysical properties at port_a"; Modelica.SIunits.Temperature T_b "Temperature used for thermophysical properties at port_b"; Modelica.SIunits.Temperature T_m "Temperature used for thermophysical properties"; Real deltaNu(min=0.01) = 0.1 "Small value for Nusselt number, used for smoothing"; Real deltaRa(min=0.01) = 100 "Small value for Raleigh number, used for smoothing"; final parameter Real cosTil=Modelica.Math.cos(til) "Cosine of window tilt"; final parameter Real sinTil=Modelica.Math.sin(til) "Sine of window tilt"; final parameter Boolean isVertical = abs(cosTil) < 10E-10 "Flag, true if the window is in a wall"; final parameter Boolean isHorizontal = abs(sinTil) < 10E-10 "Flag, true if the window is horizontal"; // Quantities that are only used in linearized model parameter Modelica.SIunits.CoefficientOfHeatTransfer hCon0(fixed=false) "Convective heat transfer coefficient"; parameter Real Nu0(fixed=false, min=0) "Nusselt number"; parameter Real Ra0(fixed=false, min=0) "Raleigh number"; initial equation assert(isVertical or isHorizontal, "Only vertical and horizontal windows are implemented."); initial equation // Computations that are used in the linearized model only Ra0 = Buildings.HeatTransfer.Functions.ConvectiveHeatFlux.raleigh( x=gas.x, rho=Buildings.HeatTransfer.Data.Gases.density(gas, T0), c_p=Buildings.HeatTransfer.Data.Gases.specificHeatCapacity(gas, T0), mu=Buildings.HeatTransfer.Data.Gases.dynamicViscosity(gas, T0), k=Buildings.HeatTransfer.Data.Gases.thermalConductivity(gas, T0), T_a=T0-5, T_b=T0+5, Ra_min=100); (Nu0, hCon0) = Buildings.HeatTransfer.WindowsBeta.BaseClasses.convectionVerticalCavity( gas=gas, Ra=Ra0, T_m=T0, dT=10, h=h, deltaNu=deltaNu, deltaRa=deltaRa); equation T_a = port_a.T; T_b = port_b.T; T_m = (port_a.T+port_b.T)/2; if linearize then Ra=Ra0; Nu=Nu0; hCon=hCon0; q_flow = hCon0 * dT; else Ra = Buildings.HeatTransfer.Functions.ConvectiveHeatFlux.raleigh( x=gas.x, rho=Buildings.HeatTransfer.Data.Gases.density(gas, T_m), c_p=Buildings.HeatTransfer.Data.Gases.specificHeatCapacity(gas, T_m), mu=Buildings.HeatTransfer.Data.Gases.dynamicViscosity(gas, T_m), k=Buildings.HeatTransfer.Data.Gases.thermalConductivity(gas, T_m), T_a=T_a, T_b=T_b, Ra_min=100); if isVertical then (Nu, hCon, q_flow) = Buildings.HeatTransfer.WindowsBeta.BaseClasses.convectionVerticalCavity( gas=gas, Ra=Ra, T_m=T_m, dT=dT, h=h, deltaNu=deltaNu, deltaRa=deltaRa); elseif isHorizontal then (Nu, hCon, q_flow) = Buildings.HeatTransfer.WindowsBeta.BaseClasses.convectionHorizontalCavity( gas=gas, Ra=Ra, T_m=T_m, dT=dT, til=til, sinTil=sinTil, cosTil=cosTil, h=h, deltaNu=deltaNu, deltaRa=deltaRa); else Nu = 0; hCon=0; q_flow=0; end if; // isVertical or isHorizontal end if; // linearize Q_flow = u*A*q_flow;end GasConvection;
This is a model for transport of heat without storing it.
It is identical to the thermal conductor from the Modelica Standard Library,
except that it adds an input signal u
.
Extends from Modelica.Thermal.HeatTransfer.Interfaces.Element1D (Partial heat transfer element with two HeatPort connectors that does not store energy), Buildings.BaseClasses.BaseIconLow (Base icon with model name below the icon).
Type | Name | Default | Description |
---|---|---|---|
ThermalConductance | G | Constant thermal conductance of material [W/K] |
Type | Name | Description |
---|---|---|
HeatPort_a | port_a | |
HeatPort_b | port_b | |
input RealInput | u | Input signal for thermal conductance |
model ThermalConductor "Lumped thermal element with variable area, transporting heat without storing it" extends Modelica.Thermal.HeatTransfer.Interfaces.Element1D; extends Buildings.BaseClasses.BaseIconLow; parameter Modelica.SIunits.ThermalConductance G "Constant thermal conductance of material";Modelica.Blocks.Interfaces.RealInput u(min=0) "Input signal for thermal conductance"; equation Q_flow = u*G*dT;end ThermalConductor;
u
or by 1-u
(if a shade is present), the heat balance can be singular
for u=0
or for u=1
.
This model avoids this singularity by slightly changing the control signal.
Extends from Modelica.Blocks.Interfaces.SO (Single Output continuous control block).
Type | Name | Default | Description |
---|---|---|---|
Boolean | haveShade | Set to true if a shade is present |
Type | Name | Description |
---|---|---|
output RealOutput | y | Connector of Real output signal |
input RealInput | u | Shading control signal, 0: unshaded; 1: fully shaded |
output RealOutput | yCom | 1-u |
block ShadingSignal "Converts the shading signal to be strictly bigger than 0 and smaller than 1" extends Modelica.Blocks.Interfaces.SO; parameter Boolean haveShade "Set to true if a shade is present";Modelica.Blocks.Interfaces.RealInput u if haveShade "Shading control signal, 0: unshaded; 1: fully shaded"; Modelica.Blocks.Interfaces.RealOutput yCom "1-u"; protected constant Real y0 = 1E-6 "Smallest allowed value for y if a shade is present"; constant Real k = 1-2*y0 "Gain for shading signal"; Modelica.Blocks.Interfaces.RealInput u_in_internal "Needed to connect to conditional connector"; equation connect(u, u_in_internal); if not haveShade then u_in_internal = 0; end if; if haveShade then y = y0 + k * u_in_internal; yCom = 1-y; else y = 0; yCom = 1; end if;end ShadingSignal;
h = 4+4 v
where v is the wind speed in m/s and h is the convective heat transfer coefficient in W/(m2*K).TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).
Type | Name | Default | Description |
---|---|---|---|
Area | A | Heat transfer area [m2] |
Type | Name | Description |
---|---|---|
output RealOutput | GCon | Convective thermal conductance [W/K] |
input RealInput | v | Wind speed [m/s] |
model ExteriorConvectionCoefficient "Model for the heat transfer coefficient at the outside of the window" extends Modelica.Blocks.Interfaces.BlockIcon; parameter Modelica.SIunits.Area A "Heat transfer area";Modelica.Blocks.Interfaces.RealOutput GCon(unit="W/K") "Convective thermal conductance"; Modelica.Blocks.Interfaces.RealInput v(unit="m/s") "Wind speed"; equation GCon = A*(4+4*Buildings.Utilities.Math.Functions.smoothMax(v, -v, 0.1));end ExteriorConvectionCoefficient;
h = 4 W ⁄ (m2 K).
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).
Type | Name | Default | Description |
---|---|---|---|
Area | A | Heat transfer area [m2] |
Type | Name | Description |
---|---|---|
output RealOutput | GCon | Convective thermal conductance [W/K] |
model InteriorConvectionCoefficient "Model for the heat transfer coefficient at the inside of the window" extends Modelica.Blocks.Interfaces.BlockIcon; parameter Modelica.SIunits.Area A "Heat transfer area";Modelica.Blocks.Interfaces.RealOutput GCon(unit="W/K") "Convective thermal conductance"; equation GCon = 4*A;end InteriorConvectionCoefficient;
Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block), Buildings.HeatTransfer.WindowsBeta.BaseClasses.RadiationBaseData (Define base parameters for window radiation calculation).
Type | Name | Default | Description |
---|---|---|---|
Boolean | haveExteriorShade | Set to true if window has an exterior shade | |
Boolean | haveInteriorShade | Set to true if window has an interior shade | |
Area | AWin | Area of window [m2] | |
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
Type | Name | Description |
---|---|---|
input RealInput | uSha | Control signal for shading (0: unshaded; 1: fully shaded) |
input RealInput | HDif | Diffussive solar radiation [W/m2] |
input RealInput | incAng | Incident angle [rad] |
input RealInput | HDir | Direct solar radiation [W/m2] |
partial block PartialRadiation "Partial model for variables and data used in radiation calculation" extends Modelica.Blocks.Interfaces.BlockIcon; extends Buildings.HeatTransfer.WindowsBeta.BaseClasses.RadiationBaseData; ////////////////// Parameters that are not used by RadiationData parameter Boolean haveExteriorShade "Set to true if window has an exterior shade"; parameter Boolean haveInteriorShade "Set to true if window has an interior shade"; parameter Modelica.SIunits.Area AWin "Area of window"; ////////////////// Derived parameters final parameter Boolean haveShade=haveExteriorShade or haveInteriorShade "Set to true if window has a shade";final parameter Buildings.HeatTransfer.WindowsBeta.BaseClasses.RadiationData radDat( final N=N, final tauGlaSW=tauGlaSW, final rhoGlaSW_a=rhoGlaSW_a, final rhoGlaSW_b=rhoGlaSW_b, final tauShaSW_a=tauShaSW_a, final tauShaSW_b=tauShaSW_b, final rhoShaSW_a=rhoShaSW_a, final rhoShaSW_b=rhoShaSW_b) "Optical properties of window for different irradiation angles"; Modelica.Blocks.Interfaces.RealInput uSha(min=0, max=1) if haveShade "Control signal for shading (0: unshaded; 1: fully shaded)"; Modelica.Blocks.Interfaces.RealInput HDif(quantity="RadiantEnergyFluenceRate", unit="W/m2") "Diffussive solar radiation"; Modelica.Blocks.Interfaces.RealInput incAng( final quantity="Angle", final unit="rad", displayUnit="deg") "Incident angle"; Modelica.Blocks.Interfaces.RealInput HDir(quantity="RadiantEnergyFluenceRate", unit="W/m2") "Direct solar radiation"; protected Modelica.Blocks.Interfaces.RealInput uSha_internal(min=0, max=1) "Control signal for shading (0: unshaded; 1: fully shaded)"; initial equation /* Current model assumes that the window only has either an interior or exterior shade. Warn user if it has an interior and exterior shade. Allowing both shades at the same time would require rewriting part of the model. */ assert(not (haveExteriorShade and haveInteriorShade), "Window radiation model does not support an exterior and interior shade at the same time."); equation // Connect statement for conditionally removed connector uSha connect(uSha, uSha_internal); if (not haveShade) then uSha_internal = 0; end if;end PartialRadiation;
The absorbed radiation by exterior shades includes:
AWin*uSha*(HDir+HDif)*(1-tau-rho)
AWin*uSha*HDir*tau*rho(IncAng)*(1-tau-rho)
AWin*uSha*HDif*tau*rho(HEM)*(1-tau-rho)
absRad[2, 1]
The absorbed radiation by interior shades includes:
AWin*uSha*HDir*alpha(IncAng)
AWin*uSha*HDif*alpha(HEM)
AWin*uSha*HRoo*(1-tau-rho)
absRad[2, N+2]
The absorbed radiation by glass includes:
AWin*(1-uSha)*(HDif*alphaEx(HEM)+HRoo*alphaIn(HEM))
AWin*(1-uSha)*HDir*alphaEx(IncAng)
AWin*uSha*(HDif*alphaExSha(HEM)+HRoo*alphaInSha(HEM))
AWin*uSha*HDir*alphaExSha(IncAng)
absRad[1, 2:N+1] = Part1 + Part2; absRad[2, 2:N+1] = Part3 + Part4
Extends from Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation (Partial model for variables and data used in radiation calculation).
Type | Name | Default | Description |
---|---|---|---|
Boolean | haveExteriorShade | Set to true if window has an exterior shade | |
Boolean | haveInteriorShade | Set to true if window has an interior shade | |
Area | AWin | Area of window [m2] | |
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
Type | Name | Description |
---|---|---|
input RealInput | uSha | Control signal for shading (0: unshaded; 1: fully shaded) |
input RealInput | HDif | Diffussive solar radiation [W/m2] |
input RealInput | incAng | Incident angle [rad] |
input RealInput | HDir | Direct solar radiation [W/m2] |
input RealInput | HRoo | Diffussive radiation from room [W/m2] |
output RealOutput | QAbsExtSha_flow | Absorbed interior and exterior radiation by exterior shading device [W] |
output RealOutput | QAbsIntSha_flow | Absorbed interior and exterior radiation by interior shading device [W] |
output RealOutput | QAbsGlaUns_flow[N] | Absorbed interior and exterior radiation by unshaded part of glass [W] |
output RealOutput | QAbsGlaSha_flow[N] | Absorbed interior and exterior radiation by shaded part of glass [W] |
block AbsorbedRadiation "Absorbed radiation by window" extends Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation;Modelica.Blocks.Interfaces.RealInput HRoo(quantity="RadiantEnergyFluenceRate", unit="W/m2") "Diffussive radiation from room "; Modelica.Blocks.Interfaces.RealOutput QAbsExtSha_flow(final quantity="Power", final unit="W") "Absorbed interior and exterior radiation by exterior shading device"; Modelica.Blocks.Interfaces.RealOutput QAbsIntSha_flow(final quantity="Power", final unit="W") "Absorbed interior and exterior radiation by interior shading device"; Modelica.Blocks.Interfaces.RealOutput QAbsGlaUns_flow[N](each quantity= "Power", each final unit="W") "Absorbed interior and exterior radiation by unshaded part of glass"; Modelica.Blocks.Interfaces.RealOutput QAbsGlaSha_flow[N](each quantity= "Power", each final unit="W") "Absorbed interior and exterior radiation by shaded part of glass"; output Modelica.SIunits.Power absRad[2, N + 2] "Absorbed interior and exterior radiation. (absRad[2,1]: exterior shading device, absRad[1,2 to N+1]: glass (unshaded part), absRad[2,2 to N+1]: glass (shaded part), absRad[2,N+2]: interior shading device)"; protected Integer k=1; Real x; final parameter Integer NDIR=radDat.NDIR; final parameter Integer HEM=radDat.HEM; constant Integer NoShade=1; constant Integer Shade=2; constant Integer Interior=1; constant Integer Exterior=2; final parameter Real coeAbsEx[2, radDat.N, radDat.HEM + 2](fixed=false); final parameter Real coeRefExtPan1[radDat.HEM + 2](fixed=false) "Reflectivity of pane 1"; final parameter Real coeAbsIn[2, radDat.N](fixed=false); final parameter Real coeAbsDevExtIrrIntSha[radDat.HEM + 2](fixed=false) "Absorptivity of interior shading device for exterior radiation"; final parameter Real coeAbsDevExtIrrExtSha=1 - radDat.traRefShaDev[1, 1] - radDat.traRefShaDev[2, 1] "Absorptivity of exterior shading device for exterior radiation"; final parameter Real coeAbsDevIntIrrIntSha=radDat.devAbsIntIrrIntSha "Absorptivity of interior shading device for interior radiation"; final parameter Real coeAbsDevIntIrrExtSha=1 - radDat.winTraRefIntIrrExtSha[1] - radDat.winTraRefIntIrrExtSha[2] "Absorptivity of exterior shading device for interior radiation"; Real tmpNoSha; Real tmpSha; Real incAng2; initial algorithm //************************************************************** // Assign coefficients. // Data dimension changes from Orginal ([1 : HEM]) to New ([2 : HEM+1]) // with 2 dummy variable for interpolation. //************************************************************** // Glass for i in 1:N loop for j in 1:HEM loop // Properties for glass without shading coeAbsEx[NoShade, i, j + 1] := radDat.absExtIrrNoSha[i, j]; coeAbsIn[NoShade, i] := radDat.absIntIrrNoSha[i]; // Properties for glass with shading if haveInteriorShade then coeAbsEx[Shade, i, j + 1] := radDat.absExtIrrIntSha[i, j]; coeAbsIn[Shade, i] := radDat.absIntIrrIntSha[i]; elseif haveExteriorShade then coeAbsEx[Shade, i, j + 1] := radDat.absExtIrrExtSha[i, j]; coeAbsIn[Shade, i] := radDat.absIntIrrExtSha[i]; else // No Shade coeAbsEx[Shade, i, j + 1] := 0.0; coeAbsIn[Shade, i] := 0.0; end if; end for; // Dummy variables at 1 and HEM+2 for k in NoShade:Shade loop coeAbsEx[k, i, 1] := coeAbsEx[k, i, 2]; coeAbsEx[k, i, HEM + 2] := coeAbsEx[k, i, HEM + 1]; end for; end for; // Glass Pane 1: Reflectivity for j in 1:HEM loop coeRefExtPan1[j + 1] := radDat.traRef[2, 1, N, j]; end for; // Interior shades for j in 1:HEM loop coeAbsDevExtIrrIntSha[j + 1] := radDat.devAbsExtIrrIntShaDev[j]; end for; // Dummy variables at 1 and HEM+2 coeRefExtPan1[1] := coeRefExtPan1[2]; coeRefExtPan1[HEM + 2] := coeRefExtPan1[HEM + 1]; coeAbsDevExtIrrIntSha[1] := coeAbsDevExtIrrIntSha[2]; coeAbsDevExtIrrIntSha[HEM + 2] := coeAbsDevExtIrrIntSha[HEM + 1]; algorithm absRad[NoShade, 1] := 0.0; absRad[NoShade, N + 2] := 0.0; absRad[Shade, 1] := 0.0; absRad[Shade, N + 2] := 0.0; //************************************************************** // Glass: absorbed diffusive radiation from exterior and interior sources //************************************************************** for i in 1:N loop absRad[NoShade, i + 1] := AWin*(1 - uSha_internal)*(HDif*coeAbsEx[NoShade, i, HEM + 1] + HRoo*coeAbsIn[NoShade, i]); absRad[Shade, i + 1] := AWin*uSha_internal*(HDif*coeAbsEx[Shade, i, HEM + 1] + HRoo*coeAbsIn[Shade, i]); end for; //************************************************************** // Shading device: absorbed radiation from exterior source //************************************************************** // Exterior Shading Device: // direct radiation: 1. direct absorption; // diffusive radiation: 1. direct absorption 2. absorption from back reflection if haveExteriorShade then absRad[Shade, 1] := AWin*uSha_internal*coeAbsDevExtIrrExtSha*(HDif + HDir + HDif*radDat.traRefShaDev[1, 1]*radDat.traRef[2, 1, N, HEM]); // Interior Shading Device: diffusive radiation from both interior and exterior elseif haveInteriorShade then absRad[Shade, N + 2] := AWin*uSha_internal*(HDif*radDat.devAbsExtIrrIntShaDev[ HEM] + HRoo*coeAbsDevIntIrrIntSha); end if; //************************************************************** // Glass, Device: add absorbed direct radiation from exterior sources //************************************************************** // Use min() instead of if() to avoid event incAng2 := min(incAng, 0.5*Modelica.Constants.pi); x := 2*(NDIR - 1)*abs(incAng2)/Modelica.Constants.pi "x=(index-1)*incAng/(0.5pi), 0<=x<=NDIR"; x := x + 2; for i in 1:N loop // Glass without shading: Add absorbed direct radiation tmpNoSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation({ coeAbsEx[NoShade, i, k] for k in 1:(HEM + 2)}, x); absRad[NoShade, i + 1] := absRad[NoShade, i + 1] + AWin*HDir*(1 - uSha_internal)*tmpNoSha; // Glass with shading: add absorbed direct radiation tmpSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation({ coeAbsEx[Shade, i, k] for k in 1:(HEM + 2)}, x); absRad[Shade, i + 1] := absRad[Shade, i + 1] + AWin*HDir*uSha_internal* tmpSha; end for; // Interior shading device: add absorbed direct radiation if haveInteriorShade then tmpSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation({ coeAbsDevExtIrrIntSha[k] for k in 1:(HEM + 2)}, x); absRad[Shade, N + 2] := absRad[Shade, N + 2] + AWin*HDir*uSha_internal* tmpSha; end if; // Exterior shading device: add absorbed reflection of direct radiation from exterior source if haveExteriorShade then tmpNoSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation({ coeRefExtPan1[k] for k in 1:(HEM + 2)}, x); absRad[Shade, 1] := absRad[Shade, 1] + AWin*HDir*uSha_internal* coeAbsDevExtIrrExtSha*tmpNoSha; end if; // Assign quantities to output connectors QAbsExtSha_flow := absRad[2, 1]; QAbsIntSha_flow := absRad[2, N + 2]; QAbsGlaUns_flow[:] := absRad[1, 2:N + 1]; QAbsGlaSha_flow[:] := absRad[2, 2:N + 1];end AbsorbedRadiation;
The transmitted exterior radiation for window system includes:
AWin*(1-uSha)*HDif*tau(HEM)
AWin*(1-uSha)*HDir*tau(IncAng)
AWin*uSha*HDif*tauSha(HEM)
AWin*uSha*HDir*tauSha(IncAng);
QTra_flow = Part1 + Part2 + Part3 + Part4
Extends from Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation (Partial model for variables and data used in radiation calculation).
Type | Name | Default | Description |
---|---|---|---|
Boolean | haveExteriorShade | Set to true if window has an exterior shade | |
Boolean | haveInteriorShade | Set to true if window has an interior shade | |
Area | AWin | Area of window [m2] | |
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
Type | Name | Description |
---|---|---|
input RealInput | uSha | Control signal for shading (0: unshaded; 1: fully shaded) |
input RealInput | HDif | Diffussive solar radiation [W/m2] |
input RealInput | incAng | Incident angle [rad] |
input RealInput | HDir | Direct solar radiation [W/m2] |
output RealOutput | QTra_flow | Transmitted exterior radiation through the window. (1: no shade; 2: shade) [W] |
block TransmittedRadiation "Transmitted radiation through window" extends Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation;Modelica.Blocks.Interfaces.RealOutput QTra_flow(final quantity="Power", final unit="W") "Transmitted exterior radiation through the window. (1: no shade; 2: shade)"; final parameter Real traCoeRoo(fixed=false) "Transmitivity of the window glass for interior radiation without shading"; output Modelica.SIunits.Power QTraUns_flow "Transmitted solar radiation through unshaded part of window"; output Modelica.SIunits.Power QTraSha_flow "Transmitted solar radiation through shaded part of window"; protected Integer k=1; Real x; final parameter Integer NDIR=radDat.NDIR; final parameter Integer HEM=radDat.HEM; constant Integer NoShade=1; constant Integer Shade=2; constant Integer Interior=1; constant Integer Exterior=2; final parameter Real coeTraWinExtIrr[2, radDat.HEM + 2](fixed=false); Real tmpNoSha; Real tmpSha; Real incAng2; initial algorithm //************************************************************** // Assign coefficients. // Data dimension from Orginal ([1 : HEM]) to New ([2 : HEM+1]) // with 2 dummy variable for interpolation. //************************************************************** // Glass for j in 1:HEM loop // Properties for glass without shading coeTraWinExtIrr[NoShade, j + 1] := radDat.traRef[1, 1, N, j]; // Properties for glass with shading if haveInteriorShade then coeTraWinExtIrr[Shade, j + 1] := radDat.winTraExtIrrIntSha[j]; elseif haveExteriorShade then coeTraWinExtIrr[Shade, j + 1] := radDat.winTraExtIrrExtSha[j]; else // No Shade coeTraWinExtIrr[Shade, j + 1] := 0.0; end if; end for; // Dummy variables at 1 and HEM+2 for k in NoShade:Shade loop coeTraWinExtIrr[k, 1] := coeTraWinExtIrr[k, 2]; coeTraWinExtIrr[k, HEM + 2] := coeTraWinExtIrr[k, HEM + 1]; end for; //************************************************************** // Glass: transmissivity for interior irradiation //************************************************************** traCoeRoo := radDat.traRef[1, N, 1, HEM]; equation //************************************************************** // Window: transmitted radiation for diffusive radiation from exterior sources //************************************************************** algorithm QTraUns_flow := AWin*HDif*(1 - uSha_internal)*coeTraWinExtIrr[NoShade, HEM + 1]; QTraSha_flow := AWin*HDif*uSha_internal*coeTraWinExtIrr[Shade, HEM + 1]; //************************************************************** // Glass, Device: add absorbed radiation (angular part) from exterior sources //************************************************************** // Use min() instead of if() to avoid event incAng2 := min(incAng, 0.5*Modelica.Constants.pi); x := 2*(NDIR - 1)*abs(incAng2)/Modelica.Constants.pi "x=(index-1)*incAng/(0.5pi), 0<=x<=NDIR-1"; x := x + 2; // Window unshaded parts: add transmitted radiation for angular radiation tmpNoSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation({ coeTraWinExtIrr[NoShade, k] for k in 1:(HEM + 2)}, x); QTraUns_flow := QTraUns_flow + AWin*HDir*(1 - uSha_internal)*tmpNoSha; // Window shaded parts: add transmitted radiation for angular radiation tmpSha := Buildings.HeatTransfer.WindowsBeta.BaseClasses.smoothInterpolation( {coeTraWinExtIrr[Shade, k] for k in 1:(HEM + 2)}, x); QTraSha_flow := QTraSha_flow + AWin*HDir*uSha_internal*tmpSha; // Assign quantities to output connectors QTra_flow := QTraUns_flow + QTraSha_flow;end TransmittedRadiation;
The absorbed radiation by exterior shades includes:
AWin*uSha*(HDir+HDif)*(1-tau-rho)
AWin*uSha*HDir*tau*rho(IncAng)*(1-tau-rho)
AWin*uSha*HDif*tau*rho(HEM)*(1-tau-rho)
absRad[2, 1]
The absorbed radiation by interior shades includes:
AWin*uSha*HDir*alpha(IncAng)
AWin*uSha*HDif*alpha(HEM)
AWin*uSha*HRoo*(1-tau-rho)
absRad[2, N+2]
The absorbed radiation by glass includes:
AWin*(1-uSha)*(HDif*alphaEx(HEM)+HRoo*alphaIn(HEM))
AWin*(1-uSha)*HDir*alphaEx(IncAng)
AWin*uSha*(HDif*alphaExSha(HEM)+HRoo*alphaInSha(HEM))
AWin*uSha*HDir*alphaExSha(IncAng)
absRad[1, 2:N+1] = Part1 + Part2; absRad[2, 2:N+1] = Part3 + Part4
The transmitted exterior radiation for window system includes:
AWin*(1-uSha)*HDif*tau(HEM)
AWin*(1-uSha)*HDir*tau(IncAng)
AWin*uSha*HDif*tauSha(HEM)
AWin*uSha*HDir*tauSha(IncAng);
QTra_flow = Part1 + Part2 + Part3 + Part4
Extends from Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation (Partial model for variables and data used in radiation calculation).
Type | Name | Default | Description |
---|---|---|---|
Boolean | haveExteriorShade | Set to true if window has an exterior shade | |
Boolean | haveInteriorShade | Set to true if window has an interior shade | |
Area | AWin | Area of window [m2] | |
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
Type | Name | Description |
---|---|---|
input RealInput | uSha | Control signal for shading (0: unshaded; 1: fully shaded) |
input RealInput | HDif | Diffussive solar radiation [W/m2] |
input RealInput | incAng | Incident angle [rad] |
input RealInput | HDir | Direct solar radiation [W/m2] |
input RealInput | HRoo | Diffussive radiation from room [W/m2] |
output RealOutput | QTra_flow | Transmitted exterior radiation through the window. (1: no shade; 2: shade) [W] |
output RealOutput | QAbsExtSha_flow | Absorbed interior and exterior radiation by exterior shading device [W] |
output RealOutput | QAbsIntSha_flow | Absorbed interior and exterior radiation by interior shading device [W] |
output RealOutput | QAbsGlaUns_flow[N] | Absorbed interior and exterior radiation by unshaded part of glass [W] |
output RealOutput | QAbsGlaSha_flow[N] | Absorbed interior and exterior radiation by shaded part of glass [W] |
block WindowRadiation "Calculation radiation for window" extends Buildings.HeatTransfer.WindowsBeta.BaseClasses.PartialRadiation;Modelica.Blocks.Interfaces.RealInput HRoo(quantity="RadiantEnergyFluenceRate", unit="W/m2") "Diffussive radiation from room "; Modelica.Blocks.Interfaces.RealOutput QTra_flow(final quantity="Power", final unit="W") "Transmitted exterior radiation through the window. (1: no shade; 2: shade)"; Modelica.Blocks.Interfaces.RealOutput QAbsExtSha_flow(final quantity="Power", final unit="W") "Absorbed interior and exterior radiation by exterior shading device"; Modelica.Blocks.Interfaces.RealOutput QAbsIntSha_flow(final quantity="Power", final unit="W") "Absorbed interior and exterior radiation by interior shading device"; Modelica.Blocks.Interfaces.RealOutput QAbsGlaUns_flow[N](each quantity= "Power", each final unit="W") "Absorbed interior and exterior radiation by unshaded part of glass"; Modelica.Blocks.Interfaces.RealOutput QAbsGlaSha_flow[N](each quantity= "Power", each final unit="W") "Absorbed interior and exterior radiation by shaded part of glass"; Buildings.HeatTransfer.WindowsBeta.BaseClasses.TransmittedRadiation tra( final N=N, final tauGlaSW=tauGlaSW, final rhoGlaSW_a=rhoGlaSW_a, final rhoGlaSW_b=rhoGlaSW_b, final tauShaSW_a=tauShaSW_a, final rhoShaSW_a=rhoShaSW_a, final rhoShaSW_b=rhoShaSW_b, final haveExteriorShade=haveExteriorShade, final haveInteriorShade=haveInteriorShade, final AWin=AWin, final tauShaSW_b=tauShaSW_b); Buildings.HeatTransfer.WindowsBeta.BaseClasses.AbsorbedRadiation abs( final N=N, final tauGlaSW=tauGlaSW, final rhoGlaSW_a=rhoGlaSW_a, final rhoGlaSW_b=rhoGlaSW_b, final tauShaSW_a=tauShaSW_a, final tauShaSW_b=tauShaSW_b, final rhoShaSW_a=rhoShaSW_a, final rhoShaSW_b=rhoShaSW_b, final haveExteriorShade=haveExteriorShade, final haveInteriorShade=haveInteriorShade, final AWin=AWin); protected final parameter Boolean noShade = not (haveExteriorShade or haveInteriorShade) "Flag, true if the window has a shade"; equation if noShade then assert(uSha_internal < 1E-6, "Window has no shade, but control signal is non-zero.\n" + " Received uSha_internal = " + realString(uSha_internal)); end if;connect(HDif, tra.HDif); connect(HDif, abs.HDif); connect(HDir, tra.HDir); connect(HDir, abs.HDir); connect(incAng, tra.incAng); connect(incAng, abs.incAng); connect(HRoo, abs.HRoo); connect(tra.uSha, uSha); connect(abs.uSha, uSha); connect(tra.QTra_flow, QTra_flow); connect(abs.QAbsIntSha_flow, QAbsIntSha_flow); connect(abs.QAbsGlaSha_flow, QAbsGlaSha_flow); connect(abs.QAbsGlaUns_flow, QAbsGlaUns_flow); connect(abs.QAbsExtSha_flow, QAbsExtSha_flow); end WindowRadiation;
Type | Name | Default | Description |
---|---|---|---|
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
partial record RadiationBaseData "Define base parameters for window radiation calculation" parameter Integer N(min=1) "Number of glass layers"; parameter Modelica.SIunits.TransmissionCoefficient tauGlaSW[N] "Short wave transmissivity of glass"; parameter Modelica.SIunits.ReflectionCoefficient rhoGlaSW_a[N] "Short wave reflectivity of glass at surface a (facing outside)"; parameter Modelica.SIunits.ReflectionCoefficient rhoGlaSW_b[N] "Short wave reflectivity of glass at surface b (facing room-side)"; parameter Modelica.SIunits.TransmissionCoefficient tauShaSW_a "Short wave transmissivity of shade for irradiation from air-side"; parameter Modelica.SIunits.TransmissionCoefficient tauShaSW_b "Short wave transmissivity of shade for irradiation from glass-side"; parameter Modelica.SIunits.ReflectionCoefficient rhoShaSW_a "Short wave reflectivity of shade for irradiation from air-side"; parameter Modelica.SIunits.ReflectionCoefficient rhoShaSW_b "Short wave reflectivity of shade for irradiation from glass-side";end RadiationBaseData;
Extends from Modelica.Icons.Record (Icon for a record), Buildings.HeatTransfer.WindowsBeta.BaseClasses.RadiationBaseData (Define base parameters for window radiation calculation).
Type | Name | Default | Description |
---|---|---|---|
Glass | |||
Integer | N | Number of glass layers | |
TransmissionCoefficient | tauGlaSW[N] | Short wave transmissivity of glass [1] | |
ReflectionCoefficient | rhoGlaSW_a[N] | Short wave reflectivity of glass at surface a (facing outside) [1] | |
ReflectionCoefficient | rhoGlaSW_b[N] | Short wave reflectivity of glass at surface b (facing room-side) [1] | |
Shade | |||
TransmissionCoefficient | tauShaSW_a | Short wave transmissivity of shade for irradiation from air-side [1] | |
TransmissionCoefficient | tauShaSW_b | Short wave transmissivity of shade for irradiation from glass-side [1] | |
ReflectionCoefficient | rhoShaSW_a | Short wave reflectivity of shade for irradiation from air-side [1] | |
ReflectionCoefficient | rhoShaSW_b | Short wave reflectivity of shade for irradiation from glass-side [1] |
record RadiationData "Radiation property of a window" extends Modelica.Icons.Record; extends Buildings.HeatTransfer.WindowsBeta.BaseClasses.RadiationBaseData; final parameter Real glass[3, N]={tauGlaSW,rhoGlaSW_a,rhoGlaSW_b} "Glass solar transmissivity, solar reflectivity at surface a and b, at normal incident angle"; final parameter Real traRefShaDev[2, 2]={{tauShaSW_a,tauShaSW_b},{rhoShaSW_a, rhoShaSW_b}} "Shading device property"; final parameter Integer NDIR=10 "Number of incident angles"; final parameter Integer HEM=NDIR + 1 "Index of hemispherical integration"; final parameter Modelica.SIunits.Angle psi[NDIR]= Buildings.HeatTransfer.WindowsBeta.Functions.getAngle(NDIR) "Incident angles used for solar radiation calculation"; final parameter Real layer[3, N, HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.glassProperty( N, HEM, glass, psi) "Angular and hemispherical transmissivity, front (outside-facing) and back (room facing) reflectivity of each glass pane"; final parameter Real traRef[3, N, N, HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.getGlassTR( N, HEM, layer) "Angular and hemispherical transmissivity, front (outside-facing) and back (room facing) reflectivity between glass panes for exterior or interior irradiation without shading"; final parameter Real absExtIrrNoSha[N, HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsExteriorIrradiationNoShading( traRef, N, HEM) "Angular and hemispherical absorptivity of each glass pane for exterior irradiation without shading"; final parameter Real absIntIrrNoSha[N]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsInterirorIrradiationNoShading( traRef, N, HEM) "Hemispherical absorptivity of each glass pane for interior irradiation without shading"; final parameter Real winTraExtIrrExtSha[HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.winTExteriorIrradiatrionExteriorShading( traRef, traRefShaDev, N, HEM) "Angular and hemispherical transmissivity of a window system (glass + exterior shading device) for exterior irradiation"; final parameter Real absExtIrrExtSha[N, HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsExteriorIrradiationExteriorShading( absExtIrrNoSha, traRef, traRefShaDev, N, HEM) "Angular and hemispherical absorptivity of each glass pane for exterior irradiation with exterior shading"; final parameter Real winTraExtIrrIntSha[HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.winTExteriorIrradiationInteriorShading( traRef, traRefShaDev, N, HEM) "Angular and hemispherical transmissivity of a window system (glass and interior shading device) for exterior irradiation"; final parameter Real absExtIrrIntSha[N, HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsExteriorIrradiationInteriorShading( absExtIrrNoSha, traRef, traRefShaDev, N, HEM) "Angular and hemispherical absorptivity of each glass layer for exterior irradiation with interior shading"; final parameter Real devAbsExtIrrIntShaDev[HEM]= Buildings.HeatTransfer.WindowsBeta.Functions.devAbsExteriorIrradiationInteriorShading( traRef, traRefShaDev, N, HEM) "Angular and hemispherical absorptivity of an interior shading device for exterior irradiation"; final parameter Real winTraRefIntIrrExtSha[3]= Buildings.HeatTransfer.WindowsBeta.Functions.winTRInteriorIrradiationExteriorShading( traRef, traRefShaDev, N, HEM) "Hemisperical transmissivity and reflectivity of a window system (glass and exterior shadig device) for interior irradiation. traRefIntIrrExtSha[1]: transmissivity, traRefIntIrrExtSha[2]: Back reflectivity; traRefIntIrrExtSha[3]: dummy value"; final parameter Real absIntIrrExtSha[N]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsInteriorIrradiationExteriorShading( absIntIrrNoSha, traRef, traRefShaDev, N, HEM) "Hemispherical absorptivity of each glass pane for interior irradiation with exterior shading"; final parameter Real absIntIrrIntSha[N]= Buildings.HeatTransfer.WindowsBeta.Functions.glassAbsInteriorIrradiationInteriorShading( absIntIrrNoSha, traRef, traRefShaDev, N, HEM) "Hemispherical absorptivity of each glass pane for interior irradiation with interior shading"; final parameter Real winTraRefIntIrrIntSha[3]= Buildings.HeatTransfer.WindowsBeta.Functions.winTRInteriorIrradiationInteriorShading( traRef, traRefShaDev, N, HEM) "Hemisperical transmissivity and back reflectivity of a window system (glass and interior shadig device) for interior irradiation"; final parameter Real devAbsIntIrrIntSha= Buildings.HeatTransfer.WindowsBeta.Functions.devAbsInteriorIrradiationInteriorShading( traRef, traRefShaDev, N, HEM) "Hemiperical absorptivity of an interior shading device for interior irradiation";end RadiationData;
Function for convective heat transfer in vertical window cavity. The computation is according to TARCOG 2006, except that this implementation computes the convection coefficient as a function that is differentiable in the temperatures.
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Type | Name | Default | Description |
---|---|---|---|
Generic | gas | Thermophysical properties of gas fill | |
Real | Ra | Raleigh number | |
Temperature | T_m | Temperature used for thermophysical properties [K] | |
TemperatureDifference | dT | Temperature difference used to compute q_flow = h*dT [K] | |
Area | h | 1.5 | Height of window [m2] |
Real | deltaNu | 0.1 | Small value for Nusselt number, used for smoothing |
Real | deltaRa | 1E3 | Small value for Raleigh number, used for smoothing |
Type | Name | Description |
---|---|---|
Real | Nu | Nusselt number |
CoefficientOfHeatTransfer | hCon | Convective heat transfer coefficient [W/(m2.K)] |
HeatFlux | q_flow | Convective heat flux [W/m2] |
function convectionVerticalCavity "Free convection in vertical cavity" input Buildings.HeatTransfer.Data.Gases.Generic gas "Thermophysical properties of gas fill"; input Real Ra(min=0) "Raleigh number"; input Modelica.SIunits.Temperature T_m "Temperature used for thermophysical properties"; input Modelica.SIunits.TemperatureDifference dT "Temperature difference used to compute q_flow = h*dT"; input Modelica.SIunits.Area h(min=0) = 1.5 "Height of window"; input Real deltaNu(min=0.01) = 0.1 "Small value for Nusselt number, used for smoothing"; input Real deltaRa(min=0.01) = 1E3 "Small value for Raleigh number, used for smoothing"; output Real Nu(min=0) "Nusselt number"; output Modelica.SIunits.CoefficientOfHeatTransfer hCon(min=0) "Convective heat transfer coefficient"; output Modelica.SIunits.HeatFlux q_flow "Convective heat flux"; protected Real Nu_1(min=0) "Nusselt number"; Real Nu_2(min=0) "Nusselt number"; algorithm Nu_1 :=Buildings.Utilities.Math.Functions.spliceFunction( pos=0.0673838*Ra^(1/3), neg=Buildings.Utilities.Math.Functions.spliceFunction( pos=0.028154*Ra^(0.4134), neg=1 + 1.7596678E-10*Ra^(2.2984755), x=Ra - 1E4, deltax=deltaRa), x=Ra - 5E4, deltax=deltaRa); /* if ( Ra <= 1E4) then Nu_1 = 1 + 1.7596678E-10*Ra^(2.2984755); elseif ( Ra <= 5E4) then Nu_1 = 0.028154*Ra^(0.4134); else Nu_1 = 0.0673838*Ra^(1/3); end if; */ Nu_2 :=0.242*(Ra/(h/gas.x))^(0.272); Nu :=Buildings.Utilities.Math.Functions.smoothMax( x1=Nu_1, x2=Nu_2, deltaX=deltaNu); hCon :=Nu*Buildings.HeatTransfer.Data.Gases.thermalConductivity(gas, T_m)/gas.x; q_flow :=hCon*dT;end convectionVerticalCavity;
Function for convective heat transfer in horizontal window cavity. The computation is according to TARCOG 2006, except that this implementation computes the convection coefficient as a function that is differentiable in the temperatures.
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Type | Name | Default | Description |
---|---|---|---|
Generic | gas | Thermophysical properties of gas fill | |
Real | Ra | Raleigh number | |
Temperature | T_m | Temperature used for thermophysical properties [K] | |
TemperatureDifference | dT | Temperature difference used to compute q_flow = h*dT [K] | |
Angle | til | Window tilt [rad] | |
Real | sinTil | Sine of window tilt | |
Real | cosTil | Cosine of the window tilt | |
Area | h | 1.5 | Height of window [m2] |
Real | deltaNu | 0.1 | Small value for Nusselt number, used for smoothing |
Real | deltaRa | 1E3 | Small value for Raleigh number, used for smoothing |
Type | Name | Description |
---|---|---|
Real | Nu | Nusselt number |
CoefficientOfHeatTransfer | hCon | Convective heat transfer coefficient [W/(m2.K)] |
HeatFlux | q_flow | Convective heat flux [W/m2] |
function convectionHorizontalCavity "Free convection in horizontal cavity" input Buildings.HeatTransfer.Data.Gases.Generic gas "Thermophysical properties of gas fill"; input Real Ra(min=0) "Raleigh number"; input Modelica.SIunits.Temperature T_m "Temperature used for thermophysical properties"; input Modelica.SIunits.TemperatureDifference dT "Temperature difference used to compute q_flow = h*dT"; input Modelica.SIunits.Angle til "Window tilt"; input Real sinTil "Sine of window tilt"; input Real cosTil "Cosine of the window tilt"; input Modelica.SIunits.Area h(min=0) = 1.5 "Height of window"; input Real deltaNu(min=0.01) = 0.1 "Small value for Nusselt number, used for smoothing"; input Real deltaRa(min=0.01) = 1E3 "Small value for Raleigh number, used for smoothing"; output Real Nu(min=0) "Nusselt number"; output Modelica.SIunits.CoefficientOfHeatTransfer hCon(min=0) "Convective heat transfer coefficient"; output Modelica.SIunits.HeatFlux q_flow "Convective heat flux"; protected Real Nu_1(min=0) "Nusselt number"; Real Nu_2(min=0) "Nusselt number"; constant Real dx=0.1 "Half-width of interval used for smoothing"; algorithm if cosTil > 0 then Nu :=Buildings.Utilities.Math.Functions.spliceFunction( pos= Buildings.HeatTransfer.WindowsBeta.BaseClasses.nusseltHorizontalCavityReduced( gas=gas, Ra=Ra, T_m=T_m, dT=dT, h=h, sinTil=sinTil, deltaNu=deltaNu, deltaRa=deltaRa), neg= Buildings.HeatTransfer.WindowsBeta.BaseClasses.nusseltHorizontalCavityEnhanced( gas=gas, Ra=Ra, T_m=T_m, dT=dT, til=til, cosTil=abs(cosTil)), x=dT+dx, deltax=dx); else Nu :=Buildings.Utilities.Math.Functions.spliceFunction( pos= Buildings.HeatTransfer.WindowsBeta.BaseClasses.nusseltHorizontalCavityEnhanced( gas=gas, Ra=Ra, T_m=T_m, dT=dT, til=til, cosTil=abs(cosTil)), neg= Buildings.HeatTransfer.WindowsBeta.BaseClasses.nusseltHorizontalCavityReduced( gas=gas, Ra=Ra, T_m=T_m, dT=dT, h=h, sinTil=sinTil, deltaNu=deltaNu, deltaRa=deltaRa), x=dT-dx, deltax=dx); end if; hCon :=Nu*Buildings.HeatTransfer.Data.Gases.thermalConductivity(gas, T_m)/gas.x; q_flow :=hCon*dT;end convectionHorizontalCavity;
Function for Nusselt number in horizontal window cavity. The computation is according to TARCOG 2006, except that this implementation computes the Nusselt number as a function that is differentiable in the temperatures.
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Type | Name | Default | Description |
---|---|---|---|
Generic | gas | Thermophysical properties of gas fill | |
Real | Ra | Raleigh number | |
Temperature | T_m | Temperature used for thermophysical properties [K] | |
TemperatureDifference | dT | Temperature difference used to compute q_flow = h*dT [K] | |
Angle | til | Window tilt [rad] | |
Real | cosTil | Cosine of the window tilt |
Type | Name | Description |
---|---|---|
Real | Nu | Nusselt number |
function nusseltHorizontalCavityEnhanced "Nusselt number for horizontal cavity, bottom surface warmer than top surface" input Buildings.HeatTransfer.Data.Gases.Generic gas "Thermophysical properties of gas fill"; input Real Ra(min=0) "Raleigh number"; input Modelica.SIunits.Temperature T_m "Temperature used for thermophysical properties"; input Modelica.SIunits.TemperatureDifference dT "Temperature difference used to compute q_flow = h*dT"; input Modelica.SIunits.Angle til "Window tilt"; input Real cosTil(min=0) "Cosine of the window tilt"; output Real Nu(min=0) "Nusselt number"; protected Real k1 "Auxiliary variable"; Real k2 "Auxiliary variable"; Real k11 "Auxiliary variable"; Real k22 "Auxiliary variable"; algorithm // Windows inclined from 0 to 60 deg (eqn. 3.1-42 to 3.1-43) k1 :=1 - 1708/Ra/cosTil; k2 :=(Ra*cosTil/5830)^(1/3) - 1; k11 :=(k1 + Buildings.Utilities.Math.Functions.smoothMax( x1=k1, x2=-k1, deltaX=1E-1))/2; k22 :=(k2 + Buildings.Utilities.Math.Functions.smoothMax( x1=k2, x2=-k2, deltaX=1E-1))/2; Nu :=1 + 1.44*k11*(1 - 1708*abs(Modelica.Math.sin(1.8*til*180/Modelica.Constants.pi)) ^(1.6)/Ra/cosTil) + k22;end nusseltHorizontalCavityEnhanced;
Function for Nusselt number in horizontal window cavity. The computation is according to TARCOG 2006, except that this implementation computes the Nusselt number as a function that is differentiable in the temperatures.
TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.
Type | Name | Default | Description |
---|---|---|---|
Generic | gas | Thermophysical properties of gas fill | |
Real | Ra | Raleigh number | |
Temperature | T_m | Temperature used for thermophysical properties [K] | |
TemperatureDifference | dT | Temperature difference used to compute q_flow = h*dT [K] | |
Area | h | 1.5 | Height of window [m2] |
Real | sinTil | Sine of window tilt | |
Real | deltaNu | 0.1 | Small value for Nusselt number, used for smoothing |
Real | deltaRa | 1E3 | Small value for Raleigh number, used for smoothing |
Type | Name | Description |
---|---|---|
Real | Nu | Nusselt number |
function nusseltHorizontalCavityReduced "Nusselt number for horizontal cavity, bottom surface colder than top surface" input Buildings.HeatTransfer.Data.Gases.Generic gas "Thermophysical properties of gas fill"; input Real Ra(min=0) "Raleigh number"; input Modelica.SIunits.Temperature T_m "Temperature used for thermophysical properties"; input Modelica.SIunits.TemperatureDifference dT "Temperature difference used to compute q_flow = h*dT"; input Modelica.SIunits.Area h(min=0) = 1.5 "Height of window"; input Real sinTil "Sine of window tilt"; input Real deltaNu(min=0.01) = 0.1 "Small value for Nusselt number, used for smoothing"; input Real deltaRa(min=0.01) = 1E3 "Small value for Raleigh number, used for smoothing"; output Real Nu(min=0) "Nusselt number"; protected Real NuVer(min=0) "Nusselt number for vertical window"; algorithm NuVer :=Buildings.HeatTransfer.WindowsBeta.BaseClasses.convectionVerticalCavity( gas=gas, Ra=Ra, T_m=T_m, dT=dT, h=h, deltaNu=deltaNu, deltaRa=deltaRa); Nu :=1 + (NuVer - 1)*sinTil;end nusseltHorizontalCavityReduced;
Function to interpolate within a data array without triggerring events.
Type | Name | Default | Description |
---|---|---|---|
Real | y[:] | Data array | |
Real | x | x value |
Type | Name | Description |
---|---|---|
Real | val | Return value |
function smoothInterpolation "Get interpolated data without triggering events" input Real y[:] "Data array"; input Real x "x value"; output Real val "Return value"; protected Integer k1; Integer k2; Real y1d; Real y2d; algorithm k1 := integer(x); k2 := k1 + 1; y1d := (y[k1 + 1] - y[k1 - 1])/2; y2d := (y[k2 + 1] - y[k2 - 1])/2; val := Modelica.Fluid.Utilities.cubicHermite( x, k1, k2, y[k1], y[k2], y1d, y2d);end smoothInterpolation;