packageExternalSinglePhaseMedium

Generic external single phase medium package

Extends from TRANSFORM.Media.Interfaces.Fluids.PartialSinglePhaseMedium (Base class for single phase medium of one substance).

Parameters

TypeNameDefaultDescription
Modelica.Media.Interfaces.Choices.IndependentVariablesThermoStates (from PartialMedium)Enumeration type for independent variables
StringmediumName (from PartialMedium)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMedium){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMedium)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMedium)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMedium)true= true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details)
BooleanfixedX (from PartialMedium)false= true if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMedium)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMedium)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMedium)fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMedium)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMedium)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMedium)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMedium)reference_XDefault value for mass fractions of medium (for initialization)
ExtraProperty[nC]C_default (from PartialMedium)fill(0, nC)Default value for trace substances of medium (for initialization)
IntegernS (from PartialMedium)size(substanceNames, 1)Number of substances
IntegernX (from PartialMedium)nSNumber of mass fractions
IntegernXi (from PartialMedium)if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMedium)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Real[nC]C_nominal (from PartialMedium)1.0e-6*ones(nC)Default for the nominal values for the extra properties
FluidConstantsfluidConstants (from PartialSinglePhaseMedium)Constant data for the fluid
FluidConstantsexternalFluidConstantsFluidConstants(iupacName = "unknown", casRegistryNumber = "unknown", chemicalFormula = "unknown", structureFormula = "unknown", molarMass = getMolarMass())
SI.TemperatureT_min0
SI.TemperatureT_max1e9
InputChoiceinputChoiceInputChoice.pTDefault choice of input variables for property computations
StringtablePath"modelica://TRANSFORM/Resources/data/lookupTables/" + mediumName + "/pT/"
StringtablePath_pModelica.Utilities.Files.loadResource(tablePath + "p.csv")Pressure
StringtablePath_TModelica.Utilities.Files.loadResource(tablePath + "T.csv")Temperature
StringtablePath_hModelica.Utilities.Files.loadResource(tablePath + "h.csv")Specific enthalpy
StringtablePath_aModelica.Utilities.Files.loadResource(tablePath + "a.csv")Speed of sound
StringtablePath_cpModelica.Utilities.Files.loadResource(tablePath + "cp.csv")Isobaric specific heat capacity
StringtablePath_cvModelica.Utilities.Files.loadResource(tablePath + "cv.csv")Isochoric specific heat capacity
StringtablePath_dModelica.Utilities.Files.loadResource(tablePath + "d.csv")Density
StringtablePath_lambdaModelica.Utilities.Files.loadResource(tablePath + "k.csv")Thermal conductivity
StringtablePath_muModelica.Utilities.Files.loadResource(tablePath + "mu.csv")Dynamic viscosity
StringtablePath_sModelica.Utilities.Files.loadResource(tablePath + "s.csv")Specific entropy
StringtablesPath_pT_TTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_T}, "|", 3)
StringtablesPath_pT_hTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_h}, "|", 3)
StringtablesPath_pT_aTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_a}, "|", 3)
StringtablesPath_pT_cpTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_cp}, "|", 3)
StringtablesPath_pT_cvTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_cv}, "|", 3)
StringtablesPath_pT_dTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_d}, "|", 3)
StringtablesPath_pT_lambdaTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_lambda}, "|", 3)
StringtablesPath_pT_muTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_mu}, "|", 3)
StringtablesPath_pT_sTRANSFORM.Utilities.Strings.concatenate({tablePath_p, tablePath_T, tablePath_s}, "|", 3)
StringtablePath_ph"modelica://TRANSFORM/Resources/data/lookupTables/" + mediumName + "/ph/"
StringtablePath_ph_pModelica.Utilities.Files.loadResource(tablePath_ph + "p.csv")Pressure
StringtablePath_ph_TModelica.Utilities.Files.loadResource(tablePath_ph + "T.csv")Temperature
StringtablePath_ph_hModelica.Utilities.Files.loadResource(tablePath_ph + "h.csv")Specific enthalpy
StringtablePath_ph_aModelica.Utilities.Files.loadResource(tablePath_ph + "a.csv")Speed of sound
StringtablePath_ph_cpModelica.Utilities.Files.loadResource(tablePath_ph + "cp.csv")Isobaric specific heat capacity
StringtablePath_ph_cvModelica.Utilities.Files.loadResource(tablePath_ph + "cv.csv")Isochoric specific heat capacity
StringtablePath_ph_dModelica.Utilities.Files.loadResource(tablePath_ph + "d.csv")Density
StringtablePath_ph_lambdaModelica.Utilities.Files.loadResource(tablePath_ph + "k.csv")Thermal conductivity
StringtablePath_ph_muModelica.Utilities.Files.loadResource(tablePath_ph + "mu.csv")Dynamic viscosity
StringtablePath_ph_sModelica.Utilities.Files.loadResource(tablePath_ph + "s.csv")Specific entropy
StringtablesPath_ph_TTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_T}, "|", 3)
StringtablesPath_ph_hTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_h}, "|", 3)
StringtablesPath_ph_aTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_a}, "|", 3)
StringtablesPath_ph_cpTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_cp}, "|", 3)
StringtablesPath_ph_cvTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_cv}, "|", 3)
StringtablesPath_ph_dTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_d}, "|", 3)
StringtablesPath_ph_lambdaTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_lambda}, "|", 3)
StringtablesPath_ph_muTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_mu}, "|", 3)
StringtablesPath_ph_sTRANSFORM.Utilities.Strings.concatenate({tablePath_ph_p, tablePath_ph_h, tablePath_ph_s}, "|", 3)
StringtablePath_ps"modelica://TRANSFORM/Resources/data/lookupTables/" + mediumName + "/ps/"
StringtablePath_ps_pModelica.Utilities.Files.loadResource(tablePath_ps + "p.csv")Pressure
StringtablePath_ps_TModelica.Utilities.Files.loadResource(tablePath_ps + "T.csv")Temperature
StringtablePath_ps_hModelica.Utilities.Files.loadResource(tablePath_ps + "h.csv")Specific enthalpy
StringtablePath_ps_aModelica.Utilities.Files.loadResource(tablePath_ps + "a.csv")Speed of sound
StringtablePath_ps_cpModelica.Utilities.Files.loadResource(tablePath_ps + "cp.csv")Isobaric specific heat capacity
StringtablePath_ps_cvModelica.Utilities.Files.loadResource(tablePath_ps + "cv.csv")Isochoric specific heat capacity
StringtablePath_ps_dModelica.Utilities.Files.loadResource(tablePath_ps + "d.csv")Density
StringtablePath_ps_lambdaModelica.Utilities.Files.loadResource(tablePath_ps + "k.csv")Thermal conductivity
StringtablePath_ps_muModelica.Utilities.Files.loadResource(tablePath_ps + "mu.csv")Dynamic viscosity
StringtablePath_ps_sModelica.Utilities.Files.loadResource(tablePath_ps + "s.csv")Specific entropy
StringtablesPath_ps_TTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_T}, "|", 3)
StringtablesPath_ps_hTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_h}, "|", 3)
StringtablesPath_ps_aTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_a}, "|", 3)
StringtablesPath_ps_cpTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_cp}, "|", 3)
StringtablesPath_ps_cvTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_cv}, "|", 3)
StringtablesPath_ps_dTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_d}, "|", 3)
StringtablesPath_ps_lambdaTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_lambda}, "|", 3)
StringtablesPath_ps_muTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_mu}, "|", 3)
StringtablesPath_ps_sTRANSFORM.Utilities.Strings.concatenate({tablePath_ps_p, tablePath_ps_s, tablePath_ps_s}, "|", 3)

