## Buildings.Rooms.Constructions.Examples

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.Rooms.Constructions.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

### Package Content

NameDescription
ExteriorWallWithWindow Test model for an exterior wall with a window
ExteriorWallTwoWindows Test model for an exterior wall with two windows, one having a shade, the other not
ExteriorWall Test model for an exterior wall without a window

## Buildings.Rooms.Constructions.Examples.ExteriorWallWithWindow

Test model for an exterior wall with a window

### Information

This model tests the exterior constructions with windows.

Extends from Modelica.Icons.Example (Icon for runnable examples).

### Parameters

TypeNameDefaultDescription
AreaA[:]{3*10}Heat transfer area of wall and window [m2]
AreaAWin[:]A - {2*3}Heat transfer area of frame and window [m2]
RealfFra[:]{0.1}Fraction of window frame divided by total window area
BooleanlinearizeRadiationfalseSet to true to linearize emissive power

### Modelica definition

```model ExteriorWallWithWindow
"Test model for an exterior wall with a window"
import Buildings;
extends Modelica.Icons.Example;
parameter Modelica.SIunits.Area A[:]={3*10}
"Heat transfer area of wall and window";
parameter Modelica.SIunits.Area AWin[:]=A-{2*3}
"Heat transfer area of frame and window";
parameter Real fFra[:]={0.1}
"Fraction of window frame divided by total window area";
"Set to true to linearize emissive power";
HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(
UFra=2,

ConstructionWithWindow conExt[1](
layers={extConMat},
glaSys={glaSys},
A=A,
AWin=AWin,
fFra=fFra,
til={1.5707963267949}) "Construction of an exterior wall without a window";
Buildings.Rooms.BaseClasses.ExteriorBoundaryConditionsWithWindow
bouConExt(
nCon=1,
fFra=fFra,
absIR={extConMat.absIR_a},
azi={0},
AOpa=A - AWin,
absSol={extConMat.absSol_a},
AWin=AWin,
absSolFra={glaSys.absSolFra},
conMod=Buildings.HeatTransfer.Types.InteriorConvection.Fixed,
til={Buildings.HeatTransfer.Types.Tilt.Wall},
lat=0.73268921998722,
absIRFra={glaSys.absIRFra})
"Exterior boundary conditions for constructions without a window";
Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature;
Buildings.HeatTransfer.Convection.Interior con[
1](A=A - AWin, til={Buildings.HeatTransfer.Types.Tilt.Wall})
"Model for heat convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol(m=1)
"Thermal collector to link a vector of models to a single model";
"Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos");
Modelica.Blocks.Sources.Constant TRoo(k=273.15 + 20) "Room air temperature";
HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 extConMat
"Record for material layers";

HeatTransfer.Windows.InteriorHeatTransfer intCon[1](
A=AWin,
fFra=fFra,
"Model for interior convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol1(
m=1)
"Thermal collector to link a vector of models to a single model";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol2(
m=1)
"Thermal collector to link a vector of models to a single model";
Modelica.Blocks.Sources.Constant QAbs[1,glaSys.nLay](each k=0)
Modelica.Blocks.Sources.Constant QAbsSha(each k=0)
Modelica.Blocks.Sources.Constant QTra(each k=0)
Buildings.HeatTransfer.Convection.Interior con1[
1](A=A - AWin, til={Buildings.HeatTransfer.Types.Tilt.Wall})
"Model for heat convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol3(
m=1)
"Thermal collector to link a vector of models to a single model";
equation
connect(prescribedTemperature.port, theCol.port_b);
connect(theCol.port_a, con.fluid);
connect(TRoo.y, prescribedTemperature.T);
connect(theCol1.port_b, prescribedTemperature.port);
connect(intCon[1].uSha, uSha.y);
connect(theCol1.port_a, intCon.air);
connect(intCon.frame, theCol2.port_a);
connect(uSha.y, bouConExt.uSha[1]);
connect(uSha.y, conExt[1].uSha);
connect(QAbs.y, conExt.QAbsUns_flow);
connect(QAbs.y, conExt.QAbsSha_flow);
connect(QAbsSha.y, intCon[1].QAbs_flow);
connect(QTra.y, bouConExt.QAbsSolSha_flow[1]);
connect(conExt.opa_b, con.solid);
connect(intCon.JOutUns, conExt.JInUns_b);
connect(intCon.JInUns, conExt.JOutUns_b);
connect(intCon.glaUns, conExt.glaUns_b);
connect(intCon.glaSha, conExt.glaSha_b);
connect(intCon.JOutSha, conExt.JInSha_b);
connect(intCon.JInSha, conExt.JOutSha_b);
connect(conExt.opa_a, bouConExt.opa_a);

connect(conExt.JInUns_a, bouConExt.JOutUns);
connect(conExt.JOutUns_a, bouConExt.JInUns);
connect(conExt.glaUns_a, bouConExt.glaUns);
connect(conExt.glaSha_a, bouConExt.glaSha);
connect(conExt.JInSha_a, bouConExt.JOutSha);
connect(conExt.JOutSha_a, bouConExt.JInSha);
connect(conExt.fra_a, bouConExt.fra);
connect(con1.solid, conExt.fra_b);
connect(con1.fluid, theCol3.port_a);
connect(theCol3.port_b, prescribedTemperature.port);
end ExteriorWallWithWindow;
```

