Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2011-09-16 19:18:23 +01:00
28 changed files with 768 additions and 420 deletions

View File

@ -924,6 +924,7 @@ int main(int argc, char *argv[])
#include "addRegionOption.H" #include "addRegionOption.H"
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
argList::addOption("dict", "name", "specify alternative dictionary");
argList::addBoolOption("AMI", "apply mapped AMI boundary type"); argList::addBoolOption("AMI", "apply mapped AMI boundary type");
#include "setRootCase.H" #include "setRootCase.H"
@ -932,6 +933,8 @@ int main(int argc, char *argv[])
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
bool overwrite = args.optionFound("overwrite"); bool overwrite = args.optionFound("overwrite");
const word dictName
(args.optionLookupOrDefault<word>("dict", "extrudeToRegionMeshDict"));
mappedPatchBase::sampleMode sampleMode = mappedPatchBase::NEARESTPATCHFACE; mappedPatchBase::sampleMode sampleMode = mappedPatchBase::NEARESTPATCHFACE;
if (args.optionFound("AMI")) if (args.optionFound("AMI"))
@ -943,7 +946,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
"extrudeToRegionMeshDict", dictName,
runTime.system(), runTime.system(),
runTime, runTime,
IOobject::MUST_READ_IF_MODIFIED IOobject::MUST_READ_IF_MODIFIED

View File

