![]() |
Documentation 6b54b78464
|
Template class for fluid model definition using multi-layer perceptrons for fluid dynamic state definition. More...
#include <CDataDrivenFluid.hpp>
Public Member Functions | |
| CDataDrivenFluid (const CConfig *config, bool display=true) | |
| Constructor of the class. | |
| ~CDataDrivenFluid () | |
| void | SetTDState_rhoe (su2double rho, su2double e) override |
| Set the Dimensionless State using Density and Internal Energy. | |
| void | SetTDState_PT (su2double P, su2double T) override |
| Set the Dimensionless State using Pressure and Temperature. | |
| void | SetTDState_Prho (su2double P, su2double rho) override |
| Set the Dimensionless State using Pressure and Density. | |
| void | SetEnergy_Prho (su2double P, su2double rho) override |
| Set the Dimensionless Internal Energy using Pressure and Density. | |
| void | SetTDState_rhoT (su2double rho, su2double T) override |
| Set the Dimensionless Internal Energy using Pressure and Density. | |
| void | SetTDState_hs (su2double h, su2double s) override |
| Set the Dimensionless State using Enthalpy and Entropy. | |
| void | SetTDState_Ps (su2double P, su2double s) override |
| Set the Dimensionless State using Pressure and Entropy. | |
| void | ComputeDerivativeNRBC_Prho (su2double P, su2double rho) override |
| compute some derivatives of enthalpy and entropy needed for subsonic inflow BC | |
| unsigned long | GetExtrapolation () const override |
| Get fluid model extrapolation instance. | |
| unsigned long | GetnIter_Newton () override |
| Get number of Newton solver iterations. | |
Public Member Functions inherited from CFluidModel | |
| virtual | ~CFluidModel () |
| su2double | GetPressure () const |
| Get fluid pressure. | |
| su2double | GetTemperature () const |
| Get fluid temperature. | |
| su2double | GetEntropy () const |
| Get fluid entropy. | |
| su2double | GetStaticEnergy () const |
| Get fluid internal energy. | |
| su2double | GetEnthalpy () const |
| Get fluid enthalpy. | |
| su2double | GetDensity () const |
| Get fluid density. | |
| su2double | GetSoundSpeed () const |
| Get fluid speed of sound. | |
| su2double | GetSoundSpeed2 () const |
| Get fluid speed of sound squared. | |
| su2double | GetCp () const |
| Get fluid specific heat at constant pressure. | |
| su2double | GetCv () const |
| Get fluid specific heat at constant volume. | |
| virtual unsigned short | GetNScalars () const |
| Flamelet LUT - Get the number of transported scalars. | |
| virtual unsigned long | EvaluateDataSet (const vector< su2double > &input_scalar, unsigned short lookup_type, vector< su2double > &output_refs) |
| Evaluate data-set for flamelet or data-driven fluid simulations. | |
| virtual su2double | GetLaminarViscosity () |
| Get fluid dynamic viscosity. | |
| virtual su2double | GetThermalConductivity () |
| Get fluid thermal conductivity. | |
| virtual su2double | GetMassDiffusivity (int iVar) |
| Get fluid mass diffusivity. | |
| virtual void | GetEnthalpyDiffusivity (su2double *enthalpy_diffusions=nullptr) const |
| Get the enthalpy diffusivity terms for all species being solved. | |
| virtual void | GetGradEnthalpyDiffusivity (su2double *grad_enthalpy_diffusions=nullptr) const |
| Get the gradient of enthalpy diffusivity terms for all species being solved. | |
| su2double | GetdPdrho_e () const |
| Get fluid pressure partial derivative. | |
| su2double | GetdPde_rho () const |
| Get fluid pressure partial derivative. | |
| su2double | GetdTdrho_e () const |
| Get fluid temperature partial derivative. | |
| su2double | GetdTde_rho () const |
| Get fluid temperature partial derivative. | |
| su2double | Getdhdrho_P () const |
| Get fluid enthalpy partial derivative. | |
| su2double | GetdhdP_rho () const |
| Get fluid enthalpy partial derivative. | |
| su2double | Getdsdrho_P () const |
| Get fluid entropy partial derivative. | |
| su2double | GetdsdP_rho () const |
| Get fluid entropy partial derivative. | |
| su2double | Getdmudrho_T () |
| Get fluid dynamic viscosity partial derivative. | |
| su2double | GetdmudT_rho () |
| Get fluid dynamic viscosity partial derivative. | |
| su2double | Getdktdrho_T () const |
| Get fluid thermal conductivity partial derivative. | |
| su2double | GetdktdT_rho () const |
| Get fluid thermal conductivity partial derivative. | |
| virtual void | SetCpModel (const CConfig *config, su2double val_Temperature_Ref) |
| Set specific heat Cp model. | |
| virtual void | SetLaminarViscosityModel (const CConfig *config) |
| Set viscosity model. | |
| virtual void | SetThermalConductivityModel (const CConfig *config) |
| Set thermal conductivity model. | |
| virtual void | SetMassDiffusivityModel (const CConfig *config) |
| Set mass diffusivity model. | |
| virtual void | SetTDState_T (su2double val_Temperature, const su2double *val_scalars=nullptr) |
| Virtual member. | |
| virtual void | SetTDState_h (su2double val_enthalpy, const su2double *val_scalars=nullptr) |
| Virtual member. | |
| void | SetEddyViscosity (su2double val_Mu_Turb) |
| Set fluid eddy viscosity provided by a turbulence model needed for computing effective thermal conductivity. | |
| void | SetPressure (su2double val_pressure) |
| Set the thermodynamic pressure of the incompressible fluid models. | |
| virtual bool | GetPreferentialDiffusion () const |
| Get the state of the Preferential diffusion model for flamelet simulations. | |
Protected Member Functions | |
| void | MapInputs_to_Outputs () |
| Map dataset variables to specific look-up operations. | |
| unsigned long | Predict_MLP (su2double rho, su2double e) |
| Evaluate dataset through multi-layer perceptron. | |
| unsigned long | Predict_LUT (su2double rho, su2double e) |
| Evaluate dataset through look-up table. | |
| void | Evaluate_Dataset (su2double rho, su2double e) |
| Evaluate the data set. | |
| void | Run_Newton_Solver (const su2double Y1_target, const su2double Y2_target, const su2double &Y1, const su2double &Y2, const su2double &dY1drho, const su2double &dY1de, const su2double &dY2drho, const su2double &dY2de) |
| 2D Newton solver for computing the density and energy corresponding to Y1_target and Y2_target. | |
| void | Run_Newton_Solver (const su2double Y_target, const su2double &Y, su2double &X, const su2double &dYdX) |
| 1D Newton solver for computing the density or energy corresponding to Y_target. | |
| void | ComputeIdealGasQuantities () |
Protected Attributes | |
| int | rank {MASTER_NODE} |
| MPI Rank. | |
| ENUM_DATADRIVEN_METHOD | Kind_DataDriven_Method |
| Interpolation method for data set evaluation. | |
| string | varname_rho |
| Controlling variable name for density. | |
| string | varname_e |
| Controlling variable name for static energy. | |
| su2double | Newton_Relaxation |
| Relaxation factor for Newton solvers. | |
| su2double | rho_start |
| Starting value for the density in Newton solver processes. | |
| su2double | e_start |
| Starting value for the energy in Newton solver processes. | |
| su2double | rho_query |
| su2double | e_query |
| su2double | Newton_Tolerance |
| Normalized tolerance for Newton solvers. | |
| su2double | rho_min |
| su2double | rho_max |
| Minimum and maximum density values in data set. | |
| su2double | e_min |
| su2double | e_max |
| Minimum and maximum energy values in data set. | |
| unsigned long | MaxIter_Newton |
| Maximum number of iterations for Newton solvers. | |
| su2double | dsde_rho |
| Entropy derivative w.r.t. density. | |
| su2double | dsdrho_e |
| Entropy derivative w.r.t. static energy. | |
| su2double | d2sde2 |
| Entropy second derivative w.r.t. static energy. | |
| su2double | d2sdedrho |
| Entropy second derivative w.r.t. density and static energy. | |
| su2double | d2sdrho2 |
| Entropy second derivative w.r.t. static density. | |
| su2double | Enthalpy |
| Fluid enthalpy value [J kg^-1]. | |
| su2double | dhdrho_e |
| Enthalpy derivative w.r.t. density. | |
| su2double | dhde_rho |
| Enthalpy derivative w.r.t. static energy. | |
| vector< string > | output_names_rhoe |
| Output variable names listed in the data-driven method input file name. | |
| vector< su2double * > | outputs_rhoe |
| Pointers to output variables. | |
| vector< vector< su2double * > > | dsdrhoe |
| Entropy Jacobian terms. | |
| vector< vector< vector< su2double * > > > | d2sdrhoe2 |
| Entropy Hessian terms. | |
| bool | use_MLP_derivatives |
| Use physics-informed model. | |
| bool | display_Newton_process {false} |
| vector< su2double > | MLP_inputs |
| Inputs for the multi-layer perceptron look-up operation. | |
| MiniTable2D | coarse_TD_table |
| Small thermodynamic table used to identify the starting point of the Newton solver processes. | |
| const size_t | iRho {0} |
| const size_t | iE {1} |
| const size_t | iP {2} |
| const size_t | iT {3} |
| su2vector< su2double > | vals_rho_table |
| su2vector< su2double > | vals_e_table |
| CLookUpTable * | lookup_table |
| Look-up table regression object. | |
| unsigned long | LUT_idx_s |
| unsigned long | LUT_idx_dsde_rho |
| unsigned long | LUT_idx_dsdrho_e |
| unsigned long | LUT_idx_d2sde2 |
| unsigned long | LUT_idx_d2sdedrho |
| unsigned long | LUT_idx_d2sdrho2 |
| vector< unsigned long > | LUT_lookup_indices |
| unsigned long | outside_dataset |
| Density-energy combination lies outside data set. | |
| unsigned long | nIter_Newton |
| Number of Newton solver iterations. | |
Protected Attributes inherited from CFluidModel | |
| su2double | StaticEnergy {0.0} |
| Internal Energy. | |
| su2double | Enthalpy {0.0} |
| Enthalpy. | |
| su2double | Entropy {0.0} |
| Entropy. | |
| su2double | Density {0.0} |
| Density. | |
| su2double | Pressure {0.0} |
| Pressure. | |
| su2double | SoundSpeed2 {0.0} |
| SpeedSound. | |
| su2double | Temperature {0.0} |
| Temperature. | |
| su2double | dPdrho_e {0.0} |
| DpDd_e. | |
| su2double | dPde_rho {0.0} |
| DpDe_d. | |
| su2double | dTdrho_e {0.0} |
| DTDd_e. | |
| su2double | dTde_rho {0.0} |
| DTDe_d. | |
| su2double | dhdrho_P {0.0} |
| DhDrho_p. | |
| su2double | dhdP_rho {0.0} |
| DhDp_rho. | |
| su2double | dsdrho_P {0.0} |
| DsDrho_p. | |
| su2double | dsdP_rho {0.0} |
| DsDp_rho. | |
| su2double | Cp {0.0} |
| Specific Heat Capacity at constant pressure. | |
| su2double | Cv {0.0} |
| Specific Heat Capacity at constant volume. | |
| su2double | Mu {0.0} |
| Laminar viscosity. | |
| su2double | Mu_Turb {0.0} |
| Eddy viscosity provided by a turbulence model. | |
| su2double | dmudrho_T {0.0} |
| Partial derivative of viscosity w.r.t. density. | |
| su2double | dmudT_rho {0.0} |
| Partial derivative of viscosity w.r.t. temperature. | |
| su2double | Kt {0.0} |
| Thermal conductivity. | |
| su2double | dktdrho_T {0.0} |
| Partial derivative of conductivity w.r.t. density. | |
| su2double | dktdT_rho {0.0} |
| Partial derivative of conductivity w.r.t. temperature. | |
| su2double | mass_diffusivity {0.0} |
| Mass Diffusivity. | |
| unique_ptr< CViscosityModel > | LaminarViscosity |
| Laminar Viscosity Model. | |
| unique_ptr< CConductivityModel > | ThermalConductivity |
| Thermal Conductivity Model. | |
| unique_ptr< CDiffusivityModel > | MassDiffusivity |
| Mass Diffusivity Model. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from CFluidModel | |
| static unique_ptr< CViscosityModel > | MakeLaminarViscosityModel (const CConfig *config, unsigned short iSpecies) |
| Instantiate the right type of viscosity model based on config. | |
| static unique_ptr< CConductivityModel > | MakeThermalConductivityModel (const CConfig *config, unsigned short iSpecies) |
| Instantiate the right type of conductivity model based on config. | |
| static unique_ptr< CDiffusivityModel > | MakeMassDiffusivityModel (const CConfig *config, unsigned short iSpecies) |
| Instantiate the right type of mass diffusivity model based on config. | |
Template class for fluid model definition using multi-layer perceptrons for fluid dynamic state definition.
| CDataDrivenFluid::CDataDrivenFluid | ( | const CConfig * | config, |
| bool | display = true |
||
| ) |
Constructor of the class.
| CDataDrivenFluid::~CDataDrivenFluid | ( | ) |
compute some derivatives of enthalpy and entropy needed for subsonic inflow BC
| [in] | InputSpec | - Input pair for FLP calls ("Pv"). |
| [in] | th1 | - first thermodynamic variable (P). |
| [in] | th2 | - second thermodynamic variable (v). |
Reimplemented from CFluidModel.
|
protected |
Evaluate the data set.
| [in] | rho | - Density value. |
| [in] | e | - Static energy value. |
|
inlineoverridevirtual |
Get fluid model extrapolation instance.
Reimplemented from CFluidModel.
|
inlineoverridevirtual |
Get number of Newton solver iterations.
Reimplemented from CFluidModel.
|
protected |
Map dataset variables to specific look-up operations.
Evaluate dataset through look-up table.
| [in] | rho | - Density value. |
| [in] | e | - Static energy value. |
Evaluate dataset through multi-layer perceptron.
| [in] | rho | - Density value. |
| [in] | e | - Static energy value. |
|
protected |
2D Newton solver for computing the density and energy corresponding to Y1_target and Y2_target.
| [in] | Y1_target | - Target value for output quantity 1. |
| [in] | Y2_target | - Target value for output quantity 2. |
| [in] | Y1 | - Pointer to output quantity 1. |
| [in] | Y2 | - Pointer to output quantity 2. |
| [in] | dY1drho | - Pointer to the partial derivative of quantity 1 w.r.t. density at constant energy. |
| [in] | dY1de | - Pointer to the partial derivative of quantity 1 w.r.t. energy at constant density. |
| [in] | dY2drho | - Pointer to the partial derivative of quantity 2 w.r.t. density at constant energy. |
| [in] | dY2de | - Pointer to the partial derivative of quantity 2 w.r.t. energy at constant density. |
|
protected |
1D Newton solver for computing the density or energy corresponding to Y_target.
| [in] | Y_target | - Target quantity value. |
| [in] | Y | - Pointer to output quantity. |
| [in] | X | - Pointer to controlling variable (density or energy). |
| [in] | dYdX | - Pointer to the partial derivative of target quantity w.r.t. controlling variable. |
Set the Dimensionless Internal Energy using Pressure and Density.
| [in] | P | - first thermodynamic variable (pressure). |
| [in] | rho | - second thermodynamic variable (density). |
Reimplemented from CFluidModel.
Set the Dimensionless State using Enthalpy and Entropy.
| [in] | h | - first thermodynamic variable (h). |
| [in] | s | - second thermodynamic variable (s). |
Reimplemented from CFluidModel.
Set the Dimensionless State using Pressure and Density.
| [in] | P | - first thermodynamic variable (pressure). |
| [in] | rho | - second thermodynamic variable (density). |
Reimplemented from CFluidModel.
Set the Dimensionless State using Pressure and Entropy.
| [in] | P | - first thermodynamic variable (P). |
| [in] | s | - second thermodynamic variable (s). |
Reimplemented from CFluidModel.
Set the Dimensionless State using Pressure and Temperature.
| [in] | P | - first thermodynamic variable (pressure). |
| [in] | T | - second thermodynamic variable (temperature). |
Reimplemented from CFluidModel.
Set the Dimensionless State using Density and Internal Energy.
| [in] | rho | - first thermodynamic variable (density). |
| [in] | e | - second thermodynamic variable (static energy). |
Reimplemented from CFluidModel.
Set the Dimensionless Internal Energy using Pressure and Density.
| [in] | rho | - second thermodynamic variable (density). |
Reimplemented from CFluidModel.
|
protected |
Small thermodynamic table used to identify the starting point of the Newton solver processes.
|
protected |
Entropy second derivative w.r.t. static energy.
|
protected |
Entropy second derivative w.r.t. density and static energy.
|
protected |
Entropy second derivative w.r.t. static density.
|
protected |
Entropy Hessian terms.
|
protected |
Enthalpy derivative w.r.t. static energy.
|
protected |
Enthalpy derivative w.r.t. density.
|
protected |
|
protected |
Entropy derivative w.r.t. density.
|
protected |
Entropy derivative w.r.t. static energy.
|
protected |
Entropy Jacobian terms.
|
protected |
Minimum and maximum energy values in data set.
|
protected |
|
protected |
|
protected |
Starting value for the energy in Newton solver processes.
|
protected |
Fluid enthalpy value [J kg^-1].
|
protected |
|
protected |
|
protected |
|
protected |
Indices of thermodynamic variables in the table.
|
protected |
Interpolation method for data set evaluation.
|
protected |
Look-up table regression object.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Maximum number of iterations for Newton solvers.
|
protected |
Inputs for the multi-layer perceptron look-up operation.
|
protected |
Relaxation factor for Newton solvers.
|
protected |
Normalized tolerance for Newton solvers.
|
protected |
Number of Newton solver iterations.
|
protected |
Output variable names listed in the data-driven method input file name.
|
protected |
Pointers to output variables.
|
protected |
Density-energy combination lies outside data set.
|
protected |
MPI Rank.
|
protected |
Minimum and maximum density values in data set.
|
protected |
|
protected |
|
protected |
Starting value for the density in Newton solver processes.
|
protected |
Use physics-informed model.
Density and static energy values of the table nodes.
|
protected |
Controlling variable name for static energy.
|
protected |
Controlling variable name for density.