Buildings.Fluid.Sources.Validation

Collection of validation models

Information

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

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.Sources.Validation.Boundary Boundary Validation model for boundary with different media
Buildings.Fluid.Sources.Validation.BoundaryWithX_in BoundaryWithX_in Validation model for boundary with different media and mass fraction input
Buildings.Fluid.Sources.Validation.BoundaryWithXi_in BoundaryWithXi_in Validation model for boundary with different media and independent mass fraction input
Buildings.Fluid.Sources.Validation.Outside_CpData_Directions Outside_CpData_Directions Test model for wind pressure using a wind pressure profile that is 1 for normal angle of attack, and goes to zero otherwise
Buildings.Fluid.Sources.Validation.BaseClasses BaseClasses Package with base classes for Buildings.Fluid.Sources.Validation

Buildings.Fluid.Sources.Validation.Boundary Buildings.Fluid.Sources.Validation.Boundary

Validation model for boundary with different media

Buildings.Fluid.Sources.Validation.Boundary

Information

Validation model for Buildings.Fluid.Sources.Boundary_pT for different media.

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

Modelica definition

model Boundary "Validation model for boundary with different media" extends Modelica.Icons.Example; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouWat( redeclare package Medium = Buildings.Media.Water) "Boundary with water"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouProGly( redeclare package Medium = Media.Antifreeze.PropyleneGlycolWater(property_T=293.15, X_a=0.40)) "Boundary with propylene glycol"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouMoiAir( redeclare package Medium = Buildings.Media.Air) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouMoiAirCO2( redeclare package Medium = Buildings.Media.Air(extraPropertiesNames={"CO2"})) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouProFluGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.FlueGasSixComponents) "Boundary with flue gas"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouNatGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas) "Boundary with natural gas"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystem bouNatGasFix( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGasFixedComposition) "Boundary with natural gas"; end Boundary;

Buildings.Fluid.Sources.Validation.BoundaryWithX_in Buildings.Fluid.Sources.Validation.BoundaryWithX_in

Validation model for boundary with different media and mass fraction input

Buildings.Fluid.Sources.Validation.BoundaryWithX_in

Information

Validation model for Buildings.Fluid.Sources.Boundary_pT for different media and with mass fraction X prescribed by an input.

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

Modelica definition

model BoundaryWithX_in "Validation model for boundary with different media and mass fraction input" extends Modelica.Icons.Example; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in bouMoiAir( redeclare package Medium = Buildings.Media.Air) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in bouMoiAirCO2( redeclare package Medium = Buildings.Media.Air(extraPropertiesNames={"CO2"})) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in bouProFluGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.FlueGasSixComponents) "Boundary with flue gas"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithX_in bouNatGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas) "Boundary with natural gas"; Modelica.Blocks.Sources.Constant X_2[2](k={0.015, 0.985}) "Prescribed mass fraction"; Modelica.Blocks.Sources.Constant X_6[6](k={0.5,0.2,0.0,0.3,0.0,0.0}) "Prescribed mass fraction"; equation connect(X_6.y, bouProFluGas.X_in); connect(X_2.y, bouMoiAir.X_in); connect(X_6.y, bouNatGas.X_in); connect(X_2.y, bouMoiAirCO2.X_in); end BoundaryWithX_in;

Buildings.Fluid.Sources.Validation.BoundaryWithXi_in Buildings.Fluid.Sources.Validation.BoundaryWithXi_in

Validation model for boundary with different media and independent mass fraction input

Buildings.Fluid.Sources.Validation.BoundaryWithXi_in

Information

Validation model for Buildings.Fluid.Sources.Boundary_pT for different media and with independent mass fraction Xi prescribed by an input.

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

Modelica definition

