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 |
EpsilonNTUZ
|
Test model for the functions epsilon_ntuZ and ntu_epsilonZ |
HACoilInside
|
Test model for HACoilInside |
HANaturalCylinder
|
Test model for natural convection outside of a coil |
HexElementLatent
|
Model that tests the basic element that is used to built heat exchanger models |
HexElementSensible
|
Model that tests the basic element that is used to built heat exchanger models |
MassExchange
|
Test model for latent heat exchange |
RayleighNumber
|
Test model for RayleighNumber |
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
extends Modelica.Icons.Example;
import f =
Buildings.Fluid.Types.HeatExchangerFlowRegime;
Real Z[5] ;
Real epsilon[5] ;
Real eps[5] ;
Real ntu[5] ;
Real diff[5] ;
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;
Test model for HACoilInside
Information
Test model for
Buildings.Fluid.HeatExchanger.BaseClassess.HACoilInside.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for natural convection outside of a coil
Information
Test model for
Buildings.Fluid.HeatExchangers.BaseClasses.HANaturalCylinder.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model HANaturalCylinder
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) ;
Modelica.Blocks.Sources.Ramp TSur(
duration=100,
height=50,
offset=293.15) ;
Modelica.Blocks.Sources.Ramp TFlu(
duration=100,
startTime=150,
height=50,
offset=293.15) ;
equation
connect(TSur.y, hANatCyl.TSur);
connect(TFlu.y, hANatCyl.TFlu);
end HANaturalCylinder;
Model that tests the basic element that is used to built heat exchanger models
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model HexElementLatent
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) ;
Modelica.Blocks.Sources.Constant TDb(k=278.15) ;
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) ;
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) ;
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;
Model that tests the basic element that is used to built heat exchanger models
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model HexElementSensible
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) ;
Modelica.Blocks.Sources.Constant TDb(k=278.15) ;
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) ;
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) ;
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;
Test model for latent heat exchange
Information
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
Test model for RayleighNumber
Information
Test model for
Buildings.Fluid.HeatExchangers.BaseClasses.RayleighNumber.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
http://simulationresearch.lbl.gov/modelica