summaryrefslogtreecommitdiff
path: root/examples/poiseulle_particles_channel_2d
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-14 23:43:54 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-14 23:43:54 +0200
commit0e9322fe0d024a06f23430285a055c16cf1e3eeb (patch)
tree657a33098c96b14c0e09748c6b9d4a7e9cd16160 /examples/poiseulle_particles_channel_2d
parent0d15416f60491bd4d17bd8b45a9487c98b8132b0 (diff)
parentc634aac438972b7bafb5fbbeba7962d174cc0d03 (diff)
downloadlibs-lbm-0e9322fe0d024a06f23430285a055c16cf1e3eeb.tar.gz
Merge branch 'dev'
Diffstat (limited to 'examples/poiseulle_particles_channel_2d')
-rw-r--r--examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp b/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp
index 1e6e75f..24832f2 100644
--- a/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp
+++ b/examples/poiseulle_particles_channel_2d/poiseulle_particles_channel_2d.cpp
@@ -68,7 +68,7 @@ using CellStruct = Struct<
template<typename T, uint64_t D>
using MacroStruct = Struct<
- Member<Vector<T,D>, "velocity">,
+ Member<Vector<T,D>, "momentum">,
Member<T, "pressure">,
Member<UInt16, "particle">,
Member<FixedArray<T,D>, "force">
@@ -369,7 +369,7 @@ void couple_particles_to_lattice(
// Interpolate this from close U cells.
// For now pick the closest U
- auto& closest_u = macros.at(p_cell_pos).template get<"velocity">();
+ auto& closest_u = macros.at(p_cell_pos).template get<"momentum">();
// auto p_shift = closest_u;
// p_pos - p_pos_old
@@ -380,7 +380,7 @@ void couple_particles_to_lattice(
p_vel_rel.at({{1u}}) = p_vel_rel.at({{1u}}) / p_mass;
}
- // Add relative velocity to particle acceleration (Since our timestep is 1 we don't need to do anything else)
+ // Add relative momentum to particle acceleration (Since our timestep is 1 we don't need to do anything else)
p_acc = p_acc + p_vel_rel;
@@ -463,7 +463,7 @@ void couple_particles_to_lattice(
}
- /* So I want to include the relative velocity from both particles, but this is a bit hard considering I just assumed 0 velocity from the other party
+ /* So I want to include the relative momentum from both particles, but this is a bit hard considering I just assumed 0 momentum from the other party
else if(n_macro_cell_particle.get() != (i.get() + 1u) and n_macro_cell_particle.get() > 0u){
// Generally compare
}
@@ -721,7 +721,7 @@ saw::error_or<void> real_main(int argc, char** argv){
auto& macro_cell = macros.at(index);
auto& rho = macro_cell.template get<"pressure">();
- auto& vel = macro_cell.template get<"velocity">();
+ auto& vel = macro_cell.template get<"momentum">();
auto& force = macro_cell.template get<"force">();
auto& part_mask = macro_cell.template get<"particle">();