mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
fix per-particle voidfraction in trilinear model
all particles incorrectly received the voidfraction of the same 8 cells closes #106
This commit is contained in:
@ -350,12 +350,6 @@ void trilinearVoidFraction::setvoidFraction(double** const& mask,double**& voidf
|
||||
alphaLimited = true;
|
||||
}
|
||||
if(index==0 && alphaLimited) Info<<"alpha limited to" <<alphaMin_<<endl;*/
|
||||
|
||||
// store voidFraction for each particle
|
||||
voidfractions[index][0] = voidfractionNext_[cellI];
|
||||
|
||||
// store cellweight for each particle - this should not live here
|
||||
particleWeights[index][0] = 1.;
|
||||
}
|
||||
}
|
||||
voidfractionNext_.correctBoundaryConditions();
|
||||
@ -363,23 +357,18 @@ void trilinearVoidFraction::setvoidFraction(double** const& mask,double**& voidf
|
||||
// bring voidfraction from Eulerian Field to particle array
|
||||
for (int index = 0; index < particleCloud_.numberOfParticles(); ++index)
|
||||
{
|
||||
label cellID = particleCloud_.cellIDs()[index][0];
|
||||
for (int subcell = 0; subcell < maxCellsPerParticle_; ++subcell)
|
||||
{
|
||||
label cellID = particleCloud_.cellIDs()[index][subcell];
|
||||
|
||||
if (cellID >= 0)
|
||||
{
|
||||
voidfractions[index][0] = voidfractionNext_[i000];
|
||||
voidfractions[index][1] = voidfractionNext_[i100];
|
||||
voidfractions[index][2] = voidfractionNext_[i110];
|
||||
voidfractions[index][3] = voidfractionNext_[i010];
|
||||
voidfractions[index][4] = voidfractionNext_[i001];
|
||||
voidfractions[index][5] = voidfractionNext_[i101];
|
||||
voidfractions[index][6] = voidfractionNext_[i111];
|
||||
voidfractions[index][7] = voidfractionNext_[i011];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 8; ++i)
|
||||
voidfractions[index][i] = -1.;
|
||||
if (cellID >= 0)
|
||||
{
|
||||
voidfractions[index][subcell] = voidfractionNext_[cellID];
|
||||
}
|
||||
else
|
||||
{
|
||||
voidfractions[index][subcell] = -1.;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user