|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Device-callable view of physics parameters providing thermodynamic operations. More...
#include <EulerP_Physics.hpp>
Public Member Functions | |
| template<class tUPrim , class tDiffUPrim > | |
| DNDS_DEVICE_CALLABLE real | getMuTot (tUPrim &&UPrim, tDiffUPrim &&DiffUPrim, int nVars, real p, real T) const |
| Computes the total dynamic viscosity. | |
| template<class tUPrim , class tU > | |
| DNDS_DEVICE_CALLABLE void | Cons2Prim (tU &&U, tUPrim &&UPrim, int nVars) const |
| Converts conservative state to primitive state. | |
| template<class tU , class tUPrim , class tDiffU , class tDiffUPrim > | |
| DNDS_DEVICE_CALLABLE void | Cons2PrimDiff (tU &&U, tUPrim &&UPrim, tDiffU &&DiffU, tDiffUPrim &&DiffUPrim, int nVars) const |
| Converts conservative variable gradients to primitive variable gradients. | |
| template<class tUPrim , class tU > | |
| DNDS_DEVICE_CALLABLE void | Prim2Cons (tUPrim &&UPrim, tU &&U, int nVars) const |
| Converts primitive state to conservative state. | |
| template<class tU > | |
| DNDS_DEVICE_CALLABLE real | Cons2EInternal (tU &&U, int nVars) const |
| Extracts internal energy from a conservative state vector. | |
| template<class tUPrim > | |
| DNDS_DEVICE_CALLABLE real | Prim2Pressure (tUPrim &&UPrim, int nVars, real T) const |
| Computes pressure from the primitive state using the ideal gas law. | |
| template<class tUPrim > | |
| DNDS_DEVICE_CALLABLE auto | Prim2GammaAcousticSpeed (tUPrim &&UPrim, int nVars, real p) const |
| Computes the ratio of specific heats and the acoustic speed of sound. | |
| template<class tUPrim > | |
| DNDS_DEVICE_CALLABLE real | Prim2Temperature (tUPrim &&UPrim, int nVars) const |
| Computes temperature from the primitive state. | |
| template<class tU > | |
| DNDS_DEVICE_CALLABLE real | Pressure2Enthalpy (tU &&U, int nVars, real p) const |
| Computes specific total enthalpy from conservative state and pressure. | |
| template<class tU > | |
| DNDS_DEVICE_CALLABLE real | Enthalpy2Pressure (tU &&U, int nVars, real H) const |
| Recovers pressure from specific total enthalpy and conservative state. | |
Public Attributes | |
| vector_DeviceView< B, real, int32_t > | reference_values |
| Device-resident reference values (e.g., freestream quantities). | |
| PhysicsParams | params |
| Gas physical parameters (copied to device). | |
Device-callable view of physics parameters providing thermodynamic operations.
Wraps a device-resident view of reference values and a copy of PhysicsParams. All methods are DNDS_DEVICE_CALLABLE for use in both Host and CUDA kernels.
| B | Device backend (Host or CUDA). |
Definition at line 63 of file EulerP_Physics.hpp.
|
inline |
Extracts internal energy from a conservative state vector.
Computes e = E - 0.5 * (rhoU^2 + rhoV^2 + rhoW^2) / rho.
| tU | Conservative state vector type (deduced). |
| U | Conservative state vector. |
| nVars | Total number of variables (flow + turbulence). |
Definition at line 222 of file EulerP_Physics.hpp.
|
inline |
Converts conservative state to primitive state.
Computes primitive variables from conservative variables:
| tUPrim | Primitive state vector type (deduced). |
| tU | Conservative state vector type (deduced). |
| U | Input conservative state vector. | |
| [out] | UPrim | Output primitive state vector. |
| nVars | Total number of variables (flow + turbulence). |
Definition at line 112 of file EulerP_Physics.hpp.
|
inline |
Converts conservative variable gradients to primitive variable gradients.
Given conservative state U, primitive state UPrim, and conservative gradient DiffU, computes the corresponding primitive gradient DiffUPrim using the chain rule:
| tU | Conservative state type (deduced). |
| tUPrim | Primitive state type (deduced). |
| tDiffU | Conservative gradient type (deduced), 3 x nVars. |
| tDiffUPrim | Primitive gradient type (deduced), 3 x nVars. |
| U | Conservative state vector. | |
| UPrim | Primitive state vector (must be pre-computed via Cons2Prim). | |
| DiffU | Conservative variable spatial gradients (3 rows = x,y,z directions). | |
| [out] | DiffUPrim | Output primitive variable spatial gradients. |
| nVars | Total number of variables (flow + turbulence). |
Definition at line 149 of file EulerP_Physics.hpp.
|
inline |
Recovers pressure from specific total enthalpy and conservative state.
p = H * rho - E (inverse of Pressure2Enthalpy).
| tU | Conservative state vector type (deduced). |
| U | Conservative state vector. |
| nVars | Total number of variables. |
| H | Specific total enthalpy. |
perfect gas here
Definition at line 324 of file EulerP_Physics.hpp.
|
inline |
Computes the total dynamic viscosity.
Currently returns only the physical viscosity (no RANS turbulence model contribution).
| tUPrim | Primitive state vector type (deduced). |
| tDiffUPrim | Primitive state gradient type (deduced). |
| UPrim | Primitive state vector (unused in current constant-viscosity model). |
| DiffUPrim | Primitive gradient (unused in current constant-viscosity model). |
| nVars | Total number of variables (flow + turbulence). |
| p | Pressure (unused in current model). |
| T | Temperature (unused in current model). |
Definition at line 85 of file EulerP_Physics.hpp.
|
inline |
Computes specific total enthalpy from conservative state and pressure.
H = (E + p) / rho, using IdealGas::Enthalpy.
| tU | Conservative state vector type (deduced). |
| U | Conservative state vector. |
| nVars | Total number of variables. |
| p | Pressure. |
perfect gas here
Definition at line 305 of file EulerP_Physics.hpp.
|
inline |
Converts primitive state to conservative state.
Inverse of Cons2Prim:
| tUPrim | Primitive state vector type (deduced). |
| tU | Conservative state vector type (deduced). |
| UPrim | Input primitive state vector. | |
| [out] | U | Output conservative state vector. |
| nVars | Total number of variables (flow + turbulence). |
Definition at line 193 of file EulerP_Physics.hpp.
|
inline |
Computes the ratio of specific heats and the acoustic speed of sound.
| tUPrim | Primitive state vector type (deduced). |
| UPrim | Primitive state vector. |
| nVars | Total number of variables. |
| p | Pressure. |
Definition at line 268 of file EulerP_Physics.hpp.
|
inline |
Computes pressure from the primitive state using the ideal gas law.
Delegates to IdealGas::Pressure_From_InternalEnergy using prim[I4] (internal energy) and the ratio of specific heats gamma.
| tUPrim | Primitive state vector type (deduced). |
| UPrim | Primitive state vector (prim[I4] = internal energy). |
| nVars | Total number of variables. |
| T | Temperature (unused; pressure is computed from internal energy directly). |
perfect gas here — prim[I4] stores internal energy e
Definition at line 251 of file EulerP_Physics.hpp.
|
inline |
Computes temperature from the primitive state.
For a perfect gas: T = e / (rho * cp), where e = prim[I4] is internal energy.
| tUPrim | Primitive state vector type (deduced). |
| UPrim | Primitive state vector. |
| nVars | Total number of variables. |
perfect gas here
Definition at line 286 of file EulerP_Physics.hpp.
| PhysicsParams DNDS::EulerP::PhysicsDeviceView< B >::params |
Gas physical parameters (copied to device).
Definition at line 66 of file EulerP_Physics.hpp.
| vector_DeviceView<B, real, int32_t> DNDS::EulerP::PhysicsDeviceView< B >::reference_values |
Device-resident reference values (e.g., freestream quantities).
Definition at line 65 of file EulerP_Physics.hpp.