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

Package Content

NameDescription
ConstantEffectiveness  
DryCoilDiscretized  
DryCoilDiscretizedPControl  
HeaterCoolerIdeal  
HexElement  


Buildings.HeatExchangers.Examples.ConstantEffectiveness

Buildings.HeatExchangers.Examples.ConstantEffectiveness

Parameters

TypeNameDefaultDescription
replaceable package Medium_1Buildings.Media.ConstantProp... 
replaceable package Medium_2Buildings.Media.PerfectGases... 

Connectors

TypeNameDescription
replaceable package Medium_1 
replaceable package Medium_2 

Modelica definition

model ConstantEffectiveness 
  import Buildings;
  
 package Medium_1 = Buildings.Media.ConstantPropertyLiquidWater;
 //package Medium_2 = Modelica.Media.Air.MoistAir;
 package Medium_2 = Buildings.Media.PerfectGases.MoistAir;
  
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_2(          redeclare 
      package Medium = Medium_2, T=273.15 + 10);
    Modelica.Blocks.Sources.Ramp PIn(
    offset=101325,
    height=200,
    duration=60);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_2(          redeclare 
      package Medium = Medium_2, T=273.15 + 5);
    Modelica.Blocks.Sources.Ramp TWat(
    height=10,
    duration=60,
    offset=273.15 + 30,
    startTime=60) "Water temperature";
  Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature";
    Modelica.Blocks.Sources.Constant POut(k=101325);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_1(          redeclare 
      package Medium = Medium_1,
    p=300000,
    T=273.15 + 30);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_1(
    redeclare package Medium = Medium_1,
    p=300000 + 5000,
    T=273.15 + 50);
    Fluids.FixedResistances.FixedResistanceDpM res_2(
    from_dp=true,
    m0_flow=5,
    dp0=10,
    redeclare package Medium = Medium_2);
    Fluids.FixedResistances.FixedResistanceDpM res_1(
    from_dp=true,
    m0_flow=5,
    redeclare package Medium = Medium_1,
    dp0=500);
    Modelica.Blocks.Sources.Ramp PSin_1(
    duration=60,
    offset=300000,
    startTime=240,
    height=10000);
  Buildings.HeatExchangers.ConstantEffectiveness hex(redeclare package Medium_1
      = Medium_1, redeclare package Medium_2 = Medium_2);
equation 
  connect(PIn.y,sou_2. p_in);
  connect(POut.y,sin_2. p_in);
  connect(sin_2.port,res_2. port_b);
  connect(sin_1.port,res_1. port_b);
  connect(TDb.y, sou_2.T_in);
  connect(TWat.y, sou_1.T_in);
  connect(PSin_1.y, sin_1.p_in);
  connect(sou_1.port, hex.port_a1);
  connect(hex.port_b1, res_1.port_a);
  connect(res_2.port_a, hex.port_b2);
  connect(hex.port_a2, sou_2.port);
end ConstantEffectiveness;

Buildings.HeatExchangers.Examples.DryCoilDiscretized

Buildings.HeatExchangers.Examples.DryCoilDiscretized

Parameters

TypeNameDefaultDescription
replaceable package Medium_1Buildings.Media.ConstantProp... 
replaceable package Medium_2Buildings.Media.GasesPTDecou... 

Connectors

TypeNameDescription
replaceable package Medium_1 
replaceable package Medium_2 

Modelica definition

model DryCoilDiscretized 
  
 package Medium_1 = Buildings.Media.ConstantPropertyLiquidWater;
 //package Medium_2 = Buildings.Media.PerfectGases.MoistAir;
 //package Medium_2 = Buildings.Media.GasesPTDecoupled.SimpleAir;
 package Medium_2 = Buildings.Media.GasesPTDecoupled.MoistAir;
 //package Medium_2 = Buildings.Media.GasesPTDecoupled.MoistAirNoLiquid;
//package Medium_2 = Buildings.Media.IdealGases.SimpleAir;
  
  Buildings.HeatExchangers.DryCoilDiscretized hex(
    redeclare package Medium_1 = Medium_1,
    redeclare package Medium_2 = Medium_2,
    m0_flow_1=5,
    dp0_1=2000,
    m0_flow_2=5,
    dp0_2=200,
    Q0_flow=50000,
    nPipPar=1,
    nPipSeg=3,
    steadyState_2=false,
    nReg=2);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_2(          redeclare 
      package Medium = Medium_2, T=303.15);
    Modelica.Blocks.Sources.Ramp PIn(
    duration=60,
    offset=101525,
    height=-199);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_2(T=283.15, redeclare 
      package Medium = Medium_2);
    Modelica.Blocks.Sources.Ramp TWat(
    duration=60,
    startTime=60,
    height=15,
    offset=273.15 + 5) "Water temperature";
  Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature";
    Modelica.Blocks.Sources.Constant POut(k=101325);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_1(          redeclare 
      package Medium = Medium_1,
    p=300000,
    T=293.15);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_1(
    T=293.15,
    redeclare package Medium = Medium_1,
    p=300000 + 5000);
    Fluids.FixedResistances.FixedResistanceDpM res_2(
    from_dp=true,
    m0_flow=5,
    dp0=10,
    redeclare package Medium = Medium_2);
    Fluids.FixedResistances.FixedResistanceDpM res_1(
    from_dp=true,
    m0_flow=5,
    dp0=10,
    redeclare package Medium = Medium_1);
    Modelica.Blocks.Sources.Ramp PSin_1(
    duration=60,
    startTime=240,
    offset=300000,
    height=4990);
equation 
  connect(PIn.y,sou_2. p_in);
  connect(POut.y,sin_2. p_in);
  connect(sin_2.port,res_2. port_b);
  connect(sin_1.port,res_1. port_b);
  connect(sou_1.port, hex.port_a1);
  connect(res_2.port_a, hex.port_b2);
  connect(hex.port_b1, res_1.port_a);
  connect(hex.port_a2, sou_2.port);
  connect(TDb.y, sou_2.T_in);
  connect(TWat.y, sou_1.T_in);
  connect(PSin_1.y, sin_1.p_in);
end DryCoilDiscretized;

Buildings.HeatExchangers.Examples.DryCoilDiscretizedPControl

Buildings.HeatExchangers.Examples.DryCoilDiscretizedPControl

Parameters

TypeNameDefaultDescription
replaceable package Medium_1Buildings.Media.ConstantProp... 
replaceable package Medium_2Buildings.Media.GasesPTDecou... 

Connectors

TypeNameDescription
replaceable package Medium_1 
replaceable package Medium_2 

Modelica definition

model DryCoilDiscretizedPControl 
  import Buildings;
  
 package Medium_1 = Buildings.Media.ConstantPropertyLiquidWater;
 //package Medium_2 = Buildings.Media.PerfectGases.MoistAir;
 //package Medium_2 = Buildings.Media.GasesPTDecoupled.MoistAir;
 // package Medium_2 = Buildings.Media.GasesPTDecoupled.MoistAirNoLiquid;
 package Medium_2 = Buildings.Media.GasesPTDecoupled.SimpleAir;
  
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_2(          redeclare 
      package Medium = Medium_2, T=303.15);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_2(T=283.15, redeclare 
      package Medium = Medium_2);
  Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature";
    Modelica.Blocks.Sources.Constant POut(k=101325);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_1(          redeclare 
      package Medium = Medium_1,
    p=300000,
    T=293.15);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_1(
    T=293.15,
    redeclare package Medium = Medium_1,
    p=300000 + 9000);
    Fluids.FixedResistances.FixedResistanceDpM res_2(
    from_dp=true,
    m0_flow=5,
    dp0=10,
    redeclare package Medium = Medium_2);
    Fluids.FixedResistances.FixedResistanceDpM res_1(
    from_dp=true,
    m0_flow=5,
    redeclare package Medium = Medium_1,
    dp0=3000);
    Modelica.Blocks.Sources.Ramp PSin_1(
    duration=60,
    height=5000,
    startTime=240,
    offset=300000);
    Modelica.Blocks.Sources.Constant POut1(k=101525);
  Modelica_Fluid.Sensors.Temperature temperature(redeclare package Medium = 
        Medium_2);
  Buildings.Fluids.Actuators.Valves.TwoWayEqualPercentage val(
    redeclare package Medium = Medium_1,
    k_SI=5/sqrt(9000),
    l=0.005) "Valve model";
  Modelica.Blocks.Math.Gain P(k=10);
  Modelica.Blocks.Math.Feedback fedBac;
  Modelica.Blocks.Sources.TimeTable TSet(table=[0,298.15; 600,298.15; 600,
        303.15; 1200,303.15; 1800,298.15; 2400,298.15; 2400,304.15]) 
    "Setpoint temperature";
  Buildings.HeatExchangers.DryCoilDiscretized hex(
    redeclare package Medium_1 = Medium_1,
    redeclare package Medium_2 = Medium_2,
    m0_flow_1=5,
    dp0_1=2000,
    m0_flow_2=5,
    dp0_2=200,
    nPipPar=1,
    nPipSeg=3,
    nReg=4,
    Q0_flow=200000);
    Modelica.Blocks.Sources.Constant TWat(k=273.15 + 40);
  Buildings.Fluids.Actuators.Motors.IdealMotor mot(tOpe=60) "Motor model";
