Buildings.Media.Antifreeze.Validation.BaseClasses

Package with base classes for Buildings.Media.Antifreeze.Validation

Information

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

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

Package Content

Name Description
Buildings.Media.Antifreeze.Validation.BaseClasses.FluidProperties FluidProperties Partial model that tests the implementation of temperature- and concentration-dependent fluid properties
Buildings.Media.Antifreeze.Validation.BaseClasses.PropyleneGlycolWater PropyleneGlycolWater PropyleneGlycolWater with publicly accessible medium functions

Buildings.Media.Antifreeze.Validation.BaseClasses.FluidProperties

Partial model that tests the implementation of temperature- and concentration-dependent fluid properties

Information

This example checks the implementation of functions that evaluate the temperature- and concentration-dependent thermophysical properties of the medium.

Thermophysical properties (density, specific heat capacity, thermal conductivity and dynamic viscosity) are shown as 0 if the temperature is below the fusion temperature.

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.Antifreeze.V...Medium package
IntegernX_a Number of mass fractions to evaluate fluid properties
MassFractionX_a[nX_a] Mass fraction of additive [1]
TemperatureT_min Minimum temperature of mixture [K]
TemperatureT_max Maximum temperature of mixture [K]
Temperaturereference_T293.15Reference temperature [K]

Connectors

TypeNameDescription
replaceable package MediumMedium package

Modelica definition

partial model FluidProperties "Partial model that tests the implementation of temperature- and concentration-dependent fluid properties" replaceable package Medium = Buildings.Media.Antifreeze.Validation.BaseClasses.PropyleneGlycolWater "Medium package"; parameter Integer nX_a "Number of mass fractions to evaluate fluid properties"; parameter Modelica.SIunits.MassFraction X_a[nX_a] "Mass fraction of additive"; parameter Modelica.SIunits.Temperature T_min "Minimum temperature of mixture"; parameter Modelica.SIunits.Temperature T_max "Maximum temperature of mixture"; parameter Modelica.SIunits.Temperature reference_T = 293.15 "Reference temperature"; Modelica.SIunits.Temperature Tf[nX_a] "Fluid temperature"; Modelica.SIunits.Density d[nX_a] "Density of fluid mixture"; Modelica.SIunits.SpecificHeatCapacity cp[nX_a] "Specific heat capacity of fluid mixture"; Modelica.SIunits.ThermalConductivity lambda[nX_a] "Density of fluid mixture"; Modelica.SIunits.DynamicViscosity eta[nX_a] "Dynamic viscosity of fluid mixture"; Modelica.SIunits.Temperature T "Temperature of fluid mixture"; Modelica.SIunits.Conversions.NonSIunits.Temperature_degC T_degC "Celsius temperature"; protected parameter Modelica.SIunits.Time dt = 1 "Simulation length"; parameter Real convT(unit="K/s") = (T_max-T_min)/dt "Rate of temperature change"; equation T = T_min + convT*time; T_degC = Modelica.SIunits.Conversions.to_degC(T); for i in 1:nX_a loop Tf[i] =Medium.testFusionTemperature_TX_a(T=T, X_a=X_a[i]); d[i] =if T >= Tf[i] then Medium.testDensity_TX_a(T=T, X_a=X_a[i]) else 0.; cp[i] =if T >= Tf[i] then Medium.testSpecificHeatCapacityCp_TX_a(T=T, X_a=X_a[i]) else 0.; lambda[i] =if T >= Tf[i] then Medium.testThermalConductivity_TX_a(T=T, X_a=X_a[i]) else 0.; eta[i] =if T >= Tf[i] then Medium.testDynamicViscosity_TX_a(T=T, X_a=X_a[i]) else 0.; end for; end FluidProperties;