From 15300fc43182d1075248f1911a34451452d3a8ec Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Tue, 15 Mar 2016 22:37:48 +0000
Subject: [PATCH] lagrangian::StandardWallInteraction: accumulate escaping mass
 Do not set accumulated properties to 0 on output

Updates provided by Karl Meredith
---
 .../StandardWallInteraction/StandardWallInteraction.C  | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
index 3b19a02acc3..74c7aa3efd6 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -124,6 +124,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
                 active = false;
                 U = vector::zero;
                 nEscape_++;
+                massEscape_ += p.mass()*p.nParticle();
                 break;
             }
             case PatchInteractionModel<CloudType>::itStick:
@@ -201,16 +202,9 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
     if (this->outputTime())
     {
         this->setModelProperty("nEscape", npe);
-        nEscape_ = 0;
-
         this->setModelProperty("massEscape", mpe);
-        massEscape_ = 0.0;
-
         this->setModelProperty("nStick", nps);
-        nStick_ = 0;
-
         this->setModelProperty("massStick", mps);
-        massStick_ = 0.0;
     }
 }
 
-- 
GitLab