summaryrefslogtreecommitdiff
path: root/examples/poiseulle_particles_channel_2d
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-08-13 13:11:05 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-08-13 13:11:05 +0200
commit7220084ddae1f4c6007f5111913cb7f87a794657 (patch)
treeab118dcda72d3fc85fb8087617705d76b647f62d /examples/poiseulle_particles_channel_2d
parent919f5a625c5efeea94c0dd0de5039a27e77d3fac (diff)
downloadlibs-lbm-7220084ddae1f4c6007f5111913cb7f87a794657.tar.gz
Renaming velocity to momentum. for now
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">();