diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index f3a6866a97..9165621d6c 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -48,6 +48,7 @@ $(RADIATION)/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission. $(RADIATION)/scatter/cloudScatter/cloudScatter.C submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C +submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C KINEMATICINJECTION=submodels/Kinematic/InjectionModel $(KINEMATICINJECTION)/KinematicLookupTableInjection/kinematicParcelInjectionData.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 56a9ce61a6..20d8997b22 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -33,9 +33,9 @@ Foam::label Foam::LocalInteraction::applyToPatch const label globalPatchI ) const { - forAll(patchIds_, patchI) + forAll(patchIDs_, patchI) { - if (patchIds_[patchI] == globalPatchI) + if (patchIDs_[patchI] == globalPatchI) { return patchI; } @@ -130,8 +130,8 @@ Foam::LocalInteraction::LocalInteraction ) : PatchInteractionModel(dict, cloud, typeName), - patchData_(this->coeffDict().lookup("patches")), - patchIds_(patchData_.size()), + patchData_(cloud.mesh(), this->coeffDict().lookup("patches")), + patchIDs_(patchData_.size()), nEscape0_(patchData_.size(), 0), massEscape0_(patchData_.size(), 0.0), nStick0_(patchData_.size(), 0), @@ -141,44 +141,6 @@ Foam::LocalInteraction::LocalInteraction nStick_(patchData_.size(), 0), massStick_(patchData_.size(), 0.0) { - const polyMesh& mesh = cloud.mesh(); - const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); - - // check that user patches are valid region patches - forAll(patchData_, patchI) - { - const word& patchName = patchData_[patchI].patchName(); - patchIds_[patchI] = bMesh.findPatchID(patchName); - if (patchIds_[patchI] < 0) - { - FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") - << "Patch " << patchName << " not found. Available patches " - << "are: " << bMesh.names() << nl << exit(FatalError); - } - } - - // check that all walls are specified - DynamicList badWalls; - forAll(bMesh, patchI) - { - if - ( - isA(bMesh[patchI]) - && applyToPatch(bMesh[patchI].index()) < 0 - ) - { - badWalls.append(bMesh[patchI].name()); - } - } - - if (badWalls.size() > 0) - { - FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") - << "All wall patches must be specified when employing local patch " - << "interaction. Please specify data for patches:" << nl - << badWalls << nl << exit(FatalError); - } - // check that interactions are valid/specified forAll(patchData_, patchI) { @@ -211,7 +173,7 @@ Foam::LocalInteraction::LocalInteraction : PatchInteractionModel(pim), patchData_(pim.patchData_), - patchIds_(pim.patchIds_), + patchIDs_(pim.patchIDs_), nEscape0_(pim.nEscape0_), massEscape0_(pim.massEscape0_), nStick0_(pim.nStick0_), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H index 42b641aeab..5d6962b595 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H @@ -33,7 +33,7 @@ Description #define LocalInteraction_H #include "PatchInteractionModel.H" -#include "patchInteractionData.H" +#include "patchInteractionDataList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,10 +51,10 @@ class LocalInteraction // Private data //- List of participating patches - const List patchData_; + const patchInteractionDataList patchData_; //- List of participating patch ids - List