mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -185,9 +185,9 @@ int main(int argc, char *argv[])
|
||||
// --- Solve momentum
|
||||
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
|
||||
|
||||
U.dimensionedInternalFieldRef() =
|
||||
rhoU.dimensionedInternalField()
|
||||
/rho.dimensionedInternalField();
|
||||
U.ref() =
|
||||
rhoU()
|
||||
/rho();
|
||||
U.correctBoundaryConditions();
|
||||
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
|
||||
|
||||
@ -240,9 +240,9 @@ int main(int argc, char *argv[])
|
||||
rhoE = rho*(e + 0.5*magSqr(U));
|
||||
}
|
||||
|
||||
p.dimensionedInternalFieldRef() =
|
||||
rho.dimensionedInternalField()
|
||||
/psi.dimensionedInternalField();
|
||||
p.ref() =
|
||||
rho()
|
||||
/psi();
|
||||
p.correctBoundaryConditions();
|
||||
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
|
||||
|
||||
|
||||
@ -178,9 +178,9 @@ int main(int argc, char *argv[])
|
||||
// --- Solve momentum
|
||||
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
|
||||
|
||||
U.dimensionedInternalFieldRef() =
|
||||
rhoU.dimensionedInternalField()
|
||||
/rho.dimensionedInternalField();
|
||||
U.ref() =
|
||||
rhoU()
|
||||
/rho();
|
||||
U.correctBoundaryConditions();
|
||||
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
|
||||
|
||||
@ -233,9 +233,9 @@ int main(int argc, char *argv[])
|
||||
rhoE = rho*(e + 0.5*magSqr(U));
|
||||
}
|
||||
|
||||
p.dimensionedInternalFieldRef() =
|
||||
rho.dimensionedInternalField()
|
||||
/psi.dimensionedInternalField();
|
||||
p.ref() =
|
||||
rho()
|
||||
/psi();
|
||||
p.correctBoundaryConditions();
|
||||
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
);
|
||||
|
||||
// Set the reciprocal time-step from the local Courant number
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
|
||||
fvc::surfaceSum(amaxSf)().dimensionedInternalField()
|
||||
fvc::surfaceSum(amaxSf)()()
|
||||
/((2*maxCo)*mesh.V())
|
||||
);
|
||||
|
||||
|
||||
@ -26,11 +26,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(phi))().dimensionedInternalField()
|
||||
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField())
|
||||
fvc::surfaceSum(mag(phi))()()
|
||||
/((2*maxCo)*mesh.V()*rho())
|
||||
);
|
||||
|
||||
if (pimple.transonic())
|
||||
@ -41,11 +41,11 @@
|
||||
fvc::interpolate(psi)*fvc::flux(U)
|
||||
);
|
||||
|
||||
rDeltaT.dimensionedInternalFieldRef() = max
|
||||
rDeltaT.ref() = max
|
||||
(
|
||||
rDeltaT.dimensionedInternalField(),
|
||||
fvc::surfaceSum(mag(phid))().dimensionedInternalField()
|
||||
/((2*maxCo)*mesh.V()*psi.dimensionedInternalField())
|
||||
rDeltaT(),
|
||||
fvc::surfaceSum(mag(phid))()()
|
||||
/((2*maxCo)*mesh.V()*psi())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user