Buildings.Fluid.Sources.Validation.BaseClasses

Package with base classes for Buildings.Fluid.Sources.Validation

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.Sources.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem BoundarySystem System model for testing of boundary condition
Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in BoundarySystemWithX_in System model for testing boundary condition with mass fraction input
Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in BoundarySystemWithXi_in System model for testing boundary condition with mass fraction input

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem

System model for testing of boundary condition

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem

Information

System model used to test the boundary conditions for different media. This model has been introduced to get access to the medium mass fraction, which is a protected variable in Buildings.Fluid.Sources.Boundary_pT. Therefore, this model has been created so that the boundary model has a port which is used to access the mass fraction.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component

Connectors

TypeNameDescription
replaceable package MediumMedium in the component

Modelica definition

model BoundarySystem "System model for testing of boundary condition" extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; Boundary_pT sou(redeclare final package Medium = Medium, nPorts=1) "Boundary"; MassFlowSource_T sin( redeclare final package Medium = Medium, m_flow=-1, nPorts=1) "Mass flow source"; Modelica.Units.SI.Temperature T=senTem.T "Temperature coming out of the source"; Modelica.Units.SI.MassFraction Xi[Medium.nXi]=sou.ports[1].Xi_outflow "Mass fraction coming out of the source"; Modelica.Units.SI.Pressure p=sou.ports[1].p "Pressure in the source"; Modelica.Fluid.Sensors.TemperatureTwoPort senTem( redeclare package Medium = Medium, allowFlowReversal=false, m_flow_nominal=1, m_flow_small=1E-4) "Temperature sensor"; inner Modelica.Fluid.System system; equation connect(sou.ports[1], senTem.port_a); connect(sin.ports[1], senTem.port_b); end BoundarySystem;

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in

System model for testing boundary condition with mass fraction input

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in

Information

System model used to test the boundary conditions for different media with prescribed mass fraction X.

Extends from Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem (System model for testing of boundary condition).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component

Connectors

TypeNameDescription
input RealInputX_in[Medium.nX]Prescribed boundary composition

Modelica definition

model BoundarySystemWithX_in "System model for testing boundary condition with mass fraction input" extends Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem(sou(use_X_in=true)); Modelica.Blocks.Interfaces.RealInput X_in[Medium.nX] "Prescribed boundary composition"; equation for i in 1:Medium.nXi loop assert(abs(Xi[i] - X_in[i]) < 1E-6, "Error in implementation of mass fraction"); end for; connect(sou.X_in, X_in); end BoundarySystemWithX_in;

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in

System model for testing boundary condition with mass fraction input

Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in

Information

System model used to test the boundary conditions for different media with independent prescribed mass fraction Xi.

Extends from Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem (System model for testing of boundary condition).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component

Connectors

TypeNameDescription
input RealInputXi_in[Medium.nXi]Prescribed boundary composition

Modelica definition

model BoundarySystemWithXi_in "System model for testing boundary condition with mass fraction input" extends Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem(sou(use_Xi_in=true)); Modelica.Blocks.Interfaces.RealInput Xi_in[Medium.nXi] "Prescribed boundary composition"; equation for i in 1:Medium.nXi loop assert(abs(Xi[i] - Xi_in[i]) < 1E-6, "Error in implementation of mass fraction"); end for; connect(sou.Xi_in, Xi_in); end BoundarySystemWithXi_in;