refactored wall interaction to patch interaction

This commit is contained in:
andy
2009-05-28 17:13:01 +01:00
parent 4367ff382f
commit 1649cd1844
22 changed files with 136 additions and 140 deletions

View File

@ -11,9 +11,9 @@ coalParcel/submodels/makeCoalParcelDispersionModels.C
coalParcel/submodels/makeCoalParcelInjectionModels.C coalParcel/submodels/makeCoalParcelInjectionModels.C
coalParcel/submodels/makeCoalParcelHeatTransferModels.C coalParcel/submodels/makeCoalParcelHeatTransferModels.C
coalParcel/submodels/makeCoalParcelPhaseChangeModels.C coalParcel/submodels/makeCoalParcelPhaseChangeModels.C
coalParcel/submodels/makeCoalParcelPatchInteractionModels.C
coalParcel/submodels/makeCoalParcelPostProcessingModels.C coalParcel/submodels/makeCoalParcelPostProcessingModels.C
coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C
coalParcel/submodels/makeCoalParcelWallInteractionModels.C
submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C
submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C
@ -22,4 +22,4 @@ submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C
/* IOLists */ /* IOLists */
coalParcel/submodels/makeCoalParcelIOList.C coalParcel/submodels/makeCoalParcelIOList.C
LIB = $(FOAM_USER_LIBBIN)/libcoalCombustion LIB = $(FOAM_LIBBIN)/libcoalCombustion

View File

@ -34,16 +34,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<coalParcel>); makePatchInteractionModel(KinematicCloud<coalParcel>);
// Add instances of wall interaction model to the table // Add instances of patch interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
coalParcel coalParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -30,8 +30,8 @@ $(KINEMATICPARCEL)/defineBasicKinematicParcel.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDispersionModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDispersionModels.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDragModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDragModels.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelInjectionModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelInjectionModels.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelPatchInteractionModels.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelPostProcessingModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelPostProcessingModels.C
$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelWallInteractionModels.C
/* thermo parcel sub-models */ /* thermo parcel sub-models */
@ -41,8 +41,8 @@ $(THERMOPARCEL)/submodels/makeBasicThermoParcelDispersionModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelDragModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelDragModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelHeatTransferModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelHeatTransferModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelInjectionModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelInjectionModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelPatchInteractionModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelPostProcessingModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelPostProcessingModels.C
$(THERMOPARCEL)/submodels/makeBasicThermoParcelWallInteractionModels.C
/* reacting parcel sub-models */ /* reacting parcel sub-models */
@ -53,9 +53,9 @@ $(REACTINGPARCEL)/submodels/makeBasicReactingParcelDispersionModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelDragModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelDragModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelHeatTransferModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelHeatTransferModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelInjectionModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelInjectionModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelPatchInteractionModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelPhaseChangeModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelPhaseChangeModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelPostProcessingModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelPostProcessingModels.C
$(REACTINGPARCEL)/submodels/makeBasicReactingParcelWallInteractionModels.C
/* reacting multiphase parcel sub-models */ /* reacting multiphase parcel sub-models */
@ -67,10 +67,10 @@ $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDispersionModels.
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDragModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDragModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPatchInteractionModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPostProcessingModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPostProcessingModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C
$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C
/* tracked reacting parcel sub-models */ /* tracked reacting parcel sub-models */
@ -81,9 +81,9 @@ $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelDispersionModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelDragModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelDragModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelHeatTransferModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelHeatTransferModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelInjectionModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelInjectionModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPatchInteractionModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPhaseChangeModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPhaseChangeModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPostProcessingModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPostProcessingModels.C
$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelWallInteractionModels.C
/* bolt-on models */ /* bolt-on models */

View File

