From dc0d41f816cd3bf7a7273afb3c3531874dbfc588 Mon Sep 17 00:00:00 2001 From: graham Date: Tue, 10 Mar 2009 17:41:25 +0000 Subject: [PATCH] Cartesian subCelling of collision cell implemented. Need to check the impact on performance and results --- .../clouds/Templates/DsmcCloud/DsmcCloud.C | 87 +++++++++++++++++-- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index e5463185d9..93eadc372d 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -224,6 +224,9 @@ void Foam::DsmcCloud::collisions() { buildCellOccupancy(); + // Temporary storage for subCells + List > subCells(8); + scalar deltaT = mesh_.time().deltaT().value(); label collisionCandidates = 0; @@ -238,6 +241,37 @@ void Foam::DsmcCloud::collisions() if (nC > 1) { + + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Assign particles to one of 8 Cartesian subCells + + // Clear temporary lists + forAll(subCells, i) + { + subCells[i].clear(); + } + + // Inverse addressing specifying which subCell a parcel is in + List