Contents

NameDescription
MethodInterpolation method selection
Method_dxInterpolation method selection for derivative wrt x
Method_dyInterpolation method selection for derivative wrt y
ThermodynamicState
BaseProperties
getMolarMass
setState_phReturn thermodynamic state record from p and h
setState_pTReturn thermodynamic state record from p and T
setState_dTReturn thermodynamic state record from d and T
setState_psReturn thermodynamic state record from p and s
setState_hsReturn thermodynamic state record from h and s
setState_phX
setState_pTX
setState_dTX
setState_psX
setState_hsX
density_phReturn density from p and h
density_ph_derTotal derivative of density_ph
temperature_phReturn temperature from p and h
specificEntropy_phReturn specific entropy from p and h
specificEntropy_ph_dertime derivative of specificEntropy_ph
density_pTReturn density from p and T
density_pT_derTotal derivative of density_pT
specificEnthalpy_pTReturn specific enthalpy from p and T
specificEntropy_pTreturns specific entropy for a given p and T
pressure_dTReturn pressure from d and T
specificEnthalpy_dTReturn specific enthalpy from d and T
specificEntropy_dTreturns specific entropy for a given d and T
density_psReturn density from p and s
density_ps_derTotal derivative of density_ps
temperature_psReturn temperature from p and s
specificEnthalpy_psReturn specific enthalpy from p and s
density_hsReturn density for given h and s
pressure_hsReturn pressure from h and s
temperature_hsReturn temperature from h and s
prandtlNumberReturns Prandtl number
temperatureReturn temperature from state
velocityOfSoundReturn velocity of sound from state
isobaricExpansionCoefficientReturn isobaric expansion coefficient from state
isentropicExponentReturn isentropic exponent
specificHeatCapacityCpReturn specific heat capacity cp from state
specificHeatCapacityCvReturn specific heat capacity cv from state
densityReturn density from state
density_derh_pReturn derivative of density wrt enthalpy at constant pressure from state
density_derp_hReturn derivative of density wrt pressure at constant enthalpy from state
density_derp_TReturn derivative of density wrt pressure at constant temperature from state
density_derT_pReturn derivative of density wrt temperature at constant pressure from state
dynamicViscosityReturn dynamic viscosity from state
specificEnthalpyReturn specific enthalpy from state
specificInternalEnergyReturns specific internal energy
isothermalCompressibilityReturn isothermal compressibility from state
thermalConductivityReturn thermal conductivity from state
pressureReturn pressure from state
specificEntropyReturn specific entropy from state