|
MFC
Exascale flow solver
|
Phase transition relaxation solvers for liquid-vapor flows with cavitation and boiling. More...
Functions/Subroutines | |
| impure subroutine, public | s_relaxation_solver (q_cons_vf) |
| Dispatch to the correct relaxation solver. Replaces the procedure pointer, which CCE is breaking on. | |
| impure subroutine, public | 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 | s_infinite_relaxation_k (q_cons_vf) |
| Apply pT- or pTg-equilibrium relaxation with mass depletion based on the incoming state conditions. | |
| subroutine | 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 | 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 | 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 | s_finalize_relaxation_solver_module |
| Finalize the phase change module. | |
Variables | |
Parameters for the first order transition phase change | |
| integer, parameter | max_iter = 100000 |
| max Newton iterations before accepting the last iterate | |
| real(wp), parameter | pcr = 4.94e7_wp |
| Critical pressure of water [Pa]. | |
| real(wp), parameter | tcr = 385.05_wp + 273.15_wp |
| Critical temperature of water [K]. | |
| integer, parameter | ptg_ls_max = 30 |
| max backtracking-line-search halvings in the pTg solver | |
| real(wp), parameter | mixm = 1.0e-8_wp |
| Mixture mass fraction threshold for triggering phase change. | |
| integer, parameter | lp = 1 |
| index for the liquid phase of the reacting fluid | |
| integer, parameter | vp = 2 |
| index for the vapor phase of the reacting fluid | |
Phase transition relaxation solvers for liquid-vapor flows with cavitation and boiling.
|
private |
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.
Definition at line 745 of file m_phase_change.fpp.f90.
| impure subroutine, public m_phase_change::s_finalize_relaxation_solver_module |
Finalize the phase change module.
Definition at line 1020 of file m_phase_change.fpp.f90.
|
private |
Apply pT-equilibrium relaxation for N fluids.
| MFL | flag: 0=gas, 1=liquid, 2=mixture |
Definition at line 589 of file m_phase_change.fpp.f90.
|
private |
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.
Definition at line 816 of file m_phase_change.fpp.f90.
| subroutine, public m_phase_change::s_infinite_relaxation_k | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf | ) |
Apply pT- or pTg-equilibrium relaxation with mass depletion based on the incoming state conditions.
Generic loop iterators
Definition at line 385 of file m_phase_change.fpp.f90.
| 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).
Definition at line 380 of file m_phase_change.fpp.f90.
| impure subroutine, public m_phase_change::s_relaxation_solver | ( | type(scalar_field), dimension(sys_size), intent(inout) | q_cons_vf | ) |
Dispatch to the correct relaxation solver. Replaces the procedure pointer, which CCE is breaking on.
Definition at line 364 of file m_phase_change.fpp.f90.
|
private |
index for the liquid phase of the reacting fluid
Definition at line 357 of file m_phase_change.fpp.f90.
|
private |
max Newton iterations before accepting the last iterate
Definition at line 352 of file m_phase_change.fpp.f90.
|
private |
Mixture mass fraction threshold for triggering phase change.
Definition at line 356 of file m_phase_change.fpp.f90.
|
private |
Critical pressure of water [Pa].
Definition at line 353 of file m_phase_change.fpp.f90.
|
private |
max backtracking-line-search halvings in the pTg solver
Definition at line 355 of file m_phase_change.fpp.f90.
|
private |
Critical temperature of water [K].
Definition at line 354 of file m_phase_change.fpp.f90.
|
private |
index for the vapor phase of the reacting fluid
Definition at line 358 of file m_phase_change.fpp.f90.