MFC: Simulation
High-fidelity multiphase flow simulation
Loading...
Searching...
No Matches
m_phase_change.fpp.f90 File Reference

Functions/Subroutines

program __m_phase_change_fpp_f90__
 
subroutine 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 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, rm, 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.
 
subroutine s_tsat (psat, tsat, tsin)
 This auxiliary subroutine finds the Saturation temperature for a given saturation pressure through a newton solver.
 
subroutine s_finalize_relaxation_solver_module ()
 This subroutine finalizes the phase change module.
 

Variables

variables for the correction of the reacting partial densities

This auxiliary subroutine corrects 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

Parameters
MCTpartial density correction parameter
q_cons_vfCell-average conservative variables
rMsum of the reacting masses
jgeneric loop iterator for x direction
kgeneric loop iterator for y direction
lgeneric loop iterator for z direction
type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf
 
real(kind(0.0d0)), intent(inout) rm
 
real(kind(0.0d0)), intent(out) mct
 
integer, intent(in) j
 
integer, intent(in) k
 
integer, intent(in) l
 

Function/Subroutine Documentation

◆ __m_phase_change_fpp_f90__()

program __m_phase_change_fpp_f90__
Here is the call graph for this function:

◆ s_compute_jacobian_matrix()

subroutine __m_phase_change_fpp_f90__::s_compute_jacobian_matrix ( real(kind(0.0d0)), dimension(2, 2), intent(out) invjac,
integer, intent(in) j,
real(kind(0.0d0)), dimension(2, 2), intent(out) jac,
integer, intent(in) k,
integer, intent(in) l,
real(kind(0.0d0)), intent(in) mcpd,
real(kind(0.0d0)), intent(in) mcvgp,
real(kind(0.0d0)), intent(in) mcvgp2,
real(kind(0.0d0)), intent(in) ps,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(kind(0.0d0)), dimension(2, 2), intent(out) tjac )
private

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_fpp_f90__::s_compute_ptg_residue ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
real(kind(0.0d0)), intent(in) mcpd,
real(kind(0.0d0)), intent(in) mcvgp,
real(kind(0.0d0)), intent(in) mqd,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(kind(0.0d0)), intent(in) ps,
real(kind(0.0d0)), intent(in) rhoe,
real(kind(0.0d0)), dimension(2), intent(out) r2d )
private

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()

subroutine __m_phase_change_fpp_f90__::s_finalize_relaxation_solver_module
private

This subroutine finalizes the phase change module.

Here is the caller graph for this function:

◆ s_infinite_pt_relaxation_k()

subroutine __m_phase_change_fpp_f90__::s_infinite_pt_relaxation_k ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
integer, intent(in) mfl,
real(kind(0.0d0)), intent(out) ps,
real(kind(0.0d0)), dimension(num_fluids), intent(out) p_infpt,
real(kind(0.0d0)), intent(in) rm,
type(scalar_field), dimension(sys_size), intent(in) q_cons_vf,
real(kind(0.0d0)), intent(in) rhoe,
real(kind(0.0d0)), intent(out) ts )
private

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 pure gas (0), pure 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_fpp_f90__::s_infinite_ptg_relaxation_k ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
real(kind(0.0d0)), intent(inout) ps,
real(kind(0.0d0)), dimension(num_fluids), intent(in) p_infpt,
real(kind(0.0d0)), intent(in) rhoe,
type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
real(kind(0.0d0)), intent(inout) ts )
private

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 __m_phase_change_fpp_f90__::s_infinite_relaxation_k ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf)
private

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:
Here is the caller graph for this function:

◆ s_initialize_phasechange_module()

subroutine __m_phase_change_fpp_f90__::s_initialize_phasechange_module
private

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)

Here is the caller graph for this function:

◆ s_tsat()

subroutine __m_phase_change_fpp_f90__::s_tsat ( real(kind(0.0d0)), intent(in) psat,
real(kind(0.0d0)), intent(out) tsat,
real(kind(0.0d0)), intent(in) tsin )
private

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 caller graph for this function:

Variable Documentation

◆ j

integer, intent(in) j

◆ k

integer, intent(in) k

◆ l

integer, intent(in) l

◆ mct

real(kind(0.0d0)), intent(out) mct

◆ q_cons_vf

type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf

◆ rm

real(kind(0.0d0)), intent(inout) rm