@ -43,6 +43,7 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
Foam::timeSelector::addOptions(); Foam::timeSelector::addOptions();
# include "addRegionOption.H"
Foam::argList::addBoolOption Foam::argList::addBoolOption
( (
"noWrite", "noWrite",
@ -74,7 +75,7 @@ int main(int argc, char *argv[])
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args); Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
# include "createMesh.H" # include "createNamedMesh.H"
utility().tryPreCalc(args, runTime, mesh); utility().tryPreCalc(args, runTime, mesh);

View File

@ -37,6 +37,11 @@ Description
#include "calc.H" #include "calc.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "pointFields.H"
#include "ReadFields.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RAS/RASModel/RASModel.H" #include "incompressible/RAS/RASModel/RASModel.H"
@ -84,203 +89,268 @@ namespace Foam
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{ {
Info<< " Reading phi" << endl; if (args.optionFound("noFlow"))
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Info<< " Reading U" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Info<< " Reading p" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{ {
IOobject RASPropertiesHeader Info<< " Operating in no-flow mode; no models will be loaded."
( << " All vol, surface and point fields will be loaded." << endl;
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
IOobject LESPropertiesHeader // Read objects in time directory
( IOobjectList objects(mesh, runTime.timeName());
"LESProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (RASPropertiesHeader.headerOk()) // Read vol fields.
{
IOdictionary RASProperties(RASPropertiesHeader);
singlePhaseTransportModel laminarTransport(U, phi); PtrList<volScalarField> vsFlds;
ReadFields(mesh, objects, vsFlds);
autoPtr<incompressible::RASModel> RASModel PtrList<volVectorField> vvFlds;
( ReadFields(mesh, objects, vvFlds);
incompressible::RASModel::New
(
U,
phi,
laminarTransport
)
);
execFlowFunctionObjects(args, runTime);
}
else if (LESPropertiesHeader.headerOk())
{
IOdictionary LESProperties(LESPropertiesHeader);
singlePhaseTransportModel laminarTransport(U, phi); PtrList<volSphericalTensorField> vstFlds;
ReadFields(mesh, objects, vstFlds);
autoPtr<incompressible::LESModel> sgsModel PtrList<volSymmTensorField> vsymtFlds;
( ReadFields(mesh, objects, vsymtFlds);
incompressible::LESModel::New(U, phi, laminarTransport)
);
execFlowFunctionObjects(args, runTime); PtrList<volTensorField> vtFlds;
} ReadFields(mesh, objects, vtFlds);
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar nu(transportProperties.lookup("nu")); // Read surface fields.
execFlowFunctionObjects(args, runTime); PtrList<surfaceScalarField> ssFlds;
} ReadFields(mesh, objects, ssFlds);
}
else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
autoPtr<basicPsiThermo> thermo(basicPsiThermo::New(mesh));
volScalarField rho PtrList<surfaceVectorField> svFlds;
( ReadFields(mesh, objects, svFlds);
IOobject
(
"rho",
runTime.timeName(),
mesh
),
thermo->rho()
);
IOobject RASPropertiesHeader PtrList<surfaceSphericalTensorField> sstFlds;
( ReadFields(mesh, objects, sstFlds);
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
IOobject LESPropertiesHeader PtrList<surfaceSymmTensorField> ssymtFlds;
( ReadFields(mesh, objects, ssymtFlds);
"LESProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (RASPropertiesHeader.headerOk()) PtrList<surfaceTensorField> stFlds;
{ ReadFields(mesh, objects, stFlds);
IOdictionary RASProperties(RASPropertiesHeader);
autoPtr<compressible::RASModel> RASModel // Read point fields.
( const pointMesh& pMesh = pointMesh::New(mesh);
compressible::RASModel::New
(
rho,
U,
phi,
thermo()
)
);
execFlowFunctionObjects(args, runTime); PtrList<pointScalarField> psFlds;
} ReadFields(pMesh, objects, psFlds);
else if (LESPropertiesHeader.headerOk())
{
IOdictionary LESProperties(LESPropertiesHeader);
autoPtr<compressible::LESModel> sgsModel PtrList<pointVectorField> pvFlds;
( ReadFields(pMesh, objects, pvFlds);
compressible::LESModel::New(rho, U, phi, thermo())
);
execFlowFunctionObjects(args, runTime); PtrList<pointSphericalTensorField> pstFlds;
} ReadFields(pMesh, objects, pstFlds);
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar mu(transportProperties.lookup("mu")); PtrList<pointSymmTensorField> psymtFlds;
ReadFields(pMesh, objects, psymtFlds);
execFlowFunctionObjects(args, runTime); PtrList<pointTensorField> ptFlds;
} ReadFields(pMesh, objects, ptFlds);
execFlowFunctionObjects(args, runTime);
} }
else else
{ {
FatalErrorIn(args.executable()) Info<< " Reading phi" << endl;
<< "Incorrect dimensions of phi: " << phi.dimensions() surfaceScalarField phi
<< nl << exit(FatalError); (
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Info<< " Reading U" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
Info<< " Reading p" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ
),
mesh
);
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{
IOobject RASPropertiesHeader
(
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
IOobject LESPropertiesHeader
(
"LESProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (RASPropertiesHeader.headerOk())
{
IOdictionary RASProperties(RASPropertiesHeader);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> RASModel
(
incompressible::RASModel::New
(
U,
phi,
laminarTransport
)
);
execFlowFunctionObjects(args, runTime);
}
else if (LESPropertiesHeader.headerOk())
{
IOdictionary LESProperties(LESPropertiesHeader);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::LESModel> sgsModel
(
incompressible::LESModel::New(U, phi, laminarTransport)
);
execFlowFunctionObjects(args, runTime);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar nu(transportProperties.lookup("nu"));
execFlowFunctionObjects(args, runTime);
}
}
else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
{
autoPtr<basicPsiThermo> thermo(basicPsiThermo::New(mesh));
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh
),
thermo->rho()
);
IOobject RASPropertiesHeader
(
"RASProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
IOobject LESPropertiesHeader
(
"LESProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (RASPropertiesHeader.headerOk())
{
IOdictionary RASProperties(RASPropertiesHeader);
autoPtr<compressible::RASModel> RASModel
(
compressible::RASModel::New
(
rho,
U,
phi,
thermo()
)
);
execFlowFunctionObjects(args, runTime);
}
else if (LESPropertiesHeader.headerOk())
{
IOdictionary LESProperties(LESPropertiesHeader);
autoPtr<compressible::LESModel> sgsModel
(
compressible::LESModel::New(rho, U, phi, thermo())
);
execFlowFunctionObjects(args, runTime);
}
else
{
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar mu(transportProperties.lookup("mu"));
execFlowFunctionObjects(args, runTime);
}
}
else
{
FatalErrorIn(args.executable())
<< "Incorrect dimensions of phi: " << phi.dimensions()
<< nl << exit(FatalError);
}
} }
} }

View File

@ -42,13 +42,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
timeSelector::addOptions(); timeSelector::addOptions();
# include "addRegionOption.H"
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
instantList timeDirs = timeSelector::select0(runTime, args); instantList timeDirs = timeSelector::select0(runTime, args);
# include "createMeshNoClear.H" # include "createNamedMesh.H"
pointMesh pMesh(mesh); pointMesh pMesh(mesh);

View File

@ -37,6 +37,18 @@ void Foam::OutputFilterFunctionObject<OutputFilter>::readDict()
dict_.readIfPresent("dictionary", dictName_); dict_.readIfPresent("dictionary", dictName_);
dict_.readIfPresent("enabled", enabled_); dict_.readIfPresent("enabled", enabled_);
dict_.readIfPresent("storeFilter", storeFilter_); dict_.readIfPresent("storeFilter", storeFilter_);
dict_.readIfPresent("timeStart", timeStart_);
dict_.readIfPresent("timeEnd", timeEnd_);
}
template<class OutputFilter>
bool Foam::OutputFilterFunctionObject<OutputFilter>::active() const
{
return
enabled_
&& time_.value() >= timeStart_
&& time_.value() <= timeEnd_;
} }
@ -94,6 +106,8 @@ Foam::OutputFilterFunctionObject<OutputFilter>::OutputFilterFunctionObject
dictName_(), dictName_(),
enabled_(true), enabled_(true),
storeFilter_(true), storeFilter_(true),
timeStart_(-VGREAT),
timeEnd_(VGREAT),
outputControl_(t, dict) outputControl_(t, dict)
{ {
readDict(); readDict();
@ -121,7 +135,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start()
{ {
readDict(); readDict();
if (enabled_&&storeFilter_) if (enabled_ && storeFilter_)
{ {
allocateFilter(); allocateFilter();
} }
@ -136,7 +150,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
const bool forceWrite const bool forceWrite
) )
{ {
if (enabled_) if (active())
{ {
if (!storeFilter_) if (!storeFilter_)
{ {
@ -163,7 +177,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::execute
template<class OutputFilter> template<class OutputFilter>
bool Foam::OutputFilterFunctionObject<OutputFilter>::end() bool Foam::OutputFilterFunctionObject<OutputFilter>::end()
{ {
if (enabled_) if (active())
{ {
if (!storeFilter_) if (!storeFilter_)
{ {

View File

@ -68,18 +68,28 @@ class OutputFilterFunctionObject
//- Input dictionary //- Input dictionary
dictionary dict_; dictionary dict_;
//- Name of region
word regionName_;
//- Optional dictionary name to supply required inputs // Optional user inputs
word dictName_;
//- Switch for the execution of the functionObject //- Name of region - defaults to name of polyMesh::defaultRegion
bool enabled_; word regionName_;
//- Dictionary name to supply required inputs
word dictName_;
//- Switch for the execution - defaults to 'yes/on'
bool enabled_;
//- Switch to store filter in between writes or use on-the-fly
// construction - defaults to true
bool storeFilter_;
//- Activation time - defaults to -VGREAT
scalar timeStart_;
//- De-activation time - defaults to VGREAT
scalar timeEnd_;
//- Switch to store filter in between writes or use on-the-fly
// construction
bool storeFilter_;
//- Output controls //- Output controls
outputFilterOutputControl outputControl_; outputFilterOutputControl outputControl_;
@ -99,6 +109,9 @@ class OutputFilterFunctionObject
//- Destroys most of the data associated with this object. //- Destroys most of the data associated with this object.
void destroyFilter(); void destroyFilter();
//- Returns true if active (enabled and within time bounds)
bool active() const;
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
OutputFilterFunctionObject(const OutputFilterFunctionObject&); OutputFilterFunctionObject(const OutputFilterFunctionObject&);

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "STARCDMeshReader.H" #include "STARCDMeshReader.H"
#include "cyclicPolyPatch.H" #include "oldCyclicPolyPatch.H"
#include "emptyPolyPatch.H" #include "emptyPolyPatch.H"
#include "wallPolyPatch.H" #include "wallPolyPatch.H"
#include "symmetryPolyPatch.H" #include "symmetryPolyPatch.H"
@ -950,7 +950,7 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
{ {
// incorrect. should be cyclicPatch but this // incorrect. should be cyclicPatch but this
// requires info on connected faces. // requires info on connected faces.
patchTypes_[patchI] = cyclicPolyPatch::typeName; patchTypes_[patchI] = oldCyclicPolyPatch::typeName;
patchPhysicalTypes_[patchI] = patchTypes_[patchI]; patchPhysicalTypes_[patchI] = patchTypes_[patchI];
} }
else if (origType == "baffle") else if (origType == "baffle")

View File

@ -386,6 +386,7 @@ $(basicSource)/basicSource/basicSourceIO.C
$(basicSource)/basicSource/basicSourceList.C $(basicSource)/basicSource/basicSourceList.C
$(basicSource)/basicSource/IObasicSourceList.C $(basicSource)/basicSource/IObasicSourceList.C
$(basicSource)/actuationDiskSource/actuationDiskSource.C $(basicSource)/actuationDiskSource/actuationDiskSource.C
$(basicSource)/radialActuationDiskSource/radialActuationDiskSource.C
$(basicSource)/explicitSource/explicitSource.C $(basicSource)/explicitSource/explicitSource.C

View File

@ -69,12 +69,13 @@ void Foam::actuationDiskSource::checkData() const
Foam::actuationDiskSource::actuationDiskSource Foam::actuationDiskSource::actuationDiskSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
) )
: :
basicSource(name, dict, mesh), basicSource(name, modelType, dict, mesh),
dict_(dict.subDict(typeName + "Coeffs")), dict_(dict.subDict(modelType + "Coeffs")),
diskDir_(dict_.lookup("diskDir")), diskDir_(dict_.lookup("diskDir")),
Cp_(readScalar(dict_.lookup("Cp"))), Cp_(readScalar(dict_.lookup("Cp"))),
Ct_(readScalar(dict_.lookup("Ct"))), Ct_(readScalar(dict_.lookup("Ct"))),
@ -97,31 +98,34 @@ void Foam::actuationDiskSource::addSu(fvMatrix<vector>& UEqn)
compressible = true; compressible = true;
} }
const scalarField& V = this->mesh().V(); const scalarField& cellsV = this->mesh().V();
vectorField& Usource = UEqn.source(); vectorField& Usource = UEqn.source();
const vectorField& U = UEqn.psi(); const vectorField& U = UEqn.psi();
if (compressible) if (V() > VSMALL)
{ {
addActuationDiskAxialInertialResistance if (compressible)
( {
Usource, addActuationDiskAxialInertialResistance
cells_, (
V, Usource,
this->mesh().lookupObject<volScalarField>("rho"), cells_,
U cellsV,
); this->mesh().lookupObject<volScalarField>("rho"),
} U
else );
{ }
addActuationDiskAxialInertialResistance else
( {
Usource, addActuationDiskAxialInertialResistance
cells_, (
V, Usource,
geometricOneField(), cells_,
U cellsV,
); geometricOneField(),
U
);
}
} }
} }

View File

@ -69,7 +69,10 @@ class actuationDiskSource
: :
public basicSource public basicSource
{ {
// Private data
protected:
// Protected data
//- Sub dictionary with actuationDisk information //- Sub dictionary with actuationDisk information
const dictionary& dict_; const dictionary& dict_;
@ -87,6 +90,8 @@ class actuationDiskSource
scalar diskArea_; scalar diskArea_;
private:
// Private Member Functions // Private Member Functions
//- Check data //- Check data
@ -122,6 +127,7 @@ public:
actuationDiskSource actuationDiskSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
); );

View File

@ -36,13 +36,12 @@ void Foam::actuationDiskSource::addActuationDiskAxialInertialResistance
( (
vectorField& Usource, vectorField& Usource,
const labelList& cells, const labelList& cells,
const scalarField& V, const scalarField& Vcells,
const RhoFieldType& rho, const RhoFieldType& rho,
const vectorField& U const vectorField& U
) const ) const
{ {
scalar a = 1.0 - Cp_/Ct_; scalar a = 1.0 - Cp_/Ct_;
scalar totVol = 0.0;
scalarField T(cells.size()); scalarField T(cells.size());
vector uniDiskDir = diskDir_/mag(diskDir_); vector uniDiskDir = diskDir_/mag(diskDir_);
tensor E(tensor::zero); tensor E(tensor::zero);
@ -52,12 +51,11 @@ void Foam::actuationDiskSource::addActuationDiskAxialInertialResistance
const vectorField U1((1.0 - a)*U); const vectorField U1((1.0 - a)*U);
forAll(cells, i) forAll(cells, i)
{ {
totVol += V[cells[i]];
T[i] = 2.0*rho[cells[i]]*diskArea_*mag(U1[cells[i]])*a/(1.0 - a); T[i] = 2.0*rho[cells[i]]*diskArea_*mag(U1[cells[i]])*a/(1.0 - a);
} }
forAll(cells, i) forAll(cells, i)
{ {
Usource[cells[i]] += ((V[cells[i]]/totVol)*T[i]*E) & U1[cells[i]]; Usource[cells[i]] += ((Vcells[cells[i]]/V())*T[i]*E) & U1[cells[i]];
} }
} }

View File

@ -188,6 +188,7 @@ void Foam::basicSource::setCellSet()
Foam::basicSource::basicSource Foam::basicSource::basicSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
) )
@ -198,7 +199,10 @@ Foam::basicSource::basicSource
active_(readBool(dict_.lookup("active"))), active_(readBool(dict_.lookup("active"))),
timeStart_(readScalar(dict_.lookup("timeStart"))), timeStart_(readScalar(dict_.lookup("timeStart"))),
duration_(readScalar(dict_.lookup("duration"))), duration_(readScalar(dict_.lookup("duration"))),
selectionMode_(selectionModeTypeNames_.read(dict_.lookup("selectionMode"))), selectionMode_
(
selectionModeTypeNames_.read(dict_.lookup("selectionMode"))
),
cellSetName_("none"), cellSetName_("none"),
V_(0.0) V_(0.0)
{ {
@ -237,7 +241,7 @@ Foam::autoPtr<Foam::basicSource> Foam::basicSource::New
<< exit(FatalError); << exit(FatalError);
} }
return autoPtr<basicSource>(cstrIter()(name, dict, mesh)); return autoPtr<basicSource>(cstrIter()(name, modelType, dict, mesh));
} }

View File

@ -180,10 +180,11 @@ public:
dictionary, dictionary,
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
), ),
(name, dict, mesh) (name, modelType, dict, mesh)
); );
@ -193,6 +194,7 @@ public:
basicSource basicSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
); );

