Why does the vertical force fz1 on the sphere change from positive to negaring the simulation, even though the sphere is mainly moving in the x-direction?

Hi all,
I am simulating a single moving sphere placed between two fixed walls (represented by spherical particles) using LAMMPS with the lubricate/poly pair style

  • The sphere moves in the x-direction with an initial velocity.
  • Both walls consist of frozen particles (high-mass, no movement).
  • The fluid behaviour is implicitly modelled via lubrication forces.

Could you please help me explain why the vertical force component fz1 acting on the sphere fluctuates over time (switching from negative to positive values) even though the Z-position increases linearly?
Best
Fernando

As a suggestion, someone is more likely to assist if you are able to provide a small script that demonstrates the issue you are having. Without such details, it’s hard to speculate.

1 Like

Thank you for the comment!

for more information, this is my code:
variable mode string ‘pairwise_force_SI’
log log.${mode}

units si
dimension 3
atom_style sphere
atom_modify map yes
boundary p p f
newton off

---- Define the simulation box ----

region box block 0 128 0 128 -0.25 3.07
create_box 3 box

---- Create a single moving sphere ----

create_atoms 1 single 40 64 1.26001

Set mass and diameter for the sphere

set type 1 mass 1 diameter 0.02

---- CREATE A bottom WALL USING FROZEN PARTICLES ----

region bottom_wall_region block 0 128 0 128 0 1 units box
lattice sc 1
create_atoms 2 region bottom_wall_region
set type 2 diameter 0.5
group bottom_wall type 2
set group bottom_wall mass 99999 # Large mass to freeze wall particles

---- CREATE A top WALL USING FROZEN PARTICLES ----

region top_wall_region block 0 128 0 128 1.82 2.82 units box
lattice sc 1
create_atoms 3 region top_wall_region
set type 3 diameter 0.5
group top_wall type 3
set group top_wall mass 99999 # Large mass to freeze wall particles

---- Apply Lubrication Forces) ----

pair_style lubricate/poly 1e-3 1 1 0.01 1 0 0
pair_coeff * *

neighbor 0.3 bin
neigh_modify delay 0 every 1 check no one 5000
comm_modify vel yes

---- Compute forces ----

variable fx1 equal fx[1]
variable fy1 equal fy[1]
variable fz1 equal fz[1]

---- Compute positions ----

variable x1 equal x[1]
variable y1 equal y[1]
variable z1 equal z[1]

Print step, time, force (N), and positions of particles

thermo_style custom step time v_x1 v_y1 v_z1 v_fx1 v_fy1 v_fz1

---- Move the sphere toward the wall ----

group atom1 id 1
velocity atom1 set 0.1 0 0 # Initial velocity in x-direction
fix motion atom1 nve # Integrate motion using Newton’s equations
#fix 1 atom1 move linear 0.01 0 0 # Move downward toward the wall

timestep 0.01

---- Keep the wall fixed ----

fix freeze_wall bottom_wall setforce 0.0 0.0 0.0
fix freeze_wall top_wall setforce 0.0 0.0 0.0

#vtk

dump dmp all vtk 20 post/plane_*.vtk id type x y z vx vy vz fx fy fz radius
#dump_modify dmp element Sphere Wall
fix exportTXT all print 10 “step time {x1} {y1} {z1} {fx1} {fy1} {fz1}” file output_sphere_plane_perp.txt screen no title “Step Time x1 y1 z1 fx1 fy1 fz1”

thermo 100
run 100000