MFC: Post-Process
High-fidelity multiphase flow simulation
Loading...
Searching...
No Matches
m_phase_change Module Reference

energies (6-eqn to 4-eqn) equilibrium through an infinitely fast (algebraic) procedure. More...

Functions/Subroutines

impure subroutine, public s_relaxation_solver (q_cons_vf)
 This subroutine should dispatch to the correct relaxation solver based some parameter. It replaces the procedure pointer, which CCE is breaking on.
 
impure subroutine, public s_initialize_phasechange_module
 The purpose of this subroutine is to initialize the phase change module by setting the parameters needed for phase change and selecting the phase change module that will be used (pT- or pTg-equilibrium)
 
subroutine, public s_infinite_relaxation_k (q_cons_vf)
 This subroutine is created to activate either the pT- (N fluids) or the pTg-equilibrium (2 fluids for g-equilibrium) model, also considering mass depletion, depending on the incoming state conditions.
 
subroutine s_infinite_pt_relaxation_k (j, k, l, mfl, ps, p_infpt, q_cons_vf, rhoe, ts)
 This auxiliary subroutine is created to activate the pT-equilibrium for N fluids.
 
subroutine s_infinite_ptg_relaxation_k (j, k, l, ps, p_infpt, rhoe, q_cons_vf, ts)
 This auxiliary subroutine is created to activate the pTg-equilibrium for N fluids under pT and 2 fluids under pTg-equilibrium. There is a final common p and T during relaxation.
 
subroutine s_compute_jacobian_matrix (invjac, j, jac, k, l, mcpd, mcvgp, mcvgp2, ps, q_cons_vf, tjac)
 This auxiliary subroutine calculates the 2 x 2 Jacobian and, its inverse and transpose to be used in the pTg-equilibirium procedure.
 
subroutine s_compute_ptg_residue (j, k, l, mcpd, mcvgp, mqd, q_cons_vf, ps, rhoe, r2d)
 This auxiliary subroutine computes the residue of the pTg-equilibrium procedure.
 
elemental subroutine s_tsat (psat, tsat, tsin)
 This auxiliary subroutine finds the Saturation temperature for a given saturation pressure through a newton solver.
 
impure subroutine, public s_finalize_relaxation_solver_module
 This subroutine finalizes the phase change module.
 

Variables

Parameters for the first order transition phase change
integer, parameter max_iter = 1e8_wp
 max # of iterations
 
real(wp), parameter pcr = 4.94e7_wp
 Critical water pressure.
 
real(wp), parameter tcr = 385.05_wp + 273.15_wp
 Critical water temperature.
 
real(wp), parameter mixm = 1.0e-8_wp
 threshold for 'mixture cell'. If Y < mixM, phase change does not happen
 
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
 
