SU2 DataMiner Configuration for NICFD#
The following section describes the most important SU2 DataMiner configuration class functions for NICFD applications. SU2 DataMiner uses CoolProp abstract state to calculate thermodynamic states. The equation of state used by CoolProp can be set to the Helmholtz equation of state (“HEOS”) or RefProp (“REFPROP”) if a local installation of RefProp is detected. A warning is raised if the equation of state model is not recognized by CoolProp.
Equation of State and Fluid#
- SetEquationOfState(self, EOS_type_in: str = 'HEOS')#
Define the equation of state backend used by CoolProp to generate fluid data.
- Parameters:
EOS_type_in (str, optional) – backend used by CoolProp, defaults to “HEOS”
- Raises:
Exception – if the specified backend is not supported.
The fluid for which thermodynamic states are generated is specified with the following function. The available list of fluids supported by CoolProp can be retrieved by running the following code snippet:
from CoolProp.CoolProp import get_global_param_string
fluids = get_global_param_string("FluidsList").split(',')
print(fluids)
Note
Support for mixtures of fluids has not yet been validated.
- SetFluid(self, fluid_name='Air')#
Define the fluid name used for entropic data generation. By default, “Air” is used. Specify a list of fluids for mixtures.
- Parameters:
fluid_name (str or list[str]) – CoolProp fluid name or list of names.
- Raise:
Exception: If the fluid could not be defined in CoolProp.
Range of the Thermodynamic State Data#
The following functions are used for setting the limits within which thermodynamic states are generated. By default, the limits of the fluid data are automatically determined based on the temperature and pressure limits supported by CoolProp.
- UseAutoRange(self, use_auto_range: bool = True)#
Automatically determine the span of the thermodynamic state space for which fluid data are generated.
- Parameters:
use_auto_range (bool, optional) – automatically set fluid data range, defaults to True
The fluid data can be generated on a pressure-termperature grid or a density-static energy grid.
- UsePTGrid(self, PT_grid: bool = False)#
Define fluid data grid in the pressure-temperature space. If not, the fluid data grid is defined in the density-energy space.
- Parameters:
PT_grid (bool, optional) – use pressure-temperature based grid, defaults to False
- GetPTGrid(self)#
Get the fluid data grid definition.
- Returns:
Fluid data grid definition (pressure-temperature based = True, density-energy-based = False).
- Return type:
bool
The limits of the fluid data grid are set with the following functions
- SetTemperatureBounds(self, T_lower: float = 300, T_upper: float = 600)#
Set the upper and lower temperature limits between which fluid data are generated.
- Parameters:
T_lower (float) – lower temperature limit in Kelvin.
T_upper (float) – upper temperature limit in Kelvin.
- Raises:
Exception – if lower temperature limit exceeds upper temperature limit.
- SetPressureBounds(self, P_lower: float = 20000.0, P_upper: float = 2000000.0)#
Set the upper and lower limits for the fluid pressure.
- Parameters:
P_lower (float) – lower pressure limit in Pa.
P_upper (float) – upper pressure limit in Pa.
- Raises:
Exception – if lower pressure limit exceeds upper pressure limit.
- SetEnergyBounds(self, E_lower: float = 300000.0, E_upper: float = 550000.0)#
Define the internal energy bounds of the density-energy based fluid data grid.
- Parameters:
E_lower (float, optional) – lower limit internal energy value, defaults to DefaultSettings_NICFD.Energy_min
E_upper (float, optional) – upper limit for internal energy, defaults to DefaultSettings_NICFD.Energy_max
- Raises:
Exception – if lower value for internal energy exceeds upper value.
- SetDensityBounds(self, Rho_lower: float = 0.5, Rho_upper: float = 300)#
Define the density bounds of the density-energy based fluid data grid.
- Parameters:
Rho_lower (float, optional) – lower limit density value in kg/m3, defaults to DefaultSettings_NICFD.Rho_min
Rho_upper (float, optional) – upper limit for density in kg/m3, defaults to DefaultSettings_NICFD.Rho_max
- Raises:
Exception – if lower value for density exceeds upper value.
Resolution#
Fluid data are generated on a 2D grid (density-energy or pressure-temperature), for which the number of samples along each direction is set with the following functions A linear distribution is used for the temperature and static energy dimension of the data grid, while a cosine distribution is used for the density or pressure dimension to increase the density of the data sets in dilute conditions. The following distribution was used
where \(x_{\mathrm{min}}\) and \(x_{\mathrm{max}}\) are the lower and upper bound values.
- SetNpTemp(self, Np_Temp: int = 600)#
Set number of divisions for the temperature grid.
- Parameters:
Np_Temp (int) – Number of divisions for the temperature range.
- Rase:
Exception: If the number of divisions is lower than 2.
- SetNpPressure(self, Np_P: int = 700)#
Set number of divisions for the fluid pressure grid.
- Parameters:
Np_Temp (int) – Number of divisions for the fluid pressure.
- Rase:
Exception: If the number of divisions is lower than two.
- SetNpEnergy(self, Np_Energy: int = 600)#
Set the number of data points along the energy axis of the fluid data grid.
- Parameters:
Np_Energy (int, optional) – number of divisions between the lower and upper internal energy values, defaults to DefaultSettings_NICFD.Np_temp
- Raises:
Exception – if fewer than two nodes are set.
- SetNpDensity(self, Np_rho: int = 700)#
Set the number of data points along the density axis of the fluid data grid.
- Parameters:
Np_rho (int, optional) – number of divisions between the lower and upper density values, defaults to DefaultSettings_NICFD.Np_p
- Raises:
Exception – if fewer than two nodes are set.
Machine Learning#
SU2 DataMiner can be used to train networks according to the EEoS-PINN method documented in Bunschoten et al. (2026). The training loss function is the fitting loss of a set of thermodynamic variables. By default, these are entropy, pressure, temperature, and the speed of sound, but a custom set can be accessed with the following function.
- SetStateVars(self, state_vars_in: list[str])#
Set the state variables for which the physics-informed neural network is trained.
- Parameters:
state_vars_in (list[str]) – list with state variable names.
- Raises:
Exception – if any of the state variables is not supported.
- GetStateVars(self)#
Return the list of state variable names for which the physics-informed MLP is trained.
- Returns:
list of state variable names.
- Return type:
list[str]
References#
E.Bunschoten, A.Cappiello, M.Pini “Data-driven regression of thermodynamic models in entropic form using physics-informed machine learning”. In: Computers and Fluids 306 (2026), DOI:https://doi.org/10.1016/j.compfluid.2025.106932