Files
openfoam/applications/solvers/multiphase/reactingMultiphaseEulerFoam/pUf/UEqns.H
Mark Olesen 03526e2097 ENH: centralize more libraries in src/phaseSystemModels
- prelude to code refactoring

NOTE
    no source code change in this commit, only relocation,
    renaming and adjustment of Make/{files,options}
2020-08-05 18:56:22 +01:00

41 lines
1.1 KiB
C

Info<< "Constructing face momentum equations" << endl;
PtrList<fvVectorMatrix> UEqns(phases.size());
{
fluid.momentumTransfer(); // !!! Update coefficients shouldn't be necessary
// This should be done on demand
autoPtr<phaseSystem::momentumTransferTable>
momentumTransferPtr(fluid.momentumTransferf());
phaseSystem::momentumTransferTable&
momentumTransfer(momentumTransferPtr());
forAll(fluid.movingPhases(), movingPhasei)
{
phaseModel& phase = fluid.movingPhases()[movingPhasei];
const volScalarField& alpha = phase;
const volScalarField& rho = phase.rho();
volVectorField& U = phase.URef();
UEqns.set
(
phase.index(),
new fvVectorMatrix
(
phase.UfEqn()
==
*momentumTransfer[phase.name()]
+ fvOptions(alpha, rho, U)
)
);
UEqns[phase.index()].relax();
fvOptions.constrain(UEqns[phase.index()]);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}