mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Re-worked lagrangian/dsmc
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -501,7 +501,7 @@ void Foam::DsmcCloud<ParcelType>::addNewParcel
|
||||
{
|
||||
ParcelType* pPtr = new ParcelType
|
||||
(
|
||||
*this,
|
||||
mesh_,
|
||||
position,
|
||||
U,
|
||||
Ei,
|
||||
@ -970,7 +970,7 @@ Foam::DsmcCloud<ParcelType>::~DsmcCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::DsmcCloud<ParcelType>::evolve()
|
||||
{
|
||||
typename ParcelType::trackData td(*this);
|
||||
typename ParcelType::trackingData td(*this);
|
||||
|
||||
// Reset the data collection fields
|
||||
resetFields();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,13 +30,10 @@ License
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackData>
|
||||
bool Foam::DsmcParcel<ParcelType>::move
|
||||
(
|
||||
TrackData& td,
|
||||
const scalar trackTime
|
||||
)
|
||||
bool Foam::DsmcParcel<ParcelType>::move(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.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 TrackData>
|
||||
void Foam::DsmcParcel<ParcelType>::hitWallPatch
|
||||
@ -174,7 +162,7 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
|
||||
|
||||
td.cloud().wallInteraction().correct
|
||||
(
|
||||
static_cast<ParcelType&>(*this),
|
||||
static_cast<DsmcParcel<ParcelType> &>(*this),
|
||||
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 TrackData>
|
||||
void Foam::DsmcParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
TrackData& td
|
||||
)
|
||||
void Foam::DsmcParcel<ParcelType>::hitPatch(const polyPatch&, TrackData& td)
|
||||
{
|
||||
td.keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::DsmcParcel<ParcelType>::hitPatch
|
||||
(
|
||||
const polyPatch&,
|
||||
int&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::DsmcParcel<ParcelType>::transformProperties
|
||||
(
|
||||
const tensor& T
|
||||
)
|
||||
void Foam::DsmcParcel<ParcelType>::transformProperties(const tensor& T)
|
||||
{
|
||||
Particle<ParcelType>::transformProperties(T);
|
||||
ParcelType::transformProperties(T);
|
||||
U_ = transform(T, U_);
|
||||
}
|
||||
|
||||
@ -263,7 +225,7 @@ void Foam::DsmcParcel<ParcelType>::transformProperties
|
||||
const vector& separation
|
||||
)
|
||||
{
|
||||
Particle<ParcelType>::transformProperties(separation);
|
||||
ParcelType::transformProperties(separation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,7 +37,7 @@ SourceFiles
|
||||
#ifndef DsmcParcel_H
|
||||
#define DsmcParcel_H
|
||||
|
||||
#include "Particle.H"
|
||||
#include "particle.H"
|
||||
#include "IOstream.H"
|
||||
#include "autoPtr.H"
|
||||
#include "contiguous.H"
|
||||
@ -68,7 +68,7 @@ Ostream& operator<<
|
||||
template<class ParcelType>
|
||||
class DsmcParcel
|
||||
:
|
||||
public Particle<ParcelType>
|
||||
public ParcelType
|
||||
{
|
||||
public:
|
||||
|
||||
@ -123,31 +123,22 @@ public:
|
||||
|
||||
|
||||
//- 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:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline trackData
|
||||
(
|
||||
DsmcCloud<ParcelType>& cloud
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return access to the owner cloud
|
||||
inline DsmcCloud<ParcelType>& cloud();
|
||||
trackingData(DsmcCloud<DsmcParcel<ParcelType> >& cloud)
|
||||
:
|
||||
particle::TrackingData<DsmcCloud<DsmcParcel<ParcelType> > >
|
||||
(
|
||||
cloud
|
||||
)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@ -181,7 +172,7 @@ public:
|
||||
//- Construct from components
|
||||
inline DsmcParcel
|
||||
(
|
||||
DsmcCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const vector& U,
|
||||
const scalar Ei,
|
||||
@ -194,21 +185,41 @@ public:
|
||||
//- Construct from Istream
|
||||
DsmcParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<Particle<ParcelType> > clone() const
|
||||
virtual autoPtr<particle> clone() const
|
||||
{
|
||||
return autoPtr<Particle<ParcelType> >
|
||||
(
|
||||
new DsmcParcel<ParcelType>(*this)
|
||||
);
|
||||
return autoPtr<particle>(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
|
||||
|
||||
// Access
|
||||
@ -263,14 +274,6 @@ public:
|
||||
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
|
||||
template<class TrackData>
|
||||
void hitWallPatch
|
||||
@ -280,15 +283,6 @@ public:
|
||||
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
|
||||
template<class TrackData>
|
||||
void hitPatch
|
||||
@ -297,14 +291,6 @@ public:
|
||||
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
|
||||
// according to the given transformation tensor
|
||||
void transformProperties(const tensor& T);
|
||||
@ -316,9 +302,9 @@ public:
|
||||
|
||||
// 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
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,7 +27,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
|
||||
:
|
||||
mass_(0),
|
||||
@ -35,7 +35,7 @@ inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties()
|
||||
{}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
|
||||
(
|
||||
const dictionary& dict
|
||||
@ -51,21 +51,10 @@ inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
|
||||
{}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
inline Foam::DsmcParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
DsmcCloud<ParcelType>& cloud
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>::trackData(cloud),
|
||||
cloud_(cloud)
|
||||
{}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::DsmcParcel<ParcelType>::DsmcParcel
|
||||
(
|
||||
DsmcCloud<ParcelType>& owner,
|
||||
const polyMesh& mesh,
|
||||
const vector& position,
|
||||
const vector& U,
|
||||
const scalar Ei,
|
||||
@ -75,7 +64,7 @@ inline Foam::DsmcParcel<ParcelType>::DsmcParcel
|
||||
const label typeId
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(owner, position, cellI, tetFaceI, tetPtI),
|
||||
ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
|
||||
U_(U),
|
||||
Ei_(Ei),
|
||||
typeId_(typeId)
|
||||
@ -84,7 +73,7 @@ inline Foam::DsmcParcel<ParcelType>::DsmcParcel
|
||||
|
||||
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
|
||||
{
|
||||
@ -92,15 +81,14 @@ Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
inline Foam::scalar
|
||||
Foam::DsmcParcel<ParcelType>::constantProperties::d() const
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::DsmcParcel<ParcelType>::constantProperties::d() const
|
||||
{
|
||||
return d_;
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
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
|
||||
Foam::DsmcParcel<ParcelType>::constantProperties::internalDegreesOfFreedom()
|
||||
const
|
||||
@ -117,7 +105,7 @@ const
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar
|
||||
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 * * * * * * * * * * //
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::label Foam::DsmcParcel<ParcelType>::typeId() const
|
||||
{
|
||||
return typeId_;
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector& Foam::DsmcParcel<ParcelType>::U() const
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::DsmcParcel<ParcelType>::Ei() const
|
||||
{
|
||||
return Ei_;
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::DsmcParcel<ParcelType>::U()
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
|
||||
template <class ParcelType>
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::DsmcParcel<ParcelType>::Ei()
|
||||
{
|
||||
return Ei_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,12 +33,12 @@ License
|
||||
template <class ParcelType>
|
||||
Foam::DsmcParcel<ParcelType>::DsmcParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
const polyMesh& mesh,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
Particle<ParcelType>(cloud, is, readFields),
|
||||
ParcelType(mesh, is, readFields),
|
||||
U_(vector::zero),
|
||||
Ei_(0.0),
|
||||
typeId_(-1)
|
||||
@ -73,14 +73,14 @@ Foam::DsmcParcel<ParcelType>::DsmcParcel
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
void Foam::DsmcParcel<ParcelType>::readFields(Cloud<DsmcParcel<ParcelType> >& c)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Particle<ParcelType>::readFields(c);
|
||||
ParcelType::readFields(c);
|
||||
|
||||
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, U);
|
||||
@ -92,9 +92,9 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
c.checkFieldIOobject(c, typeId);
|
||||
|
||||
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.Ei_ = Ei[i];
|
||||
@ -105,9 +105,12 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||
|
||||
|
||||
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();
|
||||
|
||||
@ -116,7 +119,7 @@ void Foam::DsmcParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
forAllConstIter(typename Cloud<DsmcParcel<ParcelType> >, c, iter)
|
||||
{
|
||||
const DsmcParcel<ParcelType>& p = iter();
|
||||
|
||||
@ -143,14 +146,14 @@ Foam::Ostream& Foam::operator<<
|
||||
{
|
||||
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.Ei()
|
||||
<< token::SPACE << p.typeId();
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const Particle<ParcelType>& >(p);
|
||||
os << static_cast<const ParcelType& >(p);
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.U_),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,13 +24,13 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dsmcParcel.H"
|
||||
#include "DsmcParcel.H"
|
||||
#include "DsmcCloud.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(DsmcParcel<particle>, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<dsmcParcel>, 0);
|
||||
|
||||
defineParcelTypeNameAndDebug(DsmcCloud<dsmcParcel>, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,14 +24,14 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dsmcParcel.H"
|
||||
|
||||
/*
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(dsmcParcel, 0);
|
||||
defineParticleTypeNameAndDebug(dsmcParcel, 0);
|
||||
defineParcelTypeNameAndDebug(dsmcParcel, 0);
|
||||
// defineTypeNameAndDebug(dsmcParcel, 0);
|
||||
// defineParticleTypeNameAndDebug(dsmcParcel, 0);
|
||||
// defineParcelTypeNameAndDebug(dsmcParcel, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Foam
|
||||
|
||||
Foam::dsmcParcel::dsmcParcel
|
||||
(
|
||||
DsmcCloud<dsmcParcel>& owner,
|
||||
c& owner,
|
||||
const vector& position,
|
||||
const vector& U,
|
||||
const scalar Ei,
|
||||
@ -78,6 +78,6 @@ Foam::dsmcParcel::dsmcParcel
|
||||
|
||||
Foam::dsmcParcel::~dsmcParcel()
|
||||
{}
|
||||
|
||||
*/
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::dsmcParcel
|
||||
|
||||
Description
|
||||
|
||||
Declaration of dsmc parcel type
|
||||
|
||||
SourceFiles
|
||||
dsmcParcel.C
|
||||
@ -35,6 +35,7 @@ SourceFiles
|
||||
#ifndef dsmcParcel_H
|
||||
#define dsmcParcel_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "DsmcParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -42,10 +43,11 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
typedef DsmcParcel<particle> dsmcParcel;
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class dsmcParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
class dsmcParcel
|
||||
:
|
||||
public DsmcParcel<dsmcParcel>
|
||||
@ -100,7 +102,7 @@ inline bool contiguous<dsmcParcel>()
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
*/
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,29 +29,18 @@ License
|
||||
#include "VariableHardSphere.H"
|
||||
#include "LarsenBorgnakkeVariableHardSphere.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
||||
|
||||
makeBinaryCollisionModel(DsmcCloud<dsmcParcel>);
|
||||
|
||||
// Add instances of collision model to the table
|
||||
makeBinaryCollisionModelType
|
||||
(
|
||||
NoBinaryCollision,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeBinaryCollisionModelType
|
||||
(
|
||||
VariableHardSphere,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeBinaryCollisionModelType
|
||||
(
|
||||
LarsenBorgnakkeVariableHardSphere,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeBinaryCollisionModelType(NoBinaryCollision, CloudType);
|
||||
makeBinaryCollisionModelType(VariableHardSphere, CloudType);
|
||||
makeBinaryCollisionModelType(LarsenBorgnakkeVariableHardSphere, CloudType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,23 +28,17 @@ License
|
||||
#include "FreeStream.H"
|
||||
#include "NoInflow.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeInflowBoundaryModel(DsmcCloud<dsmcParcel>);
|
||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
||||
|
||||
makeInflowBoundaryModel(CloudType);
|
||||
|
||||
// Add instances of inflow boundary model to the table
|
||||
makeInflowBoundaryModelType
|
||||
(
|
||||
FreeStream,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeInflowBoundaryModelType
|
||||
(
|
||||
NoInflow,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeInflowBoundaryModelType(FreeStream, CloudType);
|
||||
makeInflowBoundaryModelType(NoInflow, CloudType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,29 +29,18 @@ License
|
||||
#include "SpecularReflection.H"
|
||||
#include "MixedDiffuseSpecular.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeWallInteractionModel(DsmcCloud<dsmcParcel>);
|
||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
||||
|
||||
makeWallInteractionModel(CloudType);
|
||||
|
||||
// Add instances of wall interaction model to the table
|
||||
makeWallInteractionModelType
|
||||
(
|
||||
MaxwellianThermal,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeWallInteractionModelType
|
||||
(
|
||||
SpecularReflection,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeWallInteractionModelType
|
||||
(
|
||||
MixedDiffuseSpecular,
|
||||
DsmcCloud,
|
||||
dsmcParcel
|
||||
);
|
||||
makeWallInteractionModelType(MaxwellianThermal, CloudType);
|
||||
makeWallInteractionModelType(SpecularReflection, CloudType);
|
||||
makeWallInteractionModelType(MixedDiffuseSpecular, CloudType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
BinaryCollisionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
InflowBoundaryModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
WallInteractionModel<CloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType> > \
|
||||
add##SS##CloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user