Buildings.Fluid.FixedResistances.BaseClasses.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Fluid.FixedResistances.BaseClasses.

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.FixedResistances.BaseClasses.Validation.PlugFlowCore PlugFlowCore Simple example of plug flow pipe core

Buildings.Fluid.FixedResistances.BaseClasses.Validation.PlugFlowCore Buildings.Fluid.FixedResistances.BaseClasses.Validation.PlugFlowCore

Simple example of plug flow pipe core

Buildings.Fluid.FixedResistances.BaseClasses.Validation.PlugFlowCore

Information

Basic test of model Buildings.Fluid.FixedResistances.BaseClasses.PlugFlowCore. This test includes an inlet temperature step under a constant mass flow rate.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterMedium in pipes
Lengthdh0.1Hydraulic diameter (assuming a round cross section area) [m]
LengthdIns0.05Thickness of pipe insulation [m]
ThermalConductivitykIns0.028Heat conductivity of pipe insulation [W/(m.K)]
SpecificHeatCapacitycPip500Specific heat of pipe wall material. 2300 for PE, 500 for steel [J/(kg.K)]
DensityrhoPip8000Density of pipe wall material. 930 for PE, 8000 for steel [kg/m3]
RealR1/(kIns*2*Modelica.Constants...Thermal resistance per unit length from fluid to boundary temperature
RealCrho_default*Modelica.Constan...Thermal capacity per unit length of water in pipe
ThermodynamicStatesta_defaultMedium.setState_pTX(T=Medium...Default medium state
SpecificHeatCapacitycp_defaultMedium.specificHeatCapacityC...Heat capacity of medium [J/(kg.K)]
Advanced
Densityrho_defaultMedium.density_pTX(p=Medium....Default density (e.g., rho_liquidWater = 995, rho_air = 1.2) [kg/m3]

Connectors

TypeNameDescription
replaceable package MediumMedium in pipes

Modelica definition

model PlugFlowCore "Simple example of plug flow pipe core" extends Modelica.Icons.Example; replaceable package Medium = Buildings.Media.Water "Medium in pipes"; parameter Modelica.SIunits.Length dh=0.1 "Hydraulic diameter (assuming a round cross section area)"; parameter Modelica.SIunits.Length dIns = 0.05 "Thickness of pipe insulation"; parameter Modelica.SIunits.ThermalConductivity kIns= 0.028 "Heat conductivity of pipe insulation"; parameter Modelica.SIunits.SpecificHeatCapacity cPip=500 "Specific heat of pipe wall material. 2300 for PE, 500 for steel"; parameter Modelica.SIunits.Density rhoPip=8000 "Density of pipe wall material. 930 for PE, 8000 for steel"; parameter Real R=1/(kIns*2*Modelica.Constants.pi/ Modelica.Math.log((dh/2 + dIns)/(dh/2))) "Thermal resistance per unit length from fluid to boundary temperature"; parameter Real C=rho_default*Modelica.Constants.pi*( dh/2)^2*cp_default "Thermal capacity per unit length of water in pipe"; parameter Modelica.SIunits.Density rho_default=Medium.density_pTX( p=Medium.p_default, T=Medium.T_default, X=Medium.X_default) "Default density (e.g., rho_liquidWater = 995, rho_air = 1.2)"; parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default) "Default medium state"; parameter Modelica.SIunits.SpecificHeatCapacity cp_default= Medium.specificHeatCapacityCp(state=sta_default) "Heat capacity of medium"; Modelica.Blocks.Sources.Ramp Tin( height=20, duration=0, offset=273.15 + 50, startTime=100) "Ramp temperature signal"; Sources.Boundary_pT sin( redeclare package Medium = Medium, T=273.15 + 10, nPorts=1, p(displayUnit="Pa") = 101325) "Pressure boundary condition"; Buildings.Fluid.FixedResistances.BaseClasses.PlugFlowCore pip( redeclare package Medium = Medium, from_dp=true, dh=0.1, length=100, m_flow_nominal=1, roughness=2.5e-5, thickness=0.0032, initDelay=true, m_flow_start=1, R=R, C=C, v_nominal=1.5, T_start_in=323.15, T_start_out=323.15) "Pipe"; Buildings.HeatTransfer.Sources.FixedTemperature bou(T=283.15) "Fixed temperature boundary condition"; Buildings.Fluid.Sources.MassFlowSource_T sou( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemOut( redeclare package Medium = Medium, m_flow_nominal=1, T_start=323.15) "Temperature sensor"; Buildings.Fluid.Sensors.TemperatureTwoPort senTemIn( redeclare package Medium = Medium, m_flow_nominal=1, T_start=323.15) "Temperature sensor"; equation connect(bou.port, pip.heatPort); connect(Tin.y, sou.T_in); connect(senTemOut.port_b, sin.ports[1]); connect(sou.ports[1], senTemIn.port_a); connect(senTemIn.port_b, pip.port_a); connect(pip.port_b, senTemOut.port_a); end PlugFlowCore;