View File

@ -106,12 +106,13 @@ void Foam::explicitSource::setFieldData(const dictionary& dict)
Foam::explicitSource::explicitSource Foam::explicitSource::explicitSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
) )
: :
basicSource(name, dict, mesh), basicSource(name, modelType, dict, mesh),
dict_(dict.subDict(typeName + "Coeffs")), dict_(dict.subDict(modelType + "Coeffs")),
volumeMode_(volumeModeTypeNames_.read(dict_.lookup("volumeMode"))) volumeMode_(volumeModeTypeNames_.read(dict_.lookup("volumeMode")))
{ {
setFieldData(dict_.subDict("fieldData")); setFieldData(dict_.subDict("fieldData"));

View File

@ -135,6 +135,7 @@ public:
explicitSource explicitSource
( (
const word& name, const word& name,
const word& modelType,
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
); );

View File

@ -0,0 +1,134 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*----------------------------------------------------------------------------*/
#include "radialActuationDiskSource.H"
#include "geometricOneField.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(radialActuationDiskSource, 0);
addToRunTimeSelectionTable
(
basicSource,
radialActuationDiskSource,
dictionary
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::radialActuationDiskSource::radialActuationDiskSource
(
const word& name,
const word& modelType,
const dictionary& dict,
const fvMesh& mesh
)
:
actuationDiskSource(name, modelType, dict, mesh),
dict_(dict.subDict(modelType + "Coeffs")),
coeffs_()
{
dict_.lookup("coeffs") >> coeffs_;
Info<< " - creating radial actuation disk zone: "
<< this->name() << endl;
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::radialActuationDiskSource::addSu(fvMatrix<vector>& UEqn)
{
bool compressible = false;
if (UEqn.dimensions() == dimensionSet(1, 1, -2, 0, 0))
{
compressible = true;
}
const scalarField& cellsV = this->mesh().V();
vectorField& Usource = UEqn.source();
const vectorField& U = UEqn.psi();
if (V() > VSMALL)
{
if (compressible)
{
addRadialActuationDiskAxialInertialResistance
(
Usource,
cells_,
cellsV,
this->mesh().lookupObject<volScalarField>("rho"),
U
);
}
else
{
addRadialActuationDiskAxialInertialResistance
(
Usource,
cells_,
cellsV,
geometricOneField(),
U
);
}
}
}
void Foam::radialActuationDiskSource::writeData(Ostream& os) const
{
actuationDiskSource::writeData(os);
}
bool Foam::radialActuationDiskSource::read(const dictionary& dict)
{
if (basicSource::read(dict))
{
const dictionary& sourceDict = dict.subDict(name());
const dictionary& subDictCoeffs =
sourceDict.subDict(typeName + "Coeffs");
subDictCoeffs.readIfPresent("diskDir", diskDir_);
subDictCoeffs.readIfPresent("Cp", Cp_);
subDictCoeffs.readIfPresent("Ct", Ct_);
subDictCoeffs.readIfPresent("diskArea", diskArea_);
subDictCoeffs.lookup("coeffs") >> coeffs_;
return true;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,154 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::radialActuationDiskSource
Description
Actuation disk zone definition.
Constant values for momentum source for actuation disk
T = 2*rho*A*sqr(Uo)*a*(1-a)
U1 = (1 -a)Uo
where:
A: disk area
Uo: upstream velocity
a: 1 - Cp/Ct
U1: velocity at the disk
The thrust is distributed by a radial function:
thrust(r) = T*(C0 + C1*r^2 + C2*r^4)
SourceFiles
radialActuationDiskSource.C
radialActuationDiskSourceTemplates.C
\*---------------------------------------------------------------------------*/
#ifndef radialActuationDiskSource_H
#define radialActuationDiskSource_H
#include "DimensionedField.H"
#include "volFieldsFwd.H"
#include "FixedList.H"
#include "actuationDiskSource.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class radialActuationDiskSource Declaration
\*---------------------------------------------------------------------------*/
class radialActuationDiskSource
:
public actuationDiskSource
{
// Private data
//- Sub dictionary with model information
const dictionary& dict_;
//- Coeffcients for the radial distribution
FixedList<scalar, 3> coeffs_;
// Private Member Functions
//- Add resistance to the UEqn
template<class RhoFieldType>
void addRadialActuationDiskAxialInertialResistance
(
vectorField& Usource,
const labelList& cells,
const scalarField& V,
const RhoFieldType& rho,
const vectorField& U
) const;
//- Disallow default bitwise copy construct
radialActuationDiskSource(const radialActuationDiskSource&);
//- Disallow default bitwise assignment
void operator=(const radialActuationDiskSource&);
public:
//- Runtime type information
TypeName("radialActuationDiskSource");
// Constructors
//- Construct from components
radialActuationDiskSource
(
const word& name,
const word& modelType,
const dictionary& dict,
const fvMesh& mesh
);
//- Destructor
virtual ~radialActuationDiskSource()
{}
// Public Functions
//-Source term to fvMatrix<vector>
virtual void addSu(fvMatrix<vector>& UEqn);
// I-O
//- Write data
virtual void writeData(Ostream&) const;
//- Read dictionary
virtual bool read(const dictionary& dict);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "radialActuationDiskSourceTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,94 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*----------------------------------------------------------------------------*/
#include "radialActuationDiskSource.H"
#include "volFields.H"
#include "fvMatrix.H"
#include "fvm.H"
#include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class RhoFieldType>
void Foam::radialActuationDiskSource::
addRadialActuationDiskAxialInertialResistance
(
vectorField& Usource,
const labelList& cells,
const scalarField& Vcells,
const RhoFieldType& rho,
const vectorField& U
) const
{
scalar a = 1.0 - Cp_/Ct_;
scalarField T(cells.size());
scalarField Tr(cells.size());
const vector uniDiskDir = diskDir_/mag(diskDir_);
tensor E(tensor::zero);
E.xx() = uniDiskDir.x();
E.yy() = uniDiskDir.y();
E.zz() = uniDiskDir.z();
const vectorField U1((1.0 - a)*U);
const Field<vector> zoneCellCentres(mesh().cellCentres(), cells);
const Field<scalar> zoneCellVolumes(mesh().cellVolumes(), cells);
const vector avgCentre = gSum(zoneCellVolumes*zoneCellCentres)/V();
const scalar maxR = gMax(mag(zoneCellCentres - avgCentre));
scalar intCoeffs =
coeffs_[0]
+ coeffs_[1]*sqr(maxR)/2.0
+ coeffs_[2]*pow4(maxR)/3.0;
forAll(cells, i)
{
T[i] = 2.0*rho[cells[i]]*diskArea_*mag(U1[cells[i]])*a/(1.0 - a);
scalar r = mag(mesh().cellCentres()[cells[i]] - avgCentre);
Tr[i] =
T[i]*(coeffs_[0] + coeffs_[1]*sqr(r) + coeffs_[2]*pow4(r))
/intCoeffs;
}
forAll(cells, i)
{
Usource[cells[i]] += ((Vcells[cells[i]]/V())*Tr[i]*E) & U1[cells[i]];
}
if (debug)
{
Info<< "Source name: " << name() << nl
<< "Average centre: " << avgCentre << nl
<< "Maximum radius: " << maxR << endl;
}
}
// ************************************************************************* //

View File

@ -204,14 +204,13 @@ void mappedFieldFvPatchField<Type>::updateCoeffs()
{ {
case NEARESTCELL: case NEARESTCELL:
{ {
const mapDistribute& distMap = mappedPatchBase::map();
newValues = sampleField(); newValues = sampleField();
distMap.distribute(newValues); this->distribute(newValues);
break; break;
} }
case NEARESTPATCHFACE: case NEARESTPATCHFACE: case NEARESTPATCHFACEAMI:
{ {
const label nbrPatchID = const label nbrPatchID =
nbrMesh.boundaryMesh().findPatchID(samplePatch()); nbrMesh.boundaryMesh().findPatchID(samplePatch());
@ -230,34 +229,7 @@ void mappedFieldFvPatchField<Type>::updateCoeffs()
const mapDistribute& distMap = mappedPatchBase::map(); const mapDistribute& distMap = mappedPatchBase::map();
newValues = nbrField.boundaryField()[nbrPatchID]; newValues = nbrField.boundaryField()[nbrPatchID];
distMap.distribute(newValues); this->distribute(newValues);
break;
}
case mappedPatchBase::NEARESTPATCHFACEAMI:
{
const label nbrPatchID =
nbrMesh.boundaryMesh().findPatchID(samplePatch());
if (nbrPatchID < 0)
{
FatalErrorIn
(
"void mappedFixedValueFvPatchField<Type>::updateCoeffs()"
)<< "Unable to find sample patch " << samplePatch()
<< " in region " << sampleRegion()
<< " for patch " << this->patch().name() << nl
<< abort(FatalError);
}
// const fieldType& nbrField = sampleField();
// newValues = mpp.AMI().interpolateToSource(nbrField);
notImplemented
(
"void mappedFieldFvPatchField<Type>::updateCoeffs() "
"with mappedPatchBase::NEARESTPATCHFACEAMI"
);
break; break;
} }
@ -279,9 +251,7 @@ void mappedFieldFvPatchField<Type>::updateCoeffs()
} }
} }
const mapDistribute& distMap = mappedPatchBase::map(); this->distribute(allValues);
distMap.distribute(allValues);
newValues.transfer(allValues); newValues.transfer(allValues);
break; break;

View File

@ -127,31 +127,7 @@ void Foam::mappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
// Retrieve the neighbour patch internal field // Retrieve the neighbour patch internal field
Field<Type> nbrIntFld(nbrField.patchInternalField()); Field<Type> nbrIntFld(nbrField.patchInternalField());
mpp.distribute(nbrIntFld);
switch (mpp.mode())
{
case (mappedPatchBase::NEARESTPATCHFACEAMI):
{
// Retrieve the neighbour patch internal field
nbrIntFld = mpp.AMI().interpolateToSource(nbrIntFld);
break;
}
default:
{
const mapDistribute& distMap = mpp.map();
mapDistribute::distribute
(
Pstream::defaultCommsType,
distMap.schedule(),
distMap.constructSize(),
distMap.subMap(), // what to send
distMap.constructMap(), // what to receive
nbrIntFld
);
break;
}
}
// Restore tag // Restore tag
UPstream::msgType() = oldTag; UPstream::msgType() = oldTag;

View File

@ -283,30 +283,6 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
break; break;
} }
case mappedPatchBase::NEARESTPATCHFACE: case mappedPatchBase::NEARESTPATCHFACE:
{
const mapDistribute& distMap = mpp.map();
const label nbrPatchID =
nbrMesh.boundaryMesh().findPatchID(mpp.samplePatch());
if (nbrPatchID < 0)
{
FatalErrorIn
(
"void mappedFixedValueFvPatchField<Type>::updateCoeffs()"
)<< "Unable to find sample patch " << mpp.samplePatch()
<< " in region " << mpp.sampleRegion()
<< " for patch " << this->patch().name() << nl
<< abort(FatalError);
}
const fieldType& nbrField = sampleField();
newValues = nbrField.boundaryField()[nbrPatchID];
distMap.distribute(newValues);
break;
}
case mappedPatchBase::NEARESTPATCHFACEAMI: case mappedPatchBase::NEARESTPATCHFACEAMI:
{ {
const label nbrPatchID = const label nbrPatchID =
@ -324,9 +300,9 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
} }
const fieldType& nbrField = sampleField(); const fieldType& nbrField = sampleField();
newValues = nbrField.boundaryField()[nbrPatchID];
newValues = mpp.AMI().interpolateToSource(newValues); newValues = nbrField.boundaryField()[nbrPatchID];
mpp.distribute(newValues);
break; break;
} }

View File

@ -28,7 +28,6 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "mappedPatchBase.H" #include "mappedPatchBase.H"
#include "mapDistribute.H"
#include "surfaceFields.H" #include "surfaceFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -128,7 +127,7 @@ void Foam::mappedFlowRateFvPatchVectorField::updateCoeffs()
scalarList phi = scalarList phi =
nbrPatch.lookupPatchField<surfaceScalarField, scalar>(nbrPhiName_); nbrPatch.lookupPatchField<surfaceScalarField, scalar>(nbrPhiName_);
mpp.map().distribute(phi); mpp.distribute(phi);
const surfaceScalarField& phiName = const surfaceScalarField& phiName =

View File

@ -176,13 +176,10 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
( (
mappedVelocityFluxFixedValueFvPatchField::patch().patch() mappedVelocityFluxFixedValueFvPatchField::patch().patch()
); );
const mapDistribute& distMap = mpp.map();
const fvMesh& nbrMesh = refCast<const fvMesh>(mpp.sampleMesh()); const fvMesh& nbrMesh = refCast<const fvMesh>(mpp.sampleMesh());
const word& fieldName = dimensionedInternalField().name(); const word& fieldName = dimensionedInternalField().name();
const volVectorField& UField = nbrMesh.lookupObject<volVectorField> const volVectorField& UField =
( nbrMesh.lookupObject<volVectorField>(fieldName);
fieldName
);
surfaceScalarField& phiField = const_cast<surfaceScalarField&> surfaceScalarField& phiField = const_cast<surfaceScalarField&>
( (
@ -213,26 +210,25 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
} }
} }
distMap.distribute(allUValues); mpp.distribute(allUValues);
newUValues.transfer(allUValues); newUValues.transfer(allUValues);
distMap.distribute(allPhiValues); mpp.distribute(allPhiValues);
newPhiValues.transfer(allPhiValues); newPhiValues.transfer(allPhiValues);
break; break;
} }
case mappedPolyPatch::NEARESTPATCHFACE: case mappedPolyPatch::NEARESTPATCHFACE:
case mappedPolyPatch::NEARESTPATCHFACEAMI:
{ {
const label nbrPatchID = nbrMesh.boundaryMesh().findPatchID const label nbrPatchID =
( nbrMesh.boundaryMesh().findPatchID(mpp.samplePatch());
mpp.samplePatch()
);
newUValues = UField.boundaryField()[nbrPatchID]; newUValues = UField.boundaryField()[nbrPatchID];
distMap.distribute(newUValues); mpp.distribute(newUValues);
newPhiValues = phiField.boundaryField()[nbrPatchID]; newPhiValues = phiField.boundaryField()[nbrPatchID];
distMap.distribute(newPhiValues); mpp.distribute(newPhiValues);
break; break;
} }
@ -242,8 +238,9 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
( (
"mappedVelocityFluxFixedValueFvPatchField::" "mappedVelocityFluxFixedValueFvPatchField::"
"updateCoeffs()" "updateCoeffs()"
) << "patch can only be used in NEARESTPATCHFACE or NEARESTFACE " ) << "patch can only be used in NEARESTPATCHFACE, "
<< "mode" << nl << abort(FatalError); << "NEARESTPATCHFACEAMI or NEARESTFACE mode" << nl
<< abort(FatalError);
} }
} }

