Fixing a drop with harmonic potential in a periodic boundary conditions

Dear All,

I have read several literature using a harmonic potential to avoid a droplet movement on a substrate with periodic boundary conditions applied in all three directions . First, I thought they use fix wall/harmonic command to do it. So, I tried with:

fix wallhi drop wall/harmonic xhi 80.0 400.0 0.0 5.0

But, I got this error: “Cannot use xhi wall in periodic x dimension”. So, I read the manual and understood this command cannot be used for periodic boundary conditions.

Any comments and suggestions are appreciated …

Have you looked into fix wall/region?

Yes. Thanks @akohlmey for promoting our knowledge.