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).
| Name | Description | 
|---|---|
| Test model for an exterior wall with a window | |
| Test model for an exterior wall with two windows, one having a shade, the other not | |
| Test model for an exterior wall without a window | 
Buildings.Rooms.Constructions.Examples.ExteriorWallWithWindow
This model tests the exterior constructions with windows.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Type | Name | Default | Description | 
|---|---|---|---|
| Area | A | 3*10 | Heat transfer area of wall and window [m2] | 
| Length | hWin | 2 | Window height [m] | 
| Length | wWin | 3 | Window width [m] | 
| Area | AWin | hWin*wWin | Heat transfer area of frame and window [m2] | 
| Real | fFra | 0.1 | Fraction of window frame divided by total window area | 
| Boolean | linearizeRadiation | false | Set to true to linearize emissive power | 
| DoubleClearAir13Clear | glaSys | Record for glazing system | |
| Insulation100Concrete200 | extConMat | Record for material layers | |
| ParameterConstructionWithWindow | conPar | Data for construction with window | 
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.Length hWin = 2 "Window height";
  parameter Modelica.SIunits.Length wWin = 3 "Window width";
  parameter Modelica.SIunits.Area AWin=hWin*wWin 
    "Heat transfer area of frame and window";
  parameter Real fFra=0.1 
    "Fraction of window frame divided by total window area";
  parameter Boolean linearizeRadiation = false 
    "Set to true to linearize emissive power";
  parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(
    UFra=2,
    shade=Buildings.HeatTransfer.Data.Shades.Gray(),
    haveExteriorShade=false,
    haveInteriorShade=false) "Record for glazing system"; 
  ConstructionWithWindow conExt[1](
    layers={conPar.layers},
    glaSys={conPar.glaSys},
    linearizeRadiation = {linearizeRadiation},
    A={conPar.A},
    AWin={conPar.hWin * conPar.wWin},
    fFra={conPar.fFra},
    til={conPar.til}) "Construction of an exterior wall with a window";
  Buildings.Rooms.BaseClasses.ExteriorBoundaryConditionsWithWindow
    bouConExt(
    nCon=1,
    linearizeRadiation = linearizeRadiation,
    conMod=Buildings.HeatTransfer.Types.InteriorConvection.Fixed,
    lat=0.73268921998722,
    conPar={conPar}) 
    "Exterior boundary conditions for constructions with a window";
  Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature;
  Buildings.HeatTransfer.Convection.Interior con[1](
      each 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";
  BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
        "Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos");
  Modelica.Blocks.Sources.Constant TRoo(k=273.15 + 20) "Room air temperature";
  parameter HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 extConMat 
    "Record for material layers"; 
  HeatTransfer.Windows.InteriorHeatTransfer intCon[1](
    each A=AWin,
    each fFra=fFra,
    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},
    each linearizeRadiation = linearizeRadiation) 
    "Model for interior convection";
  Modelica.Blocks.Sources.Constant uSha(k=0) "Shading control signal";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol1(m=1) 
    "Thermal collector to link a vector of models to a single model";
  HeatTransfer.Radiosity.IndoorRadiosity indRad(A=AWin, linearize = linearizeRadiation) 
    "Model for indoor radiosity";
  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) 
    "Solar radiation absorbed by glass";
  Modelica.Blocks.Sources.Constant QAbsSha(each k=0) 
    "Solar radiation absorbed by interior shade";
  Modelica.Blocks.Sources.Constant QTra(each k=0) 
    "Solar radiation absorbed by exterior shade";
  Buildings.HeatTransfer.Convection.Interior con1[
                              1](each 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";
  parameter Buildings.Rooms.BaseClasses.ParameterConstructionWithWindow conPar(
    til=Buildings.HeatTransfer.Types.Tilt.Wall,
    azi=0,
    layers=extConMat,
    glaSys=glaSys,
    A=A,
    hWin=hWin,
    wWin=wWin) "Data for construction with window"; 
equation 
  connect(prescribedTemperature.port, theCol.port_b);
  connect(theCol.port_a, con.fluid);
  connect(weaDat.weaBus, bouConExt.weaBus);
  connect(TRoo.y, prescribedTemperature.T);
  connect(theCol1.port_b, prescribedTemperature.port);
  connect(intCon[1].uSha, uSha.y);
  connect(theCol1.port_a, intCon.air);
  connect(indRad.JOut, intCon[1].JInRoo);
  connect(indRad.JIn, intCon[1].JOutRoo);
  connect(indRad.heatPort, prescribedTemperature.port);
  connect(intCon.frame, theCol2.port_a);
  connect(theCol2.port_b, indRad.heatPort);
  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
This model tests the exterior construction with two windows.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Type | Name | Default | Description | 
|---|---|---|---|
| Integer | nCon | 2 | Number of constructions | 
| Area | A[:] | {3*10,3*10} | Heat transfer area of wall and window [m2] | 
| Length | hWin[:] | {2,1} | Window height [m] | 
| Length | wWin[:] | {3,3} | Window width [m] | 
| Area | AWin[:] | hWin .* wWin | Heat transfer area of frame and window [m2] | 
| Real | fFra[:] | {0.1,0.1} | Fraction of window frame divided by total window area | 
| Boolean | linearizeRadiation | false | Set to true to linearize emissive power | 
| DoubleClearAir13Clear | glaSys1 | Record for glazing system | |
| DoubleClearAir13Clear | glaSys2 | Record for glazing system | |
| ParameterConstructionWithWindow | conPar[nCon] | Construction parameters | 
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.Length hWin[:] = {2, 1} "Window height";
  parameter Modelica.SIunits.Length wWin[:] = {3, 3} "Window width";
  parameter Modelica.SIunits.Area AWin[:]= hWin .* wWin 
    "Heat transfer area of frame and window";
  parameter Real fFra[:]={0.1, 0.1} 
    "Fraction of window frame divided by total window area";
  parameter Boolean linearizeRadiation = false 
    "Set to true to linearize emissive power";
  parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys1(
    UFra=2,
    shade=Buildings.HeatTransfer.Data.Shades.Gray(),
    haveInteriorShade=false,
    haveExteriorShade=false) "Record for glazing system";
  parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys2(
    UFra=2,
    shade=Buildings.HeatTransfer.Data.Shades.Gray(),
    haveInteriorShade=false,
    haveExteriorShade=false) "Record for glazing system"; 
  parameter Buildings.Rooms.BaseClasses.ParameterConstructionWithWindow conPar[nCon](
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200
      layers,
    each til=Buildings.HeatTransfer.Types.Tilt.Wall,
    each azi=0.017453292519943,
    A=A,
    hWin=hWin,
    wWin=wWin,
    glaSys = {glaSys1, glaSys2}) "Construction parameters"; 
  ConstructionWithWindow conExt[nCon](
    layers=conPar[:].layers,
    glaSys=conPar[:].glaSys,
    linearizeRadiation = {linearizeRadiation, linearizeRadiation},
    A=conPar[:].A,
    AWin=conPar[:].hWin .* conPar[:].wWin,
    fFra=conPar[:].fFra,
    til=conPar[:].til) "Construction of an exterior wall with a window"; 
  Buildings.Rooms.BaseClasses.ExteriorBoundaryConditionsWithWindow
    bouConExt(
    nCon=2,
    linearizeRadiation = false,
    conMod=Buildings.HeatTransfer.Types.InteriorConvection.Fixed,
    lat=0.73268921998722,
    conPar=conPar) 
    "Exterior boundary conditions for constructions with 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";
  BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam=
        "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,
    absIRSha_air={glaSys1.shade.absIR_a, glaSys2.shade.absIR_a},
    absIRSha_glass={glaSys1.shade.absIR_b, glaSys2.shade.absIR_b},
    tauIRSha_air={glaSys1.shade.tauIR_a, glaSys2.shade.tauIR_a},
    tauIRSha_glass={glaSys1.shade.tauIR_b, glaSys2.shade.tauIR_b},
    haveExteriorShade={glaSys1.haveExteriorShade, glaSys2.haveExteriorShade},
    haveInteriorShade={glaSys1.haveInteriorShade, glaSys2.haveInteriorShade},
    each linearizeRadiation = linearizeRadiation) 
    "Model for interior convection";
  Modelica.Blocks.Sources.Constant uSha(k=0) "Shading control signal";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theCol1(m=2) 
    "Thermal collector to link a vector of models to a single model";
  HeatTransfer.Radiosity.IndoorRadiosity indRad[nCon](each linearize = linearizeRadiation,
    A=AWin) "Model for indoor radiosity";
  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) 
    "Solar radiation absorbed by interior shade";
  Modelica.Blocks.Sources.Constant QAbs[nCon,glaSys1.nLay](each k=0) 
    "Solar radiation absorbed by glass";
  Modelica.Blocks.Sources.Constant QTra[nCon](each k=0) 
    "Solar radiation absorbed by exterior shade";
  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(weaDat.weaBus, bouConExt.weaBus);
  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(indRad.JOut, intCon.JInRoo);
  connect(indRad.JIn, intCon.JOutRoo);
  connect(theCol3.port_a, indRad.heatPort);
  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
