Buildings.Fluid.Actuators.Valves.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Fluid.Actuators.Valves.

Note that most validation models contain simple input data which may not be realistic, but for which the correct output can be obtained through an analytic solution. The examples plot various outputs, which have been verified against these solutions. These model outputs are stored as reference data and used for continuous validation whenever models in the library change.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.Actuators.Valves.Validation.ThreeWayValveParameterization ThreeWayValveParameterization Test model for parameterization of three-way valves
Buildings.Fluid.Actuators.Valves.Validation.TwoWayValveParameterization TwoWayValveParameterization Model to test and illustrate different parameterization for valves

Buildings.Fluid.Actuators.Valves.Validation.ThreeWayValveParameterization Buildings.Fluid.Actuators.Valves.Validation.ThreeWayValveParameterization

Test model for parameterization of three-way valves

Buildings.Fluid.Actuators.Valves.Validation.ThreeWayValveParameterization

Information

This model test the parameterization of three-way valves. All valves are sized equally, but use different configuration options. Therefore, the valves have all the same mass flow rate.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal0.4Design mass flow rate [kg/s]
PressureDifferencedp_nominal4500Design pressure drop [Pa]
RealKv_SIm_flow_nominal/sqrt(dp_nomin...Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)]
RealKvKv_SI/(rhoStd/3600/sqrt(1E5))Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCvKv_SI/(rhoStd*0.0631/1000/sq...Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAvKv_SI/sqrt(rhoStd)Av (metric) flow coefficient [m2]
DensityrhoStdMedium.density_pTX(101325, 2...Standard density [kg/m3]

Modelica definition

model ThreeWayValveParameterization "Test model for parameterization of three-way valves" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium in the component"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.4 "Design mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal=4500 "Design pressure drop"; parameter Real Kv_SI = m_flow_nominal/sqrt(dp_nominal) "Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)]"; parameter Real Kv = Kv_SI/(rhoStd/3600/sqrt(1E5)) "Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]"; parameter Real Cv = Kv_SI/(rhoStd*0.0631/1000/sqrt(6895)) "Cv (US) flow coefficient [USG/min/(psi)^(1/2)]"; parameter Modelica.Units.SI.Area Av=Kv_SI/sqrt(rhoStd) "Av (metric) flow coefficient"; parameter Modelica.Units.SI.Density rhoStd=Medium.density_pTX( 101325, 273.15 + 4, Medium.X_default) "Standard density"; Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear valOPPoi( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, CvData=Buildings.Fluid.Types.CvTypes.OpPoint, dpValve_nominal(displayUnit="kPa") = 4500, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Three way valve with operating point as parameter"; Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear valKv( redeclare package Medium = Medium, CvData=Buildings.Fluid.Types.CvTypes.Kv, m_flow_nominal=m_flow_nominal, Kv=Kv, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Three way valve with Kv-value as parameter"; Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear valCv( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, CvData=Buildings.Fluid.Types.CvTypes.Cv, Cv=Cv, use_inputFilter=false, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Three way valve with Cv-value as parameter"; Buildings.Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear valAv( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, Av=Av, use_inputFilter=false, CvData=Buildings.Fluid.Types.CvTypes.Av, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Three way valve with Av-value as parameter"; Buildings.Fluid.Sources.Boundary_pT sou1( redeclare package Medium = Medium, nPorts=4, use_p_in=false, p(displayUnit="Pa") = 300000 + 4500, T=293.15) "Boundary condition for flow source"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=4, use_p_in=false, p=300000, T=293.15) "Boundary condition for flow sink"; Modelica.Blocks.Sources.Ramp y( duration=1, height=1, offset=0) "Control signal"; Buildings.Fluid.Sensors.MassFlowRate senM_flowOpPoi( redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sensors.MassFlowRate senM_flowKv( redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sensors.MassFlowRate senM_flowCv( redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sensors.MassFlowRate senM_flowAv(redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sources.Boundary_pT sou3( redeclare package Medium = Medium, nPorts=4, use_p_in=false, p(displayUnit="Pa") = 300000 + 4500, T=293.15) "Boundary condition for flow source"; equation connect(sou1.ports[1], valOPPoi.port_1); connect(sou1.ports[2], valKv.port_1); connect(sou1.ports[3], valCv.port_1); connect(sou1.ports[4], valAv.port_1); connect(sou3.ports[1], valOPPoi.port_3); connect(sou3.ports[2], valKv.port_3); connect(sou3.ports[3], valCv.port_3); connect(sou3.ports[4], valAv.port_3); connect(valOPPoi.port_2, senM_flowOpPoi.port_a); connect(valKv.port_2, senM_flowKv.port_a); connect(valCv.port_2, senM_flowCv.port_a); connect(valAv.port_2, senM_flowAv.port_a); connect(senM_flowOpPoi.port_b, sin.ports[1]); connect(senM_flowKv.port_b, sin.ports[2]); connect(senM_flowCv.port_b, sin.ports[3]); connect(senM_flowAv.port_b, sin.ports[4]); connect(y.y, valOPPoi.y); connect(y.y, valKv.y); connect(y.y, valCv.y); connect(y.y, valAv.y); end ThreeWayValveParameterization;

Buildings.Fluid.Actuators.Valves.Validation.TwoWayValveParameterization Buildings.Fluid.Actuators.Valves.Validation.TwoWayValveParameterization

Model to test and illustrate different parameterization for valves

Buildings.Fluid.Actuators.Valves.Validation.TwoWayValveParameterization

Information

Test model for two way valves. This model tests the different parameterization of the valve model. All valves have the same mass flow rates.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal0.4Design mass flow rate [kg/s]
PressureDifferencedp_nominal4500Design pressure drop [Pa]
RealKv_SIm_flow_nominal/sqrt(dp_nomin...Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)]
RealKvKv_SI/(rhoStd/3600/sqrt(1E5))Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]
RealCvKv_SI/(rhoStd*0.0631/1000/sq...Cv (US) flow coefficient [USG/min/(psi)^(1/2)]
AreaAvKv_SI/sqrt(rhoStd)Av (metric) flow coefficient [m2]
DensityrhoStdMedium.density_pTX(101325, 2...Standard density [kg/m3]

Modelica definition

model TwoWayValveParameterization "Model to test and illustrate different parameterization for valves" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.4 "Design mass flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal=4500 "Design pressure drop"; parameter Real Kv_SI = m_flow_nominal/sqrt(dp_nominal) "Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)]"; parameter Real Kv = Kv_SI/(rhoStd/3600/sqrt(1E5)) "Kv (metric) flow coefficient [m3/h/(bar)^(1/2)]"; parameter Real Cv = Kv_SI/(rhoStd*0.0631/1000/sqrt(6895)) "Cv (US) flow coefficient [USG/min/(psi)^(1/2)]"; parameter Modelica.Units.SI.Area Av=Kv_SI/sqrt(rhoStd) "Av (metric) flow coefficient"; parameter Modelica.Units.SI.Density rhoStd=Medium.density_pTX( 101325, 273.15 + 4, Medium.X_default) "Standard density"; Buildings.Fluid.Actuators.Valves.TwoWayLinear valOPPoi( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, CvData=Buildings.Fluid.Types.CvTypes.OpPoint, dpValve_nominal(displayUnit="kPa") = dp_nominal, use_inputFilter=false) "Valve model, linear opening characteristics"; Modelica.Blocks.Sources.Ramp y(duration=1) "Control signal"; Valves.TwoWayLinear valKv( redeclare package Medium = Medium, CvData=Buildings.Fluid.Types.CvTypes.Kv, m_flow_nominal=m_flow_nominal, Kv=Kv, use_inputFilter=false) "Valve model, linear opening characteristics"; Valves.TwoWayLinear valCv( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, CvData=Buildings.Fluid.Types.CvTypes.Cv, Cv=Cv, use_inputFilter=false) "Valve model, linear opening characteristics"; Buildings.Fluid.Sources.Boundary_pT sou( redeclare package Medium = Medium, nPorts=4, p(displayUnit="Pa") = 300000 + 4500, T=293.15) "Boundary condition for flow source"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=4, use_p_in=false, p=300000, T=293.15) "Boundary condition for flow sink"; Buildings.Fluid.Sensors.MassFlowRate senM_flowOpPoi( redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sensors.MassFlowRate senM_flowKv( redeclare package Medium = Medium) "Mass flow rate sensor"; Buildings.Fluid.Sensors.MassFlowRate senM_flowCv( redeclare package Medium = Medium) "Mass flow rate sensor"; Valves.TwoWayLinear valAv( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, use_inputFilter=false, CvData=Buildings.Fluid.Types.CvTypes.Av, Av=Av) "Valve model, linear opening characteristics"; Buildings.Fluid.Sensors.MassFlowRate senM_flowAv(redeclare package Medium = Medium) "Mass flow rate sensor"; equation connect(y.y, valOPPoi.y); connect(y.y, valKv.y); connect(valKv.port_a, sou.ports[2]); connect(sou.ports[3], valCv.port_a); connect(y.y, valCv.y); connect(sou.ports[1], valOPPoi.port_a); connect(valOPPoi.port_b, senM_flowOpPoi.port_a); connect(valKv.port_b, senM_flowKv.port_a); connect(valCv.port_b, senM_flowCv.port_a); connect(senM_flowCv.port_b, sin.ports[3]); connect(senM_flowKv.port_b, sin.ports[2]); connect(senM_flowOpPoi.port_b, sin.ports[1]); connect(sou.ports[4], valAv.port_a); connect(valAv.port_b, senM_flowAv.port_a); connect(senM_flowAv.port_b, sin.ports[4]); connect(valAv.y, y.y); end TwoWayValveParameterization;