How to set different soli-wall attraction forces as function of coordinates

Please post to the list, not to me.

Again, you are not providing enough detail.
What is the solid? Is it made of particles or
do you mean the wall. What does “position of
liquid on the wall” mean. Do you mean
how near a particle is to the wall? If you
have liquid and solid particles how does
LAMMPS know which is which? Are they
different types, or does liquid vs solid change


Zhen Li displayed the dynamic contact angle of droplet moving on solid wall.

In the computational model, the attraction force (Asl) between solid particle constituting the wall and liquid droplet has the following correlation.

Location dependent Asl (x position)

-8.662 x < -40

1.03 x 10-3x2 - 0.16 – 16.71 -40 ≤ x ≤ 40

-21.462 x > 40

But, I could not make sense which commands or function I should use to set this correlation in my simulation.

So I hope to get guidelines from LAMMPS users.


Method 1:
Take a look at "fix addforce" and "variable"

For piecewise-continuous functions, such as yours, you can use the ">"
and "<", "&&", "||" operators.

I haven't tested this, but try something like: