Thermodynamic Variables

Thermodynamic variables and indices module.

This module defines the SymPy thermodynamic variables and indices used in thermodynamic calculations. It uses sympy for symbolic mathematics.

Module variables
  • nc: Symbol representing the number of components (integer).

  • i, j, k, l, m: Indexed symbols for indices used in equations.

  • n: IndexedBase varaible for the number of moles of each component.

  • T: Symbol for temperature.

  • V: Symbol for volume.

  • P: Symbol for pressure.

  • R: Symbol for the gas constant.

You can directly import these variables by doing:

from thermodiff import k, l, m      # Indices
from thermodiff import n, P, T, V   # Thermodynamic variables
form thermodiff import R            # Gas constant

Those are the normal variables used in thermodynamic calculations. Never use i and j directly. those are used for derivatives of n, and are not intended for direct use in equations (See tutorial).