|
MFC
Exascale flow solver
|
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) on each side whose mixture modulus is 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 per-side 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) |
| Reshape and copy the Riemann-solver flux buffers back to the physical-space output arrays for the selected sweep direction, finalizing the Riemann solve. Two variants are emitted from one template so the shared unpermute logic cannot drift apart: the plain routine also copies the advection flux_src set and the grid_geometry==3 z-sweep geometric source flux, while the _hatR variant unpermutes the hat_R-anchored flux_hatR_rs* set of the fused dual-pass HLLD solve (called between the two RHS assemblies) and is a strict subset: flux_src is anchor-independent (already finalized with the hat_L set) and its geometric source flux only exists for the axisymmetric y-sweep. | |
| subroutine | s_finalize_riemann_solver_hatr (flux_vf, flux_gsrc_vf, norm_dir) |
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. | |
| real(wp), dimension(:,:,:,:), allocatable | nc_iface_vel_rsx_vf |
| real(wp), dimension(:,:,:,:), allocatable | flux_hatr_rsx_vf |
| Dual-pass HLLD second flux set: the hat_R-anchored fluxes (and, for axisymmetric runs, the hat_R interface velocities) written by the same fused solve that fills flux_rsx / nc_iface_vel_rsx with the hat_L-anchored values. Allocated only when hypo_nc_mode_dual_pass. | |
| real(wp), dimension(:,:,:,:), allocatable | nc_iface_vel_hatr_rsx_vf |
| real(wp), dimension(:,:,:,:), allocatable | flux_gsrc_hatr_rsx_vf |
Indical bounds in the s1-, s2- and s3-directions | |
| type(int_bounds_info) | is1 |
| type(int_bounds_info) | is2 |
| type(int_bounds_info) | is3 |
| type(int_bounds_info) | isx |
| type(int_bounds_info) | isy |
| type(int_bounds_info) | isz |
Shared Riemann-solver module state and the per-sweep setup, state-buffer population, viscous source flux, and finalization helpers.
| 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.
| [in] | rho_r | Left and right densities |
| [in] | vel_r_norm | Left and right wave-normal velocities |
| [in] | s_s | Clamped left/right and contact wave speeds |
| [in] | xi_p | Star-state compression factors and upwind selectors |
| [in] | dir_flg_norm | Direction flag of the wave-normal direction |
Definition at line 2861 of file m_riemann_state.fpp.f90.
| 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.
| [in] | nf | Number of fluids to accumulate over |
Definition at line 2600 of file m_riemann_state.fpp.f90.
| 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 2562 of file m_riemann_state.fpp.f90.
| 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 2519 of file m_riemann_state.fpp.f90.
| 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 2316 of file m_riemann_state.fpp.f90.
| 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 2048 of file m_riemann_state.fpp.f90.
| 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) on each side whose mixture modulus is 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 per-side 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".
| [in] | nf | Number of fluids to mix the shear modulus over |
| [in] | alpha_r | Left and right volume fractions |
| [in] | damage_r | Continuum damage states (referenced only when cont_damage) |
| [in] | tau_e_r | Left and right elastic shear stresses |
| [out] | g_r | Left and right mixture shear moduli |
| [in,out] | e_r | Left and right state energies |
Definition at line 2758 of file m_riemann_state.fpp.f90.
| 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.
| [in] | re_size_loc1 | host copies of Re_size; amdflang reads the declare-target original stale cross-TU |
| [in] | re_size_loc2 | host copies of Re_size; amdflang reads the declare-target original stale cross-TU |
Definition at line 2670 of file m_riemann_state.fpp.f90.
| 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 524 of file m_riemann_state.fpp.f90.
| 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 ) |
Reshape and copy the Riemann-solver flux buffers back to the physical-space output arrays for the selected sweep direction, finalizing the Riemann solve. Two variants are emitted from one template so the shared unpermute logic cannot drift apart: the plain routine also copies the advection flux_src set and the grid_geometry==3 z-sweep geometric source flux, while the _hatR variant unpermutes the hat_R-anchored flux_hatR_rs* set of the fused dual-pass HLLD solve (called between the two RHS assemblies) and is a strict subset: flux_src is anchor-independent (already finalized with the hat_L set) and its geometric source flux only exists for the axisymmetric y-sweep.
Definition at line 2922 of file m_riemann_state.fpp.f90.
| subroutine m_riemann_state::s_finalize_riemann_solver_hatr | ( | type(scalar_field), dimension(sys_size), intent(inout) | flux_vf, |
| type(scalar_field), dimension(sys_size), intent(inout) | flux_gsrc_vf, | ||
| integer, intent(in) | norm_dir ) |
Definition at line 3418 of file m_riemann_state.fpp.f90.
| 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 1629 of file m_riemann_state.fpp.f90.
| 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 546 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_gsrc_hatr_rsx_vf |
Definition at line 420 of file m_riemann_state.fpp.f90.
| 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.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_hatr_rsx_vf |
Dual-pass HLLD second flux set: the hat_R-anchored fluxes (and, for axisymmetric runs, the hat_R interface velocities) written by the same fused solve that fills flux_rsx / nc_iface_vel_rsx with the hat_L-anchored values. Allocated only when hypo_nc_mode_dual_pass.
Definition at line 394 of file m_riemann_state.fpp.f90.
| 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.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::flux_src_rsx_vf |
Definition at line 348 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:), allocatable m_riemann_state::gs_rs |
Definition at line 493 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::is1 |
Definition at line 477 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::is2 |
Definition at line 477 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::is3 |
Definition at line 477 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::isx |
Definition at line 478 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::isy |
Definition at line 478 of file m_riemann_state.fpp.f90.
| type(int_bounds_info) m_riemann_state::isz |
Definition at line 478 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::mom_sp_rsx_vf |
Definition at line 449 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::nc_iface_vel_hatr_rsx_vf |
Definition at line 407 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::nc_iface_vel_rsx_vf |
Definition at line 378 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::re_avg_rsx_vf |
Definition at line 462 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:), allocatable m_riemann_state::res_gs |
Definition at line 506 of file m_riemann_state.fpp.f90.
| real(wp), dimension(:,:,:,:), allocatable m_riemann_state::vel_src_rsx_vf |
Definition at line 436 of file m_riemann_state.fpp.f90.