model BoundaryWithXi_in "Validation model for boundary with different media and independent mass fraction input" extends Modelica.Icons.Example; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in bouMoiAir( redeclare package Medium = Buildings.Media.Air) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in bouMoiAirCO2( redeclare package Medium = Buildings.Media.Air(extraPropertiesNames={"CO2"})) "Boundary with moist air"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in bouProFluGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.FlueGasSixComponents) "Boundary with flue gas"; Buildings.Fluid.Sources.Validation.BaseClasses.BoundarySystemWithXi_in bouNatGas( redeclare package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas) "Boundary with natural gas"; Modelica.Blocks.Sources.Constant Xi_1[1](k={0.015}) "Prescribed mass fraction"; Modelica.Blocks.Sources.Constant Xi_6[6](k={0.5,0.2,0.0,0.3,0.0,0.0}) "Prescribed mass fraction"; equation connect(Xi_6.y, bouProFluGas.Xi_in); connect(Xi_1.y, bouMoiAir.Xi_in); connect(Xi_6.y, bouNatGas.Xi_in); connect(Xi_1.y, bouMoiAirCO2.Xi_in); end BoundaryWithXi_in;

Buildings.Fluid.Sources.Validation.Outside_CpData_Directions Buildings.Fluid.Sources.Validation.Outside_CpData_Directions

Test model for wind pressure using a wind pressure profile that is 1 for normal angle of attack, and goes to zero otherwise

Buildings.Fluid.Sources.Validation.Outside_CpData_Directions

Information

This model demonstrates the use of a source for ambient conditions that computes the wind pressure on a facade of a building using a user-defined wind pressure profile. In this model, the wind pressure profile is not realistic, but rather it is set to 1 if the wind strikes the surface perpendicular, and otherwise it goes back to 0.

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

Parameters

TypeNameDefaultDescription
AngleincAngSurNor[:]{0,1,5,90,180,315,355,359}*2...Wind incidence angles [rad]
RealCp[:]{1,0.01,0,0,0,0,0,0.01}Cp values at the relative surface wind incidence angles

Modelica definition

model Outside_CpData_Directions "Test model for wind pressure using a wind pressure profile that is 1 for normal angle of attack, and goes to zero otherwise" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air "Medium model for air"; parameter Modelica.Units.SI.Angle incAngSurNor[:]= {0,1,5,90,180,315,355,359}*2*Modelica.Constants.pi/360 "Wind incidence angles"; parameter Real Cp[:]={1,0.01,0,0,0,0,0,0.01} "Cp values at the relative surface wind incidence angles"; Buildings.Fluid.Sources.Outside_CpData nor( redeclare package Medium = Medium, incAngSurNor=incAngSurNor, Cp=Cp, azi=Buildings.Types.Azimuth.N) "Model to compute wind pressure on North-facing surface"; Buildings.Fluid.Sources.Outside_CpData eas( redeclare package Medium = Medium, incAngSurNor=incAngSurNor, Cp=Cp, azi=Buildings.Types.Azimuth.E) "Model to compute wind pressure on East-facing surface"; Buildings.Fluid.Sources.Outside_CpData sou( redeclare package Medium = Medium, incAngSurNor=incAngSurNor, Cp=Cp, azi=Buildings.Types.Azimuth.S) "Model to compute wind pressure on South-facing surface"; Buildings.Fluid.Sources.Outside_CpData wes( redeclare package Medium = Medium, incAngSurNor=incAngSurNor, Cp=Cp, azi=Buildings.Types.Azimuth.W) "Model to compute wind pressure on West-facing surface"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"), winSpeSou=Buildings.BoundaryConditions.Types.DataSource.Parameter, winSpe=1, winDirSou=Buildings.BoundaryConditions.Types.DataSource.Input) "Weather data"; Modelica.Blocks.Sources.Ramp winDir( height=2*Modelica.Constants.pi, duration=24*3600) "Wind direction"; equation connect(weaDat.winDir_in, winDir.y); connect(weaDat.weaBus, nor.weaBus); connect(weaDat.weaBus, eas.weaBus); connect(weaDat.weaBus, sou.weaBus); connect(weaDat.weaBus, wes.weaBus); end Outside_CpData_Directions;