summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/one_particle_sedimentation_2d/common.hpp14
-rw-r--r--examples/one_particle_sedimentation_2d/init.hpp4
-rw-r--r--examples/one_particle_sedimentation_2d/sim.cpp2
-rw-r--r--examples/one_particle_sedimentation_2d/step.hpp1
-rw-r--r--examples/schaefer_turek_durst_krause_rannbacher/sim.cpp9
5 files changed, 18 insertions, 12 deletions
diff --git a/examples/one_particle_sedimentation_2d/common.hpp b/examples/one_particle_sedimentation_2d/common.hpp
index 37e0402..954557d 100644
--- a/examples/one_particle_sedimentation_2d/common.hpp
+++ b/examples/one_particle_sedimentation_2d/common.hpp
@@ -14,15 +14,17 @@ namespace kel {
namespace lbm {
/**
- * length 2.2m
- * height 0.41m
+ * length 20mm
+ * height 80mm
* viscosity 10^-3
- * particle diameter 0.1m
- * position at (0.16m,0.2m)
+ * particle radius 1.25mm
+ * position at (10mm,40mm)
+ * particle density 0.00125g/mm³
+ * fluid density 0.001g/mm³
*/
-constexpr uint64_t dim_y = 512ul;
-constexpr uint64_t dim_x = 256ul;
+constexpr uint64_t dim_y = 800ul;
+constexpr uint64_t dim_x = 200ul;
constexpr uint64_t particle_amount = 1ul;
diff --git a/examples/one_particle_sedimentation_2d/init.hpp b/examples/one_particle_sedimentation_2d/init.hpp
index a35c6e8..d9b8a37 100644
--- a/examples/one_particle_sedimentation_2d/init.hpp
+++ b/examples/one_particle_sedimentation_2d/init.hpp
@@ -87,8 +87,8 @@ saw::error_or<void> init(
auto& prb = p.template get<"rigid_body">();
auto& p_pos = prb.template get<"position">();
auto& p_posold = prb.template get<"position_old">();
- p_pos.at({{0u}}) = conv.meter_si_to_lbm({{0.16}}).handle();
- p_pos.at({{1u}}) = conv.meter_si_to_lbm({{0.2}}).handle();
+ p_pos.at({{0u}}) = conv.meter_si_to_lbm({{0.01}}).handle();
+ p_pos.at({{1u}}) = conv.meter_si_to_lbm({{0.04}}).handle();
p_posold = p_pos;
}
diff --git a/examples/one_particle_sedimentation_2d/sim.cpp b/examples/one_particle_sedimentation_2d/sim.cpp
index 7c9a56c..b0b374c 100644
--- a/examples/one_particle_sedimentation_2d/sim.cpp
+++ b/examples/one_particle_sedimentation_2d/sim.cpp
@@ -46,7 +46,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
converter<T> conv {
// delta_x
- {{0.41 / dim_y}},
+ {{0.02 / dim_x}},
// delta_t
{{1.067e-4}}
};
diff --git a/examples/one_particle_sedimentation_2d/step.hpp b/examples/one_particle_sedimentation_2d/step.hpp
index 07f51d1..20b7f4b 100644
--- a/examples/one_particle_sedimentation_2d/step.hpp
+++ b/examples/one_particle_sedimentation_2d/step.hpp
@@ -30,7 +30,6 @@ saw::error_or<void> step(
for(uint64_t i = 0u; i < Desc::D; ++i){
index.at({{i}}).set(idx[i]);
}
-
hlbm_reset.apply(fields,macros,index,t_i);
});
}).wait();
diff --git a/examples/schaefer_turek_durst_krause_rannbacher/sim.cpp b/examples/schaefer_turek_durst_krause_rannbacher/sim.cpp
index b9b3778..4d015c9 100644
--- a/examples/schaefer_turek_durst_krause_rannbacher/sim.cpp
+++ b/examples/schaefer_turek_durst_krause_rannbacher/sim.cpp
@@ -144,7 +144,7 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
}
}
{
- auto eov = write_csv_file(out_dir,"stdkr_2d",i.get(), *lbm_macro_data_ptr);
+ auto eov = write_vtk_file(out_dir,std::string{"stdkr_2d_"}+an.template get<"coupling">().stl_string(),i.get(), *lbm_macro_data_ptr);
if(eov.is_error()){
return eov;
}
@@ -189,7 +189,12 @@ saw::error_or<void> lbm_main(const saw::data<args::LbmArgs>& args){
return eov;
}
}
-
+ {
+ auto eov = write_csv_file(out_dir,"stdkr_2d",time_steps.get(), *lbm_macro_data_ptr);
+ if(eov.is_error()){
+ return eov;
+ }
+ }
sycl_q.wait();
return saw::make_void();
}