DSMC: Rationalization and addition of mapping support
This commit is contained in:
@ -1,11 +1,11 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/dsmc/lnInclude \
|
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldsmc
|
-lDSMC
|
||||||
|
|||||||
@ -12,7 +12,7 @@ EXE_LIBS = \
|
|||||||
-ldecompositionMethods \
|
-ldecompositionMethods \
|
||||||
-ldistributed \
|
-ldistributed \
|
||||||
-ldistributionModels \
|
-ldistributionModels \
|
||||||
-ldsmc \
|
-lDSMC \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ledgeMesh \
|
-ledgeMesh \
|
||||||
|
|||||||
@ -3,7 +3,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/postProcessing/functionObjects/utilities/lnInclude \
|
-I$(LIB_SRC)/postProcessing/functionObjects/utilities/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/dsmc/lnInclude \
|
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -12,5 +12,4 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lutilityFunctionObjects \
|
-lutilityFunctionObjects \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldsmc
|
-lDSMC
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/dsmc/lnInclude \
|
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldsmc
|
-lDSMC
|
||||||
|
|||||||
@ -12,7 +12,7 @@ wmake $targetType solidParticle
|
|||||||
wmake $targetType intermediate
|
wmake $targetType intermediate
|
||||||
wmake $targetType turbulence
|
wmake $targetType turbulence
|
||||||
wmake $targetType spray
|
wmake $targetType spray
|
||||||
wmake $targetType dsmc
|
wmake $targetType DSMC
|
||||||
wmake $targetType coalCombustion
|
wmake $targetType coalCombustion
|
||||||
|
|
||||||
molecularDynamics/Allwmake $targetType $*
|
molecularDynamics/Allwmake $targetType $*
|
||||||
|
|||||||
13
src/lagrangian/DSMC/Make/files
Normal file
13
src/lagrangian/DSMC/Make/files
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/* Parcels */
|
||||||
|
parcels/derived/dsmcParcel/dsmcParcel.C
|
||||||
|
|
||||||
|
/* Cloud base classes */
|
||||||
|
clouds/baseClasses/DSMCBaseCloud/DSMCBaseCloud.C
|
||||||
|
|
||||||
|
/* Sub-models */
|
||||||
|
parcels/derived/dsmcParcel/defineDSMCParcel.C
|
||||||
|
parcels/derived/dsmcParcel/makeDSMCParcelBinaryCollisionModels.C
|
||||||
|
parcels/derived/dsmcParcel/makeDSMCParcelWallInteractionModels.C
|
||||||
|
parcels/derived/dsmcParcel/makeDSMCParcelInflowBoundaryModels.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libDSMC
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
#include "BinaryCollisionModel.H"
|
#include "BinaryCollisionModel.H"
|
||||||
#include "WallInteractionModel.H"
|
#include "WallInteractionModel.H"
|
||||||
#include "InflowBoundaryModel.H"
|
#include "InflowBoundaryModel.H"
|
||||||
@ -33,11 +33,10 @@ License
|
|||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::buildConstProps()
|
void Foam::DSMCCloud<ParcelType>::buildConstProps()
|
||||||
{
|
{
|
||||||
Info<< nl << "Constructing constant properties for" << endl;
|
Info<< nl << "Constructing constant properties for" << endl;
|
||||||
constProps_.setSize(typeIdList_.size());
|
constProps_.setSize(typeIdList_.size());
|
||||||
@ -62,14 +61,14 @@ void Foam::DsmcCloud<ParcelType>::buildConstProps()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::buildCellOccupancy()
|
void Foam::DSMCCloud<ParcelType>::buildCellOccupancy()
|
||||||
{
|
{
|
||||||
forAll(cellOccupancy_, cO)
|
forAll(cellOccupancy_, cO)
|
||||||
{
|
{
|
||||||
cellOccupancy_[cO].clear();
|
cellOccupancy_[cO].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
cellOccupancy_[iter().cell()].append(&iter());
|
cellOccupancy_[iter().cell()].append(&iter());
|
||||||
}
|
}
|
||||||
@ -77,7 +76,7 @@ void Foam::DsmcCloud<ParcelType>::buildCellOccupancy()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::initialise
|
void Foam::DSMCCloud<ParcelType>::initialise
|
||||||
(
|
(
|
||||||
const IOdictionary& dsmcInitialiseDict
|
const IOdictionary& dsmcInitialiseDict
|
||||||
)
|
)
|
||||||
@ -134,7 +133,7 @@ void Foam::DsmcCloud<ParcelType>::initialise
|
|||||||
|
|
||||||
if (typeId == -1)
|
if (typeId == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
|
FatalErrorIn("Foam::DSMCCloud<ParcelType>::initialise")
|
||||||
<< "typeId " << moleculeName << "not defined." << nl
|
<< "typeId " << moleculeName << "not defined." << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -216,7 +215,7 @@ void Foam::DsmcCloud<ParcelType>::initialise
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::collisions()
|
void Foam::DSMCCloud<ParcelType>::collisions()
|
||||||
{
|
{
|
||||||
if (!binaryCollision().active())
|
if (!binaryCollision().active())
|
||||||
{
|
{
|
||||||
@ -395,7 +394,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::resetFields()
|
void Foam::DSMCCloud<ParcelType>::resetFields()
|
||||||
{
|
{
|
||||||
q_ = dimensionedScalar("zero", dimensionSet(1, 0, -3, 0, 0), 0.0);
|
q_ = dimensionedScalar("zero", dimensionSet(1, 0, -3, 0, 0), 0.0);
|
||||||
|
|
||||||
@ -428,7 +427,7 @@ void Foam::DsmcCloud<ParcelType>::resetFields()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::calculateFields()
|
void Foam::DSMCCloud<ParcelType>::calculateFields()
|
||||||
{
|
{
|
||||||
scalarField& rhoN = rhoN_.internalField();
|
scalarField& rhoN = rhoN_.internalField();
|
||||||
|
|
||||||
@ -444,7 +443,7 @@ void Foam::DsmcCloud<ParcelType>::calculateFields()
|
|||||||
|
|
||||||
vectorField& momentum = momentum_.internalField();
|
vectorField& momentum = momentum_.internalField();
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
const label cellI = p.cell();
|
const label cellI = p.cell();
|
||||||
@ -489,7 +488,7 @@ void Foam::DsmcCloud<ParcelType>::calculateFields()
|
|||||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::addNewParcel
|
void Foam::DSMCCloud<ParcelType>::addNewParcel
|
||||||
(
|
(
|
||||||
const vector& position,
|
const vector& position,
|
||||||
const vector& U,
|
const vector& U,
|
||||||
@ -519,7 +518,7 @@ void Foam::DsmcCloud<ParcelType>::addNewParcel
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::DsmcCloud<ParcelType>::DsmcCloud
|
Foam::DSMCCloud<ParcelType>::DSMCCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
@ -527,7 +526,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(mesh, cloudName, false),
|
Cloud<ParcelType>(mesh, cloudName, false),
|
||||||
DsmcBaseCloud(),
|
DSMCBaseCloud(),
|
||||||
cloudName_(cloudName),
|
cloudName_(cloudName),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
particleProperties_
|
particleProperties_
|
||||||
@ -556,7 +555,17 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
),
|
),
|
||||||
mesh_
|
mesh_
|
||||||
),
|
),
|
||||||
collisionSelectionRemainder_(mesh_.nCells(), 0),
|
collisionSelectionRemainder_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + ":collisionSelectionRemainder",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("collisionSelectionRemainder", dimless, 0)
|
||||||
|
),
|
||||||
q_
|
q_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -699,7 +708,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
),
|
),
|
||||||
binaryCollisionModel_
|
binaryCollisionModel_
|
||||||
(
|
(
|
||||||
BinaryCollisionModel<DsmcCloud<ParcelType> >::New
|
BinaryCollisionModel<DSMCCloud<ParcelType> >::New
|
||||||
(
|
(
|
||||||
particleProperties_,
|
particleProperties_,
|
||||||
*this
|
*this
|
||||||
@ -707,7 +716,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
),
|
),
|
||||||
wallInteractionModel_
|
wallInteractionModel_
|
||||||
(
|
(
|
||||||
WallInteractionModel<DsmcCloud<ParcelType> >::New
|
WallInteractionModel<DSMCCloud<ParcelType> >::New
|
||||||
(
|
(
|
||||||
particleProperties_,
|
particleProperties_,
|
||||||
*this
|
*this
|
||||||
@ -715,7 +724,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
),
|
),
|
||||||
inflowBoundaryModel_
|
inflowBoundaryModel_
|
||||||
(
|
(
|
||||||
InflowBoundaryModel<DsmcCloud<ParcelType> >::New
|
InflowBoundaryModel<DSMCCloud<ParcelType> >::New
|
||||||
(
|
(
|
||||||
particleProperties_,
|
particleProperties_,
|
||||||
*this
|
*this
|
||||||
@ -741,7 +750,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::DsmcCloud<ParcelType>::DsmcCloud
|
Foam::DSMCCloud<ParcelType>::DSMCCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
@ -749,7 +758,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(mesh, cloudName, false),
|
Cloud<ParcelType>(mesh, cloudName, false),
|
||||||
DsmcBaseCloud(),
|
DSMCBaseCloud(),
|
||||||
cloudName_(cloudName),
|
cloudName_(cloudName),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
particleProperties_
|
particleProperties_
|
||||||
@ -780,7 +789,17 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0),
|
dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0),
|
||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
),
|
),
|
||||||
collisionSelectionRemainder_(),
|
collisionSelectionRemainder_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
this->name() + ":collisionSelectionRemainder",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("collisionSelectionRemainder", dimless, 0)
|
||||||
|
),
|
||||||
q_
|
q_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -962,14 +981,14 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::DsmcCloud<ParcelType>::~DsmcCloud()
|
Foam::DSMCCloud<ParcelType>::~DSMCCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::evolve()
|
void Foam::DSMCCloud<ParcelType>::evolve()
|
||||||
{
|
{
|
||||||
typename ParcelType::trackingData td(*this);
|
typename ParcelType::trackingData td(*this);
|
||||||
|
|
||||||
@ -999,12 +1018,12 @@ void Foam::DsmcCloud<ParcelType>::evolve()
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::info() const
|
void Foam::DSMCCloud<ParcelType>::info() const
|
||||||
{
|
{
|
||||||
label nDsmcParticles = this->size();
|
label nDSMCParticles = this->size();
|
||||||
reduce(nDsmcParticles, sumOp<label>());
|
reduce(nDSMCParticles, sumOp<label>());
|
||||||
|
|
||||||
scalar nMol = nDsmcParticles*nParticle_;
|
scalar nMol = nDSMCParticles*nParticle_;
|
||||||
|
|
||||||
vector linearMomentum = linearMomentumOfSystem();
|
vector linearMomentum = linearMomentumOfSystem();
|
||||||
reduce(linearMomentum, sumOp<vector>());
|
reduce(linearMomentum, sumOp<vector>());
|
||||||
@ -1017,10 +1036,10 @@ void Foam::DsmcCloud<ParcelType>::info() const
|
|||||||
|
|
||||||
Info<< "Cloud name: " << this->name() << nl
|
Info<< "Cloud name: " << this->name() << nl
|
||||||
<< " Number of dsmc particles = "
|
<< " Number of dsmc particles = "
|
||||||
<< nDsmcParticles
|
<< nDSMCParticles
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
if (nDsmcParticles)
|
if (nDSMCParticles)
|
||||||
{
|
{
|
||||||
Info<< " Number of molecules = "
|
Info<< " Number of molecules = "
|
||||||
<< nMol << nl
|
<< nMol << nl
|
||||||
@ -1042,7 +1061,7 @@ void Foam::DsmcCloud<ParcelType>::info() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity
|
Foam::vector Foam::DSMCCloud<ParcelType>::equipartitionLinearVelocity
|
||||||
(
|
(
|
||||||
scalar temperature,
|
scalar temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -1060,7 +1079,7 @@ Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
|
Foam::scalar Foam::DSMCCloud<ParcelType>::equipartitionInternalEnergy
|
||||||
(
|
(
|
||||||
scalar temperature,
|
scalar temperature,
|
||||||
scalar iDof
|
scalar iDof
|
||||||
@ -1101,7 +1120,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcCloud<ParcelType>::dumpParticlePositions() const
|
void Foam::DSMCCloud<ParcelType>::dumpParticlePositions() const
|
||||||
{
|
{
|
||||||
OFstream pObj
|
OFstream pObj
|
||||||
(
|
(
|
||||||
@ -1110,7 +1129,7 @@ void Foam::DsmcCloud<ParcelType>::dumpParticlePositions() const
|
|||||||
+ this->db().time().timeName() + ".obj"
|
+ this->db().time().timeName() + ".obj"
|
||||||
);
|
);
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
|
|
||||||
@ -1124,4 +1143,20 @@ void Foam::DsmcCloud<ParcelType>::dumpParticlePositions() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::DSMCCloud<ParcelType>::autoMap(const mapPolyMesh& mapper)
|
||||||
|
{
|
||||||
|
typedef typename ParcelType::trackingData tdType;
|
||||||
|
tdType td(*this);
|
||||||
|
Cloud<ParcelType>::template autoMap<tdType>(td, mapper);
|
||||||
|
|
||||||
|
// Update the cell occupancy field
|
||||||
|
cellOccupancy_.setSize(mesh_.nCells());
|
||||||
|
buildCellOccupancy();
|
||||||
|
|
||||||
|
// Update the inflow BCs
|
||||||
|
this->inflowBoundary().autoMap(mapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -22,22 +22,22 @@ 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::DsmcCloud
|
Foam::DSMCCloud
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Templated base class for dsmc cloud
|
Templated base class for dsmc cloud
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
DsmcCloudI.H
|
DSMCCloudI.H
|
||||||
DsmcCloud.C
|
DSMCCloud.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef DsmcCloud_H
|
#ifndef DSMCCloud_H
|
||||||
#define DsmcCloud_H
|
#define DSMCCloud_H
|
||||||
|
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "DsmcBaseCloud.H"
|
#include "DSMCBaseCloud.H"
|
||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
@ -62,14 +62,14 @@ template<class CloudType>
|
|||||||
class InflowBoundaryModel;
|
class InflowBoundaryModel;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class DsmcCloud Declaration
|
Class DSMCCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class DsmcCloud
|
class DSMCCloud
|
||||||
:
|
:
|
||||||
public Cloud<ParcelType>,
|
public Cloud<ParcelType>,
|
||||||
public DsmcBaseCloud
|
public DSMCBaseCloud
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ class DsmcCloud
|
|||||||
volScalarField sigmaTcRMax_;
|
volScalarField sigmaTcRMax_;
|
||||||
|
|
||||||
//- A field holding the remainder from the previous collision selections
|
//- A field holding the remainder from the previous collision selections
|
||||||
scalarField collisionSelectionRemainder_;
|
DimensionedField<scalar, volMesh> collisionSelectionRemainder_;
|
||||||
|
|
||||||
//- Heat flux at surface field
|
//- Heat flux at surface field
|
||||||
volScalarField q_;
|
volScalarField q_;
|
||||||
@ -149,15 +149,15 @@ class DsmcCloud
|
|||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
|
|
||||||
//- Binary collision model
|
//- Binary collision model
|
||||||
autoPtr<BinaryCollisionModel<DsmcCloud<ParcelType> > >
|
autoPtr<BinaryCollisionModel<DSMCCloud<ParcelType> > >
|
||||||
binaryCollisionModel_;
|
binaryCollisionModel_;
|
||||||
|
|
||||||
//- Wall interaction model
|
//- Wall interaction model
|
||||||
autoPtr<WallInteractionModel<DsmcCloud<ParcelType> > >
|
autoPtr<WallInteractionModel<DSMCCloud<ParcelType> > >
|
||||||
wallInteractionModel_;
|
wallInteractionModel_;
|
||||||
|
|
||||||
//- Inflow boundary model
|
//- Inflow boundary model
|
||||||
autoPtr<InflowBoundaryModel<DsmcCloud<ParcelType> > >
|
autoPtr<InflowBoundaryModel<DSMCCloud<ParcelType> > >
|
||||||
inflowBoundaryModel_;
|
inflowBoundaryModel_;
|
||||||
|
|
||||||
|
|
||||||
@ -182,10 +182,10 @@ class DsmcCloud
|
|||||||
void calculateFields();
|
void calculateFields();
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
DsmcCloud(const DsmcCloud&);
|
DSMCCloud(const DSMCCloud&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const DsmcCloud&);
|
void operator=(const DSMCCloud&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -194,7 +194,7 @@ public:
|
|||||||
|
|
||||||
//- Construct given name and mesh, will read Parcels and fields from
|
//- Construct given name and mesh, will read Parcels and fields from
|
||||||
// file
|
// file
|
||||||
DsmcCloud
|
DSMCCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
@ -202,7 +202,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct given name, mesh and initialisation dictionary.
|
//- Construct given name, mesh and initialisation dictionary.
|
||||||
DsmcCloud
|
DSMCCloud
|
||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
@ -211,7 +211,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~DsmcCloud();
|
virtual ~DSMCCloud();
|
||||||
|
|
||||||
|
|
||||||
//- Type of parcel the cloud was instantiated for
|
//- Type of parcel the cloud was instantiated for
|
||||||
@ -398,27 +398,27 @@ public:
|
|||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Return reference to binary elastic collision model
|
//- Return reference to binary elastic collision model
|
||||||
inline const BinaryCollisionModel<DsmcCloud<ParcelType> >&
|
inline const BinaryCollisionModel<DSMCCloud<ParcelType> >&
|
||||||
binaryCollision() const;
|
binaryCollision() const;
|
||||||
|
|
||||||
//- Return non-const reference to binary elastic collision model
|
//- Return non-const reference to binary elastic collision model
|
||||||
inline BinaryCollisionModel<DsmcCloud<ParcelType> >&
|
inline BinaryCollisionModel<DSMCCloud<ParcelType> >&
|
||||||
binaryCollision();
|
binaryCollision();
|
||||||
|
|
||||||
//- Return reference to wall interaction model
|
//- Return reference to wall interaction model
|
||||||
inline const WallInteractionModel<DsmcCloud<ParcelType> >&
|
inline const WallInteractionModel<DSMCCloud<ParcelType> >&
|
||||||
wallInteraction() const;
|
wallInteraction() const;
|
||||||
|
|
||||||
//- Return non-const reference to wall interaction model
|
//- Return non-const reference to wall interaction model
|
||||||
inline WallInteractionModel<DsmcCloud<ParcelType> >&
|
inline WallInteractionModel<DSMCCloud<ParcelType> >&
|
||||||
wallInteraction();
|
wallInteraction();
|
||||||
|
|
||||||
//- Return reference to wall interaction model
|
//- Return reference to wall interaction model
|
||||||
inline const InflowBoundaryModel<DsmcCloud<ParcelType> >&
|
inline const InflowBoundaryModel<DSMCCloud<ParcelType> >&
|
||||||
inflowBoundary() const;
|
inflowBoundary() const;
|
||||||
|
|
||||||
//- Return non-const reference to wall interaction model
|
//- Return non-const reference to wall interaction model
|
||||||
inline InflowBoundaryModel<DsmcCloud<ParcelType> >&
|
inline InflowBoundaryModel<DSMCCloud<ParcelType> >&
|
||||||
inflowBoundary();
|
inflowBoundary();
|
||||||
|
|
||||||
|
|
||||||
@ -464,6 +464,12 @@ public:
|
|||||||
|
|
||||||
//- Clear the Cloud
|
//- Clear the Cloud
|
||||||
inline void clear();
|
inline void clear();
|
||||||
|
|
||||||
|
|
||||||
|
// Mapping
|
||||||
|
|
||||||
|
//- Remap the particles to the correct cells following mesh change
|
||||||
|
virtual void autoMap(const mapPolyMesh&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -473,12 +479,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "DsmcCloudI.H"
|
#include "DSMCCloudI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "DsmcCloud.C"
|
# include "DSMCCloud.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,14 +31,14 @@ using namespace Foam::constant::mathematical;
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::word& Foam::DsmcCloud<ParcelType>::cloudName() const
|
inline const Foam::word& Foam::DSMCCloud<ParcelType>::cloudName() const
|
||||||
{
|
{
|
||||||
return cloudName_;
|
return cloudName_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::fvMesh& Foam::DsmcCloud<ParcelType>::mesh() const
|
inline const Foam::fvMesh& Foam::DSMCCloud<ParcelType>::mesh() const
|
||||||
{
|
{
|
||||||
return mesh_;
|
return mesh_;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ inline const Foam::fvMesh& Foam::DsmcCloud<ParcelType>::mesh() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::IOdictionary&
|
inline const Foam::IOdictionary&
|
||||||
Foam::DsmcCloud<ParcelType>::particleProperties() const
|
Foam::DSMCCloud<ParcelType>::particleProperties() const
|
||||||
{
|
{
|
||||||
return particleProperties_;
|
return particleProperties_;
|
||||||
}
|
}
|
||||||
@ -54,14 +54,14 @@ Foam::DsmcCloud<ParcelType>::particleProperties() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::List<Foam::word>&
|
inline const Foam::List<Foam::word>&
|
||||||
Foam::DsmcCloud<ParcelType>::typeIdList() const
|
Foam::DSMCCloud<ParcelType>::typeIdList() const
|
||||||
{
|
{
|
||||||
return typeIdList_;
|
return typeIdList_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar Foam::DsmcCloud<ParcelType>::nParticle() const
|
inline Foam::scalar Foam::DSMCCloud<ParcelType>::nParticle() const
|
||||||
{
|
{
|
||||||
return nParticle_;
|
return nParticle_;
|
||||||
}
|
}
|
||||||
@ -69,14 +69,14 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::nParticle() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::List<Foam::DynamicList<ParcelType*> >&
|
inline const Foam::List<Foam::DynamicList<ParcelType*> >&
|
||||||
Foam::DsmcCloud<ParcelType>::cellOccupancy() const
|
Foam::DSMCCloud<ParcelType>::cellOccupancy() const
|
||||||
{
|
{
|
||||||
return cellOccupancy_;
|
return cellOccupancy_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField& Foam::DsmcCloud<ParcelType>::sigmaTcRMax()
|
inline Foam::volScalarField& Foam::DSMCCloud<ParcelType>::sigmaTcRMax()
|
||||||
{
|
{
|
||||||
return sigmaTcRMax_;
|
return sigmaTcRMax_;
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ inline Foam::volScalarField& Foam::DsmcCloud<ParcelType>::sigmaTcRMax()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalarField&
|
inline Foam::scalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::collisionSelectionRemainder()
|
Foam::DSMCCloud<ParcelType>::collisionSelectionRemainder()
|
||||||
{
|
{
|
||||||
return collisionSelectionRemainder_;
|
return collisionSelectionRemainder_;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ Foam::DsmcCloud<ParcelType>::collisionSelectionRemainder()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::List<typename ParcelType::constantProperties>&
|
inline const Foam::List<typename ParcelType::constantProperties>&
|
||||||
Foam::DsmcCloud<ParcelType>::constProps() const
|
Foam::DSMCCloud<ParcelType>::constProps() const
|
||||||
{
|
{
|
||||||
return constProps_;
|
return constProps_;
|
||||||
}
|
}
|
||||||
@ -100,14 +100,14 @@ Foam::DsmcCloud<ParcelType>::constProps() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const typename ParcelType::constantProperties&
|
inline const typename ParcelType::constantProperties&
|
||||||
Foam::DsmcCloud<ParcelType>::constProps
|
Foam::DSMCCloud<ParcelType>::constProps
|
||||||
(
|
(
|
||||||
label typeId
|
label typeId
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (typeId < 0 || typeId >= constProps_.size())
|
if (typeId < 0 || typeId >= constProps_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("Foam::DsmcCloud<ParcelType>::constProps(label typeId)")
|
FatalErrorIn("Foam::DSMCCloud<ParcelType>::constProps(label typeId)")
|
||||||
<< "constantProperties for requested typeId index "
|
<< "constantProperties for requested typeId index "
|
||||||
<< typeId << " do not exist" << nl
|
<< typeId << " do not exist" << nl
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -118,7 +118,7 @@ Foam::DsmcCloud<ParcelType>::constProps
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::Random& Foam::DsmcCloud<ParcelType>::rndGen()
|
inline Foam::Random& Foam::DSMCCloud<ParcelType>::rndGen()
|
||||||
{
|
{
|
||||||
return rndGen_;
|
return rndGen_;
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ inline Foam::Random& Foam::DsmcCloud<ParcelType>::rndGen()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::qBF()
|
Foam::DSMCCloud<ParcelType>::qBF()
|
||||||
{
|
{
|
||||||
return q_.boundaryField();
|
return q_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ Foam::DsmcCloud<ParcelType>::qBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volVectorField::GeometricBoundaryField&
|
inline Foam::volVectorField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::fDBF()
|
Foam::DSMCCloud<ParcelType>::fDBF()
|
||||||
{
|
{
|
||||||
return fD_.boundaryField();
|
return fD_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -142,7 +142,7 @@ Foam::DsmcCloud<ParcelType>::fDBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::rhoNBF()
|
Foam::DSMCCloud<ParcelType>::rhoNBF()
|
||||||
{
|
{
|
||||||
return rhoN_.boundaryField();
|
return rhoN_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ Foam::DsmcCloud<ParcelType>::rhoNBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::rhoMBF()
|
Foam::DSMCCloud<ParcelType>::rhoMBF()
|
||||||
{
|
{
|
||||||
return rhoM_.boundaryField();
|
return rhoM_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ Foam::DsmcCloud<ParcelType>::rhoMBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::linearKEBF()
|
Foam::DSMCCloud<ParcelType>::linearKEBF()
|
||||||
{
|
{
|
||||||
return linearKE_.boundaryField();
|
return linearKE_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ Foam::DsmcCloud<ParcelType>::linearKEBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::internalEBF()
|
Foam::DSMCCloud<ParcelType>::internalEBF()
|
||||||
{
|
{
|
||||||
return internalE_.boundaryField();
|
return internalE_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ Foam::DsmcCloud<ParcelType>::internalEBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volScalarField::GeometricBoundaryField&
|
inline Foam::volScalarField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::iDofBF()
|
Foam::DSMCCloud<ParcelType>::iDofBF()
|
||||||
{
|
{
|
||||||
return iDof_.boundaryField();
|
return iDof_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ Foam::DsmcCloud<ParcelType>::iDofBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::volVectorField::GeometricBoundaryField&
|
inline Foam::volVectorField::GeometricBoundaryField&
|
||||||
Foam::DsmcCloud<ParcelType>::momentumBF()
|
Foam::DSMCCloud<ParcelType>::momentumBF()
|
||||||
{
|
{
|
||||||
return momentum_.boundaryField();
|
return momentum_.boundaryField();
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ Foam::DsmcCloud<ParcelType>::momentumBF()
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::boundaryT() const
|
Foam::DSMCCloud<ParcelType>::boundaryT() const
|
||||||
{
|
{
|
||||||
return boundaryT_;
|
return boundaryT_;
|
||||||
}
|
}
|
||||||
@ -198,66 +198,66 @@ Foam::DsmcCloud<ParcelType>::boundaryT() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volVectorField&
|
inline const Foam::volVectorField&
|
||||||
Foam::DsmcCloud<ParcelType>::boundaryU() const
|
Foam::DSMCCloud<ParcelType>::boundaryU() const
|
||||||
{
|
{
|
||||||
return boundaryU_;
|
return boundaryU_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::BinaryCollisionModel<Foam::DsmcCloud<ParcelType> >&
|
inline const Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::binaryCollision() const
|
Foam::DSMCCloud<ParcelType>::binaryCollision() const
|
||||||
{
|
{
|
||||||
return binaryCollisionModel_;
|
return binaryCollisionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::BinaryCollisionModel<Foam::DsmcCloud<ParcelType> >&
|
inline Foam::BinaryCollisionModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::binaryCollision()
|
Foam::DSMCCloud<ParcelType>::binaryCollision()
|
||||||
{
|
{
|
||||||
return binaryCollisionModel_();
|
return binaryCollisionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::WallInteractionModel<Foam::DsmcCloud<ParcelType> >&
|
inline const Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::wallInteraction() const
|
Foam::DSMCCloud<ParcelType>::wallInteraction() const
|
||||||
{
|
{
|
||||||
return wallInteractionModel_;
|
return wallInteractionModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::WallInteractionModel<Foam::DsmcCloud<ParcelType> >&
|
inline Foam::WallInteractionModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::wallInteraction()
|
Foam::DSMCCloud<ParcelType>::wallInteraction()
|
||||||
{
|
{
|
||||||
return wallInteractionModel_();
|
return wallInteractionModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::InflowBoundaryModel<Foam::DsmcCloud<ParcelType> >&
|
inline const Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::inflowBoundary() const
|
Foam::DSMCCloud<ParcelType>::inflowBoundary() const
|
||||||
{
|
{
|
||||||
return inflowBoundaryModel_;
|
return inflowBoundaryModel_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::InflowBoundaryModel<Foam::DsmcCloud<ParcelType> >&
|
inline Foam::InflowBoundaryModel<Foam::DSMCCloud<ParcelType> >&
|
||||||
Foam::DsmcCloud<ParcelType>::inflowBoundary()
|
Foam::DSMCCloud<ParcelType>::inflowBoundary()
|
||||||
{
|
{
|
||||||
return inflowBoundaryModel_();
|
return inflowBoundaryModel_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar Foam::DsmcCloud<ParcelType>::massInSystem() const
|
inline Foam::scalar Foam::DSMCCloud<ParcelType>::massInSystem() const
|
||||||
{
|
{
|
||||||
scalar sysMass = 0.0;
|
scalar sysMass = 0.0;
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
|
|
||||||
@ -274,11 +274,11 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::massInSystem() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::vector Foam::DsmcCloud<ParcelType>::linearMomentumOfSystem() const
|
inline Foam::vector Foam::DSMCCloud<ParcelType>::linearMomentumOfSystem() const
|
||||||
{
|
{
|
||||||
vector linearMomentum(vector::zero);
|
vector linearMomentum(vector::zero);
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
|
|
||||||
@ -296,11 +296,11 @@ inline Foam::vector Foam::DsmcCloud<ParcelType>::linearMomentumOfSystem() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
Foam::DSMCCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
||||||
{
|
{
|
||||||
scalar linearKineticEnergy = 0.0;
|
scalar linearKineticEnergy = 0.0;
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
|
|
||||||
@ -318,11 +318,11 @@ Foam::DsmcCloud<ParcelType>::linearKineticEnergyOfSystem() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcCloud<ParcelType>::internalEnergyOfSystem() const
|
Foam::DSMCCloud<ParcelType>::internalEnergyOfSystem() const
|
||||||
{
|
{
|
||||||
scalar internalEnergy = 0.0;
|
scalar internalEnergy = 0.0;
|
||||||
|
|
||||||
forAllConstIter(typename DsmcCloud<ParcelType>, *this, iter)
|
forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter)
|
||||||
{
|
{
|
||||||
const ParcelType& p = iter();
|
const ParcelType& p = iter();
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ Foam::DsmcCloud<ParcelType>::internalEnergyOfSystem() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
inline Foam::scalar Foam::DSMCCloud<ParcelType>::maxwellianAverageSpeed
|
||||||
(
|
(
|
||||||
scalar temperature,
|
scalar temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -346,7 +346,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
inline Foam::scalarField Foam::DSMCCloud<ParcelType>::maxwellianAverageSpeed
|
||||||
(
|
(
|
||||||
scalarField temperature,
|
scalarField temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -359,7 +359,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
inline Foam::scalar Foam::DSMCCloud<ParcelType>::maxwellianRMSSpeed
|
||||||
(
|
(
|
||||||
scalar temperature,
|
scalar temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -370,7 +370,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
inline Foam::scalarField Foam::DSMCCloud<ParcelType>::maxwellianRMSSpeed
|
||||||
(
|
(
|
||||||
scalarField temperature,
|
scalarField temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -384,7 +384,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
Foam::DSMCCloud<ParcelType>::maxwellianMostProbableSpeed
|
||||||
(
|
(
|
||||||
scalar temperature,
|
scalar temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -396,7 +396,7 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalarField
|
inline Foam::scalarField
|
||||||
Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
Foam::DSMCCloud<ParcelType>::maxwellianMostProbableSpeed
|
||||||
(
|
(
|
||||||
scalarField temperature,
|
scalarField temperature,
|
||||||
scalar mass
|
scalar mass
|
||||||
@ -409,14 +409,14 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField& Foam::DsmcCloud<ParcelType>::q() const
|
inline const Foam::volScalarField& Foam::DSMCCloud<ParcelType>::q() const
|
||||||
{
|
{
|
||||||
return q_;
|
return q_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volVectorField& Foam::DsmcCloud<ParcelType>::fD() const
|
inline const Foam::volVectorField& Foam::DSMCCloud<ParcelType>::fD() const
|
||||||
{
|
{
|
||||||
return fD_;
|
return fD_;
|
||||||
}
|
}
|
||||||
@ -424,14 +424,14 @@ inline const Foam::volVectorField& Foam::DsmcCloud<ParcelType>::fD() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::rhoN() const
|
Foam::DSMCCloud<ParcelType>::rhoN() const
|
||||||
{
|
{
|
||||||
return rhoN_;
|
return rhoN_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField& Foam::DsmcCloud<ParcelType>::rhoM() const
|
inline const Foam::volScalarField& Foam::DSMCCloud<ParcelType>::rhoM() const
|
||||||
{
|
{
|
||||||
return rhoM_;
|
return rhoM_;
|
||||||
}
|
}
|
||||||
@ -439,7 +439,7 @@ inline const Foam::volScalarField& Foam::DsmcCloud<ParcelType>::rhoM() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::dsmcRhoN() const
|
Foam::DSMCCloud<ParcelType>::dsmcRhoN() const
|
||||||
{
|
{
|
||||||
return dsmcRhoN_;
|
return dsmcRhoN_;
|
||||||
}
|
}
|
||||||
@ -447,7 +447,7 @@ Foam::DsmcCloud<ParcelType>::dsmcRhoN() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::linearKE() const
|
Foam::DSMCCloud<ParcelType>::linearKE() const
|
||||||
{
|
{
|
||||||
return linearKE_;
|
return linearKE_;
|
||||||
}
|
}
|
||||||
@ -455,7 +455,7 @@ Foam::DsmcCloud<ParcelType>::linearKE() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::internalE() const
|
Foam::DSMCCloud<ParcelType>::internalE() const
|
||||||
{
|
{
|
||||||
return internalE_;
|
return internalE_;
|
||||||
}
|
}
|
||||||
@ -463,21 +463,21 @@ Foam::DsmcCloud<ParcelType>::internalE() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volScalarField&
|
inline const Foam::volScalarField&
|
||||||
Foam::DsmcCloud<ParcelType>::iDof() const
|
Foam::DSMCCloud<ParcelType>::iDof() const
|
||||||
{
|
{
|
||||||
return iDof_;
|
return iDof_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::volVectorField& Foam::DsmcCloud<ParcelType>::momentum() const
|
inline const Foam::volVectorField& Foam::DSMCCloud<ParcelType>::momentum() const
|
||||||
{
|
{
|
||||||
return momentum_;
|
return momentum_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline void Foam::DsmcCloud<ParcelType>::clear()
|
inline void Foam::DSMCCloud<ParcelType>::clear()
|
||||||
{
|
{
|
||||||
return IDLList<ParcelType>::clear();
|
return IDLList<ParcelType>::clear();
|
||||||
}
|
}
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,25 +23,25 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DsmcBaseCloud.H"
|
#include "DSMCBaseCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(DsmcBaseCloud, 0);
|
defineTypeNameAndDebug(DSMCBaseCloud, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::DsmcBaseCloud::DsmcBaseCloud()
|
Foam::DSMCBaseCloud::DSMCBaseCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::DsmcBaseCloud::~DsmcBaseCloud()
|
Foam::DSMCBaseCloud::~DSMCBaseCloud()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,18 +22,18 @@ 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::DsmcBaseCloud
|
Foam::DSMCBaseCloud
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Virtual abstract base class for templated DsmcCloud
|
Virtual abstract base class for templated DSMCCloud
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
DsmcBaseCloud.C
|
DSMCBaseCloud.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef DsmcBaseCloud_H
|
#ifndef DSMCBaseCloud_H
|
||||||
#define DsmcBaseCloud_H
|
#define DSMCBaseCloud_H
|
||||||
|
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
@ -43,32 +43,32 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class DsmcBaseCloud Declaration
|
Class DSMCBaseCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class DsmcBaseCloud
|
class DSMCBaseCloud
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
DsmcBaseCloud(const DsmcBaseCloud&);
|
DSMCBaseCloud(const DSMCBaseCloud&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const DsmcBaseCloud&);
|
void operator=(const DSMCBaseCloud&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("DsmcBaseCloud");
|
TypeName("DSMCBaseCloud");
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor
|
//- Null constructor
|
||||||
DsmcBaseCloud();
|
DSMCBaseCloud();
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~DsmcBaseCloud();
|
virtual ~DSMCBaseCloud();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,14 +35,14 @@ SourceFiles
|
|||||||
#ifndef dsmcCloud_H
|
#ifndef dsmcCloud_H
|
||||||
#define dsmcCloud_H
|
#define dsmcCloud_H
|
||||||
|
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
#include "dsmcParcel.H"
|
#include "dsmcParcel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef DsmcCloud<dsmcParcel> dsmcCloud;
|
typedef DSMCCloud<dsmcParcel> dsmcCloud;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,14 +23,14 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DsmcParcel.H"
|
#include "DSMCParcel.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
bool Foam::DsmcParcel<ParcelType>::move(TrackData& td, const scalar trackTime)
|
bool Foam::DSMCParcel<ParcelType>::move(TrackData& td, const scalar trackTime)
|
||||||
{
|
{
|
||||||
typename TrackData::cloudType::parcelType& p =
|
typename TrackData::cloudType::parcelType& p =
|
||||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||||
@ -85,7 +85,7 @@ bool Foam::DsmcParcel<ParcelType>::move(TrackData& td, const scalar trackTime)
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
bool Foam::DsmcParcel<ParcelType>::hitPatch
|
bool Foam::DSMCParcel<ParcelType>::hitPatch
|
||||||
(
|
(
|
||||||
const polyPatch&,
|
const polyPatch&,
|
||||||
TrackData& td,
|
TrackData& td,
|
||||||
@ -100,7 +100,7 @@ bool Foam::DsmcParcel<ParcelType>::hitPatch
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::DsmcParcel<ParcelType>::hitProcessorPatch
|
void Foam::DSMCParcel<ParcelType>::hitProcessorPatch
|
||||||
(
|
(
|
||||||
const processorPolyPatch&,
|
const processorPolyPatch&,
|
||||||
TrackData& td
|
TrackData& td
|
||||||
@ -112,7 +112,7 @@ void Foam::DsmcParcel<ParcelType>::hitProcessorPatch
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::DsmcParcel<ParcelType>::hitWallPatch
|
void Foam::DSMCParcel<ParcelType>::hitWallPatch
|
||||||
(
|
(
|
||||||
const wallPolyPatch& wpp,
|
const wallPolyPatch& wpp,
|
||||||
TrackData& td,
|
TrackData& td,
|
||||||
@ -162,7 +162,7 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
|
|||||||
|
|
||||||
td.cloud().wallInteraction().correct
|
td.cloud().wallInteraction().correct
|
||||||
(
|
(
|
||||||
static_cast<DsmcParcel<ParcelType> &>(*this),
|
static_cast<DSMCParcel<ParcelType> &>(*this),
|
||||||
wpp
|
wpp
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -205,14 +205,14 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
template<class TrackData>
|
template<class TrackData>
|
||||||
void Foam::DsmcParcel<ParcelType>::hitPatch(const polyPatch&, TrackData& td)
|
void Foam::DSMCParcel<ParcelType>::hitPatch(const polyPatch&, TrackData& td)
|
||||||
{
|
{
|
||||||
td.keepParticle = false;
|
td.keepParticle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::transformProperties(const tensor& T)
|
void Foam::DSMCParcel<ParcelType>::transformProperties(const tensor& T)
|
||||||
{
|
{
|
||||||
ParcelType::transformProperties(T);
|
ParcelType::transformProperties(T);
|
||||||
U_ = transform(T, U_);
|
U_ = transform(T, U_);
|
||||||
@ -220,7 +220,7 @@ void Foam::DsmcParcel<ParcelType>::transformProperties(const tensor& T)
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::transformProperties
|
void Foam::DSMCParcel<ParcelType>::transformProperties
|
||||||
(
|
(
|
||||||
const vector& separation
|
const vector& separation
|
||||||
)
|
)
|
||||||
@ -231,6 +231,6 @@ void Foam::DsmcParcel<ParcelType>::transformProperties
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "DsmcParcelIO.C"
|
#include "DSMCParcelIO.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,27 +22,27 @@ 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::DsmcParcel
|
Foam::DSMCParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
DSMC parcel class
|
DSMC parcel class
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
DsmcParcelI.H
|
DSMCParcelI.H
|
||||||
DsmcParcel.C
|
DSMCParcel.C
|
||||||
DsmcParcelIO.C
|
DSMCParcelIO.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#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"
|
||||||
|
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class DsmcParcel;
|
class DSMCParcel;
|
||||||
|
|
||||||
// Forward declaration of friend functions
|
// Forward declaration of friend functions
|
||||||
|
|
||||||
@ -58,15 +58,15 @@ template<class ParcelType>
|
|||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const DsmcParcel<ParcelType>&
|
const DSMCParcel<ParcelType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class DsmcParcel Declaration
|
Class DSMCParcel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
class DsmcParcel
|
class DSMCParcel
|
||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
@ -125,16 +125,16 @@ public:
|
|||||||
//- Class used to pass kinematic tracking data to the trackToFace function
|
//- Class used to pass kinematic tracking data to the trackToFace function
|
||||||
class trackingData
|
class trackingData
|
||||||
:
|
:
|
||||||
public particle::TrackingData<DsmcCloud<DsmcParcel<ParcelType> > >
|
public particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType> > >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
trackingData(DsmcCloud<DsmcParcel<ParcelType> >& cloud)
|
trackingData(DSMCCloud<DSMCParcel<ParcelType> >& cloud)
|
||||||
:
|
:
|
||||||
particle::TrackingData<DsmcCloud<DsmcParcel<ParcelType> > >
|
particle::TrackingData<DSMCCloud<DSMCParcel<ParcelType> > >
|
||||||
(
|
(
|
||||||
cloud
|
cloud
|
||||||
)
|
)
|
||||||
@ -162,7 +162,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("DsmcParcel");
|
TypeName("DSMCParcel");
|
||||||
|
|
||||||
friend class Cloud<ParcelType>;
|
friend class Cloud<ParcelType>;
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline DsmcParcel
|
inline DSMCParcel
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
@ -183,7 +183,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
DsmcParcel
|
DSMCParcel
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
@ -193,7 +193,7 @@ public:
|
|||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<particle> clone() const
|
virtual autoPtr<particle> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<particle>(new DsmcParcel<ParcelType>(*this));
|
return autoPtr<particle>(new DSMCParcel<ParcelType>(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -210,11 +210,11 @@ public:
|
|||||||
mesh_(mesh)
|
mesh_(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
autoPtr<DsmcParcel<ParcelType> > operator()(Istream& is) const
|
autoPtr<DSMCParcel<ParcelType> > operator()(Istream& is) const
|
||||||
{
|
{
|
||||||
return autoPtr<DsmcParcel<ParcelType> >
|
return autoPtr<DSMCParcel<ParcelType> >
|
||||||
(
|
(
|
||||||
new DsmcParcel<ParcelType>(mesh_, is, true)
|
new DSMCParcel<ParcelType>(mesh_, is, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -302,9 +302,9 @@ public:
|
|||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
static void readFields(Cloud<DsmcParcel<ParcelType> >& c);
|
static void readFields(Cloud<DSMCParcel<ParcelType> >& c);
|
||||||
|
|
||||||
static void writeFields(const Cloud<DsmcParcel<ParcelType> >& c);
|
static void writeFields(const Cloud<DSMCParcel<ParcelType> >& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
@ -312,7 +312,7 @@ public:
|
|||||||
friend Ostream& operator<< <ParcelType>
|
friend Ostream& operator<< <ParcelType>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const DsmcParcel<ParcelType>&
|
const DSMCParcel<ParcelType>&
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -323,12 +323,12 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "DsmcParcelI.H"
|
#include "DSMCParcelI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
#include "DsmcParcel.C"
|
#include "DSMCParcel.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,7 +28,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),
|
||||||
d_(0)
|
d_(0)
|
||||||
@ -36,7 +36,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
|
||||||
)
|
)
|
||||||
@ -52,7 +52,7 @@ inline Foam::DsmcParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::DsmcParcel<ParcelType>::DsmcParcel
|
inline Foam::DSMCParcel<ParcelType>::DSMCParcel
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const vector& position,
|
const vector& position,
|
||||||
@ -75,14 +75,14 @@ inline Foam::DsmcParcel<ParcelType>::DsmcParcel
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcParcel<ParcelType>::constantProperties::mass() const
|
Foam::DSMCParcel<ParcelType>::constantProperties::mass() const
|
||||||
{
|
{
|
||||||
return mass_;
|
return mass_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar Foam::DsmcParcel<ParcelType>::constantProperties::d() const
|
inline Foam::scalar Foam::DSMCParcel<ParcelType>::constantProperties::d() const
|
||||||
{
|
{
|
||||||
return d_;
|
return d_;
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ inline Foam::scalar Foam::DsmcParcel<ParcelType>::constantProperties::d() const
|
|||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::scalar
|
inline Foam::scalar
|
||||||
Foam::DsmcParcel<ParcelType>::constantProperties::sigmaT() const
|
Foam::DSMCParcel<ParcelType>::constantProperties::sigmaT() const
|
||||||
{
|
{
|
||||||
return constant::mathematical::pi*d_*d_;
|
return constant::mathematical::pi*d_*d_;
|
||||||
}
|
}
|
||||||
@ -98,7 +98,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
|
||||||
{
|
{
|
||||||
return internalDegreesOfFreedom_;
|
return internalDegreesOfFreedom_;
|
||||||
@ -107,44 +107,44 @@ 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
|
||||||
{
|
{
|
||||||
return omega_;
|
return omega_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * 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_;
|
||||||
}
|
}
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DsmcParcel.H"
|
#include "DSMCParcel.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IOField.H"
|
#include "IOField.H"
|
||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
@ -31,7 +31,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
Foam::DsmcParcel<ParcelType>::DsmcParcel
|
Foam::DSMCParcel<ParcelType>::DSMCParcel
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
Istream& is,
|
Istream& is,
|
||||||
@ -66,14 +66,14 @@ Foam::DsmcParcel<ParcelType>::DsmcParcel
|
|||||||
// Check state of Istream
|
// Check state of Istream
|
||||||
is.check
|
is.check
|
||||||
(
|
(
|
||||||
"DsmcParcel<ParcelType>::DsmcParcel"
|
"DSMCParcel<ParcelType>::DSMCParcel"
|
||||||
"(const Cloud<ParcelType>&, Istream&, bool)"
|
"(const Cloud<ParcelType>&, Istream&, bool)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::readFields(Cloud<DsmcParcel<ParcelType> >& c)
|
void Foam::DSMCParcel<ParcelType>::readFields(Cloud<DSMCParcel<ParcelType> >& c)
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -92,9 +92,9 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<DsmcParcel<ParcelType> >& c)
|
|||||||
c.checkFieldIOobject(c, typeId);
|
c.checkFieldIOobject(c, typeId);
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllIter(typename Cloud<DsmcParcel<ParcelType> >, c, iter)
|
forAllIter(typename Cloud<DSMCParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
DsmcParcel<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,9 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<DsmcParcel<ParcelType> >& c)
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::writeFields
|
void Foam::DSMCParcel<ParcelType>::writeFields
|
||||||
(
|
(
|
||||||
const Cloud<DsmcParcel<ParcelType> >& c
|
const Cloud<DSMCParcel<ParcelType> >& c
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ParcelType::writeFields(c);
|
ParcelType::writeFields(c);
|
||||||
@ -119,9 +119,9 @@ void Foam::DsmcParcel<ParcelType>::writeFields
|
|||||||
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<DsmcParcel<ParcelType> >, c, iter)
|
forAllConstIter(typename Cloud<DSMCParcel<ParcelType> >, c, iter)
|
||||||
{
|
{
|
||||||
const DsmcParcel<ParcelType>& p = iter();
|
const DSMCParcel<ParcelType>& p = iter();
|
||||||
|
|
||||||
U[i] = p.U();
|
U[i] = p.U();
|
||||||
Ei[i] = p.Ei();
|
Ei[i] = p.Ei();
|
||||||
@ -141,7 +141,7 @@ template<class ParcelType>
|
|||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const DsmcParcel<ParcelType>& p
|
const DSMCParcel<ParcelType>& p
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
@ -166,7 +166,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
// Check state of Ostream
|
// Check state of Ostream
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"Ostream& operator<<(Ostream&, const DsmcParcel<ParcelType>&)"
|
"Ostream& operator<<(Ostream&, const DSMCParcel<ParcelType>&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,12 +24,12 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "dsmcParcel.H"
|
#include "dsmcParcel.H"
|
||||||
#include "DsmcParcel.H"
|
#include "DSMCParcel.H"
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTemplateTypeNameAndDebug(DsmcParcel<particle>, 0);
|
defineTemplateTypeNameAndDebug(DSMCParcel<particle>, 0);
|
||||||
defineTemplateTypeNameAndDebug(Cloud<dsmcParcel>, 0);
|
defineTemplateTypeNameAndDebug(Cloud<dsmcParcel>, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ Foam::dsmcParcel::dsmcParcel
|
|||||||
const label typeId
|
const label typeId
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DsmcParcel<dsmcParcel>
|
DSMCParcel<dsmcParcel>
|
||||||
(
|
(
|
||||||
owner,
|
owner,
|
||||||
position,
|
position,
|
||||||
@ -69,7 +69,7 @@ Foam::dsmcParcel::dsmcParcel
|
|||||||
bool readFields
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
DsmcParcel<dsmcParcel>(cloud, is, readFields)
|
DSMCParcel<dsmcParcel>(cloud, is, readFields)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
52
src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.H
Normal file
52
src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.H
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Typedef
|
||||||
|
Foam::dsmcParcel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Declaration of dsmc parcel type
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
dsmcParcel.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef dsmcParcel_H
|
||||||
|
#define dsmcParcel_H
|
||||||
|
|
||||||
|
#include "particle.H"
|
||||||
|
#include "DSMCParcel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
typedef DSMCParcel<particle> dsmcParcel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "dsmcParcel.H"
|
#include "dsmcParcel.H"
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
#include "NoBinaryCollision.H"
|
#include "NoBinaryCollision.H"
|
||||||
#include "VariableHardSphere.H"
|
#include "VariableHardSphere.H"
|
||||||
#include "LarsenBorgnakkeVariableHardSphere.H"
|
#include "LarsenBorgnakkeVariableHardSphere.H"
|
||||||
@ -33,9 +33,9 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
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(NoBinaryCollision, CloudType);
|
makeBinaryCollisionModelType(NoBinaryCollision, CloudType);
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "dsmcParcel.H"
|
#include "dsmcParcel.H"
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
#include "FreeStream.H"
|
#include "FreeStream.H"
|
||||||
#include "NoInflow.H"
|
#include "NoInflow.H"
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
typedef DSMCCloud<dsmcParcel> CloudType;
|
||||||
|
|
||||||
makeInflowBoundaryModel(CloudType);
|
makeInflowBoundaryModel(CloudType);
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "dsmcParcel.H"
|
#include "dsmcParcel.H"
|
||||||
#include "DsmcCloud.H"
|
#include "DSMCCloud.H"
|
||||||
#include "MaxwellianThermal.H"
|
#include "MaxwellianThermal.H"
|
||||||
#include "SpecularReflection.H"
|
#include "SpecularReflection.H"
|
||||||
#include "MixedDiffuseSpecular.H"
|
#include "MixedDiffuseSpecular.H"
|
||||||
@ -33,7 +33,7 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef DsmcCloud<dsmcParcel> CloudType;
|
typedef DSMCCloud<dsmcParcel> CloudType;
|
||||||
|
|
||||||
makeWallInteractionModel(CloudType);
|
makeWallInteractionModel(CloudType);
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -123,6 +123,27 @@ Foam::FreeStream<CloudType>::~FreeStream()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::FreeStream<CloudType>::autoMap(const mapPolyMesh& mapper)
|
||||||
|
{
|
||||||
|
CloudType& cloud(this->owner());
|
||||||
|
const polyMesh& mesh(cloud.mesh());
|
||||||
|
|
||||||
|
forAll(patches_, p)
|
||||||
|
{
|
||||||
|
label patchi = patches_[p];
|
||||||
|
|
||||||
|
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||||
|
List<Field<scalar> >& pFA = particleFluxAccumulators_[p];
|
||||||
|
|
||||||
|
forAll(pFA, facei)
|
||||||
|
{
|
||||||
|
pFA[facei].setSize(patch.size(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::FreeStream<CloudType>::inflow()
|
void Foam::FreeStream<CloudType>::inflow()
|
||||||
{
|
{
|
||||||
@ -148,11 +169,12 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
cloud.boundaryU().boundaryField()
|
cloud.boundaryU().boundaryField()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
forAll(patches_, p)
|
forAll(patches_, p)
|
||||||
{
|
{
|
||||||
label patchI = patches_[p];
|
label patchi = patches_[p];
|
||||||
|
|
||||||
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||||
|
|
||||||
// Add mass to the accumulators. negative face area dotted with the
|
// Add mass to the accumulators. negative face area dotted with the
|
||||||
// velocity to point flux into the domain.
|
// velocity to point flux into the domain.
|
||||||
@ -166,7 +188,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
scalar mass = cloud.constProps(typeId).mass();
|
scalar mass = cloud.constProps(typeId).mass();
|
||||||
|
|
||||||
if (min(boundaryT[patchI]) < SMALL)
|
if (min(boundaryT[patchi]) < SMALL)
|
||||||
{
|
{
|
||||||
FatalErrorIn ("Foam::FreeStream<CloudType>::inflow()")
|
FatalErrorIn ("Foam::FreeStream<CloudType>::inflow()")
|
||||||
<< "Zero boundary temperature detected, check boundaryT "
|
<< "Zero boundary temperature detected, check boundaryT "
|
||||||
@ -178,7 +200,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
(
|
(
|
||||||
cloud.maxwellianMostProbableSpeed
|
cloud.maxwellianMostProbableSpeed
|
||||||
(
|
(
|
||||||
boundaryT[patchI],
|
boundaryT[patchi],
|
||||||
mass
|
mass
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -190,7 +212,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
scalarField sCosTheta
|
scalarField sCosTheta
|
||||||
(
|
(
|
||||||
(boundaryU[patchI] & -patch.faceAreas()/mag(patch.faceAreas()))
|
(boundaryU[patchi] & -patch.faceAreas()/mag(patch.faceAreas()))
|
||||||
/ mostProbableSpeed
|
/ mostProbableSpeed
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -262,9 +284,9 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
vector t2 = n^t1;
|
vector t2 = n^t1;
|
||||||
t2 /= mag(t2);
|
t2 /= mag(t2);
|
||||||
|
|
||||||
scalar faceTemperature = boundaryT[patchI][pFI];
|
scalar faceTemperature = boundaryT[patchi][pFI];
|
||||||
|
|
||||||
const vector& faceVelocity = boundaryU[patchI][pFI];
|
const vector& faceVelocity = boundaryU[patchi][pFI];
|
||||||
|
|
||||||
forAll(pFA, i)
|
forAll(pFA, i)
|
||||||
{
|
{
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,6 +93,11 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
// Mapping
|
||||||
|
|
||||||
|
//- Remap the particles to the correct cells following mesh change
|
||||||
|
virtual void autoMap(const mapPolyMesh&);
|
||||||
|
|
||||||
//- Introduce particles
|
//- Introduce particles
|
||||||
virtual void inflow();
|
virtual void inflow();
|
||||||
};
|
};
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,4 +92,3 @@ const Foam::dictionary& Foam::InflowBoundaryModel<CloudType>::coeffDict() const
|
|||||||
#include "InflowBoundaryModelNew.C"
|
#include "InflowBoundaryModelNew.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,6 +124,12 @@ public:
|
|||||||
//- Return the coefficients dictionary
|
//- Return the coefficients dictionary
|
||||||
inline const dictionary& coeffDict() const;
|
inline const dictionary& coeffDict() const;
|
||||||
|
|
||||||
|
// Mapping
|
||||||
|
|
||||||
|
//- Remap the particles to the correct cells following mesh change
|
||||||
|
virtual void autoMap(const mapPolyMesh&)
|
||||||
|
{}
|
||||||
|
|
||||||
//- Introduce particles
|
//- Introduce particles
|
||||||
virtual void inflow() = 0;
|
virtual void inflow() = 0;
|
||||||
};
|
};
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,4 +93,3 @@ Foam::WallInteractionModel<CloudType>::coeffDict() const
|
|||||||
#include "WallInteractionModelNew.C"
|
#include "WallInteractionModelNew.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1,13 +0,0 @@
|
|||||||
/* Parcels */
|
|
||||||
parcels/derived/dsmcParcel/dsmcParcel.C
|
|
||||||
|
|
||||||
/* Cloud base classes */
|
|
||||||
clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.C
|
|
||||||
|
|
||||||
/* submodels */
|
|
||||||
parcels/derived/dsmcParcel/defineDsmcParcel.C
|
|
||||||
parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C
|
|
||||||
parcels/derived/dsmcParcel/makeDsmcParcelWallInteractionModels.C
|
|
||||||
parcels/derived/dsmcParcel/makeDsmcParcelInflowBoundaryModels.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libdsmc
|
|
||||||
@ -1,112 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::dsmcParcel
|
|
||||||
|
|
||||||
Description
|
|
||||||
Declaration of dsmc parcel type
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
dsmcParcel.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef dsmcParcel_H
|
|
||||||
#define dsmcParcel_H
|
|
||||||
|
|
||||||
#include "particle.H"
|
|
||||||
#include "DsmcParcel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
typedef DsmcParcel<particle> dsmcParcel;
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class dsmcParcel Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
class dsmcParcel
|
|
||||||
:
|
|
||||||
public DsmcParcel<dsmcParcel>
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Run-time type information
|
|
||||||
TypeName("dsmcParcel");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
dsmcParcel
|
|
||||||
(
|
|
||||||
DsmcCloud<dsmcParcel>& owner,
|
|
||||||
const vector& position,
|
|
||||||
const vector& U,
|
|
||||||
const scalar Ei,
|
|
||||||
const label cellI,
|
|
||||||
const label tetFaceI,
|
|
||||||
const label tetPtI,
|
|
||||||
const label typeId
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from Istream
|
|
||||||
dsmcParcel
|
|
||||||
(
|
|
||||||
const Cloud<dsmcParcel>& c,
|
|
||||||
Istream& is,
|
|
||||||
bool readFields = true
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct and return a clone
|
|
||||||
autoPtr<Particle<dsmcParcel> > clone() const
|
|
||||||
{
|
|
||||||
return autoPtr<Particle<dsmcParcel> >(new dsmcParcel(*this));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~dsmcParcel();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline bool contiguous<dsmcParcel>()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
*/
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/dsmc/lnInclude \
|
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
@ -14,7 +14,7 @@ LIB_LIBS = \
|
|||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lsampling \
|
-lsampling \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-ldsmc \
|
-lDSMC \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lturbulenceModels \
|
-lturbulenceModels \
|
||||||
-lfluidThermophysicalModels
|
-lfluidThermophysicalModels
|
||||||
|
|||||||
Reference in New Issue
Block a user