GeometricField::dimensionedInteralFieldRef() -> GeometricField::ref()
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()".
This commit is contained in:
@ -56,11 +56,11 @@
|
||||
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
|
||||
|
||||
// Set the reciprocal time-step from the local Courant number
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
|
||||
fvc::surfaceSum(mag(rhoPhi))().dimensionedInternalField()
|
||||
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField())
|
||||
fvc::surfaceSum(mag(rhoPhi))()()
|
||||
/((2*maxCo)*mesh.V()*rho())
|
||||
);
|
||||
|
||||
if (maxAlphaCo < maxCo)
|
||||
@ -70,12 +70,12 @@
|
||||
|
||||
volScalarField alpha1Bar(fvc::average(alpha1));
|
||||
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
rDeltaT.dimensionedInternalField(),
|
||||
pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin)
|
||||
*pos(alphaSpreadMax - alpha1Bar.dimensionedInternalField())
|
||||
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
|
||||
rDeltaT(),
|
||||
pos(alpha1Bar() - alphaSpreadMin)
|
||||
*pos(alphaSpreadMax - alpha1Bar())
|
||||
*fvc::surfaceSum(mag(phi))()()
|
||||
/((2*maxAlphaCo)*mesh.V())
|
||||
);
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||
slamDampCoeff
|
||||
*max
|
||||
(
|
||||
mag(U.dimensionedInternalField()) - maxSlamVelocity,
|
||||
mag(U()) - maxSlamVelocity,
|
||||
dimensionedScalar("U0", dimVelocity, 0)
|
||||
)
|
||||
/pow(mesh.V(), 1.0/3.0),
|
||||
|
||||
@ -26,10 +26,10 @@
|
||||
}
|
||||
|
||||
// Set the reciprocal time-step from the local Courant number
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
|
||||
fvc::surfaceSum(maxPhi)().dimensionedInternalField()
|
||||
fvc::surfaceSum(maxPhi)()()
|
||||
/((2*maxCo)*mesh.V())
|
||||
);
|
||||
|
||||
|
||||
@ -19,10 +19,10 @@
|
||||
);
|
||||
|
||||
// Set the reciprocal time-step from the local Courant number
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
|
||||
fvc::surfaceSum(max(mag(phi1), mag(phi2)))().dimensionedInternalField()
|
||||
fvc::surfaceSum(max(mag(phi1), mag(phi2)))()()
|
||||
/((2*maxCo)*mesh.V())
|
||||
);
|
||||
|
||||
|
||||
@ -212,26 +212,26 @@ void Foam::twoPhaseSystem::solve()
|
||||
{
|
||||
tdgdt =
|
||||
(
|
||||
alpha2.dimensionedInternalField()
|
||||
*phase1_.divU()().dimensionedInternalField()
|
||||
- alpha1.dimensionedInternalField()
|
||||
*phase2_.divU()().dimensionedInternalField()
|
||||
alpha2()
|
||||
*phase1_.divU()()()
|
||||
- alpha1()
|
||||
*phase2_.divU()()()
|
||||
);
|
||||
}
|
||||
else if (phase1_.divU().valid())
|
||||
{
|
||||
tdgdt =
|
||||
(
|
||||
alpha2.dimensionedInternalField()
|
||||
*phase1_.divU()().dimensionedInternalField()
|
||||
alpha2()
|
||||
*phase1_.divU()()()
|
||||
);
|
||||
}
|
||||
else if (phase2_.divU().valid())
|
||||
{
|
||||
tdgdt =
|
||||
(
|
||||
- alpha1.dimensionedInternalField()
|
||||
*phase2_.divU()().dimensionedInternalField()
|
||||
- alpha1()
|
||||
*phase2_.divU()()()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user