mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Added MPPICFoam solver and MPPIC types and models to the Lagrangian library
This commit is contained in:
@ -0,0 +1,178 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 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::PackingModel
|
||||
|
||||
Description
|
||||
Templated Packing model class.
|
||||
|
||||
SourceFiles
|
||||
PackingModel.C
|
||||
PackingModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PackingModel_H
|
||||
#define PackingModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "CloudSubModelBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
|
||||
class ParticleStressModel;
|
||||
|
||||
class CorrectionLimitingMethod;
|
||||
|
||||
template <class Type>
|
||||
class AveragingMethod;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PackingModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class PackingModel
|
||||
:
|
||||
public CloudSubModelBase<CloudType>
|
||||
{
|
||||
protected:
|
||||
|
||||
//- Protected data
|
||||
|
||||
//- Particle stress model
|
||||
autoPtr<ParticleStressModel> particleStressModel_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("packingModel");
|
||||
|
||||
//- Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
PackingModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
),
|
||||
(dict, owner)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null from owner
|
||||
PackingModel(CloudType& owner);
|
||||
|
||||
//- Construct from components
|
||||
PackingModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
//- Construct copy
|
||||
PackingModel(const PackingModel<CloudType>& cm);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<PackingModel<CloudType> > clone() const = 0;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~PackingModel();
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<PackingModel<CloudType> > New
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Calculate the velocity correction
|
||||
virtual vector velocityCorrection
|
||||
(
|
||||
typename CloudType::parcelType& p,
|
||||
const scalar deltaT
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makePackingModel(CloudType) \
|
||||
\
|
||||
typedef CloudType::MPPICCloudType MPPICCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug \
|
||||
( \
|
||||
PackingModel<MPPICCloudType>, \
|
||||
0 \
|
||||
); \
|
||||
defineTemplateRunTimeSelectionTable \
|
||||
( \
|
||||
PackingModel<MPPICCloudType>, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makePackingModelType(SS, CloudType) \
|
||||
\
|
||||
typedef CloudType::MPPICCloudType MPPICCloudType; \
|
||||
defineNamedTemplateTypeNameAndDebug(SS<MPPICCloudType>, 0); \
|
||||
\
|
||||
PackingModel<MPPICCloudType>:: \
|
||||
adddictionaryConstructorToTable<SS<MPPICCloudType> > \
|
||||
add##SS##CloudType##MPPICCloudType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "PackingModel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user