diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C index f9c135718947fab6e8637c6ca0b24221864f2630..079f92333e7ef4ea01ae9bcb64289ba9ebe6066b 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C @@ -78,6 +78,17 @@ bool Foam::DsmcParcel<ParcelType>::move } +template<class ParcelType> +template<class TrackData> +void Foam::DsmcParcel<ParcelType>::hitPatch +( + const polyPatch&, + TrackData& td, + const label patchI +) +{} + + template<class ParcelType> template<class TrackData> void Foam::DsmcParcel<ParcelType>::hitProcessorPatch diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H index bbc2fd1539b2fa4f5a267c2b942fe3373ebe635b..9bef41391b59a29101b2126897f0f71b756f1e3f 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H @@ -239,6 +239,16 @@ public: // Patch interactions + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + template<class TrackData> + void hitPatch + ( + const polyPatch&, + TrackData& td, + const label patchI + ); + //- Overridable function to handle the particle hitting a // processorPatch template<class TrackData> diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C index ac45040c096840c13064609ed9b80de5b6ef4543..c24e4f46016ec8be767d1378f559a2332088e026 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C @@ -241,6 +241,24 @@ void Foam::molecule::setSiteSizes(label size) } +void Foam::molecule::hitPatch +( + const polyPatch&, + molecule::trackData&, + const label +) +{} + + +void Foam::molecule::hitPatch +( + const polyPatch&, + int&, + const label +) +{} + + void Foam::molecule::hitProcessorPatch ( const processorPolyPatch&, diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index 04e33428e99948adae78dbf6645dabc258d42ddd..cad7dadf175f2de01a9265dd6fd2ffbdf25c891b 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -256,7 +256,8 @@ public: // Member Functions - //- Tracking + // Tracking + bool move(trackData&); void transformProperties(const tensor& T); @@ -267,6 +268,7 @@ public: void setSiteSizes(label size); + // Access inline const tensor& Q() const; @@ -305,8 +307,27 @@ public: inline label id() const; + // Member Operators + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + void hitPatch + ( + const polyPatch&, + molecule::trackData& td, + const label patchI + ); + + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions without trackData + void hitPatch + ( + const polyPatch& p, + int& td, + const label patchI + ); + //- Overridable function to handle the particle hitting a processorPatch void hitProcessorPatch ( diff --git a/src/lagrangian/solidParticle/solidParticle.C b/src/lagrangian/solidParticle/solidParticle.C index 7b9fdf18a6444245442508c3dcd2971b558c0671..4760afd833a73d5c16d240f825c442b4ae0f6484 100644 --- a/src/lagrangian/solidParticle/solidParticle.C +++ b/src/lagrangian/solidParticle/solidParticle.C @@ -98,6 +98,24 @@ bool Foam::solidParticle::move(solidParticle::trackData& td) } +void Foam::solidParticle::hitPatch +( + const polyPatch&, + solidParticle::trackData&, + const label +) +{} + + +void Foam::solidParticle::hitPatch +( + const polyPatch&, + int&, + const label +) +{} + + void Foam::solidParticle::hitProcessorPatch ( const processorPolyPatch&, diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H index a0977520cc07a9e6f63ea47162fa7b59de26f722..4d20aeb3c99ae351d63903cd46927e04ba1d8144 100644 --- a/src/lagrangian/solidParticle/solidParticle.H +++ b/src/lagrangian/solidParticle/solidParticle.H @@ -163,68 +163,91 @@ public: inline scalar wallImpactDistance(const vector& n) const; - //- Tracking - bool move(trackData&); + // Tracking + //- Move + bool move(trackData&); - //- Overridable function to handle the particle hitting a processorPatch - void hitProcessorPatch - ( - const processorPolyPatch&, - solidParticle::trackData& td - ); - //- Overridable function to handle the particle hitting a processorPatch - //- without trackData - void hitProcessorPatch - ( - const processorPolyPatch&, - int& - ); + // Patch interactions - //- Overridable function to handle the particle hitting a wallPatch - void hitWallPatch - ( - const wallPolyPatch&, - solidParticle::trackData& td - ); + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + void hitPatch + ( + const polyPatch&, + solidParticle::trackData& td, + const label patchI + ); - //- Overridable function to handle the particle hitting a wallPatch - //- without trackData - void hitWallPatch - ( - const wallPolyPatch&, - int& - ); + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions without trackData + void hitPatch + ( + const polyPatch& p, + int& td, + const label patchI + ); - //- Overridable function to handle the particle hitting a polyPatch - void hitPatch - ( - const polyPatch&, - solidParticle::trackData& td - ); + //- Overridable function to handle the particle hitting a + // processorPatch + void hitProcessorPatch + ( + const processorPolyPatch&, + solidParticle::trackData& td + ); - //- Overridable function to handle the particle hitting a polyPatch - //- without trackData - void hitPatch - ( - const polyPatch&, - int& - ); + //- Overridable function to handle the particle hitting a + // processorPatch without trackData + void hitProcessorPatch + ( + const processorPolyPatch&, + int& + ); - //- Transform the physical properties of the particle - // according to the given transformation tensor - void transformProperties - ( - const tensor& T - ); + //- Overridable function to handle the particle hitting a wallPatch + void hitWallPatch + ( + const wallPolyPatch&, + solidParticle::trackData& td + ); - //- Transform the physical properties of the particle - // according to the given separation vector - void transformProperties - ( - const vector& separation - ); + //- Overridable function to handle the particle hitting a wallPatch + //- without trackData + void hitWallPatch + ( + const wallPolyPatch&, + int& + ); + + //- Overridable function to handle the particle hitting a polyPatch + void hitPatch + ( + const polyPatch&, + solidParticle::trackData& td + ); + + //- Overridable function to handle the particle hitting a polyPatch + //- without trackData + void hitPatch + ( + const polyPatch&, + int& + ); + + //- Transform the physical properties of the particle + // according to the given transformation tensor + void transformProperties + ( + const tensor& T + ); + + //- Transform the physical properties of the particle + // according to the given separation vector + void transformProperties + ( + const vector& separation + ); // I-O