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).
Name | Description |
---|---|
ConductorStepResponse | Test model for heat conductor |
ConductorSteadyStateTransient | Test model for heat conductor |
ConductorSingleLayer | Test model for heat conductor |
ConductorSingleLayerCylinder | Test model for heat conduction in a cylinder |
ConductorMultiLayer | Test model for heat conductor |
ConductorInitialization | Test model for heat conductor initialization |
assert
block will stop the simulation if the heat exchange with the boundary
condition differs.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Type | Name | Default | Description |
---|---|---|---|
Concrete | concrete | ||
Carpet | carpet | carpet | |
Generic | composite |
model ConductorStepResponse "Test model for heat conductor" import Buildings; extends Modelica.Icons.Example;parameter Buildings.HeatTransfer.Data.Solids.Concrete concrete(x=0.12, nStaRef=4); parameter Buildings.HeatTransfer.Data.Resistances.Carpet carpet "carpet"; parameter 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"; equationconnect(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;
assert
block will stop the simulation if the heat exchange with the boundary
condition differs.
Extends from Modelica.Icons.Example (Icon for runnable examples).
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"; equationconnect(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;
assert
block will stop the simulation if the heat exchange with the boundary
condition differs.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Type | Name | Default | Description |
---|---|---|---|
Concrete | concrete200 | ||
Concrete | concrete100 |
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); parameter Buildings.HeatTransfer.Data.Solids.Concrete concrete200(x=0.2, nStaRef=4); parameter 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"; equationconnect(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;
Extends from Modelica.Icons.Example (Icon for runnable examples).
Type | Name | Default | Description |
---|---|---|---|
HeatFlowRate | Q_flow | 50 | [W] |
Concrete | concrete |
model ConductorSingleLayerCylinder "Test model for heat conduction in a cylinder" extends Modelica.Icons.Example; import Buildings; parameter Modelica.SIunits.HeatFlowRate Q_flow=50;Buildings.HeatTransfer.Conduction.SingleLayerCylinder con( material=concrete, steadyStateInitial=false, nSta=8, r_a=0.1, r_b=3, h=10, TInt_start=293.15, TExt_start=293.15); Buildings.HeatTransfer.Sources.PrescribedHeatFlow Qa; parameter Buildings.HeatTransfer.Data.Soil.Concrete concrete; Modelica.Blocks.Sources.Step step( offset=0, height=Q_flow, startTime=3600); Buildings.HeatTransfer.Sources.FixedTemperature TBou(T=293.15) "Boundary condition"; equationconnect(Qa.port, con.port_a); connect(step.y, Qa.Q_flow); connect(TBou.port, con.port_b); end ConductorSingleLayerCylinder;
Extends from Modelica.Icons.Example (Icon for runnable examples).
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"; equationconnect(step.y, TA.T); connect(con.port_b, TB.port); connect(conv.fluid, TA.port); connect(conv.solid, con.port_a); end ConductorMultiLayer;
Extends from Modelica.Icons.Example (Icon for runnable examples).
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); equationconnect(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;