diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 270bc40e2e..6695181469 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -47,6 +47,7 @@ $(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C /* bolt-on models */ submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C +submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C /* data entries */ diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index 1ae536e4db..8c020d3739 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -286,7 +286,13 @@ bool Foam::KinematicParcel::hitPatch ParcelType& p = static_cast(*this); td.cloud().postProcessing().postPatch(p, patchI); - return td.cloud().patchInteraction().correct(pp, this->face(), U_); + return td.cloud().patchInteraction().correct + ( + pp, + this->face(), + td.keepParticle, + U_ + ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index ffe1f09631..3beaa8abaf 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -26,7 +26,7 @@ License #include "LocalInteraction.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // template Foam::label Foam::LocalInteraction::applyToPatch @@ -46,7 +46,7 @@ Foam::label Foam::LocalInteraction::applyToPatch } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template Foam::LocalInteraction::LocalInteraction @@ -62,6 +62,7 @@ Foam::LocalInteraction::LocalInteraction const polyMesh& mesh = cloud.mesh(); const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); + // check that user patches are valid region patches forAll(patchData_, patchI) { const word& patchName = patchData_[patchI].patchName(); @@ -70,7 +71,7 @@ Foam::LocalInteraction::LocalInteraction { FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") << "Patch " << patchName << " not found. Available patches " - << "are: " << bMesh.names() << exit(FatalError); + << "are: " << bMesh.names() << nl << exit(FatalError); } } @@ -95,6 +96,26 @@ Foam::LocalInteraction::LocalInteraction << "interaction. Please specify data for patches:" << nl << badWalls << nl << exit(FatalError); } + + // check that interactions are valid/specified + forAll(patchData_, patchI) + { + const word& interactionTypeName = + patchData_[patchI].interactionTypeName(); + const typename PatchInteractionModel::interactionType& it = + this->wordToInteractionType(interactionTypeName); + + if (it == PatchInteractionModel::itOther) + { + const word& patchName = patchData_[patchI].patchName(); + FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") + << "Unknown patch interaction type " + << interactionTypeName << " for patch " << patchName + << ". Valid selections are:" + << this->PatchInteractionModel::interactionTypeNames_ + << nl << exit(FatalError); + } + } } @@ -105,7 +126,7 @@ Foam::LocalInteraction::~LocalInteraction() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template bool Foam::LocalInteraction::active() const @@ -119,6 +140,7 @@ bool Foam::LocalInteraction::correct ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const { @@ -126,18 +148,64 @@ bool Foam::LocalInteraction::correct if (patchI >= 0) { - vector nw = pp.faceAreas()[pp.whichFace(faceId)]; - nw /= mag(nw); + typename PatchInteractionModel::interactionType it = + this->wordToInteractionType + ( + patchData_[patchI].interactionTypeName() + ); - scalar Un = U & nw; - vector Ut = U - Un*nw; - - if (Un > 0) + switch (it) { - U -= (1.0 + patchData_[patchI].e())*Un*nw; - } + case PatchInteractionModel::itEscape: + { + keepParticle = false; + U = vector::zero; + break; + } + case PatchInteractionModel::itStick: + { + keepParticle = true; + U = vector::zero; + break; + } + case PatchInteractionModel::itRebound: + { + keepParticle = true; - U -= patchData_[patchI].mu()*Ut; + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; + nw /= mag(nw); + + scalar Un = U & nw; + vector Ut = U - Un*nw; + + if (Un > 0) + { + U -= (1.0 + patchData_[patchI].e())*Un*nw; + } + + U -= patchData_[patchI].mu()*Ut; + + break; + } + default: + { + FatalErrorIn + ( + "bool LocalInteraction::correct" + "(" + "const polyPatch&, " + "const label, " + "bool&, " + "vector&" + ") const" + ) << "Unknown interaction type " + << patchData_[patchI].interactionTypeName() + << "(" << it << ") for patch " + << patchData_[patchI].patchName() + << ". Valid selections are:" << this->interactionTypeNames_ + << endl << abort(FatalError); + } + } return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H index 49d36e9c6d..902c4316e5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H @@ -34,7 +34,7 @@ Description #define LocalInteraction_H #include "PatchInteractionModel.H" -#include "dictionaryEntry.H" +#include "patchInteractionData.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,78 +49,6 @@ class LocalInteraction : public PatchInteractionModel { - class patchInteractionData - { - // Private data - - //- Patch name - word patchName_; - - //- Elasticity coefficient - scalar e_; - - //- Restitution coefficient - scalar mu_; - - - public: - - //- Construct null - patchInteractionData() - : - patchName_("unknownPatch"), - e_(0.0), - mu_(0.0) - {} - - //- Construct from dictionary - patchInteractionData(const dictionary& dict); - - // Member functions - - // Access - - //- Return const access to the patch name - const word& patchName() const - { - return patchName_; - } - - //- Return const access to the elasticity coefficient - scalar e() const - { - return e_; - } - - //- Return const access to the restitution coefficient - scalar mu() const - { - return mu_; - } - - - // I-O - - //- Istream operator - friend Istream& operator>>(Istream& is, patchInteractionData& pid) - { - is.check - ( - "Istream& operator>>" - "(Istream&, patchInteractionData&)" - ); - - const dictionaryEntry entry(dictionary::null, is); - - pid.patchName_ = entry.keyword(); - entry.lookup("e") >> pid.e_; - entry.lookup("mu") >> pid.mu_; - - return is; - } - }; - - // Private data //- List of participating patches @@ -164,6 +92,7 @@ public: ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C new file mode 100644 index 0000000000..f5569fa94d --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C @@ -0,0 +1,89 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "patchInteractionData.H" +#include "dictionaryEntry.H" +#include "PatchInteractionModel.H" + +// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // + +Foam::patchInteractionData::patchInteractionData() +: + interactionTypeName_("unknownInteractionTypeName"), + patchName_("unknownPatch"), + e_(0.0), + mu_(0.0) +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +const Foam::word& Foam::patchInteractionData::interactionTypeName() const +{ + return interactionTypeName_; +} + + +const Foam::word& Foam::patchInteractionData::patchName() const +{ + return patchName_; +} + + +Foam::scalar Foam::patchInteractionData::e() const +{ + return e_; +} + + +Foam::scalar Foam::patchInteractionData::mu() const +{ + return mu_; +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +Foam::Istream& Foam::operator>> +( + Istream& is, + patchInteractionData& pid +) +{ + is.check("Istream& operator>>(Istream&, patchInteractionData&)"); + + const dictionaryEntry entry(dictionary::null, is); + + pid.patchName_ = entry.keyword(); + entry.lookup("type") >> pid.interactionTypeName_; + pid.e_ = entry.lookupOrDefault("e", 1.0); + pid.mu_ = entry.lookupOrDefault("mu", 0.0); + + return is; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H new file mode 100644 index 0000000000..d53bb3dcf6 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.H @@ -0,0 +1,157 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::patchInteractionData + +Description + Helper class for the LocalInteraction patch interaction model + +\*---------------------------------------------------------------------------*/ + +#ifndef patchInteractionData_H +#define patchInteractionData_H + +#include "Istream.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class patchInteractionData Declaration +\*---------------------------------------------------------------------------*/ + +// Forward declaration of classes +class patchInteractionData; + +// Forward declaration of friend functions +Istream& operator>> +( + Istream& is, + patchInteractionData& pid +); + + +class patchInteractionData +{ + // Private data + + //- Interaction type name + word interactionTypeName_; + + //- Patch name + word patchName_; + + //- Elasticity coefficient + scalar e_; + + //- Restitution coefficient + scalar mu_; + + +public: + + // Constructor + + //- Construct null + patchInteractionData(); + + + // Member functions + + // Access + + //- Return const access to the interaction type name + const word& interactionTypeName() const; + + //- Return const access to the patch name + const word& patchName() const; + + //- Return const access to the elasticity coefficient + scalar e() const; + + //- Return const access to the restitution coefficient + scalar mu() const; + + + // I-O + + //- Istream operator + friend Istream& operator>> + ( + Istream& is, + patchInteractionData& pid + ); +/* { + is.check + ( + "Istream& operator>>" + "(Istream&, patchInteractionData&)" + ); + + const dictionaryEntry entry(dictionary::null, is); + + pid.patchName_ = entry.keyword(); + entry.lookup("type") >> pid.interactionTypeName_; + pid.e_ = entry.lookupOrDefault("e", 1.0); + pid.mu_ = entry.lookupOrDefault("mu", 0.0); + + if + ( + PatchInteractionModel::wordToInteractionType + ( + pid.interactionTypeName_ + ) + == PatchInteractionModel::itOther) + { + FatalErrorIn + ( + "friend Istream& operator>>" + "(" + "Istream&, " + "patchInteractionData&" + ")" + ) << "Unknown patch interaction type " + << pid.interactionTypeName_ + << ". Valid selections are:" + << PatchInteractionModel:: + interactionTypeNames_ + << endl << abort(FatalError); + } + + return is; + } +*/}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 117e6005c8..873d5fb346 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -26,6 +26,76 @@ License #include "PatchInteractionModel.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template +Foam::wordList Foam::PatchInteractionModel::interactionTypeNames_ +( + IStringStream + ( + "(rebound stick escape)" + )() +); + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::word Foam::PatchInteractionModel::interactionTypeToWord +( + const interactionType& itEnum +) +{ + switch (itEnum) + { + case itRebound: + { + return "rebound"; + break; + } + case itStick: + { + return "stick"; + break; + } + case itEscape: + { + return "escape"; + break; + } + default: + { + return "other"; + } + } +} + + +template +typename Foam::PatchInteractionModel::interactionType +Foam::PatchInteractionModel::wordToInteractionType +( + const word& itWord +) +{ + if (itWord == "rebound") + { + return itRebound; + } + else if (itWord == "stick") + { + return itStick; + } + else if (itWord == "escape") + { + return itEscape; + } + else + { + return itOther; + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index 986d30d3a1..cf9eb2b05c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H @@ -40,6 +40,7 @@ SourceFiles #include "IOdictionary.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" +#include "polyPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,6 +54,24 @@ namespace Foam template class PatchInteractionModel { +public: + + // Public enumerations + + // Interaction types + enum interactionType + { + itRebound, + itStick, + itEscape, + itOther + }; + + static wordList interactionTypeNames_; + + +private: + // Private data //- The cloud dictionary @@ -121,6 +140,12 @@ public: // Member Functions + //- Convert interaction result to word + static word interactionTypeToWord(const interactionType& itEnum); + + //- Convert word to interaction result + static interactionType wordToInteractionType(const word& itWord); + //- Flag to indicate whether model activates patch interaction model virtual bool active() const = 0; @@ -130,6 +155,7 @@ public: ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const = 0; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C index e5cfdd3540..44d8915497 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C @@ -61,9 +61,12 @@ bool Foam::Rebound::correct ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const { + keepParticle = true; + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; nw /= mag(nw); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H index 7e3126996f..3980ff9c4d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H @@ -82,6 +82,7 @@ public: ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index f87c0dd08b..fcf8f04a2f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -36,9 +36,45 @@ Foam::StandardWallInteraction::StandardWallInteraction ) : PatchInteractionModel(dict, cloud, typeName), - e_(dimensionedScalar(this->coeffDict().lookup("e")).value()), - mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value()) -{} + interactionType_ + ( + this->wordToInteractionType(this->coeffDict().lookup("type")) + ), + e_(0.0), + mu_(0.0) +{ + switch (interactionType_) + { + case PatchInteractionModel::itOther: + { + word interactionTypeName(this->coeffDict().lookup("type")); + + FatalErrorIn + ( + "StandardWallInteraction::StandardWallInteraction" + "(" + "const dictionary&, " + "CloudType& cloud" + ")" + ) << "Unknown interaction result type " + << interactionTypeName + << ". Valid selections are:" << this->interactionTypeNames_ + << endl << exit(FatalError); + + break; + } + case PatchInteractionModel::itRebound: + { + e_ = this->coeffDict().lookupOrDefault("e", 1.0); + mu_ = this->coeffDict().lookupOrDefault("mu", 0.0); + break; + } + default: + { + // do nothing + } + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -62,23 +98,62 @@ bool Foam::StandardWallInteraction::correct ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const { if (isA(pp)) { - vector nw = pp.faceAreas()[pp.whichFace(faceId)]; - nw /= mag(nw); - - scalar Un = U & nw; - vector Ut = U - Un*nw; - - if (Un > 0) + switch (interactionType_) { - U -= (1.0 + e_)*Un*nw; - } + case PatchInteractionModel::itEscape: + { + keepParticle = false; + U = vector::zero; + break; + } + case PatchInteractionModel::itStick: + { + keepParticle = true; + U = vector::zero; + break; + } + case PatchInteractionModel::itRebound: + { + keepParticle = true; - U -= mu_*Ut; + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; + nw /= mag(nw); + + scalar Un = U & nw; + vector Ut = U - Un*nw; + + if (Un > 0) + { + U -= (1.0 + e_)*Un*nw; + } + + U -= mu_*Ut; + + break; + } + default: + { + FatalErrorIn + ( + "bool StandardWallInteraction::correct" + "(" + "const polyPatch&, " + "const label, " + "bool&, " + "vector&" + ") const" + ) << "Unknown interaction type " + << this->interactionTypeToWord(interactionType_) + << "(" << interactionType_ << ")" << endl + << abort(FatalError); + } + } return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H index 3e2175e469..ab1f198bdc 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H @@ -26,7 +26,19 @@ Class Foam::StandardWallInteraction Description - Wall interaction based on restitution and elasticity coefficients + Wall interaction model. Three choices: + - rebound - optionally specify elasticity and resitution coefficients + - stick - particles assigined zero velocity + - escape - remove particle from the domain + + Example usage: + + StandardWallInteractionCoeffs + { + type rebound; // stick, escape + e 1; // optional - elasticity coeff + mu 0; // optional - restitution coeff + } \*---------------------------------------------------------------------------*/ @@ -40,7 +52,7 @@ Description namespace Foam { /*---------------------------------------------------------------------------*\ - Class StandardWallInteraction Declaration + Class StandardWallInteraction Declaration \*---------------------------------------------------------------------------*/ template @@ -48,13 +60,19 @@ class StandardWallInteraction : public PatchInteractionModel { - // Private data +protected: - //- Elasticity - const scalar e_; + // Protected data + + //- Interaction type + typename PatchInteractionModel::interactionType + interactionType_; + + //- Elasticity coefficient + scalar e_; //- Restitution coefficient - const scalar mu_; + scalar mu_; public: @@ -84,6 +102,7 @@ public: ( const polyPatch& pp, const label faceId, + bool& keepParticle, vector& U ) const; }; diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties index f270546201..ef11516391 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -107,8 +107,9 @@ ManualInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; + e 1; + mu 0; } RanzMarshallCoeffs diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties index a17be1e36f..f4cf89a700 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -92,8 +92,9 @@ ManualInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; + e 1; + mu 0; } RanzMarshallCoeffs diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties index 5c99dbf554..b1b89e17eb 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties @@ -110,8 +110,7 @@ ReactingLookupTableInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; } LocalInteractionCoeffs @@ -120,13 +119,11 @@ LocalInteractionCoeffs ( walls { - e 1; - mu 0; + type rebound; } cycLeft { - e 1; - mu 0; + type rebound; } ); } diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties index 95f4df9ceb..97619b95a7 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -99,8 +99,7 @@ ManualInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; } RanzMarshallCoeffs diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties index f88d7e1090..469aaa10f6 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties @@ -104,8 +104,7 @@ ConeInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; } diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties index 67823f6aab..59402e4ea3 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties @@ -92,8 +92,7 @@ ManualInjectionCoeffs StandardWallInteractionCoeffs { - e e [ 0 0 0 0 0 ] 1; - mu mu [ 0 0 0 0 0 ] 0; + type rebound; } RanzMarshallCoeffs