From 8ff163713d013c73ae24393e68db3b0a3b1906a8 Mon Sep 17 00:00:00 2001
From: Andrew Heather <a.heather@opencfd.co.uk>
Date: Wed, 17 May 2017 20:48:00 +0100
Subject: [PATCH] BUG: Lagrangian - corrected particle LocalInteraction
 behaviour on coupled patches.  See reactingParcelFoam/filter tutorial example

---
 .../Templates/KinematicParcel/KinematicParcel.C    | 14 +++++++-------
 .../LocalInteraction/patchInteractionDataList.C    |  1 -
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
index fa213c67d3c..b593d4393bf 100644
--- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
+++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
@@ -402,16 +402,16 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
         td.keepParticle
     );
 
-    // Invoke surface film model
-    if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
+    if (isA<processorPolyPatch>(pp))
     {
-        // All interactions done
-        return true;
+        // Skip processor patches
+        return false;
     }
-    else if (pp.coupled())
+    else if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
     {
-        // Don't apply the patchInteraction models to coupled boundaries
-        return false;
+        // Surface film model consumes the interaction, i.e. all
+        // interactions done
+        return true;
     }
     else
     {
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
index 4ee514d8c48..9033ab2b892 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C
@@ -26,7 +26,6 @@ License
 #include "patchInteractionDataList.H"
 #include "stringListOps.H"
 #include "emptyPolyPatch.H"
-#include "cyclicAMIPolyPatch.H"
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
-- 
GitLab