View File

@ -229,7 +229,6 @@ void selfContainedMappedFixedValueFvPatchField<Type>::updateCoeffs()
const fvMesh& thisMesh = this->patch().boundaryMesh().mesh(); const fvMesh& thisMesh = this->patch().boundaryMesh().mesh();
const fvMesh& nbrMesh = refCast<const fvMesh>(sampleMesh()); const fvMesh& nbrMesh = refCast<const fvMesh>(sampleMesh());
const mapDistribute& distMap = mappedPatchBase::map();
// Result of obtaining remote values // Result of obtaining remote values
Field<Type> newValues; Field<Type> newValues;
@ -238,6 +237,8 @@ void selfContainedMappedFixedValueFvPatchField<Type>::updateCoeffs()
{ {
case NEARESTCELL: case NEARESTCELL:
{ {
const mapDistribute& distMap = mappedPatchBase::map();
if (interpolationScheme_ != interpolationCell<Type>::typeName) if (interpolationScheme_ != interpolationCell<Type>::typeName)
{ {
// Need to do interpolation so need cells to sample. // Need to do interpolation so need cells to sample.
@ -275,12 +276,10 @@ void selfContainedMappedFixedValueFvPatchField<Type>::updateCoeffs()
break; break;
} }
case NEARESTPATCHFACE: case NEARESTPATCHFACE: case NEARESTPATCHFACEAMI:
{ {
const label nbrPatchID = nbrMesh.boundaryMesh().findPatchID const label nbrPatchID =
( nbrMesh.boundaryMesh().findPatchID(samplePatch());
samplePatch()
);
if (nbrPatchID < 0) if (nbrPatchID < 0)
{ {
FatalErrorIn FatalErrorIn
@ -297,7 +296,7 @@ void selfContainedMappedFixedValueFvPatchField<Type>::updateCoeffs()
const fieldType& nbrField = sampleField(); const fieldType& nbrField = sampleField();
newValues = nbrField.boundaryField()[nbrPatchID]; newValues = nbrField.boundaryField()[nbrPatchID];
distMap.distribute(newValues); this->distribute(newValues);
break; break;
} }
@ -319,7 +318,7 @@ void selfContainedMappedFixedValueFvPatchField<Type>::updateCoeffs()
} }
} }
distMap.distribute(allValues); this->distribute(allValues);
newValues.transfer(allValues); newValues.transfer(allValues);

View File

@ -97,9 +97,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches
boundBox bbSrc(srcPatch.points(), srcPatch.meshPoints()); boundBox bbSrc(srcPatch.points(), srcPatch.meshPoints());
boundBox bbTgt(tgtPatch.points(), tgtPatch.meshPoints()); boundBox bbTgt(tgtPatch.points(), tgtPatch.meshPoints());
bbTgt.inflate(maxBoundsError); boundBox bbTgtInf(bbTgt);
bbTgtInf.inflate(maxBoundsError);
if (!bbTgt.contains(bbSrc)) if (!bbTgtInf.contains(bbSrc))
{ {
WarningIn WarningIn
( (
@ -109,10 +110,11 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::checkPatches
"const primitivePatch&" "const primitivePatch&"
")" ")"
) << "Source and target patch bounding boxes are not similar" << nl ) << "Source and target patch bounding boxes are not similar" << nl
<< " src span : " << bbSrc.span() << nl << " source box span : " << bbSrc.span() << nl
<< " tgt span : " << bbTgt.span() << nl << " target box span : " << bbTgt.span() << nl
<< " source: " << bbSrc << nl << " source box : " << bbSrc << nl
<< " target: " << bbTgt << endl; << " target box : " << bbTgt << nl
<< " inflated target box : " << bbTgtInf << endl;
} }
} }

View File

@ -57,11 +57,17 @@ namespace Foam
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
Foam::timeSelector::addOptions(); Foam::timeSelector::addOptions();
# include "addRegionOption.H"
Foam::argList::addBoolOption Foam::argList::addBoolOption
( (
"noWrite", "noWrite",
"suppress writing results" "suppress writing results"
); );
Foam::argList::addBoolOption
(
"noFlow",
"suppress creating flow models (execFlowFunctionObjects only)"
);
Foam::argList::addOption Foam::argList::addOption
( (
"dict", "dict",
@ -72,7 +78,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args); Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
#include "createMesh.H" #include "createNamedMesh.H"
forAll(timeDirs, timeI) forAll(timeDirs, timeI)
{ {

View File

@ -25,7 +25,7 @@ Class
Foam::temperatureThermoBaffle1DFvPatchScalarField Foam::temperatureThermoBaffle1DFvPatchScalarField
Description Description
Bounday which solves the 1D steady state heat transfer equation Boundary which solves the 1D steady state heat transfer equation
through a baffle. through a baffle.
SourceFiles SourceFiles

View File

@ -1,78 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
(
rotor
{
type wall;
nFaces 192;
startFace 5856;
}
stator
{
type wall;
nFaces 192;
startFace 6048;
}
AMI1
{
type cyclicAMI;
nFaces 96;
startFace 6240;
matchTolerance 0.0001;
neighbourPatch AMI2;
transform noOrdering;
surface
{
type searchableCylinder;
point1 ( 0 0 -1 );
point2 ( 0 0 1 );
radius 0.5;
}
}
AMI2
{
type cyclicAMI;
nFaces 96;
startFace 6336;
matchTolerance 0.0001;
neighbourPatch AMI1;
transform noOrdering;
surface
{
type searchableCylinder;
point1 ( 0 0 -1 );
point2 ( 0 0 1 );
radius 0.5;
}
}
front
{
type empty;
nFaces 3072;
startFace 6432;
}
back
{
type empty;
nFaces 3072;
startFace 9504;
}
)
// ************************************************************************* //