ENH: Re-worked lagrangian/dsmc

This commit is contained in:
andy
2011-02-24 16:44:18 +00:00
parent 4fbde9089d
commit f5da7edfe4
14 changed files with 144 additions and 241 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -501,7 +501,7 @@ void Foam::DsmcCloud<ParcelType>::addNewParcel
{ {
ParcelType* pPtr = new ParcelType ParcelType* pPtr = new ParcelType
( (
*this, mesh_,
position, position,
U, U,
Ei, Ei,
@ -970,7 +970,7 @@ Foam::DsmcCloud<ParcelType>::~DsmcCloud()
template<class ParcelType> template<class ParcelType>
void Foam::DsmcCloud<ParcelType>::evolve() void Foam::DsmcCloud<ParcelType>::evolve()
{ {
typename ParcelType::trackData td(*this); typename ParcelType::trackingData td(*this);
// Reset the data collection fields // Reset the data collection fields
resetFields(); resetFields();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,13 +30,10 @@ License
template<class ParcelType> template<class ParcelType>
template<class TrackData> template<class TrackData>
bool Foam::DsmcParcel<ParcelType>::move bool Foam::DsmcParcel<ParcelType>::move(TrackData& td, const scalar trackTime)
(
TrackData& td,
const scalar trackTime
)
{ {
ParcelType& p = static_cast<ParcelType&>(*this); typename TrackData::cloudType::parcelType& p =
static_cast<typename TrackData::cloudType::parcelType&>(*this);
td.switchProcessor = false; td.switchProcessor = false;
td.keepParticle = true; td.keepParticle = true;
@ -113,15 +110,6 @@ void Foam::DsmcParcel<ParcelType>::hitProcessorPatch
} }
template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::hitProcessorPatch
(
const processorPolyPatch&,
int&
)
{}
template<class ParcelType> template<class ParcelType>
template<class TrackData> template<class TrackData>
void Foam::DsmcParcel<ParcelType>::hitWallPatch void Foam::DsmcParcel<ParcelType>::hitWallPatch
@ -174,7 +162,7 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
td.cloud().wallInteraction().correct td.cloud().wallInteraction().correct
( (
static_cast<ParcelType&>(*this), static_cast<DsmcParcel<ParcelType> &>(*this),
wpp wpp
); );
@ -215,44 +203,18 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
} }
template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::hitWallPatch
(
const wallPolyPatch&,
int&,
const tetIndices&
)
{}
template<class ParcelType> template<class ParcelType>
template<class TrackData> template<class TrackData>
void Foam::DsmcParcel<ParcelType>::hitPatch void Foam::DsmcParcel<ParcelType>::hitPatch(const polyPatch&, TrackData& td)
(
const polyPatch&,
TrackData& td
)
{ {
td.keepParticle = false; td.keepParticle = false;
} }
template<class ParcelType> template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::hitPatch void Foam::DsmcParcel<ParcelType>::transformProperties(const tensor& T)
(
const polyPatch&,
int&
)
{}
template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::transformProperties
(
const tensor& T
)
{ {
Particle<ParcelType>::transformProperties(T); ParcelType::transformProperties(T);
U_ = transform(T, U_); U_ = transform(T, U_);
} }
@ -263,7 +225,7 @@ void Foam::DsmcParcel<ParcelType>::transformProperties
const vector& separation const vector& separation
) )
{ {
Particle<ParcelType>::transformProperties(separation); ParcelType::transformProperties(separation);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#ifndef DsmcParcel_H #ifndef DsmcParcel_H
#define DsmcParcel_H #define DsmcParcel_H
#include "Particle.H" #include "particle.H"
#include "IOstream.H" #include "IOstream.H"
#include "autoPtr.H" #include "autoPtr.H"
#include "contiguous.H" #include "contiguous.H"
@ -68,7 +68,7 @@ Ostream& operator<<
template<class ParcelType> template<class ParcelType>
class DsmcParcel class DsmcParcel
: :
public Particle<ParcelType> public ParcelType
{ {
public: public:
@ -123,31 +123,22 @@ public:
//- Class used to pass kinematic tracking data to the trackToFace function //- Class used to pass kinematic tracking data to the trackToFace function
class trackData class trackingData
: :
public Particle<ParcelType>::trackData public particle::TrackingData<DsmcCloud<DsmcParcel<ParcelType> > >
{ {
// Private data
//- Reference to the cloud containing this particle
DsmcCloud<ParcelType>& cloud_;
public: public:
// Constructors // Constructors
//- Construct from components //- Construct from components
inline trackData trackingData(DsmcCloud<DsmcParcel<ParcelType> >& cloud)
( :
DsmcCloud<ParcelType>& cloud particle::TrackingData<DsmcCloud<DsmcParcel<ParcelType> > >
); (
cloud
)
// Member functions {}
//- Return access to the owner cloud
inline DsmcCloud<ParcelType>& cloud();
}; };
@ -181,7 +172,7 @@ public:
//- Construct from components //- Construct from components
inline DsmcParcel inline DsmcParcel
( (
DsmcCloud<ParcelType>& owner, const polyMesh& mesh,
const vector& position, const vector& position,
const vector& U, const vector& U,
const scalar Ei, const scalar Ei,
@ -194,21 +185,41 @@ public:
//- Construct from Istream //- Construct from Istream
DsmcParcel DsmcParcel
( (
const Cloud<ParcelType>& c, const polyMesh& mesh,
Istream& is, Istream& is,
bool readFields = true bool readFields = true
); );
//- Construct and return a clone //- Construct and return a clone
virtual autoPtr<Particle<ParcelType> > clone() const virtual autoPtr<particle> clone() const
{ {
return autoPtr<Particle<ParcelType> > return autoPtr<particle>(new DsmcParcel<ParcelType>(*this));
(
new DsmcParcel<ParcelType>(*this)
);
} }
//- Factory class to read-construct particles used for
// parallel transfer
class iNew
{
const polyMesh& mesh_;
public:
iNew(const polyMesh& mesh)
:
mesh_(mesh)
{}
autoPtr<DsmcParcel<ParcelType> > operator()(Istream& is) const
{
return autoPtr<DsmcParcel<ParcelType> >
(
new DsmcParcel<ParcelType>(mesh_, is, true)
);
}
};
// Member Functions // Member Functions
// Access // Access
@ -263,14 +274,6 @@ public:
TrackData& td TrackData& td
); );
//- Overridable function to handle the particle hitting a
// processorPatch without trackData
void hitProcessorPatch
(
const processorPolyPatch&,
int&
);
//- Overridable function to handle the particle hitting a wallPatch //- Overridable function to handle the particle hitting a wallPatch
template<class TrackData> template<class TrackData>
void hitWallPatch void hitWallPatch
@ -280,15 +283,6 @@ public:
const tetIndices& const tetIndices&
); );
//- Overridable function to handle the particle hitting a wallPatch
// without trackData
void hitWallPatch
(
const wallPolyPatch&,
int&,
const tetIndices&
);
//- Overridable function to handle the particle hitting a polyPatch //- Overridable function to handle the particle hitting a polyPatch
template<class TrackData> template<class TrackData>
void hitPatch void hitPatch
@ -297,14 +291,6 @@ public:
TrackData& td TrackData& td
); );
//- Overridable function to handle the particle hitting a polyPatch
//- without trackData
void hitPatch
(
const polyPatch&,
int&
);
//- Transform the physical properties of the particle //- Transform the physical properties of the particle
// according to the given transformation tensor // according to the given transformation tensor
void transformProperties(const tensor& T); void transformProperties(const tensor& T);
@ -316,9 +302,9 @@ public:
// I-O // I-O
static void readFields(Cloud<ParcelType>& c); static void readFields(Cloud<DsmcParcel<ParcelType> >& c);
static void writeFields(const Cloud<ParcelType>& c); static void writeFields(const Cloud<DsmcParcel<ParcelType> >& c);
// Ostream Operator // Ostream Operator

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,7 +27,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class ParcelType> template<class ParcelType>
inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties() inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
: :
mass_(0), mass_(0),
@ -35,7 +35,7 @@ inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
{} {}
template <class ParcelType> template<class ParcelType>
inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
( (
const dictionary& dict const dictionary& dict
@ -51,21 +51,10 @@ inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
{} {}
template <class ParcelType> template<class ParcelType>
inline Foam::DsmcParcel<ParcelType>::trackData::trackData
(
DsmcCloud<ParcelType>& cloud
)
:
Particle<ParcelType>::trackData(cloud),
cloud_(cloud)
{}
template <class ParcelType>
inline Foam::DsmcParcel<ParcelType>::DsmcParcel inline Foam::DsmcParcel<ParcelType>::DsmcParcel
( (
DsmcCloud<ParcelType>& owner, const polyMesh& mesh,
const vector& position, const vector& position,
const vector& U, const vector& U,
const scalar Ei, const scalar Ei,
@ -75,7 +64,7 @@ inline Foam::DsmcParcel<ParcelType>::DsmcParcel
const label typeId const label typeId
) )
: :
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI), ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
U_(U), U_(U),
Ei_(Ei), Ei_(Ei),
typeId_(typeId) typeId_(typeId)
@ -84,7 +73,7 @@ inline Foam::DsmcParcel<ParcelType>::DsmcParcel
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * // // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template <class ParcelType> template<class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::DsmcParcel<ParcelType>::constantProperties::mass() const Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
{ {
@ -92,15 +81,14 @@ Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar inline Foam::scalar Foam::DsmcParcel<ParcelType>::constantProperties::d() const
Foam::DsmcParcel<ParcelType>::constantProperties::d() const
{ {
return d_; return d_;
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
{ {
@ -108,7 +96,7 @@ Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom() Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom()
const const
@ -117,7 +105,7 @@ const
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar inline Foam::scalar
Foam::DsmcParcel<ParcelType>::constantProperties::omega() const Foam::DsmcParcel<ParcelType>::constantProperties::omega() const
{ {
@ -125,47 +113,37 @@ Foam::DsmcParcel<ParcelType>::constantProperties::omega() const
} }
// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
template <class ParcelType>
inline Foam::DsmcCloud<ParcelType>&
Foam::DsmcParcel<ParcelType>::trackData::cloud()
{
return cloud_;
}
// * * * * * * * * * * DsmcParcel Member Functions * * * * * * * * * * // // * * * * * * * * * * DsmcParcel Member Functions * * * * * * * * * * //
template <class ParcelType> template<class ParcelType>
inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const
{ {
return typeId_; return typeId_;
} }
template <class ParcelType> template<class ParcelType>
inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const
{ {
return U_; return U_;
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const
{ {
return Ei_; return Ei_;
} }
template <class ParcelType> template<class ParcelType>
inline Foam::vector& Foam::DsmcParcel<ParcelType>::U() inline Foam::vector& Foam::DsmcParcel<ParcelType>::U()
{ {
return U_; return U_;
} }
template <class ParcelType> template<class ParcelType>
inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei() inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei()
{ {
return Ei_; return Ei_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,12 +33,12 @@ License
template <class ParcelType> template <class ParcelType>
Foam::DsmcParcel<ParcelType>::DsmcParcel Foam::DsmcParcel<ParcelType>::DsmcParcel
( (
const Cloud<ParcelType>& cloud, const polyMesh& mesh,
Istream& is, Istream& is,
bool readFields bool readFields
) )
: :
Particle<ParcelType>(cloud, is, readFields), ParcelType(mesh, is, readFields),
U_(vector::zero), U_(vector::zero),
Ei_(0.0), Ei_(0.0),
typeId_(-1) typeId_(-1)
@ -73,14 +73,14 @@ Foam::DsmcParcel<ParcelType>::DsmcParcel
template<class ParcelType> template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c) void Foam::DsmcParcel<ParcelType>::readFields(Cloud<DsmcParcel<ParcelType> >& c)
{ {
if (!c.size()) if (!c.size())
{ {
return; return;
} }
Particle<ParcelType>::readFields(c); ParcelType::readFields(c);
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ)); IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U); c.checkFieldIOobject(c, U);
@ -92,9 +92,9 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
c.checkFieldIOobject(c, typeId); c.checkFieldIOobject(c, typeId);
label i = 0; label i = 0;
forAllIter(typename Cloud<ParcelType>, c, iter) forAllIter(typename Cloud<DsmcParcel<ParcelType> >, c, iter)
{ {
ParcelType& p = iter(); DsmcParcel<ParcelType>& p = iter();
p.U_ = U[i]; p.U_ = U[i];
p.Ei_ = Ei[i]; p.Ei_ = Ei[i];
@ -105,9 +105,12 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
template<class ParcelType> template<class ParcelType>
void Foam::DsmcParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c) void Foam::DsmcParcel<ParcelType>::writeFields
(
const Cloud<DsmcParcel<ParcelType> >& c
)
{ {
Particle<ParcelType>::writeFields(c); ParcelType::writeFields(c);
label np = c.size(); label np = c.size();
@ -116,7 +119,7 @@ void Foam::DsmcParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np); IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
label i = 0; label i = 0;
forAllConstIter(typename Cloud<ParcelType>, c, iter) forAllConstIter(typename Cloud<DsmcParcel<ParcelType> >, c, iter)
{ {
const DsmcParcel<ParcelType>& p = iter(); const DsmcParcel<ParcelType>& p = iter();
@ -143,14 +146,14 @@ Foam::Ostream& Foam::operator<<
{ {
if (os.format() == IOstream::ASCII) if (os.format() == IOstream::ASCII)
{ {
os << static_cast<const Particle<ParcelType>& >(p) os << static_cast<const ParcelType& >(p)
<< token::SPACE << p.U() << token::SPACE << p.U()
<< token::SPACE << p.Ei() << token::SPACE << p.Ei()
<< token::SPACE << p.typeId(); << token::SPACE << p.typeId();
} }
else else
{ {
os << static_cast<const Particle<ParcelType>& >(p); os << static_cast<const ParcelType& >(p);
os.write os.write
( (
reinterpret_cast<const char*>(&p.U_), reinterpret_cast<const char*>(&p.U_),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,13 +24,13 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "dsmcParcel.H" #include "dsmcParcel.H"
#include "DsmcParcel.H"
#include "DsmcCloud.H" #include "DsmcCloud.H"
namespace Foam namespace Foam
{ {
defineTemplateTypeNameAndDebug(DsmcParcel<particle>, 0);
defineTemplateTypeNameAndDebug(Cloud<dsmcParcel>, 0); defineTemplateTypeNameAndDebug(Cloud<dsmcParcel>, 0);
defineParcelTypeNameAndDebug(DsmcCloud<dsmcParcel>, 0);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,14 +24,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "dsmcParcel.H" #include "dsmcParcel.H"
/*
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(dsmcParcel, 0); // defineTypeNameAndDebug(dsmcParcel, 0);
defineParticleTypeNameAndDebug(dsmcParcel, 0); // defineParticleTypeNameAndDebug(dsmcParcel, 0);
defineParcelTypeNameAndDebug(dsmcParcel, 0); // defineParcelTypeNameAndDebug(dsmcParcel, 0);
} }
@ -39,7 +39,7 @@ namespace Foam
Foam::dsmcParcel::dsmcParcel Foam::dsmcParcel::dsmcParcel
( (
DsmcCloud<dsmcParcel>& owner, c& owner,
const vector& position, const vector& position,
const vector& U, const vector& U,
const scalar Ei, const scalar Ei,
@ -78,6 +78,6 @@ Foam::dsmcParcel::dsmcParcel
Foam::dsmcParcel::~dsmcParcel() Foam::dsmcParcel::~dsmcParcel()
{} {}
*/
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,7 +25,7 @@ Class
Foam::dsmcParcel Foam::dsmcParcel
Description Description
Declaration of dsmc parcel type
SourceFiles SourceFiles
dsmcParcel.C dsmcParcel.C
@ -35,6 +35,7 @@ SourceFiles
#ifndef dsmcParcel_H #ifndef dsmcParcel_H
#define dsmcParcel_H #define dsmcParcel_H
#include "particle.H"
#include "DsmcParcel.H" #include "DsmcParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -42,10 +43,11 @@ SourceFiles
namespace Foam namespace Foam
{ {
typedef DsmcParcel<particle> dsmcParcel;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class dsmcParcel Declaration Class dsmcParcel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
/*
class dsmcParcel class dsmcParcel
: :
public DsmcParcel<dsmcParcel> public DsmcParcel<dsmcParcel>
@ -100,7 +102,7 @@ inline bool contiguous<dsmcParcel>()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
*/
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,29 +29,18 @@ License
#include "VariableHardSphere.H" #include "VariableHardSphere.H"
#include "LarsenBorgnakkeVariableHardSphere.H" #include "LarsenBorgnakkeVariableHardSphere.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef DsmcCloud<dsmcParcel> CloudType;
makeBinaryCollisionModel(DsmcCloud<dsmcParcel>); makeBinaryCollisionModel(DsmcCloud<dsmcParcel>);
// Add instances of collision model to the table // Add instances of collision model to the table
makeBinaryCollisionModelType makeBinaryCollisionModelType(NoBinaryCollision, CloudType);
( makeBinaryCollisionModelType(VariableHardSphere, CloudType);
NoBinaryCollision, makeBinaryCollisionModelType(LarsenBorgnakkeVariableHardSphere, CloudType);
DsmcCloud,
dsmcParcel
);
makeBinaryCollisionModelType
(
VariableHardSphere,
DsmcCloud,
dsmcParcel
);
makeBinaryCollisionModelType
(
LarsenBorgnakkeVariableHardSphere,
DsmcCloud,
dsmcParcel
);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,23 +28,17 @@ License
#include "FreeStream.H" #include "FreeStream.H"
#include "NoInflow.H" #include "NoInflow.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
makeInflowBoundaryModel(DsmcCloud<dsmcParcel>); typedef DsmcCloud<dsmcParcel> CloudType;
makeInflowBoundaryModel(CloudType);
// Add instances of inflow boundary model to the table // Add instances of inflow boundary model to the table
makeInflowBoundaryModelType makeInflowBoundaryModelType(FreeStream, CloudType);
( makeInflowBoundaryModelType(NoInflow, CloudType);
FreeStream,
DsmcCloud,
dsmcParcel
);
makeInflowBoundaryModelType
(
NoInflow,
DsmcCloud,
dsmcParcel
);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,29 +29,18 @@ License
#include "SpecularReflection.H" #include "SpecularReflection.H"
#include "MixedDiffuseSpecular.H" #include "MixedDiffuseSpecular.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
makeWallInteractionModel(DsmcCloud<dsmcParcel>); typedef DsmcCloud<dsmcParcel> CloudType;
makeWallInteractionModel(CloudType);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makeWallInteractionModelType(MaxwellianThermal, CloudType);
( makeWallInteractionModelType(SpecularReflection, CloudType);
MaxwellianThermal, makeWallInteractionModelType(MixedDiffuseSpecular, CloudType);
DsmcCloud,
dsmcParcel
);
makeWallInteractionModelType
(
SpecularReflection,
DsmcCloud,
dsmcParcel
);
makeWallInteractionModelType
(
MixedDiffuseSpecular,
DsmcCloud,
dsmcParcel
);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -166,13 +166,13 @@ public:
); );
#define makeBinaryCollisionModelType(SS, CloudType, ParcelType) \ #define makeBinaryCollisionModelType(SS, CloudType) \
\ \
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
\ \
BinaryCollisionModel<CloudType<ParcelType> >:: \ BinaryCollisionModel<CloudType>:: \
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ adddictionaryConstructorToTable<SS<CloudType> > \
add##SS##CloudType##ParcelType##ConstructorToTable_; add##SS##CloudType##ConstructorToTable_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -146,13 +146,13 @@ public:
); );
#define makeInflowBoundaryModelType(SS, CloudType, ParcelType) \ #define makeInflowBoundaryModelType(SS, CloudType) \
\ \
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
\ \
InflowBoundaryModel<CloudType<ParcelType> >:: \ InflowBoundaryModel<CloudType>:: \
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ adddictionaryConstructorToTable<SS<CloudType> > \
add##SS##CloudType##ParcelType##ConstructorToTable_; add##SS##CloudType##ConstructorToTable_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -152,13 +152,13 @@ public:
); );
#define makeWallInteractionModelType(SS, CloudType, ParcelType) \ #define makeWallInteractionModelType(SS, CloudType) \
\ \
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
\ \
WallInteractionModel<CloudType<ParcelType> >:: \ WallInteractionModel<CloudType>:: \
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ adddictionaryConstructorToTable<SS<CloudType> > \
add##SS##CloudType##ParcelType##ConstructorToTable_; add##SS##CloudType##ConstructorToTable_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //