diff --git a/src/lagrangian/coalCombustion/Make/files b/src/lagrangian/coalCombustion/Make/files index 21bb591182..9d9b8b6267 100755 --- a/src/lagrangian/coalCombustion/Make/files +++ b/src/lagrangian/coalCombustion/Make/files @@ -11,9 +11,9 @@ coalParcel/submodels/makeCoalParcelDispersionModels.C coalParcel/submodels/makeCoalParcelInjectionModels.C coalParcel/submodels/makeCoalParcelHeatTransferModels.C coalParcel/submodels/makeCoalParcelPhaseChangeModels.C +coalParcel/submodels/makeCoalParcelPatchInteractionModels.C coalParcel/submodels/makeCoalParcelPostProcessingModels.C coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C -coalParcel/submodels/makeCoalParcelWallInteractionModels.C submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -22,4 +22,4 @@ submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C /* IOLists */ coalParcel/submodels/makeCoalParcelIOList.C -LIB = $(FOAM_USER_LIBBIN)/libcoalCombustion +LIB = $(FOAM_LIBBIN)/libcoalCombustion diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPatchInteractionModels.C similarity index 89% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C rename to src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPatchInteractionModels.C index fedf097d4f..3a8d81f490 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPatchInteractionModels.C @@ -34,16 +34,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); - // Add instances of wall interaction model to the table - makeWallInteractionModelType + // Add instances of patch interaction model to the table + makePatchInteractionModelType ( Rebound, KinematicCloud, coalParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 6132a243c2..350aca8d46 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -30,8 +30,8 @@ $(KINEMATICPARCEL)/defineBasicKinematicParcel.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDispersionModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDragModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelInjectionModels.C +$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelPatchInteractionModels.C $(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelPostProcessingModels.C -$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelWallInteractionModels.C /* thermo parcel sub-models */ @@ -41,8 +41,8 @@ $(THERMOPARCEL)/submodels/makeBasicThermoParcelDispersionModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelDragModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelHeatTransferModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelInjectionModels.C +$(THERMOPARCEL)/submodels/makeBasicThermoParcelPatchInteractionModels.C $(THERMOPARCEL)/submodels/makeBasicThermoParcelPostProcessingModels.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelWallInteractionModels.C /* reacting parcel sub-models */ @@ -53,9 +53,9 @@ $(REACTINGPARCEL)/submodels/makeBasicReactingParcelDispersionModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelDragModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelHeatTransferModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelInjectionModels.C +$(REACTINGPARCEL)/submodels/makeBasicReactingParcelPatchInteractionModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelPhaseChangeModels.C $(REACTINGPARCEL)/submodels/makeBasicReactingParcelPostProcessingModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelWallInteractionModels.C /* reacting multiphase parcel sub-models */ @@ -67,10 +67,10 @@ $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDispersionModels. $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDragModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C +$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPatchInteractionModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPostProcessingModels.C $(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C /* tracked reacting parcel sub-models */ @@ -81,9 +81,9 @@ $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelDispersionModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelDragModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelHeatTransferModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelInjectionModels.C +$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPatchInteractionModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPhaseChangeModels.C $(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelPostProcessingModels.C -$(TRACKEDREACTINGPARCEL)/submodels/makeTrackedReactingParcelWallInteractionModels.C /* bolt-on models */ diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index cca5d3db16..2f96ae1418 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -31,8 +31,8 @@ License #include "DispersionModel.H" #include "DragModel.H" #include "InjectionModel.H" +#include "PatchInteractionModel.H" #include "PostProcessingModel.H" -#include "WallInteractionModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -98,6 +98,14 @@ Foam::KinematicCloud::KinematicCloud *this ) ), + patchInteractionModel_ + ( + PatchInteractionModel >::New + ( + particleProperties_, + *this + ) + ), postProcessingModel_ ( PostProcessingModel >::New @@ -106,14 +114,6 @@ Foam::KinematicCloud::KinematicCloud *this ) ), - wallInteractionModel_ - ( - WallInteractionModel >::New - ( - particleProperties_, - *this - ) - ), UIntegrator_ ( vectorIntegrationScheme::New diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index cc18841e70..2dcd277a1d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -75,7 +75,7 @@ template class PostProcessingModel; template -class WallInteractionModel; +class PatchInteractionModel; /*---------------------------------------------------------------------------*\ Class KinematicCloud Declaration @@ -163,14 +163,14 @@ protected: autoPtr > > injectionModel_; + //- Patch interaction model + autoPtr > > + patchInteractionModel_; + //- Post-processing model autoPtr > > postProcessingModel_; - //- Wall interaction model - autoPtr > > - wallInteractionModel_; - // Reference to the particle integration schemes @@ -279,32 +279,34 @@ public: // Sub-models - //- Return reference to dispersion model + //- Return const-access to the dispersion model inline const DispersionModel >& dispersion() const; + //- Return reference to the dispersion model inline DispersionModel >& dispersion(); - //- Return reference to drag model + //- Return const-access to the drag model inline const DragModel >& drag() const; - //- Return reference to injection model + //- Return const access to the injection model inline const InjectionModel >& injection() const; + //- Return reference to the injection model inline InjectionModel >& injection(); + //- Return const-access to the patch interaction model + inline const PatchInteractionModel >& + patchInteraction() const; + //- Return reference to post-processing model inline PostProcessingModel >& postProcessing(); - //- Return reference to wall interaction model - inline const WallInteractionModel >& - wallInteraction() const; - // Integration schemes diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 08c16f439e..1f48632d15 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -151,6 +151,14 @@ Foam::KinematicCloud::injection() const } +template +inline const Foam::PatchInteractionModel >& +Foam::KinematicCloud::patchInteraction() const +{ + return patchInteractionModel_; +} + + template inline Foam::InjectionModel >& Foam::KinematicCloud::injection() @@ -167,14 +175,6 @@ Foam::KinematicCloud::postProcessing() } -template -inline const Foam::WallInteractionModel >& -Foam::KinematicCloud::wallInteraction() const -{ - return wallInteractionModel_; -} - - template inline const Foam::vectorIntegrationScheme& Foam::KinematicCloud::UIntegrator() const diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index 3a0eb231a2..3cc978375e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -260,6 +260,8 @@ void Foam::KinematicParcel::hitPatch const label patchI ) { + td.cloud().patchInteraction().correct(pp, this->face(), U_); + ParcelType& p = static_cast(*this); td.cloud().postProcessing().postPatch(p, patchI); } @@ -303,9 +305,7 @@ void Foam::KinematicParcel::hitWallPatch const wallPolyPatch& wpp, TrackData& td ) -{ - td.cloud().wallInteraction().correct(wpp, this->face(), U_); -} +{} template diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelPatchInteractionModels.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelPatchInteractionModels.C index 544cddaf2a..df8e32b577 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelPatchInteractionModels.C @@ -34,16 +34,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); // Add instances of wall interaction model to the table - makeWallInteractionModelType + makePatchInteractionModelType ( Rebound, KinematicCloud, basicKinematicParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPatchInteractionModels.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPatchInteractionModels.C index 3e7d911f8f..6f36845b5e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPatchInteractionModels.C @@ -34,16 +34,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); // Add instances of wall interaction model to the table - makeWallInteractionModelType + makePatchInteractionModelType ( Rebound, KinematicCloud, basicReactingMultiphaseParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPatchInteractionModels.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPatchInteractionModels.C index 637fd92aae..d5d5e77fc1 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPatchInteractionModels.C @@ -34,16 +34,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); // Add instances of wall interaction model to the table - makeWallInteractionModelType + makePatchInteractionModelType ( Rebound, KinematicCloud, basicReactingParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelPatchInteractionModels.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelPatchInteractionModels.C index 361ffffdb1..89f4f58231 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelPatchInteractionModels.C @@ -33,16 +33,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); // Add instances of wall interaction model to the table - makeWallInteractionModelType + makePatchInteractionModelType ( Rebound, KinematicCloud, basicThermoParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPatchInteractionModels.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPatchInteractionModels.C index 7bd64b5579..1f1fc781e5 100644 --- a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPatchInteractionModels.C @@ -34,16 +34,16 @@ License namespace Foam { - makeWallInteractionModel(KinematicCloud); + makePatchInteractionModel(KinematicCloud); // Add instances of wall interaction model to the table - makeWallInteractionModelType + makePatchInteractionModelType ( Rebound, KinematicCloud, trackedReactingParcel ); - makeWallInteractionModelType + makePatchInteractionModelType ( StandardWallInteraction, KinematicCloud, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C similarity index 74% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C index 522432191a..877881fb78 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C @@ -24,43 +24,43 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > -Foam::WallInteractionModel::New +Foam::autoPtr > +Foam::PatchInteractionModel::New ( const dictionary& dict, CloudType& owner ) { - word WallInteractionModelType(dict.lookup("WallInteractionModel")); + word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); - Info<< "Selecting WallInteractionModel " << WallInteractionModelType + Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallInteractionModelType); + dictionaryConstructorTablePtr_->find(PatchInteractionModelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "WallInteractionModel::New" + "PatchInteractionModel::New" "(" "const dictionary&, " "CloudType&" ")" - ) << "Unknown WallInteractionModelType type " - << WallInteractionModelType + ) << "Unknown PatchInteractionModelType type " + << PatchInteractionModelType << ", constructor not in hash table" << nl << nl - << " Valid WallInteractionModel types are:" << nl + << " Valid PatchInteractionModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr >(cstrIter()(dict, owner)); + return autoPtr >(cstrIter()(dict, owner)); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C similarity index 84% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 5ee04a0a1c..626d8fd9c4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -24,12 +24,12 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::WallInteractionModel::WallInteractionModel +Foam::PatchInteractionModel::PatchInteractionModel ( const dictionary& dict, CloudType& owner, @@ -45,7 +45,7 @@ Foam::WallInteractionModel::WallInteractionModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::WallInteractionModel::~WallInteractionModel() +Foam::PatchInteractionModel::~PatchInteractionModel() {} @@ -53,14 +53,14 @@ Foam::WallInteractionModel::~WallInteractionModel() template const CloudType& -Foam::WallInteractionModel::owner() const +Foam::PatchInteractionModel::owner() const { return owner_; } template -const Foam::dictionary& Foam::WallInteractionModel::dict() const +const Foam::dictionary& Foam::PatchInteractionModel::dict() const { return dict_; } @@ -68,7 +68,7 @@ const Foam::dictionary& Foam::WallInteractionModel::dict() const template const Foam::dictionary& -Foam::WallInteractionModel::coeffDict() const +Foam::PatchInteractionModel::coeffDict() const { return coeffDict_; } @@ -76,7 +76,7 @@ Foam::WallInteractionModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewWallInteractionModel.C" +#include "NewPatchInteractionModel.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H similarity index 79% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index 6f9648231f..f6cada656f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H @@ -23,20 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::WallInteractionModel - + Foam::PatchInteractionModel Description - Templated wall interaction model class + Templated patch interaction model class SourceFiles - WallInteractionModel.C - NewWallInteractionModel.C + PatchInteractionModel.C + NewPatchInteractionModel.C \*---------------------------------------------------------------------------*/ -#ifndef WallInteractionModel_H -#define WallInteractionModel_H +#ifndef PatchInteractionModel_H +#define PatchInteractionModel_H #include "IOdictionary.H" #include "autoPtr.H" @@ -48,18 +47,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class WallInteractionModel Declaration + Class PatchInteractionModel Declaration \*---------------------------------------------------------------------------*/ template -class WallInteractionModel +class PatchInteractionModel { // Private data //- The cloud dictionary const dictionary& dict_; - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; //- The coefficients dictionary @@ -69,13 +68,13 @@ class WallInteractionModel public: //- Runtime type information - TypeName("WallInteractionModel"); + TypeName("PatchInteractionModel"); //- Declare runtime constructor selection table declareRunTimeSelectionTable ( autoPtr, - WallInteractionModel, + PatchInteractionModel, dictionary, ( const dictionary& dict, @@ -88,7 +87,7 @@ public: // Constructors //- Construct from components - WallInteractionModel + PatchInteractionModel ( const dictionary& dict, CloudType& owner, @@ -97,11 +96,11 @@ public: //- Destructor - virtual ~WallInteractionModel(); + virtual ~PatchInteractionModel(); //- Selector - static autoPtr > New + static autoPtr > New ( const dictionary& dict, CloudType& owner @@ -122,13 +121,13 @@ public: // 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; - //- Apply wall correction + //- Apply velocity correction virtual void correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const = 0; @@ -141,22 +140,22 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeWallInteractionModel(CloudType) \ +#define makePatchInteractionModel(CloudType) \ \ - defineNamedTemplateTypeNameAndDebug(WallInteractionModel, 0); \ + defineNamedTemplateTypeNameAndDebug(PatchInteractionModel, 0); \ \ defineTemplateRunTimeSelectionTable \ ( \ - WallInteractionModel, \ + PatchInteractionModel, \ dictionary \ ); -#define makeWallInteractionModelType(SS, CloudType, ParcelType) \ +#define makePatchInteractionModelType(SS, CloudType, ParcelType) \ \ defineNamedTemplateTypeNameAndDebug(SS >, 0); \ \ - WallInteractionModel >:: \ + PatchInteractionModel >:: \ adddictionaryConstructorToTable > > \ add##SS##CloudType##ParcelType##ConstructorToTable_; @@ -164,7 +163,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "WallInteractionModel.C" +# include "PatchInteractionModel.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C similarity index 93% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C index a437c67edb..dd22ba5006 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C @@ -35,7 +35,7 @@ Foam::Rebound::Rebound CloudType& cloud ) : - WallInteractionModel(dict, cloud, typeName), + PatchInteractionModel(dict, cloud, typeName), UFactor_(readScalar(this->coeffDict().lookup("UFactor"))) {} @@ -59,12 +59,12 @@ bool Foam::Rebound::active() const template void Foam::Rebound::correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const { - vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; nw /= mag(nw); scalar Un = U & nw; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H similarity index 87% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H index da99ceec67..2e12050e54 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H @@ -26,14 +26,14 @@ Class Foam::Rebound Description - Simple rebound wall interaction model + Simple rebound patch interaction model \*---------------------------------------------------------------------------*/ #ifndef Rebound_H #define Rebound_H -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ namespace Foam template class Rebound : - public WallInteractionModel + public PatchInteractionModel { // Private data @@ -64,11 +64,7 @@ public: // Constructors //- Construct from dictionary - Rebound - ( - const dictionary& dict, - CloudType& cloud - ); + Rebound(const dictionary& dict, CloudType& cloud); //- Destructor @@ -77,13 +73,13 @@ public: // Member Functions - //- Flag to indicate whether model activates heat transfer model + //- Flag to indicate whether model activates patch interaction model bool active() const; - //- Apply wall correction + //- Apply velocity correction virtual void correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C similarity index 86% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index ef22613d26..64cfdec75b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -35,7 +35,7 @@ Foam::StandardWallInteraction::StandardWallInteraction CloudType& cloud ) : - WallInteractionModel(dict, cloud, typeName), + PatchInteractionModel(dict, cloud, typeName), e_(dimensionedScalar(this->coeffDict().lookup("e")).value()), mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value()) {} @@ -60,23 +60,26 @@ bool Foam::StandardWallInteraction::active() const template void Foam::StandardWallInteraction::correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const { - vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; - nw /= mag(nw); - - scalar Un = U & nw; - vector Ut = U - Un*nw; - - if (Un > 0) + if (isA(pp)) { - U -= (1.0 + e_)*Un*nw; - } + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; + nw /= mag(nw); - U -= mu_*Ut; + scalar Un = U & nw; + vector Ut = U - Un*nw; + + if (Un > 0) + { + U -= (1.0 + e_)*Un*nw; + } + + U -= mu_*Ut; + } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H similarity index 87% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H index afdc572103..6d529dcd77 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H @@ -33,7 +33,7 @@ Description #ifndef StandardWallInteraction_H #define StandardWallInteraction_H -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,14 +46,14 @@ namespace Foam template class StandardWallInteraction : - public WallInteractionModel + public PatchInteractionModel { // Private data //- Elasticity const scalar e_; - //-Restitution coefficient + //- Restitution coefficient const scalar mu_; @@ -66,11 +66,7 @@ public: // Constructors //- Construct from dictionary - StandardWallInteraction - ( - const dictionary& dict, - CloudType& cloud - ); + StandardWallInteraction(const dictionary& dict, CloudType& cloud); //- Destructor @@ -79,13 +75,13 @@ public: // Member Functions - //- Flag to indicate whether model activates heat transfer model + //- Flag to indicate whether model activates patch interaction model bool active() const; - //- Apply wall correction + //- Apply velocity correction virtual void correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties index 4184f29b98..98a4cb0064 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties +++ b/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -21,7 +21,7 @@ DragModel SphereDrag; DispersionModel StochasticDispersionRAS; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties index aec7c430a7..2ec8829373 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties +++ b/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -21,7 +21,7 @@ DragModel SphereDrag; DispersionModel StochasticDispersionRAS; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties index 470165c7f2..dc4901bba2 100644 --- a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -21,7 +21,7 @@ DragModel SphereDrag; DispersionModel none; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall;