Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
commit
0e9851b432
@ -39,6 +39,20 @@ int main(int argc, char *argv[])
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
potential pot(mesh);
|
||||
|
||||
moleculeCloud molecules(mesh, pot);
|
||||
|
@ -39,6 +39,20 @@ int main(int argc, char *argv[])
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
potential pot(mesh);
|
||||
|
||||
moleculeCloud molecules(mesh, pot);
|
||||
|
@ -169,6 +169,21 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
gradient() = q_/K();
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
scalar Q = gSum(K()*patch().magSf()*snGrad());
|
||||
|
||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||
<< patch().name() << ':'
|
||||
<< this->dimensionedInternalField().name() << " :"
|
||||
<< " heatFlux:" << Q
|
||||
<< " walltemperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
incompressibleUncoupledKinematicParcelFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/incompressibleUncoupledKinematicParcelFoam
|
@ -0,0 +1,27 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiation \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsurfaceFilmModels
|
@ -0,0 +1,147 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoInfValue
|
||||
(
|
||||
transportProperties.lookup("rhoInf")
|
||||
);
|
||||
|
||||
volScalarField rhoInf
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
rhoInfValue
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
const volScalarField nu = laminarTransport.nu();
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
volScalarField mu
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mu",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
nu*rhoInfValue
|
||||
);
|
||||
|
||||
word kinematicCloudName("kinematicCloud");
|
||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
||||
|
||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
(
|
||||
kinematicCloudName,
|
||||
rhoInf,
|
||||
U,
|
||||
mu,
|
||||
g
|
||||
);
|
||||
|
||||
IOobject Hheader
|
||||
(
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HPtr_;
|
||||
|
||||
if (Hheader.headerOk())
|
||||
{
|
||||
Info<< "\nReading field H\n" << endl;
|
||||
|
||||
HPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
IOobject HdotGradHheader
|
||||
(
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
);
|
||||
|
||||
autoPtr<volVectorField> HdotGradHPtr_;
|
||||
|
||||
if (HdotGradHheader.headerOk())
|
||||
{
|
||||
Info<< "\nReading field HdotGradH\n" << endl;
|
||||
|
||||
HdotGradHPtr_.reset
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"HdotGradH",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
)
|
||||
);
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 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/>.
|
||||
|
||||
Application
|
||||
uncoupledKinematicParcelFoam
|
||||
|
||||
Description
|
||||
Transient solver for the passive transport of a single kinematic
|
||||
particle could.
|
||||
|
||||
Uses a pre-calculated velocity field to evolve the cloud.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicKinematicCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addOption
|
||||
(
|
||||
"cloudName",
|
||||
"name",
|
||||
"specify alternative cloud name. default is 'kinematicCloud'"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
||||
|
||||
laminarTransport.correct();
|
||||
|
||||
mu = nu*rhoInfValue;
|
||||
|
||||
kinematicCloud.evolve();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,4 +1,3 @@
|
||||
globalIndex.C
|
||||
globalIndexTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/globalIndexTest
|
||||
|
@ -108,13 +108,17 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
List<wallPoint> allFaceInfo(mesh.nFaces());
|
||||
List<wallPoint> allCellInfo(mesh.nCells());
|
||||
|
||||
MeshWave<wallPoint> wallDistCalc
|
||||
FaceCellWave<wallPoint> wallDistCalc
|
||||
(
|
||||
mesh,
|
||||
changedFaces,
|
||||
faceDist,
|
||||
0 // max iterations
|
||||
allFaceInfo,
|
||||
allCellInfo,
|
||||
0 // max iterations
|
||||
);
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
@ -148,16 +152,13 @@ int main(int argc, char *argv[])
|
||||
// Copy face and cell values into field
|
||||
//
|
||||
|
||||
const List<wallPoint>& cellInfo = wallDistCalc.allCellInfo();
|
||||
const List<wallPoint>& faceInfo = wallDistCalc.allFaceInfo();
|
||||
|
||||
label nIllegal = 0;
|
||||
|
||||
// Copy cell values
|
||||
forAll(cellInfo, cellI)
|
||||
forAll(allCellInfo, cellI)
|
||||
{
|
||||
scalar dist = cellInfo[cellI].distSqr();
|
||||
if (cellInfo[cellI].valid())
|
||||
scalar dist = allCellInfo[cellI].distSqr();
|
||||
if (allCellInfo[cellI].valid())
|
||||
{
|
||||
wallDistUncorrected[cellI] = Foam::sqrt(dist);
|
||||
}
|
||||
@ -178,8 +179,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const label meshFaceI = patchField.patch().start() + patchFaceI;
|
||||
|
||||
scalar dist = faceInfo[meshFaceI].distSqr();
|
||||
if (faceInfo[meshFaceI].valid())
|
||||
scalar dist = allFaceInfo[meshFaceI].distSqr();
|
||||
if (allFaceInfo[meshFaceI].valid())
|
||||
{
|
||||
patchField[patchFaceI] = Foam::sqrt(dist);
|
||||
}
|
||||
|
@ -521,7 +521,9 @@ int main(int argc, char *argv[])
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
# include "createNamedPolyMesh.H"
|
||||
|
||||
Foam::word meshRegionName = polyMesh::defaultRegion;
|
||||
args.optionReadIfPresent("region", meshRegionName);
|
||||
|
||||
const bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
@ -534,8 +536,8 @@ int main(int argc, char *argv[])
|
||||
"createPatchDict",
|
||||
runTime.system(),
|
||||
(
|
||||
regionName != polyMesh::defaultRegion
|
||||
? regionName
|
||||
meshRegionName != polyMesh::defaultRegion
|
||||
? meshRegionName
|
||||
: word::null
|
||||
),
|
||||
runTime,
|
||||
@ -556,6 +558,7 @@ int main(int argc, char *argv[])
|
||||
<< " to match up faces and points" << nl << endl;
|
||||
coupledPolyPatch::matchTol = tol;
|
||||
|
||||
# include "createNamedPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
|
@ -121,12 +121,6 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Return the constraint type this pointPatchField implements
|
||||
virtual const word& constraintType() const
|
||||
{
|
||||
return symmetryPointPatch::typeName;
|
||||
}
|
||||
|
||||
//- Update the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
|
@ -119,6 +119,16 @@ public:
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the constraint type this pointPatchField implements
|
||||
virtual const word& constraintType() const
|
||||
{
|
||||
return symmetryPointPatch::typeName;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -112,13 +112,6 @@ directMappedFixedValueFvPatchField<Type>::directMappedFixedValueFvPatchField
|
||||
<< " in file " << this->dimensionedInternalField().objectPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
//// Force calculation of schedule (uses parallel comms)
|
||||
//const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
|
||||
//(
|
||||
// this->patch().patch()
|
||||
//);
|
||||
//(void)mpp.map().schedule();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
1208
src/lagrangian/basic/InteractionLists/InteractionLists.C
Normal file
1208
src/lagrangian/basic/InteractionLists/InteractionLists.C
Normal file
File diff suppressed because it is too large
Load Diff
322
src/lagrangian/basic/InteractionLists/InteractionLists.H
Normal file
322
src/lagrangian/basic/InteractionLists/InteractionLists.H
Normal file
@ -0,0 +1,322 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::InteractionLists
|
||||
|
||||
Description
|
||||
|
||||
Builds direct interaction list, specifying which local (real)
|
||||
cells are potentially in range of each other.
|
||||
|
||||
Builds referred interaction list, specifying which cells are
|
||||
required to provideinteractions across coupled patched (cyclic or
|
||||
processor). Generates referred cells, and refers particles to the
|
||||
correct processor, applying the appropriate transform.
|
||||
|
||||
Simultaneous communication and computation is possible using:
|
||||
|
||||
@verbatim
|
||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
||||
il_.sendReferredData(cellOccupancy_, pBufs);
|
||||
// Do other things
|
||||
il_.receiveReferredData(pBufs);
|
||||
@endverbatim
|
||||
|
||||
Requiring data:
|
||||
|
||||
@verbatim
|
||||
List<DynamicList<typename CloudType::parcelType*> > cellOccupancy_;
|
||||
@endverbatim
|
||||
|
||||
SourceFiles
|
||||
InteractionListsI.H
|
||||
InteractionLists.C
|
||||
InteractionListsIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef InteractionLists_H
|
||||
#define InteractionLists_H
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "globalIndexAndTransform.H"
|
||||
#include "referredWallFace.H"
|
||||
#include "indexedOctree.H"
|
||||
#include "Tuple2.H"
|
||||
#include "treeDataCell.H"
|
||||
#include "treeDataFace.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "volFields.H"
|
||||
#include "Random.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class InteractionLists Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParticleType>
|
||||
class InteractionLists
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to mesh
|
||||
const polyMesh& mesh_;
|
||||
|
||||
//- Dummy cloud to give to particles
|
||||
Cloud<ParticleType> cloud_;
|
||||
|
||||
//- Switch controlling whether or not the cloud gets populated
|
||||
// with the referred particles, hence gets written out
|
||||
const Switch writeCloud_;
|
||||
|
||||
//- mapDistribute to exchange referred particles into referred cells
|
||||
autoPtr<mapDistribute> cellMapPtr_;
|
||||
|
||||
//- mapDistribute to exchange wall face data
|
||||
autoPtr<mapDistribute> wallFaceMapPtr_;
|
||||
|
||||
//- Storage and encoding/decoding for all possible transforms
|
||||
// of the geometry
|
||||
globalIndexAndTransform globalTransforms_;
|
||||
|
||||
//- Maximum distance over which interactions will be detected
|
||||
scalar maxDistance_;
|
||||
|
||||
//- Direct interaction list
|
||||
labelListList dil_;
|
||||
|
||||
//- Wall faces on this processor that are in interaction range
|
||||
// of each each cell (direct wall face interaction list)
|
||||
labelListList dwfil_;
|
||||
|
||||
//- Referred interaction list - which real cells are to be
|
||||
// supplied with particle interactions from the referred
|
||||
// particle container with the same index.
|
||||
labelListList ril_;
|
||||
|
||||
//- Inverse addressing for referred cells, specifies which
|
||||
// referred cells (indices of entries in the ril_ and
|
||||
// referredParticles_ lists) interact with the real cell
|
||||
// indexed in this container.
|
||||
labelListList rilInverse_;
|
||||
|
||||
//- Which real cells on this on this processor are in
|
||||
// interaction range of each referred wall face (referred
|
||||
// wall face interaction list)
|
||||
labelListList rwfil_;
|
||||
|
||||
//- Inverse addressing for referred wall faces, specifies
|
||||
// which referred wall faces interact with the real cells
|
||||
// indexed in this container.
|
||||
labelListList rwfilInverse_;
|
||||
|
||||
//- Which cells are to be sent via the cellMap, and an index
|
||||
// specifying how they should be transformed.
|
||||
List<labelPair> cellIndexAndTransformToDistribute_;
|
||||
|
||||
//- Which wallFaces are to be sent via the wallFaceMap, and an index
|
||||
// specifying how they should be transformed.
|
||||
List<labelPair> wallFaceIndexAndTransformToDistribute_;
|
||||
|
||||
//- Referred wall faces
|
||||
List<referredWallFace> referredWallFaces_;
|
||||
|
||||
//- Velocity field name, default to "U"
|
||||
const word UName_;
|
||||
|
||||
//- Referred wall face velocity field values;
|
||||
List<vector> referredWallData_;
|
||||
|
||||
//- Referred particle container
|
||||
List<IDLList<ParticleType> > referredParticles_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Construct all interaction lists
|
||||
void buildInteractionLists();
|
||||
|
||||
//- Find the other processors which have interaction range
|
||||
// extended bound boxes in range
|
||||
void findExtendedProcBbsInRange
|
||||
(
|
||||
const treeBoundBox& procBb,
|
||||
const List<treeBoundBox>& allExtendedProcBbs,
|
||||
const globalIndexAndTransform& globalTransforms,
|
||||
List<treeBoundBox>& extendedProcBbsInRange,
|
||||
List<label>& extendedProcBbsTransformIndex,
|
||||
List<label>& extendedProcBbsOrigProc
|
||||
);
|
||||
|
||||
//- Build the mapDistribute from information about which entry
|
||||
// is to be sent to which processor
|
||||
void buildMap
|
||||
(
|
||||
autoPtr<mapDistribute>& mapPtr,
|
||||
const List<label>& toProc
|
||||
);
|
||||
|
||||
//- Fill the referredParticles container with particles that
|
||||
// will be referred
|
||||
void prepareParticlesToRefer
|
||||
(
|
||||
const List<DynamicList<ParticleType*> >& cellOccupancy
|
||||
);
|
||||
|
||||
//- Prepare particle to be referred
|
||||
void prepareParticleToBeReferred
|
||||
(
|
||||
ParticleType* particle,
|
||||
labelPair iat
|
||||
);
|
||||
|
||||
//- Fill the referredParticles so that it will be written out
|
||||
void fillReferredParticleCloud();
|
||||
|
||||
//- Populate the referredWallData container with data that
|
||||
// will be referred.
|
||||
void prepareWallDataToRefer();
|
||||
|
||||
//- Write the referred wall faces out for debug
|
||||
void writeReferredWallFaces() const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
InteractionLists(const InteractionLists&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const InteractionLists&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct and call function to create all information from
|
||||
// the mesh
|
||||
InteractionLists
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
scalar maxDistance,
|
||||
Switch writeCloud = false,
|
||||
const word& UName = "U"
|
||||
);
|
||||
|
||||
// Destructor
|
||||
|
||||
~InteractionLists();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Prepare and send referred particles and wall data,
|
||||
// nonBlocking communication
|
||||
void sendReferredData
|
||||
(
|
||||
const List<DynamicList<ParticleType*> >& cellOccupancy,
|
||||
PstreamBuffers& pBufs
|
||||
);
|
||||
|
||||
//- Receive referred data
|
||||
void receiveReferredData(PstreamBuffers& pBufs);
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return access to the mesh
|
||||
inline const polyMesh& mesh() const;
|
||||
|
||||
//- Return access to the cellMap
|
||||
inline const mapDistribute& cellMap() const;
|
||||
|
||||
//- Return access to the wallFaceMap
|
||||
inline const mapDistribute& wallFaceMap() const;
|
||||
|
||||
//- Return access to the globalTransforms
|
||||
inline const globalIndexAndTransform& globalTransforms() const;
|
||||
|
||||
//- Return access to the direct interaction list
|
||||
inline const labelListList& dil() const;
|
||||
|
||||
//- Return access to the direct wall face interaction list
|
||||
inline const labelListList& dwfil() const;
|
||||
|
||||
//- Return access to the referred interaction list
|
||||
inline const labelListList& ril() const;
|
||||
|
||||
//- Return access to the inverse referred interaction list
|
||||
inline const labelListList& rilInverse() const;
|
||||
|
||||
//- Return access to the referred wall face interaction list
|
||||
inline const labelListList& rwfil() const;
|
||||
|
||||
//- Return access to the inverse referred wall face
|
||||
// interaction list
|
||||
inline const labelListList& rwfilInverse() const;
|
||||
|
||||
//- Return access to the cellIndexAndTransformToDistribute list
|
||||
inline const List<labelPair>&
|
||||
cellIndexAndTransformToDistribute() const;
|
||||
|
||||
//- Return access to the wallFaceIndexAndTransformToDistribute list
|
||||
inline const List<labelPair>&
|
||||
wallFaceIndexAndTransformToDistribute() const;
|
||||
|
||||
//- Return access to the referred wall faces
|
||||
const List<referredWallFace>& referredWallFaces() const;
|
||||
|
||||
//- Return access to the referred wall data
|
||||
const List<vector>& referredWallData() const;
|
||||
|
||||
//- Return access to the referred particle container
|
||||
inline const List<IDLList<ParticleType> >&
|
||||
referredParticles() const;
|
||||
|
||||
//- Return non-const access to the referred particle container
|
||||
inline List<IDLList<ParticleType> >& referredParticles();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "InteractionListsI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "InteractionLists.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
155
src/lagrangian/basic/InteractionLists/InteractionListsI.H
Normal file
155
src/lagrangian/basic/InteractionLists/InteractionListsI.H
Normal file
@ -0,0 +1,155 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::polyMesh& Foam::InteractionLists<ParticleType>::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::mapDistribute&
|
||||
Foam::InteractionLists<ParticleType>::cellMap() const
|
||||
{
|
||||
return cellMapPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::mapDistribute&
|
||||
Foam::InteractionLists<ParticleType>::wallFaceMap() const
|
||||
{
|
||||
return wallFaceMapPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::globalIndexAndTransform&
|
||||
Foam::InteractionLists<ParticleType>::globalTransforms() const
|
||||
{
|
||||
return globalTransforms_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList& Foam::InteractionLists<ParticleType>::dil() const
|
||||
{
|
||||
return dil_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList&
|
||||
Foam::InteractionLists<ParticleType>::dwfil() const
|
||||
{
|
||||
return dwfil_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList& Foam::InteractionLists<ParticleType>::ril() const
|
||||
{
|
||||
return ril_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList&
|
||||
Foam::InteractionLists<ParticleType>::rilInverse() const
|
||||
{
|
||||
return rilInverse_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList& Foam::InteractionLists<ParticleType>::rwfil() const
|
||||
{
|
||||
return rwfil_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::labelListList&
|
||||
Foam::InteractionLists<ParticleType>::rwfilInverse() const
|
||||
{
|
||||
return rwfilInverse_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<Foam::labelPair>&
|
||||
Foam::InteractionLists<ParticleType>::cellIndexAndTransformToDistribute() const
|
||||
{
|
||||
return cellIndexAndTransformToDistribute_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<Foam::labelPair>&
|
||||
Foam::InteractionLists<ParticleType>::
|
||||
wallFaceIndexAndTransformToDistribute() const
|
||||
{
|
||||
return wallFaceIndexAndTransformToDistribute_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<Foam::referredWallFace>&
|
||||
Foam::InteractionLists<ParticleType>::referredWallFaces() const
|
||||
{
|
||||
return referredWallFaces_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<Foam::vector>&
|
||||
Foam::InteractionLists<ParticleType>::referredWallData() const
|
||||
{
|
||||
return referredWallData_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
const Foam::List<Foam::IDLList<ParticleType> >&
|
||||
Foam::InteractionLists<ParticleType>::referredParticles() const
|
||||
{
|
||||
return referredParticles_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::List<Foam::IDLList<ParticleType> >&
|
||||
Foam::InteractionLists<ParticleType>::referredParticles()
|
||||
{
|
||||
return referredParticles_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,313 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "globalIndexAndTransform.H"
|
||||
#include "coupledPolyPatch.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
|
||||
|
||||
const Foam::label Foam::globalIndexAndTransform::base_ = 32;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool Foam::globalIndexAndTransform::matchTransform
|
||||
(
|
||||
const List<vectorTensorTransform>& refTransforms,
|
||||
const vectorTensorTransform& testTransform,
|
||||
scalar tolerance,
|
||||
bool bothSigns
|
||||
) const
|
||||
{
|
||||
// return min(mag(transforms_ - sepVec)) > tol
|
||||
|
||||
forAll(refTransforms, i)
|
||||
{
|
||||
const vectorTensorTransform& refTransform = refTransforms[i];
|
||||
|
||||
scalar maxVectorMag = sqrt
|
||||
(
|
||||
max(magSqr(testTransform.t()), magSqr(refTransform.t()))
|
||||
);
|
||||
|
||||
// Test the difference between vector parts to see if it is
|
||||
// less than tolerance times the larger vector part magnitude.
|
||||
|
||||
scalar vectorDiff =
|
||||
mag(refTransform.t() - testTransform.t())
|
||||
/(maxVectorMag + VSMALL)
|
||||
/tolerance;
|
||||
|
||||
// Test the difference between tensor parts to see if it is
|
||||
// less than the tolerance. sqrt(3.0) factor used to scale
|
||||
// differnces as this is magnitude of a rotation tensor. If
|
||||
// neither transform has a rotation, then the test is not
|
||||
// necessary.
|
||||
|
||||
scalar tensorDiff = 0;
|
||||
|
||||
if (refTransform.hasR() || testTransform.hasR())
|
||||
{
|
||||
tensorDiff =
|
||||
mag(refTransform.R() - testTransform.R())
|
||||
/sqrt(3.0)
|
||||
/tolerance;
|
||||
}
|
||||
|
||||
// ...Diff result is < 1 if the test part matches the ref part
|
||||
// within tolerance
|
||||
|
||||
if (vectorDiff < 1 && tensorDiff < 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (bothSigns)
|
||||
{
|
||||
// Test the inverse transform differences too
|
||||
|
||||
vectorDiff =
|
||||
mag(refTransform.t() + testTransform.t())
|
||||
/(maxVectorMag + VSMALL)
|
||||
/tolerance;
|
||||
|
||||
tensorDiff = 0;
|
||||
|
||||
if (refTransform.hasR() || testTransform.hasR())
|
||||
{
|
||||
tensorDiff =
|
||||
mag(refTransform.R() - testTransform.R().T())
|
||||
/sqrt(3.0)
|
||||
/tolerance;
|
||||
}
|
||||
|
||||
if (vectorDiff < 1 && tensorDiff < 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::globalIndexAndTransform::determineTransforms()
|
||||
{
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
transforms_ = List<vectorTensorTransform>(6);
|
||||
|
||||
label nextTrans = 0;
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
if (isA<coupledPolyPatch>(pp))
|
||||
{
|
||||
const coupledPolyPatch& cpp = refCast<const coupledPolyPatch>(pp);
|
||||
|
||||
if (cpp.separated())
|
||||
{
|
||||
const vectorField& sepVecs = cpp.separation();
|
||||
|
||||
forAll(sepVecs, sVI)
|
||||
{
|
||||
const vector& sepVec = sepVecs[sVI];
|
||||
|
||||
if (mag(sepVec) > SMALL)
|
||||
{
|
||||
scalar tol = coupledPolyPatch::matchTol;
|
||||
|
||||
vectorTensorTransform transform(sepVec);
|
||||
|
||||
if (!matchTransform(transforms_, transform, tol, false))
|
||||
{
|
||||
transforms_[nextTrans++] = transform;
|
||||
}
|
||||
|
||||
if (nextTrans > 6)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::globalIndexAndTransform::"
|
||||
"determineTransforms()"
|
||||
)
|
||||
<< "More than six unsigned transforms detected:"
|
||||
<< nl << transforms_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!cpp.parallel())
|
||||
{
|
||||
const tensorField& transTensors = cpp.forwardT();
|
||||
|
||||
forAll(transTensors, tTI)
|
||||
{
|
||||
const tensor& transT = transTensors[tTI];
|
||||
|
||||
if (mag(transT - I) > SMALL)
|
||||
{
|
||||
scalar tol = coupledPolyPatch::matchTol;
|
||||
|
||||
vectorTensorTransform transform(transT);
|
||||
|
||||
if (!matchTransform(transforms_, transform, tol, false))
|
||||
{
|
||||
transforms_[nextTrans++] = transform;
|
||||
}
|
||||
|
||||
if (nextTrans > 6)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::globalIndexAndTransform::"
|
||||
"determineTransforms()"
|
||||
)
|
||||
<< "More than six unsigned transforms detected:"
|
||||
<< nl << transforms_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<List<vectorTensorTransform> > allTransforms(Pstream::nProcs());
|
||||
|
||||
allTransforms[Pstream::myProcNo()] = transforms_;
|
||||
|
||||
Pstream::gatherList(allTransforms);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
transforms_ = List<vectorTensorTransform>(3);
|
||||
|
||||
label nextTrans = 0;
|
||||
|
||||
forAll(allTransforms, procI)
|
||||
{
|
||||
const List<vectorTensorTransform>& procTransVecs =
|
||||
allTransforms[procI];
|
||||
|
||||
forAll(procTransVecs, pSVI)
|
||||
{
|
||||
const vectorTensorTransform& transform = procTransVecs[pSVI];
|
||||
|
||||
if (mag(transform.t()) > SMALL || transform.hasR())
|
||||
{
|
||||
scalar tol = coupledPolyPatch::matchTol;
|
||||
|
||||
if (!matchTransform(transforms_, transform, tol, true))
|
||||
{
|
||||
transforms_[nextTrans++] = transform;
|
||||
}
|
||||
|
||||
if (nextTrans > 3)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::globalIndexAndTransform::"
|
||||
"determineTransforms()"
|
||||
)
|
||||
<< "More than three independent basic "
|
||||
<< "transforms detected:" << nl
|
||||
<< allTransforms
|
||||
<< transforms_
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
transforms_.setSize(nextTrans);
|
||||
}
|
||||
|
||||
Pstream::scatter(transforms_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::globalIndexAndTransform::determineTransformPermutations()
|
||||
{
|
||||
label nTransformPermutations = pow(3, transforms_.size());
|
||||
|
||||
transformPermutations_.setSize(nTransformPermutations);
|
||||
|
||||
forAll(transformPermutations_, tPI)
|
||||
{
|
||||
vectorTensorTransform transform;
|
||||
|
||||
label transformIndex = tPI;
|
||||
|
||||
// Invert the ternary index encoding using repeated division by
|
||||
// three
|
||||
|
||||
for (label b = 0; b < transforms_.size(); b++)
|
||||
{
|
||||
label w = (transformIndex % 3) - 1;
|
||||
|
||||
transformIndex /= 3;
|
||||
|
||||
if (w > 0)
|
||||
{
|
||||
transform &= transforms_[b];
|
||||
}
|
||||
else if (w < 0)
|
||||
{
|
||||
transform &= inv(transforms_[b]);
|
||||
}
|
||||
}
|
||||
|
||||
transformPermutations_[tPI] = transform;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::globalIndexAndTransform::globalIndexAndTransform
|
||||
(
|
||||
const polyMesh& mesh
|
||||
)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{
|
||||
determineTransforms();
|
||||
|
||||
determineTransformPermutations();
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::globalIndexAndTransform::~globalIndexAndTransform()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,195 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::globalIndexAndTransform
|
||||
|
||||
Description
|
||||
Determination and storage of the possible independent transforms
|
||||
introduced by coupledPolyPatches, as well as all of the possible
|
||||
permutations of these transforms generated by the presence of
|
||||
multiple coupledPolyPatches, i.e. more than one cyclic boundary.
|
||||
|
||||
Also provides global index encoding and decoding for entity
|
||||
(i.e. cell) index, processor index and transform index (0 or
|
||||
positive integer) to a labelPair.
|
||||
|
||||
SourceFiles
|
||||
globalIndexAndTransform.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef globalIndexAndTransform_H
|
||||
#define globalIndexAndTransform_H
|
||||
|
||||
#include "Pstream.H"
|
||||
#include "List.H"
|
||||
#include "labelPair.H"
|
||||
#include "vectorTensorTransform.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class polyMesh;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class globalIndexAndTransform Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class globalIndexAndTransform
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to mesh
|
||||
const polyMesh& mesh_;
|
||||
|
||||
//- The possible independent (non-permuted) transforms of the
|
||||
// geometry, i.e. for a geometry with two cyclics, this
|
||||
// stores the two transforms, not the eight permutations.
|
||||
// There may not be more than three transforms in the range
|
||||
// of coupledPolyPatch geometries (separated XOR
|
||||
// non-parallel) and symmetries (cuboid periodicity only)
|
||||
// supported.
|
||||
List<vectorTensorTransform> transforms_;
|
||||
|
||||
//- The permutations of the transforms, stored for lookup
|
||||
// efficiency. If there are n transforms, then there are
|
||||
// (3^n) permutations, including the no-transformation
|
||||
// transform.
|
||||
List<vectorTensorTransform> transformPermutations_;
|
||||
|
||||
|
||||
// Private static data
|
||||
|
||||
//- Number of spaces to reserve for transform encoding
|
||||
static const label base_;
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Determine all of the independent basic transforms of the
|
||||
// geometry by analysing the coupledPolyPatches
|
||||
void determineTransforms();
|
||||
|
||||
//- Generate all of the transformation permutations
|
||||
void determineTransformPermutations();
|
||||
|
||||
//- Test a list of reference transforms to see if the test transform
|
||||
bool matchTransform
|
||||
(
|
||||
const List<vectorTensorTransform>& refTransforms,
|
||||
const vectorTensorTransform& testTransform,
|
||||
scalar tolerance,
|
||||
bool bothSigns
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
globalIndexAndTransform(const globalIndexAndTransform&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const globalIndexAndTransform&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
globalIndexAndTransform(const polyMesh& mesh);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~globalIndexAndTransform();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Generate a transform index from the permutation indices of
|
||||
// the independent transforms. Permutations indices must
|
||||
// only be -1, 0 or +1.
|
||||
inline label encodeTransformIndex
|
||||
(
|
||||
const List<label>& permutationIndices
|
||||
) const;
|
||||
|
||||
//- Encode index and bare index as components on own processor
|
||||
inline labelPair encode
|
||||
(
|
||||
const label index,
|
||||
const label transformIndex
|
||||
);
|
||||
|
||||
//- Encode index and bare index as components on given processor
|
||||
inline labelPair encode
|
||||
(
|
||||
const label procI,
|
||||
const label index,
|
||||
const label transformIndex
|
||||
);
|
||||
|
||||
//- Index carried by the object
|
||||
inline label index(const labelPair& globalIAndTransform);
|
||||
|
||||
//- Which processor does this come from?
|
||||
inline label processor(const labelPair& globalIAndTransform);
|
||||
|
||||
//- Transform carried by the object
|
||||
inline label transformIndex(const labelPair& globalIAndTransform);
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the number of independent transforms
|
||||
inline label nIndependentTransforms() const;
|
||||
|
||||
//- Return access to the stored independent transforms
|
||||
inline const List<vectorTensorTransform>& transforms() const;
|
||||
|
||||
//- Return access to the permuted transforms
|
||||
inline const List<vectorTensorTransform>&
|
||||
transformPermutations() const;
|
||||
|
||||
//- Access the overall (permuted) transform corresponding
|
||||
// to the transformIndex
|
||||
inline const vectorTensorTransform& transform
|
||||
(
|
||||
label transformIndex
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "globalIndexAndTransformI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,192 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Foam::label Foam::globalIndexAndTransform::encodeTransformIndex
|
||||
(
|
||||
const List<label>& permutationIndices
|
||||
) const
|
||||
{
|
||||
if (permutationIndices.size() != transforms_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::label encodeTransformIndex"
|
||||
"("
|
||||
"const List<label>& permutationIndices,"
|
||||
") const"
|
||||
)
|
||||
<< "permutationIndices " << permutationIndices
|
||||
<< "are of a different size to the number of independent transforms"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
label transformIndex = 0;
|
||||
|
||||
label w = 1;
|
||||
|
||||
for (label b = 0; b < transforms_.size(); b++)
|
||||
{
|
||||
if (mag(permutationIndices[b]) > 1)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::label encodeTransformIndex"
|
||||
"("
|
||||
"const List<label>& permutationIndices,"
|
||||
") const"
|
||||
)
|
||||
<< "permutationIndices " << permutationIndices
|
||||
<< "are illegal, they must all be only -1, 0 or +1"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
transformIndex += (permutationIndices[b] + 1)*w;
|
||||
|
||||
w *= 3;
|
||||
}
|
||||
|
||||
return transformIndex;
|
||||
}
|
||||
|
||||
|
||||
Foam::labelPair Foam::globalIndexAndTransform::encode
|
||||
(
|
||||
const label index,
|
||||
const label transformIndex
|
||||
)
|
||||
{
|
||||
return encode(Pstream::myProcNo(), index, transformIndex);
|
||||
}
|
||||
|
||||
|
||||
Foam::labelPair Foam::globalIndexAndTransform::encode
|
||||
(
|
||||
const label procI,
|
||||
const label index,
|
||||
const label transformIndex
|
||||
)
|
||||
{
|
||||
if (transformIndex < 0 || transformIndex >= base_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::labelPair Foam::globalIndexAndTransform::encode"
|
||||
"("
|
||||
"const label procI, "
|
||||
"const label index, "
|
||||
"const label transformIndex"
|
||||
")"
|
||||
)
|
||||
<< "TransformIndex " << transformIndex
|
||||
<< " is outside allowed range of 0 to "
|
||||
<< base_ - 1
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (procI > labelMax/base_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::labelPair Foam::globalIndexAndTransform::encode"
|
||||
"("
|
||||
"const label procI, "
|
||||
"const label index, "
|
||||
"const label transformIndex"
|
||||
")"
|
||||
)
|
||||
<< "Overflow : encoding processor " << procI << " in base " << base_
|
||||
<< " exceeds capability of label (" << labelMax
|
||||
<< "). Please recompile with larger datatype for label."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return labelPair
|
||||
(
|
||||
index,
|
||||
transformIndex + procI*base_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::globalIndexAndTransform::index
|
||||
(
|
||||
const labelPair& globalIAndTransform
|
||||
)
|
||||
{
|
||||
return globalIAndTransform.first();
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::globalIndexAndTransform::processor
|
||||
(
|
||||
const labelPair& globalIAndTransform
|
||||
)
|
||||
{
|
||||
return globalIAndTransform.second()/base_;
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::globalIndexAndTransform::transformIndex
|
||||
(
|
||||
const labelPair& globalIAndTransform
|
||||
)
|
||||
{
|
||||
return globalIAndTransform.second() % base_;
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::globalIndexAndTransform::nIndependentTransforms() const
|
||||
{
|
||||
return transforms_.size();
|
||||
}
|
||||
|
||||
|
||||
const Foam::List<Foam::vectorTensorTransform>&
|
||||
Foam::globalIndexAndTransform::transforms() const
|
||||
{
|
||||
return transforms_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::List<Foam::vectorTensorTransform>&
|
||||
Foam::globalIndexAndTransform::transformPermutations() const
|
||||
{
|
||||
return transformPermutations_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::vectorTensorTransform& Foam::globalIndexAndTransform::transform
|
||||
(
|
||||
label transformIndex
|
||||
) const
|
||||
{
|
||||
return transformPermutations_[transformIndex];
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,100 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "vectorTensorTransform.H"
|
||||
#include "IOstreams.H"
|
||||
#include "OStringStream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
const char* const Foam::vectorTensorTransform::typeName =
|
||||
"vectorTensorTransform";
|
||||
|
||||
const Foam::vectorTensorTransform Foam::vectorTensorTransform::zero
|
||||
(
|
||||
vector::zero,
|
||||
tensor::zero,
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
const Foam::vectorTensorTransform Foam::vectorTensorTransform::I
|
||||
(
|
||||
vector::zero,
|
||||
sphericalTensor::I,
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::vectorTensorTransform::vectorTensorTransform(Istream& is)
|
||||
{
|
||||
is >> *this;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::word Foam::name(const vectorTensorTransform& s)
|
||||
{
|
||||
OStringStream buf;
|
||||
|
||||
buf << '(' << s.t() << ',' << s.R() << ')';
|
||||
|
||||
return buf.str();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, vectorTensorTransform& tr)
|
||||
{
|
||||
// Read beginning of vectorTensorTransform
|
||||
is.readBegin("vectorTensorTransform");
|
||||
|
||||
is >> tr.t_ >> tr.R_ >> tr.hasR_;
|
||||
|
||||
// Read end of vectorTensorTransform
|
||||
is.readEnd("vectorTensorTransform");
|
||||
|
||||
// Check state of Istream
|
||||
is.check("operator>>(Istream&, vectorTensorTransform&)");
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const vectorTensorTransform& tr)
|
||||
{
|
||||
os << token::BEGIN_LIST
|
||||
<< tr.t() << token::SPACE << tr.R() << token::SPACE << tr.hasR()
|
||||
<< token::END_LIST;
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,241 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::vectorTensorTransform
|
||||
|
||||
Description
|
||||
Vector-tensor class used to perform translations and rotations in
|
||||
3D space.
|
||||
|
||||
SourceFiles
|
||||
vectorTensorTransformI.H
|
||||
vectorTensorTransform.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef vectorTensorTransform_H
|
||||
#define vectorTensorTransform_H
|
||||
|
||||
#include "vector.H"
|
||||
#include "tensor.H"
|
||||
#include "word.H"
|
||||
#include "contiguous.H"
|
||||
#include "pointField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
class vectorTensorTransform;
|
||||
Istream& operator>>(Istream& is, vectorTensorTransform&);
|
||||
Ostream& operator<<(Ostream& os, const vectorTensorTransform& C);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class vectorTensorTransform Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class vectorTensorTransform
|
||||
{
|
||||
// private data
|
||||
|
||||
//- Translation vector
|
||||
vector t_;
|
||||
|
||||
//- Rotation tensor
|
||||
tensor R_;
|
||||
|
||||
//- Recording if the transform has non-identity transform to
|
||||
// allow its calculation to be skipped, which is the majority
|
||||
// of the expected cases
|
||||
bool hasR_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
static const char* const typeName;
|
||||
|
||||
static const vectorTensorTransform zero;
|
||||
|
||||
static const vectorTensorTransform I;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
inline vectorTensorTransform();
|
||||
|
||||
//- Construct given a translation vector, rotation tensor and
|
||||
// hasR bool
|
||||
inline vectorTensorTransform
|
||||
(
|
||||
const vector& t,
|
||||
const tensor& R,
|
||||
bool hasR = true
|
||||
);
|
||||
|
||||
//- Construct a pure translation vectorTensorTransform given a
|
||||
// translation vector
|
||||
inline explicit vectorTensorTransform(const vector& t);
|
||||
|
||||
//- Construct a pure rotation vectorTensorTransform given a
|
||||
// rotation tensor
|
||||
inline explicit vectorTensorTransform(const tensor& R);
|
||||
|
||||
//- Construct from Istream
|
||||
vectorTensorTransform(Istream&);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
inline const vector& t() const;
|
||||
|
||||
inline const tensor& R() const;
|
||||
|
||||
inline bool hasR() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
inline vector& t();
|
||||
|
||||
inline tensor& R();
|
||||
|
||||
|
||||
// Transform
|
||||
|
||||
//- Transform the given vector
|
||||
inline vector transform(const vector& v) const;
|
||||
|
||||
//- Transform the given pointField
|
||||
inline pointField transform(const pointField& pts) const;
|
||||
|
||||
//- Inverse transform the given vector
|
||||
inline vector invTransform(const vector& v) const;
|
||||
|
||||
//- Inverse transform the given pointField
|
||||
inline pointField invTransform(const pointField& pts) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
inline void operator=(const vectorTensorTransform&);
|
||||
inline void operator&=(const vectorTensorTransform&);
|
||||
|
||||
inline void operator=(const vector&);
|
||||
inline void operator+=(const vector&);
|
||||
inline void operator-=(const vector&);
|
||||
|
||||
inline void operator=(const tensor&);
|
||||
inline void operator&=(const tensor&);
|
||||
|
||||
|
||||
// IOstream operators
|
||||
|
||||
friend Istream& operator>>(Istream& is, vectorTensorTransform&);
|
||||
|
||||
friend Ostream& operator<<(Ostream& os, const vectorTensorTransform&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
//- Return the inverse of the given vectorTensorTransform
|
||||
inline vectorTensorTransform inv(const vectorTensorTransform& tr);
|
||||
|
||||
|
||||
//- Return a string representation of a vectorTensorTransform
|
||||
word name(const vectorTensorTransform&);
|
||||
|
||||
|
||||
//- Data associated with vectorTensorTransform type are contiguous
|
||||
template<>
|
||||
inline bool contiguous<vectorTensorTransform>() {return true;}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool operator==
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
);
|
||||
|
||||
|
||||
inline bool operator!=
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
|
||||
);
|
||||
|
||||
|
||||
inline vectorTensorTransform operator+
|
||||
(
|
||||
const vectorTensorTransform& tr,
|
||||
const vector& t
|
||||
);
|
||||
|
||||
|
||||
inline vectorTensorTransform operator+
|
||||
(
|
||||
const vector& t,
|
||||
const vectorTensorTransform& tr
|
||||
);
|
||||
|
||||
|
||||
inline vectorTensorTransform operator-
|
||||
(
|
||||
const vectorTensorTransform& tr,
|
||||
const vector& t
|
||||
);
|
||||
|
||||
|
||||
inline vectorTensorTransform operator&
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "vectorTensorTransformI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,299 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::vectorTensorTransform::vectorTensorTransform()
|
||||
:
|
||||
t_(vector::zero),
|
||||
R_(sphericalTensor::I),
|
||||
hasR_(false)
|
||||
{}
|
||||
|
||||
inline Foam::vectorTensorTransform::vectorTensorTransform
|
||||
(
|
||||
const vector& t,
|
||||
const tensor& R,
|
||||
bool hasR
|
||||
)
|
||||
:
|
||||
t_(t),
|
||||
R_(R),
|
||||
hasR_(hasR)
|
||||
{}
|
||||
|
||||
inline Foam::vectorTensorTransform::vectorTensorTransform(const vector& t)
|
||||
:
|
||||
t_(t),
|
||||
R_(sphericalTensor::I),
|
||||
hasR_(false)
|
||||
{}
|
||||
|
||||
inline Foam::vectorTensorTransform::vectorTensorTransform(const tensor& R)
|
||||
:
|
||||
t_(vector::zero),
|
||||
R_(R),
|
||||
hasR_(true)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::vector& Foam::vectorTensorTransform::t() const
|
||||
{
|
||||
return t_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::tensor& Foam::vectorTensorTransform::R() const
|
||||
{
|
||||
return R_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::vectorTensorTransform::hasR() const
|
||||
{
|
||||
return hasR_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vector& Foam::vectorTensorTransform::t()
|
||||
{
|
||||
return t_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::tensor& Foam::vectorTensorTransform::R()
|
||||
{
|
||||
// Assume that non-const access to R changes it from I, so set
|
||||
// hasR to true
|
||||
|
||||
hasR_ = true;
|
||||
|
||||
return R_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vector Foam::vectorTensorTransform::transform
|
||||
(
|
||||
const vector& v
|
||||
) const
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return t() + (R() & v);
|
||||
}
|
||||
else
|
||||
{
|
||||
return t() + v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline Foam::pointField Foam::vectorTensorTransform::transform
|
||||
(
|
||||
const pointField& pts
|
||||
) const
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return t() + (R() & pts);
|
||||
}
|
||||
else
|
||||
{
|
||||
return t() + pts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vector Foam::vectorTensorTransform::invTransform
|
||||
(
|
||||
const vector& v
|
||||
) const
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return (R().T() & (v - t()));
|
||||
}
|
||||
else
|
||||
{
|
||||
return v - t();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline Foam::pointField Foam::vectorTensorTransform::invTransform
|
||||
(
|
||||
const pointField& pts
|
||||
) const
|
||||
{
|
||||
if (hasR_)
|
||||
{
|
||||
return (R().T() & (pts - t()));
|
||||
}
|
||||
else
|
||||
{
|
||||
return pts - t();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator=
|
||||
(
|
||||
const vectorTensorTransform& tr
|
||||
)
|
||||
{
|
||||
t_ = tr.t_;
|
||||
R_ = tr.R_;
|
||||
hasR_ = tr.hasR_;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator&=
|
||||
(
|
||||
const vectorTensorTransform& tr
|
||||
)
|
||||
{
|
||||
t_ += tr.t_;
|
||||
R_ = tr.R_ & R_;
|
||||
|
||||
// If either of the two objects has hasR_ as true, then inherit
|
||||
// it, otherwise, these should both be I tensors.
|
||||
hasR_ = tr.hasR_ || hasR_;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator=(const vector& t)
|
||||
{
|
||||
t_ = t;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator+=(const vector& t)
|
||||
{
|
||||
t_ += t;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator-=(const vector& t)
|
||||
{
|
||||
t_ -= t;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator=(const tensor& R)
|
||||
{
|
||||
hasR_ = true;
|
||||
|
||||
R_ = R;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::vectorTensorTransform::operator&=(const tensor& R)
|
||||
{
|
||||
hasR_ = true;
|
||||
|
||||
R_ = R & R_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::vectorTensorTransform Foam::inv(const vectorTensorTransform& tr)
|
||||
{
|
||||
return vectorTensorTransform(-tr.t(), tr.R().T(), tr.hasR());
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::operator==
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
)
|
||||
{
|
||||
return (tr1.t() == tr2.t() && tr1.R() == tr2.R());
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::operator!=
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
)
|
||||
{
|
||||
return !operator==(tr1, tr2);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vectorTensorTransform Foam::operator+
|
||||
(
|
||||
const vectorTensorTransform& tr,
|
||||
const vector& t
|
||||
)
|
||||
{
|
||||
return vectorTensorTransform(tr.t() + t, tr.R(), tr.hasR());
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vectorTensorTransform Foam::operator+
|
||||
(
|
||||
const vector& t,
|
||||
const vectorTensorTransform& tr
|
||||
)
|
||||
{
|
||||
return vectorTensorTransform(t + tr.t(), tr.R(), tr.hasR());
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vectorTensorTransform Foam::operator-
|
||||
(
|
||||
const vectorTensorTransform& tr,
|
||||
const vector& t
|
||||
)
|
||||
{
|
||||
return vectorTensorTransform(tr.t() - t, tr.R(), tr.hasR());
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vectorTensorTransform Foam::operator&
|
||||
(
|
||||
const vectorTensorTransform& tr1,
|
||||
const vectorTensorTransform& tr2
|
||||
)
|
||||
{
|
||||
return vectorTensorTransform
|
||||
(
|
||||
tr1.t() + tr2.t(),
|
||||
tr1.R() & tr2.R(),
|
||||
(tr1.hasR() || tr2.hasR())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,144 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "referredWallFace.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::referredWallFace::referredWallFace()
|
||||
:
|
||||
face(),
|
||||
pts_(),
|
||||
patchI_()
|
||||
{}
|
||||
|
||||
|
||||
Foam::referredWallFace::referredWallFace
|
||||
(
|
||||
const face& f,
|
||||
const pointField& pts,
|
||||
label patchI
|
||||
)
|
||||
:
|
||||
face(f),
|
||||
pts_(pts),
|
||||
patchI_(patchI)
|
||||
{
|
||||
if (this->size() != pts_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::referredWallFace::referredWallFace"
|
||||
"("
|
||||
"const face& f, "
|
||||
"const pointField& pts, "
|
||||
"label patchI"
|
||||
")"
|
||||
) << "Face and pointField are not the same size. " << nl << (*this)
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::referredWallFace::referredWallFace(const referredWallFace& rWF)
|
||||
:
|
||||
face(rWF),
|
||||
pts_(rWF.pts_),
|
||||
patchI_(rWF.patchI_)
|
||||
{
|
||||
if (this->size() != pts_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::referredWallFace::referredWallFace"
|
||||
"("
|
||||
"const referredWallFace& rWF"
|
||||
")"
|
||||
) << "Face and pointField are not the same size. " << nl << (*this)
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::referredWallFace::~referredWallFace()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::referredWallFace::operator==(const referredWallFace& rhs) const
|
||||
{
|
||||
return
|
||||
(
|
||||
static_cast<const face&>(rhs) == static_cast<face>(*this)
|
||||
&& rhs.pts_ == pts_
|
||||
&& rhs.patchI_ == patchI_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::referredWallFace::operator!=(const referredWallFace& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, referredWallFace& rWF)
|
||||
{
|
||||
is >> static_cast<face&>(rWF) >> rWF.pts_ >> rWF.patchI_;
|
||||
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& "
|
||||
"Foam::operator>>(Foam::Istream&, Foam::referredWallFace&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const referredWallFace& rWF)
|
||||
{
|
||||
os << static_cast<const face&>(rWF) << token::SPACE
|
||||
<< rWF.pts_ << token::SPACE
|
||||
<< rWF.patchI_;
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::referredWallFace&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,38 +22,54 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::sendingReferralList
|
||||
Foam::referredWallFace
|
||||
|
||||
Description
|
||||
Storage for referred wall faces. Stores patch index, face and
|
||||
associated points
|
||||
|
||||
SourceFiles
|
||||
sendingReferralListI.H
|
||||
sendingReferralList.C
|
||||
sendingReferralListIO.C
|
||||
referredWallFaceI.H
|
||||
referredWallFace.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef sendingReferralList_H
|
||||
#define sendingReferralList_H
|
||||
#ifndef referredWallFace_H
|
||||
#define referredWallFace_H
|
||||
|
||||
#include "labelList.H"
|
||||
#include "face.H"
|
||||
#include "pointField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
class referredWallFace;
|
||||
Istream& operator>>(Istream&, referredWallFace&);
|
||||
Ostream& operator<<(Ostream&, const referredWallFace&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class sendingReferralList Declaration
|
||||
Class referredWallFace Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class sendingReferralList
|
||||
class referredWallFace
|
||||
:
|
||||
public labelList
|
||||
public face
|
||||
{
|
||||
// Private data
|
||||
|
||||
label destinationProc_;
|
||||
//- Points of face
|
||||
pointField pts_;
|
||||
|
||||
//- Index of originating patch
|
||||
label patchI_;
|
||||
|
||||
|
||||
public:
|
||||
@ -61,63 +77,50 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
sendingReferralList();
|
||||
referredWallFace();
|
||||
|
||||
//- Construct from components
|
||||
sendingReferralList
|
||||
referredWallFace
|
||||
(
|
||||
const label destinationProc,
|
||||
const labelList& cellsToSend
|
||||
const face& f,
|
||||
const pointField& pts,
|
||||
label patchI
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
sendingReferralList(const sendingReferralList&);
|
||||
referredWallFace(const referredWallFace&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~sendingReferralList();
|
||||
~referredWallFace();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
inline label destinationProc() const;
|
||||
//- Return access to the stored points
|
||||
inline const pointField& points() const;
|
||||
|
||||
//- Return non-const access to the stored points
|
||||
inline pointField& points();
|
||||
|
||||
//- Return access to the patch index
|
||||
inline label patchIndex() const;
|
||||
|
||||
//- Return non-const access to the patch index
|
||||
inline label& patchIndex();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
void operator=(const sendingReferralList&);
|
||||
|
||||
|
||||
// Friend Operators
|
||||
|
||||
friend bool operator==
|
||||
(
|
||||
const sendingReferralList& a,
|
||||
const sendingReferralList& b
|
||||
);
|
||||
|
||||
inline friend bool operator!=
|
||||
(
|
||||
const sendingReferralList& a,
|
||||
const sendingReferralList& b
|
||||
);
|
||||
|
||||
bool operator==(const referredWallFace&) const;
|
||||
bool operator!=(const referredWallFace&) const;
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>
|
||||
(
|
||||
Istream&,
|
||||
sendingReferralList&
|
||||
);
|
||||
|
||||
friend Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const sendingReferralList&
|
||||
);
|
||||
friend Istream& operator>>(Istream&, referredWallFace&);
|
||||
friend Ostream& operator<<(Ostream&, const referredWallFace&);
|
||||
};
|
||||
|
||||
|
||||
@ -127,7 +130,7 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "sendingReferralListI.H"
|
||||
#include "referredWallFaceI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,23 +23,31 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::label Foam::sendingReferralList::destinationProc() const
|
||||
const Foam::pointField& Foam::referredWallFace::points() const
|
||||
{
|
||||
return destinationProc_;
|
||||
return pts_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool operator!=
|
||||
(
|
||||
const Foam::sendingReferralList& a,
|
||||
const Foam::sendingReferralList& b
|
||||
)
|
||||
Foam::pointField& Foam::referredWallFace::points()
|
||||
{
|
||||
return (!(a == b));
|
||||
return pts_;
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::referredWallFace::patchIndex() const
|
||||
{
|
||||
return patchI_;
|
||||
}
|
||||
|
||||
|
||||
Foam::label& Foam::referredWallFace::patchIndex()
|
||||
{
|
||||
return patchI_;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
Cloud = Cloud
|
||||
particle = particle
|
||||
passiveParticle = passiveParticle
|
||||
indexedParticle = indexedParticle
|
||||
|
||||
$(passiveParticle)/passiveParticleCloud.C
|
||||
$(indexedParticle)/indexedParticleCloud.C
|
||||
|
||||
InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C
|
||||
InteractionLists/globalIndexAndTransform/vectorTensorTransform/vectorTensorTransform.C
|
||||
InteractionLists/referredWallFace/referredWallFace.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/liblagrangian
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,6 +49,9 @@ Foam::CoalParcel<ThermoType>::CoalParcel
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& pi0,
|
||||
const vector& tau0,
|
||||
const scalarField& YMixture0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
@ -67,6 +70,9 @@ Foam::CoalParcel<ThermoType>::CoalParcel
|
||||
nParticle0,
|
||||
d0,
|
||||
U0,
|
||||
f0,
|
||||
pi0,
|
||||
tau0,
|
||||
YMixture0,
|
||||
YGas0,
|
||||
YLiquid0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,6 +85,9 @@ public:
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& pi0,
|
||||
const vector& tau0,
|
||||
const scalarField& YMixture0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,6 +29,7 @@ License
|
||||
#include "makeReactingParcelDispersionModels.H"
|
||||
#include "makeReactingParcelDragModels.H"
|
||||
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
|
||||
#include "makeReactingParcelCollisionModels.H"
|
||||
#include "makeReactingParcelPatchInteractionModels.H"
|
||||
#include "makeReactingParcelPostProcessingModels.H"
|
||||
|
||||
@ -54,6 +55,7 @@ namespace Foam
|
||||
makeReactingDispersionModels(CoalParcel);
|
||||
makeReactingDragModels(CoalParcel);
|
||||
makeReactingMultiphaseInjectionModels(CoalParcel);
|
||||
makeReactingCollisionModels(CoalParcel);
|
||||
makeReactingPatchInteractionModels(CoalParcel);
|
||||
makeReactingPostProcessingModels(CoalParcel);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -0,0 +1,74 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
#include "atomizationModel.H"
|
||||
#include "LISA.H"
|
||||
#include "noAtomization.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<atomizationModel> atomizationModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
spray& sm
|
||||
)
|
||||
{
|
||||
word atomizationModelType
|
||||
(
|
||||
dict.lookup("atomizationModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting atomizationModel "
|
||||
<< atomizationModelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(atomizationModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalError
|
||||
<< "atomizationModel::New(const dictionary&, const spray&) : " << endl
|
||||
<< " unknown atomizationModelType type "
|
||||
<< atomizationModelType
|
||||
<< ", constructor not in hash table" << endl << endl
|
||||
<< " Valid atomizationModel types are :" << endl;
|
||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<atomizationModel>(cstrIter()(dict, sm));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user