From 7220084ddae1f4c6007f5111913cb7f87a794657 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 13 Aug 2026 13:11:05 +0200 Subject: Renaming velocity to momentum. for now --- .../poiseulle_particles_channel_2d.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/poiseulle_particles_channel_2d') 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 using MacroStruct = Struct< - Member, "velocity">, + Member, "momentum">, Member, Member, Member, "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 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">(); -- cgit v1.2.3