|
MFC
Exascale flow solver
|
Contains module m_riemann_state. More...
Go to the source code of this file.
Modules | |
| module | m_riemann_state |
| Shared Riemann-solver module state and the per-sweep setup, state-buffer population, viscous source flux, and finalization helpers. | |
Functions/Subroutines | |
| real(wp) function | m_riemann_state::f_elastic_signal_speed (c, g, tau, rho) |
| Elastic signal speed of Rodriguez et al. JCP (2019): the acoustic speed stiffened by the shear modulus and the normal elastic stress. Callers subtract it for the left-going wave and add it for the right-going one. | |
| real(wp) function | m_riemann_state::f_low_mach_zcoef (vel_l_rms, vel_r_rms, c_l, c_r) |
| Low-Mach parameter of Thornber et al. JCP (2008): the larger of the two face Mach numbers, capped at one so the correction switches itself off once the flow is no longer low speed. | |
| real(wp) function | m_riemann_state::f_low_mach_pcorr_hll (vel_l_rms, vel_r_rms, c_l, c_r, rho_l, rho_r, s_m, s_p) |
| Low-Mach pressure correction added to the HLL and Lax-Friedrichs fluxes, which restores the pressure jump that the dissipation of those fluxes over-damps at low Mach number. Zero unless low_Mach == 1. | |
| real(wp) function | m_riemann_state::f_low_mach_pcorr_hllc (vel_l_rms, vel_r_rms, c_l, c_r, rho_l, rho_r, s_l, s_r, vel_l_norm, vel_r_norm) |
| The same correction for the HLLC flux, where the star state supplies the pressure jump directly and the correction scales with the mass flux through the acoustic waves instead. Zero unless low_Mach == 1. | |
| subroutine | m_riemann_state::s_apply_low_mach_velocity (vel_l_rms, vel_r_rms, c_l, c_r, vel_l_norm, vel_r_norm) |
| The alternative low-Mach treatment of Thornber et al. JCP (2008) selected by low_Mach == 2: rather than correct the flux, blend the wave-normal velocities towards their mean before the wave speeds are computed, which is why this mutates its arguments and must be called ahead of s_L, s_R and s_S. The tangential velocities and vel_L/R_rms are deliberately left untouched. | |
| subroutine | m_riemann_state::s_compute_average_state (rho_l, rho_r, vel_l, vel_r, h_l, h_r, gamma_l, gamma_r, qv_l, qv_r, rho_avg, vel_avg_rms, h_avg, gamma_avg, qv_avg) |
| Interface-averaged state that the pressure-based wave-speed estimate reads. avg_state selects between the density-weighted Roe average, which costs eight square roots per face, and the plain arithmetic mean; unlike the other solver switches this one is not implied by the call site, so the dispatch stays here. | |
| subroutine | m_riemann_state::s_compute_chemistry_average_state (rho_l, rho_r, t_l, t_r, ys_l, ys_r, r_species, h_il, h_ir, cp_il, cp_ir, vel_avg_rms, gamma_avg, c_sum_yi_phi) |
| Roe-averaged reacting-mixture quantities: replaces gamma_avg with the mixture Cp/Cv and builds the c_sum_Yi_Phi term s_compute_speed_of_sound_avg needs. vel_avg_rms must be the full squared magnitude - its Phi_avg and vel_sum terms cancel to leave the Roe sound speed, and only do so for the full magnitude. | |
| subroutine | m_riemann_state::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 | m_riemann_state::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 | m_riemann_state::s_initialize_riemann_solver (flux_src_vf, norm_dir) |
| Set up the chosen Riemann solver algorithm for the current direction. | |
| subroutine | m_riemann_state::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 | m_riemann_state::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 | m_riemann_state::s_calculate_shear_stress_tensor (vel_grad_avg, re_shear, divergence_v, tau_shear_out) |
| Compute shear stress tensor components. | |
| subroutine | m_riemann_state::s_calculate_bulk_stress_tensor (re_bulk, divergence_v, tau_bulk_out) |
| Compute bulk stress tensor components (diagonal only). | |
| subroutine | m_riemann_state::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 | m_riemann_state::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, add the elastic energy of each stress component (doubled for the shear components) on each side whose mixture modulus is non-negligible, then scale the returned moduli by the continuum damage state when damage is modeled (energy uses the undamaged modulus; the damaged moduli feed the callers' wave speeds). 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 | m_riemann_state::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 | m_riemann_state::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 | m_riemann_state::s_finalize_riemann_solver_hatr (flux_vf, flux_gsrc_vf, norm_dir) |
Variables | |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::vel_src_rsx_vf |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::mom_sp_rsx_vf |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::re_avg_rsx_vf |
| real(wp), dimension(:), allocatable | m_riemann_state::gs_rs |
| real(wp), dimension(:,:), allocatable | m_riemann_state::res_gs |
| 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. | |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::flux_src_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. | |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::nc_iface_vel_rsx_vf |
| 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. | |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::nc_iface_vel_hatr_rsx_vf |
| real(wp), dimension(:,:,:,:), allocatable | m_riemann_state::flux_gsrc_hatr_rsx_vf |
Indical bounds in the s1-, s2- and s3-directions | |
| type(int_bounds_info) | m_riemann_state::is1 |
| type(int_bounds_info) | m_riemann_state::is2 |
| type(int_bounds_info) | m_riemann_state::is3 |
| type(int_bounds_info) | m_riemann_state::isx |
| type(int_bounds_info) | m_riemann_state::isy |
| type(int_bounds_info) | m_riemann_state::isz |
Contains module m_riemann_state.
Definition in file m_riemann_state.fpp.f90.