mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- prelude to code refactoring
NOTE
no source code change in this commit, only relocation,
renaming and adjustment of Make/{files,options}
41 lines
1.1 KiB
C
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);
|
|
}
|
|
}
|