summaryrefslogtreecommitdiff
path: root/examples/throat_clog_2d/step.hpp
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 15:13:37 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 15:13:37 +0100
commit5c708bb3a0c9faec82a0deb32478370f9d780ea8 (patch)
treea695ebee03e0065005688f22a54369df48b6ca42 /examples/throat_clog_2d/step.hpp
parentff88ea49eca3961e1aa4194944b93a3bfbf3d3d8 (diff)
downloadlibs-lbm-5c708bb3a0c9faec82a0deb32478370f9d780ea8.tar.gz
Throat Clog is shit
Diffstat (limited to 'examples/throat_clog_2d/step.hpp')
-rw-r--r--examples/throat_clog_2d/step.hpp24
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();