This model tests the exterior construction without windows.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Type | Name | Default | Description | 
|---|---|---|---|
| Insulation100Concrete200 | extConMat | Record for material layers | |
| ParameterConstruction | conPar[1] | Data for construction | 
model ExteriorWall "Test model for an exterior wall without a window" import Buildings; extends Modelica.Icons.Example;Buildings.Rooms.Constructions.Construction conExt[1]( A=conPar[:].A, layers=conPar[:].layers, til={Buildings.HeatTransfer.Types.Tilt.Wall}) "Construction of an exterior wall without a window"; Buildings.Rooms.BaseClasses.ExteriorBoundaryConditions bouConExt( nCon=1, linearizeRadiation = false, conMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature, lat=0.73268921998722, conPar=conPar) "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"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam= "Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"); Modelica.Blocks.Sources.Constant TRoo(k=273.15 + 20) "Room air temperature"; parameter HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 extConMat "Record for material layers"; parameter Buildings.Rooms.BaseClasses.ParameterConstruction conPar[1]( each til=Buildings.HeatTransfer.Types.Tilt.Wall, each azi=0, each A=3*10, layers={extConMat}) "Data for construction"; equationconnect(prescribedTemperature.port, theCol.port_b); connect(theCol.port_a, con.fluid); connect(weaDat.weaBus, bouConExt.weaBus); connect(TRoo.y, prescribedTemperature.T); connect(con.solid, conExt.opa_b); connect(bouConExt.opa_a, conExt.opa_a); end ExteriorWall;