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

Multi-species chemistry interface for thermodynamic properties, reaction rates, and transport coefficients. More...

Functions/Subroutines

subroutine compute_viscosity_and_inversion (t_l, ys_l, t_r, ys_r, re_l, re_r)
 Compute mixture viscosities for left and right states and invert them for use as reciprocal Reynolds numbers.
subroutine s_compute_q_t_sf (q_t_sf, q_cons_vf, bounds)
 Initialize the temperature field from conservative variables by inverting the energy equation.
subroutine s_compute_t_from_primitives (q_t_sf, q_prim_vf, bounds)
 Compute the temperature field from primitive variables using the ideal gas law and mixture molecular weight.
subroutine s_compute_chemistry_reaction_flux (rhs_vf, q_cons_qp, q_t_sf, q_prim_qp, bounds)
 Add chemical reaction source terms to the species transport RHS using net production rates.
subroutine s_chemistry_reaction_substep (q_cons_vf, q_t_sf, dtime, bounds)
 Operator-split integration of the reaction source with an alpha-QSS (Mott quasi-steady-state) reactor. Called after the flow update: each cell's constant-(rho, e) reactor is advanced over dtime with chem_paramsreaction_substeps predictor-corrector sub-steps – or, when adap_substeps = T, an adaptive count nsub clamped to [reaction_substeps, reaction_substeps_max] and sized once per rank from the rank's stiffest cell – updating the species partial densities and temperature in place. Mixture density, momentum, and total energy are unchanged (reactions convert chemical to thermal energy at fixed internal energy). The alpha-QSS update treats each species' destruction as a pseudo-first-order loss, so it is stable for stiff ignition where an explicit source would overshoot and diverge, and relaxes to the correct chemical equilibrium rather than over-heating. Reaction is split from the flow update at first order (Lie-Trotter), and each sub-step renormalizes the mass fractions to sum to one (which does not strictly conserve elemental composition).
subroutine s_compute_chemistry_diffusion_flux (idir, q_prim_qp, flux_src_vf, irx, iry, irz, q_t_sf)
 Compute species mass diffusion fluxes at cell interfaces using mixture-averaged diffusivities.

Variables

type(int_bounds_infoisc1
type(int_bounds_infoisc2
type(int_bounds_infoisc3
integer, dimension(3) offsets

Detailed Description

Multi-species chemistry interface for thermodynamic properties, reaction rates, and transport coefficients.

Function/Subroutine Documentation

◆ compute_viscosity_and_inversion()

subroutine m_chemistry::compute_viscosity_and_inversion ( real(wp), intent(inout) t_l,
real(wp), dimension(num_species), intent(inout) ys_l,
real(wp), intent(inout) t_r,
real(wp), dimension(num_species), intent(inout) ys_r,
real(wp), intent(inout) re_l,
real(wp), intent(inout) re_r )

Compute mixture viscosities for left and right states and invert them for use as reciprocal Reynolds numbers.

Definition at line 375 of file m_chemistry.fpp.f90.

Here is the caller graph for this function:

◆ s_chemistry_reaction_substep()

subroutine m_chemistry::s_chemistry_reaction_substep ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
type(scalar_field), intent(inout) q_t_sf,
real(wp), intent(in) dtime,
type(int_bounds_info), dimension(1:3), intent(in) bounds )

Operator-split integration of the reaction source with an alpha-QSS (Mott quasi-steady-state) reactor. Called after the flow update: each cell's constant-(rho, e) reactor is advanced over dtime with chem_paramsreaction_substeps predictor-corrector sub-steps – or, when adap_substeps = T, an adaptive count nsub clamped to [reaction_substeps, reaction_substeps_max] and sized once per rank from the rank's stiffest cell – updating the species partial densities and temperature in place. Mixture density, momentum, and total energy are unchanged (reactions convert chemical to thermal energy at fixed internal energy). The alpha-QSS update treats each species' destruction as a pseudo-first-order loss, so it is stable for stiff ignition where an explicit source would overshoot and diverge, and relaxes to the correct chemical equilibrium rather than over-heating. Reaction is split from the flow update at first order (Lie-Trotter), and each sub-step renormalizes the mass fractions to sum to one (which does not strictly conserve elemental composition).

Definition at line 589 of file m_chemistry.fpp.f90.

◆ s_compute_chemistry_diffusion_flux()

subroutine m_chemistry::s_compute_chemistry_diffusion_flux ( integer, intent(in) idir,
type(scalar_field), dimension(sys_size), intent(in) q_prim_qp,
type(scalar_field), dimension(sys_size), intent(inout) flux_src_vf,
type(int_bounds_info), intent(in) irx,
type(int_bounds_info), intent(in) iry,
type(int_bounds_info), intent(in) irz,
type(scalar_field), intent(in) q_t_sf )

Compute species mass diffusion fluxes at cell interfaces using mixture-averaged diffusivities.

Definition at line 913 of file m_chemistry.fpp.f90.

◆ s_compute_chemistry_reaction_flux()

subroutine m_chemistry::s_compute_chemistry_reaction_flux ( type(scalar_field), dimension(sys_size), intent(inout) rhs_vf,
type(scalar_field), dimension(sys_size), intent(inout) q_cons_qp,
type(scalar_field), intent(inout) q_t_sf,
type(scalar_field), dimension(sys_size), intent(inout) q_prim_qp,
type(int_bounds_info), dimension(1:3), intent(in) bounds )

Add chemical reaction source terms to the species transport RHS using net production rates.

Definition at line 486 of file m_chemistry.fpp.f90.

◆ s_compute_q_t_sf()

subroutine m_chemistry::s_compute_q_t_sf ( type(scalar_field), intent(inout) q_t_sf,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
type(int_bounds_info), dimension(1:3), intent(in) bounds )

Initialize the temperature field from conservative variables by inverting the energy equation.

Definition at line 425 of file m_chemistry.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_t_from_primitives()

subroutine m_chemistry::s_compute_t_from_primitives ( type(scalar_field), intent(inout) q_t_sf,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
type(int_bounds_info), dimension(1:3), intent(in) bounds )

Compute the temperature field from primitive variables using the ideal gas law and mixture molecular weight.

Definition at line 461 of file m_chemistry.fpp.f90.

Variable Documentation

◆ isc1

type(int_bounds_info) m_chemistry::isc1

Definition at line 347 of file m_chemistry.fpp.f90.

◆ isc2

type(int_bounds_info) m_chemistry::isc2

Definition at line 347 of file m_chemistry.fpp.f90.

◆ isc3

type(int_bounds_info) m_chemistry::isc3

Definition at line 347 of file m_chemistry.fpp.f90.

◆ offsets

integer, dimension(3) m_chemistry::offsets

Definition at line 359 of file m_chemistry.fpp.f90.