Merge branch 'feature-periodicAMIAndXiDyMFoam' into 'develop'

Feature periodic ami and xi dy m foam

Ok state. Tested tutorials.

See merge request !3
This commit is contained in:
Andrew Heather
2015-11-19 10:42:51 +00:00
90 changed files with 29821 additions and 64 deletions

View File

@ -0,0 +1,3 @@
XiDyMFoam.C
EXE = $(FOAM_APPBIN)/XiDyMFoam

View File

@ -0,0 +1,33 @@
EXE_INC = \
-I.. \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-ldynamicMesh \
-lmeshTools \
-lsampling \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels

View File

@ -0,0 +1,180 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
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/>.
Application
XiFoam
Description
Solver for compressible premixed/partially-premixed combustion with
turbulence modelling.
Combusting RANS code using the b-Xi two-equation model.
Xi may be obtained by either the solution of the Xi transport
equation or from an algebraic exression. Both approaches are
based on Gulder's flame speed correlation which has been shown
to be appropriate by comparison with the results from the
spectral model.
Strain effects are encorporated directly into the Xi equation
but not in the algebraic approximation. Further work need to be
done on this issue, particularly regarding the enhanced removal rate
caused by flame compression. Analysis using results of the spectral
model will be required.
For cases involving very lean Propane flames or other flames which are
very strain-sensitive, a transport equation for the laminar flame
speed is present. This equation is derived using heuristic arguments
involving the strain time scale and the strain-rate at extinction.
the transport velocity is the same as that for the Xi equation.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "psiuReactionThermo.H"
#include "turbulentFluidThermoModel.H"
#include "laminarFlameSpeed.H"
#include "ignition.H"
#include "Switch.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "initContinuityErrs.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "createControls.H"
#include "initContinuityErrs.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "createTimeControls.H"
{
// Store divrhoU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField divrhoU
(
"divrhoU",
fvc::div(fvc::absolute(phi, rho, U))
);
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Store momentum to set rhoUf for introduced faces.
volVectorField rhoU("rhoU", rho*U);
// Do any mesh changes
mesh.update();
if (mesh.changing() && correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & rhoUf;
#include "correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
}
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
#include "rhoEqn.H"
Info<< "rhoEqn max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
#include "ftEqn.H"
#include "bEqn.H"
#include "EauEqn.H"
#include "EaEqn.H"
if (!ign.ignited())
{
thermo.heu() == thermo.he();
}
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
rho = thermo.rho();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,11 @@
CorrectPhi
(
U,
phi,
p,
rho,
psi,
dimensionedScalar("rAUf", dimTime, 1),
divrhoU,
pimple
);

View File

@ -0,0 +1,11 @@
#include "createTimeControls.H"
bool correctPhi
(
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
);

View File

@ -0,0 +1,99 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
if (pimple.transonic())
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
(fvc::interpolate(HbyA) & mesh.Sf())
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
)
);
fvc::makeRelative(phid, psi, U);
MRF.makeRelative(fvc::interpolate(psi), phid);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
}
}
else
{
surfaceScalarField phiHbyA
(
"phiHbyA",
(
(fvc::interpolate(rho*HbyA) & mesh.Sf())
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
)
);
fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(phiHbyA);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA + pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
{
rhoUf = fvc::interpolate(rho*U);
surfaceVectorField n(mesh.Sf()/mesh.magSf());
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
}
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
if (mesh.moving())
{
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
}
}

View File

@ -0,0 +1,7 @@
#include "readTimeControls.H"
bool correctPhi =
pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
bool checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,6 +34,13 @@ namespace Foam
{
defineTypeNameAndDebug(cyclicAMIFvPatch, 0);
addToRunTimeSelectionTable(fvPatch, cyclicAMIFvPatch, polyPatch);
addNamedToRunTimeSelectionTable
(
fvPatch,
cyclicAMIFvPatch,
polyPatch,
cyclicPeriodicAMI
);
}

View File

@ -327,9 +327,30 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
// So now we have agglomeration of the target side in
// allRestrict:
// 0..size-1 : local agglomeration (= targetRestrictAddressing)
// 0..size-1 : local agglomeration (= targetRestrictAddressing
// (but potentially permutated))
// size.. : agglomeration data from other processors
// The trickiness in this algorithm is finding out the compaction
// of the remote data (i.e. allocation of the coarse 'slots'). We could
// either send across the slot compaction maps or just make sure
// that we allocate the slots in exactly the same order on both sending
// and receiving side (e.g. if the submap is set up to send 4 items,
// the constructMap is also set up to receive 4 items.
// Short note about the various types of indices:
// - face indices : indices into the geometry.
// - coarse face indices : how the faces get agglomerated
// - transferred data : how mapDistribute sends/receives data,
// - slots : indices into data after distribution (e.g. stencil,
// srcAddress/tgtAddress). Note: for fully local addressing
// the slots are equal to face indices.
// A mapDistribute has:
// - a subMap : these are face indices
// - a constructMap : these are from 'transferred-date' to slots
labelListList tgtSubMap(Pstream::nProcs());
// Local subMap is just identity
@ -341,11 +362,17 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
{
if (procI != Pstream::myProcNo())
{
// Combine entries that point to the same coarse element. All
// the elements refer to local data so index into
// targetRestrictAddressing or allRestrict (since the same
// for local data).
// Combine entries that point to the same coarse element.
// The important bit is to loop over the data (and hand out
// compact indices ) in 'transferred data' order. This
// guarantees that we're doing exactly the
// same on sending and receiving side - e.g. the fourth element
// in the subMap is the fourth element received in the
// constructMap
const labelList& elems = map.subMap()[procI];
const labelList& elemsMap =
map.constructMap()[Pstream::myProcNo()];
labelList& newSubMap = tgtSubMap[procI];
newSubMap.setSize(elems.size());
@ -354,7 +381,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
forAll(elems, i)
{
label fineElem = elems[i];
label fineElem = elemsMap[elems[i]];
label coarseElem = allRestrict[fineElem];
if (oldToNew[coarseElem] == -1)
{
@ -372,16 +399,31 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
// the sending map
labelListList tgtConstructMap(Pstream::nProcs());
labelList tgtCompactMap;
// Local constructMap is just identity
{
tgtConstructMap[Pstream::myProcNo()] =
identity(targetCoarseSize);
tgtCompactMap = targetRestrictAddressing;
}
tgtCompactMap.setSize(map.constructSize());
labelList tgtCompactMap(map.constructSize());
{
// Note that in special cases (e.g. 'appending' two AMIs) the
// local size after distributing can be longer than the number
// of faces. I.e. it duplicates elements.
// Since we don't know this size instead we loop over all
// reachable elements (using the local constructMap)
const labelList& elemsMap = map.constructMap()[Pstream::myProcNo()];
forAll(elemsMap, i)
{
label fineElem = elemsMap[i];
label coarseElem = allRestrict[fineElem];
tgtCompactMap[fineElem] = coarseElem;
}
}
label compactI = targetCoarseSize;
// Compact data from other processors
@ -440,7 +482,6 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
}
}
srcAddress.setSize(sourceCoarseSize);
srcWeights.setSize(sourceCoarseSize);
@ -493,7 +534,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
forAll(fineSrcAddress, faceI)
{
// All the elements contributing to faceI. Are slots in
// mapDistribute'd data.
// target data.
const labelList& elems = fineSrcAddress[faceI];
const scalarList& weights = fineSrcWeights[faceI];
const scalar fineArea = fineSrcMagSf[faceI];
@ -1041,28 +1082,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
);
// weights normalisation
normaliseWeights
(
srcMagSf_,
"source",
srcAddress_,
srcWeights_,
srcWeightsSum_,
AMIPtr->conformal(),
true,
lowWeightCorrection_
);
normaliseWeights
(
tgtMagSf_,
"target",
tgtAddress_,
tgtWeights_,
tgtWeightsSum_,
AMIPtr->conformal(),
true,
lowWeightCorrection_
);
normaliseWeights(AMIPtr->conformal(), true);
// cache maps and reset addresses
List<Map<label> > cMap;
@ -1100,28 +1120,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
tgtWeights_
);
normaliseWeights
(
srcMagSf_,
"source",
srcAddress_,
srcWeights_,
srcWeightsSum_,
AMIPtr->conformal(),
true,
lowWeightCorrection_
);
normaliseWeights
(
tgtMagSf_,
"target",
tgtAddress_,
tgtWeights_,
tgtWeightsSum_,
AMIPtr->conformal(),
true,
lowWeightCorrection_
);
normaliseWeights(AMIPtr->conformal(), true);
}
if (debug)
@ -1137,6 +1136,217 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
}
template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::append
(
const SourcePatch& srcPatch,
const TargetPatch& tgtPatch
)
{
// Create a new interpolation
autoPtr<AMIInterpolation<SourcePatch, TargetPatch> > newPtr
(
new AMIInterpolation<SourcePatch, TargetPatch>
(
srcPatch,
tgtPatch,
triMode_,
requireMatch_,
methodName_,
lowWeightCorrection_,
reverseTarget_
)
);
// If parallel then combine the mapDistribution and re-index
if (singlePatchProc_ == -1)
{
labelListList& srcSubMap = srcMapPtr_->subMap();
labelListList& srcConstructMap = srcMapPtr_->constructMap();
labelListList& tgtSubMap = tgtMapPtr_->subMap();
labelListList& tgtConstructMap = tgtMapPtr_->constructMap();
labelListList& newSrcSubMap = newPtr->srcMapPtr_->subMap();
labelListList& newSrcConstructMap = newPtr->srcMapPtr_->constructMap();
labelListList& newTgtSubMap = newPtr->tgtMapPtr_->subMap();
labelListList& newTgtConstructMap = newPtr->tgtMapPtr_->constructMap();
// Re-calculate the source indices
{
labelList mapMap(0), newMapMap(0);
forAll(srcSubMap, procI)
{
mapMap.append
(
identity(srcConstructMap[procI].size())
+ mapMap.size() + newMapMap.size()
);
newMapMap.append
(
identity(newSrcConstructMap[procI].size())
+ mapMap.size() + newMapMap.size()
);
}
forAll(srcSubMap, procI)
{
forAll(srcConstructMap[procI], srcI)
{
srcConstructMap[procI][srcI] =
mapMap[srcConstructMap[procI][srcI]];
}
}
forAll(srcSubMap, procI)
{
forAll(newSrcConstructMap[procI], srcI)
{
newSrcConstructMap[procI][srcI] =
newMapMap[newSrcConstructMap[procI][srcI]];
}
}
forAll(tgtAddress_, tgtI)
{
forAll(tgtAddress_[tgtI], tgtJ)
{
tgtAddress_[tgtI][tgtJ] =
mapMap[tgtAddress_[tgtI][tgtJ]];
}
}
forAll(newPtr->tgtAddress_, tgtI)
{
forAll(newPtr->tgtAddress_[tgtI], tgtJ)
{
newPtr->tgtAddress_[tgtI][tgtJ] =
newMapMap[newPtr->tgtAddress_[tgtI][tgtJ]];
}
}
}
// Re-calculate the target indices
{
labelList mapMap(0), newMapMap(0);
forAll(srcSubMap, procI)
{
mapMap.append
(
identity(tgtConstructMap[procI].size())
+ mapMap.size() + newMapMap.size()
);
newMapMap.append
(
identity(newTgtConstructMap[procI].size())
+ mapMap.size() + newMapMap.size()
);
}
forAll(srcSubMap, procI)
{
forAll(tgtConstructMap[procI], tgtI)
{
tgtConstructMap[procI][tgtI] =
mapMap[tgtConstructMap[procI][tgtI]];
}
}
forAll(srcSubMap, procI)
{
forAll(newTgtConstructMap[procI], tgtI)
{
newTgtConstructMap[procI][tgtI] =
newMapMap[newTgtConstructMap[procI][tgtI]];
}
}
forAll(srcAddress_, srcI)
{
forAll(srcAddress_[srcI], srcJ)
{
srcAddress_[srcI][srcJ] =
mapMap[srcAddress_[srcI][srcJ]];
}
}
forAll(newPtr->srcAddress_, srcI)
{
forAll(newPtr->srcAddress_[srcI], srcJ)
{
newPtr->srcAddress_[srcI][srcJ] =
newMapMap[newPtr->srcAddress_[srcI][srcJ]];
}
}
}
// Sum the construction sizes
srcMapPtr_->constructSize() += newPtr->srcMapPtr_->constructSize();
tgtMapPtr_->constructSize() += newPtr->tgtMapPtr_->constructSize();
// Combine the maps
forAll(srcSubMap, procI)
{
srcSubMap[procI].append(newSrcSubMap[procI]);
srcConstructMap[procI].append(newSrcConstructMap[procI]);
tgtSubMap[procI].append(newTgtSubMap[procI]);
tgtConstructMap[procI].append(newTgtConstructMap[procI]);
}
}
// Combine new and current source data
forAll(srcMagSf_, srcFaceI)
{
srcAddress_[srcFaceI].append(newPtr->srcAddress()[srcFaceI]);
srcWeights_[srcFaceI].append(newPtr->srcWeights()[srcFaceI]);
srcWeightsSum_[srcFaceI] += newPtr->srcWeightsSum()[srcFaceI];
}
// Combine new and current target data
forAll(tgtMagSf_, tgtFaceI)
{
tgtAddress_[tgtFaceI].append(newPtr->tgtAddress()[tgtFaceI]);
tgtWeights_[tgtFaceI].append(newPtr->tgtWeights()[tgtFaceI]);
tgtWeightsSum_[tgtFaceI] += newPtr->tgtWeightsSum()[tgtFaceI];
}
}
template<class SourcePatch, class TargetPatch>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
(
const bool conformal,
const bool output
)
{
normaliseWeights
(
srcMagSf_,
"source",
srcAddress_,
srcWeights_,
srcWeightsSum_,
conformal,
output,
lowWeightCorrection_
);
normaliseWeights
(
tgtMagSf_,
"target",
tgtAddress_,
tgtWeights_,
tgtWeightsSum_,
conformal,
output,
lowWeightCorrection_
);
}
template<class SourcePatch, class TargetPatch>
template<class Type, class CombineOp>
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -418,6 +418,16 @@ public:
const TargetPatch& tgtPatch
);
//- Append additional addressing and weights
void append
(
const SourcePatch& srcPatch,
const TargetPatch& tgtPatch
);
//- Normalise the weights
void normaliseWeights(const bool conformal, const bool output);
// Evaluation

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,6 +38,13 @@ namespace Foam
cyclicAMIPointPatch,
polyPatch
);
addNamedToRunTimeSelectionTable
(
facePointPatch,
cyclicAMIPointPatch,
polyPatch,
cyclicPeriodicAMI
);
}

