WOLFRAM SYSTEM MODELER

setState_dTX

Set state for density and temperature (X not used since single substance)

Wolfram Language

In[1]:=
SystemModel["Modelica.Media.R134a.R134a_ph.setState_dTX"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Although the medium package is explicit for pressure and specific enthalpy, this function may be used in order to calculate the thermodynamic state record used as input by many functions. It will calculate the missing states:

  • pressure
  • specific enthalpy

Example:

parameter Medium.Density d = 4;
parameter Medium.Temperature T = 298;

Medium.SpecificEntropy s;

equation

s = Medium.specificEntropy(setState_dTX(d, T, fill(0, Medium.nX)));

Syntax

state = setState_dTX(d, T, X, phase)

Inputs (4)

d

Type: Density (kg/m³)

Description: Density

T

Type: Temperature (K)

Description: Temperature

X

Default Value: reference_X

Type: MassFraction[:] (kg/kg)

Description: Mass fractions

phase

Default Value: 0

Type: FixedPhase

Description: 2 for two-phase, 1 for one-phase, 0 if not known

Outputs (1)

state

Type: ThermodynamicState

Description: Thermodynamic state record

Revisions

2019-12-20 Francesco Casella and Stefan Wischhusen: Two-phase calculation corrected.

2012-08-01 Stefan Wischhusen: Corrected passing-error of inputs.