Skip to content
Snippets Groups Projects
Commit 63157671 authored by Michael Zikeli's avatar Michael Zikeli
Browse files

fix the bug that the fill level of the interface cell can fall between 0 and eps.

parent 5a28ef53
No related merge requests found
......@@ -151,6 +151,8 @@ void StreamReconstructAdvectSweep< LM, FlagInfo_T, abortOnHighFillLevelChange >:
{
for ( auto y = xyz.yMin(); y <= xyz.yMax(); ++y )
{
//TODO the isLeft flag should be true for each block at the beginning, so it might be that the mass is inherently increased.
//TODO the top and bottom interface are not equally distributed as at the start, the mass is gathering around 0.9 -->//FIXME
real_t fillLevelDragger = fillSrcField->get(xyz.xMin()-1,y,z);
bool isLeft = true;
for ( auto x = xyz.xMin(); x <= xyz.xMax(); ++x )
......@@ -169,6 +171,9 @@ void StreamReconstructAdvectSweep< LM, FlagInfo_T, abortOnHighFillLevelChange >:
{
fillDstField->get(x,y,z) = fillSrcField->get(x,y,z) - amount;
// if ( flags_.isInterface(flagField->get(x,y,z)) && y == cell_idx_c(19) && z == cell_idx_c(16) ) {WALBERLA_LOG_DEVEL("reduced FL = (" << x << "," << y << "," << z << ")" );}
// Here it can be possible that the fill level is greater than eps but smaller than 0
// ==> Thus, it has to be ensured that the cell is going to be converted to a gas cell
if ( fillDstField->get(x,y,z) <= real_c(0) ) {fillDstField->get(x,y,z) = real_c(-0.1);}
}
else
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment