In order to simplify expressions involving dimensioned internal field it is preferable to use a simpler access convention. Given that GeometricField is derived from DimensionedField it is simply a matter of de-referencing this underlying type unlike the boundary field which is peripheral information. For consistency with the new convention in "tmp" "dimensionedInteralFieldRef()" has been renamed "ref()".
27 lines
445 B
C
27 lines
445 B
C
// Solve the Momentum equation
|
|
|
|
MRF.correctBoundaryVelocity(U);
|
|
|
|
tmp<fvVectorMatrix> tUEqn
|
|
(
|
|
fvm::ddt(rho, U) + fvm::div(phi, U)
|
|
+ MRF.DDt(rho, U)
|
|
+ turbulence->divDevRhoReff(U)
|
|
==
|
|
rho()*g
|
|
+ parcels.SU(U)
|
|
+ fvOptions(rho, U)
|
|
);
|
|
fvVectorMatrix& UEqn = tUEqn.ref();
|
|
|
|
UEqn.relax();
|
|
|
|
fvOptions.constrain(UEqn);
|
|
|
|
if (pimple.momentumPredictor())
|
|
{
|
|
solve(UEqn == -fvc::grad(p));
|
|
|
|
fvOptions.correct(U);
|
|
K = 0.5*magSqr(U);
|
|
}
|