|
Neko 1.99.6
A portable framework for high-order spectral element flow simulations
|
This implements CPU-based residual calculations for the compressible equations. It handles the time advancement of primitive variables using Runge-Kutta methods and evaluates the right-hand side terms of the compressible equations including artificial viscosity.
Data Types | |
| type | compressible_res_cpu_t |
Functions/Subroutines | |
| subroutine | advance_primitive_variables_cpu (rho_field, m_x, m_y, m_z, e, p, u, v, w, ax, ax_stress, coef, gs, h, artificial_visc, mu, kappa, bcs_vel, time, rk_scheme, dt) |
| Advances the primitive variables (density, momentum, energy) in time using a Runge-Kutta scheme. | |
| subroutine | evaluate_rhs_cpu (rhs_rho_field, rhs_m_x, rhs_m_y, rhs_m_z, rhs_e, rho_field, m_x, m_y, m_z, e, p, u, v, w, ax, ax_stress, coef, gs, h, artificial_visc, mu, kappa) |
| Evaluates the right-hand side of the compressible equations. Inviscid terms are evaluated through div(). Stabilization is always the existing scalar Laplacian. In navier-stokes mode, physical mu and kappa add a separate compressible Navier-Stokes viscous flux. | |
| subroutine | add_navier_stokes_flux_cpu (visc_m_x, visc_m_y, visc_m_z, visc_e, rho_field, p, u, v, w, mu, kappa, ax, ax_stress, coef) |
| Add the physical Navier-Stokes flux contribution to the viscous residual. | |
Variables | |
| logical | compressible_res_cpu_add_physical_flux = .false. |
| Whether physical Navier-Stokes fluxes are active for the current step. | |
| logical | compressible_res_cpu_add_physical_stress = .false. |
| Whether physical viscous stress is active for the current step. | |
| real(kind=rp), public | compressible_res_cpu_gamma = 1.4_rp |
| Module variable to store thermodynamic parameter set by factory. | |
|
private |
| visc_m_x | Viscous residual for x-momentum. |
| visc_m_y | Viscous residual for y-momentum. |
| visc_m_z | Viscous residual for z-momentum. |
| visc_E | Viscous residual for total energy. |
| rho_field | Density field. |
| p | Pressure field. |
| u | X-velocity field. |
| v | Y-velocity field. |
| w | Z-velocity field. |
| mu | Dynamic viscosity field. |
| kappa | Thermal conductivity field. |
| Ax | Matrix-vector product operator for scalar diffusion. |
| Ax_stress | Matrix-vector product operator for full stress. |
| coef | Spatial discretization coefficients. |
Definition at line 511 of file compressible_res_cpu.f90.


|
private |
| rho_field | Density field |
| m_x,m_y,m_z | Momentum components |
| E | Total energy |
| p | Pressure field |
| u,v,w | Velocity components |
| Ax | Matrix-vector product operator |
| coef | Coefficients for spatial discretization |
| gs | Gather-scatter operator for parallel communication |
| h | Mesh size field |
| artificial_visc | Artificial viscosity field (entropy viscosity, min with low-order) |
| mu | Dynamic viscosity field (physical viscosity for momentum) |
| kappa | Thermal conductivity field (physical viscosity for energy) |
| bcs_vel | Velocity boundary conditions |
| time | Current time state |
| rk_scheme | Runge-Kutta time integration scheme |
| dt | Time step size |
Definition at line 89 of file compressible_res_cpu.f90.

|
private |
| rhs_rho_field | Output array for density RHS terms |
| rhs_m_x | Output array for x-momentum RHS terms |
| rhs_m_y | Output array for y-momentum RHS terms |
| rhs_m_z | Output array for z-momentum RHS terms |
| rhs_E | Output array for energy RHS terms |
| rho_field | Input density field |
| m_x | Input x-momentum field |
| m_y | Input y-momentum field |
| m_z | Input z-momentum field |
| E | Input total energy field |
| p | Input pressure field |
| u | Input x-velocity field |
| v | Input y-velocity field |
| w | Input z-velocity field |
| Ax | Matrix-vector product operator for Laplacian terms |
| coef | Spatial discretization coefficients |
| gs | Gather-scatter operator for parallel communication |
| h | Mesh size field |
| artificial_visc | Artificial viscosity field |
| mu | Dynamic viscosity field for physical momentum diffusion |
| kappa | Thermal conductivity field for physical energy diffusion |
rho = rho - dt * div(m)
m = m - dt * div(rho * u * u^T + p*I)
E = E - dt * div(u * (E + p))
Definition at line 317 of file compressible_res_cpu.f90.


| logical compressible_res_cpu::compressible_res_cpu_add_physical_flux = .false. |
Definition at line 63 of file compressible_res_cpu.f90.
|
private |
Definition at line 65 of file compressible_res_cpu.f90.