Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.HeatTransfer.Windows.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
BeamDepthInRoom
|
Test model for the depth of the solar beam in the room |
BoundaryHeatTransfer
|
Test model for the heat transfer at the window boundary condition |
ElectrochromicWindow
|
Electrochromic window |
FixedShade
|
Test model for the fixed shade model |
Overhang
|
This example tests the window overhang model |
SideFins
|
This example demonstrates the use of side fins for a window |
Window
|
Test model for the window |
Test model for the depth of the solar beam in the room
Information
This example computes how far from the wall, measured perpendicular to the wall,
hits the workplane.
The figure below shows this length for January 1 in Chicago
for windows with different orientations.
The spike at sunset is a numerical artifact that has no physical significance.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Length | hApe | 2.0 | Upper height of aperature above ground [m] |
Length | depOve | 1.0 | Depth of overhang, meausured from other exterior surface of aperature (set to 0 if no overhang) [m] |
Length | gapOve | 0.5 | Gap between upper height of aperature and lower height of overhang (set to 0 if no overhang) [m] |
Modelica definition
model BeamDepthInRoom
extends Modelica.Icons.Example;
parameter Modelica.SIunits.Length hApe = 2.0
;
parameter Modelica.SIunits.Length depOve=1.0
;
parameter Modelica.SIunits.Length gapOve=0.5
;
Buildings.HeatTransfer.Windows.BeamDepthInRoom winEas(
azi=Buildings.Types.Azimuth.E,
hApe=hApe,
depOve=depOve,
gapOve=gapOve,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.HeatTransfer.Windows.BeamDepthInRoom winSou(
azi=Buildings.Types.Azimuth.S,
hApe=hApe,
depOve=depOve,
gapOve=gapOve,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.HeatTransfer.Windows.BeamDepthInRoom winWes(
azi=Buildings.Types.Azimuth.W,
hApe=hApe,
depOve=depOve,
gapOve=gapOve,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.HeatTransfer.Windows.BeamDepthInRoom winNor(
azi=Buildings.Types.Azimuth.N,
hApe=hApe,
depOve=depOve,
gapOve=gapOve,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
end BeamDepthInRoom;
Test model for the heat transfer at the window boundary condition
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Area | A | 1 | Window surface area [m2] |
Real | fFra | 0.2 | Fraction of frame, = frame area divided by total area |
TripleClearAir13ClearAir13Clear | glaSys3 | glaSys3(UFra=1) | Parameters for glazing system |
DoubleClearAir13Clear | glaSys | glaSys(shade=Buildings.HeatT... | Parameters for glazing system |
SingleClear3 | glaSys1 | glaSys1(UFra=2) | Parameters for glazing system |
DoubleClearAir13Clear | glaSys2 | glaSys2(shade=Buildings.Heat... | Parameters for glazing system |
Boolean | linearizeRadiation | false | Set to true to linearize emissive power |
Modelica definition
model BoundaryHeatTransfer
extends Modelica.Icons.Example;
parameter Modelica.SIunits.Area A=1 ;
parameter Real fFra=0.2
;
parameter Buildings.HeatTransfer.Data.GlazingSystems.TripleClearAir13ClearAir13Clear
glaSys3(UFra=1) ;
parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(
shade=
Buildings.HeatTransfer.Data.Shades.Gray(),
UFra=1.5,
haveExteriorShade=true,
haveInteriorShade=false) ;
parameter Buildings.HeatTransfer.Data.GlazingSystems.SingleClear3 glaSys1(UFra=2)
;
parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys2(
shade=
Buildings.HeatTransfer.Data.Shades.Gray(),
UFra=2,
haveInteriorShade=false,
haveExteriorShade=false) ;
parameter Boolean linearizeRadiation = false
;
Buildings.HeatTransfer.Windows.ExteriorHeatTransfer extCon(A=A, fFra=fFra,
linearizeRadiation=linearizeRadiation,
absIRSha_air=glaSys.shade.absIR_a,
absIRSha_glass=glaSys.shade.absIR_b,
tauIRSha_air=glaSys.shade.tauIR_a,
tauIRSha_glass=glaSys.shade.tauIR_b,
haveExteriorShade=glaSys.haveExteriorShade,
haveInteriorShade=glaSys.haveInteriorShade,
vieFacSky=0.5) ;
Modelica.Blocks.Sources.Constant TOut(y(unit="K"), k=273.15)
;
Modelica.Blocks.Sources.Constant TRooAir(k=293.15, y(unit="K"))
;
Modelica.Blocks.Sources.Ramp uSha(duration=1, startTime=0)
;
Modelica.Blocks.Sources.Constant vWin(k=1) ;
Buildings.HeatTransfer.Sources.PrescribedTemperature TOuts
;
Buildings.HeatTransfer.Sources.PrescribedTemperature TRAir
;
Buildings.HeatTransfer.Radiosity.IndoorRadiosity radIn(
final linearize=linearizeRadiation,
final A=A) ;
protected
Buildings.HeatTransfer.Radiosity.RadiositySplitter radShaOut
;
public
Buildings.HeatTransfer.Windows.BaseClasses.ShadingSignal shaSig(haveShade=true)
;
Buildings.HeatTransfer.Sources.PrescribedTemperature TRAir1
;
Buildings.HeatTransfer.Sources.PrescribedTemperature TRAir2
;
Buildings.HeatTransfer.Sources.PrescribedTemperature TRAir3
;
Modelica.Blocks.Sources.Constant QAbsSW_flow(k=0) ;
Modelica.Blocks.Math.MultiSum sumJ(nu=2)
;
equation
connect(uSha.y, extCon.uSha);
connect(TOuts.port, extCon.air);
connect(TRooAir.y, TRAir.T);
connect(extCon.vWin, vWin.y);
connect(TOuts.T, TOut.y);
connect(shaSig.y,radShaOut. u);
connect(radIn.JOut, radShaOut.JIn);
connect(shaSig.u, uSha.y);
connect(radShaOut.JOut_2, extCon.JInUns);
connect(radShaOut.JOut_1, extCon.JInSha);
connect(radIn.heatPort, TRAir.port);
connect(TRooAir.y, TRAir1.T);
connect(TRooAir.y, TRAir2.T);
connect(TRooAir.y, TRAir3.T);
connect(TRAir1.port, extCon.glaUns);
connect(TRAir2.port, extCon.glaSha);
connect(TRAir3.port, extCon.frame);
connect(TOut.y, extCon.TBlaSky);
connect(TOut.y, extCon.TOut);
connect(radIn.JIn, sumJ.y);
connect(extCon.JOutUns, sumJ.u[1]);
connect(extCon.JOutSha, sumJ.u[2]);
connect(QAbsSW_flow.y, extCon.QSolAbs_flow);
end BoundaryHeatTransfer;
Electrochromic window
Information
This model demonstrates the implementation of a window model.
On the left hand side is a model for the combined convective and radiative heat
transfer on the outside facing side of the window.
In the top middle is the window model, and below is a model that
computes the solar radiation balance of the window. Output of the solar
radiation balance model are the absorbed solar heat flow rates, which are
input to the heat balance models.
On the right hand side are models for the inside surface heat balance.
As opposed to the outside surface heat balance models, these models are
implemented using separate components for the radiative balance and for the convective
balance. This has been done to allow separating radiation from convection,
which is required when the room model is used with room air heat balance models
that use computational fluid dynamics.
Extends from Window (Test model for the window).
Parameters
Type | Name | Default | Description |
Area | A | 1 | Window surface area [m2] |
Real | fFra | 0.2 | Fraction of frame, = frame area divided by total area |
Boolean | linearize | false | Set to true to linearize emissive power |
Angle | lat | 0.34906585039887 | Latitude [rad] |
Angle | azi | 0 | Surface azimuth [rad] |
Angle | til | 1.5707963267949 | Surface tilt [rad] |
Connectors
Type | Name | Description |
Bus | weaBus | |
Modelica definition
Test model for the fixed shade model
Information
This model tests window overhang and side fins. There are four instances of sha
.
The first instance models an overhang only, the second models side fins and
an overhang, the third models side fins only and the fourth has neither an overhang
nor a side fin.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Modelica definition
model FixedShade
extends Modelica.Icons.Example;
Buildings.HeatTransfer.Windows.FixedShade sha[4](
final conPar=conPar,
azi=conPar.azi,
each lat=weaDat.lat) ;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"));
Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
lat=weaDat.lat,
til=Buildings.Types.Tilt.Wall,
azi=Buildings.Types.Azimuth.S) ;
Modelica.Blocks.Routing.Replicator H(nout=4) ;
Modelica.Blocks.Routing.Replicator incAng(nout=4) ;
parameter Buildings.ThermalZones.Detailed.BaseClasses.ParameterConstructionWithWindow
conPar[4](
each til=Buildings.Types.Tilt.Wall,
each azi=Buildings.Types.Azimuth.S,
each A=20,
each hWin=1.5,
each wWin=2,
each glaSys=glaSys,
each layers=insCon,
ove(
wR = {0.1, 0.1, 0, 0},
wL = {0.1, 0.1, 0, 0},
gap= {0.1, 0.1, 0, 0},
dep= {1, 1, 0, 0}),
sidFin(
dep= {0, 1, 1, 0},
gap= {0, 0.1, 0.1, 0},
h = {0, 0.1, 0.1, 0})) ;
parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys
;
parameter Data.OpaqueConstructions.Insulation100Concrete200 insCon
;
equation
connect(weaDat.weaBus, sha[1].weaBus);
connect(weaDat.weaBus, sha[2].weaBus);
connect(weaDat.weaBus, sha[3].weaBus);
connect(HDirTil.weaBus, weaDat.weaBus);
connect(HDirTil.H, H.u);
connect(HDirTil.inc, incAng.u);
connect(incAng.y,sha. incAng);
connect(H.y,sha. HDirTilUns);
connect(weaDat.weaBus, sha[4].weaBus);
end FixedShade;
This example tests the window overhang model
Information
This example demonstrates the use of the overhang model.
It calculates the fraction of total window area that is exposed to the sun.
A similar example of an overhang model with more basic components is implemented in
Buildings.HeatTransfer.Windows.BaseClasses.Examples.Overhang.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model Overhang
extends Modelica.Icons.Example;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.HeatTransfer.Windows.Overhang ove(
dep=1.2,
gap=0.1,
hWin=1.0,
wWin=1.0,
azi=Buildings.Types.Azimuth.S,
wR=0.1,
wL=0.1,
lat=weaDat.lat) ;
Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
lat=weaDat.lat,
til=Buildings.Types.Tilt.Wall,
azi=Buildings.Types.Azimuth.S) ;
equation
connect(weaDat.weaBus, ove.weaBus);
connect(HDirTil.weaBus, weaDat.weaBus);
connect(HDirTil.inc, ove.incAng);
connect(HDirTil.H, ove.HDirTilUns);
end Overhang;
This example demonstrates the use of side fins for a window
Information
This example uses the window sidefin model to calculate the fraction of total window area exposed to the sun.
For a detailed description of the model, see
Buildings.HeatTransfer.Windows.SideFins.
A similar example of can be found in
Buildings.HeatTransfer.Windows.BaseClasses.Examples.SideFins.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model SideFins
extends Modelica.Icons.Example;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"))
;
Buildings.HeatTransfer.Windows.SideFins fin(
h=0.2,
hWin=1.0,
wWin=1.0,
dep=0.5,
gap=0.1) ;
Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
lat=weaDat.lat,
til=Buildings.Types.Tilt.Wall,
azi=Buildings.Types.Azimuth.S) ;
equation
connect(weaDat.weaBus, fin.weaBus);
connect(HDirTil.weaBus, weaDat.weaBus);
connect(HDirTil.inc, fin.incAng);
connect(HDirTil.H, fin.HDirTilUns);
end SideFins;
Test model for the window
Information
This model demonstrates the implementation of a window model.
On the left hand side is a model for the combined convective and radiative heat
transfer on the outside facing side of the window.
In the top middle is the window model, and below is a model that
computes the solar radiation balance of the window. Output of the solar
radiation balance model are the absorbed solar heat flow rates, which are
input to the heat balance models.
On the right hand side are models for the inside surface heat balance.
As opposed to the outside surface heat balance models, these models are
implemented using separate components for the radiative balance and for the convective
balance. This has been done to allow separating radiation from convection,
which is required when the room model is used with room air heat balance models
that use computational fluid dynamics.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Area | A | 1 | Window surface area [m2] |
Real | fFra | 0.2 | Fraction of frame, = frame area divided by total area |
Boolean | linearize | false | Set to true to linearize emissive power |
Angle | lat | 0.34906585039887 | Latitude [rad] |
Angle | azi | 0 | Surface azimuth [rad] |
Angle | til | 1.5707963267949 | Surface tilt [rad] |
DoubleClearAir13Clear | glaSys | glaSys(shade=Buildings.HeatT... | |
Connectors
Type | Name | Description |
Bus | weaBus | |
Modelica definition
model Window
extends Modelica.Icons.Example;
parameter Modelica.SIunits.Area A=1 ;
parameter Real fFra=0.2
;
final parameter Modelica.SIunits.Area AFra = fFra * A ;
final parameter Modelica.SIunits.Area AGla = A-AFra ;
parameter Boolean linearize = false ;
parameter Modelica.SIunits.Angle lat=0.34906585039887 ;
parameter Modelica.SIunits.Angle azi=0 ;
parameter Modelica.SIunits.Angle til=1.5707963267949 ;
Buildings.HeatTransfer.Windows.Window window(
A=A,
fFra=fFra,
glaSys=glaSys,
linearize=linearize,
til=til) ;
Buildings.HeatTransfer.Windows.ExteriorHeatTransfer extCon(
A=A,
fFra=fFra,
linearizeRadiation=linearize,
absIRSha_air=glaSys.shade.absIR_a,
absIRSha_glass=glaSys.shade.absIR_b,
tauIRSha_air=glaSys.shade.tauIR_a,
tauIRSha_glass=glaSys.shade.tauIR_b,
haveExteriorShade=glaSys.haveExteriorShade,
haveInteriorShade=glaSys.haveInteriorShade,
vieFacSky=0.5) ;
Modelica.Blocks.Sources.Ramp uSha(duration=0.5, startTime=0.25)
;
Buildings.HeatTransfer.Sources.PrescribedTemperature TOuts
;
Buildings.HeatTransfer.Sources.FixedTemperature TRAir(T=293.15)
;
Buildings.HeatTransfer.Radiosity.IndoorRadiosity indRad(A=A)
;
Buildings.HeatTransfer.Sources.FixedHeatFlow fixedHeatFlow(Q_flow=0);
replaceable parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear
glaSys(
shade=
Buildings.HeatTransfer.Data.Shades.Gray(),
haveExteriorShade=false,
haveInteriorShade=true)
constrainedby Data.GlazingSystems.Generic;
Buildings.BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
til=til,
lat=lat,
azi=azi);
Buildings.BoundaryConditions.SolarIrradiation.DiffuseIsotropic HDifTilIso(
til=til);
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"));
Modelica.Blocks.Math.Gain HRoo(k=0.1) ;
Buildings.HeatTransfer.Windows.BaseClasses.WindowRadiation winRad(
AWin=1,
N=
size(glaSys.glass, 1),
tauGlaSol=glaSys.glass.tauSol,
rhoGlaSol_a=glaSys.glass.rhoSol_a,
rhoGlaSol_b=glaSys.glass.rhoSol_b,
xGla=glaSys.glass.x,
tauShaSol_a=glaSys.shade.tauSol_a,
tauShaSol_b=glaSys.shade.tauSol_b,
rhoShaSol_a=glaSys.shade.rhoSol_a,
rhoShaSol_b=glaSys.shade.rhoSol_b,
haveExteriorShade=glaSys.haveExteriorShade,
haveInteriorShade=glaSys.haveInteriorShade);
Buildings.BoundaryConditions.WeatherData.Bus weaBus;
Buildings.HeatTransfer.Windows.BaseClasses.ShadeRadiation intShaRad(
thisSideHasShade=glaSys.haveInteriorShade,
linearize=linearize,
absIR_air=glaSys.shade.absIR_a,
absIR_glass=glaSys.shade.absIR_b,
tauIR_air=glaSys.shade.tauIR_a,
tauIR_glass=glaSys.shade.tauIR_b,
A=AGla)
if glaSys.haveShade ;
Buildings.HeatTransfer.Windows.BaseClasses.ShadingSignal shaSig(
haveShade=glaSys.haveInteriorShade) ;
Buildings.HeatTransfer.Windows.InteriorHeatTransferConvective intShaCon(
A=A,
fFra=fFra,
til=Buildings.Types.Tilt.Wall,
haveExteriorShade=glaSys.haveExteriorShade,
haveInteriorShade=glaSys.haveInteriorShade)
;
protected
Modelica.Blocks.Math.Sum sumJ(
nin=
if glaSys.haveShade
then 2
else 1,
u(
each start=0))
;
Buildings.HeatTransfer.Radiosity.RadiositySplitter radShaOut
;
equation
connect(uSha.y, extCon.uSha);
connect(uSha.y, window.uSha);
connect(TOuts.port, extCon.air);
connect(window.glaUns_a, extCon.glaUns);
connect(window.glaSha_a, extCon.glaSha);
connect(window.fra_a, extCon.frame);
connect(extCon.JOutUns, window.JInUns_a);
connect(extCon.JInUns, window.JOutUns_a);
connect(extCon.JOutSha, window.JInSha_a);
connect(extCon.JInSha, window.JOutSha_a);
connect(fixedHeatFlow.port, indRad.heatPort);
connect(winRad.QTraDif_flow, HRoo.u);
connect(HRoo.y,winRad. HRoo);
connect(HDifTilIso.H, winRad.HDif);
connect(HDirTil.H, winRad.HDir);
connect(HDirTil.inc, winRad.incAng);
connect(winRad.QAbsGlaUns_flow, window.QAbsUns_flow);
connect(winRad.QAbsGlaSha_flow, window.QAbsSha_flow);
connect(weaDat.weaBus, weaBus);
connect(weaBus, HDirTil.weaBus);
connect(HDifTilIso.weaBus, weaBus);
connect(TOuts.T, weaBus.TDryBul);
connect(uSha.y, winRad.uSha);
connect(weaBus.winSpe, extCon.vWin);
connect(weaBus.TBlaSky, extCon.TBlaSky);
connect(weaBus.TDryBul, extCon.TOut);
connect(uSha.y, shaSig.u);
connect(intShaRad.u, shaSig.y);
connect(indRad.JOut, radShaOut.JIn);
connect(radShaOut.JOut_1, intShaRad.JIn_air);
connect(indRad.JIn, sumJ.y);
connect(sumJ.u[2], intShaRad.JOut_air);
connect(window.JOutUns_b, sumJ.u[1]);
connect(intShaRad.JOut_glass, window.JInSha_b);
connect(window.JInUns_b, radShaOut.JOut_2);
connect(radShaOut.u, shaSig.y);
connect(intShaRad.JIn_glass, window.JOutSha_b);
connect(TRAir.port, intShaCon.air);
connect(uSha.y, intShaCon.uSha);
connect(intShaCon.TSha, intShaRad.TSha);
connect(window.fra_b, intShaCon.frame);
connect(window.glaUns_b, intShaCon.glaUns);
connect(intShaCon.glaSha, window.glaSha_b);
connect(intShaCon.QRadAbs_flow, intShaRad.QRadAbs_flow);
connect(winRad.QAbsIntSha_flow, intShaRad.QSolAbs_flow);
connect(winRad.QAbsExtSha_flow, extCon.QSolAbs_flow);
end Window;