LBL logo

Buildings.Fluid.HeatExchangers.BaseClasses.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.Fluid.HeatExchangers.BaseClasses.

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

Package Content

Name Description
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.EpsilonNTUZ EpsilonNTUZ Test model for the functions epsilon_ntuZ and ntu_epsilonZ
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HACoilInside HACoilInside Test model for HACoilInside
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HANaturalCylinder HANaturalCylinder Test model for natural convection outside of a coil
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementLatent HexElementLatent Model that tests the basic element that is used to built heat exchanger models
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementSensible HexElementSensible Model that tests the basic element that is used to built heat exchanger models
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.Manifold Manifold Test model for coil manifold
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.MassExchange MassExchange Test model for latent heat exchange
Buildings.Fluid.HeatExchangers.BaseClasses.Examples.RayleighNumber RayleighNumber Test model for RayleighNumber

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.EpsilonNTUZ Buildings.Fluid.HeatExchangers.BaseClasses.Examples.EpsilonNTUZ

Test model for the functions epsilon_ntuZ and ntu_epsilonZ

Information

Model to test the implementation of the epsilon-NTU functions and their inverse functions.

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

Modelica definition

model EpsilonNTUZ "Test model for the functions epsilon_ntuZ and ntu_epsilonZ" extends Modelica.Icons.Example; import f = Buildings.Fluid.Types.HeatExchangerFlowRegime; Real Z[5] "Ratio of capacity flow rates"; Real epsilon[5] "Heat exchanger effectiveness"; Real eps[5] "Heat exchanger effectiveness"; Real ntu[5] "Number of transfer units"; Real diff[5] "Difference in results"; equation for conf in {f.ParallelFlow, f.CounterFlow, f.CrossFlowUnmixed, f.CrossFlowCMinMixedCMaxUnmixed, f.CrossFlowCMinUnmixedCMaxMixed} loop Z[Integer(conf)] = abs(cos(time)); epsilon[Integer(conf)] = 0.01 + 0.98*abs(sin(time)) * 1/(1+Z[Integer(conf)]); ntu[Integer(conf)] = ntu_epsilonZ(epsilon[Integer(conf)], Z[Integer(conf)], Integer(conf)); eps[Integer(conf)] = epsilon_ntuZ(ntu[Integer(conf)], Z[Integer(conf)], Integer(conf)); diff[Integer(conf)] = epsilon[Integer(conf)] - eps[Integer(conf)]; end for; end EpsilonNTUZ;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HACoilInside Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HACoilInside

Test model for HACoilInside

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HACoilInside

Information

Test model for Buildings.Fluid.HeatExchanger.BaseClassess.HACoilInside.

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

Modelica definition

model HACoilInside "Test model for HACoilInside" extends Modelica.Icons.Example; Modelica.Blocks.Sources.Sine sine( freqHz=0.1, amplitude=0.063, offset=0.063) "Mass flow rate"; Modelica.Blocks.Sources.Sine sine1( amplitude=10, freqHz=0.1, offset=273.15 + 50) "Temperature"; Buildings.Fluid.HeatExchangers.BaseClasses.HACoilInside hASin( hA_nominal=13*(0.5+1)/0.5, m_flow_nominal=0.063) "Model for convection coefficient"; equation connect(sine1.y, hASin.T); connect(sine.y, hASin.m_flow); end HACoilInside;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HANaturalCylinder Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HANaturalCylinder

Test model for natural convection outside of a coil

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HANaturalCylinder

Information

Test model for Buildings.Fluid.HeatExchangers.BaseClasses.HANaturalCylinder.

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

Modelica definition

model HANaturalCylinder "Test model for natural convection outside of a coil" extends Modelica.Icons.Example; Buildings.Fluid.HeatExchangers.BaseClasses.HANaturalCylinder hANatCyl(redeclare package Medium = Buildings.Media.Water, ChaLen=0.1, hA_nominal=10, TFlu_nominal=293.15, TSur_nominal=313.15) "Calculates an hA value for natural convection around a cylinder"; Modelica.Blocks.Sources.Ramp TSur( duration=100, height=50, offset=293.15) "Temperature of the pipe surface"; Modelica.Blocks.Sources.Ramp TFlu( duration=100, startTime=150, height=50, offset=293.15) "Temperature of the surrounding fluid"; equation connect(TSur.y, hANatCyl.TSur); connect(TFlu.y, hANatCyl.TFlu); end HANaturalCylinder;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementLatent Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementLatent

