MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_species_bounds.fpp.f90 File Reference

Contains module m_species_bounds. More...

Go to the source code of this file.

Modules

module  m_species_bounds
 Keeps reconstructed species mass fractions on the simplex (Y >= 0, sum Y = 1). Each cell's face values are first shifted to sum to 1, then scaled toward the cell average by one theta shared by all species and both faces (Zhang & Shu, JCP 2010). With face Y on the simplex the HLLC species fluxes are Y_upwind times the mass flux (Larrouturou, JCP 1991), so they sum to it and keep cell averages non-negative under the Zhang-Shu CFL.

Functions/Subroutines

subroutine, public m_species_bounds::s_bound_species_faces (q_prim_vf, vl, vr, id)
 Bound the species face values vL/vR of direction id, over the range the reconstruction filled.
subroutine, public m_species_bounds::s_bound_face_states (q_prim_vf, vl, vr, id)
 Scales each cell's primitive face states vL/vR of direction id toward its cell state by one theta (Zhang & Shu, JCP 2010) so that face rho and p + p_inf stay positive and, with chemistry, the face gas constant stays positive and the face T <= T_surface_max (past which cp can go negative and the sound speed NaN). Inactive where no face state leaves those bounds.
pure real(wp) function m_species_bounds::f_theta_floor (vbar, v)
 Largest theta in [0, 1] keeping vbar + theta*(v - vbar) >= verysmall*vbar (0 if vbar <= 0).
pure real(wp) function m_species_bounds::f_theta_t (theta, vb, vf)
 Largest theta' <= theta keeping the face (rho, p + p_inf, R_mix) scaled toward vb by theta' at T <= T_surface_max (0 if vb is above it; p_inf is zero for the gases that carry chemistry). g = T_max rho R_mix - p is quadratic in theta'; where g(theta) < 0 its first root is the stable smaller-root form.
subroutine, public m_species_bounds::s_clean_species (q_cons_vf, lvl)
 Fallback (as PeleC's clean_massfrac): clip each rho*Y_k to [0, rho], set rho = sum rho*Y_k, and scale momentum and energy by rho_new/rho_old so velocity and specific energy are kept. A cell whose clipped sum is not positive is left untouched. Every cell is cleaned, but only fluid cells (not IB cells) off by > clean_report_tol*rho, or left untouched, are counted as cell cleanings (per cell per RK stage) for s_report_species_cleanup, under AMR level lvl (0 = the coarse grid). A fine block's markers are in ib_markers_fine.
impure subroutine, public m_species_bounds::s_report_species_cleanup (t_step)
 Print, once per time step and only if nonzero, how many cell cleanings s_clean_species made across all ranks, per AMR level. Coarse cells under a fine block are counted on level 0 too.
pure real(wp) function m_species_bounds::f_theta (ybar, y)
 Largest theta in [0, 1] keeping ybar + theta*(y - ybar) >= 0, given ybar >= 0.
pure real(wp) function m_species_bounds::f_lobatto_weight (polyn)
 Endpoint weight of the Gauss-Lobatto rule exact for the reconstruction's degree 2*polyn: 1/(N(N-1)), N = polyn + 2.

Variables

real(wp), parameter m_species_bounds::clean_report_tol = 1.e-12_wp
 Violations below this fraction of rho are roundoff: cleaned but not counted.
real(wp), dimension(:), allocatable m_species_bounds::clean_cells
 Fluid-cell cleanings, and sum of |rho_new - rho_old|, since the last report, per AMR level (0 = the coarse grid).
real(wp), dimension(:), allocatable m_species_bounds::clean_mass

Detailed Description

Contains module m_species_bounds.

Definition in file m_species_bounds.fpp.f90.