/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 3 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, see . Class Foam::RecycleInteraction Group grpLagrangianIntermediatePatchInteractionSubModels Description Patch interaction model to perform parcel transfer and recycle from one patch to another. Parcels that hit a given 'outflow' patch are recycled to a given 'inflow' patch, with optional: - recycle fraction [0-1] Usage Minimal example by using \c constant/reactingCloud1Properties.subModels.multiInteractionCoeffs \verbatim multiInteractionCoeffs { ... model1 { // Mandatory entries (unmodifiable) patchInteractionModel recycleInteraction; recycleInteractionCoeffs { recyclePatches ( ( ) ( ) ... ); recycleFraction 0.8; // [0-1] // Optional entries (unmodifiable) outputByInjectorId false; } } ... } \endverbatim where the entries mean: \table Property | Description | Type | Reqd | Dflt patchInteractionModel | Type name: recycleInteraction | word | yes | - recyclePatches | Names of outlet-inlet patch pairs | (word word) | yes | - recycleFraction | Fraction of parcels recycled from outlet to inlet | scalar | yes | - outputByInjectorId | Flag to output escaped/mass particles sorted by injectorID | bool | no | false \endtable SourceFiles RecycleInteraction.C \*---------------------------------------------------------------------------*/ #ifndef RecycleInteraction_H #define RecycleInteraction_H #include "patchInjectionBase.H" #include "IDLList.H" #include "PtrList.H" #include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class RecycleInteraction Declaration \*---------------------------------------------------------------------------*/ template class RecycleInteraction : public PatchInteractionModel { protected: typedef typename CloudType::parcelType parcelType; // Protected Data //- Reference to mesh const fvMesh& mesh_; //- Outlet-inlet patch pair to apply parcel recycling List> recyclePatches_; //- Patch IDs of recyclePatches List> recyclePatchesIds_; //- Parcel IDs of recycled parcels List> recycledParcels_; // Bookkeeping for particle fates //- Number of parcels removed List> nRemoved_; //- Mass of parcels removed List> massRemoved_; //- Number of parcels injected List> nInjected_; //- Mass of parcels injected List> massInjected_; //- Injector ID to local index map Map