diff options
Diffstat (limited to 'examples/throat_clog_2d/step.hpp')
| -rw-r--r-- | examples/throat_clog_2d/step.hpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/examples/throat_clog_2d/step.hpp b/examples/throat_clog_2d/step.hpp index 840f8ba..5bb889e 100644 --- a/examples/throat_clog_2d/step.hpp +++ b/examples/throat_clog_2d/step.hpp @@ -116,9 +116,24 @@ kel::lbm::error_or<void> step( }); }).wait(); + /** + * Particle step, split so contact lands between the fluid gather and + * the integration. With 20 particles in a converging throat they jam + * against one another, so without a contact pass they would simply + * pass through each other and through the walls. + */ q.submit([&](acpp::sycl::handler& h){ - kel::lbm::data<sch::Vector<T,Desc::D>> grav; - component<T,Desc,cmpt::FpLbmOneParticle,encode::Sycl<kel::lbm::enc::Native>> fplbm_one_part{grav}; + component<T,Desc,cmpt::ParticleForceReset,encode::Sycl<kel::lbm::enc::Native>> p_reset; + component<T,Desc,cmpt::FpLbmOneParticleGather,encode::Sycl<kel::lbm::enc::Native>> p_gather; + component<T,Desc,cmpt::ParticleIntegrate,encode::Sycl<kel::lbm::enc::Native>> p_integrate; + + /** + * Stiffness is sized so an impact at the inflow speed stays well + * under a tenth of a radius of overlap; see dem_stiffness_for. + */ + dem_params<T> p_dem{2.0e-2, 0.4, 0.0, 0.0}; + kel::lbm::data<sch::FixedArray<sch::UInt64,Desc::D>> p_extent{{dim_x,dim_y}}; + component<T,Desc,cmpt::ParticleContact,encode::Sycl<kel::lbm::enc::Native>> p_contact{p_dem,p_extent}; h.parallel_for(acpp::sycl::range<1u>{particle_amount}, [=](acpp::sycl::id<1u> idx){ kel::lbm::data<sch::FixedArray<sch::UInt64,1u>> index; @@ -126,7 +141,10 @@ kel::lbm::error_or<void> step( index.at({{i}}).set(idx[i]); } - fplbm_one_part.apply(fields,macros,particles,index,t_i,{4u}); + p_reset.apply(particles,index,t_i); + p_gather.apply(fields,macros,particles,index,t_i,{4u}); + p_contact.apply(particles,index,t_i,{4u}); + p_integrate.apply(particles,index,t_i,{4u}); }); }).wait(); |
