gaspype.fluid_system#
- class gaspype.fluid_system(species, t_min=250, t_max=2000, backend='numpy', device=None)#
Bases:
species_systemA class to represent a fluid_system defined by a set of selected species.
- species#
List of selected species in the fluid_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 fluid_system
- Type:
FloatArray
- array_species_elements#
Array of the element composition of the species in the fluid_system. Dimension is: (number of species, number of elements)
- Type:
FloatArray
- array_atomic_mass#
Array of the atomic masses of the elements in the fluid_system
- Type:
FloatArray
- array_stoichiometric_coefficients#
Array of the stoichiometric coefficients of a minimal set of reactions between the species. Dimension is: (number of reactions, number of species)
- Type:
FloatArray
- np#
Array namespace of the backend, used for all arrays and calculations of the fluid_system and of the fluids and elements based on it
- Type:
ModuleType
- device#
JAX device of the arrays or None for the default device
- Type:
Any
Instantiates a fluid_system.
- Parameters:
species (
list[str] |str) – List of species names to be available in the constructed fluid_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 fluid_system and for all fluids and elements based on it: ‘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