From ec68d3384e695a4f3ad55a6fa0367ce3f341d45c Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 19 Mar 2015 21:43:25 +0000 Subject: [PATCH] DSMC: Corrected LarsenBorgnakkeVariableHardSphere model Also changed internalDegreesOfFreedom to be an integer type --- .../clouds/Templates/DSMCCloud/DSMCCloud.C | 36 +------------- .../clouds/Templates/DSMCCloud/DSMCCloud.H | 2 +- .../parcels/Templates/DSMCParcel/DSMCParcel.H | 4 +- .../Templates/DSMCParcel/DSMCParcelI.H | 4 +- .../LarsenBorgnakkeVariableHardSphere.C | 47 +++++++++---------- .../MaxwellianThermal/MaxwellianThermal.C | 2 +- .../MixedDiffuseSpecular.C | 2 +- 7 files changed, 30 insertions(+), 67 deletions(-) diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index ff6166ffd..aafa52ca5 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -120,9 +120,7 @@ void Foam::DSMCCloud::initialise forAll(cellTets, tetI) { const tetIndices& cellTetIs = cellTets[tetI]; - tetPointRef tet = cellTetIs.tet(mesh_); - scalar tetVolume = tet.mag(); forAll(molecules, i) @@ -239,7 +237,6 @@ void Foam::DSMCCloud::collisions() if (nC > 1) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Assign particles to one of 8 Cartesian subCells @@ -257,14 +254,12 @@ void Foam::DSMCCloud::collisions() forAll(cellParcels, i) { const ParcelType& p = *cellParcels[i]; - vector relPos = p.position() - cC; label subCell = pos(relPos.x()) + 2*pos(relPos.y()) + 4*pos(relPos.z()); subCells[subCell].append(i); - whichSubCell[i] = subCell; } @@ -278,9 +273,7 @@ void Foam::DSMCCloud::collisions() /mesh_.cellVolumes()[cellI]; label nCandidates(selectedPairs); - collisionSelectionRemainder_[cellI] = selectedPairs - nCandidates; - collisionCandidates += nCandidates; for (label c = 0; c < nCandidates; c++) @@ -295,7 +288,6 @@ void Foam::DSMCCloud::collisions() label candidateQ = -1; List