Buildings.DHC.Networks.Pipes.Validation
Validation models for Pipes
Information
This package contains validation cases for the BaseClasses found in Buildings.DHC.Networks.Pipes.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
Pipe | Validates the PipeAutosize model initialization |
Buildings.DHC.Networks.Pipes.Validation.Pipe
Validates the PipeAutosize model initialization
Information
Validation model for Buildings.DHC.Networks.Combined.BaseClasses.PipeAutosize for range of flow rates and pressure drops per unit length.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | dp1_length_nominal | 1000 | Pressure drop per unit length 1 [Pa/m] |
Real | dp2_length_nominal | 0.1 | Pressure drop per unit length 2 [Pa/m] |
MassFlowRate | m1_flow_nominal | 0.01 | Nominal mass flow rate 1 [kg/s] |
MassFlowRate | m2_flow_nominal | 1000 | Nominal mass flow rate 2 [kg/s] |
Modelica definition
model Pipe "Validates the PipeAutosize model initialization"
extends Modelica.Icons.Example;
package Medium = Buildings.Media.Water "Medium model";
parameter Real dp1_length_nominal(final unit="Pa/m") = 1000 "Pressure drop per unit length 1";
parameter Real dp2_length_nominal(final unit="Pa/m") = 0.1 "Pressure drop per unit length 2";
parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal = 0.01 "Nominal mass flow rate 1";
parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal = 1000 "Nominal mass flow rate 2";
Buildings.Fluid.Sources.Boundary_pT sin(redeclare final package Medium = Medium,
nPorts=4) "Sink for water flow";
Buildings.DHC.Networks.Pipes.PipeStandard pipSta1(
redeclare final package Medium = Medium,
m_flow_nominal=m1_flow_nominal,
dh=0.00548,
length=100) "Pipe 1 with standard hydraulic diameter";
Buildings.Fluid.Sources.MassFlowSource_T souSta1(
redeclare final package Medium = Medium,
m_flow=m1_flow_nominal,
nPorts=1) "Source of water flow for standard pipe 1";
Buildings.Fluid.Sources.MassFlowSource_T souAut2(
redeclare final package Medium = Medium,
m_flow=m2_flow_nominal,
nPorts=1) "Source of water flow for autosized pipe 2";
Buildings.DHC.Networks.Pipes.PipeAutosize pipAut2(
redeclare final package Medium = Medium,
m_flow_nominal=m2_flow_nominal,
dp_length_nominal=dp2_length_nominal,
length=100) "Pipe 2 with autosized hydraulic diameter";
Fluid.Sources.MassFlowSource_T souAut1(
redeclare final package Medium = Medium,
m_flow=m1_flow_nominal,
nPorts=1) "Source of water flow for autosized pipe 1";
Pipes.PipeAutosize pipAut1(
redeclare final package Medium = Medium,
m_flow_nominal=m1_flow_nominal,
dp_length_nominal=dp1_length_nominal,
length=100) "Pipe 1 with autosized hydraulic diameter";
Pipes.PipeStandard pipSta2(
redeclare final package Medium = Medium,
m_flow_nominal=m2_flow_nominal,
dh=2.943,
length=100) "Pipe 2 with standard hydraulic diameter";
Fluid.Sources.MassFlowSource_T souSta2(
redeclare final package Medium = Medium,
m_flow=m2_flow_nominal,
nPorts=1) "Source of water flow for standard pipe 2";
equation
connect(souSta1.ports[1], pipSta1.port_a);
connect(souAut2.ports[1], pipAut2.port_a);
connect(souAut1.ports[1], pipAut1.port_a);
connect(souSta2.ports[1], pipSta2.port_a);
connect(pipAut1.port_b, sin.ports[1]);
connect(pipAut2.port_b, sin.ports[2]);
connect(pipSta1.port_b, sin.ports[3]);
connect(pipSta2.port_b, sin.ports[4]);
end Pipe;