Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2013-08-23 10:56:44 +01:00
151 changed files with 1191 additions and 10472 deletions

View File

@ -59,7 +59,7 @@ int main(int argc, char *argv[])
// function objects so do it ourselves
runTime.functionObjects().start();
fvOptions.relativeFlux(phi);
fvOptions.makeRelative(phi);
adjustPhi(phi, U, p);
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
}
}
fvOptions.absoluteFlux(phi);
fvOptions.makeAbsolute(phi);
Info<< "continuity error = "
<< mag(fvc::div(phi))().weightedAverage(mesh.V()).value()

View File

@ -16,7 +16,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -51,7 +51,7 @@ else
)
);
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -13,7 +13,7 @@ if (pimple.transonic())
*((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -45,7 +45,7 @@ else
*((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -21,7 +21,7 @@ surfaceScalarField phiHbyA
+ phig
);
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -16,7 +16,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -51,7 +51,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -24,7 +24,7 @@
+ phig
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
fvScalarMatrix p_rghDDtEqn
(

View File

@ -18,7 +18,7 @@
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
surfaceScalarField phid("phid", fvc::interpolate(thermo.psi())*phiHbyA);
@ -62,7 +62,7 @@
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
fvScalarMatrix pDDtEqn
(

View File

@ -24,7 +24,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
volScalarField Dp("Dp", rho*rAU);
@ -61,7 +61,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
volScalarField Dp("Dp", rho*rAU);

View File

@ -24,7 +24,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
volScalarField Dp("Dp", rho*rAU);
@ -62,7 +62,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
volScalarField Dp("Dp", rho*rAU);

View File

@ -25,7 +25,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
surfaceScalarField phic
(
@ -71,7 +71,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
HbyA -= (rAU - rAtU)*fvc::grad(p);

View File

@ -15,7 +15,7 @@
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (simple.correctNonOrthogonal())
{
@ -50,7 +50,7 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
closedVolume = adjustPhi(phiHbyA, U, p);

View File

@ -22,7 +22,7 @@
fvc::interpolate(rho*HbyA) & mesh.Sf()
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
closedVolume = adjustPhi(phiHbyA, U, p);

View File

@ -24,7 +24,7 @@
+ phig
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
fvScalarMatrix p_rghDDtEqn
(

View File

@ -17,7 +17,7 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);

View File

@ -19,7 +19,7 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);

View File

@ -24,7 +24,7 @@
+ phig
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
{
fvScalarMatrix p_rghDDtEqn

View File

@ -13,7 +13,7 @@ surfaceScalarField phiHbyA
+ fvc::ddtPhiCorr(rAU, U, phi)
);
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p);

View File

@ -6,7 +6,7 @@
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p);

View File

@ -11,7 +11,7 @@ else
UEqn.clear();
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
mrfZones.relativeFlux(phiHbyA);
mrfZones.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p);

View File

@ -16,7 +16,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -52,7 +52,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -18,7 +18,7 @@ surfaceScalarField phiHbyA
+ phig
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -19,7 +19,7 @@
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
fvScalarMatrix pDDtEqn
(

View File

@ -17,7 +17,7 @@
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (simple.correctNonOrthogonal())
{

View File

@ -16,7 +16,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -52,7 +52,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(psi), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -16,7 +16,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
@ -52,7 +52,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
while (pimple.correctNonOrthogonal())
{

View File

@ -12,7 +12,7 @@
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
adjustPhi(phiHbyA, U, p_rgh);
mrfZones.relativeFlux(phiHbyA);
mrfZones.makeRelative(phiHbyA);
phi = phiHbyA;
surfaceScalarField phig

View File

@ -2,7 +2,6 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso phaseModel
wclean libso multiphaseSystem
wclean libso interfacialModels
wclean

View File

@ -2,9 +2,9 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso phaseModel
wmake libso interfacialModels
wmakeLnInclude interfacialModels
wmake libso multiphaseSystem
wmake libso interfacialModels
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -1,5 +1,4 @@
EXE_INC = \
-IphaseModel/lnInclude \
-ImultiphaseSystem/lnInclude \
-ImultiphaseFixedFluxPressure \
-IinterfacialModels/lnInclude \
@ -15,7 +14,6 @@ EXE_INC = \
EXE_LIBS = \
-lmultiphaseSystem \
-lcompressibleMultiPhaseModel \
-linterfaceProperties \
-lincompressibleTransportModels \
-lcompressibleMultiphaseEulerianInterfacialModels \

View File

@ -1,6 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I../phaseModel/lnInclude
-I../multiphaseSystem/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lcompressibleMultiPhaseModel
-lmultiphaseSystem

View File

@ -1,3 +1,9 @@
phaseModel/phaseModel.C
diameterModels/diameterModel/diameterModel.C
diameterModels/diameterModel/newDiameterModel.C
diameterModels/constantDiameter/constantDiameter.C
diameterModels/isothermalDiameter/isothermalDiameter.C
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
multiphaseSystem.C

View File

@ -8,7 +8,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lcompressibleMultiPhaseModel \
-linterfaceProperties \
-lincompressibleTransportModels \
-lcompressibleMultiphaseEulerianInterfacialModels \

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -125,6 +125,13 @@ void Foam::multiphaseSystem::solveAlphas()
);
}
// Ensure that the flux at inflow BCs is preserved
phiAlphaCorr.boundaryField() = min
(
phase1.phi().boundaryField()*alpha1.boundaryField(),
phiAlphaCorr.boundaryField()
);
MULES::limit
(
geometricOneField(),

View File

@ -27,13 +27,14 @@ License
#include "diameterModel.H"
#include "fixedValueFvPatchFields.H"
#include "slipFvPatchFields.H"
#include "partialSlipFvPatchFields.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phaseModel::phaseModel
(
const word& name,
const word& phaseName,
const dictionary& phaseDict,
const fvMesh& mesh
)
@ -42,7 +43,7 @@ Foam::phaseModel::phaseModel
(
IOobject
(
"alpha" + name,
IOobject::groupName("alpha", phaseName),
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -50,7 +51,7 @@ Foam::phaseModel::phaseModel
),
mesh
),
name_(name),
name_(phaseName),
phaseDict_(phaseDict),
nu_
(
@ -80,7 +81,7 @@ Foam::phaseModel::phaseModel
(
IOobject
(
"U" + name,
IOobject::groupName("U", phaseName),
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -92,7 +93,7 @@ Foam::phaseModel::phaseModel
(
IOobject
(
"DDtU" + name,
IOobject::groupName("DDtU", phaseName),
mesh.time().timeName(),
mesh
),
@ -103,7 +104,7 @@ Foam::phaseModel::phaseModel
(
IOobject
(
"phiAlpha" + name,
IOobject::groupName("phiAlpha", phaseName),
mesh.time().timeName(),
mesh
),
@ -111,7 +112,7 @@ Foam::phaseModel::phaseModel
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
{
const word phiName = "phi" + name;
const word phiName = IOobject::groupName("phi", name_);
IOobject phiHeader
(
@ -157,6 +158,7 @@ Foam::phaseModel::phaseModel
(
isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])
|| isA<slipFvPatchVectorField>(U_.boundaryField()[i])
|| isA<partialSlipFvPatchVectorField>(U_.boundaryField()[i])
)
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -35,8 +35,8 @@
{
phaseModel& phase = iter();
mrfZones.absoluteFlux(phase.phi().oldTime());
mrfZones.absoluteFlux(phase.phi());
mrfZones.makeAbsolute(phase.phi().oldTime());
mrfZones.makeAbsolute(phase.phi());
HbyAs.set(phasei, new volVectorField(phase.U()));
phiHbyAs.set(phasei, new surfaceScalarField(1.0*phase.phi()));
@ -58,8 +58,6 @@
dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0)
);
phi = dimensionedScalar("phi", phi.dimensions(), 0);
phasei = 0;
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
{
@ -98,9 +96,7 @@
(fvc::interpolate(HbyAs[phasei]) & mesh.Sf())
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
);
mrfZones.relativeFlux(phiHbyAs[phasei]);
phi += alphafs[phasei]*phiHbyAs[phasei];
mrfZones.makeRelative(phiHbyAs[phasei]);
phiHbyAs[phasei] +=
rAlphaAUfs[phasei]
@ -161,6 +157,9 @@
phasei++;
}
// Reset phi BCs
phi.boundaryField() = 0;
phasei = 0;
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
{
@ -169,8 +168,12 @@
phase.phi().boundaryField() ==
(mesh.Sf().boundaryField() & phase.U().boundaryField());
mrfZones.relativeFlux(phase.phi().oldTime());
mrfZones.relativeFlux(phase.phi());
mrfZones.makeRelative(phase.phi().oldTime());
mrfZones.makeRelative(phase.phi());
// Update phi BCs before pEqn
phi.boundaryField() +=
alphafs[phasei].boundaryField()*phase.phi().boundaryField();
phasei++;
}

View File

@ -1,7 +0,0 @@
phaseModel/phaseModel.C
diameterModels/diameterModel/diameterModel.C
diameterModels/diameterModel/newDiameterModel.C
diameterModels/constantDiameter/constantDiameter.C
diameterModels/isothermalDiameter/isothermalDiameter.C
LIB = $(FOAM_LIBBIN)/libcompressibleMultiPhaseModel

View File

@ -1,6 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude
LIB_LIBS = \
-lincompressibleTransportModels

View File

@ -12,7 +12,7 @@
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
adjustPhi(phiHbyA, U, p_rgh);
mrfZones.relativeFlux(phiHbyA);
mrfZones.makeRelative(phiHbyA);
phi = phiHbyA;
surfaceScalarField phig

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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,7 @@ License
Foam::phase::phase
(
const word& name,
const word& phaseName,
const dictionary& phaseDict,
const volVectorField& U,
const surfaceScalarField& phi
@ -39,7 +39,7 @@ Foam::phase::phase
(
IOobject
(
"alpha" + name,
IOobject::groupName("alpha", phaseName),
U.mesh().time().timeName(),
U.mesh(),
IOobject::MUST_READ,
@ -47,9 +47,18 @@ Foam::phase::phase
),
U.mesh()
),
name_(name),
name_(phaseName),
phaseDict_(phaseDict),
nuModel_(viscosityModel::New("nu" + name, phaseDict_, U, phi)),
nuModel_
(
viscosityModel::New
(
IOobject::groupName("nu", phaseName),
phaseDict_,
U,
phi
)
),
rho_(phaseDict_.lookup("rho"))
{}

View File

@ -18,7 +18,7 @@ surfaceScalarField phiHbyA
adjustPhi(phiHbyA, U, p_gh);
fvOptions.relativeFlux(phiHbyA);
fvOptions.makeRelative(phiHbyA);
// Update the phi BCs from U before p BCs are updated
phi.boundaryField() = mesh.Sf().boundaryField() & U.boundaryField();

View File

@ -8,10 +8,6 @@
surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2));
// Update the phi BCs from U before p BCs are updated
phi1.boundaryField() == (mesh.Sf().boundaryField() & U1.boundaryField());
phi2.boundaryField() == (mesh.Sf().boundaryField() & U2.boundaryField());
volVectorField HbyA1
(
IOobject::groupName("HbyA", phase1.name()),
@ -26,10 +22,10 @@
);
HbyA2 = rAU2*U2Eqn.H();
mrfZones.absoluteFlux(phi1.oldTime());
mrfZones.absoluteFlux(phi1);
mrfZones.absoluteFlux(phi2.oldTime());
mrfZones.absoluteFlux(phi2);
mrfZones.makeAbsolute(phi1.oldTime());
mrfZones.makeAbsolute(phi1);
mrfZones.makeAbsolute(phi2.oldTime());
mrfZones.makeAbsolute(phi2);
// Phase-1 pressure flux (e.g. due to particle-particle pressure)
surfaceScalarField phiP1
@ -61,16 +57,12 @@
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
);
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
mrfZones.relativeFlux(phi);
phiHbyA1 +=
(
fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
- phiP1
+ rAlphaAU1f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA1);
phiHbyA2 +=
(
@ -78,15 +70,26 @@
- phiP2
+ rAlphaAU2f*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyA2);
mrfZones.relativeFlux(phi1.oldTime());
mrfZones.relativeFlux(phi1);
mrfZones.relativeFlux(phi2.oldTime());
mrfZones.relativeFlux(phi2);
mrfZones.makeRelative(phiHbyA1);
mrfZones.makeRelative(phiHbyA2);
mrfZones.makeRelative(phi1.oldTime());
mrfZones.makeRelative(phi1);
mrfZones.makeRelative(phi2.oldTime());
mrfZones.makeRelative(phi2);
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
// Update phi BCs before pEqn
phi.boundaryField() =
mrfZones.relative
(
alpha1f.boundaryField()
*(mesh.Sf().boundaryField() & U1.boundaryField())
+ alpha2f.boundaryField()
*(mesh.Sf().boundaryField() & U2.boundaryField())
);
HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2;
HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1;
@ -174,8 +177,20 @@
{
surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp);
phi1.boundaryField() ==
mrfZones.relative
(
mesh.Sf().boundaryField() & U1.boundaryField()
);
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
phi2.boundaryField() ==
mrfZones.relative
(
mesh.Sf().boundaryField() & U2.boundaryField()
);
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);
phi = alpha1f*phi1 + alpha2f*phi2;
dgdt =

View File

@ -30,6 +30,7 @@ License
#include "heatTransferModel.H"
#include "fixedValueFvPatchFields.H"
#include "slipFvPatchFields.H"
#include "partialSlipFvPatchFields.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -122,6 +123,7 @@ Foam::phaseModel::phaseModel
(
isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])
|| isA<slipFvPatchVectorField>(U_.boundaryField()[i])
|| isA<partialSlipFvPatchVectorField>(U_.boundaryField()[i])
)
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;

View File

@ -24,7 +24,7 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
fvOptions.makeRelative(fvc::interpolate(psi), phid);
volScalarField Dp("Dp", rho*rAU);
@ -61,7 +61,7 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);
volScalarField Dp("Dp", rho*rAU);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -423,7 +423,7 @@ void Foam::MRFZone::addCoriolis
}
void Foam::MRFZone::relativeVelocity(volVectorField& U) const
void Foam::MRFZone::makeRelative(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
@ -461,7 +461,7 @@ void Foam::MRFZone::relativeVelocity(volVectorField& U) const
}
void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
void Foam::MRFZone::makeAbsolute(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
@ -499,35 +499,41 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
}
void Foam::MRFZone::relativeFlux(surfaceScalarField& phi) const
void Foam::MRFZone::makeRelative(surfaceScalarField& phi) const
{
relativeRhoFlux(geometricOneField(), phi);
makeRelativeRhoFlux(geometricOneField(), phi);
}
void Foam::MRFZone::relativeFlux
void Foam::MRFZone::makeRelative(FieldField<fvsPatchField, scalar>& phi) const
{
return makeRelativeRhoFlux(oneFieldField(), phi);
}
void Foam::MRFZone::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
relativeRhoFlux(rho, phi);
makeRelativeRhoFlux(rho, phi);
}
void Foam::MRFZone::absoluteFlux(surfaceScalarField& phi) const
void Foam::MRFZone::makeAbsolute(surfaceScalarField& phi) const
{
absoluteRhoFlux(geometricOneField(), phi);
makeAbsoluteRhoFlux(geometricOneField(), phi);
}
void Foam::MRFZone::absoluteFlux
void Foam::MRFZone::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
absoluteRhoFlux(rho, phi);
makeAbsoluteRhoFlux(rho, phi);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ SourceFiles
#include "dimensionedScalar.H"
#include "dimensionedVector.H"
#include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H"
#include "surfaceFields.H"
#include "fvMatricesFwd.H"
#include "mapPolyMesh.H"
#include "DataEntry.H"
@ -114,15 +114,23 @@ class MRFZone
//- Make the given absolute mass/vol flux relative within the MRF region
template<class RhoFieldType>
void relativeRhoFlux
void makeRelativeRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
) const;
//- Make the given absolute mass/vol flux relative within the MRF region
template<class RhoFieldType>
void makeRelativeRhoFlux
(
const RhoFieldType& rho,
FieldField<fvsPatchField, scalar>& phi
) const;
//- Make the given relative mass/vol flux absolute within the MRF region
template<class RhoFieldType>
void absoluteRhoFlux
void makeAbsoluteRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
@ -208,26 +216,30 @@ public:
) const;
//- Make the given absolute velocity relative within the MRF region
void relativeVelocity(volVectorField& U) const;
void makeRelative(volVectorField& U) const;
//- Make the given relative velocity absolute within the MRF region
void absoluteVelocity(volVectorField& U) const;
void makeAbsolute(volVectorField& U) const;
//- Make the given absolute flux relative within the MRF region
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute boundary flux relative
// within the MRF region
void makeRelative(FieldField<fvsPatchField, scalar>& phi) const;
//- Make the given absolute mass-flux relative within the MRF region
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute within the MRF region
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute within the MRF region
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,34 +160,51 @@ void Foam::MRFZoneList::addCoriolis
}
void Foam::MRFZoneList::relativeVelocity(volVectorField& U) const
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
{
forAll(*this, i)
{
operator[](i).relativeVelocity(U);
operator[](i).makeRelative(U);
}
}
void Foam::MRFZoneList::absoluteVelocity(volVectorField& U) const
void Foam::MRFZoneList::makeAbsolute(volVectorField& U) const
{
forAll(*this, i)
{
operator[](i).absoluteVelocity(U);
operator[](i).makeAbsolute(U);
}
}
void Foam::MRFZoneList::relativeFlux(surfaceScalarField& phi) const
void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
{
forAll(*this, i)
{
operator[](i).relativeFlux(phi);
operator[](i).makeRelative(phi);
}
}
void Foam::MRFZoneList::relativeFlux
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar> >
Foam::MRFZoneList::relative
(
const tmp<FieldField<fvsPatchField, scalar> >& phi
) const
{
tmp<FieldField<fvsPatchField, scalar> > rphi(phi);
forAll(*this, i)
{
operator[](i).makeRelative(rphi());
}
return rphi;
}
void Foam::MRFZoneList::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -195,21 +212,21 @@ void Foam::MRFZoneList::relativeFlux
{
forAll(*this, i)
{
operator[](i).relativeFlux(rho, phi);
operator[](i).makeRelative(rho, phi);
}
}
void Foam::MRFZoneList::absoluteFlux(surfaceScalarField& phi) const
void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
{
forAll(*this, i)
{
operator[](i).absoluteFlux(phi);
operator[](i).makeAbsolute(phi);
}
}
void Foam::MRFZoneList::absoluteFlux
void Foam::MRFZoneList::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -217,7 +234,7 @@ void Foam::MRFZoneList::absoluteFlux
{
forAll(*this, i)
{
operator[](i).absoluteFlux(rho, phi);
operator[](i).makeAbsolute(rho, phi);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,26 +103,33 @@ public:
void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const;
//- Make the given absolute velocity relative within the MRF region
void relativeVelocity(volVectorField& U) const;
void makeRelative(volVectorField& U) const;
//- Make the given relative velocity absolute within the MRF region
void absoluteVelocity(volVectorField& U) const;
void makeAbsolute(volVectorField& U) const;
//- Make the given absolute flux relative within the MRF region
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Return the given absolute boundary flux relative within
// the MRF region
tmp<FieldField<fvsPatchField, scalar> > relative
(
const tmp<FieldField<fvsPatchField, scalar> >& tphi
) const;
//- Make the given absolute mass-flux relative within the MRF region
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute within the MRF region
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute within the MRF region
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class RhoFieldType>
void Foam::MRFZone::relativeRhoFlux
void Foam::MRFZone::makeRelativeRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
@ -54,6 +54,22 @@ void Foam::MRFZone::relativeRhoFlux
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
}
makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryField());
}
template<class RhoFieldType>
void Foam::MRFZone::makeRelativeRhoFlux
(
const RhoFieldType& rho,
FieldField<fvsPatchField, scalar>& phi
) const
{
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
// Included patches
forAll(includedFaces_, patchi)
{
@ -61,7 +77,7 @@ void Foam::MRFZone::relativeRhoFlux
{
label patchFacei = includedFaces_[patchi][i];
phi.boundaryField()[patchi][patchFacei] = 0.0;
phi[patchi][patchFacei] = 0.0;
}
}
@ -72,8 +88,8 @@ void Foam::MRFZone::relativeRhoFlux
{
label patchFacei = excludedFaces_[patchi][i];
phi.boundaryField()[patchi][patchFacei] -=
rho.boundaryField()[patchi][patchFacei]
phi[patchi][patchFacei] -=
rho[patchi][patchFacei]
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
& Sf.boundaryField()[patchi][patchFacei];
}
@ -82,7 +98,7 @@ void Foam::MRFZone::relativeRhoFlux
template<class RhoFieldType>
void Foam::MRFZone::absoluteRhoFlux
void Foam::MRFZone::makeAbsoluteRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi

View File

@ -474,13 +474,13 @@ void Foam::fv::option::setValue(fvMatrix<tensor>& eqn, const label fieldI)
}
void Foam::fv::option::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::option::makeRelative(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::fv::option::relativeFlux
void Foam::fv::option::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -490,13 +490,13 @@ void Foam::fv::option::relativeFlux
}
void Foam::fv::option::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::option::makeAbsolute(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::fv::option::absoluteFlux
void Foam::fv::option::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -425,20 +425,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
virtual void relativeFlux(surfaceScalarField& phi) const;
virtual void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
virtual void relativeFlux
virtual void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
virtual void absoluteFlux(surfaceScalarField& phi) const;
virtual void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
virtual void absoluteFlux
virtual void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -107,16 +107,16 @@ void Foam::fv::optionList::reset(const dictionary& dict)
}
void Foam::fv::optionList::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::optionList::makeRelative(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(phi);
this->operator[](i).makeRelative(phi);
}
}
void Foam::fv::optionList::relativeFlux
void Foam::fv::optionList::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -124,21 +124,21 @@ void Foam::fv::optionList::relativeFlux
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(rho, phi);
this->operator[](i).makeRelative(rho, phi);
}
}
void Foam::fv::optionList::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::optionList::makeAbsolute(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(phi);
this->operator[](i).makeAbsolute(phi);
}
}
void Foam::fv::optionList::absoluteFlux
void Foam::fv::optionList::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -146,7 +146,7 @@ void Foam::fv::optionList::absoluteFlux
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(rho, phi);
this->operator[](i).makeAbsolute(rho, phi);
}
}

