Buildings.HeatTransfer.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.HeatTransfer.

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

Package Content

NameDescription
Buildings.HeatTransfer.Examples.ConductorStepResponse ConductorStepResponse Test model for heat conductor
Buildings.HeatTransfer.Examples.ConductorSteadyStateTransient ConductorSteadyStateTransient Test model for heat conductor
Buildings.HeatTransfer.Examples.ConductorSingleLayer ConductorSingleLayer Test model for heat conductor
Buildings.HeatTransfer.Examples.ConductorMultiLayer ConductorMultiLayer Test model for heat conductor
Buildings.HeatTransfer.Examples.ConductorInitialization ConductorInitialization Test model for heat conductor initialization


Buildings.HeatTransfer.Examples.ConductorStepResponse Buildings.HeatTransfer.Examples.ConductorStepResponse

Test model for heat conductor

Buildings.HeatTransfer.Examples.ConductorStepResponse

Information


This example illustrates modeling of multi-layer materials. It also tests if the 
multi-layer material computes the same heat transfer with its boundary condition 
as two instances of a single layer material. 
The insulation and the brick are computed using transient heat conduction.
The assert block will stop the simulation if the heat exchange with the boundary
condition differs.

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

Modelica definition

model ConductorStepResponse "Test model for heat conductor"
  import Buildings;
  extends Modelica.Icons.Example;
  Buildings.HeatTransfer.Data.Solids.Concrete concrete(x=0.12, nStaRef=4);
  Buildings.HeatTransfer.Data.Resistances.Carpet carpet "carpet";
  Buildings.HeatTransfer.Data.OpaqueConstructions.Generic composite(
      nLay=2,
      material={carpet,concrete});
  Buildings.HeatTransfer.Conduction.MultiLayer conMul(
    A=2, layers=composite);
  Buildings.HeatTransfer.Conduction.SingleLayer con(
    A=2, material=carpet);
  Buildings.HeatTransfer.Sources.FixedTemperature TB(T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA;
  Modelica.Blocks.Sources.Step step(
    height=10,
    offset=293.15,
    startTime=3600);
  Buildings.HeatTransfer.Conduction.SingleLayer con1(
    A=2, material=carpet);
  Buildings.HeatTransfer.Sources.FixedTemperature TB1(      T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA1;
  Buildings.HeatTransfer.Conduction.SingleLayer con2(
    A=2, material=concrete);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA2;
  Buildings.HeatTransfer.Sources.FixedTemperature TB2(      T=293.15);
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo1;
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo2;
  Buildings.Utilities.Diagnostics.AssertEquality assertEquality(threShold=1E-8);
  Buildings.HeatTransfer.Convection.Interior conv1(
                                          A=2, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
  Buildings.HeatTransfer.Convection.Interior conv2(
                                          A=2, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
equation 
  connect(con.port_b,TB. port);
  connect(step.y,TA. T);
  connect(step.y,TA1. T);
  connect(con1.port_b,con2. port_a);
  connect(con2.port_b,TB1. port);
  connect(TA2.T,step. y);
  connect(heaFlo1.port_b,con1. port_a);
  connect(assertEquality.u1,heaFlo2. Q_flow);
  connect(assertEquality.u2,heaFlo1. Q_flow);
  connect(TA.port,con. port_a);
  connect(conMul.port_b,TB2. port);
  connect(conMul.port_a,heaFlo2. port_b);
  connect(TA1.port, conv1.fluid);
  connect(conv1.solid, heaFlo1.port_a);
  connect(TA2.port, conv2.fluid);
  connect(conv2.solid, heaFlo2.port_a);
end ConductorStepResponse;

Buildings.HeatTransfer.Examples.ConductorSteadyStateTransient Buildings.HeatTransfer.Examples.ConductorSteadyStateTransient

Test model for heat conductor

Buildings.HeatTransfer.Examples.ConductorSteadyStateTransient

Information


This example illustrates modeling of multi-layer materials. It also tests if the 
multi-layer material computes the same heat transfer with its boundary condition 
as two instances of a single layer material. 
The insulation is computed in steady-state, whereas the brick is computed using transient
heat conduction.
The assert block will stop the simulation if the heat exchange with the boundary
condition differs.

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

Modelica definition

model ConductorSteadyStateTransient "Test model for heat conductor"
  import Buildings;
  extends Modelica.Icons.Example;

  Buildings.HeatTransfer.Data.Solids.Brick brick(x=0.12, nStaRef=4);
  Buildings.HeatTransfer.Data.Solids.InsulationBoard insul(
    x=0.05,
    c=0,
    nStaRef=3) "Insulation";
  Buildings.HeatTransfer.Data.OpaqueConstructions.Generic composite(nLay=2, material=
       {insul,brick});

  Buildings.HeatTransfer.Conduction.MultiLayer conMul(
    A=2, layers=composite);
  Buildings.HeatTransfer.Conduction.SingleLayer con(
    A=2, material=brick);

  Buildings.HeatTransfer.Sources.FixedTemperature TB(T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA;

  Modelica.Blocks.Sources.Step step(
    height=10,
    offset=293.15,
    startTime=3600);
  Buildings.HeatTransfer.Conduction.SingleLayer con1(
    A=2, material=insul);
  Buildings.HeatTransfer.Sources.FixedTemperature TB1(T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA1;
  Buildings.HeatTransfer.Conduction.SingleLayer con2(
    A=2, material=brick);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA2;
  Buildings.HeatTransfer.Sources.FixedTemperature TB2(T=293.15);
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo1;
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo2;
  Buildings.Utilities.Diagnostics.AssertEquality assertEquality(threShold=1E-8);
  Buildings.HeatTransfer.Convection.Interior conv1(A=2, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
  Buildings.HeatTransfer.Convection.Interior conv2(A=2, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
equation 
  connect(con.port_b, TB.port);
  connect(step.y, TA.T);
  connect(step.y, TA1.T);
  connect(con1.port_b, con2.port_a);
  connect(con2.port_b, TB1.port);
  connect(TA2.T, step.y);
  connect(heaFlo1.port_b, con1.port_a);
  connect(assertEquality.u1, heaFlo2.Q_flow);
  connect(assertEquality.u2, heaFlo1.Q_flow);
  connect(TA.port, con.port_a);
  connect(conMul.port_b, TB2.port);
  connect(conMul.port_a, heaFlo2.port_b);
  connect(TA1.port, conv1.fluid);
  connect(conv1.solid, heaFlo1.port_a);
  connect(TA2.port, conv2.fluid);
  connect(conv2.solid, heaFlo2.port_a);
end ConductorSteadyStateTransient;

Buildings.HeatTransfer.Examples.ConductorSingleLayer Buildings.HeatTransfer.Examples.ConductorSingleLayer

Test model for heat conductor

Buildings.HeatTransfer.Examples.ConductorSingleLayer

Information


This example tests if two conductors in series computes the same heat transfer
as one conductor with twice the thickness.
The assert block will stop the simulation if the heat exchange with the boundary
condition differs.

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

Modelica definition

model ConductorSingleLayer "Test model for heat conductor"
  extends Modelica.Icons.Example;
  import Buildings;
  Buildings.HeatTransfer.Conduction.SingleLayer con(A=1, material=concrete200);
  Buildings.HeatTransfer.Sources.FixedTemperature TB(T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA;
  Modelica.Blocks.Sources.Step step(
    height=10,
    offset=293.15,
    startTime=3600);
  Buildings.HeatTransfer.Conduction.SingleLayer con1(
    A=1, material=concrete100);
  Buildings.HeatTransfer.Sources.FixedTemperature TB1(      T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA1;
  Buildings.HeatTransfer.Conduction.SingleLayer con2(
    A=1, material=concrete100);
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo2;
  Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo1;
  Buildings.Utilities.Diagnostics.AssertEquality assertEquality(threShold=1E-8);
  Buildings.HeatTransfer.Data.Solids.Concrete concrete200(x=0.2, nStaRef=4);
  Buildings.HeatTransfer.Data.Solids.Concrete concrete100(x=0.1, nStaRef=4);
  Buildings.HeatTransfer.Convection.Interior conv1(      A=1, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
  Buildings.HeatTransfer.Convection.Interior conv2(      A=1, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
equation 
  connect(con.port_b, TB.port);
  connect(step.y, TA.T);
  connect(step.y, TA1.T);
  connect(con1.port_b, con2.port_a);
  connect(con2.port_b, TB1.port);
  connect(heaFlo2.port_b, con1.port_a);
  connect(heaFlo1.port_b, con.port_a);
  connect(assertEquality.u1, heaFlo2.Q_flow);
  connect(assertEquality.u2, heaFlo1.Q_flow);
  connect(TA.port, conv1.fluid);
  connect(TA1.port, conv2.fluid);
  connect(conv2.solid, heaFlo2.port_a);
  connect(conv1.solid, heaFlo1.port_a);
end ConductorSingleLayer;

Buildings.HeatTransfer.Examples.ConductorMultiLayer Buildings.HeatTransfer.Examples.ConductorMultiLayer

Test model for heat conductor

Buildings.HeatTransfer.Examples.ConductorMultiLayer

Information


This example illustrates how to use a solid material, set its heat capacity to zero, 
and then use this material in a multi-layer construction.
The plot window shows that the insulation is computed in steady state, where
as the brick is computed using transient heat conduction.

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

Modelica definition

model ConductorMultiLayer "Test model for heat conductor"
  extends Modelica.Icons.Example;
  import Buildings;
  Buildings.HeatTransfer.Sources.FixedTemperature TB(T=293.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA;
  Modelica.Blocks.Sources.Step step(
    height=10,
    offset=293.15,
    startTime=43200);
  Buildings.HeatTransfer.Conduction.MultiLayer con(
    steadyStateInitial=false,
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200
      layers,
    A=0.1);
  Buildings.HeatTransfer.Convection.Interior conv(      A=0.1, til=Buildings.HeatTransfer.Types.Tilt.Wall) 
    "Convective heat transfer";
equation 
  connect(step.y, TA.T);
  connect(con.port_b, TB.port);
  connect(conv.fluid, TA.port);
  connect(conv.solid, con.port_a);
end ConductorMultiLayer;

Buildings.HeatTransfer.Examples.ConductorInitialization Buildings.HeatTransfer.Examples.ConductorInitialization

Test model for heat conductor initialization

Buildings.HeatTransfer.Examples.ConductorInitialization

Information


This example illustrates how to initialize heat conductors in steady state and with
predefined temperatures.

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

Modelica definition

model ConductorInitialization 
  "Test model for heat conductor initialization"
  extends Modelica.Icons.Example;
  import Buildings;
  Buildings.HeatTransfer.Sources.FixedTemperature TB(T=303.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA;
  Buildings.HeatTransfer.Data.OpaqueConstructions.Generic compositeWall(
      material={insulation,brick}, final nLay=2) 
    "Composite wall consisting of insulation and material";
  Buildings.HeatTransfer.Data.Solids.Brick brick(x=0.18, nStaRef=3);
  Buildings.HeatTransfer.Data.Solids.InsulationBoard insulation(x=0.05, nStaRef=2);

  Buildings.HeatTransfer.Conduction.MultiLayer conS1(
    A=2,
    steadyStateInitial=true,
    layers=compositeWall);

  Buildings.HeatTransfer.Conduction.SingleLayer conS2(
    A=2,
    steadyStateInitial=true,
    material=brick);

  Buildings.HeatTransfer.Conduction.MultiLayer conD1(
    A=2,
    steadyStateInitial=false,
    layers=compositeWall,
    T_a_start=288.15,
    T_b_start=298.15);

  Buildings.HeatTransfer.Conduction.SingleLayer conD2(
    A=2,
    material=brick,
    steadyStateInitial=false,
    T_a_start=288.15,
    T_b_start=298.15);

  Buildings.HeatTransfer.Sources.FixedTemperature TB1(T=303.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA1;

  Buildings.HeatTransfer.Sources.FixedTemperature TB2(T=303.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA2;

  Buildings.HeatTransfer.Sources.FixedTemperature TB3(T=303.15);
  Buildings.HeatTransfer.Sources.PrescribedTemperature TA3;
  Modelica.Blocks.Sources.Step step(
    height=10,
    offset=283.15,
    startTime=43200);

equation 
  connect(step.y, TA.T);
  connect(conS1.port_b, TB.port);
  connect(TA.port, conS1.port_a);
  connect(conS2.port_b, TB1.port);
  connect(TA1.port, conS2.port_a);
  connect(TA1.T, step.y);
  connect(conD1.port_b, TB2.port);
  connect(TA2.port, conD1.port_a);
  connect(TA2.T, step.y);
  connect(TA3.T, step.y);
  connect(TA3.port, conD2.port_a);
  connect(conD2.port_b, TB3.port);
end ConductorInitialization;

Automatically generated Fri May 06 14:13:31 2011.