Explicitly name derived fields to improve readability of diagnostic messages and avoid duplicate registration

This commit is contained in:
Henry
2015-02-12 09:59:52 +00:00
parent 356cbd27f7
commit a4cca549e2
17 changed files with 120 additions and 168 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -957,6 +957,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas
phasei,
new surfaceScalarField
(
phi_.name() + alpha.name(),
fvc::flux
(
phi_,

View File

@ -82,7 +82,7 @@
if (MULESCorr)
{
tmp<surfaceScalarField> tphiAlphaCorr(tphiAlphaUn() - phiAlpha);
volScalarField alpha10(alpha1);
volScalarField alpha10("alpha10", alpha1);
#ifdef LTSSOLVE
MULES::LTScorrect

View File

@ -100,7 +100,7 @@
if (MULESCorr)
{
tmp<surfaceScalarField> tphiAlphaCorr(tphiAlphaUn() - tphiAlpha());
volScalarField alpha10(alpha1);
volScalarField alpha10("alpha10", alpha1);
#ifdef LTSSOLVE
MULES::LTScorrect(alpha1, tphiAlphaUn(), tphiAlphaCorr(), 1, 0);

View File

@ -107,7 +107,7 @@ int main(int argc, char *argv[])
if (pimple.firstIter() || moveMeshOuterCorrectors)
{
// Store divU from the previous mesh for the correctPhi
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,10 +112,10 @@ Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
volScalarField pCoeff(this->pCoeff(p));
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
return Pair<tmp<volScalarField> >
(
Cc_*limitedAlpha1*pCoeff*max(p - pSat(), p0_),
@ -129,9 +129,10 @@ Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
volScalarField pCoeff(this->pCoeff(p));
volScalarField apCoeff(limitedAlpha1*pCoeff(p));
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
volScalarField apCoeff(limitedAlpha1*pCoeff);
return Pair<tmp<volScalarField> >
(

View File

@ -3,6 +3,7 @@
surfaceScalarField phiAlpha
(
phi.name() + alpha1.name(),
fvc::flux
(
phi,

View File

@ -79,12 +79,14 @@ int main(int argc, char *argv[])
volScalarField contErr1
(
"contErr1",
fvc::ddt(alpha1, rho1) + fvc::div(alphaRhoPhi1)
- (fvOptions(alpha1, rho1)&rho1)
);
volScalarField contErr2
(
"contErr2",
fvc::ddt(alpha2, rho2) + fvc::div(alphaRhoPhi2)
- (fvOptions(alpha2, rho2)&rho2)
);