equation 
  connect(POut.y,sin_2. p_in);
  connect(sin_2.port,res_2. port_b);
  connect(sin_1.port,res_1. port_b);
  connect(TDb.y, sou_2.T_in);
  connect(PSin_1.y, sin_1.p_in);
  connect(POut1.y, sou_2.p_in);
  connect(sou_1.port, val.port_a);
  connect(P.u, fedBac.y);
  connect(temperature.T, fedBac.u2);
  connect(TSet.y, fedBac.u1);
  connect(hex.port_b1, res_1.port_a);
  connect(TWat.y, sou_1.T_in);
  connect(res_2.port_a, temperature.port_a);
  connect(temperature.port_b, hex.port_b2);
  connect(sou_2.port, hex.port_a2);
  connect(val.port_b, hex.port_a1);
  connect(mot.y, val.y);
  connect(P.y, mot.u);
end DryCoilDiscretizedPControl;

Buildings.HeatExchangers.Examples.HeaterCoolerIdeal

Buildings.HeatExchangers.Examples.HeaterCoolerIdeal

Information


Model that tests the basic class that is used for the heater models. It adds and removes heat for forward and reverse flow. The top and bottom models should give similar results, although the sign of the temperature difference over the components differ because of the reverse flow. The model uses assert statements that will be triggered if results that are expected to be close to each other differ by more than a prescribed threshold.


Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.ConstantProp... 

Connectors

TypeNameDescription
replaceable package Medium 

Modelica definition

