GIT: Initial commit after latest foundation merge

This commit is contained in:
andy
2016-04-25 11:40:48 +01:00
4003 changed files with 74634 additions and 37783 deletions

View File

@ -6,4 +6,4 @@ wclean libso phaseChangeTwoPhaseMixtures
wclean
wclean interPhaseChangeDyMFoam
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -1,9 +1,13 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake libso phaseChangeTwoPhaseMixtures
wmake $targetType phaseChangeTwoPhaseMixtures
wmake
wmake interPhaseChangeDyMFoam
# ----------------------------------------------------------------- end-of-file
#------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
surfaceScalarField phir("phir", phic*interface.nHatf());
Pair<tmp<volScalarField> > vDotAlphal =
Pair<tmp<volScalarField>> vDotAlphal =
mixture->vDotAlphal();
const volScalarField& vDotcAlphal = vDotAlphal[0]();
const volScalarField& vDotvAlphal = vDotAlphal[1]();
@ -62,7 +62,7 @@
if (MULESCorr)
{
talphaPhiCorr() -= talphaPhi();
talphaPhiCorr.ref() -= talphaPhi();
volScalarField alpha100("alpha100", alpha10);
alpha10 = alpha1;
@ -72,7 +72,7 @@
geometricOneField(),
alpha1,
talphaPhi(),
talphaPhiCorr(),
talphaPhiCorr.ref(),
vDotvmcAlphal,
(
divU*(alpha10 - alpha100)
@ -85,12 +85,12 @@
// Under-relax the correction for all but the 1st corrector
if (aCorr == 0)
{
talphaPhi() += talphaPhiCorr();
talphaPhi.ref() += talphaPhiCorr();
}
else
{
alpha1 = 0.5*alpha1 + 0.5*alpha10;
talphaPhi() += 0.5*talphaPhiCorr();
talphaPhi.ref() += 0.5*talphaPhiCorr();
}
}
else
@ -100,7 +100,7 @@
geometricOneField(),
alpha1,
phi,
talphaPhiCorr(),
talphaPhiCorr.ref(),
vDotvmcAlphal,
(divU*alpha1 + vDotcAlphal)(),
1,

View File

@ -51,8 +51,7 @@ volScalarField rho
mesh,
IOobject::READ_IF_PRESENT
),
alpha1*rho1 + alpha2*rho2,
alpha1.boundaryField().types()
alpha1*rho1 + alpha2*rho2
);
rho.oldTime();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,6 @@ Description
#include "pimpleControl.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,14 +1,11 @@
{
rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
surfaceScalarField phiHbyA
(
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
fvc::flux(HbyA)
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
);
@ -29,17 +26,10 @@
phiHbyA += phig;
// Update the fixedFluxPressure BCs to ensure flux consistency
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- (mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, U, phiHbyA, rAUf);
Pair<tmp<volScalarField> > vDotP = mixture->vDotP();
Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
const volScalarField& vDotcP = vDotP[0]();
const volScalarField& vDotvP = vDotP[1]();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,7 +51,6 @@ Description
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,14 +1,11 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
surfaceScalarField phiHbyA
(
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
fvc::flux(HbyA)
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
);
adjustPhi(phiHbyA, U, p_rgh);
@ -23,17 +20,10 @@
phiHbyA += phig;
// Update the fixedFluxPressure BCs to ensure flux consistency
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- (mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, U, phiHbyA, rAUf);
Pair<tmp<volScalarField> > vDotP = mixture->vDotP();
Pair<tmp<volScalarField>> vDotP = mixture->vDotP();
const volScalarField& vDotcP = vDotP[0]();
const volScalarField& vDotvP = vDotP[1]();

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,13 +63,13 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
return Pair<tmp<volScalarField> >
return Pair<tmp<volScalarField>>
(
mcCoeff_*sqr(limitedAlpha1)
*max(p - pSat(), p0_)/max(p - pSat(), 0.01*pSat()),
@ -78,13 +78,13 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const
);
}
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
return Pair<tmp<volScalarField> >
return Pair<tmp<volScalarField>>
(
mcCoeff_*sqr(limitedAlpha1)*(1.0 - limitedAlpha1)
*pos(p - pSat())/max(p - pSat(), 0.01*pSat()),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,11 +105,11 @@ public:
//- Return the mass condensation and vaporisation rates as a
// coefficient to multiply (1 - alphal) for the condensation rate
// and a coefficient to multiply alphal for the vaporisation rate
virtual Pair<tmp<volScalarField> > mDotAlphal() const;
virtual Pair<tmp<volScalarField>> mDotAlphal() const;
//- Return the mass condensation and vaporisation rates as coefficients
// to multiply (p - pSat)
virtual Pair<tmp<volScalarField> > mDotP() const;
virtual Pair<tmp<volScalarField>> mDotP() const;
//- Correct the Kunz phaseChange model
virtual void correct();

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,25 +63,25 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotAlphal() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
return Pair<tmp<volScalarField> >
return Pair<tmp<volScalarField>>
(
mcCoeff_*max(p - pSat(), p0_),
mvCoeff_*min(p - pSat(), p0_)
);
}
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const
{
const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p");
volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1)));
return Pair<tmp<volScalarField> >
return Pair<tmp<volScalarField>>
(
mcCoeff_*(1.0 - limitedAlpha1)*pos(p - pSat()),
(-mvCoeff_)*limitedAlpha1*neg(p - pSat())

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,11 +99,11 @@ public:
//- Return the mass condensation and vaporisation rates as a
// coefficient to multiply (1 - alphal) for the condensation rate
// and a coefficient to multiply alphal for the vaporisation rate
virtual Pair<tmp<volScalarField> > mDotAlphal() const;
virtual Pair<tmp<volScalarField>> mDotAlphal() const;
//- Return the mass condensation and vaporisation rates as coefficients
// to multiply (p - pSat)
virtual Pair<tmp<volScalarField> > mDotP() const;
virtual Pair<tmp<volScalarField>> mDotP() const;
//- Correct the Merkle phaseChange model
virtual void correct();

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,11 +112,11 @@ public:
//- Return the mass condensation and vaporisation rates as a
// coefficient to multiply (1 - alphal) for the condensation rate
// and a coefficient to multiply alphal for the vaporisation rate
virtual Pair<tmp<volScalarField> > mDotAlphal() const;
virtual Pair<tmp<volScalarField>> mDotAlphal() const;
//- Return the mass condensation and vaporisation rates as coefficients
// to multiply (p - pSat)
virtual Pair<tmp<volScalarField> > mDotP() const;
virtual Pair<tmp<volScalarField>> mDotP() const;
//- Correct the SchnerrSauer phaseChange model
virtual void correct();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,26 +50,26 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const
{
volScalarField alphalCoeff(1.0/rho1() - alpha1_*(1.0/rho1() - 1.0/rho2()));
Pair<tmp<volScalarField> > mDotAlphal = this->mDotAlphal();
Pair<tmp<volScalarField>> mDotAlphal = this->mDotAlphal();
return Pair<tmp<volScalarField> >
return Pair<tmp<volScalarField>>
(
alphalCoeff*mDotAlphal[0],
alphalCoeff*mDotAlphal[1]
);
}
Foam::Pair<Foam::tmp<Foam::volScalarField> >
Foam::Pair<Foam::tmp<Foam::volScalarField>>
Foam::phaseChangeTwoPhaseMixture::vDotP() const
{
dimensionedScalar pCoeff(1.0/rho1() - 1.0/rho2());
Pair<tmp<volScalarField> > mDotP = this->mDotP();
Pair<tmp<volScalarField>> mDotP = this->mDotP();
return Pair<tmp<volScalarField> >(pCoeff*mDotP[0], pCoeff*mDotP[1]);
return Pair<tmp<volScalarField>>(pCoeff*mDotP[0], pCoeff*mDotP[1]);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,20 +134,20 @@ public:
//- Return the mass condensation and vaporisation rates as a
// coefficient to multiply (1 - alphal) for the condensation rate
// and a coefficient to multiply alphal for the vaporisation rate
virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
//- Return the mass condensation and vaporisation rates as coefficients
// to multiply (p - pSat)
virtual Pair<tmp<volScalarField> > mDotP() const = 0;
virtual Pair<tmp<volScalarField>> mDotP() const = 0;
//- Return the volumetric condensation and vaporisation rates as a
// coefficient to multiply (1 - alphal) for the condensation rate
// and a coefficient to multiply alphal for the vaporisation rate
Pair<tmp<volScalarField> > vDotAlphal() const;
Pair<tmp<volScalarField>> vDotAlphal() const;
//- Return the volumetric condensation and vaporisation rates as
// coefficients to multiply (p - pSat)
Pair<tmp<volScalarField> > vDotP() const;
Pair<tmp<volScalarField>> vDotP() const;
//- Correct the phaseChange model
virtual void correct() = 0;