Skip to content
Snippets Groups Projects
Commit ad7168aa authored by Samuel Kemmler's avatar Samuel Kemmler
Browse files

Merge branch 'FluidizedBedPSM' into 'master'

Add PSM version of fluidized bed app

See merge request walberla/walberla!588
parents 0bfafba1 dbc9559b
No related merge requests found
waLBerla_link_files_to_builddir( "*.prm" )
waLBerla_add_executable ( NAME FluidizedBed FILES FluidizedBed.cpp
DEPENDS blockforest boundary core domain_decomposition field lbm lbm_mesapd_coupling mesa_pd postprocessing timeloop vtk )
waLBerla_add_executable ( NAME FluidizedBedMEM FILES FluidizedBedMEM.cpp
DEPENDS blockforest boundary core domain_decomposition field lbm lbm_mesapd_coupling mesa_pd timeloop vtk )
waLBerla_add_executable ( NAME FluidizedBedPSM FILES FluidizedBedPSM.cpp
DEPENDS blockforest boundary core domain_decomposition field lbm lbm_mesapd_coupling mesa_pd timeloop vtk )
This diff is collapsed.
......@@ -77,6 +77,22 @@ class ParticleAndVolumeFractionMapping
{
if (mappingParticleSelector_(idx, *ac_)) { update(idx); }
}
// normalize the sum of all overlap fractions of a cell to 1
for (auto blockIt = blockStorage_->begin(); blockIt != blockStorage_->end(); ++blockIt)
{
ParticleAndVolumeFractionField_T* particleAndVolumeFractionField =
blockIt->getData< ParticleAndVolumeFractionField_T >(particleAndVolumeFractionFieldID_);
WALBERLA_FOR_ALL_CELLS_XYZ(
particleAndVolumeFractionField, real_t fractionSum = 0.0;
for (auto& e
: particleAndVolumeFractionField->get(x, y, z)) fractionSum += e.second;
if (fractionSum > 1.0) {
for (auto& e : particleAndVolumeFractionField->get(x, y, z))
e.second /= fractionSum;
})
}
}
private:
......
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