|
| impure subroutine, public | m_phase_change::s_relaxation_solver (q_cons_vf) |
| | Dispatch to the correct relaxation solver. Replaces the procedure pointer, which CCE is breaking on.
|
| impure subroutine, public | m_phase_change::s_initialize_phasechange_module |
| | Initialize the phase change module (no module-level state to set up; the pT/pTg relaxation solvers are self-contained).
|
| subroutine, public | m_phase_change::s_infinite_relaxation_k (q_cons_vf) |
| | Apply pT- or pTg-equilibrium relaxation with mass depletion based on the incoming state conditions.
|
| subroutine | m_phase_change::s_infinite_pt_relaxation_k (j, k, l, mfl, ps, p_infpt, q_cons_vf, rhoe, ts) |
| | Apply pT-equilibrium relaxation for N fluids.
|
| subroutine | m_phase_change::s_compute_ptg_residual (ml, mt, ps, j, k, l, q_cons_vf, rhoe, r2d, ts, mcp, mq, mcvgp, mcvgp2, mcpd) |
| | Evaluate the pTg-equilibrium residual R2D and temperature TS at a trial state (ml, pS) WITHOUT mutating q_cons_vf, so the Newton driver can line-search. The total reacting mass mT is conserved, so the reacting masses are (ml, mT - ml) and only the inert fluids are read from q_cons_vf. Also returns the mixture sums the Jacobian and the final temperature need.
|
| subroutine | m_phase_change::s_infinite_ptg_relaxation_k (j, k, l, ps, rhoe, q_cons_vf, ts) |
| | Apply pTg-equilibrium relaxation: a damped (backtracking line search) Newton solve for the reacting liquid mass ml and pressure pS enforcing Gibbs equality and energy conservation, converging on the residual norm (absolute ptgalpha_eps, or the rhoe-relative branch). Every step is projected onto the physical bounds 0 <= ml <= mT, pS > pmin. This converges in a handful of iterations with a bounded, uniform count (no GPU warp divergence), unlike the former fixed 1e-3 underrelaxation that stalled far from the root.
|
| impure subroutine, public | m_phase_change::s_finalize_relaxation_solver_module |
| | Finalize the phase change module.
|
|
| integer, parameter | m_phase_change::max_iter = 100000 |
| | max Newton iterations before accepting the last iterate
|
| real(wp), parameter | m_phase_change::pcr = 4.94e7_wp |
| | Critical pressure of water [Pa].
|
| real(wp), parameter | m_phase_change::tcr = 385.05_wp + 273.15_wp |
| | Critical temperature of water [K].
|
| integer, parameter | m_phase_change::ptg_ls_max = 30 |
| | max backtracking-line-search halvings in the pTg solver
|
| real(wp), parameter | m_phase_change::mixm = 1.0e-8_wp |
| | Mixture mass fraction threshold for triggering phase change.
|
| integer, parameter | m_phase_change::lp = 1 |
| | index for the liquid phase of the reacting fluid
|
| integer, parameter | m_phase_change::vp = 2 |
| | index for the vapor phase of the reacting fluid
|
Correct the partial densities of the reacting fluids in case one of them is negative but their sum is positive. Inert phases are not corrected at this moment
|
| real(wp), intent(out) | mct |
| type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf |
| real(wp), intent(inout) | rm |
| integer, intent(in) | j |
| integer, intent(in) | k |
| integer, intent(in) | l |
Contains module m_phase_change.
Definition in file m_phase_change.fpp.f90.