gaspype.species_system#
- class gaspype.species_system(species, t_min=250, t_max=2000, backend='numpy', device=None)#
Bases:
objectA class to represent the thermodynamic data of a set of selected species. In contrast to a fluid_system the species can be gas phase species as well as condensed phase species (solids and liquids, see gaspype.species(condensed=True)), therefore it can not be used for fluids. A species_system with a single species can be used as substance for gaspype.activity.
- species#
List of selected species in the species_system
- Type:
list[str]
- elements#
List of the elements of the species
- Type:
list[str]
- array_molar_mass#
Array of the molar masses of the species in the species_system
- Type:
FloatArray
- array_species_elements#
Array of the element composition of the species in the species_system. Dimension is: (number of species, number of elements)
- Type:
FloatArray
- array_atomic_mass#
Array of the atomic masses of the elements in the species_system
- Type:
FloatArray
- np#
Array namespace of the backend, used for all arrays and calculations of the species_system
- Type:
ModuleType
- device#
JAX device of the arrays or None for the default device
- Type:
Any
Instantiates a species_system.
- Parameters:
species (
list[str] |str) – List of species names to be available in the constructed species_system (as list of strings or a comma separated string)t_min (
int) – Lower bound of the required temperature range in Kelvint_max (
int) – Upper bound of the required temperature range in Kelvinbackend (
str|ModuleType) – Array library used for the species_system: ‘numpy’, ‘jax’ or the module of a NumPy compatible array library (e.g. jax.numpy)device (
Optional[Any]) – Optional device for the JAX backend: A JAX device or a string like ‘cpu’, ‘gpu’ or ‘gpu:1’
- get_species_cp(t)#
Get the isobaric molar heat capacity for all species in the fluid system
- Parameters:
t (
float|ndarray[tuple[int,...],dtype[float64]]) – Temperature in Kelvin (can be an array)- Return type:
ndarray[tuple[int,...],dtype[float64]]- Returns:
Array with the heat capacities of each specie in J/mol/K
- get_species_g_rt(t)#
Get specific gibbs free energy divided by RT for all species in the fluid system (g/R/T == (h/T-s)/R )
- Parameters:
t (
float|ndarray[tuple[int,...],dtype[float64]]) – Temperature in Kelvin (can be an array)- Return type:
ndarray[tuple[int,...],dtype[float64]]- Returns:
Array of gibbs free energy divided by RT (dimensionless)
- get_species_h(t)#
Get the molar enthalpies for all species in the fluid system
- Parameters:
t (
float|ndarray[tuple[int,...],dtype[float64]]) – Temperature in Kelvin (can be an array)- Return type:
ndarray[tuple[int,...],dtype[float64]]- Returns:
Array with the enthalpies of each specie in J/mol
- get_species_references()#
Get a string with the references for all fluids of the fluid system
- Return type:
str- Returns:
String with the references
- get_species_s(t)#
Get the molar entropies for all species in the fluid system
- Parameters:
t (
float|ndarray[tuple[int,...],dtype[float64]]) – Temperature in Kelvin (can be an array)- Return type:
ndarray[tuple[int,...],dtype[float64]]- Returns:
Array with the entropies of each specie in J/mol/K