@ -31,8 +31,8 @@ License
#include "DispersionModel.H" #include "DispersionModel.H"
#include "DragModel.H" #include "DragModel.H"
#include "InjectionModel.H" #include "InjectionModel.H"
#include "PatchInteractionModel.H"
#include "PostProcessingModel.H" #include "PostProcessingModel.H"
#include "WallInteractionModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -98,6 +98,14 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
*this *this
) )
), ),
patchInteractionModel_
(
PatchInteractionModel<KinematicCloud<ParcelType> >::New
(
particleProperties_,
*this
)
),
postProcessingModel_ postProcessingModel_
( (
PostProcessingModel<KinematicCloud<ParcelType> >::New PostProcessingModel<KinematicCloud<ParcelType> >::New
@ -106,14 +114,6 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
*this *this
) )
), ),
wallInteractionModel_
(
WallInteractionModel<KinematicCloud<ParcelType> >::New
(
particleProperties_,
*this
)
),
UIntegrator_ UIntegrator_
( (
vectorIntegrationScheme::New vectorIntegrationScheme::New

View File

@ -75,7 +75,7 @@ template<class CloudType>
class PostProcessingModel; class PostProcessingModel;
template<class CloudType> template<class CloudType>
class WallInteractionModel; class PatchInteractionModel;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class KinematicCloud Declaration Class KinematicCloud Declaration
@ -163,14 +163,14 @@ protected:
autoPtr<InjectionModel<KinematicCloud<ParcelType> > > autoPtr<InjectionModel<KinematicCloud<ParcelType> > >
injectionModel_; injectionModel_;
//- Patch interaction model
autoPtr<PatchInteractionModel<KinematicCloud<ParcelType> > >
patchInteractionModel_;
//- Post-processing model //- Post-processing model
autoPtr<PostProcessingModel<KinematicCloud<ParcelType> > > autoPtr<PostProcessingModel<KinematicCloud<ParcelType> > >
postProcessingModel_; postProcessingModel_;
//- Wall interaction model
autoPtr<WallInteractionModel<KinematicCloud<ParcelType> > >
wallInteractionModel_;
// Reference to the particle integration schemes // Reference to the particle integration schemes
@ -279,32 +279,34 @@ public:
// Sub-models // Sub-models
//- Return reference to dispersion model //- Return const-access to the dispersion model
inline const DispersionModel<KinematicCloud<ParcelType> >& inline const DispersionModel<KinematicCloud<ParcelType> >&
dispersion() const; dispersion() const;
//- Return reference to the dispersion model
inline DispersionModel<KinematicCloud<ParcelType> >& inline DispersionModel<KinematicCloud<ParcelType> >&
dispersion(); dispersion();
//- Return reference to drag model //- Return const-access to the drag model
inline const DragModel<KinematicCloud<ParcelType> >& inline const DragModel<KinematicCloud<ParcelType> >&
drag() const; drag() const;
//- Return reference to injection model //- Return const access to the injection model
inline const InjectionModel<KinematicCloud<ParcelType> >& inline const InjectionModel<KinematicCloud<ParcelType> >&
injection() const; injection() const;
//- Return reference to the injection model
inline InjectionModel<KinematicCloud<ParcelType> >& inline InjectionModel<KinematicCloud<ParcelType> >&
injection(); injection();
//- Return const-access to the patch interaction model
inline const PatchInteractionModel<KinematicCloud<ParcelType> >&
patchInteraction() const;
//- Return reference to post-processing model //- Return reference to post-processing model
inline PostProcessingModel<KinematicCloud<ParcelType> >& inline PostProcessingModel<KinematicCloud<ParcelType> >&
postProcessing(); postProcessing();
//- Return reference to wall interaction model
inline const WallInteractionModel<KinematicCloud<ParcelType> >&
wallInteraction() const;
// Integration schemes // Integration schemes

View File

@ -151,6 +151,14 @@ Foam::KinematicCloud<ParcelType>::injection() const
} }
template<class ParcelType>
inline const Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >&
Foam::KinematicCloud<ParcelType>::patchInteraction() const
{
return patchInteractionModel_;
}
template<class ParcelType> template<class ParcelType>
inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >& inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >&
Foam::KinematicCloud<ParcelType>::injection() Foam::KinematicCloud<ParcelType>::injection()
@ -167,14 +175,6 @@ Foam::KinematicCloud<ParcelType>::postProcessing()
} }
template<class ParcelType>
inline const Foam::WallInteractionModel<Foam::KinematicCloud<ParcelType> >&
Foam::KinematicCloud<ParcelType>::wallInteraction() const
{
return wallInteractionModel_;
}
template<class ParcelType> template<class ParcelType>
inline const Foam::vectorIntegrationScheme& inline const Foam::vectorIntegrationScheme&
Foam::KinematicCloud<ParcelType>::UIntegrator() const Foam::KinematicCloud<ParcelType>::UIntegrator() const

