Neko 1.99.6
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
compressible_res_cpu Module Reference

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.
 

Function/Subroutine Documentation

◆ add_navier_stokes_flux_cpu()

subroutine compressible_res_cpu::add_navier_stokes_flux_cpu ( type(field_t), intent(inout visc_m_x,
type(field_t), intent(inout visc_m_y,
type(field_t), intent(inout visc_m_z,
type(field_t), intent(inout visc_e,
type(field_t), intent(in rho_field,
type(field_t), intent(in p,
type(field_t), intent(in u,
type(field_t), intent(in v,
type(field_t), intent(in w,
type(field_t), intent(in mu,
type(field_t), intent(in kappa,
class(ax_t), intent(inout ax,
class(ax_t), intent(inout ax_stress,
type(coef_t), intent(inout coef 
)
private
Parameters
visc_m_xViscous residual for x-momentum.
visc_m_yViscous residual for y-momentum.
visc_m_zViscous residual for z-momentum.
visc_EViscous residual for total energy.
rho_fieldDensity field.
pPressure field.
uX-velocity field.
vY-velocity field.
wZ-velocity field.
muDynamic viscosity field.
kappaThermal conductivity field.
AxMatrix-vector product operator for scalar diffusion.
Ax_stressMatrix-vector product operator for full stress.
coefSpatial discretization coefficients.

Definition at line 511 of file compressible_res_cpu.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_primitive_variables_cpu()

subroutine compressible_res_cpu::advance_primitive_variables_cpu ( type(field_t), intent(inout rho_field,
type(field_t), intent(inout m_x,
type(field_t), intent(inout m_y,
type(field_t), intent(inout m_z,
type(field_t), intent(inout e,
type(field_t), intent(in p,
type(field_t), intent(in u,
type(field_t), intent(in v,
type(field_t), intent(in w,
class(ax_t), intent(inout ax,
class(ax_t), intent(inout ax_stress,
type(coef_t), intent(inout coef,
type(gs_t), intent(inout gs,
type(field_t), intent(in h,
type(field_t), intent(in artificial_visc,
type(field_t), intent(in mu,
type(field_t), intent(in kappa,
type(bc_list_t), intent(inout bcs_vel,
type(time_state_t), intent(in time,
class(runge_kutta_time_scheme_t), intent(in rk_scheme,
real(kind=rp), intent(in dt 
)
private
Parameters
rho_fieldDensity field
m_x,m_y,m_zMomentum components
ETotal energy
pPressure field
u,v,wVelocity components
AxMatrix-vector product operator
coefCoefficients for spatial discretization
gsGather-scatter operator for parallel communication
hMesh size field
artificial_viscArtificial viscosity field (entropy viscosity, min with low-order)
muDynamic viscosity field (physical viscosity for momentum)
kappaThermal conductivity field (physical viscosity for energy)
bcs_velVelocity boundary conditions
timeCurrent time state
rk_schemeRunge-Kutta time integration scheme
dtTime step size

Definition at line 89 of file compressible_res_cpu.f90.

Here is the call graph for this function:

◆ evaluate_rhs_cpu()

subroutine compressible_res_cpu::evaluate_rhs_cpu ( type(field_t), intent(inout rhs_rho_field,
type(field_t), intent(inout rhs_m_x,
type(field_t), intent(inout rhs_m_y,
type(field_t), intent(inout rhs_m_z,
type(field_t), intent(inout rhs_e,
type(field_t), intent(inout rho_field,
type(field_t), intent(inout m_x,
type(field_t), intent(inout m_y,
type(field_t), intent(inout m_z,
type(field_t), intent(inout e,
type(field_t), intent(in p,
type(field_t), intent(in u,
type(field_t), intent(in v,
type(field_t), intent(in w,
class(ax_t), intent(inout ax,
class(ax_t), intent(inout ax_stress,
type(coef_t), intent(inout coef,
type(gs_t), intent(inout gs,
type(field_t), intent(in h,
type(field_t), intent(in artificial_visc,
type(field_t), intent(in mu,
type(field_t), intent(in kappa 
)
private
Parameters
rhs_rho_fieldOutput array for density RHS terms
rhs_m_xOutput array for x-momentum RHS terms
rhs_m_yOutput array for y-momentum RHS terms
rhs_m_zOutput array for z-momentum RHS terms
rhs_EOutput array for energy RHS terms
rho_fieldInput density field
m_xInput x-momentum field
m_yInput y-momentum field
m_zInput z-momentum field
EInput total energy field
pInput pressure field
uInput x-velocity field
vInput y-velocity field
wInput z-velocity field
AxMatrix-vector product operator for Laplacian terms
coefSpatial discretization coefficients
gsGather-scatter operator for parallel communication
hMesh size field
artificial_viscArtificial viscosity field
muDynamic viscosity field for physical momentum diffusion
kappaThermal 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.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ compressible_res_cpu_add_physical_flux

logical compressible_res_cpu::compressible_res_cpu_add_physical_flux = .false.

Definition at line 63 of file compressible_res_cpu.f90.

◆ compressible_res_cpu_add_physical_stress

logical compressible_res_cpu::compressible_res_cpu_add_physical_stress = .false.
private

Definition at line 65 of file compressible_res_cpu.f90.

◆ compressible_res_cpu_gamma

real(kind=rp), public compressible_res_cpu::compressible_res_cpu_gamma = 1.4_rp

Definition at line 67 of file compressible_res_cpu.f90.