---
url: /dyad/dev/stdlib/MediaComponents/components/Interfaces.ThermodynamicState.md
description: >-
  Dyad Interfaces.ThermodynamicState docs.  Thermodynamic state fields shared by
  single-phase medium implementations.
---

# `Interfaces.ThermodynamicState` {#Interfaces.ThermodynamicState}

Thermodynamic state fields shared by single-phase medium implementations.

## Usage {#Usage}

`MediaComponents.Interfaces.ThermodynamicState()`

## Parameters: {#Parameters:}

|          Name | Description | Units |             Default value |
| -------------:| -----------:| -----:| -------------------------:|
| `medium_data` |             |     – |                           |
|          `nX` |             |     – | MediaCompon...edium_data) |

## Variables {#Variables}

| Name | Description | Units |
| ----:| -----------:| -----:|
|  `p` |             |    Pa |
|  `T` |             |     K |
|  `d` |             | kg/m3 |
|  `h` |             |  J/kg |
|  `X` |             | kg/kg |

## Behavior {#Behavior}

## Source {#Source}

```dyad
"Thermodynamic state fields shared by single-phase medium implementations."
component ThermodynamicState
  # Immutable medium definition selected at model construction [-]
  structural parameter medium_data::MediaComponents.Interfaces.AbstractMediumData
  # Number of mass fractions [-]
  final structural parameter nX::Integer = MediaComponents.Interfaces.medium_nX(medium_data)
  # State absolute pressure [Pa]
  variable p::MediaComponents.Types.AbsolutePressure
  # State temperature [K]
  variable T::MediaComponents.Types.Temperature
  # State density [kg/m3]
  variable d::MediaComponents.Types.Density
  # State specific enthalpy [J/kg]
  variable h::MediaComponents.Types.SpecificEnthalpy
  # State mass fractions [kg/kg]
  variable X::MediaComponents.Types.MassFraction[nX]
relations
end
```

```dyad
"Thermodynamic state fields shared by single-phase medium implementations."
component ThermodynamicState
  # Immutable medium definition selected at model construction [-]
  structural parameter medium_data::MediaComponents.Interfaces.AbstractMediumData
  # Number of mass fractions [-]
  final structural parameter nX::Integer = MediaComponents.Interfaces.medium_nX(medium_data)
  # State absolute pressure [Pa]
  variable p::MediaComponents.Types.AbsolutePressure
  # State temperature [K]
  variable T::MediaComponents.Types.Temperature
  # State density [kg/m3]
  variable d::MediaComponents.Types.Density
  # State specific enthalpy [J/kg]
  variable h::MediaComponents.Types.SpecificEnthalpy
  # State mass fractions [kg/kg]
  variable X::MediaComponents.Types.MassFraction[nX]
relations
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`TestConstantPropertyLiquidWater`](Interfaces.ThermodynamicState.md)

  * [`TestDisabledStandardOrder`](Interfaces.ThermodynamicState.md)

  * [`TestFixedComposition`](Interfaces.ThermodynamicState.md)

  * [`TestReducedComposition`](Interfaces.ThermodynamicState.md)

  * [`TestUnconstrainedComposition`](Interfaces.ThermodynamicState.md)

  * [`TestWideThermodynamicState`](Interfaces.ThermodynamicState.md)