## Buildings.Rooms.Constructions.Examples.ExteriorWallTwoWindows

Test model for an exterior wall with two windows, one having a shade, the other not

### Information

This model tests the exterior construction with windows.

Extends from Modelica.Icons.Example (Icon for runnable examples).

### Parameters

TypeNameDefaultDescription
IntegernCon2Number of constructions
AreaA[:]{3*10,3*10}Heat transfer area of wall and window [m2]
AreaAWin[:]A - {2*3,1*3}Heat transfer area of frame and window [m2]
RealfFra[:]{0.1,0.1}Fraction of window frame divided by total window area
BooleanlinearizeRadiationfalseSet to true to linearize emissive power

### Modelica definition

```model ExteriorWallTwoWindows
"Test model for an exterior wall with two windows, one having a shade, the other not"
import Buildings;
extends Modelica.Icons.Example;
parameter Integer nCon = 2 "Number of constructions";
parameter Modelica.SIunits.Area A[:]={3*10, 3*10}
"Heat transfer area of wall and window";
parameter Modelica.SIunits.Area AWin[:]=A-{2*3, 1*3}
"Heat transfer area of frame and window";
parameter Real fFra[:]={0.1, 0.1}
"Fraction of window frame divided by total window area";
"Set to true to linearize emissive power";
HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys1(
UFra=2,
HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys2(
UFra=2,
ConstructionWithWindow conExt[nCon](
layers={extConMat, extConMat},
glaSys={glaSys1, glaSys2},
A=A,
AWin=AWin,
fFra=fFra,
til={Buildings.HeatTransfer.Types.Tilt.Wall,Buildings.HeatTransfer.Types.Tilt.Wall})
"Construction of an exterior wall without a window";
Buildings.Rooms.BaseClasses.ExteriorBoundaryConditionsWithWindow
bouConExt(
nCon=2,
fFra=fFra,
absIR={extConMat.absIR_a, extConMat.absIR_a},
AOpa=A - AWin,
absSol={extConMat.absSol_a, extConMat.absSol_a},
AWin=AWin,
absSolFra={glaSys1.absSolFra, glaSys2.absSolFra},
conMod=Buildings.HeatTransfer.Types.InteriorConvection.Fixed,
til={Buildings.HeatTransfer.Types.Tilt.Wall,Buildings.HeatTransfer.Types.Tilt.Wall},
azi={0,0},
lat=0.73268921998722,
absIRFra={glaSys1.absSolFra,glaSys2.absSolFra})
"Exterior boundary conditions for constructions without a window";
Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature;
Buildings.HeatTransfer.Convection.Interior con[
nCon](A=A - AWin,
til={Buildings.HeatTransfer.Types.Tilt.Wall,
Buildings.HeatTransfer.Types.Tilt.Wall}) "Model for heat convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol(m=2)
"Thermal collector to link a vector of models to a single model";
"Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos");
Modelica.Blocks.Sources.Constant TRoo(k=273.15 + 20) "Room air temperature";
HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 extConMat
"Record for material layers";

HeatTransfer.Windows.InteriorHeatTransfer intCon[nCon](
A=AWin,
fFra=fFra,
"Model for interior convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol1(m=2)
"Thermal collector to link a vector of models to a single model";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol2(
m=2)
"Thermal collector to link a vector of models to a single model";
Modelica.Blocks.Routing.Replicator replicator(nout=nCon);
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol3(
m=2)
"Thermal collector to link a vector of models to a single model";
Modelica.Blocks.Sources.Constant QAbsSha[nCon](each k=0)
Modelica.Blocks.Sources.Constant QAbs[nCon,glaSys1.nLay](each k=0)
Modelica.Blocks.Sources.Constant QTra[nCon](each k=0)
Buildings.HeatTransfer.Convection.Interior con1[nCon](A=A - AWin,
each til=Buildings.HeatTransfer.Types.Tilt.Wall)
"Model for heat convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol4(
m=nCon)
"Thermal collector to link a vector of models to a single model";
equation
connect(prescribedTemperature.port, theCol.port_b);
connect(theCol.port_a, con.fluid);
connect(TRoo.y, prescribedTemperature.T);
connect(theCol1.port_b, prescribedTemperature.port);
connect(theCol1.port_a, intCon.air);

connect(intCon.frame, theCol2.port_a);

connect(uSha.y, replicator.u);
connect(replicator.y, intCon.uSha);
connect(theCol2.port_b, prescribedTemperature.port);
connect(theCol3.port_b, prescribedTemperature.port);
connect(bouConExt.uSha, replicator.y);
connect(QAbs.y, conExt.QAbsUns_flow);
connect(QAbs.y, conExt.QAbsSha_flow);
connect(QAbsSha.y, intCon.QAbs_flow);
connect(QTra.y, bouConExt.QAbsSolSha_flow);
connect(con.solid, conExt.opa_b);
connect(conExt.JOutUns_b, intCon.JInUns);
connect(intCon.JOutUns, conExt.JInUns_b);
connect(conExt.glaUns_b, intCon.glaUns);
connect(conExt.glaSha_b, intCon.glaSha);
connect(conExt.JOutSha_b, intCon.JInSha);
connect(intCon.JOutSha, conExt.JInSha_b);
connect(replicator.y, conExt.uSha);
connect(conExt.opa_a, bouConExt.opa_a);

connect(bouConExt.JOutUns, conExt.JInUns_a);
connect(conExt.JOutUns_a, bouConExt.JInUns);
connect(bouConExt.glaUns, conExt.glaUns_a);
connect(bouConExt.glaSha, conExt.glaSha_a);
connect(bouConExt.JOutSha, conExt.JInSha_a);
connect(conExt.JOutSha_a, bouConExt.JInSha);
connect(bouConExt.fra, conExt.fra_a);
connect(con1.solid, conExt.fra_b);
connect(con1.fluid,theCol4. port_a);
connect(theCol4.port_b, prescribedTemperature.port);
end ExteriorWallTwoWindows;
```