Gibbs free energy phase change parameters
real(wpa
 
real(wpb
 
real(wpc
 
real(wpd
 

Detailed Description

energies (6-eqn to 4-eqn) equilibrium through an infinitely fast (algebraic) procedure.

Function/Subroutine Documentation

◆ s_compute_jacobian_matrix()

subroutine m_phase_change::s_compute_jacobian_matrix ( real(wp), dimension(2, 2), intent(out) invjac,
integer, intent(in) j,
real(wp), dimension(2, 2), intent(out) jac,
integer, intent(in) k,
integer, intent(in) l,
real(wp), intent(in) mcpd,
real(wp), intent(in) mcvgp,
real(wp), intent(in) mcvgp2,
real(wp), intent(in) ps,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(wp), dimension(2, 2), intent(out) tjac )

This auxiliary subroutine calculates the 2 x 2 Jacobian and, its inverse and transpose to be used in the pTg-equilibirium procedure.

Parameters
InvJacInverse of the Jacobian Matrix
jgeneric loop iterator for x direction
JacJacobian Matrix
kgeneric loop iterator for y direction
lgeneric loop iterator for z direction
mCPDsum of the total alpha*rho*cp
mCVGPauxiliary variable for the calculation of the matrices: alpha*rho*cv*(g-1)/press
mCVGP2auxiliary variable for the calculation of the matrices: alpha*rho*cv*(g-1)/press^2
pSequilibrium pressure at the interface
q_cons_vfCell-average conservative variables
TJacTranspose of the Jacobian Matrix
Here is the caller graph for this function:

◆ s_compute_ptg_residue()

subroutine m_phase_change::s_compute_ptg_residue ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
real(wp), intent(in) mcpd,
real(wp), intent(in) mcvgp,
real(wp), intent(in) mqd,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(wp), intent(in) ps,
real(wp), intent(in) rhoe,
real(wp), dimension(2), intent(out) r2d )

This auxiliary subroutine computes the residue of the pTg-equilibrium procedure.

Parameters
jgeneric loop iterator for x direction
kgeneric loop iterator for y direction
lgeneric loop iterator for z direction
mCPDsum of the total alpha*rho*cp
mCVGPauxiliary variable for the calculation of the matrices: alpha*rho*cv*(g-1)/press
mQDsum of the total alpha*rho*qv
q_cons_vfCell-average conservative variables
pSequilibrium pressure at the interface
rhoemixture energy
R2D(2D) residue array
Here is the caller graph for this function:

◆ s_finalize_relaxation_solver_module()

impure subroutine, public m_phase_change::s_finalize_relaxation_solver_module

This subroutine finalizes the phase change module.

◆ s_infinite_pt_relaxation_k()

subroutine m_phase_change::s_infinite_pt_relaxation_k ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
integer, intent(in) mfl,
real(wp), intent(out) ps,
real(wp), dimension(num_fluids), intent(out) p_infpt,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(wp), intent(in) rhoe,
real(wp), intent(out) ts )

This auxiliary subroutine is created to activate the pT-equilibrium for N fluids.

Parameters
jgeneric loop iterator for x direction
kgeneric loop iterator for y direction
lgeneric loop iterator for z direction
MFLflag that tells whether the fluid is gas (0), liquid (1), or a mixture (2)
pSequilibrium pressure at the interface
p_infpTstiffness for the participating fluids under pT-equilibrium
rMsum of the reacting masses
q_cons_vfCell-average conservative variables
rhoemixture energy
TSequilibrium temperature at the interface
Here is the caller graph for this function:

◆ s_infinite_ptg_relaxation_k()

subroutine m_phase_change::s_infinite_ptg_relaxation_k ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
real(wp), intent(inout) ps,
real(wp), dimension(num_fluids), intent(in) p_infpt,
real(wp), intent(in) rhoe,
type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
real(wp), intent(inout) ts )

This auxiliary subroutine is created to activate the pTg-equilibrium for N fluids under pT and 2 fluids under pTg-equilibrium. There is a final common p and T during relaxation.

Parameters
jgeneric loop iterator for x direction
kgeneric loop iterator for y direction
lgeneric loop iterator for z direction
pSequilibrium pressure at the interface
p_infpTstiffness for the participating fluids under pT-equilibrium
rhoemixture energy
q_cons_vfCell-average conservative variables
TSequilibrium temperature at the interface
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_infinite_relaxation_k()

subroutine, public m_phase_change::s_infinite_relaxation_k ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf)

This subroutine is created to activate either the pT- (N fluids) or the pTg-equilibrium (2 fluids for g-equilibrium) model, also considering mass depletion, depending on the incoming state conditions.

Parameters
q_cons_vfCell-average conservative variables
Here is the call graph for this function:

◆ s_initialize_phasechange_module()

impure subroutine, public m_phase_change::s_initialize_phasechange_module

The purpose of this subroutine is to initialize the phase change module by setting the parameters needed for phase change and selecting the phase change module that will be used (pT- or pTg-equilibrium)

◆ s_relaxation_solver()

impure subroutine, public m_phase_change::s_relaxation_solver ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf)

This subroutine should dispatch to the correct relaxation solver based some parameter. It replaces the procedure pointer, which CCE is breaking on.

◆ s_tsat()

elemental subroutine m_phase_change::s_tsat ( real(wp), intent(in) psat,
real(wp), intent(out) tsat,
real(wp), intent(in) tsin )

This auxiliary subroutine finds the Saturation temperature for a given saturation pressure through a newton solver.

Parameters
pSatSaturation Pressure
TSatSaturation Temperature
TSInequilibrium Temperature
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ a

real(wp) m_phase_change::a

◆ b

real(wp) m_phase_change::b

◆ c

real(wp) m_phase_change::c

◆ d

real(wp) m_phase_change::d

◆ lp

integer, parameter m_phase_change::lp = 1

index for the liquid phase of the reacting fluid

◆ max_iter

integer, parameter m_phase_change::max_iter = 1e8_wp

max # of iterations

◆ mixm

real(wp), parameter m_phase_change::mixm = 1.0e-8_wp

threshold for 'mixture cell'. If Y < mixM, phase change does not happen

◆ pcr

real(wp), parameter m_phase_change::pcr = 4.94e7_wp

Critical water pressure.

◆ tcr

real(wp), parameter m_phase_change::tcr = 385.05_wp + 273.15_wp

Critical water temperature.

◆ vp

integer, parameter m_phase_change::vp = 2

index for the vapor phase of the reacting fluid