View File

@ -0,0 +1,723 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\*---------------------------------------------------------------------------*/
#include "cyclicPeriodicAMIPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
// For debugging
#include "OBJstream.H"
#include "PatchTools.H"
#include "Time.H"
//Note: cannot use vtkSurfaceWriter here - circular linkage
//#include "vtkSurfaceWriter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(cyclicPeriodicAMIPolyPatch, 0);
addToRunTimeSelectionTable(polyPatch, cyclicPeriodicAMIPolyPatch, word);
addToRunTimeSelectionTable
(
polyPatch,
cyclicPeriodicAMIPolyPatch,
dictionary
);
}
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
void Foam::cyclicPeriodicAMIPolyPatch::syncTransforms() const
{
if (owner())
{
// At this point we guarantee that the transformations have been
// updated. There is one particular case, where if the periodic patch
// locally has zero faces then its transformation will not be set. We
// need to synchronise the transforms over the zero-sized patches as
// well.
//
// We can't put the logic into cyclicPolyPatch as
// processorCyclicPolyPatch uses cyclicPolyPatch functionality.
// Synchronisation will fail because processor-type patches do not exist
// on all processors.
//
// The use in cyclicPeriodicAMI is special; we use the patch even
// though we have no faces in it. Ideally, in future, the transformation
// logic will be abstracted out, and we won't need a periodic patch
// here. Until then, we can just fix the behaviour of the zero-sized
// coupled patches here
// Get the periodic patch
const coupledPolyPatch& periodicPatch
(
refCast<const coupledPolyPatch>
(
boundaryMesh()[periodicPatchID()]
)
);
// If there are any zero-sized periodic patches
if (returnReduce((size() && !periodicPatch.size()), orOp<bool>()))
{
if (periodicPatch.separation().size() > 1)
{
FatalErrorIn
(
"cyclicPeriodicAMIPolyPatch::resetAMI"
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
) << "Periodic patch " << periodicPatchName_
<< " has non-uniform separation vector "
<< periodicPatch.separation()
<< "This is not allowed inside " << type()
<< " patch " << name()
<< exit(FatalError);
}
if (periodicPatch.forwardT().size() > 1)
{
FatalErrorIn
(
"cyclicPeriodicAMIPolyPatch::resetAMI"
"(const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
) << "Periodic patch " << periodicPatchName_
<< " has non-uniform transformation tensor "
<< periodicPatch.forwardT()
<< "This is not allowed inside " << type()
<< " patch " << name()
<< exit(FatalError);
}
// Note that zero-sized patches will have zero-sized fields for the
// separation vector, forward and reverse transforms. These need
// replacing with the transformations from other processors.
// Parallel in this context refers to a parallel transformation,
// rather than a rotational transformation.
// Note that a cyclic with zero faces is considered parallel so
// explicitly check for that.
bool isParallel =
(
periodicPatch.size()
&& periodicPatch.parallel()
);
reduce(isParallel, orOp<bool>());
if (isParallel)
{
// Sync a list of separation vectors
List<vectorField> sep(Pstream::nProcs());
sep[Pstream::myProcNo()] = periodicPatch.separation();
Pstream::gatherList(sep);
Pstream::scatterList(sep);
List<boolList> coll(Pstream::nProcs());
coll[Pstream::myProcNo()] = periodicPatch.collocated();
Pstream::gatherList(coll);
Pstream::scatterList(coll);
// If locally we have zero faces pick the first one that has a
// separation vector
if (!periodicPatch.size())
{
forAll(sep, procI)
{
if (sep[procI].size())
{
const_cast<vectorField&>
(
periodicPatch.separation()
) = sep[procI];
const_cast<boolList&>
(
periodicPatch.collocated()
) = coll[procI];
break;
}
}
}
}
else
{
// Sync a list of forward and reverse transforms
List<tensorField> forwardT(Pstream::nProcs());
forwardT[Pstream::myProcNo()] = periodicPatch.forwardT();
Pstream::gatherList(forwardT);
Pstream::scatterList(forwardT);
List<tensorField> reverseT(Pstream::nProcs());
reverseT[Pstream::myProcNo()] = periodicPatch.reverseT();
Pstream::gatherList(reverseT);
Pstream::scatterList(reverseT);
// If locally we have zero faces pick the first one that has a
// transformation vector
if (!periodicPatch.size())
{
forAll(forwardT, procI)
{
if (forwardT[procI].size())
{
const_cast<tensorField&>
(
periodicPatch.forwardT()
) = forwardT[procI];
const_cast<tensorField&>
(
periodicPatch.reverseT()
) = reverseT[procI];
break;
}
}
}
}
}
}
}
void Foam::cyclicPeriodicAMIPolyPatch::writeOBJ
(
const primitivePatch& p,
OBJstream& str
) const
{
// Collect faces and points
pointField allPoints;
faceList allFaces;
labelList pointMergeMap;
PatchTools::gatherAndMerge
(
-1.0, // do not merge points
p,
allPoints,
allFaces,
pointMergeMap
);
if (Pstream::master())
{
// Write base geometry
str.write(allFaces, allPoints);
}
}
void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
(
const AMIPatchToPatchInterpolation::interpolationMethod& AMIMethod
) const
{
if (owner())
{
// Get the periodic patch
const coupledPolyPatch& periodicPatch
(
refCast<const coupledPolyPatch>
(
boundaryMesh()[periodicPatchID()]
)
);
// Synchronise the transforms
syncTransforms();
// Create copies of both patches' points, transformed to the owner
pointField thisPoints0(localPoints());
pointField nbrPoints0(neighbPatch().localPoints());
transformPosition(nbrPoints0);
// Reset the stored number of periodic transformations to a lower
// absolute value if possible
if (nSectors_ > 0)
{
if (nTransforms_ > nSectors_/2)
{
nTransforms_ -= nSectors_;
}
else if (nTransforms_ < - nSectors_/2)
{
nTransforms_ += nSectors_;
}
}
// Apply the stored number of periodic transforms
for (label i = 0; i < nTransforms_; ++ i)
{
periodicPatch.transformPosition(thisPoints0);
}
for (label i = 0; i > nTransforms_; -- i)
{
periodicPatch.transformPosition(nbrPoints0);
}
autoPtr<OBJstream> ownStr;
autoPtr<OBJstream> neiStr;
if (debug)
{
const Time& runTime = boundaryMesh().mesh().time();
fileName dir(runTime.rootPath()/runTime.globalCaseName());
fileName postfix("_" + runTime.timeName()+"_expanded.obj");
ownStr.reset(new OBJstream(dir/name() + postfix));
neiStr.reset(new OBJstream(dir/neighbPatch().name() + postfix));
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
<< " writing accumulated AMI to " << ownStr().name()
<< " and " << neiStr().name() << endl;
}
// Create another copy
pointField thisPoints(thisPoints0);
pointField nbrPoints(nbrPoints0);
// Create patches for all the points
// Source patch at initial location
const primitivePatch thisPatch0
(
SubList<face>(localFaces(), size()),
thisPoints0
);
// Source patch that gets moved
primitivePatch thisPatch
(
SubList<face>(localFaces(), size()),
thisPoints
);
// Target patch at initial location
const primitivePatch nbrPatch0
(
SubList<face>(neighbPatch().localFaces(), neighbPatch().size()),
nbrPoints0
);
// Target patch that gets moved
primitivePatch nbrPatch
(
SubList<face>(neighbPatch().localFaces(), neighbPatch().size()),
nbrPoints
);
// Construct a new AMI interpolation between the initial patch locations
AMIPtr_.reset
(
new AMIPatchToPatchInterpolation
(
thisPatch0,
nbrPatch0,
surfPtr(),
faceAreaIntersect::tmMesh,
false,
AMIPatchToPatchInterpolation::imPartialFaceAreaWeight,
AMILowWeightCorrection_,
AMIReverse_
)
);
// Number of geometry replications
label iter(0);
label nTransformsOld(nTransforms_);
if (ownStr.valid())
{
writeOBJ(thisPatch0, ownStr());
}
if (neiStr.valid())
{
writeOBJ(nbrPatch0, neiStr());
}
// Weight sum averages
scalar srcSum(gAverage(AMIPtr_->srcWeightsSum()));
scalar tgtSum(gAverage(AMIPtr_->tgtWeightsSum()));
// Direction (or rather side of AMI : this or nbr patch) of
// geometry replication
bool direction = nTransforms_ >= 0;
// Increase in the source weight sum for the last iteration in the
// opposite direction. If the current increase is less than this, the
// direction (= side of AMI to transform) is reversed.
// We switch the side to replicate instead of reversing the transform
// since at the coupledPolyPatch level there is no
// 'reverseTransformPosition' functionality.
scalar srcSumDiff = 0;
if (debug)
{
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
<< " srcSum:" << srcSum
<< " tgtSum:" << tgtSum
<< " direction:" << direction
<< endl;
}
// Loop, replicating the geometry
while
(
(iter < maxIter_)
&& (
(1 - srcSum > matchTolerance())
|| (1 - tgtSum > matchTolerance())
)
)
{
if (direction)
{
periodicPatch.transformPosition(thisPoints);
if (debug)
{
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
<< name()
<< " moving this side from:"
<< gAverage(thisPatch.points())
<< " to:" << gAverage(thisPoints) << endl;
}
thisPatch.movePoints(thisPoints);
if (debug)
{
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
<< name()
<< " appending weights with untransformed slave side"
<< endl;
}
AMIPtr_->append(thisPatch, nbrPatch0);
if (ownStr.valid())
{
writeOBJ(thisPatch, ownStr());
}
}
else
{
periodicPatch.transformPosition(nbrPoints);
if (debug)
{
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:"
<< name()
<< " moving neighbour side from:"
<< gAverage(nbrPatch.points())
<< " to:" << gAverage(nbrPoints) << endl;
}
nbrPatch.movePoints(nbrPoints);
AMIPtr_->append(thisPatch0, nbrPatch);
if (neiStr.valid())
{
writeOBJ(nbrPatch, neiStr());
}
}
const scalar srcSumNew = gAverage(AMIPtr_->srcWeightsSum());
const scalar srcSumDiffNew = srcSumNew - srcSum;
if (srcSumDiffNew < srcSumDiff || srcSumDiffNew < SMALL)
{
direction = !direction;
srcSumDiff = srcSumDiffNew;
}
srcSum = srcSumNew;
tgtSum = gAverage(AMIPtr_->tgtWeightsSum());
nTransforms_ += direction ? +1 : -1;
++ iter;
if (debug)
{
Info<< "cyclicPeriodicAMIPolyPatch::resetAMI : patch:" << name()
<< " iteration:" << iter
<< " srcSum:" << srcSum
<< " tgtSum:" << tgtSum
<< " direction:" << direction
<< endl;
}
}
// Close debug streams
if (ownStr.valid())
{
ownStr.clear();
}
if (neiStr.valid())
{
neiStr.clear();
}
// Average the number of transformstions
nTransforms_ = (nTransforms_ + nTransformsOld)/2;
// Check that the match is complete
if (iter == maxIter_)
{
// The matching algorithm has exited without getting the
// srcSum and tgtSum above 1. This can happen because
// - of an incorrect setup
// - or because of non-exact meshes and truncation errors
// (transformation, accumulation of cutting errors)
// so for now this situation is flagged as a SeriousError instead of
// a FatalError since the default matchTolerance is quite strict
// (0.001) and can get triggered far into the simulation.
SeriousErrorIn
(
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
"("
"const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
)
<< "Patches " << name() << " and " << neighbPatch().name()
<< " do not couple to within a tolerance of "
<< matchTolerance()
<< " when transformed according to the periodic patch "
<< periodicPatch.name() << "." << nl
<< "The current sum of weights are for owner " << name()
<< " : " << srcSum << " and for neighbour "
<< neighbPatch().name() << " : " << tgtSum << nl
<< "This is only acceptable during post-processing"
<< "; not during running. Improve your mesh or increase"
<< " the 'matchTolerance' setting in the patch specification."
<< endl;
}
// Check that both patches have replicated an integer number of times
if
(
mag(srcSum - floor(srcSum + 0.5)) > srcSum*matchTolerance()
|| mag(tgtSum - floor(tgtSum + 0.5)) > tgtSum*matchTolerance()
)
{
// This condition is currently enforced until there is more
// experience with the matching algorithm and numerics.
// This check means that e.g. different numbers of stator and
// rotor partitions are not allowed.
// Again see the section above about tolerances.
SeriousErrorIn
(
"void Foam::cyclicPeriodicAMIPolyPatch::resetPeriodicAMI"
"("
"const AMIPatchToPatchInterpolation::interpolationMethod&"
") const"
)
<< "Patches " << name() << " and " << neighbPatch().name()
<< " do not overlap an integer number of times when transformed"
<< " according to the periodic patch "
<< periodicPatch.name() << "." << nl
<< "The current matchTolerance : " << matchTolerance()
<< ", sum of owner weights : " << srcSum
<< ", sum of neighbour weights : " << tgtSum
<< "." << nl
<< "This is only acceptable during post-processing"
<< "; not during running. Improve your mesh or increase"
<< " the 'matchTolerance' setting in the patch specification."
<< endl;
}
// Normalise the weights
AMIPtr_->normaliseWeights(true, false);
}
}
// * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm,
const word& patchType,
const transformType transform
)
:
cyclicAMIPolyPatch(name, size, start, index, bm, patchType, transform),
periodicPatchName_(word::null),
periodicPatchID_(-1),
nTransforms_(0),
nSectors_(0),
maxIter_(36)
{}
Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
)
:
cyclicAMIPolyPatch(name, dict, index, bm, patchType),
periodicPatchName_(dict.lookup("periodicPatch")),
periodicPatchID_(-1),
nTransforms_(dict.lookupOrDefault<label>("nTransforms", 0)),
nSectors_(dict.lookupOrDefault<label>("nSectors", 0)),
maxIter_(dict.lookupOrDefault<label>("maxIter", 36))
{}
Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch& pp,
const polyBoundaryMesh& bm
)
:
cyclicAMIPolyPatch(pp, bm),
periodicPatchName_(pp.periodicPatchName_),
periodicPatchID_(-1),
nTransforms_(pp.nTransforms_),
nSectors_(pp.nSectors_),
maxIter_(pp.maxIter_)
{}
Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart,
const word& nbrPatchName
)
:
cyclicAMIPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName),
periodicPatchName_(pp.periodicPatchName_),
periodicPatchID_(-1),
nTransforms_(pp.nTransforms_),
nSectors_(pp.nSectors_),
maxIter_(pp.maxIter_)
{}
Foam::cyclicPeriodicAMIPolyPatch::cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
)
:
cyclicAMIPolyPatch(pp, bm, index, mapAddressing, newStart),
periodicPatchName_(pp.periodicPatchName_),
periodicPatchID_(-1),
nTransforms_(pp.nTransforms_),
nSectors_(pp.nSectors_),
maxIter_(pp.maxIter_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::cyclicPeriodicAMIPolyPatch::~cyclicPeriodicAMIPolyPatch()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::cyclicPeriodicAMIPolyPatch::periodicPatchID() const
{
if (periodicPatchName_ == word::null)
{
periodicPatchID_ = -1;
return periodicPatchID_;
}
if (periodicPatchID_ == -1)
{
periodicPatchID_ = this->boundaryMesh().findPatchID(periodicPatchName_);
if (periodicPatchID_ == -1)
{
FatalErrorIn("cyclicPolyAMIPatch::periodicPatchID() const")
<< "Illegal periodicPatch name " << periodicPatchName_
<< nl << "Valid patch names are "
<< this->boundaryMesh().names()
<< exit(FatalError);
}
// Check that it is a coupled patch
refCast<const coupledPolyPatch>
(
this->boundaryMesh()[periodicPatchID_]
);
}
return periodicPatchID_;
}
void Foam::cyclicPeriodicAMIPolyPatch::write(Ostream& os) const
{
cyclicAMIPolyPatch::write(os);
os.writeKeyword("periodicPatch") << periodicPatchName_
<< token::END_STATEMENT << nl;
if (nTransforms_ != 0)
{
os.writeKeyword("nTransforms") << nTransforms_ <<
token::END_STATEMENT << nl;
}
if (nSectors_ != 0)
{
os.writeKeyword("nSectors") << nSectors_ <<
token::END_STATEMENT << nl;
}
if (maxIter_ != 36)
{
os.writeKeyword("maxIter") << maxIter_ << token::END_STATEMENT << nl;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,233 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
Class
Foam::cyclicPeriodicAMIPolyPatch
Description
Cyclic patch for periodic Arbitrary Mesh Interface (AMI)
SourceFiles
cyclicPeriodicAMIPolyPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicPeriodicAMIPolyPatch_H
#define cyclicPeriodicAMIPolyPatch_H
#include "cyclicAMIPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class OBJstream;
/*---------------------------------------------------------------------------*\
Class cyclicPeriodicAMIPolyPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicPeriodicAMIPolyPatch
:
public cyclicAMIPolyPatch
{
private:
// Private data
//- Periodic patch name
mutable word periodicPatchName_;
//- Periodic patch ID
mutable label periodicPatchID_;
//- Current number of transformations (+ve forward, -ve backward)
mutable label nTransforms_;
//- Number of sectors in a rotationally periodic geometry (optional)
const label nSectors_;
//- Maximum number of attempts to match the AMI geometry
const label maxIter_;
// Private Member Functions
//- Synchronise the periodic transformations
void syncTransforms() const;
//- Debug: write obj files of patch (collected on master)
void writeOBJ(const primitivePatch& p, OBJstream& str) const;
//- Reset the AMI interpolator
virtual void resetAMI
(
const AMIPatchToPatchInterpolation::interpolationMethod& AMIMethod =
AMIPatchToPatchInterpolation::imFaceAreaWeight
) const;
public:
//- Runtime type information
TypeName("cyclicPeriodicAMI");
// Constructors
//- Construct from (base couped patch) components
cyclicPeriodicAMIPolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm,
const word& patchType,
const transformType transform = UNKNOWN
);
//- Construct from dictionary
cyclicPeriodicAMIPolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
);
//- Construct as copy, resetting the boundary mesh
cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch&,
const polyBoundaryMesh&
);
//- Construct given the original patch and resetting the
// face list and boundary mesh information
cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart,
const word& nbrPatchName
);
//- Construct given the original patch and a map
cyclicPeriodicAMIPolyPatch
(
const cyclicPeriodicAMIPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
);
//- Construct and return a clone, resetting the boundary mesh
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
{
return autoPtr<polyPatch>
(
new cyclicPeriodicAMIPolyPatch(*this, bm)
);
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new cyclicPeriodicAMIPolyPatch
(
*this,
bm,
index,
newSize,
newStart,
nbrPatchName_
)
);
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new cyclicPeriodicAMIPolyPatch
(
*this,
bm,
index,
mapAddressing,
newStart
)
);
}
//- Destructor
virtual ~cyclicPeriodicAMIPolyPatch();
// Member Functions
//- Periodic patch ID
virtual label periodicPatchID() const;
//- Write the polyPatch data as a dictionary
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -199,6 +199,9 @@ $(ACMICycPatches)/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C
$(ACMICycPatches)/cyclicACMIPointPatch/cyclicACMIPointPatch.C
$(ACMICycPatches)/cyclicACMIPointPatchField/cyclicACMIPointPatchFields.C
PeriodicAMICycPatches=$(AMI)/patches/cyclicPeriodicAMI
$(PeriodicAMICycPatches)/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C
mappedPatches/mappedPolyPatch/mappedPatchBase.C
mappedPatches/mappedPolyPatch/mappedPolyPatch.C
mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C

View File

@ -232,7 +232,6 @@ void Foam::fieldValues::fieldValueDelta::execute()
{
Info<< " none";
}
Info<< endl;
}

View File

@ -95,8 +95,7 @@ void Foam::fieldValues::fieldValueDelta::apply
}
}
const word
resultName(opName + '(' + entryName1 + ',' + entryName2 + ')');
const word resultName(opName + '(' + entryName1 + ',' + entryName2 + ')');
if (log_) Info << " " << resultName << " = " << result << endl;

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Su;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform 0.135;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
inletField uniform 573;
internalField uniform 2400;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $inletField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Tu;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 573;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (4 0 0);
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type cylindricalInletVelocity;
centre (-0.64 0.5 0);
axis (1 0 0);
axialVelocity 40;
radialVelocity 20;
rpm 12732; // ut=40,r=3e-2,omega=ut/r,rpm=omega*60/(2*pi)
value uniform (0 0 0);
}
outlet
{
type pressureInletOutletVelocity;
inletValue (0 0 0);
value $internalField;
}
wall
{
type movingWallVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Xi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type calculated;
}
outlet
{
type calculated;
}
wall
{
//type compressible::alphatWallFunction;
//mut mut;
//value $internalField;
type calculated;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object b;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object ft;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.0834168596800118;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 6;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -1 0 0 0 0 ];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type calculated;
}
outlet
{
type calculated;
}
wall
{
//type nutUSpaldingWallFunction;
//value $internalField;
type calculated;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 10e5;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet
{
type waveTransmissive;
gamma 1.28;
fieldInf 10e5;
lInf 0.2;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object pPotential;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
#!/bin/sh
cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.mesh
rm -rf 0 && cp -r 0.org 0
runApplication decomposePar -force
n=$(echo processor* | wc -w)
runParallel potentialFoam $n -pName pPotential -initialiseUBCs
rm -f processor*/0/phi
runParallel XiDyMFoam $n

View File

@ -0,0 +1,23 @@
#!/bin/sh
cd ${0%/*} || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
rm -f log.* constant/polyMesh/*Level
runApplication blockMesh
runApplication -l log.createPatch.cyclic \
createPatch -dict system/createPatchDict.cyclic -overwrite
runApplication snappyHexMesh -overwrite
rm -rf 0
runApplication -l log.createPatch.ami \
createPatch -dict system/createPatchDict.ami -overwrite
runApplication transformPoints -scale '(0.01 0.01 0.01)'
runApplication mergeOrSplitBaffles -split -overwrite

View File

@ -0,0 +1,86 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
laminarFlameSpeedCorrelation Gulders;
fuel Methane;
Su Su [ 0 1 -1 0 0 0 0 ] 0.434;
SuModel unstrained;
equivalenceRatio equivalenceRatio [ 0 0 0 0 0 0 0 ] 0.7;
sigmaExt sigmaExt [ 0 0 -1 0 0 0 0 ] 100000;
XiModel transport;
XiCoef XiCoef [ 0 0 0 0 0 0 0 ] 0.62;
XiShapeCoef XiShapeCoef [ 0 0 0 0 0 0 0 ] 1;
uPrimeCoef uPrimeCoef [ 0 0 0 0 0 0 0 ] 1;
GuldersCoeffs
{
Methane
{
W 0.422;
eta 0.15;
xi 5.18;
alpha 2;
beta -0.5;
f 2.3;
}
}
ignite yes;
ignitionProperties
{
diameter 0.03;
start 0;
duration 1;
strength 20;
}
noIgnitionProperties
{
diameter 0;
start 0;
duration 1e-30;
strength 0;
}
ignitionSites
(
{
location (-0.28 0.55 0);
$noIgnitionProperties;
}
);
ignitionSphereFraction 1;
ignitionThickness ignitionThickness [ 0 1 0 0 0 0 0 ] 0.001;
ignitionCircleFraction 0.5;
ignitionKernelArea ignitionKernelArea [ 0 2 0 0 0 0 0 ] 0.001;
// ************************************************************************* //

View File

@ -0,0 +1,36 @@
/*--------------------------------*- 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 dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone rotating;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (1 0 0);
omega 10;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 0 );
// ************************************************************************* //

View File

@ -0,0 +1,208 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: Uhe Open Source CFD Uoolbox |
| \\ / O peration | Tersion: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertUoMeters 1;
r0 34;
r1 39;
r2 61;
r3 66;
t -10;
u 10;
o 10;
d2r #calc "constant::mathematical::pi/180";
r0CosT #calc "$r0*cos($d2r*($t ))";
r0CosTO #calc "$r0*cos($d2r*($t+$o))";
r0CosU #calc "$r0*cos($d2r*($u ))";
r0CosUO #calc "$r0*cos($d2r*($u+$o))";
r0SinT #calc "$r0*sin($d2r*($t ))";
r0SinTO #calc "$r0*sin($d2r*($t+$o))";
r0SinU #calc "$r0*sin($d2r*($u ))";
r0SinUO #calc "$r0*sin($d2r*($u+$o))";
r1CosT #calc "$r1*cos($d2r*($t ))";
r1CosTO #calc "$r1*cos($d2r*($t+$o))";
r1CosU #calc "$r1*cos($d2r*($u ))";
r1CosUO #calc "$r1*cos($d2r*($u+$o))";
r1SinT #calc "$r1*sin($d2r*($t ))";
r1SinTO #calc "$r1*sin($d2r*($t+$o))";
r1SinU #calc "$r1*sin($d2r*($u ))";
r1SinUO #calc "$r1*sin($d2r*($u+$o))";
r2CosT #calc "$r2*cos($d2r*($t ))";
r2CosTO #calc "$r2*cos($d2r*($t+$o))";
r2CosU #calc "$r2*cos($d2r*($u ))";
r2CosUO #calc "$r2*cos($d2r*($u+$o))";
r2SinT #calc "$r2*sin($d2r*($t ))";
r2SinTO #calc "$r2*sin($d2r*($t+$o))";
r2SinU #calc "$r2*sin($d2r*($u ))";
r2SinUO #calc "$r2*sin($d2r*($u+$o))";
r3CosT #calc "$r3*cos($d2r*($t ))";
r3CosTO #calc "$r3*cos($d2r*($t+$o))";
r3CosU #calc "$r3*cos($d2r*($u ))";
r3CosUO #calc "$r3*cos($d2r*($u+$o))";
r3SinT #calc "$r3*sin($d2r*($t ))";
r3SinTO #calc "$r3*sin($d2r*($t+$o))";
r3SinU #calc "$r3*sin($d2r*($u ))";
r3SinUO #calc "$r3*sin($d2r*($u+$o))";
vertices
(
(-34 $r1CosT $r1SinT )
(-34 $r1CosTO $r1SinTO)
(-34 $r1CosU $r1SinU )
(-30 $r1CosT $r1SinT )
(-30 $r1CosTO $r1SinTO)
(-30 $r1CosU $r1SinU )
(-15 $r0CosT $r0SinT )
(-15 $r0CosTO $r0SinTO)
(-15 $r0CosU $r0SinU )
( 0 $r1CosT $r1SinT )
( 0 $r1CosTO $r1SinTO)
( 0 $r1CosU $r1SinU )
( 12 $r1CosT $r1SinT )
( 12 $r1CosTO $r1SinTO)
( 12 $r1CosU $r1SinU )
( 12 $r1CosUO $r1SinUO)
( 28 $r1CosT $r1SinT )
( 28 $r1CosTO $r1SinTO)
( 28 $r1CosU $r1SinU )
( 28 $r1CosUO $r1SinUO)
( 40 $r1CosT $r1SinT )
( 40 $r1CosTO $r1SinTO)
( 40 $r1CosU $r1SinU )
(-34 $r2CosT $r2SinT )
(-34 $r2CosTO $r2SinTO)
(-34 $r2CosU $r2SinU )
(-30 $r2CosT $r2SinT )
(-30 $r2CosTO $r2SinTO)
(-30 $r2CosU $r2SinU )
(-15 $r3CosT $r3SinT )
(-15 $r3CosTO $r3SinTO)
(-15 $r3CosU $r3SinU )
( 0 $r2CosT $r2SinT )
( 0 $r2CosTO $r2SinTO)
( 0 $r2CosU $r2SinU )
( 12 $r2CosT $r2SinT )
( 12 $r2CosTO $r2SinTO)
( 12 $r2CosU $r2SinU )
( 12 $r2CosUO $r2SinUO)
( 28 $r2CosT $r2SinT )
( 28 $r2CosTO $r2SinTO)
( 28 $r2CosU $r2SinU )
( 28 $r2CosUO $r2SinUO)
( 40 $r2CosT $r2SinT )
( 40 $r2CosTO $r2SinTO)
( 40 $r2CosU $r2SinU )
);
blocks
(
hex ( 0 1 4 3 23 24 27 26) (8 4 22) simpleGrading (1 1 1)
hex ( 1 2 5 4 24 25 28 27) (8 4 22) simpleGrading (1 1 1)
hex ( 3 4 7 6 26 27 30 29) (8 15 22) simpleGrading (1 1 1)
hex ( 4 5 8 7 27 28 31 30) (8 15 22) simpleGrading (1 1 1)
hex ( 6 7 10 9 29 30 33 32) (8 15 22) simpleGrading (1 1 1)
hex ( 7 8 11 10 30 31 34 33) (8 15 22) simpleGrading (1 1 1)
hex ( 9 10 13 12 32 33 36 35) (8 12 22) simpleGrading (1 1 1)
hex (10 11 14 13 33 34 37 36) (8 12 22) simpleGrading (1 1 1)
hex (13 14 18 17 36 37 41 40) (8 16 22) simpleGrading (1 1 1)
hex (14 15 19 18 37 38 42 41) (8 16 22) simpleGrading (1 1 1)
hex (16 17 21 20 39 40 44 43) (8 12 22) simpleGrading (1 1 1)
hex (17 18 22 21 40 41 45 44) (8 12 22) simpleGrading (1 1 1)
);
edges
(
);
defaultPatch
{
name walls;
type wall;
}
boundary
(
coupled0
{
type patch;
faces
(
( 0 3 26 23)
( 3 6 29 26)
( 6 9 32 29)
( 9 12 35 32)
(12 13 36 35)
(13 17 40 36)
(17 16 39 40)
(16 20 43 39)
);
}
coupled1
{
type patch;
faces
(
( 2 5 28 25)
( 5 8 31 28)
( 8 11 34 31)
(11 14 37 34)
(14 15 38 37)
(15 19 42 38)
(19 18 41 42)
(18 22 45 41)
);
}
inlet
{
type patch;
faces
(
(0 1 24 23)
(1 2 25 24)
);
}
outlet
{
type patch;
faces
(
(20 21 44 43)
(21 22 45 44)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev-OpenCFD.feature-periodicAMIAndXiDyMFoam|
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9
(
inlet
{
type patch;
nFaces 274;
startFace 250645;
}
outlet
{
type patch;
nFaces 1280;
startFace 250919;
}
walls
{
type wall;
inGroups 1(wall);
nFaces 10444;
startFace 252199;
}
cyclic0
{
type cyclicSlip;
inGroups 1(cyclicSlip);
nFaces 3206;
startFace 262643;
matchTolerance 0.001;
transform rotational;
neighbourPatch cyclic1;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}
cyclic1
{
type cyclicSlip;
inGroups 1(cyclicSlip);
nFaces 3206;
startFace 265849;
matchTolerance 0.001;
transform rotational;
neighbourPatch cyclic0;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}
blade1
{
type wall;
inGroups 1(wall);
nFaces 2614;
startFace 269055;
}
blade2
{
type wall;
inGroups 1(wall);
nFaces 2616;
startFace 271669;
}
ami0
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
nFaces 1280;
startFace 274285;
matchTolerance 0.001;
transform unknown;
neighbourPatch ami1;
periodicPatch cyclic0;
}
ami1
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
nFaces 1280;
startFace 275565;
matchTolerance 0.001;
transform unknown;
neighbourPatch ami0;
periodicPatch cyclic0;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,111 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heheuPsiThermo;
mixture inhomogeneousMixture;
transport sutherland;
thermo janaf;
equationOfState perfectGas;
specie specie;
energy absoluteEnthalpy;
}
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 17.1256917852272;
fuel
{
specie
{
nMoles 1;
molWeight 16.0428;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 1.68347900000000e+00 1.02372400000000e-02 -3.87512900000000e-06
6.78558500000000e-10 -4.50342300000000e-14 -1.00807900000000e+04
9.62339500000000e+00 );
lowCpCoeffs ( 7.78741500000000e-01 1.74766800000000e-02 -2.78340900000000e-05
3.04970800000000e-08 -1.22393100000000e-11 -9.82522900000000e+03
1.37221900000000e+01);
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
oxidant
{
specie
{
nMoles 1; //9.52305854241338;
molWeight 28.8504;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 3.10621870999231e+00 1.28428498601527e-03 -4.65380802511688e-07
8.15860818565581e-11 -5.44497272650050e-15 -9.95271410040158e+02
-3.84458215280579e+00 );
lowCpCoeffs ( 3.27870489047439e+00 1.34284246978981e-03 -3.17412859038611e-06
4.63345514388486e-09 -2.07961247020324e-12 -1.01725432889533e+03
4.43589451598939e+00 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
burntProducts
{
specie
{
nMoles 1; //10.5230585424134;
molWeight 27.6333203887463;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 3.12621199152579e+00 1.93235833404466e-03 -7.13659150075058e-07
1.24291624549546e-10 -8.21247028136899e-15 -1.17845644935839e+04
-3.62860244355855e+00 );
lowCpCoeffs ( 3.15477967054864e+00 2.95287447890381e-03 -5.23511418470824e-06
5.99137516254551e-09 -2.40292638317596e-12 -1.18040651744366e+04
4.72596689098416e+00 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,6 @@
v 20 -70 -70
v 20 70 -70
v 20 70 70
v 20 -70 70
f 1 2 3
f 1 3 4

View File

@ -0,0 +1,4 @@
v 12.000000 0.000000 0.000000
v 20.000000 77.274066 20.705524
v 4.000000 79.695576 -6.972459
f 1 2 3

View File

@ -0,0 +1,4 @@
v 28.000000 0.000000 0.000000
v 20.000000 77.274066 20.705524
v 36.000000 79.695576 -6.972459
f 1 2 3

View File

@ -0,0 +1,310 @@
solid
facet normal -1 -0 -0
outer loop
vertex -34 52.7032 4.20627
vertex -34 53.7787 3.2743
vertex -34 51.4087 4.79746
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 53.7787 3.2743
vertex -34 54.5482 2.07707
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 54.5482 2.07707
vertex -34 54.9491 0.711574
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 54.9491 0.711574
vertex -34 54.9491 -0.711574
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 54.9491 -0.711574
vertex -34 54.5482 -2.07707
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 54.5482 -2.07707
vertex -34 53.7787 -3.2743
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 53.7787 -3.2743
vertex -34 52.7032 -4.20627
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 52.7032 -4.20627
vertex -34 51.4087 -4.79746
endloop
endfacet
facet normal -1 0 -0
outer loop
vertex -34 50.7557 -0.654861
vertex -34 51.4087 -4.79746
vertex -34 50 -5
endloop
endfacet
facet normal -1 0 -0
outer loop
vertex -34 50 -1
vertex -34 50 -5
vertex -34 48.5913 -4.79746
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 49.0904 -0.415415
vertex -34 48.5913 -4.79746
vertex -34 47.2968 -4.20627
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 49.0102 0.142315
vertex -34 47.2968 -4.20627
vertex -34 46.2213 -3.2743
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 46.2213 -3.2743
vertex -34 45.4518 -2.07707
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 45.4518 -2.07707
vertex -34 45.0509 -0.711574
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 45.0509 -0.711574
vertex -34 45.0509 0.711574
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 45.0509 0.711574
vertex -34 45.4518 2.07707
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 45.4518 2.07707
vertex -34 46.2213 3.2743
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 46.2213 3.2743
vertex -34 47.2968 4.20627
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 47.2968 4.20627
vertex -34 48.5913 4.79746
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 48.5913 4.79746
vertex -34 50 5
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 50 -1
vertex -34 48.5913 -4.79746
vertex -34 49.7183 -0.959493
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.0102 0.142315
vertex -34 46.2213 -3.2743
vertex -34 49.0904 0.415415
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 49.4594 0.841254
vertex -34 49.2442 0.654861
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 49.2442 0.654861
vertex -34 46.2213 -3.2743
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 49.2442 0.654861
vertex -34 49.0904 0.415415
vertex -34 46.2213 -3.2743
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.0102 -0.142315
vertex -34 47.2968 -4.20627
vertex -34 49.0102 0.142315
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.0904 -0.415415
vertex -34 47.2968 -4.20627
vertex -34 49.0102 -0.142315
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.2442 -0.654861
vertex -34 48.5913 -4.79746
vertex -34 49.0904 -0.415415
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.4594 -0.841254
vertex -34 48.5913 -4.79746
vertex -34 49.2442 -0.654861
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex -34 49.7183 -0.959493
vertex -34 48.5913 -4.79746
vertex -34 49.4594 -0.841254
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.2817 -0.959493
vertex -34 50 -5
vertex -34 50 -1
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.7557 -0.654861
vertex -34 50 -5
vertex -34 50.5406 -0.841254
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.5406 -0.841254
vertex -34 50 -5
vertex -34 50.2817 -0.959493
endloop
endfacet
facet normal -1 0 -0
outer loop
vertex -34 50.9096 -0.415415
vertex -34 51.4087 -4.79746
vertex -34 50.7557 -0.654861
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.9096 0.415415
vertex -34 51.4087 4.79746
vertex -34 50.9898 0.142315
endloop
endfacet
facet normal -1 0 -0
outer loop
vertex -34 50.9898 -0.142315
vertex -34 51.4087 -4.79746
vertex -34 50.9096 -0.415415
endloop
endfacet
facet normal -1 0 -0
outer loop
vertex -34 51.4087 4.79746
vertex -34 51.4087 -4.79746
vertex -34 50.9898 -0.142315
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 50.9898 -0.142315
vertex -34 50.9898 0.142315
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.7557 0.654861
vertex -34 51.4087 4.79746
vertex -34 50.9096 0.415415
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.5406 0.841254
vertex -34 51.4087 4.79746
vertex -34 50.7557 0.654861
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50.2817 0.959493
vertex -34 51.4087 4.79746
vertex -34 50.5406 0.841254
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 50 1
vertex -34 51.4087 4.79746
vertex -34 50.2817 0.959493
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 51.4087 4.79746
vertex -34 50 1
vertex -34 49.7183 0.959493
endloop
endfacet
facet normal -1 0 0
outer loop
vertex -34 49.4594 0.841254
vertex -34 51.4087 4.79746
vertex -34 49.7183 0.959493
endloop
endfacet
endsolid

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType LES;
LES
{
LESModel kEqn;
delta cubeRootVol;
turbulence on;
printCoeffs on;
oneEqEddyCoeffs
{
Prt 1;
}
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- 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 "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 0.1;
deltaT 1e-4;
writeControl adjustableRunTime;
writeInterval 2e-3;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.2;
// ************************************************************************* //

View File

@ -0,0 +1,88 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// - always: remove zero-sized (non-coupled) patches (that were not added)
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false;//true;
tol 1e-3;
// Patches to create.
patches
(
{
name ami0;
patchInfo
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
neighbourPatch ami1;
periodicPatch cyclic0;
matchTolerance $tol;
nRotationalTransforms 18;
}
constructFrom patches;
patches (ami);
}
{
name ami1;
patchInfo
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
neighbourPatch ami0;
periodicPatch cyclic0;
matchTolerance $tol;
nRotationalTransforms 18;
}
constructFrom patches;
patches (ami_slave);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,92 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// - always: remove zero-sized (non-coupled) patches (that were not added)
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false;//true;
tol 1e-3;
// Patches to create.
patches
(
{
name cyclic0;
patchInfo
{
type cyclicSlip;
neighbourPatch cyclic1;
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
matchTolerance $tol;
}
constructFrom patches;
patches (coupled0);
}
{
name cyclic1;
patchInfo
{
type cyclicSlip;
neighbourPatch cyclic0;
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
matchTolerance $tol;
}
constructFrom patches;
patches (coupled1);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 6;
method hierarchical;
hierarchicalCoeffs
{
n ( 6 1 1 );
delta 0.001;
order xyz;
}
preservePatches (cyclic0 cyclic1 ami0 ami1);
// ************************************************************************* //

View File

@ -0,0 +1,81 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default leastSquares;
grad(U) cellLimited Gauss linear 0.99;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phid,p) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phiXi,Xi) Gauss limitedLinear 1;
div(phiXi,Su) Gauss limitedLinear 1;
div(phiSt,b) Gauss limitedLinear01 1;
div(phi,ft_b_ha_hau) Gauss multivariateSelection
{
fu limitedLinear01 1;
ft limitedLinear01 1;
b limitedLinear01 1;
ha limitedLinear 1;
hau limitedLinear 1;
};
div(U) Gauss linear;
div((Su*n)) Gauss linear;
div((U+((Su*Xi)*n))) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(meshPhi,p) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p ;
Phi ;
pcorr ;
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(p|Phi|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
minIter 1;
}
"(p|Phi|rho)Final"
{
$p;
tolerance 1e-06;
relTol 0;
minIter 1;
}
pcorr
{
$p;
tolerance 1e-02;
relTol 0;
}
"(U|b|ft|fu|Su|Xi|ha|hau|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
minIter 1;
}
"(U|b|ft|fu|Su|Xi|ha|hau|k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
minIter 1;
}
}
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
potentialFlow
{
nNonOrthogonalCorrectors 20;
}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Include defaults parameters from master dictionary
#include "$WM_PROJECT_DIR/etc/caseDicts/meshQualityDict"
maxNonOrtho 55;
// ************************************************************************* //

View File

@ -0,0 +1,375 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers false;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
ami.obj
{
type triSurfaceMesh;
name ami;
}
blade1.obj
{
type triSurfaceMesh;
name blade1;
}
blade2.obj
{
type triSurfaceMesh;
name blade2;
}
inlet.stl
{
type triSurfaceMesh;
name inlet;
}
outlet.stl
{
type triSurfaceMesh;
name outlet;
}
walls.stl
{
type triSurfaceMesh;
name walls;
}
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// If local number of cells is >= maxLocalCells on any processor
// switches from from refinement followed by balancing
// (current method) to (weighted) balancing before refinement.
maxLocalCells 100000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 0;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 5;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
);
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
ami
{
level (1 1);
cellZone rotating;
faceZone rotating;
faceType baffle;
cellZoneInside insidePoint;
insidePoint (34 50 0);
}
blade1
{
level (1 1);
faceType baffle;
}
blade2
{
level (1 1);
faceType baffle;
}
cooling
{
level (1 1);
patchInfo
{
type patch;
}
}
inlet
{
level (1 1);
patchInfo
{
type patch;
}
}
outlet
{
level (1 1);
patchInfo
{
type patch;
}
}
walls
{
level (1 1);
patchInfo
{
type wall;
inGroups (wall);
}
}
}
resolveFeatureAngle 30;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
// This is an outside point locationInMesh (-0.033 -0.033 0.0033);
locationInMesh (-15 50 0);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 1.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 300;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Feature snapping
//- Number of feature edge snapping iterations.
// Leave out altogether to disable.
nFeatureSnapIter 10;
//- Detect (geometric) features by sampling the surface
implicitFeatureSnap true;
//- Use castellatedMeshControls::features
explicitFeatureSnap false;
//- Detect features between multiple surfaces
// (only for explicitFeatureSnap, default = false)
multiRegionFeatureSnap true;
}
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
layers
{
"blade."
{
nSurfaceLayers 2;
}
}
// Expansion factor for layer mesh
expansionRatio 1.0;
// Wanted thickness of final added cell layer. If multiple layers
// is the thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
finalLayerThickness 0.25;
// Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// See relativeSizes parameter.
minThickness 0.2;
// If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
nGrow 0;
// Advanced settings
// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 30;
// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
minMedianAxisAngle 90;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
// Max number of iterations after which relaxed meshQuality controls
// get used. Up to nRelaxIter it uses the settings in meshQualityControls,
// after nRelaxIter it uses the values in meshQualityControls::relaxed.
nRelaxedIter 20;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
#include "meshQualityDict"
// Optional : some meshing phases allow usage of relaxed rules.
// See e.g. addLayersControls::nRelaxedIter.
relaxed
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 75;
}
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- amount to scale back displacement at error points
errorReduction 0.75;
}
// Advanced
// Write flags
writeFlags
(
scalarLevels // write volScalarField with cellLevel for postprocessing
layerSets // write cellSets, faceSets of faces in layer
layerFields // write volScalarField for layer coverage
);
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Su;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform 0.135;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type fixedValue;
value uniform 0.135;
}
outlet
{
type inletOutlet;
inletValue uniform 0.135;
value uniform 0.135;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type fixedValue;
value uniform 300;
}
outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Tu;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type fixedValue;
value uniform 300;
}
outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (2 0 0);
/*
A=[2 1]
M=[28.8504 16.0428]
AFR=17.1256917852
T=300
p=1e5
R=8314.3
rho=p/R/T.*M
U=[2 NaN]
U(2)=rho(1)*U(1)*A(1)/(rho(2)*A(2))/AFR
*/
boundaryField
{
"(walls|cylinder)"
{
type fixedValue;
value uniform (0 0 0);
}
inletAir
{
type fixedValue;
value uniform (2 0 0);
}
inletFuel
{
type fixedValue;
value uniform (0.42003 0 0);
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Xi;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(walls|cylinder)"
{
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
"inlet.*"
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object b;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 100;
boundaryField
{
"(walls|cylinder)"
{
type epsilonWallFunction;
value uniform 100;
}
"inlet.*"
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.001;
value uniform 100;
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object ft;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
inletAir
{
type fixedValue;
value uniform 0;
}
inletFuel
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1;
boundaryField
{
"(walls|cylinder)"
{
type kqRWallFunction;
value uniform 1;
}
"inlet.*"
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.04;
value uniform 1;
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object mut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(walls|cylinder)"
{
type nutkWallFunction;
value uniform 0;
}
"inlet.*"
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
"(walls|cylinder)"
{
type zeroGradient;
}
"inlet.*"
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 100000;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointScalarField;
location "0";
object pointDisplacementy;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type fixedValue;
value $internalField;
}
cylinder
{
type codedFixedValue;
redirectType pointDisplacementy_cylinder;
code
#{
const scalar t = this->db().time().value();
const scalar a = 0.001;
const scalar f = 200;
operator==(a*sin(constant::mathematical::twoPi*f*t));
#};
value $internalField;
}
"inlet.*"
{
type fixedValue;
value $internalField;
}
outlet
{
type fixedValue;
value $internalField;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
turbulence on;
printCoeffs on;
// ************************************************************************* //

View File

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
laminarFlameSpeedCorrelation Gulders;
fuel Methane;
Su Su [ 0 1 -1 0 0 0 0 ] 0;
SuModel unstrained;
equivalenceRatio equivalenceRatio [ 0 0 0 0 0 0 0 ] 1;
sigmaExt sigmaExt [ 0 0 -1 0 0 0 0 ] 100000;
XiModel transport;
XiCoef XiCoef [ 0 0 0 0 0 0 0 ] 0.62;
XiShapeCoef XiShapeCoef [ 0 0 0 0 0 0 0 ] 1;
uPrimeCoef uPrimeCoef [ 0 0 0 0 0 0 0 ] 1;
GuldersCoeffs
{
Methane
{
W 0.422;
eta 0.15;
xi 5.18;
alpha 2;
beta -0.5;
f 2.3;
}
}
ignite yes;
ignitionSites
(
{
location (0.006 0 0.0005);
diameter 0.001;
start 0.02;
duration 0.04;
strength 5;
}
);
ignitionSphereFraction 1;
ignitionThickness ignitionThickness [ 0 1 0 0 0 0 0 ] 0.001;
ignitionCircleFraction 0.5;
ignitionKernelArea ignitionKernelArea [ 0 2 0 0 0 0 0 ] 0.001;
// ************************************************************************* //

View File

@ -0,0 +1,34 @@
/*--------------------------------*- 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 dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solver displacementComponentLaplacian;
displacementComponentLaplacianCoeffs
{
component y;
diffusivity uniform;
applyPointLocation false;
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 0 );
// ************************************************************************* //

View File

@ -0,0 +1,156 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
vertices
(
(-15 -6 0)
(-15 -2 0)
(-15 2 0)
(-15 6 0)
( -6 -6 0)
( -6 -2 0)
( -6 2 0)
( -6 6 0)
( -2.82842712474619 -2.82842712474619 0)
( -3.86370330515627 -1.03527618041008 0)
( -3.86370330515627 1.03527618041008 0)
( -2.82842712474619 2.82842712474619 0)
( 2.82842712474619 -2.82842712474619 0)
( 2.82842712474619 2.82842712474619 0)
( 6 -6 0)
( 6 6 0)
( 50 -6 0)
( 50 6 0)
(-15 -6 1)
(-15 -2 1)
(-15 2 1)
(-15 6 1)
( -6 -6 1)
( -6 -2 1)
( -6 2 1)
( -6 6 1)
( -2.82842712474619 -2.82842712474619 1)
( -3.86370330515627 -1.03527618041008 1)
( -3.86370330515627 1.03527618041008 1)
( -2.82842712474619 2.82842712474619 1)
( 2.82842712474619 -2.82842712474619 1)
( 2.82842712474619 2.82842712474619 1)
( 6 -6 1)
( 6 6 1)
( 50 -6 1)
( 50 6 1)
);
blocks
(
hex ( 0 4 5 1 18 22 23 19) (16 8 1) simpleGrading (1 1 1)
hex ( 1 5 6 2 19 23 24 20) (16 8 1) simpleGrading (1 1 1)
hex ( 2 6 7 3 20 24 25 21) (16 8 1) simpleGrading (1 1 1)
hex ( 4 8 9 5 22 26 27 23) ( 8 8 1) simpleGrading (1 1 1)
hex ( 5 9 10 6 23 27 28 24) ( 8 8 1) simpleGrading (1 1 1)
hex ( 6 10 11 7 24 28 29 25) ( 8 8 1) simpleGrading (1 1 1)
hex ( 4 14 12 8 22 32 30 26) (24 8 1) simpleGrading (1 1 1)
hex (12 14 15 13 30 32 33 31) ( 8 24 1) simpleGrading (1 1 1)
hex (11 13 15 7 29 31 33 25) (24 8 1) simpleGrading (1 1 1)
hex (14 16 17 15 32 34 35 33) (80 24 1) simpleGrading (1 1 1)
);
edges
(
arc 8 9 (-3.46410161513775 2 0)
arc 9 10 (-4 0 0)
arc 10 11 (-3.46410161513775 2 0)
arc 11 13 ( 0 4 0)
arc 13 12 ( 4 0 0)
arc 12 8 ( 0 -4 0)
arc 26 27 (-3.46410161513775 2 1)
arc 27 28 (-4 0 1)
arc 28 29 (-3.46410161513775 2 1)
arc 29 31 ( 0 4 1)
arc 31 30 ( 4 0 1)
arc 30 26 ( 0 -4 1)
);
defaultPatch
{
name frontAndBack;
type empty;
}
boundary
(
inletAir
{
type patch;
faces
(
(0 1 19 18)
(2 3 21 20)
);
}
inletFuel
{
type patch;
faces
(
(1 2 20 19)
);
}
outlet
{
type patch;
faces
(
(16 17 35 34)
);
}
walls
{
type wall;
faces
(
( 0 4 22 18)
( 3 7 25 21)
( 4 14 32 22)
( 7 15 33 25)
(14 16 34 32)
(15 17 35 33)
);
}
cylinder
{
type wall;
faces
(
( 8 9 27 26)
( 9 10 28 27)
(10 11 29 28)
(11 13 31 29)
(13 12 30 31)
(12 8 26 30)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,61 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev-OpenCFD.feature-periodicAMIAndXiDyMFoam|
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
(
inletAir
{
type patch;
nFaces 16;
startFace 5952;
}
inletFuel
{
type patch;
nFaces 8;
startFace 5968;
}
outlet
{
type patch;
nFaces 24;
startFace 5976;
}
walls
{
type wall;
inGroups 1(wall);
nFaces 240;
startFace 6000;
}
cylinder
{
type wall;
inGroups 1(wall);
nFaces 96;
startFace 6240;
}
frontAndBack
{
type empty;
inGroups 1(empty);
nFaces 6144;
startFace 6336;
}
)
// ************************************************************************* //

View File

@ -0,0 +1,115 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heheuPsiThermo;
mixture inhomogeneousMixture;
transport sutherland;
thermo janaf;
equationOfState perfectGas;
specie specie;
energy absoluteEnthalpy;
}
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 17.1256917852;
fuel
{
specie
{
nMoles 1;
molWeight 16.0428;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 1.68347900000000e+00 1.02372400000000e-02 -3.87512900000000e-06
6.78558500000000e-10 -4.50342300000000e-14 -1.00807900000000e+04
9.62339500000000e+00 );
lowCpCoeffs ( 7.78741500000000e-01 1.74766800000000e-02 -2.78340900000000e-05
3.04970800000000e-08 -1.22393100000000e-11 -9.82522900000000e+03
1.37221900000000e+01);
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
oxidant
{
specie
{
nMoles 1;
molWeight 28.8504;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 3.0885497471e+00 1.3043264856e-03 -4.7552447148e-07
8.3493327980e-11 -5.5737056214e-15 -9.8814063549e+02
-4.0547404058e+00 );
lowCpCoeffs ( 3.2806699701e+00 1.3492770106e-03 -3.2517684297e-06
4.7326393524e-09 -2.1155491172e-12 -1.0176130308e+03
4.3881233780e+00 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
burntProducts
{
specie
{
nMoles 1;
molWeight 27.6333203887;
}
thermodynamics
{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 3.0233794599e+00 1.9430560990e-03 -6.9382318371e-07
1.1776092714e-10 -7.6289056653e-15 -1.0995628377e+04
-3.0620017962e+00 );
lowCpCoeffs ( 3.2182230144e+00 2.6101069239e-03 -5.0302916124e-06
6.0101629539e-09 -2.4254586430e-12 -1.1068041672e+04
4.2846702447e+00 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict.1st;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application XiDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.1;
deltaT 1e-5;
writeControl adjustableRunTime;
writeInterval 1e-3;
purgeWrite 0;
writeFormat ascii;
writePrecision 8;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.4;
libs ( "libfvMotionSolvers.so" );
// ************************************************************************* //

View File

@ -0,0 +1,79 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phid,p) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phiXi,Xi) Gauss limitedLinear 1;
div(phiXi,Su) Gauss limitedLinear 1;
div(phiSt,b) Gauss limitedLinear01 1;
div(phi,ft_b_ha_hau) Gauss multivariateSelection
{
fu limitedLinear01 1;
ft limitedLinear01 1;
b limitedLinear01 1;
ha limitedLinear 1;
hau limitedLinear 1;
};
div(U) Gauss linear;
div((Su*n)) Gauss linear;
div((U+((Su*Xi)*n))) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(meshPhi,p) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p ;
pcorr ;
}
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(p|rho|cellDisplacementy)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
minIter 1;
}
"(p|rho|cellDisplacementy)Final"
{
$p;
tolerance 1e-06;
relTol 0;
minIter 1;
}
pcorr
{
$p;
tolerance 1e-2;
relTol 0;
}
"(U|b|ft|fu|Su|Xi|ha|hau|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
minIter 1;
}
"(U|b|ft|fu|Su|Xi|ha|hau|k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
minIter 1;
}
}
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- 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 "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform (1 0 0);
}
outlet
{
type pressureInletOutletVelocity;
value $internalField;
}
walls
{
type movingWallVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1.8e-3;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 3.75e-3;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type nutkWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- 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 p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,4 @@
Testcase for cyclicPeriodicAMI functionality. This case is adapted
from the oscillatingInletACMI2D testcase. Assumes cyclic behaviour
in y-direction; this cyclic transformation is used to extend the underlying
cyclicAMI such that the weights on either side add up to (at least) one.

View File

@ -0,0 +1,36 @@
/*--------------------------------*- 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 dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone inletChannel;
solidBodyMotionFunction oscillatingLinearMotion;
oscillatingLinearMotionCoeffs
{
amplitude (0 0.5 0);
omega 3.14; // rad/s (.5 rps)
}
}
// ************************************************************************* //

View File

@ -0,0 +1,158 @@
/*--------------------------------*- 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;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0 0.333333333333333 0 )
(0 1.333333333333333 0 )
(0 1.333333333333333 0.1)
(0 0.333333333333333 0.1)
(0.8 0.333333333333333 0 )
(0.8 1.333333333333333 0 )
(0.8 1.333333333333333 0.1)
(0.8 0.333333333333333 0.1)
(1 0.333333333333333 0 )
(1 1.333333333333333 0 )
(1 1.333333333333333 0.1)
(1 0.333333333333333 0.1)
(1 0 0 )
(1 1 0 )
(1 1 0.1)
(1 0 0.1)
(1.2 0 0 )
(1.2 1 0 )
(1.2 1 0.1)
(1.2 0 0.1)
(3 0 0 )
(3 1 0 )
(3 1 0.1)
(3 0 0.1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) inletChannel (40 1 64) simpleGrading (1 1 1)
hex (4 5 6 7 8 9 10 11 12) inletChannel (40 1 16) simpleGrading (1 1 1)
hex (12 13 14 15 16 17 18 19) (96 1 8) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) (96 1 72) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 1 2 3)
);
}
outlet
{
type patch;
faces
(
(20 21 22 23)
);
}
walls
{
type wall;
faces
(
(0 3 7 4)
(16 19 23 20)
(1 2 6 5)
(17 18 22 21)
);
}
cyclicMoving1
{
type cyclic;
neighbourPatch cyclicMoving2;
faces
(
(4 7 11 8)
);
}
cyclicMoving2
{
type cyclic;
neighbourPatch cyclicMoving1;
faces
(
(5 6 10 9)
);
}
cyclicStationary1
{
type cyclic;
neighbourPatch cyclicStationary2;
faces
(
(12 15 19 16)
);
}
cyclicStationary2
{
type cyclic;
neighbourPatch cyclicStationary1;
faces
(
(13 14 18 17)
);
}
ami1
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
neighbourPatch ami2;
periodicPatch cyclicMoving1;
faces
(
(8 9 10 11)
);
}
ami2
{
type cyclicPeriodicAMI;
inGroups 1(cyclicAMI);
neighbourPatch ami1;
periodicPatch cyclicMoving1;
faces
(
(12 13 14 15)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- 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 turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- 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 "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleDyMFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.05;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep true;
maxCo 0.5;
// ************************************************************************* //

View File

@ -0,0 +1,63 @@
/*--------------------------------*- 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 "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) cellLimited Gauss linear 1;
}
divSchemes
{
default none;
// div(phi,U) Gauss upwind;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.33;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default limited corrected 0.33;
}
fluxRequired
{
default no;
pcorr ;
p ;
}
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*--------------------------------*- 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;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
pcorr
{
solver GAMG;
tolerance 1e-2;
relTol 0;
smoother GaussSeidel;
cacheAgglomeration no;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 50;
}
p
{
$pcorr;
tolerance 1e-5;
relTol 0.01;
}
pFinal
{
$p;
tolerance 1e-6;
relTol 0;
}
"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.1;
}
"(U|k|epsilon)Final"
{
$U;
tolerance 1e-6;
relTol 0;
}
}
PIMPLE
{
correctPhi no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
// "(U|k|epsilon).*" 1;
}
cache
{
grad(U);
}
// ************************************************************************* //