|
MFC
Exascale flow solver
|
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. More...
Functions/Subroutines | |
| subroutine, public | 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 | 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 | 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 | 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 | 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 | 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 | f_theta (ybar, y) |
| Largest theta in [0, 1] keeping ybar + theta*(y - ybar) >= 0, given ybar >= 0. | |
| pure real(wp) function | 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 | clean_report_tol = 1.e-12_wp |
| Violations below this fraction of rho are roundoff: cleaned but not counted. | |
| real(wp), dimension(:), allocatable | 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 | clean_mass |
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.
|
private |
Endpoint weight of the Gauss-Lobatto rule exact for the reconstruction's degree 2*polyn: 1/(N(N-1)), N = polyn + 2.
Definition at line 976 of file m_species_bounds.fpp.f90.
|
private |
Largest theta in [0, 1] keeping ybar + theta*(y - ybar) >= 0, given ybar >= 0.
Definition at line 949 of file m_species_bounds.fpp.f90.
|
private |
Largest theta in [0, 1] keeping vbar + theta*(v - vbar) >= verysmall*vbar (0 if vbar <= 0).
Definition at line 735 of file m_species_bounds.fpp.f90.
|
private |
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.
Definition at line 764 of file m_species_bounds.fpp.f90.
| subroutine, public m_species_bounds::s_bound_face_states | ( | type(scalar_field), dimension(sys_size), intent(in) | q_prim_vf, |
| real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) | vl, | ||
| real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) | vr, | ||
| integer, intent(in) | 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.
Definition at line 518 of file m_species_bounds.fpp.f90.
| subroutine, public m_species_bounds::s_bound_species_faces | ( | type(scalar_field), dimension(sys_size), intent(in) | q_prim_vf, |
| real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) | vl, | ||
| real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) | vr, | ||
| integer, intent(in) | id ) |
Bound the species face values vL/vR of direction id, over the range the reconstruction filled.
Definition at line 395 of file m_species_bounds.fpp.f90.
| subroutine, public m_species_bounds::s_clean_species | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf, |
| integer, intent(in) | 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.
Definition at line 801 of file m_species_bounds.fpp.f90.
| impure subroutine, public m_species_bounds::s_report_species_cleanup | ( | integer, intent(in) | 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.
Definition at line 928 of file m_species_bounds.fpp.f90.
|
private |
Fluid-cell cleanings, and sum of |rho_new - rho_old|, since the last report, per AMR level (0 = the coarse grid).
Definition at line 390 of file m_species_bounds.fpp.f90.
|
private |
Definition at line 390 of file m_species_bounds.fpp.f90.
|
private |
Violations below this fraction of rho are roundoff: cleaned but not counted.
Definition at line 388 of file m_species_bounds.fpp.f90.