Section author: Evert Bunschoten
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, defaults to DefaultSettings_NICFD.Rho_min
Rho_upper (float, optional) – upper limit for density, defaults to DefaultSettings_NICFD.Rho_max
- Raises:
Exception – if lower value for density exceeds upper value.
Phases and transport properties#
Thermophysical state data can be generated at various phases. The following functions can be used to specify in which phases thermophysical state data are included in the data generation process. SU2 DataMiner currently only supports the inclusion of fluid data in the gaseous, liquid, two-phase, supercritical, supercritical gas, and supercritical liquid phases. Information about the phase data can be accessed with the following functions.
- EnableGasPhase(self, gas_phase: bool = True)#
Include thermophysical state data from the fluid in gas phase
- Parameters:
gas_phase (bool, optional) – include gas phase data, defaults to True
- EnableLiquidPhase(self, liquid_phase: bool = False)#
Include thermodynamic state data from fluid in the liquid phase.
- Parameters:
liquid_phase (bool, optional) – include liquid-phase data, defaults to False
- EnableSuperCritical(self, supercritical: bool = True)#
Include thermophysical state data of the fluid in supercritial, and of the supercritical gas and liquid phase if specified.
- Parameters:
supercritical (bool, optional) – include supercritical phase data, defaults to True
- GasPhase(self)#
Whether thermophysical state data from the fluid in the gaseous phase are included.
- Returns:
inclusion of gas phase data.
- Return type:
bool
- LiquidPhase(self)#
Whether thermophysical state data from the fluid in the liquid phase are included.
- Returns:
inclusion of liquid phase data.
- Return type:
bool
- SuperCritical(self)#
Whether thermophysical state data from the fluid in the supercritical phases are included.
- Returns:
inclusion of supercritical phase data.
- Return type:
bool
Transport properties can also be included in the fluid data set. Currently, these are limited to the fluid thermal conductivity, dynamic viscosity, and vapor quality. Information on whether transport properties are included in the fluid data set can be accessed with the following functions:
- IncludeTransportProperties(self, calc_transport_properties: bool = False)#
Include transport properties in fluid data calculation
- Parameters:
calc_transport_properties (bool, optional) – evaluate transport properties, defaults to False
- CalcTransportProperties(self)#
Whether transport properties are included in the fluid data set.
- Returns:
calculation of transport properties.
- Return type:
bool
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]
Tabulation#
In addition to the EEoS-PINN method, thermophysical state information can also be stored in look-up tables. The thermodynamic state space can be discretized with a Cartesian method or with an adaptive method. With the Cartesian method, the thermodynamic state space is divided into equally sized, rectangular cells in the density-static energy space. The number of cells along the density and energy axes are specified with the setters for thermodynamic state space resolution. With the adaptive method, the thermodynamic state space is divided into triangular elements and can be locally refined in areas of interest such as around the saturation curve. For both methods, the limits of the table can be specified with the setters for the density and static energy ranges.
Information on the table discretization method can be accessed with the following functions:
- SetTableDiscretization(self, table_method: str = 'cartesian')#
Specify how thermodynamic state space is discretized for look-up table.
- Parameters:
table_method (str, optional) – discretization method, defaults to “cartesian”
- Raises:
Exception – if method is not supported
- GetTableDiscretization(self)#
Get thermodynamic state space discretization method.
- Returns:
table discretization method.
- Return type:
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