Exported Types
Index
ModiaMedia.AbstractFluidConstantsModiaMedia.AbstractMediumModiaMedia.BasicFluidConstantsModiaMedia.CondensingGasesModiaMedia.FluidInfosModiaMedia.FluidLimitsModiaMedia.IdealGasFluidConstantsModiaMedia.IndependentVariablesModiaMedia.MixtureMediumModiaMedia.MixtureThermodynamicStateModiaMedia.MoistAirStateModiaMedia.PureSubstanceModiaMedia.ReferenceEnthalpyModiaMedia.ReferenceEntropyModiaMedia.SimpleIdealGasMediumStateModiaMedia.SimpleMediumStateModiaMedia.SingleGasNasaStateModiaMedia.ThermodynamicState
Documentation
abstract type AbstractFluidConstantsAbstract type of all FluidConstants structures.
ModiaMedia.AbstractMedium — Type.abstract type AbstractMediumAbstract type of all media.
ModiaMedia.BasicFluidConstants — Type.fluidConstants = BasicFluidConstants(;iupacName="", casRegistryNumber="",
chemicalFormula="", structureFormula="", molarMass=NaN)Generate a BasicFluidConstants <: AbstractFluidConstants object containing the minimal information about the standard data of the medium.
ModiaMedia.CondensingGases — Type.abstract type CondensingGases <: AbstractMediumAbstract type of all media consisting of condensing media.
ModiaMedia.FluidInfos — Type.infos = FluidInfos(; <keyword arguments, see below>)Generate a new FluidInfos object, containing generic properties of a medium.
Keyword arguments
| Name and type | Description |
|---|---|
mediumName::AbstractString | Name of the medium |
substanceNames::Vector{AbstractString} | Names of the mixture substances. Set substanceNames=[mediumName] if only one substance. |
extraPropertiesNames::Vector{AbstractString} | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
ThermoStates::IndependentVariables | Enumeration type for independent variables |
singleState::Bool | = true, if u and d are not a function of pressure |
reducedX::Bool | = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance |
fixedX::Bool | = true if medium contains the equation X = reference_X |
reference_p | Reference pressure of Medium: default 1 atmosphere |
reference_T | Reference temperature of Medium: default 25 deg Celsius |
reference_X | Reference mass fractions of medium |
p_default | Default value for pressure of medium (for initialization) |
T_default | Default value for temperature of medium (for initialization) |
h_default | Default value for specific enthalpy of medium (for initialization) |
X_default | Default value for specific enthalpy of medium (for initialization) |
nS | Number of substances |
nX | Number of mass fractions |
nXi | Number of structurally independent mass fractions |
nC | Number of extra (outside of standard mass-balance) transported properties |
C_nominal | Default for the nominal values for the extra properties |
Example
import ModiaMedia
infos = ModiaMedia.FluidInfos(mediumName = "simpleMedium",
substanceNames = [mediumName],
extraPropertiesNames = fill("",0),
ThermoStates = IndependentVariables_T)ModiaMedia.FluidLimits — Type.fluidLimits = FluidLimits(; TMIN=NaN, TMAX=NaN, DMIN=NaN, DMAX=NaN, PMIN=NaN, PMAX=NaN,
HMIN=NaN, HMAX=NaN, SMIN=NaN, SMAX=NaN)Generate a new FluidLimits object, containing the validity limits of the medium.
fluidConstants = IdealGasFluidConstants(; iupacName="", casRegistryNumber="",
chemicalFormula="", structureFormula="", molarMass=NaN,
criticalTemperature=NaN, criticalPressure=NaN, criticalMolarVolume=NaN,
acentricFactor=NaN, meltingPoint=NaN, normalBoilingPoint=NaN, dipoleMoment=NaN,
hasIdealGasHeatCapacity=false, hasCriticalData=false, hasDipoleMoment=false,
hasFundamentalEquation=false, hasLiquidHeatCapacity=false, hasSolidHeatCapacity=false,
hasAccurateViscosityData=false, hasAccurateConductivityData=false,
hasVapourPressureCurve=false, hasAcentricFactor=false,
HCRIT0=0.0, SCRIT0=0.0, deltah=0.0, deltas=0.0)Generate a IdealGasFluidConstants <: AbstractFluidConstants object containing the minimal information about the standard data of ideal gas media (critical, triple, molecular and other standard data).
ModiaMedia.IndependentVariables — Type.@enum IndependentVariablesEnumeration defining the independent variables of a medium. Possible values:
| Value | Independent variables |
|---|---|
IndependentVariables_T | Temperature |
IndependentVariables_pT | Pressure, temperature |
IndependentVariables_ph | Pressure, specific enthalpy |
IndependentVariables_phX | Pressure, specific enthalpy, mass fractions |
IndependentVariables_pTX | Pressure, temperature, mass fractions |
IndependentVariables_dTX | Density, temperature, mass fractions |
ModiaMedia.MixtureMedium — Type.abstract type MixtureMedium <: AbstractMediumAbstract type of all media consisting of a mixture of media.
abstract type MixtureThermodynamicState <: ThermodynamicStateAbstract type of the states of all media consisting of a mixture of media.
ModiaMedia.MoistAirState — Type.state = MoistAirState(Medium, p, T, X)Generate a MoistAirState <: MixtureThermodynamicState object containing pressure p [Pa], temperature T [K], and a vector of mass fractions as states, where X[1] is the mass fraction of Steam and X[2] is the mass fraction of dry air. If argument X has only one element, X[2] is computed from X[1] and stored in the state.
ModiaMedia.PureSubstance — Type.abstract type PureSubstance <: AbstractMediumAbstract type of all media consisting of a pure substance.
ModiaMedia.ReferenceEnthalpy — Type.@enum ReferenceEnthalpyEnumeration defining the reference enthalpy of a medium. Possible values:
ReferenceEnthalpy_ZeroAt0K: The enthalpy is 0 at 0 K (default), if the enthalpy of formation is excludedReferenceEnthalpy_ZeroAt25C: The enthalpy is 0 at 25 degC, if the enthalpy of formation is excludedReferenceEnthalpy_UserDefined: The user-defined reference enthalpy is used at 293.15 K (25 degC)
ModiaMedia.ReferenceEntropy — Type.@enum ReferenceEntropyEnumeration defining the reference entropy of a medium. Possible values:
ReferenceEntropy_ZeroAt0K: The entropy is 0 at 0 K (default)ReferenceEntropy_ZeroAt0C: The entropy is 0 at 0 degCReferenceEntropy_UserDefined: The user-defined reference entropy is used at 293.15 K (25 degC)
state = SimpleIdealGasMediumState(Medium, p, T)Generate a SimpleIdealGasMediumState <: ThermodynamicState object containing pressure p [Pa] and temperature T [K] as thermodynamic states.
ModiaMedia.SimpleMediumState — Type.state = SimpleMediumState(Medium, p, T)Generate a SimpleMediumState <: ThermodynamicState object containing pressure p [Pa] and temperature T [K] as thermodynamic states.
ModiaMedia.SingleGasNasaState — Type.state = SingleGasNasaState(Medium, p, T)Generate a SingleGasNasaState <: ThermodynamicState object containing pressure p [Pa] and temperature T [K] as thermodynamic states.
ModiaMedia.ThermodynamicState — Type.abstract type ThermodynamicState
Abstract type of all media states.