View File

@ -157,20 +157,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -120,35 +120,35 @@ void Foam::fv::MRFSource::addSup
}
void Foam::fv::MRFSource::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::MRFSource::makeRelative(surfaceScalarField& phi) const
{
mrfPtr_->relativeFlux(phi);
mrfPtr_->makeRelative(phi);
}
void Foam::fv::MRFSource::relativeFlux
void Foam::fv::MRFSource::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
mrfPtr_->relativeFlux(rho, phi);
mrfPtr_->makeRelative(rho, phi);
}
void Foam::fv::MRFSource::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::MRFSource::makeAbsolute(surfaceScalarField& phi) const
{
mrfPtr_->absoluteFlux(phi);
mrfPtr_->makeAbsolute(phi);
}
void Foam::fv::MRFSource::absoluteFlux
void Foam::fv::MRFSource::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
mrfPtr_->absoluteFlux(rho, phi);
mrfPtr_->makeAbsolute(rho, phi);
}

View File

@ -138,20 +138,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
virtual void relativeFlux(surfaceScalarField& phi) const;
virtual void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
virtual void relativeFlux
virtual void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
virtual void absoluteFlux(surfaceScalarField& phi) const;
virtual void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
virtual void absoluteFlux
virtual void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object CO2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
fuel
{
type fixedValue;
value uniform 0;
}
air
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
fuel
{
type fixedValue;
value uniform 0;
}
air
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -17,21 +17,26 @@ FoamFile
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.77;
internalField uniform 1;
boundaryField
{
fuel
{
type calculated;
type fixedValue;
value uniform 0.0;
}
air
{
type calculated;
type fixedValue;
value uniform 0.77;
}
outlet
{
type calculated;
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
frontAndBack
{

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.23;
internalField uniform 0;
boundaryField
{
@ -34,8 +34,8 @@ boundaryField
outlet
{
type inletOutlet;
inletValue uniform 0.23;
value uniform 0.23;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{

View File

@ -17,19 +17,19 @@ FoamFile
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0.0;
internalField uniform 0;
boundaryField
{
fuel
{
type fixedValue;
value uniform 0.0;
value uniform 0;
}
air
{
type fixedValue;
value uniform 0.0;
value uniform 0;
}
outlet
{

View File

@ -24,12 +24,12 @@ boundaryField
fuel
{
type fixedValue;
value uniform 1.e-5;
value uniform 1e-05;
}
air
{
type fixedValue;
value uniform 1.e-5;
value uniform 1e-05;
}
outlet
{

View File

@ -17,19 +17,19 @@ FoamFile
dimensions [0 2 -2 0 0 0 0];
internalField uniform 3.75e-5;
internalField uniform 3.75e-05;
boundaryField
{
fuel
{
type fixedValue;
value uniform 3.75e-5;
value uniform 3.75e-05;
}
air
{
type fixedValue;
value uniform 3.75e-5;
value uniform 3.75e-05;
}
outlet
{

View File

@ -17,19 +17,19 @@ FoamFile
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0.0;
internalField uniform 0;
boundaryField
{
fuel
{
type fixedValue;
value uniform 0.0;
value uniform 0;
}
air
{
type fixedValue;
value uniform 0.0;
value uniform 0;
}
outlet
{

View File

@ -15,7 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField uniform 1.18001;
boundaryField
{
fuel
{
type calculated;
value uniform 0.243121;
}
air
{
type calculated;
value uniform 0.438564;
}
outlet
{
type calculated;
value uniform 1.18001;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -22,7 +22,7 @@ active true;
PaSRCoeffs
{
Cmix 0.1;
turbulentReaction on;
turbulentReaction off;
}

View File

@ -23,7 +23,6 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
@ -42,13 +41,7 @@ divSchemes
laplacianSchemes
{
default Gauss linear uncorrected;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian(mut,U) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
default Gauss linear orthogonal;
}
interpolationSchemes
@ -58,7 +51,7 @@ interpolationSchemes
snGradSchemes
{
default uncorrected;
default orthogonal;
}
fluxRequired

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Do the Spalart-Allmaras steady-state case
(cd motorBike && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file

View File

@ -34,7 +34,6 @@ boundaryField
outlet
{
type inletOutlet;
// inletValue uniform 0.77;
inletValue uniform 1;
value uniform 1;

View File

@ -34,7 +34,6 @@ boundaryField
outlet
{
type inletOutlet;
// inletValue uniform 0.23;
inletValue uniform 0;
value uniform 0;
}

View File

@ -1,11 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# create mesh
runApplication blockMesh
# run the solver
runApplication `getApplication`

View File

@ -22,7 +22,7 @@ active true;
PaSRCoeffs
{
Cmix 0.1;
turbulentReaction on;
turbulentReaction off;
useReactionRate true;
}

View File

@ -0,0 +1,129 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermo.compressibleGas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
O2
{
specie
{
nMoles 1;
molWeight 31.9988;
}
thermodynamics
{
Tlow 200;
Thigh 5000;
Tcommon 1000;
highCpCoeffs ( 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 );
lowCpCoeffs ( 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
H2O
{
specie
{
nMoles 1;
molWeight 18.0153;
}
thermodynamics
{
Tlow 200;
Thigh 5000;
Tcommon 1000;
highCpCoeffs ( 2.67215 0.00305629 -8.73026e-07 1.201e-10 -6.39162e-15 -29899.2 6.86282 );
lowCpCoeffs ( 3.38684 0.00347498 -6.3547e-06 6.96858e-09 -2.50659e-12 -30208.1 2.59023 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
CH4
{
specie
{
nMoles 1;
molWeight 16.0428;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937 );
lowCpCoeffs ( 5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
CO2
{
specie
{
nMoles 1;
molWeight 44.01;
}
thermodynamics
{
Tlow 200;
Thigh 5000;
Tcommon 1000;
highCpCoeffs ( 4.45362 0.00314017 -1.27841e-06 2.394e-10 -1.66903e-14 -48967 -0.955396 );
lowCpCoeffs ( 2.27572 0.00992207 -1.04091e-05 6.86669e-09 -2.11728e-12 -48373.1 10.1885 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
N2
{
specie
{
nMoles 1;
molWeight 28.0134;
}
thermodynamics
{
Tlow 200;
Thigh 5000;
Tcommon 1000;
highCpCoeffs ( 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 );
lowCpCoeffs ( 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
// ************************************************************************* //

View File

@ -1,139 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermo.icoPoly8;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
O2
{
specie
{
nMoles 1;
molWeight 31.9988;
}
equationOfState
{
rhoCoeffs<8> ( 4.1388 -0.016603 3.3039e-05 -3.6455e-08 2.3302e-11 -8.5664e-15 1.6783e-18 -1.356e-22 );
}
thermodynamics
{
Hf 0;
Sf 6407.93;
CpCoeffs<8> ( 904.2 -0.35136 0.0019339 -2.6639e-06 1.8222e-09 -6.75e-13 1.2962e-16 -1.0131e-20 );
}
transport
{
muCoeffs<8> ( 1.2346e-06 6.5097e-08 -2.8362e-11 8.301e-15 -9.7467e-19 0 0 0 );
kappaCoeffs<8> ( -0.0017889 9.5996e-05 -3.129e-08 7.9407e-12 -8.1996e-16 0 0 0 );
}
}
H2O
{
specie
{
nMoles 1;
molWeight 18.0153;
}
equationOfState
{
rhoCoeffs<8> ( 2.3302 -0.0093477 1.8601e-05 -2.0524e-08 1.3119e-11 -4.8229e-15 9.4489e-19 -7.6342e-23 );
}
thermodynamics
{
Hf -13424600;
Sf 10475.4;
CpCoeffs<8> ( 1570.5 1.6886 -0.0039382 6.2482e-06 -4.9342e-09 2.0513e-12 -4.3361e-16 3.6812e-20 );
}
transport
{
muCoeffs<8> ( 1.2346e-06 6.5097e-08 -2.8362e-11 8.301e-15 -9.7467e-19 0 0 0 );
kappaCoeffs<8> ( 0.0069975 0.00013726 8.6579e-09 -7.1514e-12 8.441e-16 0 0 0 );
}
}
CH4
{
specie
{
nMoles 1;
molWeight 16.043;
}
equationOfState
{
rhoCoeffs<8> ( 2.0751 -0.0083243 1.6564e-05 -1.8277e-08 1.1683e-11 -4.2949e-15 8.4144e-19 -6.7984e-23 );
}
thermodynamics
{
Hf -4.66836e+06;
Sf 11597.7;
CpCoeffs<8> ( 996.92 4.0854 -0.00092999 1.957e-06 -2.9777e-09 1.7459e-12 -4.5594e-16 4.4774e-20 );
}
transport
{
muCoeffs<8> ( 1.2346e-06 6.5097e-08 -2.8362e-11 8.301e-15 -9.7467e-19 0 0 0 );
kappaCoeffs<8> ( -0.018501 0.00021332 1.4678e-07 -7.7129e-11 1.0936e-14 0 0 0 );
}
}
CO2
{
specie
{
nMoles 1;
molWeight 44.01;
}
equationOfState
{
rhoCoeffs<8> ( 5.6924 -0.022836 4.544e-05 -5.014e-08 3.2048e-11 -1.1782e-14 2.3083e-18 -1.865e-22 );
}
thermodynamics
{
Hf -8.9423e+06;
Sf 4856.6;
CpCoeffs<8> ( 462.23 1.5803 -0.0010515 7.4618e-08 3.216e-10 -1.9646e-13 4.7679e-17 -4.3027e-21 );
}
transport
{
muCoeffs<8> ( 1.2346e-06 6.5097e-08 -2.8362e-11 8.301e-15 -9.7467e-19 0 0 0 );
kappaCoeffs<8> ( -0.0076857 0.00010773 -2.7043e-08 4.4967e-12 -3.0218e-16 0 0 0 );
}
}
N2
{
specie
{
nMoles 1;
molWeight 28.0134;
}
equationOfState
{
rhoCoeffs<8> ( 3.6234 -0.014535 2.8924e-05 -3.1915e-08 2.0399e-11 -7.4994e-15 1.4693e-18 -1.1871e-22 );
}
thermodynamics
{
Hf 51.2816;
Sf 6836.49;
CpCoeffs<8> ( 1049.8 -0.16537 0.00036105 2.0824e-07 -5.3568e-10 3.2274e-13 -8.3335e-17 8.054e-21 );
}
transport
{
muCoeffs<8> ( 1.2346e-06 6.5097e-08 -2.8362e-11 8.301e-15 -9.7467e-19 0 0 0 );
kappaCoeffs<8> ( 0.0028213 8.6668e-05 -1.5148e-08 1.2499e-12 3.1675e-17 0 0 0 );
}
}
// ************************************************************************* //

View File

@ -19,10 +19,10 @@ thermoType
{
type heRhoThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
transport sutherland;
thermo janaf;
energy sensibleEnthalpy;
equationOfState icoPolynomial;
equationOfState perfectGas;
specie specie;
}
@ -32,7 +32,7 @@ chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.icoPoly8";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
// ************************************************************************* //

View File

@ -23,31 +23,26 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,Yi_h) Gauss upwind;
div(phi,h) Gauss upwind;
div(phi,K) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,U) Gauss limitedLinearV 1;
div(phi,Yi_h) Gauss limitedLinear01 1;
div(phi,h) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phid,p) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,k) Gauss limitedLinear 1;
div((muEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear orthogonal;
laplacian(muEff,U) Gauss linear orthogonal;
laplacian(mut,U) Gauss linear orthogonal;
laplacian(DkEff,k) Gauss linear orthogonal;
laplacian(DepsilonEff,epsilon) Gauss linear orthogonal;
laplacian((rho*(1|A(U))),p) Gauss linear orthogonal;
laplacian(alphaEff,h) Gauss linear orthogonal;
}
interpolationSchemes

View File

@ -86,9 +86,9 @@ PIMPLE
rhoMin 0.1;
rhoMax 1.5;
maxCo 0.5;
maxCo 0.1;
rDeltaTSmoothingCoeff 0.1;
maxDeltaT 1;
maxDeltaT 2e-4;
alphaTemp 0.005;
}

View File

@ -9,7 +9,7 @@ rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1
rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1
rm -r 0/ccx 0/ccy 0/ccz > /dev/null 2>&1
rm -r 0 > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1
rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1

View File

@ -7,8 +7,12 @@ cd ${0%/*} || exit 1 # run from this directory
# copy flange surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
# Create tight-fitting background mesh
runApplication blockMesh
cp system/controlDict system/controlDict.org
sed -e s/"\(endTime[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
-e s/"\(writeInterval[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
system/controlDict.org > system/controlDict
runApplication foamyHexMesh
# Change collapseEdges to only do one iteration
@ -19,5 +23,10 @@ system/collapseDict.org > system/collapseDict
runApplication collapseEdges -latestTime -collapseFaces
cp system/controlDict.org system/controlDict
cp system/collapseDict.org system/collapseDict
rm -f system/controlDict.org system/collapseDict.org
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "constant";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "constant";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "constant";
object alpha.water.org;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "constant";
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
atmosphere
{
type totalPressure;
rho rho;
psi none;
gamma 1;
p0 uniform 0;
value uniform 0;
}
walls
{
type fixedFluxPressure;
gradient uniform 0;
phi phiAbs;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object Tair;
object T.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -27,7 +27,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiair;
phi phi.air;
inletValue $internalField;
value $internalField;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object Twater;
object T.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -27,7 +27,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiwater;
phi phi.water;
inletValue uniform 300;
value $internalField;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format binary;
class volVectorField;
object Uair;
object U.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,7 +28,7 @@ boundaryField
outlet
{
type pressureInletOutletVelocity;
phi phiair;
phi phi.air;
value $internalField;
}
walls

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format binary;
class volVectorField;
object Uwater;
object U.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,7 +28,7 @@ boundaryField
outlet
{
type pressureInletOutletVelocity;
phi phiwater;
phi phi.water;
value $internalField;
}
walls

View File

@ -11,7 +11,7 @@ FoamFile
format ascii;
class volScalarField;
location "0";
object alphaair;
object alpha.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -1908,7 +1908,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiair;
phi phi.air;
inletValue uniform 1;
value uniform 1;
}

View File

@ -28,7 +28,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiair;
phi phi.air;
inletValue uniform 1;
value uniform 1;
}

View File

@ -11,7 +11,7 @@ FoamFile
format ascii;
class volScalarField;
location "0";
object alphawater;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -1908,7 +1908,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiwater;
phi phi.water;
inletValue uniform 0;
value uniform 0;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object alphawater;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -28,7 +28,7 @@ boundaryField
outlet
{
type inletOutlet;
phi phiwater;
phi phi.water;
inletValue uniform 0;
value uniform 0;
}

View File

@ -38,6 +38,7 @@ FoamFile
defaultFaces
{
type empty;
inGroups 1(empty);
nFaces 3750;
startFace 3850;
}

Some files were not shown because too many files have changed in this diff Show More