Commit 9971916e authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: orientedFields - refectored and simplified usage

parent 7e76d391
......@@ -120,13 +120,14 @@ int main(int argc, char *argv[])
"cSf_pos",
interpolate(c, pos, T.name())*mesh.magSf()
);
cSf_pos.oriented().oriented() = true;
cSf_pos.setOriented();
surfaceScalarField cSf_neg
(
"cSf_neg",
interpolate(c, neg, T.name())*mesh.magSf()
);
cSf_neg.oriented().oriented() = true;
cSf_neg.setOriented();
surfaceScalarField ap
(
......
......@@ -101,13 +101,14 @@ int main(int argc, char *argv[])
"cSf_pos",
interpolate(c, pos, T.name())*mesh.magSf()
);
cSf_pos.oriented().oriented() = true;
cSf_pos.setOriented();
surfaceScalarField cSf_neg
(
"cSf_neg",
interpolate(c, neg, T.name())*mesh.magSf()
);
cSf_neg.oriented().oriented() = true;
cSf_neg.setOriented();
surfaceScalarField ap
(
......
......@@ -13,8 +13,6 @@ if (nAlphaSubCycles > 1)
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
......
......@@ -21,8 +21,6 @@
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
......
......@@ -113,8 +113,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
rhoPhi_.oriented().oriented() = true;
rhoPhi_.setOriented();
calcAlphas();
alphas_.write();
correct();
......@@ -700,7 +699,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
);
surfaceScalarField& stf = tstf.ref();
stf.oriented().oriented() = true;
stf.setOriented();
forAllConstIter(PtrDictionary<phaseModel>, phases_, phase1)
{
......
......@@ -104,7 +104,6 @@ int main(int argc, char *argv[])
mesh,
dimensionedScalar("0", dimMass/dimTime, 0)
);
rhoPhi.oriented().oriented() = true;
mixture->correct();
......
......@@ -13,8 +13,6 @@ if (nAlphaSubCycles > 1)
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
tmp<volScalarField> trSubDeltaT;
if (LTS)
......
......@@ -12,7 +12,6 @@ if (nAlphaSubCycles > 1)
mesh,
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
......
......@@ -100,8 +100,6 @@ int main(int argc, char *argv[])
mesh,
dimensionedScalar("0", dimMass/dimTime, 0)
);
rhoPhi.oriented().oriented() = true;
mixture->correct();
......
......@@ -39,7 +39,6 @@ surfaceScalarField phi
mesh,
dimensionedScalar("phi", dimArea*dimVelocity, 0)
);
phi.oriented().oriented() = true;
multiphaseSystem fluid(U, phi);
......
......@@ -815,8 +815,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
)
);
tSurfaceTension.ref().oriented().oriented() = true;
tSurfaceTension.ref().setOriented();
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
{
......@@ -920,8 +919,6 @@ void Foam::multiphaseSystem::solve()
)
);
alphaPhiSums[phasei].oriented().oriented() = true;
phasei++;
}
......
......@@ -113,7 +113,7 @@ Foam::phaseModel::phaseModel
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
{
alphaPhi_.oriented().oriented() = true;
alphaPhi_.setOriented();
const word phiName = IOobject::groupName("phi", name_);
......
......@@ -57,7 +57,6 @@
mesh,
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
);
phiHbyA.oriented().oriented() = true;
volScalarField rho("rho", fluid.rho());
surfaceScalarField ghSnGradRho(ghf*fvc::snGrad(rho)*mesh.magSf());
......
......@@ -128,7 +128,7 @@ Foam::multiphaseMixture::multiphaseMixture
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
rhoPhi_.oriented().oriented() = true;
rhoPhi_.setOriented();
calcAlphas();
alphas_.write();
......@@ -275,7 +275,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
);
surfaceScalarField& stf = tstf.ref();
stf.oriented().oriented() = true;
stf.setOriented();
forAllConstIter(PtrDictionary<phase>, phases_, iter1)
{
......@@ -338,8 +338,6 @@ void Foam::multiphaseMixture::solve()
dimensionedScalar("0", rhoPhi_.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
dimensionedScalar totalDeltaT = runTime.deltaT();
for
......
......@@ -455,8 +455,7 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const
dimensionedScalar("zero", ModelType::dimF*dimArea, 0)
)
);
x.ref().oriented().oriented() = true;
x.ref().setOriented();
if (model_.valid())
{
......
......@@ -365,7 +365,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff
)
);
tFf.ref().oriented().oriented() = true;
tFf.ref().setOriented();
return tFf;
}
......@@ -626,7 +626,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD
)
);
phiDs[phasei].oriented().oriented() = true;
phiDs[phasei].setOriented();
}
return phiDs[phasei];
......
......@@ -200,8 +200,8 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
dimensionedScalar("0", dimDensity/dimTime, 0)
)
{
alphaPhi_.oriented().oriented() = true;
alphaRhoPhi_.oriented().oriented() = true;
alphaPhi_.setOriented();
alphaRhoPhi_.setOriented();
phi_.writeOpt() = IOobject::AUTO_WRITE;
correctKinematics();
......
......@@ -558,7 +558,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
);
tSurfaceTension.ref().oriented().oriented() = true;
tSurfaceTension.ref().setOriented();
forAll(phases(), phasej)
{
......@@ -665,8 +665,6 @@ void Foam::multiphaseSystem::solve()
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
);
alphaPhiSums[phasei].oriented().oriented() = true;
}
for
......
......@@ -169,8 +169,6 @@ while (pimple.correct())
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
);
phiHbyA.oriented().oriented() = true;
forAll(phases, phasei)
{
phaseModel& phase = phases[phasei];
......
......@@ -14,7 +14,6 @@ if (nAlphaSubCycles > 1)
mesh,
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment