Merged all multiphase developments in OpenFOAM-1.7.x

This commit is contained in:
Henry
2010-09-29 22:22:48 +01:00
parent fbf4d9ec10
commit 89ee9b3e0f
406 changed files with 32059 additions and 34733 deletions

View File

@ -5,12 +5,13 @@ EXE_INC = \
-IincompressibleThreePhaseMixture \
-IthreePhaseInterfaceProperties \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels
EXE_LIBS = \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \

View File

@ -0,0 +1,61 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
CourantNo
Description
Calculates and outputs the mean and maximum Courant Numbers.
\*---------------------------------------------------------------------------*/
scalar maxAlphaCo
(
readScalar(runTime.controlDict().lookup("maxAlphaCo"))
);
scalar alphaCoNum = 0.0;
scalar meanAlphaCoNum = 0.0;
if (mesh.nInternalFaces())
{
surfaceScalarField alpha1f = fvc::interpolate(alpha1);
surfaceScalarField alpha2f = fvc::interpolate(alpha2);
surfaceScalarField SfUfbyDelta = max
(
pos(alpha1f - 0.01)*pos(0.99 - alpha1f),
pos(alpha2f - 0.01)*pos(0.99 - alpha2f)
)*mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
alphaCoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();
meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();
}
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
<< " max: " << alphaCoNum << endl;
// ************************************************************************* //

View File

@ -1,9 +1,9 @@
Info<< "Reading field p\n" << endl;
volScalarField p
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p",
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
@ -73,7 +73,7 @@
mesh
);
# include "createPhi.H"
#include "createPhi.H"
threePhaseMixture threePhaseProperties(U, phi);
@ -116,11 +116,6 @@
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
// Construct interface from alpha distribution
threePhaseInterfaceProperties interface(threePhaseProperties);
@ -130,3 +125,43 @@
(
incompressible::turbulenceModel::New(U, phi, threePhaseProperties)
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rho*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
mesh.solutionDict().subDict("PISO"),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rho*gh;
}

View File

@ -62,6 +62,7 @@ int main(int argc, char *argv[])
#include "readPISOControls.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H"
runTime++;