Model that tests the basic element that is used to built heat exchanger models

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementLatent

Information

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

Modelica definition

model HexElementLatent "Model that tests the basic element that is used to built heat exchanger models" extends Modelica.Icons.Example; package Medium_W = Buildings.Media.Water; package Medium_A = Buildings.Media.Air; Buildings.Fluid.Sources.Boundary_pT sin_2( redeclare package Medium = Medium_A, use_p_in=true, use_T_in=true, T=288.15, nPorts=1); Modelica.Blocks.Sources.Ramp PIn( height=20, duration=300, startTime=300, offset=101325); Buildings.Fluid.Sources.Boundary_pT sou_2( redeclare package Medium = Medium_A, use_p_in=true, use_T_in=true, T=283.15, nPorts=1); Modelica.Blocks.Sources.Ramp TWat( startTime=1, height=4, duration=300, offset=303.15) "Water temperature"; Modelica.Blocks.Sources.Constant TDb(k=278.15) "Drybulb temperature"; Modelica.Blocks.Sources.Constant POut(k=101325); Buildings.Fluid.Sources.Boundary_pT sin_1( redeclare package Medium = Medium_W, use_p_in=true, T=288.15, nPorts=1); Buildings.Fluid.Sources.Boundary_pT sou_1( redeclare package Medium = Medium_W, use_T_in=true, nPorts=1, p=101340, T=293.15); Fluid.FixedResistances.FixedResistanceDpM res_22( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_A); Fluid.FixedResistances.FixedResistanceDpM res_12( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_W); Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent hex( m1_flow_nominal=5, m2_flow_nominal=5, UA_nominal=9999, redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, dp1_nominal=5, dp2_nominal=5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Modelica.Blocks.Sources.Constant TDb1(k=303.15) "Drybulb temperature"; Fluid.FixedResistances.FixedResistanceDpM res_11( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_W); Fluid.FixedResistances.FixedResistanceDpM res_21( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_A); Modelica.Blocks.Sources.Constant hACon(k=10000) "Convective heat transfer"; equation connect(TDb.y, sou_1.T_in); connect(POut.y, sin_1.p_in); connect(PIn.y, sou_2.p_in); connect(TWat.y, sou_2.T_in); connect(POut.y, sin_2.p_in); connect(hex.port_b1, res_12.port_a); connect(res_22.port_a, hex.port_b2); connect(TDb1.y, sin_2.T_in); connect(res_11.port_b, hex.port_a1); connect(hex.port_a2, res_21.port_b); connect(hACon.y, hex.Gc_1); connect(hACon.y, hex.Gc_2); connect(sou_2.ports[1], res_21.port_a); connect(sin_1.ports[1], res_12.port_b); connect(sou_1.ports[1], res_11.port_a); connect(sin_2.ports[1], res_22.port_b); end HexElementLatent;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementSensible Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementSensible

Model that tests the basic element that is used to built heat exchanger models

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.HexElementSensible

Information

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

Modelica definition

model HexElementSensible "Model that tests the basic element that is used to built heat exchanger models" extends Modelica.Icons.Example; package Medium_W = Buildings.Media.Water; package Medium_A = Buildings.Media.Air; Buildings.Fluid.Sources.Boundary_pT sin_2( redeclare package Medium = Medium_A, use_p_in=true, use_T_in=true, T=288.15, nPorts=1); Modelica.Blocks.Sources.Ramp PIn( height=20, duration=300, startTime=300, offset=101325); Buildings.Fluid.Sources.Boundary_pT sou_2( redeclare package Medium = Medium_A, use_p_in=true, use_T_in=true, T=283.15, nPorts=1); Modelica.Blocks.Sources.Ramp TWat( startTime=1, height=4, duration=300, offset=303.15) "Water temperature"; Modelica.Blocks.Sources.Constant TDb(k=278.15) "Drybulb temperature"; Modelica.Blocks.Sources.Constant POut(k=101325); Buildings.Fluid.Sources.Boundary_pT sin_1( redeclare package Medium = Medium_W, use_p_in=true, T=288.15, nPorts=1); Buildings.Fluid.Sources.Boundary_pT sou_1( redeclare package Medium = Medium_W, use_T_in=true, nPorts=1, p=101340, T=293.15); Fluid.FixedResistances.FixedResistanceDpM res_22( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_A); Fluid.FixedResistances.FixedResistanceDpM res_12( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_W); Buildings.Fluid.HeatExchangers.BaseClasses.HexElementSensible hex( m1_flow_nominal=5, m2_flow_nominal=5, UA_nominal=9999, redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, dp1_nominal=5, dp2_nominal=5, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Modelica.Blocks.Sources.Constant TDb1(k=303.15) "Drybulb temperature"; Fluid.FixedResistances.FixedResistanceDpM res_11( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_W); Fluid.FixedResistances.FixedResistanceDpM res_21( m_flow_nominal=5, dp_nominal=5, redeclare package Medium = Medium_A); Modelica.Blocks.Sources.Constant hACon(k=10000) "Convective heat transfer"; equation connect(TDb.y, sou_1.T_in); connect(POut.y, sin_1.p_in); connect(PIn.y, sou_2.p_in); connect(TWat.y, sou_2.T_in); connect(POut.y, sin_2.p_in); connect(hex.port_b1, res_12.port_a); connect(res_22.port_a, hex.port_b2); connect(TDb1.y, sin_2.T_in); connect(res_11.port_b, hex.port_a1); connect(hex.port_a2, res_21.port_b); connect(hACon.y, hex.Gc_1); connect(hACon.y, hex.Gc_2); connect(sou_2.ports[1], res_21.port_a); connect(sin_1.ports[1], res_12.port_b); connect(sou_1.ports[1], res_11.port_a); connect(sin_2.ports[1], res_22.port_b); end HexElementSensible;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.Manifold Buildings.Fluid.HeatExchangers.BaseClasses.Examples.Manifold

Test model for coil manifold

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.Manifold

Information

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

Parameters

TypeNameDefaultDescription
IntegernPipPar3Number of parallel pipes
IntegernPipSeg4Number of pipe segments

Modelica definition

model Manifold "Test model for coil manifold" package Medium1 = Buildings.Media.Water "Water"; package Medium2 = Buildings.Media.Air "Air"; extends Modelica.Icons.Example; parameter Integer nPipPar = 3 "Number of parallel pipes"; parameter Integer nPipSeg = 4 "Number of pipe segments"; Buildings.Fluid.Sources.Boundary_pT sin_1( nPorts=1, T=283.15, redeclare package Medium = Medium1); Buildings.Fluid.Sources.Boundary_pT sou_1( use_p_in=true, use_T_in=true, p=101335, T=293.15, nPorts=1, redeclare package Medium = Medium1); Fluid.FixedResistances.FixedResistanceDpM res_1( m_flow_nominal=5, use_dh=true, from_dp=false, dp_nominal=3000, redeclare package Medium = Medium1); Buildings.Fluid.Sensors.MassFlowRate[nPipPar] mfr_1(redeclare package Medium = Medium1); Modelica.Blocks.Sources.Ramp TDb( height=1, duration=1, offset=293.15); Modelica.Blocks.Sources.Ramp P( duration=1, height=12E3, offset=3E5 - 6E3); Buildings.Fluid.HeatExchangers.BaseClasses.PipeManifoldFixedResistance pipFixRes_1( nPipPar=nPipPar, m_flow_nominal=5, linearized=false, mStart_flow_a=5, dp_nominal(displayUnit="Pa") = 3000, redeclare package Medium = Medium1); Buildings.Fluid.HeatExchangers.BaseClasses.PipeManifoldNoResistance pipNoRes_1( nPipPar=nPipPar, mStart_flow_a=5, redeclare package Medium = Medium1); Fluid.FixedResistances.FixedResistanceDpM res_2( m_flow_nominal=5, dp_nominal=10, use_dh=true, from_dp=false, redeclare package Medium = Medium2); Buildings.Fluid.Sensors.MassFlowRate[nPipPar, nPipSeg] mfr_2(redeclare package Medium = Medium2); Buildings.Fluid.HeatExchangers.BaseClasses.DuctManifoldFixedResistance ducFixRes_2( nPipPar=nPipPar, nPipSeg=nPipSeg, m_flow_nominal=5, linearized=false, mStart_flow_a=5, dp_nominal=10, redeclare package Medium = Medium2); Buildings.Fluid.HeatExchangers.BaseClasses.DuctManifoldNoResistance ducNoRes_2( nPipPar=nPipPar, nPipSeg=nPipSeg, mStart_flow_a=5, redeclare package Medium = Medium2); Buildings.Fluid.HeatExchangers.BaseClasses.CoilHeader hea1( nPipPar=nPipPar, mStart_flow_a=5, redeclare package Medium = Medium1) "Header for water-side heat exchanger register"; Buildings.Fluid.HeatExchangers.BaseClasses.CoilHeader hea2( nPipPar=nPipPar, mStart_flow_a=5, redeclare package Medium = Medium1) "Header for water-side heat exchanger register"; Buildings.Fluid.Sources.Boundary_pT sou_2( use_p_in=true, use_T_in=true, p=101335, T=293.15, nPorts=1, redeclare package Medium = Medium2); Buildings.Fluid.Sources.Boundary_pT sin_2( nPorts=1, T=283.15, redeclare package Medium = Medium2); Modelica.Blocks.Sources.Ramp P1( duration=1, height=40, offset=101305); equation connect(TDb.y, sou_1.T_in); connect(P.y, sou_1.p_in); connect(res_1.port_a, pipNoRes_1.port_a); connect(res_2.port_a,ducNoRes_2. port_a); connect(pipFixRes_1.port_b, hea1.port_a); connect(hea1.port_b, mfr_1.port_a); connect(mfr_1.port_b, hea2.port_a); connect(hea2.port_b, pipNoRes_1.port_b); connect(ducFixRes_2.port_b, mfr_2.port_a); connect(mfr_2.port_b, ducNoRes_2.port_b); connect(sou_1.ports[1], pipFixRes_1.port_a); connect(sin_1.ports[1], res_1.port_b); connect(TDb.y,sou_2. T_in); connect(sin_2.ports[1], res_2.port_b); connect(P1.y, sou_2.p_in); connect(sou_2.ports[1], ducFixRes_2.port_a); end Manifold;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.MassExchange Buildings.Fluid.HeatExchangers.BaseClasses.Examples.MassExchange

Test model for latent heat exchange

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.MassExchange

Information

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

Modelica definition

model MassExchange "Test model for latent heat exchange" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air; Buildings.Fluid.HeatExchangers.BaseClasses.MassExchange masExc(redeclare package Medium = Medium) "Model for mass exchange"; Modelica.Blocks.Sources.Ramp TSur( duration=1, height=20, offset=273.15 + 5) "Surface temperature"; Modelica.Blocks.Sources.Constant X_w(k=0.01) "Humidity mass fraction in medium"; Modelica.Blocks.Sources.Constant Gc(k=1) "Sensible convective thermal conductance"; equation connect(TSur.y, masExc.TSur); connect(Gc.y, masExc.Gc); connect(X_w.y, masExc.XInf); end MassExchange;

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.RayleighNumber Buildings.Fluid.HeatExchangers.BaseClasses.Examples.RayleighNumber

Test model for RayleighNumber

Buildings.Fluid.HeatExchangers.BaseClasses.Examples.RayleighNumber

Information

Test model for Buildings.Fluid.HeatExchangers.BaseClasses.RayleighNumber.

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

Modelica definition

model RayleighNumber "Test model for RayleighNumber" extends Modelica.Icons.Example; Buildings.Fluid.HeatExchangers.BaseClasses.RayleighNumber rayleighNumber(ChaLen= 0.1, redeclare package Medium = Buildings.Media.Water); Modelica.Blocks.Sources.Sine TSur( amplitude=50, freqHz=1/50, offset=273.15 + 50) "Temperature of the hot surface"; Modelica.Blocks.Sources.Sine TFlu( amplitude=50, freqHz=1/25, offset=273.15 + 50) "Temperature of the surrounding fluid"; equation connect(TSur.y, rayleighNumber.TSur); connect(TFlu.y, rayleighNumber.TFlu); end RayleighNumber;

Automatically generated Mon May 4 10:21:56 2015.