ENH: Oriented fields - updated dependent code

This commit is contained in:
Andrew Heather
2017-04-27 14:47:48 +01:00
parent 8886e90870
commit b9379426c9
20 changed files with 49 additions and 2 deletions

View File

@ -13,6 +13,8 @@ if (nAlphaSubCycles > 1)
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);

View File

@ -21,6 +21,8 @@
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);

View File

@ -113,6 +113,8 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
rhoPhi_.oriented().oriented() = true;
calcAlphas();
alphas_.write();
correct();
@ -698,6 +700,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const
);
surfaceScalarField& stf = tstf.ref();
stf.oriented().oriented() = true;
forAllConstIter(PtrDictionary<phaseModel>, phases_, phase1)
{

View File

@ -104,6 +104,7 @@ int main(int argc, char *argv[])
mesh,
dimensionedScalar("0", dimMass/dimTime, 0)
);
rhoPhi.oriented().oriented() = true;
mixture->correct();

View File

@ -12,6 +12,7 @@ if (nAlphaSubCycles > 1)
mesh,
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(

View File

@ -100,6 +100,8 @@ int main(int argc, char *argv[])
mesh,
dimensionedScalar("0", dimMass/dimTime, 0)
);
rhoPhi.oriented().oriented() = true;
mixture->correct();

View File

@ -39,6 +39,7 @@ surfaceScalarField phi
mesh,
dimensionedScalar("phi", dimArea*dimVelocity, 0)
);
phi.oriented().oriented() = true;
multiphaseSystem fluid(U, phi);

View File

@ -816,6 +816,8 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
);
tSurfaceTension.ref().oriented().oriented() = true;
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
{
const phaseModel& phase2 = iter();
@ -918,6 +920,8 @@ void Foam::multiphaseSystem::solve()
)
);
alphaPhiSums[phasei].oriented().oriented() = true;
phasei++;
}

View File

@ -113,6 +113,8 @@ Foam::phaseModel::phaseModel
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
{
alphaPhi_.oriented().oriented() = true;
const word phiName = IOobject::groupName("phi", name_);
IOobject phiHeader

View File

@ -57,6 +57,7 @@
mesh,
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
);
phiHbyA.oriented().oriented() = true;
volScalarField rho("rho", fluid.rho());
surfaceScalarField ghSnGradRho(ghf*fvc::snGrad(rho)*mesh.magSf());

View File

@ -128,6 +128,8 @@ Foam::multiphaseMixture::multiphaseMixture
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
rhoPhi_.oriented().oriented() = true;
calcAlphas();
alphas_.write();
}
@ -273,6 +275,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
);
surfaceScalarField& stf = tstf.ref();
stf.oriented().oriented() = true;
forAllConstIter(PtrDictionary<phase>, phases_, iter1)
{
@ -335,6 +338,8 @@ void Foam::multiphaseMixture::solve()
dimensionedScalar("0", rhoPhi_.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
dimensionedScalar totalDeltaT = runTime.deltaT();
for

View File

@ -456,6 +456,8 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const
)
);
x.ref().oriented().oriented() = true;
if (model_.valid())
{
x.ref() += model_->Ff()*(scalar(1) - f1() - f2());

View File

@ -347,7 +347,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff
}
else
{
return tmp<surfaceScalarField>
tmp<surfaceScalarField> tFf
(
new surfaceScalarField
(
@ -364,6 +364,10 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff
dimensionedScalar("zero", liftModel::dimF*dimArea, 0)
)
);
tFf.ref().oriented().oriented() = true;
return tFf;
}
}
@ -621,6 +625,8 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD
)
)
);
phiDs[phasei].oriented().oriented() = true;
}
return phiDs[phasei];

View File

@ -200,6 +200,9 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
dimensionedScalar("0", dimDensity/dimTime, 0)
)
{
alphaPhi_.oriented().oriented() = true;
alphaRhoPhi_.oriented().oriented() = true;
phi_.writeOpt() = IOobject::AUTO_WRITE;
correctKinematics();
}

View File

@ -558,6 +558,8 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension
)
);
tSurfaceTension.ref().oriented().oriented() = true;
forAll(phases(), phasej)
{
const phaseModel& phase2 = phases()[phasej];
@ -663,6 +665,8 @@ void Foam::multiphaseSystem::solve()
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
);
alphaPhiSums[phasei].oriented().oriented() = true;
}
for

View File

@ -169,6 +169,8 @@ while (pimple.correct())
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
);
phiHbyA.oriented().oriented() = true;
forAll(phases, phasei)
{
phaseModel& phase = phases[phasei];

View File

@ -14,6 +14,7 @@ if (nAlphaSubCycles > 1)
mesh,
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
rhoPhiSum.oriented().oriented() = true;
for
(

View File

@ -109,6 +109,9 @@ Foam::phaseModel::phaseModel
dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0)
)
{
alphaPhi_.oriented().oriented() = true;
alphaRhoPhi_.oriented().oriented() = true;
thermo_->validate("phaseModel " + name_, "h", "e");
const word phiName = IOobject::groupName("phi", name_);

View File

@ -28,7 +28,6 @@ License
#include "dictionary.H"
#include "contiguous.H"
#include "mapDistributeBase.H"
#include "flipOp.H"
// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //

View File

@ -1195,6 +1195,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr
"ddt0(" + phi.name() + ')',
phi.dimensions()
);
dphidt0.oriented().oriented() = true;
dimensionedScalar rDtCoef = rDtCoef_(ddt0);
@ -1439,6 +1440,8 @@ tmp<surfaceScalarField> CrankNicolsonDdtScheme<Type>::meshPhi
dimVolume
);
meshPhi0.oriented().oriented() = true;
if (evaluate(meshPhi0))
{
meshPhi0 =