## Buildings.Rooms.Constructions.Examples.ExteriorWall

Test model for an exterior wall without a window

### Information

This model tests the exterior construction without windows.

Extends from Modelica.Icons.Example (Icon for runnable examples).

### Modelica definition

```model ExteriorWall "Test model for an exterior wall without a window"
import Buildings;
extends Modelica.Icons.Example;

Buildings.Rooms.Constructions.Construction conExt[1](
A={10*3},
layers={extConMat},
til={Buildings.HeatTransfer.Types.Tilt.Wall})
"Construction of an exterior wall without a window";
Buildings.Rooms.BaseClasses.ExteriorBoundaryConditions bouConExt(
nCon=1,
absIR={0.5},
azi={0},
AOpa={1},
absSol={0.5},
lat=0.73268921998722,
conMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature,
til={Buildings.HeatTransfer.Types.Tilt.Wall})
"Exterior boundary conditions for constructions without a window";
Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature;
Buildings.HeatTransfer.Convection.Interior con[
1](A={3*10}, til={Buildings.HeatTransfer.Types.Tilt.Wall})
"Model for heat convection";
Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol(m=1)
"Thermal collector to link a vector of models to a single model";
"Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos");
Modelica.Blocks.Sources.Constant TRoo(k=273.15 + 20) "Room air temperature";
HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 extConMat
"Record for material layers";

equation
connect(prescribedTemperature.port, theCol.port_b);
connect(theCol.port_a, con.fluid);