MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_riemann_state Module Reference

Shared Riemann-solver module state and the per-sweep setup, state-buffer population, viscous source flux, and finalization helpers. More...

Functions/Subroutines

subroutine s_compute_viscous_source_flux (vell_vf, dvell_dx_vf, dvell_dy_vf, dvell_dz_vf, velr_vf, dvelr_dx_vf, dvelr_dy_vf, dvelr_dz_vf, flux_src_vf, q_prim_vf, norm_dir, ix, iy, iz)
 Dispatch to the subroutines that are utilized to compute the viscous source fluxes for either Cartesian or cylindrical geometries. For more information please refer to: 1) s_compute_cartesian_viscous_source_flux 2) s_compute_cylindrical_viscous_source_flux.
subroutine s_populate_riemann_states_variables_buffers (ql_prim_rsx_vf, dql_prim_dx_vf, dql_prim_dy_vf, dql_prim_dz_vf, qr_prim_rsx_vf, dqr_prim_dx_vf, dqr_prim_dy_vf, dqr_prim_dz_vf, norm_dir, ix, iy, iz)
 Populate the left and right Riemann state variable buffers based on boundary conditions.
subroutine s_initialize_riemann_solver (flux_src_vf, norm_dir)
 Set up the chosen Riemann solver algorithm for the current direction.
subroutine s_compute_cylindrical_viscous_source_flux (vell_vf, dvell_dx_vf, dvell_dy_vf, dvell_dz_vf, velr_vf, dvelr_dx_vf, dvelr_dy_vf, dvelr_dz_vf, flux_src_vf, q_prim_vf, norm_dir, ix, iy, iz)
 Compute cylindrical viscous source flux contributions for momentum and energy.
subroutine s_compute_cartesian_viscous_source_flux (dvell_dx_vf, dvell_dy_vf, dvell_dz_vf, dvelr_dx_vf, dvelr_dy_vf, dvelr_dz_vf, flux_src_vf, q_prim_vf, norm_dir)
 Compute Cartesian viscous source flux contributions for momentum and energy.
subroutine s_calculate_shear_stress_tensor (vel_grad_avg, re_shear, divergence_v, tau_shear_out)
 Compute shear stress tensor components.
subroutine s_calculate_bulk_stress_tensor (re_bulk, divergence_v, tau_bulk_out)
 Compute bulk stress tensor components (diagonal only).
subroutine s_accumulate_mixture_properties (nf, alpha_rho_k, alpha_k, rho_k, gamma_k, pi_inf_k, qv_k)
 Accumulate the mixture density, specific heat ratio function, liquid stiffness function, and internal energy reference of one Riemann state from its partial densities and volume fractions. The number of fluids is an explicit argument because the 5-equation bubble model accumulates over num_fluids - 1 fluids.
subroutine s_compute_interface_reynolds (alpha_k, re_k, re_size_loc1, re_size_loc2)
 Compute the shear and volume Reynolds numbers of one Riemann state by inverse-weighting the fluid Reynolds numbers with the volume fractions.
subroutine s_compute_hypoelastic_interface_energy (nf, alpha_l, alpha_r, damage_l, damage_r, tau_e_l, tau_e_r, g_l, g_r, e_l, e_r)
 Accumulate the hypoelastic stress contribution to the energies of the left and right Riemann states: mix the shear modulus over the fluids, scale it by the continuum damage state when damage is modeled, and add the elastic energy of each stress component (doubled for the shear components) when both mixture moduli are non-negligible. The elastic shear stresses are loaded from the state buffers by the caller, which reuses them for the stress fluxes and elastic wave speeds. The G > verysmall gate is a deliberate maintainer ruling that replaces HLL's former hard-coded G > 1000 stability floor, retiring its "TODO take out if statement if stable without".
real(wp) function f_compute_hllc_star_momentum_flux (rho_l, rho_r, vel_l_norm, vel_r_norm, s_m, s_p, s_s, xi_l, xi_r, xi_m, xi_p, dir_flg_norm)
 Compute the advective part of the HLLC star-state momentum flux in the wave-normal direction (pressure excluded), used to assemble the geometrical source flux of the cylindrical and azimuthal sweeps.
subroutine s_finalize_riemann_solver (flux_vf, flux_src_vf, flux_gsrc_vf, norm_dir)
 Deallocation and/or disassociation procedures that are needed to finalize the selected Riemann problem solver.

Variables