View File

@ -260,6 +260,8 @@ void Foam::KinematicParcel<ParcelType>::hitPatch
const label patchI const label patchI
) )
{ {
td.cloud().patchInteraction().correct(pp, this->face(), U_);
ParcelType& p = static_cast<ParcelType&>(*this); ParcelType& p = static_cast<ParcelType&>(*this);
td.cloud().postProcessing().postPatch(p, patchI); td.cloud().postProcessing().postPatch(p, patchI);
} }
@ -303,9 +305,7 @@ void Foam::KinematicParcel<ParcelType>::hitWallPatch
const wallPolyPatch& wpp, const wallPolyPatch& wpp,
TrackData& td TrackData& td
) )
{ {}
td.cloud().wallInteraction().correct(wpp, this->face(), U_);
}
template<class ParcelType> template<class ParcelType>

View File

@ -34,16 +34,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<basicKinematicParcel>); makePatchInteractionModel(KinematicCloud<basicKinematicParcel>);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
basicKinematicParcel basicKinematicParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -34,16 +34,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<basicReactingMultiphaseParcel>); makePatchInteractionModel(KinematicCloud<basicReactingMultiphaseParcel>);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
basicReactingMultiphaseParcel basicReactingMultiphaseParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -34,16 +34,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<basicReactingParcel>); makePatchInteractionModel(KinematicCloud<basicReactingParcel>);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
basicReactingParcel basicReactingParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -33,16 +33,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<basicThermoParcel>); makePatchInteractionModel(KinematicCloud<basicThermoParcel>);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
basicThermoParcel basicThermoParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -34,16 +34,16 @@ License
namespace Foam namespace Foam
{ {
makeWallInteractionModel(KinematicCloud<trackedReactingParcel>); makePatchInteractionModel(KinematicCloud<trackedReactingParcel>);
// Add instances of wall interaction model to the table // Add instances of wall interaction model to the table
makeWallInteractionModelType makePatchInteractionModelType
( (
Rebound, Rebound,
KinematicCloud, KinematicCloud,
trackedReactingParcel trackedReactingParcel
); );
makeWallInteractionModelType makePatchInteractionModelType
( (
StandardWallInteraction, StandardWallInteraction,
KinematicCloud, KinematicCloud,

View File

@ -24,43 +24,43 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "WallInteractionModel.H" #include "PatchInteractionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
Foam::autoPtr<Foam::WallInteractionModel<CloudType> > Foam::autoPtr<Foam::PatchInteractionModel<CloudType> >
Foam::WallInteractionModel<CloudType>::New Foam::PatchInteractionModel<CloudType>::New
( (
const dictionary& dict, const dictionary& dict,
CloudType& owner CloudType& owner
) )
{ {
word WallInteractionModelType(dict.lookup("WallInteractionModel")); word PatchInteractionModelType(dict.lookup("PatchInteractionModel"));
Info<< "Selecting WallInteractionModel " << WallInteractionModelType Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType
<< endl; << endl;
typename dictionaryConstructorTable::iterator cstrIter = typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(WallInteractionModelType); dictionaryConstructorTablePtr_->find(PatchInteractionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorIn
( (
"WallInteractionModel<CloudType>::New" "PatchInteractionModel<CloudType>::New"
"(" "("
"const dictionary&, " "const dictionary&, "
"CloudType&" "CloudType&"
")" ")"
) << "Unknown WallInteractionModelType type " ) << "Unknown PatchInteractionModelType type "
<< WallInteractionModelType << PatchInteractionModelType
<< ", constructor not in hash table" << nl << nl << ", constructor not in hash table" << nl << nl
<< " Valid WallInteractionModel types are:" << nl << " Valid PatchInteractionModel types are:" << nl
<< dictionaryConstructorTablePtr_->toc() << exit(FatalError); << dictionaryConstructorTablePtr_->toc() << exit(FatalError);
} }
return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner)); return autoPtr<PatchInteractionModel<CloudType> >(cstrIter()(dict, owner));
} }

View File

@ -24,12 +24,12 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "WallInteractionModel.H" #include "PatchInteractionModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
Foam::WallInteractionModel<CloudType>::WallInteractionModel Foam::PatchInteractionModel<CloudType>::PatchInteractionModel
( (
const dictionary& dict, const dictionary& dict,
CloudType& owner, CloudType& owner,
@ -45,7 +45,7 @@ Foam::WallInteractionModel<CloudType>::WallInteractionModel
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>
Foam::WallInteractionModel<CloudType>::~WallInteractionModel() Foam::PatchInteractionModel<CloudType>::~PatchInteractionModel()
{} {}
@ -53,14 +53,14 @@ Foam::WallInteractionModel<CloudType>::~WallInteractionModel()
template<class CloudType> template<class CloudType>
const CloudType& const CloudType&
Foam::WallInteractionModel<CloudType>::owner() const Foam::PatchInteractionModel<CloudType>::owner() const
{ {
return owner_; return owner_;
} }
template<class CloudType> template<class CloudType>
const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const const Foam::dictionary& Foam::PatchInteractionModel<CloudType>::dict() const
{ {
return dict_; return dict_;
} }
@ -68,7 +68,7 @@ const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const
template<class CloudType> template<class CloudType>
const Foam::dictionary& const Foam::dictionary&
Foam::WallInteractionModel<CloudType>::coeffDict() const Foam::PatchInteractionModel<CloudType>::coeffDict() const
{ {
return coeffDict_; return coeffDict_;
} }
@ -76,7 +76,7 @@ Foam::WallInteractionModel<CloudType>::coeffDict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewWallInteractionModel.C" #include "NewPatchInteractionModel.C"
// ************************************************************************* // // ************************************************************************* //

View File

@ -23,20 +23,19 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class Class
Foam::WallInteractionModel Foam::PatchInteractionModel
Description Description
Templated wall interaction model class Templated patch interaction model class
SourceFiles SourceFiles
WallInteractionModel.C PatchInteractionModel.C
NewWallInteractionModel.C NewPatchInteractionModel.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef WallInteractionModel_H #ifndef PatchInteractionModel_H
#define WallInteractionModel_H #define PatchInteractionModel_H
#include "IOdictionary.H" #include "IOdictionary.H"
#include "autoPtr.H" #include "autoPtr.H"
@ -48,18 +47,18 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class WallInteractionModel Declaration Class PatchInteractionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class CloudType> template<class CloudType>
class WallInteractionModel class PatchInteractionModel
{ {
// Private data // Private data
//- The cloud dictionary //- The cloud dictionary
const dictionary& dict_; const dictionary& dict_;
// reference to the owner cloud class //- Reference to the owner cloud class
CloudType& owner_; CloudType& owner_;
//- The coefficients dictionary //- The coefficients dictionary
@ -69,13 +68,13 @@ class WallInteractionModel
public: public:
//- Runtime type information //- Runtime type information
TypeName("WallInteractionModel"); TypeName("PatchInteractionModel");
//- Declare runtime constructor selection table //- Declare runtime constructor selection table
declareRunTimeSelectionTable declareRunTimeSelectionTable
( (
autoPtr, autoPtr,
WallInteractionModel, PatchInteractionModel,
dictionary, dictionary,
( (
const dictionary& dict, const dictionary& dict,
@ -88,7 +87,7 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
WallInteractionModel PatchInteractionModel
( (
const dictionary& dict, const dictionary& dict,
CloudType& owner, CloudType& owner,
@ -97,11 +96,11 @@ public:
//- Destructor //- Destructor
virtual ~WallInteractionModel(); virtual ~PatchInteractionModel();
//- Selector //- Selector
static autoPtr<WallInteractionModel<CloudType> > New static autoPtr<PatchInteractionModel<CloudType> > New
( (
const dictionary& dict, const dictionary& dict,
CloudType& owner CloudType& owner
@ -122,13 +121,13 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates heat transfer model //- Flag to indicate whether model activates patch interaction model
virtual bool active() const = 0; virtual bool active() const = 0;
//- Apply wall correction //- Apply velocity correction
virtual void correct virtual void correct
( (
const wallPolyPatch& wpp, const polyPatch& pp,
const label faceId, const label faceId,
vector& U vector& U
) const = 0; ) const = 0;
@ -141,22 +140,22 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeWallInteractionModel(CloudType) \ #define makePatchInteractionModel(CloudType) \
\ \
defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0); \ defineNamedTemplateTypeNameAndDebug(PatchInteractionModel<CloudType>, 0); \
\ \
defineTemplateRunTimeSelectionTable \ defineTemplateRunTimeSelectionTable \
( \ ( \
WallInteractionModel<CloudType>, \ PatchInteractionModel<CloudType>, \
dictionary \ dictionary \
); );
#define makeWallInteractionModelType(SS, CloudType, ParcelType) \ #define makePatchInteractionModelType(SS, CloudType, ParcelType) \
\ \
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
\ \
WallInteractionModel<CloudType<ParcelType> >:: \ PatchInteractionModel<CloudType<ParcelType> >:: \
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
add##SS##CloudType##ParcelType##ConstructorToTable_; add##SS##CloudType##ParcelType##ConstructorToTable_;
@ -164,7 +163,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "WallInteractionModel.C" # include "PatchInteractionModel.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -35,7 +35,7 @@ Foam::Rebound<CloudType>::Rebound
CloudType& cloud CloudType& cloud
) )
: :
WallInteractionModel<CloudType>(dict, cloud, typeName), PatchInteractionModel<CloudType>(dict, cloud, typeName),
UFactor_(readScalar(this->coeffDict().lookup("UFactor"))) UFactor_(readScalar(this->coeffDict().lookup("UFactor")))
{} {}
@ -59,12 +59,12 @@ bool Foam::Rebound<CloudType>::active() const
template<class CloudType> template<class CloudType>
void Foam::Rebound<CloudType>::correct void Foam::Rebound<CloudType>::correct
( (
const wallPolyPatch& wpp, const polyPatch& pp,
const label faceId, const label faceId,
vector& U vector& U
) const ) const
{ {
vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; vector nw = pp.faceAreas()[pp.whichFace(faceId)];
nw /= mag(nw); nw /= mag(nw);
scalar Un = U & nw; scalar Un = U & nw;

View File

@ -26,14 +26,14 @@ Class
Foam::Rebound Foam::Rebound
Description Description
Simple rebound wall interaction model Simple rebound patch interaction model
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef Rebound_H #ifndef Rebound_H
#define Rebound_H #define Rebound_H
#include "WallInteractionModel.H" #include "PatchInteractionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,7 +46,7 @@ namespace Foam
template<class CloudType> template<class CloudType>
class Rebound class Rebound
: :
public WallInteractionModel<CloudType> public PatchInteractionModel<CloudType>
{ {
// Private data // Private data
@ -64,11 +64,7 @@ public:
// Constructors // Constructors
//- Construct from dictionary //- Construct from dictionary
Rebound Rebound(const dictionary& dict, CloudType& cloud);
(
const dictionary& dict,
CloudType& cloud
);
//- Destructor //- Destructor
@ -77,13 +73,13 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates heat transfer model //- Flag to indicate whether model activates patch interaction model
bool active() const; bool active() const;
//- Apply wall correction //- Apply velocity correction
virtual void correct virtual void correct
( (
const wallPolyPatch& wpp, const polyPatch& pp,
const label faceId, const label faceId,
vector& U vector& U
) const; ) const;

View File

@ -35,7 +35,7 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
CloudType& cloud CloudType& cloud
) )
: :
WallInteractionModel<CloudType>(dict, cloud, typeName), PatchInteractionModel<CloudType>(dict, cloud, typeName),
e_(dimensionedScalar(this->coeffDict().lookup("e")).value()), e_(dimensionedScalar(this->coeffDict().lookup("e")).value()),
mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value()) mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value())
{} {}
@ -60,12 +60,14 @@ bool Foam::StandardWallInteraction<CloudType>::active() const
template <class CloudType> template <class CloudType>
void Foam::StandardWallInteraction<CloudType>::correct void Foam::StandardWallInteraction<CloudType>::correct
( (
const wallPolyPatch& wpp, const polyPatch& pp,
const label faceId, const label faceId,
vector& U vector& U
) const ) const
{ {
vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; if (isA<wallPolyPatch>(pp))
{
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
nw /= mag(nw); nw /= mag(nw);
scalar Un = U & nw; scalar Un = U & nw;
@ -77,6 +79,7 @@ void Foam::StandardWallInteraction<CloudType>::correct
} }
U -= mu_*Ut; U -= mu_*Ut;
}
} }

View File

@ -33,7 +33,7 @@ Description
#ifndef StandardWallInteraction_H #ifndef StandardWallInteraction_H
#define StandardWallInteraction_H #define StandardWallInteraction_H
#include "WallInteractionModel.H" #include "PatchInteractionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,14 +46,14 @@ namespace Foam
template<class CloudType> template<class CloudType>
class StandardWallInteraction class StandardWallInteraction
: :
public WallInteractionModel<CloudType> public PatchInteractionModel<CloudType>
{ {
// Private data // Private data
//- Elasticity //- Elasticity
const scalar e_; const scalar e_;
//-Restitution coefficient //- Restitution coefficient
const scalar mu_; const scalar mu_;
@ -66,11 +66,7 @@ public:
// Constructors // Constructors
//- Construct from dictionary //- Construct from dictionary
StandardWallInteraction StandardWallInteraction(const dictionary& dict, CloudType& cloud);
(
const dictionary& dict,
CloudType& cloud
);
//- Destructor //- Destructor
@ -79,13 +75,13 @@ public:
// Member Functions // Member Functions
//- Flag to indicate whether model activates heat transfer model //- Flag to indicate whether model activates patch interaction model
bool active() const; bool active() const;
//- Apply wall correction //- Apply velocity correction
virtual void correct virtual void correct
( (
const wallPolyPatch& wpp, const polyPatch& pp,
const label faceId, const label faceId,
vector& U vector& U
) const; ) const;

View File

@ -21,7 +21,7 @@ DragModel SphereDrag;
DispersionModel StochasticDispersionRAS; DispersionModel StochasticDispersionRAS;
WallInteractionModel StandardWallInteraction; PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshall; HeatTransferModel RanzMarshall;

View File

@ -21,7 +21,7 @@ DragModel SphereDrag;
DispersionModel StochasticDispersionRAS; DispersionModel StochasticDispersionRAS;
WallInteractionModel StandardWallInteraction; PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshall; HeatTransferModel RanzMarshall;

View File

@ -21,7 +21,7 @@ DragModel SphereDrag;
DispersionModel none; DispersionModel none;
WallInteractionModel StandardWallInteraction; PatchInteractionModel StandardWallInteraction;
HeatTransferModel RanzMarshall; HeatTransferModel RanzMarshall;