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 |
ThreeWayValveParameterization
|
Test model for parameterization of three-way valves |
TwoWayValveParameterization
|
Model to test and illustrate different parameterization for valves |
Test model for parameterization of three-way valves
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
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | 0.4 | Design mass flow rate [kg/s] |
PressureDifference | dp_nominal | 4500 | Design pressure drop [Pa] |
Real | Kv_SI | m_flow_nominal/sqrt(dp_nomin... | Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)] |
Real | Kv | Kv_SI/(rhoStd/3600/sqrt(1E5)) | Kv (metric) flow coefficient [m3/h/(bar)^(1/2)] |
Real | Cv | Kv_SI/(rhoStd*0.0631/1000/sq... | Cv (US) flow coefficient [USG/min/(psi)^(1/2)] |
Area | Av | Kv_SI/sqrt(rhoStd) | Av (metric) flow coefficient [m2] |
Density | rhoStd | Medium.density_pTX(101325, 2... | Standard density [kg/m3] |
Modelica definition
model ThreeWayValveParameterization
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.4 ;
parameter Modelica.SIunits.PressureDifference dp_nominal=4500 ;
parameter Real Kv_SI=m_flow_nominal/
sqrt(dp_nominal) ;
parameter Real Kv=Kv_SI/(rhoStd/3600/
sqrt(1E5)) ;
parameter Real Cv=Kv_SI/(rhoStd*0.0631/1000/
sqrt(6895)) ;
parameter Modelica.SIunits.Area Av=Kv_SI/
sqrt(rhoStd) ;
parameter Modelica.SIunits.Density rhoStd=
Medium.density_pTX(
101325,
273.15 + 4,
Medium.X_default) ;
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) ;
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) ;
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) ;
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) ;
Buildings.Fluid.Sources.Boundary_pT sou1(
redeclare package Medium = Medium,
nPorts=4,
use_p_in=false,
p(displayUnit="Pa") = 300000 + 4500,
T=293.15) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=4,
use_p_in=false,
p=300000,
T=293.15) ;
Modelica.Blocks.Sources.Ramp y(
duration=1,
height=1,
offset=0) ;
Buildings.Fluid.Sensors.MassFlowRate senM_flowOpPoi(
redeclare package Medium
= Medium) ;
Buildings.Fluid.Sensors.MassFlowRate senM_flowKv(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sensors.MassFlowRate senM_flowCv(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sensors.MassFlowRate senM_flowAv(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sources.Boundary_pT sou3(
redeclare package Medium = Medium,
nPorts=4,
use_p_in=false,
p(displayUnit="Pa") = 300000 + 4500,
T=293.15) ;
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;
Model to test and illustrate different parameterization for valves
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
Type | Name | Default | Description |
MassFlowRate | m_flow_nominal | 0.4 | Design mass flow rate [kg/s] |
PressureDifference | dp_nominal | 4500 | Design pressure drop [Pa] |
Real | Kv_SI | m_flow_nominal/sqrt(dp_nomin... | Flow coefficient for fully open valve in SI units, Kv=m_flow/sqrt(dp) [kg/s/(Pa)^(1/2)] |
Real | Kv | Kv_SI/(rhoStd/3600/sqrt(1E5)) | Kv (metric) flow coefficient [m3/h/(bar)^(1/2)] |
Real | Cv | Kv_SI/(rhoStd*0.0631/1000/sq... | Cv (US) flow coefficient [USG/min/(psi)^(1/2)] |
Area | Av | Kv_SI/sqrt(rhoStd) | Av (metric) flow coefficient [m2] |
Density | rhoStd | Medium.density_pTX(101325, 2... | Standard density [kg/m3] |
Modelica definition
model TwoWayValveParameterization
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.4 ;
parameter Modelica.SIunits.PressureDifference dp_nominal=4500 ;
parameter Real Kv_SI=m_flow_nominal/
sqrt(dp_nominal) ;
parameter Real Kv=Kv_SI/(rhoStd/3600/
sqrt(1E5)) ;
parameter Real Cv=Kv_SI/(rhoStd*0.0631/1000/
sqrt(6895)) ;
parameter Modelica.SIunits.Area Av=Kv_SI/
sqrt(rhoStd) ;
parameter Modelica.SIunits.Density rhoStd=
Medium.density_pTX(
101325,
273.15 + 4,
Medium.X_default) ;
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) ;
Modelica.Blocks.Sources.Ramp y(duration=1) ;
Valves.TwoWayLinear valKv(
redeclare package Medium = Medium,
CvData=Buildings.Fluid.Types.CvTypes.Kv,
m_flow_nominal=m_flow_nominal,
Kv=Kv,
use_inputFilter=false) ;
Valves.TwoWayLinear valCv(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
CvData=Buildings.Fluid.Types.CvTypes.Cv,
Cv=Cv,
use_inputFilter=false) ;
Buildings.Fluid.Sources.Boundary_pT sou(
redeclare package Medium = Medium,
nPorts=4,
p(displayUnit="Pa") = 300000 + 4500,
T=293.15) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=4,
use_p_in=false,
p=300000,
T=293.15) ;
Buildings.Fluid.Sensors.MassFlowRate senM_flowOpPoi(
redeclare package Medium
= Medium) ;
Buildings.Fluid.Sensors.MassFlowRate senM_flowKv(
redeclare package Medium = Medium)
;
Buildings.Fluid.Sensors.MassFlowRate senM_flowCv(
redeclare package Medium = Medium)
;
Valves.TwoWayLinear valAv(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
use_inputFilter=false,
CvData=Buildings.Fluid.Types.CvTypes.Av,
Av=Av) ;
Buildings.Fluid.Sensors.MassFlowRate senM_flowAv(
redeclare package Medium = Medium)
;
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;