Replacing the specific twoPhaseChangeModel with a consistent and general fvModel interface will support not just cavitation using the new VoFCavitation fvModel but also other phase-change and interface manipulation models in the future and is easier to use for case-specific and other user customisation.
33 lines
669 B
C++
33 lines
669 B
C++
fvVectorMatrix UEqn
|
|
(
|
|
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
|
+ MRF.DDt(rho, U)
|
|
+ turbulence.divDevTau(rho, U)
|
|
==
|
|
// phaseChange.SU(rho, rhoPhi, U)
|
|
fvModels.source(rho, U)
|
|
);
|
|
|
|
UEqn.relax();
|
|
|
|
fvConstraints.constrain(UEqn);
|
|
|
|
if (pimple.momentumPredictor())
|
|
{
|
|
solve
|
|
(
|
|
UEqn
|
|
==
|
|
fvc::reconstruct
|
|
(
|
|
(
|
|
mixture.surfaceTensionForce()
|
|
- ghf*fvc::snGrad(rho)
|
|
- fvc::snGrad(p_rgh)
|
|
) * mesh.magSf()
|
|
)
|
|
);
|
|
|
|
fvConstraints.constrain(U);
|
|
}
|