model HeaterCoolerIdeal 
  import Buildings;
  
 package Medium = Buildings.Media.ConstantPropertyLiquidWater;
  Buildings.HeatExchangers.HeaterCoolerIdeal hea1(redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature";
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_1(
    T=293.15,
    redeclare package Medium = Medium,
    p=101335);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_11(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_12(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_1(          redeclare 
      package Medium = Medium, T=288.15);
    Modelica.Blocks.Sources.Constant POut(k=101325);
    Modelica.Blocks.Sources.Ramp u(
    height=2,
    duration=1,
    offset=-1,
    startTime=0) "Control signal";
  Buildings.HeatExchangers.HeaterCoolerIdeal hea2(
                                                 redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Modelica.Blocks.Math.Gain gain(k=-1);
  Buildings.HeatExchangers.HeaterCoolerIdeal hea3(redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_2(
    T=293.15,
    redeclare package Medium = Medium,
    p=101335);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_2(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_3(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_2(          redeclare 
      package Medium = Medium, T=288.15);
  Buildings.HeatExchangers.HeaterCoolerIdeal hea4(
                                                 redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_4(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Modelica_Fluid.Volumes.MixingVolume mix1(redeclare package Medium = Medium, V=
       0.000001);
  Buildings.Utilities.Controls.AssertEquality ass1(startTime=0.2);
  Modelica.Blocks.Sources.RealExpression y1(y=hea2.medium_b.T_degC);
  Modelica.Blocks.Sources.RealExpression y2(y=hea1.medium_b.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass2(startTime=0.2);
  Modelica.Blocks.Sources.RealExpression y3(y=hea2.medium_a.T_degC);
  Modelica.Blocks.Sources.RealExpression y4(y=hea1.medium_a.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass3(startTime=0.2, threShold=2);
  Modelica.Blocks.Sources.RealExpression y5(y=hea4.medium_b.T_degC);
  Modelica.Blocks.Sources.RealExpression y6(y=hea3.medium_b.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass4(startTime=0.2, threShold=2);
  Modelica.Blocks.Sources.RealExpression y7(y=hea4.medium_a.T_degC);
  Modelica.Blocks.Sources.RealExpression y8(y=hea3.medium_a.T_degC);
  Buildings.HeatExchangers.HeaterCoolerIdeal hea5(redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Modelica.Blocks.Sources.Constant TDb1(
                                       k=293.15) "Drybulb temperature";
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_3(
    T=293.15,
    redeclare package Medium = Medium,
    p=101335);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_1(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_5(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_3(          redeclare 
      package Medium = Medium, T=288.15);
    Modelica.Blocks.Sources.Constant POut1(
                                          k=101325);
  Buildings.HeatExchangers.HeaterCoolerIdeal hea6(
                                                 redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Buildings.HeatExchangers.HeaterCoolerIdeal hea7(redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_4(
    T=293.15,
    redeclare package Medium = Medium,
    p=101335);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_6(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_7(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_4(          redeclare 
      package Medium = Medium, T=288.15);
  Buildings.HeatExchangers.HeaterCoolerIdeal hea8(
                                                 redeclare package Medium = 
        Medium, Q0_flow=5000) "Heater and cooler";
    Buildings.Fluids.FixedResistances.FixedResistanceDpM res_8(
    from_dp=true,
    redeclare package Medium = Medium,
    dp0=5,
    m0_flow=0.5);
  Modelica_Fluid.Volumes.MixingVolume mix2(redeclare package Medium = Medium, V=
       0.000001);
  Buildings.Utilities.Controls.AssertEquality ass5(startTime=0.2);
  Modelica.Blocks.Sources.RealExpression y9(y=hea6.medium_b.T_degC);
  Modelica.Blocks.Sources.RealExpression y10(
                                            y=hea5.medium_b.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass6(startTime=0.2);
  Modelica.Blocks.Sources.RealExpression y11(
                                            y=hea6.medium_a.T_degC);
  Modelica.Blocks.Sources.RealExpression y12(
                                            y=hea5.medium_a.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass7(startTime=0.2, threShold=2);
  Modelica.Blocks.Sources.RealExpression y13(
                                            y=hea8.medium_b.T_degC);
  Modelica.Blocks.Sources.RealExpression y14(
                                            y=hea7.medium_b.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass8(startTime=0.2, threShold=2);
  Modelica.Blocks.Sources.RealExpression y15(
                                            y=hea8.medium_a.T_degC);
  Modelica.Blocks.Sources.RealExpression y16(
                                            y=hea7.medium_a.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass9(threShold=1E-2, startTime=
        0.3);
  Modelica.Blocks.Sources.RealExpression y17(y=hea2.medium_b.T_degC);
  Modelica.Blocks.Sources.RealExpression y18(y=hea5.medium_b.T_degC);
  Buildings.Utilities.Controls.AssertEquality ass10(threShold=1E-2, startTime=
        0.3);
  Modelica.Blocks.Sources.RealExpression y19(y=hea4.medium_a.T_degC);
  Modelica.Blocks.Sources.RealExpression y20(y=hea7.medium_a.T_degC);
equation 
  connect(POut.y,sin_1. p_in);
  connect(sou_1.port,res_11. port_a);
  connect(TDb.y,sou_1. T_in);
  connect(sin_1.port, res_12.port_a);
  connect(res_11.port_b, hea1.port_a);
  connect(u.y, hea1.u);
  connect(gain.y, hea2.u);
  connect(u.y, gain.u);
  connect(res_12.port_b, hea2.port_a);
  connect(POut.y,sin_2. p_in);
  connect(sou_2.port, res_2.port_a);
  connect(TDb.y,sou_2. T_in);
  connect(sin_2.port, res_3.port_a);
  connect(res_2.port_b, hea3.port_a);
  connect(u.y, hea3.u);
  connect(gain.y, hea4.u);
  connect(hea3.port_b, mix1.port_a);
  connect(mix1.port_b, res_4.port_a);
  connect(res_3.port_b, hea4.port_a);
  connect(hea4.port_b, res_4.port_b);
  connect(hea1.port_b, hea2.port_b);
  connect(y1.y, ass1.u1);
  connect(y2.y, ass1.u2);
  connect(y3.y, ass2.u1);
  connect(y4.y, ass2.u2);
  connect(y5.y, ass3.u1);
  connect(y6.y, ass3.u2);
  connect(y7.y, ass4.u1);
  connect(y8.y, ass4.u2);
  connect(POut1.y, sin_3.p_in);
  connect(TDb1.y, sou_3.T_in);
  connect(res_1.port_b, hea5.port_a);
  connect(res_5.port_b, hea6.port_a);
  connect(POut1.y, sin_4.p_in);
  connect(TDb1.y, sou_4.T_in);
  connect(res_6.port_b,hea7. port_a);
  connect(hea7.port_b,mix2. port_a);
  connect(mix2.port_b,res_8. port_a);
  connect(res_7.port_b,hea8. port_a);
  connect(hea8.port_b,res_8. port_b);
  connect(hea5.port_b,hea6. port_b);
  connect(y9.y,ass5. u1);
  connect(y10.y, ass5.u2);
  connect(y11.y, ass6.u1);
  connect(y12.y, ass6.u2);
  connect(y13.y, ass7.u1);
  connect(y14.y, ass7.u2);
  connect(y15.y, ass8.u1);
  connect(y16.y, ass8.u2);
  connect(sou_3.port, res_5.port_a);
  connect(sin_3.port, res_1.port_a);
  connect(sin_4.port, res_6.port_a);
  connect(sou_4.port, res_7.port_a);
  connect(y17.y,ass9. u1);
  connect(y18.y,ass9. u2);
  connect(y19.y,ass10. u1);
  connect(y20.y,ass10. u2);
  connect(u.y, hea6.u);
  connect(u.y, hea8.u);
  connect(gain.y, hea5.u);
  connect(gain.y, hea7.u);
end HeaterCoolerIdeal;

Buildings.HeatExchangers.Examples.HexElement

Buildings.HeatExchangers.Examples.HexElement

Parameters

TypeNameDefaultDescription
replaceable package Medium_WBuildings.Media.ConstantProp... 
replaceable package Medium_ABuildings.Media.PerfectGases... 

Connectors

TypeNameDescription
replaceable package Medium_W 
replaceable package Medium_A 

Modelica definition

model HexElement 
  import Buildings;
 package Medium_W = Buildings.Media.ConstantPropertyLiquidWater;
// package Medium_W = Modelica.Media.Air.SimpleAir;
// package Medium_A = Buildings.Media.GasesPTDecoupled.SimpleAir;
// package Medium_A = Modelica.Media.Air.SimpleAir;
// package Medium_A = Modelica.Media.Air.SimpleAir;
// package Medium_A = Buildings.Media.PerfectGases.MoistAirNonsaturated;
 package Medium_A = Buildings.Media.PerfectGases.MoistAir;
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sin_2(
                               T=288.15, redeclare package Medium = Medium_A);
    Modelica.Blocks.Sources.Ramp PIn(
    height=20,
    offset=101320,
    duration=300,
    startTime=300);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_2(T=283.15, redeclare 
      package Medium = Medium_A);
    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.Fluids.Sources.PrescribedBoundary_pTX sin_1(
                               T=288.15, redeclare package Medium = Medium_W);
  Buildings.Fluids.Sources.PrescribedBoundary_pTX sou_1(
    T=293.15,
    p=101335,
    redeclare package Medium = Medium_W);
    Fluids.FixedResistances.FixedResistanceDpM res_22(
    from_dp=true,
    m0_flow=5,
    dp0=5,
    redeclare package Medium = Medium_A);
    Fluids.FixedResistances.FixedResistanceDpM res_12(
    from_dp=true,
    m0_flow=5,
    dp0=5,
    redeclare package Medium = Medium_W);
  Buildings.HeatExchangers.BaseClasses.HexElement hex(
    m0_flow_1=5,
    m0_flow_2=5,
    UA0=9999,
    redeclare package Medium_1 = Medium_W,
    redeclare package Medium_2 = Medium_A,
    allowCondensation=false);
  Modelica.Blocks.Sources.Constant TDb1(k=303.15) "Drybulb temperature";
    Fluids.FixedResistances.FixedResistanceDpM res_11(
    from_dp=true,
    m0_flow=5,
    dp0=5,
    redeclare package Medium = Medium_W);
    Fluids.FixedResistances.FixedResistanceDpM res_21(
    from_dp=true,
    m0_flow=5,
    dp0=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(sin_2.port, res_22.port_b);
  connect(sin_1.port, res_12.port_b);
  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(sou_1.port, res_11.port_a);
  connect(hex.port_a2, res_21.port_b);
  connect(sou_2.port, res_21.port_a);
  connect(hACon.y, hex.Gc_1);
  connect(hACon.y, hex.Gc_2);
end HexElement;

HTML-documentation generated by Dymola Tue Sep 30 14:24:44 2008.