Resolved unexpected merge problem.

This commit is contained in:
henry
2010-05-25 18:49:10 +01:00
96 changed files with 2936 additions and 452 deletions

View File

@ -104,6 +104,14 @@ type 'processorCyclic'.
- processor patches use overlapping communication using a different message - processor patches use overlapping communication using a different message
tag. This maps straight through into the MPI message tag. tag. This maps straight through into the MPI message tag.
See processorCyclicPolyPatch::tag(). This needs to be calculated the
same on both sides so is calculated as
Pstream::nProcs()*max(myProcNo, neighbProcNo)
+ min(myProcNo, neighbProcNo)
which is
- unique
- commutative
- does not interfere with the default tag (= 1)
- when constructing a GeometricField from a dictionary it will explicitly - when constructing a GeometricField from a dictionary it will explicitly

View File

@ -341,6 +341,7 @@ $(constraintPolyPatches)/empty/emptyPolyPatch.C
$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C $(constraintPolyPatches)/symmetry/symmetryPolyPatch.C
$(constraintPolyPatches)/wedge/wedgePolyPatch.C $(constraintPolyPatches)/wedge/wedgePolyPatch.C
$(constraintPolyPatches)/cyclic/cyclicPolyPatch.C $(constraintPolyPatches)/cyclic/cyclicPolyPatch.C
$(constraintPolyPatches)/cyclicSlip/cyclicSlipPolyPatch.C
$(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C $(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C
$(constraintPolyPatches)/processor/processorPolyPatch.C $(constraintPolyPatches)/processor/processorPolyPatch.C
@ -452,6 +453,7 @@ $(constraintPointPatches)/empty/emptyPointPatch.C
$(constraintPointPatches)/symmetry/symmetryPointPatch.C $(constraintPointPatches)/symmetry/symmetryPointPatch.C
$(constraintPointPatches)/wedge/wedgePointPatch.C $(constraintPointPatches)/wedge/wedgePointPatch.C
$(constraintPointPatches)/cyclic/cyclicPointPatch.C $(constraintPointPatches)/cyclic/cyclicPointPatch.C
$(constraintPointPatches)/cyclicSlip/cyclicSlipPointPatch.C
$(constraintPointPatches)/processor/processorPointPatch.C $(constraintPointPatches)/processor/processorPointPatch.C
$(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C $(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C

View File

@ -219,30 +219,6 @@ Foam::List<int> Foam::UPstream::procIDs_(1, 0);
// Standard transfer message type // Standard transfer message type
int Foam::UPstream::msgType_(1); int Foam::UPstream::msgType_(1);
// New message type
int Foam::UPstream::freeTag_(msgType()+1);
// Free'd message types
Foam::LIFOStack<int> Foam::UPstream::freedTags_;
int Foam::UPstream::allocateTag()
{
if (freedTags_.empty())
{
return freeTag_++;
}
else
{
return freedTags_.pop();
}
}
void Foam::UPstream::freeTag(const int tag)
{
freedTags_.push(tag);
}
// Linear communication schedule // Linear communication schedule
Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::linearCommunication_(0); Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::linearCommunication_(0);

View File

@ -45,7 +45,6 @@ SourceFiles
#include "HashTable.H" #include "HashTable.H"
#include "string.H" #include "string.H"
#include "NamedEnum.H" #include "NamedEnum.H"
#include "LIFOStack.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -191,12 +190,6 @@ private:
static List<commsStruct> treeCommunication_; static List<commsStruct> treeCommunication_;
//- Current free tag
static int freeTag_;
//- Freed tags
static LIFOStack<int> freedTags_;
// Private Member Functions // Private Member Functions
//- Set data for parallel running //- Set data for parallel running
@ -346,11 +339,6 @@ public:
{ {
return msgType_; return msgType_;
} }
//- Allocate new tag
static int allocateTag();
//- Release allocated tag
static void freeTag(const int tag);
//- Get the communications type of the stream //- Get the communications type of the stream

View File

@ -8,10 +8,10 @@
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation; either version 2 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,12 +19,12 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cyclicSlipPointPatchField.H" #include "cyclicSlipPointPatchField.H"
#include "pointConstraint.H"
#include "transformField.H" #include "transformField.H"
#include "symmTransformField.H" #include "symmTransformField.H"
@ -104,17 +104,6 @@ void cyclicSlipPointPatchField<Type>::evaluate(const Pstream::commsTypes)
} }
template<class Type>
void cyclicSlipPointPatchField<Type>::applyConstraint
(
const label pointi,
pointConstraint& pc
) const
{
pc.applyConstraint(this->patch().pointNormals()[pointi]);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -8,10 +8,10 @@
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation; either version 2 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,13 +19,14 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::cyclicSlipPointPatchField Foam::cyclicSlipPointPatchField
Description Description
Specialisation of cyclic that constrains to the patch Cyclic + slip constraints
SourceFiles SourceFiles
cyclicSlipPointPatchField.C cyclicSlipPointPatchField.C
@ -36,6 +37,7 @@ SourceFiles
#define cyclicSlipPointPatchField_H #define cyclicSlipPointPatchField_H
#include "cyclicPointPatchField.H" #include "cyclicPointPatchField.H"
#include "cyclicSlipPointPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,7 +57,7 @@ class cyclicSlipPointPatchField
public: public:
//- Runtime type information //- Runtime type information
TypeName("cyclicSlip"); TypeName(cyclicSlipPointPatch::typeName_());
// Constructors // Constructors
@ -121,18 +123,13 @@ public:
// Member functions // Member functions
//- Update the patch field // Evaluation functions
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Accumulate the effect of constraint direction of this patch //- Evaluate the patch field
virtual void applyConstraint virtual void evaluate
( (
const label pointi, const Pstream::commsTypes commsType=Pstream::blocking
pointConstraint& );
) const;
}; };

View File

@ -8,10 +8,10 @@
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation; either version 2 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,7 +19,8 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -8,10 +8,10 @@
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation; either version 2 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ -19,7 +19,8 @@ License
for more details. for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -0,0 +1,75 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipPointPatch.H"
#include "pointConstraint.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTypeNameAndDebug(cyclicSlipPointPatch, 0);
// Add the patch constructor functions to the hash tables
addToRunTimeSelectionTable
(
facePointPatch,
cyclicSlipPointPatch,
polyPatch
);
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const vectorField& cyclicSlipPointPatch::pointNormals() const
{
// Use underlying patch normals
return refCast<const facePointPatch>
(
*this
).facePointPatch::pointNormals();
}
void cyclicSlipPointPatch::applyConstraint
(
const label pointi,
pointConstraint& pc
) const
{
pc.applyConstraint(pointNormals()[pointi]);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,103 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipPointPatch
Description
Cyclic patch with slip constraint
SourceFiles
cyclicSlipPointPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipPointPatch_H
#define cyclicSlipPointPatch_H
#include "cyclicPointPatch.H"
#include "cyclicSlipPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipPointPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicSlipPointPatch
:
public cyclicPointPatch
{
public:
//- Runtime type information
TypeName(cyclicSlipPolyPatch::typeName_());
// Constructors
//- Construct from components
cyclicSlipPointPatch
(
const polyPatch& patch,
const pointBoundaryMesh& bm
)
:
cyclicPointPatch(patch, bm)
{}
// Destructor
virtual ~cyclicSlipPointPatch()
{}
// Member Functions
//- Return point unit normals.
virtual const vectorField& pointNormals() const;
//- Accumulate the effect of constraint direction of this patch
virtual void applyConstraint
(
const label pointi,
pointConstraint&
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(cyclicSlipPolyPatch, 0);
addToRunTimeSelectionTable(polyPatch, cyclicSlipPolyPatch, word);
addToRunTimeSelectionTable(polyPatch, cyclicSlipPolyPatch, dictionary);
}
// ************************************************************************* //

View File

@ -0,0 +1,200 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipPolyPatch
Description
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch
which is cyclicSlip with slip constraints
SourceFiles
cyclicSlipPolyPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipPolyPatch_H
#define cyclicSlipPolyPatch_H
#include "cyclicPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipPolyPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicSlipPolyPatch
:
public cyclicPolyPatch
{
public:
//- Runtime type information
TypeName("cyclicSlip");
// Constructors
//- Construct from components
cyclicSlipPolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(name, size, start, index, bm)
{}
//- Construct from dictionary
cyclicSlipPolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(name, dict, index, bm)
{}
//- Construct as copy, resetting the boundary mesh
cyclicSlipPolyPatch
(
const cyclicSlipPolyPatch& pp,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(pp, bm)
{}
//- Construct given the original patch and resetting the
// face list and boundary mesh information
cyclicSlipPolyPatch
(
const cyclicSlipPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart,
const word& neighbPatchName
)
:
cyclicPolyPatch(pp, bm, index, newSize, newStart, neighbPatchName)
{}
//- Construct given the original patch and a map
cyclicSlipPolyPatch
(
const cyclicPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const unallocLabelList& mapAddressing,
const label newStart
)
:
cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
{}
//- Construct and return a clone, resetting the boundary mesh
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
{
return autoPtr<polyPatch>(new cyclicSlipPolyPatch(*this, bm));
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new cyclicSlipPolyPatch
(
*this,
bm,
index,
newSize,
newStart,
neighbPatchName()
)
);
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const unallocLabelList& mapAddressing,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new cyclicSlipPolyPatch
(
*this,
bm,
index,
mapAddressing,
newStart
)
);
}
// Destructor
virtual ~cyclicSlipPolyPatch()
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -55,10 +55,20 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
) )
: :
processorPolyPatch(name, size, start, index, bm, myProcNo, neighbProcNo), processorPolyPatch(name, size, start, index, bm, myProcNo, neighbProcNo),
tag_(UPstream::allocateTag()), tag_
(
Pstream::nProcs()*max(myProcNo, neighbProcNo)
+ min(myProcNo, neighbProcNo)
),
referPatchName_(referPatchName), referPatchName_(referPatchName),
referPatchID_(-1) referPatchID_(-1)
{} {
if (debug)
{
Pout<< "processorCyclicPolyPatch " << name << " uses tag " << tag_
<< endl;
}
}
Foam::processorCyclicPolyPatch::processorCyclicPolyPatch Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
@ -70,10 +80,20 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
) )
: :
processorPolyPatch(name, dict, index, bm), processorPolyPatch(name, dict, index, bm),
tag_(UPstream::allocateTag()), tag_
(
Pstream::nProcs()*max(myProcNo(), neighbProcNo())
+ min(myProcNo(), neighbProcNo())
),
referPatchName_(dict.lookup("referPatch")), referPatchName_(dict.lookup("referPatch")),
referPatchID_(-1) referPatchID_(-1)
{} {
if (debug)
{
Pout<< "processorCyclicPolyPatch " << name << " uses tag " << tag_
<< endl;
}
}
Foam::processorCyclicPolyPatch::processorCyclicPolyPatch Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
@ -125,9 +145,7 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::processorCyclicPolyPatch::~processorCyclicPolyPatch() Foam::processorCyclicPolyPatch::~processorCyclicPolyPatch()
{ {}
UPstream::freeTag(tag_);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View File

@ -20,6 +20,7 @@ $(constraintFvPatches)/empty/emptyFvPatch.C
$(constraintFvPatches)/symmetry/symmetryFvPatch.C $(constraintFvPatches)/symmetry/symmetryFvPatch.C
$(constraintFvPatches)/wedge/wedgeFvPatch.C $(constraintFvPatches)/wedge/wedgeFvPatch.C
$(constraintFvPatches)/cyclic/cyclicFvPatch.C $(constraintFvPatches)/cyclic/cyclicFvPatch.C
$(constraintFvPatches)/cyclicSlip/cyclicSlipFvPatch.C
$(constraintFvPatches)/processor/processorFvPatch.C $(constraintFvPatches)/processor/processorFvPatch.C
$(constraintFvPatches)/processorCyclic/processorCyclicFvPatch.C $(constraintFvPatches)/processorCyclic/processorCyclicFvPatch.C
@ -96,6 +97,7 @@ $(basicFvPatchFields)/zeroGradient/zeroGradientFvPatchFields.C
constraintFvPatchFields = $(fvPatchFields)/constraint constraintFvPatchFields = $(fvPatchFields)/constraint
$(constraintFvPatchFields)/cyclic/cyclicFvPatchFields.C $(constraintFvPatchFields)/cyclic/cyclicFvPatchFields.C
$(constraintFvPatchFields)/cyclicSlip/cyclicSlipFvPatchFields.C
$(constraintFvPatchFields)/empty/emptyFvPatchFields.C $(constraintFvPatchFields)/empty/emptyFvPatchFields.C
$(constraintFvPatchFields)/jumpCyclic/jumpCyclicFvPatchFields.C $(constraintFvPatchFields)/jumpCyclic/jumpCyclicFvPatchFields.C
$(constraintFvPatchFields)/processor/processorFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchFields.C
@ -167,6 +169,7 @@ $(basicFvsPatchFields)/sliced/slicedFvsPatchFields.C
constraintFvsPatchFields = $(fvsPatchFields)/constraint constraintFvsPatchFields = $(fvsPatchFields)/constraint
$(constraintFvsPatchFields)/cyclic/cyclicFvsPatchFields.C $(constraintFvsPatchFields)/cyclic/cyclicFvsPatchFields.C
$(constraintFvsPatchFields)/cyclicSlip/cyclicSlipFvsPatchFields.C
$(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C $(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C
$(constraintFvsPatchFields)/processor/processorFvsPatchFields.C $(constraintFvsPatchFields)/processor/processorFvsPatchFields.C
$(constraintFvsPatchFields)/processorCyclic/processorCyclicFvsPatchFields.C $(constraintFvsPatchFields)/processorCyclic/processorCyclicFvsPatchFields.C

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
)
:
cyclicFvPatchField<Type>(p, iF)
{}
template<class Type>
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
cyclicFvPatchField<Type>(ptf, p, iF, mapper)
{}
template<class Type>
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
cyclicFvPatchField<Type>(p, iF, dict)
{}
template<class Type>
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>& ptf
)
:
cyclicFvPatchField<Type>(ptf)
{}
template<class Type>
cyclicSlipFvPatchField<Type>::cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>& ptf,
const DimensionedField<Type, volMesh>& iF
)
:
cyclicFvPatchField<Type>(ptf, iF)
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,141 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipFvPatchField
Description
Foam::cyclicSlipFvPatchField
SourceFiles
cyclicSlipFvPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvPatchField_H
#define cyclicSlipFvPatchField_H
#include "cyclicFvPatchField.H"
#include "cyclicSlipFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipFvPatch Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class cyclicSlipFvPatchField
:
public cyclicFvPatchField<Type>
{
// Private data
public:
//- Runtime type information
TypeName(cyclicSlipFvPatch::typeName_());
// Constructors
//- Construct from patch and internal field
cyclicSlipFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&
);
//- Construct from patch, internal field and dictionary
cyclicSlipFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const dictionary&
);
//- Construct by mapping given cyclicSlipFvPatchField onto a new patch
cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvPatchField<Type> > clone() const
{
return tmp<fvPatchField<Type> >
(
new cyclicSlipFvPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
cyclicSlipFvPatchField
(
const cyclicSlipFvPatchField<Type>&,
const DimensionedField<Type, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchField<Type> > clone
(
const DimensionedField<Type, volMesh>& iF
) const
{
return tmp<fvPatchField<Type> >
(
new cyclicSlipFvPatchField<Type>(*this, iF)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "cyclicSlipFvPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makePatchFields(cyclicSlip);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvPatchFields_H
#define cyclicSlipFvPatchFields_H
#include "cyclicSlipFvPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeFieldTypedefs(cyclicSlip)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvPatchFieldsFwd_H
#define cyclicSlipFvPatchFieldsFwd_H
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> class cyclicSlipFvPatchField;
makePatchTypeFieldTypedefs(cyclicSlip)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipFvsPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF
)
:
cyclicFvsPatchField<Type>(p, iF)
{}
template<class Type>
cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
cyclicFvsPatchField<Type>(ptf, p, iF, mapper)
{}
template<class Type>
cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const dictionary& dict
)
:
cyclicFvsPatchField<Type>(p, iF, dict)
{}
template<class Type>
cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>& ptf
)
:
cyclicFvsPatchField<Type>(ptf)
{}
template<class Type>
cyclicSlipFvsPatchField<Type>::cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>& ptf,
const DimensionedField<Type, surfaceMesh>& iF
)
:
cyclicFvsPatchField<Type>(ptf, iF)
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,139 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipFvsPatchField
Description
Foam::cyclicSlipFvsPatchField
SourceFiles
cyclicSlipFvsPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvsPatchField_H
#define cyclicSlipFvsPatchField_H
#include "cyclicFvsPatchField.H"
#include "cyclicSlipFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipFvsPatch Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class cyclicSlipFvsPatchField
:
public cyclicFvsPatchField<Type>
{
public:
//- Runtime type information
TypeName(cyclicSlipFvPatch::typeName_());
// Constructors
//- Construct from patch and internal field
cyclicSlipFvsPatchField
(
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&
);
//- Construct from patch, internal field and dictionary
cyclicSlipFvsPatchField
(
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&,
const dictionary&
);
//- Construct by mapping given cyclicSlipFvsPatchField onto a new patch
cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvsPatchField<Type> > clone() const
{
return tmp<fvsPatchField<Type> >
(
new cyclicSlipFvsPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
cyclicSlipFvsPatchField
(
const cyclicSlipFvsPatchField<Type>&,
const DimensionedField<Type, surfaceMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvsPatchField<Type> > clone
(
const DimensionedField<Type, surfaceMesh>& iF
) const
{
return tmp<fvsPatchField<Type> >
(
new cyclicSlipFvsPatchField<Type>(*this, iF)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "cyclicSlipFvsPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipFvsPatchFields.H"
#include "fvsPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeFvsPatchFields(cyclicSlip);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvsPatchFields_H
#define cyclicSlipFvsPatchFields_H
#include "cyclicSlipFvsPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeFvsPatchTypeFieldTypedefs(cyclicSlip)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvsPatchFieldsFwd_H
#define cyclicSlipFvsPatchFieldsFwd_H
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> class cyclicSlipFvsPatchField;
makeFvsPatchTypeFieldTypedefs(cyclicSlip)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipFvPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTypeNameAndDebug(cyclicSlipFvPatch, 0);
addToRunTimeSelectionTable(fvPatch, cyclicSlipFvPatch, polyPatch);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-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 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipFvPatch
Description
Cyclic-plane patch.
SourceFiles
cyclicSlipFvPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipFvPatch_H
#define cyclicSlipFvPatch_H
#include "cyclicFvPatch.H"
#include "cyclicSlipPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipFvPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicSlipFvPatch
:
public cyclicFvPatch
{
public:
//- Runtime type information
TypeName(cyclicSlipPolyPatch::typeName_());
// Constructors
//- Construct from polyPatch
cyclicSlipFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
:
cyclicFvPatch(patch, bm)
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -291,7 +291,10 @@ void Foam::DsmcCloud<ParcelType>::initialise
template<class ParcelType> template<class ParcelType>
void Foam::DsmcCloud<ParcelType>::collisions() void Foam::DsmcCloud<ParcelType>::collisions()
{ {
buildCellOccupancy(); if (!binaryCollision().active())
{
return;
}
// Temporary storage for subCells // Temporary storage for subCells
List<DynamicList<label> > subCells(8); List<DynamicList<label> > subCells(8);
@ -1057,6 +1060,9 @@ void Foam::DsmcCloud<ParcelType>::evolve()
// Move the particles ballistically with their current velocities // Move the particles ballistically with their current velocities
Cloud<ParcelType>::move(td); Cloud<ParcelType>::move(td);
// Update cell occupancy
buildCellOccupancy();
// Calculate new velocities via stochastic collisions // Calculate new velocities via stochastic collisions
collisions(); collisions();

View File

@ -25,6 +25,7 @@ License
#include "dsmcParcel.H" #include "dsmcParcel.H"
#include "DsmcCloud.H" #include "DsmcCloud.H"
#include "NoBinaryCollision.H"
#include "VariableHardSphere.H" #include "VariableHardSphere.H"
#include "LarsenBorgnakkeVariableHardSphere.H" #include "LarsenBorgnakkeVariableHardSphere.H"
@ -34,6 +35,12 @@ namespace Foam
// Add instances of collision model to the table // Add instances of collision model to the table
makeBinaryCollisionModelType makeBinaryCollisionModelType
(
NoBinaryCollision,
DsmcCloud,
dsmcParcel
);
makeBinaryCollisionModelType
( (
VariableHardSphere, VariableHardSphere,
DsmcCloud, DsmcCloud,

View File

@ -27,6 +27,15 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType>
Foam::BinaryCollisionModel<CloudType>::BinaryCollisionModel(CloudType& owner)
:
dict_(dictionary::null),
owner_(owner),
coeffDict_(dictionary::null)
{}
template<class CloudType> template<class CloudType>
Foam::BinaryCollisionModel<CloudType>::BinaryCollisionModel Foam::BinaryCollisionModel<CloudType>::BinaryCollisionModel
( (
@ -87,4 +96,3 @@ Foam::BinaryCollisionModel<CloudType>::coeffDict() const
#include "BinaryCollisionModelNew.C" #include "BinaryCollisionModelNew.C"
// ************************************************************************* // // ************************************************************************* //

View File

@ -85,6 +85,9 @@ public:
// Constructors // Constructors
//- Construct null from owner
BinaryCollisionModel(CloudType& owner);
//- Construct from components //- Construct from components
BinaryCollisionModel BinaryCollisionModel
( (
@ -123,6 +126,9 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates collision model
virtual bool active() const = 0;
//- Return the collision cross section * relative velocity product //- Return the collision cross section * relative velocity product
virtual scalar sigmaTcR virtual scalar sigmaTcR
( (

View File

@ -117,6 +117,12 @@ Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::active() const
{
return true;
}
template <class CloudType> template <class CloudType>
Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR

View File

@ -89,6 +89,9 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates collision model
virtual bool active() const;
//- Return the collision cross section * relative velocity product //- Return the collision cross section * relative velocity product
virtual scalar sigmaTcR virtual scalar sigmaTcR
( (

View File

@ -0,0 +1,102 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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 "NoBinaryCollision.H"
#include "constants.H"
using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class CloudType>
Foam::NoBinaryCollision<CloudType>::NoBinaryCollision
(
const dictionary& dict,
CloudType& cloud
)
:
BinaryCollisionModel<CloudType>(cloud)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template <class CloudType>
Foam::NoBinaryCollision<CloudType>::~NoBinaryCollision()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::NoBinaryCollision<CloudType>::active() const
{
return false;
}
template <class CloudType>
Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR
(
label typeIdP,
label typeIdQ,
const vector& UP,
const vector& UQ
) const
{
FatalErrorIn
(
"Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR"
"("
"label typeIdP,"
"label typeIdQ,"
"const vector& UP,"
"const vector& UQ"
") const"
)
<< "sigmaTcR called on NoBinaryCollision model, this should "
<< "not happen, this is not an actual model." << nl
<< "Enclose calls to sigmaTcR within a if(binaryCollision().active()) "
<< " check."
<< abort(FatalError);
return 0.0;
}
template <class CloudType>
void Foam::NoBinaryCollision<CloudType>::collide
(
label typeIdP,
label typeIdQ,
vector& UP,
vector& UQ,
scalar& EiP,
scalar& EiQ
)
{}
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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::NoBinaryCollision
Description
No collison BinaryCollision Model
\*---------------------------------------------------------------------------*/
#ifndef NoBinaryCollision_H
#define NoBinaryCollision_H
#include "BinaryCollisionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class NoBinaryCollision Declaration
\*---------------------------------------------------------------------------*/
template<class CloudType>
class NoBinaryCollision
:
public BinaryCollisionModel<CloudType>
{
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from dictionary
NoBinaryCollision
(
const dictionary& dict,
CloudType& cloud
);
//- Destructor
virtual ~NoBinaryCollision();
// Member Functions
//- Flag to indicate whether model activates collision model
virtual bool active() const;
//- Return the collision cross section * relative velocity product
virtual scalar sigmaTcR
(
label typeIdP,
label typeIdQ,
const vector& UP,
const vector& UQ
) const;
//- Apply collision
virtual void collide
(
label typeIdP,
label typeIdQ,
vector& UP,
vector& UQ,
scalar& EiP,
scalar& EiQ
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "NoBinaryCollision.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -51,6 +51,12 @@ Foam::VariableHardSphere<CloudType>::~VariableHardSphere()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
bool Foam::VariableHardSphere<CloudType>::active() const
{
return true;
}
template <class CloudType> template <class CloudType>
Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR

View File

@ -74,6 +74,9 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates collision model
virtual bool active() const;
//- Return the collision cross section * relative velocity product //- Return the collision cross section * relative velocity product
virtual scalar sigmaTcR virtual scalar sigmaTcR
( (

View File

@ -27,6 +27,15 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType>
Foam::InflowBoundaryModel<CloudType>::InflowBoundaryModel(CloudType& owner)
:
dict_(dictionary::null),
owner_(owner),
coeffDict_(dictionary::null)
{}
template<class CloudType> template<class CloudType>
Foam::InflowBoundaryModel<CloudType>::InflowBoundaryModel Foam::InflowBoundaryModel<CloudType>::InflowBoundaryModel
( (

View File

@ -86,6 +86,9 @@ public:
// Constructors // Constructors
//- Construct null from owner
InflowBoundaryModel(CloudType& owner);
//- Construct from dictionary //- Construct from dictionary
InflowBoundaryModel InflowBoundaryModel
( (

View File

@ -34,7 +34,7 @@ Foam::NoInflow<CloudType>::NoInflow
CloudType& cloud CloudType& cloud
) )
: :
InflowBoundaryModel<CloudType>(dict, cloud, typeName) InflowBoundaryModel<CloudType>(cloud)
{} {}

View File

@ -50,7 +50,7 @@ class NoInflow
public: public:
//- Runtime type information //- Runtime type information
TypeName("NoInflow"); TypeName("none");
// Constructors // Constructors

View File

@ -37,7 +37,7 @@ Foam::MaxwellianThermal<CloudType>::MaxwellianThermal
CloudType& cloud CloudType& cloud
) )
: :
WallInteractionModel<CloudType>(dict, cloud, typeName) WallInteractionModel<CloudType>(cloud)
{} {}

View File

@ -36,7 +36,7 @@ Foam::SpecularReflection<CloudType>::SpecularReflection
CloudType& cloud CloudType& cloud
) )
: :
WallInteractionModel<CloudType>(dict, cloud, typeName) WallInteractionModel<CloudType>(cloud)
{} {}

View File

@ -27,6 +27,15 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType>
Foam::WallInteractionModel<CloudType>::WallInteractionModel(CloudType& owner)
:
dict_(dictionary::null),
owner_(owner),
coeffDict_(dictionary::null)
{}
template<class CloudType> template<class CloudType>
Foam::WallInteractionModel<CloudType>::WallInteractionModel Foam::WallInteractionModel<CloudType>::WallInteractionModel
( (

View File

@ -85,6 +85,9 @@ public:
// Constructors // Constructors
//- Construct null from owner
WallInteractionModel(CloudType& owner);
//- Construct from components //- Construct from components
WallInteractionModel WallInteractionModel
( (

View File

@ -28,37 +28,41 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class PairType, class WallType>
Foam::CollisionRecordList<Type>::CollisionRecordList() Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList()
: :
DynamicList<CollisionRecord<Type> >() pairRecords_(),
wallRecords_()
{} {}
template<class Type> template<class PairType, class WallType>
Foam::CollisionRecordList<Type>::CollisionRecordList(Istream& is) Foam::CollisionRecordList<PairType, WallType>::CollisionRecordList(Istream& is)
: :
DynamicList<CollisionRecord<Type> >(is) pairRecords_(is),
wallRecords_(is)
{ {
// Check state of Istream // Check state of Istream
is.check is.check
( (
"Foam::CollisionRecordList<Type>::CollisionRecordList(Foam::Istream&)" "Foam::CollisionRecordList<PairType, WallType>::"
"CollisionRecordList(Foam::Istream&)"
); );
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * /
template<class Type> template<class PairType, class WallType>
Foam::CollisionRecordList<Type>::~CollisionRecordList() Foam::CollisionRecordList<PairType, WallType>::~CollisionRecordList()
{} {}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Type> template<class PairType, class WallType>
Foam::CollisionRecord<Type>& Foam::CollisionRecordList<Type>::matchRecord Foam::PairCollisionRecord<PairType>&
Foam::CollisionRecordList<PairType, WallType>::matchPairRecord
( (
label origProcOfOther, label origProcOfOther,
label origIdOfOther label origIdOfOther
@ -68,15 +72,15 @@ Foam::CollisionRecord<Type>& Foam::CollisionRecordList<Type>::matchRecord
// identifiers. Two records with the same identification is not // identifiers. Two records with the same identification is not
// supported. // supported.
forAll(*this, i) forAll(pairRecords_, i)
{ {
CollisionRecord<Type>& cR = (*this)[i]; PairCollisionRecord<PairType>& pCR = pairRecords_[i];
if (cR.match(origProcOfOther, origIdOfOther)) if (pCR.match(origProcOfOther, origIdOfOther))
{ {
cR.setAccessed(); pCR.setAccessed();
return cR; return pCR;
} }
} }
@ -84,28 +88,179 @@ Foam::CollisionRecord<Type>& Foam::CollisionRecordList<Type>::matchRecord
// member of the list. The status of the record will be accessed // member of the list. The status of the record will be accessed
// by construction. // by construction.
append(CollisionRecord<Type>(origProcOfOther, origIdOfOther)); pairRecords_.append
(
PairCollisionRecord<PairType>(origProcOfOther, origIdOfOther)
);
return (*this)[this->size() - 1]; return pairRecords_.last();
} }
template<class Type> template<class PairType, class WallType>
void Foam::CollisionRecordList<Type>::update() Foam::WallCollisionRecord<WallType>&
Foam::CollisionRecordList<PairType, WallType>::matchWallRecord
(
const vector& pRel,
scalar radius
)
{ {
DynamicList<CollisionRecord<Type> > updatedRecords; // Returning the first record that matches the relative position.
// Two records with the same relative position is not supported.
forAll(*this, i) forAll(wallRecords_, i)
{ {
if ((*this)[i].accessed()) WallCollisionRecord<WallType>& wCR = wallRecords_[i];
{
(*this)[i].setUnaccessed();
updatedRecords.append((*this)[i]); if (wCR.match(pRel, radius))
{
wCR.setAccessed();
return wCR;
} }
} }
DynamicList<CollisionRecord<Type> >::operator=(updatedRecords); // Record not found, create a new one and return it as the last
// member of the list. The status of the record will be accessed
// by construction.
wallRecords_.append(WallCollisionRecord<WallType>(pRel));
return wallRecords_.last();
} }
template<class PairType, class WallType>
void Foam::CollisionRecordList<PairType, WallType>::update()
{
{
DynamicList<PairCollisionRecord<PairType> > updatedRecords;
forAll(pairRecords_, i)
{
if (pairRecords_[i].accessed())
{
pairRecords_[i].setUnaccessed();
updatedRecords.append(pairRecords_[i]);
}
}
pairRecords_ = updatedRecords;
}
{
DynamicList<WallCollisionRecord<WallType> > updatedRecords;
forAll(wallRecords_, i)
{
if (wallRecords_[i].accessed())
{
wallRecords_[i].setUnaccessed();
updatedRecords.append(wallRecords_[i]);
}
}
wallRecords_ = updatedRecords;
}
}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
template<class PairType, class WallType>
void Foam::CollisionRecordList<PairType, WallType>::operator=
(
const CollisionRecordList<PairType, WallType>& rhs
)
{
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn
(
"Foam::CollisionRecordList<PairType, WallType>::operator="
"(const Foam::CollisionRecordList<PairType, WallType>&)"
)
<< "Attempted assignment to self"
<< abort(FatalError);
}
pairRecords_ = rhs.pairRecords_;
wallRecords_ = rhs.wallRecords_;
}
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
template<class PairType, class WallType>
inline bool Foam::operator==
(
const CollisionRecordList<PairType, WallType>& a,
const CollisionRecordList<PairType, WallType>& b
)
{
return
(
a.pairRecords_ == b.pairRecords_
&& a.wallRecords_ == b.wallRecords_
);
}
template<class PairType, class WallType>
inline bool Foam::operator!=
(
const CollisionRecordList<PairType, WallType>& a,
const CollisionRecordList<PairType, WallType>& b
)
{
return !(a == b);
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class PairType, class WallType>
Foam::Istream& Foam::operator>>
(
Istream& is,
CollisionRecordList<PairType, WallType>& cRL
)
{
is >> cRL.pairRecords_ >> cRL.wallRecords_;
// Check state of Istream
is.check
(
"Foam::Istream& Foam::operator>>"
"(Foam::Istream&, Foam::CollisionRecordList<PairType, WallType>&)"
);
return is;
}
template<class PairType, class WallType>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const CollisionRecordList<PairType, WallType>& cRL
)
{
os << cRL.pairRecords_ << cRL.wallRecords_;
// Check state of Ostream
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
"const Foam::CollisionRecordList<PairType, WallType>&)"
);
return os;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -37,22 +37,53 @@ SourceFiles
#define CollisionRecordList_H #define CollisionRecordList_H
#include "DynamicList.H" #include "DynamicList.H"
#include "CollisionRecord.H" #include "PairCollisionRecord.H"
#include "WallCollisionRecord.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// Forward declaration of friend functions and operators
template<class PairType, class WallType>
class CollisionRecordList;
template<class PairType, class WallType>
inline bool operator==
(
const CollisionRecordList<PairType, WallType>&,
const CollisionRecordList<PairType, WallType>&
);
template<class PairType, class WallType>
inline bool operator!=
(
const CollisionRecordList<PairType, WallType>&,
const CollisionRecordList<PairType, WallType>&
);
template<class PairType, class WallType>
Istream& operator>>(Istream&, CollisionRecordList<PairType, WallType>&);
template<class PairType, class WallType>
Ostream& operator<<(Ostream&, const CollisionRecordList<PairType, WallType>&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class CollisionRecordList Declaration Class CollisionRecordList Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class PairType, class WallType>
class CollisionRecordList class CollisionRecordList
:
public DynamicList<CollisionRecord<Type> >
{ {
// Private data
//- List of active pair collisions
DynamicList<PairCollisionRecord<PairType> > pairRecords_;
//- List of active wall collisions
DynamicList<WallCollisionRecord<WallType> > wallRecords_;
public: public:
@ -72,19 +103,66 @@ public:
// Member Functions // Member Functions
//- Enquires if the proc and id pair of the other particle are //- Enquires if the proc and id pair of the other particle are
// present in the records. If so, return access to the // present in the records. If so, return non-const access to
// collisionData and mark the CollisionRecord as accessed this // the PairCollisionRecord (hence the data) and mark the
// step, if not, create the record and return access to it. // PairCollisionRecord as accessed this step, if not, create
CollisionRecord<Type>& matchRecord // the record and return access to it.
PairCollisionRecord<PairType>& matchPairRecord
( (
label origProcOfOther, label origProcOfOther,
label origIdOfOther label origIdOfOther
); );
//- Enquires if the position of wall impact relative to the
// particle centre is present in the records. If so, return
// access to the WallCollisionRecord (hence the data) and
// mark the WallCollisionRecord as accesses this step, if
// not, create the record and return access to it.
WallCollisionRecord<WallType>& matchWallRecord
(
const vector& pRel,
scalar radius
);
//- Update the collision records, deleting any records not //- Update the collision records, deleting any records not
// marked as having been accessed, then mark all records as // marked as having been accessed, then mark all records as
// not accessed ready for the next evaluation // not accessed ready for the next evaluation
void update(); void update();
// Member Operators
void operator=(const CollisionRecordList&);
// Friend Operators
friend bool operator== <PairType, WallType>
(
const CollisionRecordList<PairType, WallType>&,
const CollisionRecordList<PairType, WallType>&
);
friend bool operator!= <PairType, WallType>
(
const CollisionRecordList<PairType, WallType>&,
const CollisionRecordList<PairType, WallType>&
);
// IOstream Operators
friend Istream& operator>> <PairType, WallType>
(
Istream&,
CollisionRecordList<PairType, WallType>&
);
friend Ostream& operator<< <PairType, WallType>
(
Ostream&,
const CollisionRecordList<PairType, WallType>&
);
}; };

View File

@ -23,12 +23,12 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "CollisionRecord.H" #include "PairCollisionRecord.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::CollisionRecord<Type>::CollisionRecord() Foam::PairCollisionRecord<Type>::PairCollisionRecord()
: :
origProcOfOther_(-VGREAT), origProcOfOther_(-VGREAT),
origIdOfOther_(-VGREAT), origIdOfOther_(-VGREAT),
@ -37,7 +37,7 @@ Foam::CollisionRecord<Type>::CollisionRecord()
template<class Type> template<class Type>
Foam::CollisionRecord<Type>::CollisionRecord Foam::PairCollisionRecord<Type>::PairCollisionRecord
( (
label origProcOfOther, label origProcOfOther,
label origIdOfOther, label origIdOfOther,
@ -51,33 +51,39 @@ Foam::CollisionRecord<Type>::CollisionRecord
template<class Type> template<class Type>
Foam::CollisionRecord<Type>::CollisionRecord(const CollisionRecord<Type>& cR) Foam::PairCollisionRecord<Type>::PairCollisionRecord
(
const PairCollisionRecord<Type>& pCR
)
: :
origProcOfOther_(cR.origProcOfOther() + 1), origProcOfOther_(pCR.origProcOfOther() + 1),
origIdOfOther_(cR.origIdOfOther_), origIdOfOther_(pCR.origIdOfOther_),
data_(cR.data_) data_(pCR.data_)
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::CollisionRecord<Type>::~CollisionRecord() Foam::PairCollisionRecord<Type>::~PairCollisionRecord()
{} {}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
template<class Type> template<class Type>
void Foam::CollisionRecord<Type>::operator=(const CollisionRecord<Type>& rhs) void Foam::PairCollisionRecord<Type>::operator=
(
const PairCollisionRecord<Type>& rhs
)
{ {
// Check for assignment to self // Check for assignment to self
if (this == &rhs) if (this == &rhs)
{ {
FatalErrorIn FatalErrorIn
( (
"Foam::CollisionRecord<Type>::operator=" "Foam::PairCollisionRecord<Type>::operator="
"(const Foam::CollisionRecord<Type>&)" "(const Foam::PairCollisionRecord<Type>&)"
) )
<< "Attempted assignment to self" << "Attempted assignment to self"
<< abort(FatalError); << abort(FatalError);
@ -91,7 +97,7 @@ void Foam::CollisionRecord<Type>::operator=(const CollisionRecord<Type>& rhs)
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
#include "CollisionRecordIO.C" #include "PairCollisionRecordIO.C"
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::CollisionRecord Foam::PairCollisionRecord
Description Description
@ -35,14 +35,14 @@ Description
positive means that it has. positive means that it has.
SourceFiles SourceFiles
CollisionRecordI.H PairCollisionRecordI.H
CollisionRecord.C PairCollisionRecord.C
CollisionRecordIO.C PairCollisionRecordIO.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef CollisionRecord_H #ifndef PairCollisionRecord_H
#define CollisionRecord_H #define PairCollisionRecord_H
#include "label.H" #include "label.H"
#include "vector.H" #include "vector.H"
@ -54,35 +54,35 @@ namespace Foam
// Forward declaration of friend functions and operators // Forward declaration of friend functions and operators
template<class Type> template<class Type>
class CollisionRecord; class PairCollisionRecord;
template<class Type> template<class Type>
inline bool operator== inline bool operator==
( (
const CollisionRecord<Type>&, const PairCollisionRecord<Type>&,
const CollisionRecord<Type>& const PairCollisionRecord<Type>&
); );
template<class Type> template<class Type>
inline bool operator!= inline bool operator!=
( (
const CollisionRecord<Type>&, const PairCollisionRecord<Type>&,
const CollisionRecord<Type>& const PairCollisionRecord<Type>&
); );
template<class Type> template<class Type>
Istream& operator>>(Istream&, CollisionRecord<Type>&); Istream& operator>>(Istream&, PairCollisionRecord<Type>&);
template<class Type> template<class Type>
Ostream& operator<<(Ostream&, const CollisionRecord<Type>&); Ostream& operator<<(Ostream&, const PairCollisionRecord<Type>&);
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class CollisionRecord Declaration Class PairCollisionRecord Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Type> template<class Type>
class CollisionRecord class PairCollisionRecord
{ {
// Private data // Private data
@ -103,10 +103,10 @@ public:
// Constructors // Constructors
//- Construct null //- Construct null
CollisionRecord(); PairCollisionRecord();
//- Construct from components //- Construct from components
CollisionRecord PairCollisionRecord
( (
label origProcOfOther, label origProcOfOther,
label origIdOfOther, label origIdOfOther,
@ -114,14 +114,14 @@ public:
); );
//- Construct from Istream //- Construct from Istream
CollisionRecord(Istream&); PairCollisionRecord(Istream&);
//- Construct as copy //- Construct as copy
CollisionRecord(const CollisionRecord&); PairCollisionRecord(const PairCollisionRecord&);
//- Destructor //- Destructor
~CollisionRecord(); ~PairCollisionRecord();
// Member Functions // Member Functions
@ -165,21 +165,21 @@ public:
// Member Operators // Member Operators
void operator=(const CollisionRecord&); void operator=(const PairCollisionRecord&);
// Friend Operators // Friend Operators
friend bool operator== <Type> friend bool operator== <Type>
( (
const CollisionRecord<Type>&, const PairCollisionRecord<Type>&,
const CollisionRecord<Type>& const PairCollisionRecord<Type>&
); );
friend bool operator!= <Type> friend bool operator!= <Type>
( (
const CollisionRecord<Type>&, const PairCollisionRecord<Type>&,
const CollisionRecord<Type>& const PairCollisionRecord<Type>&
); );
@ -188,13 +188,13 @@ public:
friend Istream& operator>> <Type> friend Istream& operator>> <Type>
( (
Istream&, Istream&,
CollisionRecord<Type>& PairCollisionRecord<Type>&
); );
friend Ostream& operator<< <Type> friend Ostream& operator<< <Type>
( (
Ostream&, Ostream&,
const CollisionRecord<Type>& const PairCollisionRecord<Type>&
); );
}; };
@ -205,12 +205,12 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "CollisionRecordI.H" #include "PairCollisionRecordI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "CollisionRecord.C" # include "PairCollisionRecord.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type>
inline bool Foam::CollisionRecord<Type>::match inline bool Foam::PairCollisionRecord<Type>::match
( (
label queryOrigProcOfOther, label queryOrigProcOfOther,
label queryOrigIdOfOther label queryOrigIdOfOther
@ -41,14 +41,14 @@ inline bool Foam::CollisionRecord<Type>::match
template<class Type> template<class Type>
inline Foam::label Foam::CollisionRecord<Type>::origProcOfOther() const inline Foam::label Foam::PairCollisionRecord<Type>::origProcOfOther() const
{ {
return mag(origProcOfOther_) - 1; return mag(origProcOfOther_) - 1;
} }
template<class Type> template<class Type>
inline Foam::label Foam::CollisionRecord<Type>::origIdOfOther() const inline Foam::label Foam::PairCollisionRecord<Type>::origIdOfOther() const
{ {
return origIdOfOther_; return origIdOfOther_;
} }
@ -56,35 +56,35 @@ inline Foam::label Foam::CollisionRecord<Type>::origIdOfOther() const
template<class Type> template<class Type>
inline const Type& inline const Type&
Foam::CollisionRecord<Type>::collisionData() const Foam::PairCollisionRecord<Type>::collisionData() const
{ {
return data_; return data_;
} }
template<class Type> template<class Type>
inline Type& Foam::CollisionRecord<Type>::collisionData() inline Type& Foam::PairCollisionRecord<Type>::collisionData()
{ {
return data_; return data_;
} }
template<class Type> template<class Type>
inline bool Foam::CollisionRecord<Type>::accessed() const inline bool Foam::PairCollisionRecord<Type>::accessed() const
{ {
return pos(origProcOfOther_); return pos(origProcOfOther_);
} }
template<class Type> template<class Type>
inline void Foam::CollisionRecord<Type>::setAccessed() inline void Foam::PairCollisionRecord<Type>::setAccessed()
{ {
origProcOfOther_ = origProcOfOther() + 1; origProcOfOther_ = origProcOfOther() + 1;
} }
template<class Type> template<class Type>
inline void Foam::CollisionRecord<Type>::setUnaccessed() inline void Foam::PairCollisionRecord<Type>::setUnaccessed()
{ {
origProcOfOther_ = -(origProcOfOther() + 1); origProcOfOther_ = -(origProcOfOther() + 1);
} }
@ -95,8 +95,8 @@ inline void Foam::CollisionRecord<Type>::setUnaccessed()
template<class Type> template<class Type>
inline bool Foam::operator== inline bool Foam::operator==
( (
const CollisionRecord<Type>& a, const PairCollisionRecord<Type>& a,
const CollisionRecord<Type>& b const PairCollisionRecord<Type>& b
) )
{ {
return return
@ -107,11 +107,12 @@ inline bool Foam::operator==
); );
} }
template<class Type> template<class Type>
inline bool Foam::operator!= inline bool Foam::operator!=
( (
const CollisionRecord<Type>& a, const PairCollisionRecord<Type>& a,
const CollisionRecord<Type>& b const PairCollisionRecord<Type>& b
) )
{ {
return !(a == b); return !(a == b);

View File

@ -23,35 +23,38 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "CollisionRecord.H" #include "PairCollisionRecord.H"
#include "IOstreams.H" #include "IOstreams.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::CollisionRecord<Type>::CollisionRecord(Istream& is) Foam::PairCollisionRecord<Type>::PairCollisionRecord(Istream& is)
: :
origProcOfOther_(readLabel(is)), origProcOfOther_(readLabel(is)),
origIdOfOther_(readLabel(is)), origIdOfOther_(readLabel(is)),
data_(is) data_(is)
{ {
// Check state of Istream // Check state of Istream
is.check("Foam::CollisionRecord<Type>::CollisionRecord(Foam::Istream&)"); is.check
(
"Foam::PairCollisionRecord<Type>::PairCollisionRecord(Foam::Istream&)"
);
} }
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::Istream& Foam::operator>>(Istream& is, CollisionRecord<Type>& cR) Foam::Istream& Foam::operator>>(Istream& is, PairCollisionRecord<Type>& pCR)
{ {
is >> cR.origProcOfOther_ >> cR.origIdOfOther_ >> cR.data_; is >> pCR.origProcOfOther_ >> pCR.origIdOfOther_ >> pCR.data_;
// Check state of Istream // Check state of Istream
is.check is.check
( (
"Foam::Istream&" "Foam::Istream&"
"Foam::operator>>(Foam::Istream&, Foam::CollisionRecord<Type>&)" "Foam::operator>>(Foam::Istream&, Foam::PairCollisionRecord<Type>&)"
); );
return is; return is;
@ -59,17 +62,21 @@ Foam::Istream& Foam::operator>>(Istream& is, CollisionRecord<Type>& cR)
template<class Type> template<class Type>
Foam::Ostream& Foam::operator<<(Ostream& os, const CollisionRecord<Type>& cR) Foam::Ostream& Foam::operator<<
(
Ostream& os,
const PairCollisionRecord<Type>& pCR
)
{ {
os << cR.origProcOfOther_ os << pCR.origProcOfOther_
<< token::SPACE << cR.origIdOfOther_ << token::SPACE << pCR.origIdOfOther_
<< token::SPACE << cR.data_; << token::SPACE << pCR.data_;
// Check state of Ostream // Check state of Ostream
os.check os.check
( (
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, " "Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
"const Foam::CollisionRecord<Type>&)" "const Foam::PairCollisionRecord<Type>&)"
); );
return os; return os;

View File

@ -0,0 +1,102 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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 "WallCollisionRecord.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::WallCollisionRecord<Type>::WallCollisionRecord()
:
accessed_(false),
pRel_(),
data_(pTraits<Type>::zero)
{}
template<class Type>
Foam::WallCollisionRecord<Type>::WallCollisionRecord
(
const vector& pRel,
const Type& data
)
:
accessed_(true),
pRel_(pRel),
data_(data)
{}
template<class Type>
Foam::WallCollisionRecord<Type>::WallCollisionRecord
(
const WallCollisionRecord<Type>& wCR
)
:
accessed_(wCR.accessed_),
pRel_(wCR.pRel_),
data_(wCR.data_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
Foam::WallCollisionRecord<Type>::~WallCollisionRecord()
{}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
template<class Type>
void Foam::WallCollisionRecord<Type>::operator=
(
const WallCollisionRecord<Type>& rhs
)
{
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn
(
"Foam::WallCollisionRecord<Type>::operator="
"(const Foam::WallCollisionRecord<Type>&)"
)
<< "Attempted assignment to self"
<< abort(FatalError);
}
accessed_ = rhs.accessed_;
pRel_ = rhs.pRel_;
data_ = rhs.data_;
}
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
#include "WallCollisionRecordIO.C"
// ************************************************************************* //

View File

@ -0,0 +1,204 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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::WallCollisionRecord
Description
Record of a collision between the particle holding the record and
a wall face at the position relative to the centre of the particle.
SourceFiles
WallCollisionRecordI.H
WallCollisionRecord.C
WallCollisionRecordIO.C
\*---------------------------------------------------------------------------*/
#ifndef WallCollisionRecord_H
#define WallCollisionRecord_H
#include "vector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of friend functions and operators
template<class Type>
class WallCollisionRecord;
template<class Type>
inline bool operator==
(
const WallCollisionRecord<Type>&,
const WallCollisionRecord<Type>&
);
template<class Type>
inline bool operator!=
(
const WallCollisionRecord<Type>&,
const WallCollisionRecord<Type>&
);
template<class Type>
Istream& operator>>(Istream&, WallCollisionRecord<Type>&);
template<class Type>
Ostream& operator<<(Ostream&, const WallCollisionRecord<Type>&);
/*---------------------------------------------------------------------------*\
Class WallCollisionRecord Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class WallCollisionRecord
{
// Private data
// //- Recording whether or not this record has been accessed
bool accessed_;
//- The position of wall impact relative to the cell centre
vector pRel_;
//- Collision data, stored as if the storing particle was the
// first particle (particle A) in the collision.
Type data_;
public:
// Constructors
//- Construct null
WallCollisionRecord();
//- Construct from components
WallCollisionRecord
(
const vector& pRel,
const Type& data = pTraits<Type>::zero
);
//- Construct from Istream
WallCollisionRecord(Istream&);
//- Construct as copy
WallCollisionRecord(const WallCollisionRecord&);
//- Destructor
~WallCollisionRecord();
// Member Functions
// Access
//- Return the pRel data
inline const vector& pRel() const;
//- Return access to the collision data
inline const Type& collisionData() const;
//- Return access to the collision data
inline Type& collisionData();
// Check
inline bool match(const vector& pRel, scalar radius);
//- Return the accessed status of the record
inline bool accessed() const;
// Edit
//- Set the accessed property of the record to accessed
inline void setAccessed();
//- Set the accessed property of the record to unaccessed
inline void setUnaccessed();
// Member Operators
void operator=(const WallCollisionRecord&);
// Friend Operators
friend bool operator== <Type>
(
const WallCollisionRecord<Type>&,
const WallCollisionRecord<Type>&
);
friend bool operator!= <Type>
(
const WallCollisionRecord<Type>&,
const WallCollisionRecord<Type>&
);
// IOstream Operators
friend Istream& operator>> <Type>
(
Istream&,
WallCollisionRecord<Type>&
);
friend Ostream& operator<< <Type>
(
Ostream&,
const WallCollisionRecord<Type>&
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "WallCollisionRecordI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "WallCollisionRecord.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,143 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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 Type>
inline bool Foam::WallCollisionRecord<Type>::match
(
const vector& pRel,
scalar radius
)
{
scalar magpRel_= mag(pRel_);
scalar magpRel = mag(pRel);
// Using the new data as the acceptance criterion
scalar cosAcceptanceAngle = magpRel/radius;
if (cosAcceptanceAngle > 1.0)
{
Info<< "pRel_ " << pRel_ << " " << magpRel_ << nl
<< "pRel " << pRel << " " << magpRel << nl
<< "unit vector dot product " << (pRel & pRel_)/(magpRel_*magpRel)
<< nl << "cosAcceptanceAngle " << cosAcceptanceAngle
<< endl;
FatalErrorIn
(
"inline bool Foam::WallCollisionRecord<Type>::match"
"("
"const vector& pRel,"
"scalar radius"
") const"
)
<< "Problem with matching WallCollisionRecord." << nl
<< "The given radius, " << radius << ", is smaller than distance "
<< "to the relative position of the WallInteractionSite, "
<< magpRel << nl
<< abort(FatalError);
}
// Are the test and recorded pRel (relative position vectors)
// aligned to within the calculated tolerance?
bool matched = (pRel & pRel_)/(magpRel_*magpRel) > cosAcceptanceAngle;
if (matched)
{
pRel_ = pRel;
}
return matched;
}
template<class Type>
inline const Type&
Foam::WallCollisionRecord<Type>::collisionData() const
{
return data_;
}
template<class Type>
inline Type& Foam::WallCollisionRecord<Type>::collisionData()
{
return data_;
}
template<class Type>
inline bool Foam::WallCollisionRecord<Type>::accessed() const
{
return accessed_;
}
template<class Type>
inline void Foam::WallCollisionRecord<Type>::setAccessed()
{
accessed_ = true;
}
template<class Type>
inline void Foam::WallCollisionRecord<Type>::setUnaccessed()
{
accessed_ = false;
}
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
template<class Type>
inline bool Foam::operator==
(
const WallCollisionRecord<Type>& a,
const WallCollisionRecord<Type>& b
)
{
return
(
a.accessed_ == b.accessed_
&& a.pRel_ == b.pRel_
&& a.data_ == b.data_
);
}
template<class Type>
inline bool Foam::operator!=
(
const WallCollisionRecord<Type>& a,
const WallCollisionRecord<Type>& b
)
{
return !(a == b);
}
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-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 "WallCollisionRecord.H"
#include "IOstreams.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::WallCollisionRecord<Type>::WallCollisionRecord(Istream& is)
:
accessed_(is),
pRel_(is),
data_(is)
{
// Check state of Istream
is.check
(
"Foam::WallCollisionRecord<Type>::WallCollisionRecord(Foam::Istream&)"
);
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template<class Type>
Foam::Istream& Foam::operator>>(Istream& is, WallCollisionRecord<Type>& wCR)
{
is >> wCR.accessed_ >> wCR.pRel_ >> wCR.data_;
// Check state of Istream
is.check
(
"Foam::Istream&"
"Foam::operator>>(Foam::Istream&, Foam::WallCollisionRecord<Type>&)"
);
return is;
}
template<class Type>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const WallCollisionRecord<Type>& wCR
)
{
os << wCR.accessed_
<< token::SPACE << wCR.pRel_
<< token::SPACE << wCR.data_;
// Check state of Ostream
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
"const Foam::WallCollisionRecord<Type>&)"
);
return os;
}
// ************************************************************************* //

View File

@ -268,7 +268,7 @@ protected:
vector UTurb_; vector UTurb_;
//- Particle collision records //- Particle collision records
CollisionRecordList<vector> collisionRecords_; CollisionRecordList<vector, vector> collisionRecords_;
// Cell-based quantities // Cell-based quantities
@ -400,7 +400,8 @@ public:
inline const vector& UTurb() const; inline const vector& UTurb() const;
//- Return const access to the collision records //- Return const access to the collision records
inline const CollisionRecordList<vector>& collisionRecords() const; inline const CollisionRecordList<vector, vector>&
collisionRecords() const;
// Edit // Edit
@ -439,7 +440,7 @@ public:
inline vector& UTurb(); inline vector& UTurb();
//- Return access to collision records //- Return access to collision records
inline CollisionRecordList<vector>& collisionRecords(); inline CollisionRecordList<vector, vector>& collisionRecords();
// Helper functions // Helper functions

View File

@ -348,7 +348,7 @@ inline bool& Foam::KinematicParcel<ParcelType>::active()
template <class ParcelType> template <class ParcelType>
inline const Foam::CollisionRecordList<Foam::vector>& inline const Foam::CollisionRecordList<Foam::vector, Foam::vector>&
Foam::KinematicParcel<ParcelType>::collisionRecords() const Foam::KinematicParcel<ParcelType>::collisionRecords() const
{ {
return collisionRecords_; return collisionRecords_;
@ -426,7 +426,7 @@ inline Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb()
template <class ParcelType> template <class ParcelType>
inline Foam::CollisionRecordList<Foam::vector>& inline Foam::CollisionRecordList<Foam::vector, Foam::vector>&
Foam::KinematicParcel<ParcelType>::collisionRecords() Foam::KinematicParcel<ParcelType>::collisionRecords()
{ {
return collisionRecords_; return collisionRecords_;

View File

@ -61,6 +61,7 @@ Foam::particleForces::particleForces
dict_(dict.subDict("particleForces")), dict_(dict.subDict("particleForces")),
g_(g), g_(g),
gradUPtr_(NULL), gradUPtr_(NULL),
HdotGradHInterPtr_(NULL),
gravity_(dict_.lookup("gravity")), gravity_(dict_.lookup("gravity")),
virtualMass_(dict_.lookup("virtualMass")), virtualMass_(dict_.lookup("virtualMass")),
Cvm_(0.0), Cvm_(0.0),
@ -88,6 +89,7 @@ Foam::particleForces::particleForces(const particleForces& f)
dict_(f.dict_), dict_(f.dict_),
g_(f.g_), g_(f.g_),
gradUPtr_(f.gradUPtr_), gradUPtr_(f.gradUPtr_),
HdotGradHInterPtr_(f.HdotGradHInterPtr_),
gravity_(f.gravity_), gravity_(f.gravity_),
virtualMass_(f.virtualMass_), virtualMass_(f.virtualMass_),
Cvm_(f.Cvm_), Cvm_(f.Cvm_),

View File

@ -198,20 +198,20 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
scalar deltaT = this->owner().mesh().time().deltaTValue(); scalar deltaT = this->owner().mesh().time().deltaTValue();
vector& tangentialOverlap_AB = vector& tangentialOverlap_AB =
pA.collisionRecords().matchRecord pA.collisionRecords().matchPairRecord
( (
pB.origProc(), pB.origProc(),
pB.origId() pB.origId()
).collisionData(); ).collisionData();
vector& tangentialOverlap_BA = vector& tangentialOverlap_BA =
pB.collisionRecords().matchRecord pB.collisionRecords().matchPairRecord
( (
pA.origProc(), pA.origProc(),
pA.origId() pA.origId()
).collisionData(); ).collisionData();
vector deltaTangentialOverlap_AB = USlip_AB * deltaT; vector deltaTangentialOverlap_AB = USlip_AB*deltaT;
tangentialOverlap_AB += deltaTangentialOverlap_AB; tangentialOverlap_AB += deltaTangentialOverlap_AB;
tangentialOverlap_BA += -deltaTangentialOverlap_AB; tangentialOverlap_BA += -deltaTangentialOverlap_AB;

View File

@ -33,7 +33,7 @@ Description
#define PairSpringSliderDashpot_H #define PairSpringSliderDashpot_H
#include "PairModel.H" #include "PairModel.H"
#include "CollisionRecord.H" #include "CollisionRecordList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -100,11 +100,10 @@ void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall
scalar deltaT = this->owner().mesh().time().deltaTValue(); scalar deltaT = this->owner().mesh().time().deltaTValue();
// For remembering previous overlap vector& tangentialOverlap_PW =
// vector deltaTangentialOverlap_PW = USlip_PW * deltaT; p.collisionRecords().matchWallRecord(-r_PW, pREff).collisionData();
// tangentialOverlap_PW += deltaTangentialOverlap_PW;
vector tangentialOverlap_PW = USlip_PW * deltaT; tangentialOverlap_PW += USlip_PW*deltaT;
scalar tangentialOverlapMag = mag(tangentialOverlap_PW); scalar tangentialOverlapMag = mag(tangentialOverlap_PW);
@ -124,7 +123,7 @@ void Foam::WallSpringSliderDashpot<CloudType>::evaluateWall
fT_PW = -mu_*mag(fN_PW)*USlip_PW/mag(USlip_PW); fT_PW = -mu_*mag(fN_PW)*USlip_PW/mag(USlip_PW);
// tangentialOverlap_PW = vector::zero; tangentialOverlap_PW = vector::zero;
} }
else else
{ {

View File

@ -330,11 +330,11 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
Info<< patch().boundaryMesh().mesh().name() << ':' Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':' << patch().name() << ':'
<< this->dimensionedInternalField().name() << " -> " << this->dimensionedInternalField().name() << " <- "
<< nbrMesh.name() << ':' << nbrMesh.name() << ':'
<< nbrPatch.name() << ':' << nbrPatch.name() << ':'
<< this->dimensionedInternalField().name() << " :" << this->dimensionedInternalField().name() << " :"
<< " heatFlux:" << Q << " heat[W]:" << Q
<< " walltemperature " << " walltemperature "
<< " min:" << gMin(*this) << " min:" << gMin(*this)
<< " max:" << gMax(*this) << " max:" << gMax(*this)

View File

@ -198,7 +198,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
// Get the coupling information from the directMappedPatchBase // Get the coupling information from the directMappedPatchBase
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase> const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
( (
this->patch().patch() patch().patch()
); );
const polyMesh& nbrMesh = mpp.sampleMesh(); const polyMesh& nbrMesh = mpp.sampleMesh();
const fvPatch& nbrPatch = refCast<const fvMesh> const fvPatch& nbrPatch = refCast<const fvMesh>
@ -285,11 +285,11 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
Info<< patch().boundaryMesh().mesh().name() << ':' Info<< patch().boundaryMesh().mesh().name() << ':'
<< patch().name() << ':' << patch().name() << ':'
<< this->dimensionedInternalField().name() << " -> " << this->dimensionedInternalField().name() << " <- "
<< nbrMesh.name() << ':' << nbrMesh.name() << ':'
<< nbrPatch.name() << ':' << nbrPatch.name() << ':'
<< this->dimensionedInternalField().name() << " :" << this->dimensionedInternalField().name() << " :"
<< " heatFlux:" << Q << " heat[W]:" << Q
<< " walltemperature " << " walltemperature "
<< " min:" << gMin(*this) << " min:" << gMin(*this)
<< " max:" << gMax(*this) << " max:" << gMax(*this)

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object boundaryT; object boundaryT;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0]; dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volVectorField; class volVectorField;
location "0";
object boundaryU; object boundaryU;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0]; dimensions [ 0 1 -1 0 0 0 0 ];
internalField uniform (0 0 0); internalField uniform ( 0 0 0 );
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object dsmcRhoN; object dsmcRhoN;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -3 0 0 0 0 0]; dimensions [ 0 -3 0 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volVectorField; class volVectorField;
location "0";
object fD; object fD;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0]; dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform (0 0 0); internalField uniform ( 0 0 0 );
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object iDof; object iDof;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -3 0 0 0 0 0]; dimensions [ 0 -3 0 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object internalE; object internalE;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0]; dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object linearKE; object linearKE;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0]; dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volVectorField; class volVectorField;
location "0";
object momentum; object momentum;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -2 -1 0 0 0 0]; dimensions [ 1 -2 -1 0 0 0 0 ];
internalField uniform (0 0 0); internalField uniform ( 0 0 0 );
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object q; object q;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0]; dimensions [ 1 0 -3 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object rhoM; object rhoM;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0]; dimensions [ 1 -3 0 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -1,8 +1,8 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
FoamFile FoamFile
@ -10,30 +10,42 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object rhoN; object rhoN;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -3 0 0 0 0 0]; dimensions [ 0 -3 0 0 0 0 0 ];
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
{ {
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
} }
yPeriodic_half0
yPeriodic
{ {
type cyclic; type cyclic;
} }
zPeriodic_half0
zPeriodic {
type cyclic;
}
yPeriodic_half1
{
type cyclic;
}
zPeriodic_half1
{
type cyclic;
}
xPeriodic_half1
{ {
type cyclic; type cyclic;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -27,7 +27,6 @@ nEquivalentParticles 1e12;
WallInteractionModel SpecularReflection; WallInteractionModel SpecularReflection;
SpecularReflectionCoeffs {}
// Binary Collision Model // Binary Collision Model
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
@ -43,9 +42,8 @@ LarsenBorgnakkeVariableHardSphereCoeffs
// Inflow Boundary Model // Inflow Boundary Model
// ~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~
InflowBoundaryModel NoInflow; InflowBoundaryModel none;
NoInflowCoeffs {}
// Molecular species // Molecular species
// ~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -15,28 +15,49 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
3 6
( (
xPeriodic xPeriodic_half0
{ {
type cyclic; type cyclic;
nFaces 512; nFaces 256;
startFace 14464; startFace 14464;
featureCos 0.9; neighbourPatch xPeriodic_half1;
} }
yPeriodic xPeriodic_half1
{ {
type cyclic; type cyclic;
nFaces 640; nFaces 256;
startFace 14720;
neighbourPatch xPeriodic_half0;
}
yPeriodic_half0
{
type cyclic;
nFaces 320;
startFace 14976; startFace 14976;
featureCos 0.9; neighbourPatch yPeriodic_half1;
} }
zPeriodic yPeriodic_half1
{ {
type cyclic; type cyclic;
nFaces 640; nFaces 320;
startFace 15296;
neighbourPatch yPeriodic_half0;
}
zPeriodic_half0
{
type cyclic;
nFaces 320;
startFace 15616; startFace 15616;
featureCos 0.9; neighbourPatch zPeriodic_half1;
}
zPeriodic_half1
{
type cyclic;
nFaces 320;
startFace 15936;
neighbourPatch zPeriodic_half0;
} }
) )

View File

@ -1,42 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class surfaceScalarField;
location "0";
object interpolaterhoN;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 -3 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
outlet
{
type calculated;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
sides
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -27,8 +27,6 @@ nEquivalentParticles 1e12;
WallInteractionModel MaxwellianThermal; WallInteractionModel MaxwellianThermal;
MaxwellianThermalCoeffs {}
// Binary Collision Model // Binary Collision Model
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -25,39 +25,24 @@ nEquivalentParticles 1.2e12;
// Wall Interaction Model // Wall Interaction Model
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
//WallInteractionModel SpecularReflection;
WallInteractionModel MaxwellianThermal; WallInteractionModel MaxwellianThermal;
SpecularReflectionCoeffs {}
MaxwellianThermalCoeffs {}
// Binary Collision Model // Binary Collision Model
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
//BinaryCollisionModel VariableHardSphere; BinaryCollisionModel VariableHardSphere;
BinaryCollisionModel LarsenBorgnakkeVariableHardSphere;
VariableHardSphereCoeffs VariableHardSphereCoeffs
{ {
Tref 273; Tref 273;
} }
LarsenBorgnakkeVariableHardSphereCoeffs
{
Tref 273;
relaxationCollisionNumber 5.0;
}
// Inflow Boundary Model // Inflow Boundary Model
// ~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~
InflowBoundaryModel FreeStream; InflowBoundaryModel FreeStream;
//InflowBoundaryModel NoInflow;
NoInflowCoeffs {}
FreeStreamCoeffs FreeStreamCoeffs
{ {

View File

@ -32,9 +32,9 @@ boundaryField
value uniform 550; value uniform 550;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -32,9 +32,9 @@ boundaryField
value uniform (0 0 0); value uniform (0 0 0);
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -30,9 +30,9 @@ boundaryField
type zeroGradient; type zeroGradient;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform (0 0 0); value uniform (0 0 0);
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform (0 0 0); value uniform (0 0 0);
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -31,9 +31,9 @@ boundaryField
value uniform 0; value uniform 0;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
} }
} }

View File

@ -27,8 +27,6 @@ nEquivalentParticles 5e12;
WallInteractionModel MaxwellianThermal; WallInteractionModel MaxwellianThermal;
MaxwellianThermalCoeffs {}
// Binary Collision Model // Binary Collision Model
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~
@ -47,8 +45,6 @@ LarsenBorgnakkeVariableHardSphereCoeffs
InflowBoundaryModel FreeStream; InflowBoundaryModel FreeStream;
NoInflowCoeffs {}
FreeStreamCoeffs FreeStreamCoeffs
{ {
numberDensities numberDensities

View File

@ -18,26 +18,26 @@ convertToMeters 1;
vertices vertices
( (
(-0.15242 0 -0.05) (-0.15242 0 -0.0042)
( 0 0 -0.05) ( 0 0 -0.0042)
( 0.3048 0.081670913853 -0.05) ( 0.3048 0.081670913853 -0.0042)
(-0.15242 0.3 -0.05) (-0.15242 0.3 -0.0042)
( 0 0.3 -0.05) ( 0 0.3 -0.0042)
( 0.3048 0.3 -0.05) ( 0.3048 0.3 -0.0042)
(-0.15242 0 0.05) (-0.15242 0 0.0042)
( 0 0 0.05) ( 0 0 0.0042)
( 0.3048 0.081670913853 0.05) ( 0.3048 0.081670913853 0.0042)
(-0.15242 0.3 0.05) (-0.15242 0.3 0.0042)
( 0 0.3 0.05) ( 0 0.3 0.0042)
( 0.3048 0.3 0.05) ( 0.3048 0.3 0.0042)
); );
blocks blocks
( (
hex (0 1 4 3 6 7 10 9 ) (20 40 12) simpleGrading (1 1 1) hex (0 1 4 3 6 7 10 9 ) (20 40 1) simpleGrading (1 1 1)
hex (1 2 5 4 7 8 11 10) (40 40 12) simpleGrading (1 1 1) hex (1 2 5 4 7 8 11 10) (40 40 1) simpleGrading (1 1 1)
); );
edges edges
@ -58,7 +58,7 @@ patches
( (
(1 2 8 7) (1 2 8 7)
) )
cyclic periodic empty frontAndBack
( (
(0 3 4 1) (0 3 4 1)
(1 4 5 2) (1 4 5 2)

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -20,21 +20,20 @@ FoamFile
flow flow
{ {
type patch; type patch;
nFaces 1920; nFaces 160;
startFace 82800; startFace 4700;
} }
obstacle obstacle
{ {
type wall; type wall;
nFaces 480; nFaces 40;
startFace 84720; startFace 4860;
} }
periodic frontAndBack
{ {
type cyclic; type empty;
nFaces 4800; nFaces 4800;
startFace 85200; startFace 4900;
featureCos 0.9;
} }
) )

View File

@ -23,14 +23,13 @@ startTime 0;
stopAt endTime; stopAt endTime;
endTime 0.00125; endTime 0.02;
// endTime 0.01;
deltaT 2e-6; deltaT 2e-6;
writeControl runTime; writeControl runTime;
writeInterval 1e-4; writeInterval 1e-3;
purgeWrite 0; purgeWrite 0;

View File

@ -21,7 +21,7 @@ method simple;
simpleCoeffs simpleCoeffs
{ {
n ( 1 1 4 ); n ( 2 2 1 );
delta 0.001; delta 0.001;
} }

View File

@ -15,28 +15,49 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
3 6
( (
periodicX periodicX_half0
{ {
type cyclic; type cyclic;
nFaces 288; nFaces 144;
startFace 4752; startFace 4752;
featureCos 0.9; neighbourPatch periodicX_half1;
} }
periodicY periodicX_half1
{ {
type cyclic; type cyclic;
nFaces 288; nFaces 144;
startFace 4896;
neighbourPatch periodicX_half0;
}
periodicY_half0
{
type cyclic;
nFaces 144;
startFace 5040; startFace 5040;
featureCos 0.9; neighbourPatch periodicY_half1;
} }
periodicZ periodicY_half1
{ {
type cyclic; type cyclic;
nFaces 288; nFaces 144;
startFace 5184;
neighbourPatch periodicY_half0;
}
periodicZ_half0
{
type cyclic;
nFaces 144;
startFace 5328; startFace 5328;
featureCos 0.9; neighbourPatch periodicZ_half1;
}
periodicZ_half1
{
type cyclic;
nFaces 144;
startFace 5472;
neighbourPatch periodicZ_half0;
} }
) )

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 | | \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org | | \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -15,28 +15,49 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
3 6
( (
periodicX periodicX_half0
{ {
type cyclic; type cyclic;
nFaces 264; nFaces 132;
startFace 4344; startFace 4344;
featureCos 0.9; neighbourPatch periodicX_half1;
} }
periodicY periodicX_half1
{ {
type cyclic; type cyclic;
nFaces 264; nFaces 132;
startFace 4476;
neighbourPatch periodicX_half0;
}
periodicY_half0
{
type cyclic;
nFaces 132;
startFace 4608; startFace 4608;
featureCos 0.9; neighbourPatch periodicY_half1;
} }
periodicZ periodicY_half1
{ {
type cyclic; type cyclic;
nFaces 288; nFaces 132;
startFace 4740;
neighbourPatch periodicY_half0;
}
periodicZ_half0
{
type cyclic;
nFaces 144;
startFace 4872; startFace 4872;
featureCos 0.9; neighbourPatch periodicZ_half1;
}
periodicZ_half1
{
type cyclic;
nFaces 144;
startFace 5016;
neighbourPatch periodicZ_half0;
} }
) )