Adjusting pressure on LAMMPS

I’m running SPH simulations on LAMMPS and the pressure gets negative values in some scenarios. Is there any way to adjust the pressure during simulation?

Why would that be necessary?

A negative pressure is not a bad thing per se. It just indicates that the system “wants” to shrink. And for the small-ish finite size systems that we usually can simulate, the pressure can fluctuate by large amounts over time and only the long-time average really matters.

For a more specific discussion, you need to provide (many) more details about your system and why you would like to manipulate the pressure. It can only be done indirectly, usually by adjusting the simulation box size.

1 Like

I’m working on a 2D simulation of a fluid within a rotating cylinder, mimicking the rotational molding process. In this simulation, the fluid particles should adhere to the upper surface of the cylinder, even against the force of gravity. However, I’m encountering an issue where parts of the fluid break apart into small droplets, which is strange. I suspect that ensuring the pressure doesn’t drop to negative values might help prevent this fluid fragmentation and keep the particles cohesive.
This code is an attempt to perform the simulation:
rot_mold.lmp

Sorry, but this statement makes no sense. Pressure is an observable and has no impact on the interactions. On the contrary, it is a consequence of the interaction parameters and the velocities of the particles as well as the density.

This file cannot be accessed.

Thank you for sharing your thoughts! You’re correct that pressure is observable. However, I believe that in SPH simulations, the term “pressure” has a slightly different role. Here, pressure is a key component that directly influences the forces between particles. Specifically, pressure in SPH is computed using an equation of state (EOS) and is used to calculate the repulsive forces between particles to maintain the fluid’s physical properties, such as incompressibility and stability.

That still makes it a function of the potential parameters and the velocities.

Thus where your particles go or not go depends on the choice of parameters (i.e. the values you set with the pair_coeff commands) which in turn determines the forces and those determine the pressure reported by LAMMPS. So that pressure is purely an observation parameter for the entire system and computed based on the systems virial.

You can clearly see from the source code that this computed pressure is not used anywhere.
There are pressure calculations, but those are the local pressures at the positions of the interacting particles.

Thank you for the enlightenment