Buildings.Fluids.Boilers.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.Fluids.Boilers.

Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).

Package Content

NameDescription
BoilerPolynomial Test model
HeatingSystem Test model


Buildings.Fluids.Boilers.Examples.BoilerPolynomial

Test model

Buildings.Fluids.Boilers.Examples.BoilerPolynomial

Parameters

TypeNameDefaultDescription
PowerQ0_flow3000Nominal power [W]
TemperaturedT020Nominal temperature difference [K]
MassFlowRatem0_flowQ0_flow/dT0/4200Nominal mass flow rate [kg/s]
Pressuredp03000Pressure drop at m0_flow [Pa]

Modelica definition

model BoilerPolynomial "Test model"
 package Medium = Buildings.Media.ConstantPropertyLiquidWater "Medium model";
 parameter Modelica.SIunits.Power Q0_flow = 3000 "Nominal power";
 parameter Modelica.SIunits.Temperature dT0 = 20 
    "Nominal temperature difference";
 parameter Modelica.SIunits.MassFlowRate m0_flow = Q0_flow/dT0/4200 
    "Nominal mass flow rate";
 parameter Modelica.SIunits.Pressure dp0 = 3000 "Pressure drop at m0_flow";
  inner Modelica_Fluid.System system;

  Modelica_Fluid.Sources.Boundary_pT sin(
    redeclare package Medium = Medium,
    nPorts=2,
    p(displayUnit="Pa") = 300000,
    T=333.15) "Sink";
  Modelica_Fluid.Sources.Boundary_pT sou(
    nPorts=2,
    redeclare package Medium = Medium,
    p=300000 + dp0,
    T=303.15);
  Modelica.Blocks.Sources.TimeTable y(table=[0,0; 1800,1; 1800,0; 2400,0; 2400,
        1; 3600,1]);
  Buildings.Fluids.Boilers.BoilerPolynomial fur1(
    a={0.9},
    effCur=Buildings.Fluids.Types.EfficiencyCurves.Constant,
    Q0_flow=Q0_flow,
    dT0=dT0,
    T_start=293.15,
    redeclare package Medium = Medium) "Boiler";
  Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TAmb1(
                                                              T=288.15) 
    "Ambient temperature in boiler room";
  Buildings.Fluids.Boilers.BoilerPolynomial fur2(
    a={0.9},
    effCur=Buildings.Fluids.Types.EfficiencyCurves.Constant,
    Q0_flow=Q0_flow,
    dT0=dT0,
    redeclare package Medium = Medium,
    energyDynamics=Modelica_Fluid.Types.Dynamics.SteadyState,
    massDynamics=Modelica_Fluid.Types.Dynamics.SteadyState,
    T_start=293.15) "Boiler";
  Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TAmb2(
                                                              T=288.15) 
    "Ambient temperature in boiler room";
  FixedResistances.FixedResistanceDpM res1(
    redeclare package Medium = Medium,
    m0_flow=m0_flow,
    dp0=dp0);
  FixedResistances.FixedResistanceDpM res2(
    redeclare package Medium = Medium,
    m0_flow=m0_flow,
    dp0=dp0);
  Modelica.Blocks.Continuous.FirstOrder firstOrder(T=0.1);
equation 
  connect(TAmb1.port, fur1.heatPort);
  connect(TAmb2.port, fur2.heatPort);
  connect(sou.ports[1], fur1.port_a);
  connect(sou.ports[2], fur2.port_a);
  connect(fur1.port_b, res1.port_a);
  connect(fur2.port_b, res2.port_a);
  connect(res1.port_b, sin.ports[1]);
  connect(res2.port_b, sin.ports[2]);
  connect(y.y, firstOrder.u);
  connect(firstOrder.y, fur1.y);
  connect(firstOrder.y, fur2.y);
end BoilerPolynomial;

Buildings.Fluids.Boilers.Examples.HeatingSystem

Test model

Buildings.Fluids.Boilers.Examples.HeatingSystem

Parameters

TypeNameDefaultDescription
IntegernRoo2Number of rooms
PowerQ0_flow3000Nominal power [W]
TemperaturedT020Nominal temperature difference [K]
MassFlowRatem0_flowQ0_flow/dT0/4200Nominal mass flow rate [kg/s]
Pressuredp0Pip5000Pressure difference of pipe (without valve) [Pa]
Pressuredp0Val1000Pressure difference of valve [Pa]
Pressuredp0dp0Pip + dp0ValPressure difference of loop [Pa]

Modelica definition

model HeatingSystem "Test model"
 package Medium = Buildings.Media.ConstantPropertyLiquidWater "Medium model";


 parameter Integer nRoo = 2 "Number of rooms";
 parameter Modelica.SIunits.Power Q0_flow = 3000 "Nominal power";
 parameter Modelica.SIunits.Temperature dT0 = 20 
    "Nominal temperature difference";
 parameter Modelica.SIunits.MassFlowRate m0_flow = Q0_flow/dT0/4200 
    "Nominal mass flow rate";
 parameter Modelica.SIunits.Pressure dp0Pip = 5000 
    "Pressure difference of pipe (without valve)";
 parameter Modelica.SIunits.Pressure dp0Val = 1000 
    "Pressure difference of valve";

 parameter Modelica.SIunits.Pressure dp0 = dp0Pip + dp0Val 
    "Pressure difference of loop";
  Buildings.Fluids.Boilers.BoilerPolynomial fur(
    a={0.9},
    effCur=Buildings.Fluids.Types.EfficiencyCurves.Constant,
    Q0_flow=Q0_flow,
    dT0=dT0,
    T_start=293.15,
    redeclare package Medium = Medium) "Boiler";
  inner Modelica_Fluid.System system;
  Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TAmb(T=288.15) 
    "Ambient temperature in boiler room";
  Modelica_Fluid.Machines.PrescribedPump pump(
    N_nominal=3000,
    use_N_in=true,
    redeclare package Medium = Medium,
    redeclare function flowCharacteristic = 
        Modelica_Fluid.Machines.BaseClasses.PumpCharacteristics.linearFlow (
          V_flow_nominal={m0_flow/1000,0.5*m0_flow/1000}, head_nominal=1.5*dp0/
            9.81/1000*{1,2}));

  Modelica_Fluid.Vessels.OpenTank tank(
    height=2,
    crossArea=1,
    level_start=1,
    nPorts=1,
    use_portsData=false,
    redeclare package Medium = Medium,
    p_ambient=100000) "Tank, used to set static pressure in water loop";
  MixingVolumes.MixingVolume hea(
    nPorts=2,
    use_HeatTransfer=true,
    redeclare package Medium = Medium,
    V=0.1) "Heater";
  FixedResistances.FixedResistanceDpM res1(
    redeclare package Medium = Medium,
    m0_flow=m0_flow,
    dp0=dp0Pip/2);
  FixedResistances.FixedResistanceDpM res2(
    redeclare package Medium = Medium,
    m0_flow=m0_flow,
    dp0=dp0Pip/2);
  Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TRoo;
  Modelica.Blocks.Sources.Constant dpSet(k=dp0) "Pressure set point";
  Modelica.Blocks.Continuous.LimPID conPum(
    controllerType=Modelica.Blocks.Types.SimpleController.P,
    yMax=3000,
    yMin=0.3*3000,
    k=1) "Controller for pump";
  Modelica.Blocks.Sources.Constant TFurSet(k=273.15 + 60);
  Modelica.Blocks.Continuous.LimPID conFur(
    controllerType=Modelica.Blocks.Types.SimpleController.P,
    yMax=1,
    yMin=0,
    k=0.1) "Controller for boiler";
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor con(G=1000/20/nRoo) 
    "Thermal conductor";
  Modelica.Thermal.HeatTransfer.Components.HeatCapacitor roo(C=10*30*1000, T(
        fixed=true)) "Heat capacity of room";
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor conWal(G=1000/30/
        nRoo) "Thermal conductance of wall to outside";
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut 
    "Outside temperature boundary condition";
  Modelica.Blocks.Sources.Sine TOutBC(
    amplitude=10,
    freqHz=1/86400,
    offset=273.15,
    phase=-1.5707963267949) "Outside air temperature";
  Modelica_Fluid.Sensors.RelativePressure dpSen(redeclare package Medium = 
        Medium);
  Actuators.Valves.TwoWayLinear val(
    redeclare package Medium = Medium,
    dp0(displayUnit="Pa") = dp0Val,
    Kv_SI=m0_flow/nRoo/sqrt(dp0Val),
    m0_flow=m0_flow/2) "Radiator valve";
  Modelica.Blocks.Continuous.LimPID conRoo(
    controllerType=Modelica.Blocks.Types.SimpleController.P,
    yMax=1,
    yMin=0,
    k=2) "Controller for room temperature";
  Modelica.Blocks.Sources.Constant TRooSet(k=273.15 + 20);
  Modelica.Blocks.Logical.Switch switch1;
  Modelica.Blocks.Sources.Constant zer(k=0) "Zero signal";
  Modelica.Blocks.Logical.Hysteresis hys(
    uLow=0.3,
    uHigh=0.9,
    pre_y_start=false) "Hysteresis";
  MixingVolumes.MixingVolume hea1(
    nPorts=2,
    use_HeatTransfer=true,
    redeclare package Medium = Medium,
    V=0.1/2) "Heater";
  Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TRoo1;
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor con1(G=1000/20/nRoo) 
    "Thermal conductor";
  Modelica.Thermal.HeatTransfer.Components.HeatCapacitor roo1(
                                                             C=10*30*1000, T(
        fixed=true)) "Heat capacity of room";
  Modelica.Thermal.HeatTransfer.Components.ThermalConductor conWal1(G=1000/30/
        nRoo) "Thermal conductance of wall to outside";
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut1 
    "Outside temperature boundary condition";
  Modelica.Blocks.Sources.Sine TOutBC1(
    amplitude=10,
    freqHz=1/86400,
    offset=273.15,
    phase=-1.5707963267949) "Outside air temperature";
  Actuators.Valves.TwoWayLinear val1(
    redeclare package Medium = Medium,
    dp0(displayUnit="Pa") = dp0Val,
    Kv_SI=m0_flow/nRoo/sqrt(dp0Val),
    m0_flow=m0_flow/2) "Radiator valve";
  Modelica.Blocks.Continuous.LimPID conRoo1(
    controllerType=Modelica.Blocks.Types.SimpleController.P,
    yMax=1,
    yMin=0,
    k=2) "Controller for room temperature";
  Modelica.Blocks.Sources.Constant TRooSet1(
                                           k=273.15 + 20);
