Buildings.Fluids.Actuators.BaseClasses

Package with base classes for actuator models

Package Content

NameDescription
Buildings.Fluids.Actuators.BaseClasses.PartialDamperExponential PartialDamperExponential Partial model of an air damper with exponential opening characteristics
Buildings.Fluids.Actuators.BaseClasses.PartialResistance PartialResistance Partial model for a hydraulic resistance


Buildings.Fluids.Actuators.BaseClasses.PartialDamperExponential Buildings.Fluids.Actuators.BaseClasses.PartialDamperExponential

Partial model of an air damper with exponential opening characteristics

Buildings.Fluids.Actuators.BaseClasses.PartialDamperExponential

Information


Partial air damper with an flow coefficient that is an exponential function of the opening angle.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatem_small_floweta0*ReC*sqrt(A)*facRouDucMass flow rate where transition to laminar occurs [kg/s]
AreaA Face area [m2]
Reala-1.51Coefficient a for damper characteristics
Realb0.105*90Coefficient b for damper characteristics
RealReC4000Reynolds number where transition to laminar starts
BooleanroundDuctfalseSet to true for round duct, false for square cross section
Initialization
MassFlowRatem_flow Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Pressuredp Pressure difference between port_a and port_b [Pa]
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputyDamper position (0: closed, 1: open)

Modelica definition

partial model PartialDamperExponential 
  "Partial model of an air damper with exponential opening characteristics" 
  extends Buildings.Fluids.Actuators.BaseClasses.PartialResistance(
                                                   m_small_flow=eta0*ReC*sqrt(A)
        *facRouDuc);
  import SI = Modelica.SIunits;
  
  
  parameter SI.Area A "Face area";
  parameter Real a(unit="")=-1.51 "Coefficient a for damper characteristics";
  parameter Real b(unit="")=0.105*90 "Coefficient b for damper characteristics";
  parameter Real ReC=4000 "Reynolds number where transition to laminar starts";
  
  parameter Boolean roundDuct = false 
    "Set to true for round duct, false for square cross section";
  
protected 
  Real kTheta(min=0) 
    "Flow coefficient, kTheta = pressure drop divided by dynamic pressure";
  Real kDam(unit="(kg*m)^(1/2)", start=1) 
    "Flow coefficient for damper, k=m_flow/sqrt(dp)";
protected 
  parameter Real facRouDuc= if roundDuct then sqrt(Modelica.Constants.pi)/2 else 1;
public 
  Modelica.Blocks.Interfaces.RealInput y "Damper position (0: closed, 1: open)";
equation 
   assert(y >= (15/90) and y <= (55/90),
          "Damper characteristics not implemented for angles outside 15...55 degree.\n" +
          "Received y = " + realString(y) + ". Corresponds to " +         realString(y*90) + " degrees.");
  
   kTheta = exp(a+b*(1-y)) "y=0 is closed, but theta=1 is closed in ASHRAE-825";
   A = kDam * sqrt(kTheta/2/medium_a.d) 
    "flow coefficient for resistance base model";
end PartialDamperExponential;

Buildings.Fluids.Actuators.BaseClasses.PartialResistance Buildings.Fluids.Actuators.BaseClasses.PartialResistance

Partial model for a hydraulic resistance

Buildings.Fluids.Actuators.BaseClasses.PartialResistance

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatem_small_flow Mass flow rate where transition to laminar occurs [kg/s]
Initialization
MassFlowRatem_flow Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Pressuredp Pressure difference between port_a and port_b [Pa]
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

partial model PartialResistance 
  "Partial model for a hydraulic resistance" 
    extends Modelica_Fluid.Interfaces.PartialTwoPortTransport(
          medium_a(T(start = Medium.T_default), h(start=Medium.h_default),
                   p(start=Medium.p_default)),
          medium_b(T(start = Medium.T_default), h(start=Medium.h_default),
                   p(start=Medium.p_default)));
    extends Buildings.BaseClasses.BaseIcon;
  
  
  parameter Boolean from_dp = true 
    "= true, use m_flow = f(dp) else dp = f(m_flow)";
  parameter Modelica.SIunits.MassFlowRate m_small_flow 
    "Mass flow rate where transition to laminar occurs";
  parameter Boolean linearized = false 
    "= true, use linear relation between m_flow and dp for any flow rate";
protected 
  Real k(unit="(kg*m)^(1/2)", start=1) "Flow coefficient, k=m_flow/sqrt(dp)";
  Real kInv(unit="1/kg/m", start=1) 
    "Flow coefficient for inverse flow computation, kInv=dp/m_flow^2";
  
  Modelica.SIunits.AbsolutePressure dp_small 
    "Turbulent flow if |dp| >= dp_small, not a parameter because k can be a function of time";
parameter Medium.ThermodynamicState sta0(T=Medium.T_default, p=Medium.p_default);
parameter Modelica.SIunits.DynamicViscosity eta0=Medium.dynamicViscosity(sta0) 
    "Dynamic viscosity, used to compute laminar/turbulent transition";
parameter Modelica.SIunits.SpecificEnthalpy h0=Medium.h_default 
    "Initial value for solver for specific enthalpy";           //specificEnthalpy(sta0) 
  
initial equation 
                 // this equation can be deleted, it here for debugging during library transition 
  assert(abs(eta0-Medium.dynamicViscosity(medium_a)) < 0.1*eta0, "Wrong parameter for eta.\n"
    + "  medium_a.T                              = " + realString(medium_a.T) + "\n"
    + "  medium_a.p                              = " + realString(medium_a.p) + "\n"
    + "  Medium.dynamicViscosity(medium_a)       = " + realString(Medium.dynamicViscosity(medium_a)) + "\n"
    + "  eta0                                    = " + realString(eta0) + "\n"
    + "  Medium.dynamicViscosity(medium_a)/ eta0 = " + realString(Medium.dynamicViscosity(medium_a)/eta0));
  
equation 
  1=k*k*kInv;
  dp_small = kInv * m_small_flow^2;
  if linearized then
     m_flow = k * dp;
  else
    if from_dp then
       m_flow = Buildings.Fluids.Utilities.massFlowRate_dp(             dp=dp, dp_small=dp_small, k=k);
    else
       dp = Buildings.Fluids.Utilities.pressureLoss_m_flow(             m_flow=m_flow,m_small_flow=m_small_flow,k=kInv);
    end if;
  end if;
end PartialResistance;

HTML-documentation generated by Dymola Tue May 27 12:39:36 2008.