| Name | Description |
|---|---|
| Partial model of an air damper with exponential opening characteristics | |
| Partial model for a hydraulic resistance |
Buildings.Fluids.Actuators.BaseClasses.PartialDamperExponential
| Type | Name | Default | Description |
|---|---|---|---|
| replaceable package Medium | PartialMedium | Medium in the component | |
| MassFlowRate | m_small_flow | eta0*ReC*sqrt(A)*facRouDuc | Mass flow rate where transition to laminar occurs [kg/s] |
| Area | A | Face area [m2] | |
| Real | a | -1.51 | Coefficient a for damper characteristics |
| Real | b | 0.105*90 | Coefficient b for damper characteristics |
| Real | ReC | 4000 | Reynolds number where transition to laminar starts |
| Boolean | roundDuct | false | Set to true for round duct, false for square cross section |
| Initialization | |||
| MassFlowRate | m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] | |
| Pressure | dp | Pressure difference between port_a and port_b [Pa] | |
| Advanced | |||
| Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
| Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
| Type | Name | Description |
|---|---|---|
| FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
| FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
| input RealInput | y | Damper position (0: closed, 1: open) |
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
| Type | Name | Default | Description |
|---|---|---|---|
| replaceable package Medium | PartialMedium | Medium in the component | |
| MassFlowRate | m_small_flow | Mass flow rate where transition to laminar occurs [kg/s] | |
| Initialization | |||
| MassFlowRate | m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] | |
| Pressure | dp | Pressure difference between port_a and port_b [Pa] | |
| Advanced | |||
| Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
| Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
| Type | Name | Description |
|---|---|---|
| FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
| FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
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;