equation 
  connect(TAmb.port, fur.heatPort);
  connect(dpSet.y, conPum.u_s);
  connect(TFurSet.y, conFur.u_s);
  connect(fur.T, conFur.u_m);
  connect(hea.ports[2], res2.port_a);
  connect(TOut.port, conWal.port_a);
  connect(conWal.port_b, roo.port);
  connect(roo.port, con.port_b);
  connect(con.port_a, hea.heatPort);
  connect(TOutBC.y, TOut.T);
  connect(roo.port, TRoo.port);
  connect(fur.port_b, pump.port_a);
  connect(pump.port_b, res1.port_a);
  connect(res2.port_b, fur.port_a);
  connect(dpSen.p_rel, conPum.u_m);
  connect(val.port_a, res1.port_b);
  connect(val.port_b, hea.ports[1]);
  connect(TRooSet.y, conRoo.u_s);
  connect(TRoo.T, conRoo.u_m);
  connect(conRoo.y, val.y);
  connect(tank.ports[1], fur.port_a);
  connect(conPum.y, pump.N_in);
  connect(switch1.y, fur.y);
  connect(conFur.y, hys.u);
  connect(conFur.y, switch1.u1);
  connect(pump.port_b, dpSen.port_a);
  connect(pump.port_a, dpSen.port_b);
  connect(zer.y, switch1.u3);
  connect(hys.y, switch1.u2);
  connect(TOut1.port, conWal1.port_a);
  connect(conWal1.port_b, roo1.port);
  connect(roo1.port, con1.port_b);
  connect(con1.port_a, hea1.heatPort);
  connect(TOutBC1.y, TOut1.T);
  connect(roo1.port, TRoo1.port);
  connect(TRooSet1.y, conRoo1.u_s);
  connect(TRoo1.T, conRoo1.u_m);
  connect(conRoo1.y, val1.y);
  connect(hea1.ports[2], res2.port_a);
  connect(val1.port_a, res1.port_b);
  connect(val1.port_b, hea1.ports[1]);
end HeatingSystem;

HTML-documentation generated by Dymola Thu Feb 19 16:51:14 2009.