mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
PatchInteractionModel: Skip application of patch interaction model for
coupled patches, to prevent rebound/stick/etc... on these patches. Also added "none" interaction type to LocalInteraction, which reverts the patch interaction to the fundamental behaviour. This is primarily useful for non-coupled constraint types. Resolves https://bugs.openfoam.org/view.php?id=2458
This commit is contained in:
@ -410,6 +410,11 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
// All interactions done
|
||||
return true;
|
||||
}
|
||||
else if (pp.coupled())
|
||||
{
|
||||
// Don't apply the patchInteraction models to coupled boundaries
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invoke patch interaction model
|
||||
|
||||
@ -191,6 +191,10 @@ bool Foam::LocalInteraction<CloudType>::correct
|
||||
|
||||
switch (it)
|
||||
{
|
||||
case PatchInteractionModel<CloudType>::itNone:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
case PatchInteractionModel<CloudType>::itEscape:
|
||||
{
|
||||
scalar dm = p.mass()*p.nParticle();
|
||||
|
||||
@ -74,7 +74,6 @@ Foam::patchInteractionDataList::patchInteractionDataList
|
||||
(
|
||||
!pp.coupled()
|
||||
&& !isA<emptyPolyPatch>(pp)
|
||||
&& !isA<cyclicAMIPolyPatch>(pp)
|
||||
&& applyToPatch(pp.index()) < 0
|
||||
)
|
||||
{
|
||||
|
||||
@ -51,6 +51,11 @@ Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord
|
||||
|
||||
switch (itEnum)
|
||||
{
|
||||
case itNone:
|
||||
{
|
||||
it = "none";
|
||||
break;
|
||||
}
|
||||
case itRebound:
|
||||
{
|
||||
it = "rebound";
|
||||
@ -82,6 +87,10 @@ Foam::PatchInteractionModel<CloudType>::wordToInteractionType
|
||||
const word& itWord
|
||||
)
|
||||
{
|
||||
if (itWord == "none")
|
||||
{
|
||||
return itNone;
|
||||
}
|
||||
if (itWord == "rebound")
|
||||
{
|
||||
return itRebound;
|
||||
|
||||
@ -65,6 +65,7 @@ public:
|
||||
// Interaction types
|
||||
enum interactionType
|
||||
{
|
||||
itNone,
|
||||
itRebound,
|
||||
itStick,
|
||||
itEscape,
|
||||
|
||||
@ -116,6 +116,10 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
||||
{
|
||||
switch (interactionType_)
|
||||
{
|
||||
case PatchInteractionModel<CloudType>::itNone:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
case PatchInteractionModel<CloudType>::itEscape:
|
||||
{
|
||||
keepParticle = false;
|
||||
|
||||
Reference in New Issue
Block a user