real(wp), dimension(:,:,:,:), allocatable vel_src_rsx_vf
real(wp), dimension(:,:,:,:), allocatable mom_sp_rsx_vf
real(wp), dimension(:,:,:,:), allocatable re_avg_rsx_vf
real(wp), dimension(:), allocatable gs_rs
real(wp), dimension(:,:), allocatable res_gs
real(wp), dimension(:,:,:,:), allocatable flux_rsx_vf
 The cell-boundary values of the fluxes (src - source) that are computed through the chosen Riemann problem solver, and the direct evaluation of source terms, by using the left and right states given in qK_prim_rs_vf, dqK_prim_ds_vf where ds = dx, dy or dz.
real(wp), dimension(:,:,:,:), allocatable flux_src_rsx_vf
real(wp), dimension(:,:,:,:), allocatable flux_gsrc_rsx_vf
 The cell-boundary values of the geometrical source flux that are computed through the chosen Riemann problem solver by using the left and right states given in qK_prim_rs_vf. Currently 2D axisymmetric for inviscid only.
Indical bounds in the s1-, s2- and s3-directions
type(int_bounds_infois1
type(int_bounds_infois2
type(int_bounds_infois3
type(int_bounds_infoisx
type(int_bounds_infoisy
type(int_bounds_infoisz

Detailed Description

Shared Riemann-solver module state and the per-sweep setup, state-buffer population, viscous source flux, and finalization helpers.

Function/Subroutine Documentation

◆ f_compute_hllc_star_momentum_flux()

real(wp) function m_riemann_state::f_compute_hllc_star_momentum_flux ( real(wp), intent(in) rho_l,
real(wp), intent(in) rho_r,
real(wp), intent(in) vel_l_norm,
real(wp), intent(in) vel_r_norm,
real(wp), intent(in) s_m,
real(wp), intent(in) s_p,
real(wp), intent(in) s_s,
real(wp), intent(in) xi_l,
real(wp), intent(in) xi_r,
real(wp), intent(in) xi_m,
real(wp), intent(in) xi_p,
real(wp), intent(in) dir_flg_norm )

Compute the advective part of the HLLC star-state momentum flux in the wave-normal direction (pressure excluded), used to assemble the geometrical source flux of the cylindrical and azimuthal sweeps.

Parameters
[in]rho_rLeft and right densities
[in]vel_r_normLeft and right wave-normal velocities
[in]s_sClamped left/right and contact wave speeds
[in]xi_pStar-state compression factors and upwind selectors
[in]dir_flg_normDirection flag of the wave-normal direction

Definition at line 2791 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_accumulate_mixture_properties()

subroutine m_riemann_state::s_accumulate_mixture_properties ( integer, intent(in) nf,
real(wp), dimension(nf), intent(in) alpha_rho_k,
real(wp), dimension(nf), intent(in) alpha_k,
real(wp), intent(out) rho_k,
real(wp), intent(out) gamma_k,
real(wp), intent(out) pi_inf_k,
real(wp), intent(out) qv_k )

Accumulate the mixture density, specific heat ratio function, liquid stiffness function, and internal energy reference of one Riemann state from its partial densities and volume fractions. The number of fluids is an explicit argument because the 5-equation bubble model accumulates over num_fluids - 1 fluids.

Parameters
[in]nfNumber of fluids to accumulate over

Definition at line 2535 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_calculate_bulk_stress_tensor()

subroutine m_riemann_state::s_calculate_bulk_stress_tensor ( real(wp), intent(in) re_bulk,
real(wp), intent(in) divergence_v,
real(wp), dimension(num_dims, num_dims), intent(out) tau_bulk_out )

Compute bulk stress tensor components (diagonal only).

Definition at line 2497 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_calculate_shear_stress_tensor()

subroutine m_riemann_state::s_calculate_shear_stress_tensor ( real(wp), dimension(num_dims, num_dims), intent(in) vel_grad_avg,
real(wp), intent(in) re_shear,
real(wp), intent(in) divergence_v,
real(wp), dimension(num_dims, num_dims), intent(out) tau_shear_out )

Compute shear stress tensor components.

Definition at line 2454 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_cartesian_viscous_source_flux()

subroutine m_riemann_state::s_compute_cartesian_viscous_source_flux ( type(scalar_field), dimension(num_dims), intent(in) dvell_dx_vf,
type(scalar_field), dimension(num_dims), intent(in) dvell_dy_vf,
type(scalar_field), dimension(num_dims), intent(in) dvell_dz_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dx_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dy_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dz_vf,
type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
integer, intent(in) norm_dir )

Compute Cartesian viscous source flux contributions for momentum and energy.

Definition at line 2253 of file m_riemann_state.fpp.f90.

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

◆ s_compute_cylindrical_viscous_source_flux()

subroutine m_riemann_state::s_compute_cylindrical_viscous_source_flux ( type(scalar_field), dimension(num_dims), intent(in) vell_vf,
type(scalar_field), dimension(num_dims), intent(in) dvell_dx_vf,
type(scalar_field), dimension(num_dims), intent(in) dvell_dy_vf,
type(scalar_field), dimension(num_dims), intent(in) dvell_dz_vf,
type(scalar_field), dimension(num_dims), intent(in) velr_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dx_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dy_vf,
type(scalar_field), dimension(num_dims), intent(in) dvelr_dz_vf,
type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
integer, intent(in) norm_dir,
type(int_bounds_info), intent(in) ix,
type(int_bounds_info), intent(in) iy,
type(int_bounds_info), intent(in) iz )

Compute cylindrical viscous source flux contributions for momentum and energy.

Interface velocity ( \(v_1,v_2,v_3\)) (grid directions) for viscous work.

Shear stress vector ( \(\sigma_{N1}, \sigma_{N2}, \sigma_{N3}\)) on N-face (grid directions).

Definition at line 1987 of file m_riemann_state.fpp.f90.

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

◆ s_compute_hypoelastic_interface_energy()

subroutine m_riemann_state::s_compute_hypoelastic_interface_energy ( integer, intent(in) nf,
real(wp), dimension(nf), intent(in) alpha_l,
real(wp), dimension(nf), intent(in) alpha_r,
real(wp), intent(in) damage_l,
real(wp), intent(in) damage_r,
real(wp), dimension(6), intent(in) tau_e_l,
real(wp), dimension(6), intent(in) tau_e_r,
real(wp), intent(out) g_l,
real(wp), intent(out) g_r,
real(wp), intent(inout) e_l,
real(wp), intent(inout) e_r )

Accumulate the hypoelastic stress contribution to the energies of the left and right Riemann states: mix the shear modulus over the fluids, scale it by the continuum damage state when damage is modeled, and add the elastic energy of each stress component (doubled for the shear components) when both mixture moduli are non-negligible. The elastic shear stresses are loaded from the state buffers by the caller, which reuses them for the stress fluxes and elastic wave speeds. The G > verysmall gate is a deliberate maintainer ruling that replaces HLL's former hard-coded G > 1000 stability floor, retiring its "TODO take out if statement if stable without".

Parameters
[in]nfNumber of fluids to mix the shear modulus over
[in]alpha_rLeft and right volume fractions
[in]damage_rContinuum damage states (referenced only when cont_damage)
[in]tau_e_rLeft and right elastic shear stresses
[out]g_rLeft and right mixture shear moduli
[in,out]e_rLeft and right state energies

Definition at line 2693 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_interface_reynolds()

subroutine m_riemann_state::s_compute_interface_reynolds ( real(wp), dimension(num_fluids), intent(in) alpha_k,
real(wp), dimension(2), intent(out) re_k,
integer, intent(in) re_size_loc1,
integer, intent(in) re_size_loc2 )

Compute the shear and volume Reynolds numbers of one Riemann state by inverse-weighting the fluid Reynolds numbers with the volume fractions.

Parameters
[in]re_size_loc1host copies of Re_size; amdflang reads the declare-target original stale cross-TU
[in]re_size_loc2host copies of Re_size; amdflang reads the declare-target original stale cross-TU

Definition at line 2605 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_viscous_source_flux()

subroutine m_riemann_state::s_compute_viscous_source_flux ( type(scalar_field), dimension(num_vels), intent(in) vell_vf,
type(scalar_field), dimension(num_vels), intent(in) dvell_dx_vf,
type(scalar_field), dimension(num_vels), intent(in) dvell_dy_vf,
type(scalar_field), dimension(num_vels), intent(in) dvell_dz_vf,
type(scalar_field), dimension(num_vels), intent(in) velr_vf,
type(scalar_field), dimension(num_vels), intent(in) dvelr_dx_vf,
type(scalar_field), dimension(num_vels), intent(in) dvelr_dy_vf,
type(scalar_field), dimension(num_vels), intent(in) dvelr_dz_vf,
type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
integer, intent(in) norm_dir,
type(int_bounds_info), intent(in) ix,
type(int_bounds_info), intent(in) iy,
type(int_bounds_info), intent(in) iz )

Dispatch to the subroutines that are utilized to compute the viscous source fluxes for either Cartesian or cylindrical geometries. For more information please refer to: 1) s_compute_cartesian_viscous_source_flux 2) s_compute_cylindrical_viscous_source_flux.

Definition at line 469 of file m_riemann_state.fpp.f90.

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

◆ s_finalize_riemann_solver()

subroutine m_riemann_state::s_finalize_riemann_solver ( type(scalar_field), dimension(sys_size), intent(inout) flux_vf,
type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
type(scalar_field), dimension(sys_size), intent(inout) flux_gsrc_vf,
integer, intent(in) norm_dir )

Deallocation and/or disassociation procedures that are needed to finalize the selected Riemann problem solver.

Definition at line 2844 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_initialize_riemann_solver()

subroutine m_riemann_state::s_initialize_riemann_solver ( type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
integer, intent(in) norm_dir )

Set up the chosen Riemann solver algorithm for the current direction.

Definition at line 1568 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

◆ s_populate_riemann_states_variables_buffers()

subroutine m_riemann_state::s_populate_riemann_states_variables_buffers ( real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) ql_prim_rsx_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dql_prim_dx_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dql_prim_dy_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dql_prim_dz_vf,
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) qr_prim_rsx_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dqr_prim_dx_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dqr_prim_dy_vf,
type(scalar_field), dimension(:), intent(inout), allocatable dqr_prim_dz_vf,
integer, intent(in) norm_dir,
type(int_bounds_info), intent(in) ix,
type(int_bounds_info), intent(in) iy,
type(int_bounds_info), intent(in) iz )

Populate the left and right Riemann state variable buffers based on boundary conditions.

Definition at line 491 of file m_riemann_state.fpp.f90.

Here is the caller graph for this function:

Variable Documentation

◆ flux_gsrc_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_gsrc_rsx_vf

The cell-boundary values of the geometrical source flux that are computed through the chosen Riemann problem solver by using the left and right states given in qK_prim_rs_vf. Currently 2D axisymmetric for inviscid only.

Definition at line 365 of file m_riemann_state.fpp.f90.

◆ flux_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_rsx_vf

The cell-boundary values of the fluxes (src - source) that are computed through the chosen Riemann problem solver, and the direct evaluation of source terms, by using the left and right states given in qK_prim_rs_vf, dqK_prim_ds_vf where ds = dx, dy or dz.

Definition at line 348 of file m_riemann_state.fpp.f90.

◆ flux_src_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_src_rsx_vf

Definition at line 348 of file m_riemann_state.fpp.f90.

◆ gs_rs

real(wp), dimension(:), allocatable m_riemann_state::gs_rs

Definition at line 438 of file m_riemann_state.fpp.f90.

◆ is1

type(int_bounds_info) m_riemann_state::is1

Definition at line 422 of file m_riemann_state.fpp.f90.

◆ is2

type(int_bounds_info) m_riemann_state::is2

Definition at line 422 of file m_riemann_state.fpp.f90.

◆ is3

type(int_bounds_info) m_riemann_state::is3

Definition at line 422 of file m_riemann_state.fpp.f90.

◆ isx

type(int_bounds_info) m_riemann_state::isx

Definition at line 423 of file m_riemann_state.fpp.f90.

◆ isy

type(int_bounds_info) m_riemann_state::isy

Definition at line 423 of file m_riemann_state.fpp.f90.

◆ isz

type(int_bounds_info) m_riemann_state::isz

Definition at line 423 of file m_riemann_state.fpp.f90.

◆ mom_sp_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::mom_sp_rsx_vf

Definition at line 394 of file m_riemann_state.fpp.f90.

◆ re_avg_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::re_avg_rsx_vf

Definition at line 407 of file m_riemann_state.fpp.f90.

◆ res_gs

real(wp), dimension(:,:), allocatable m_riemann_state::res_gs

Definition at line 451 of file m_riemann_state.fpp.f90.

◆ vel_src_rsx_vf

real(wp), dimension(:,:,:,:), allocatable m_riemann_state::vel_src_rsx_vf

Definition at line 381 of file m_riemann_state.fpp.f90.