Pressurized fluid flow

Hi all,

I noticed that the mdp option “accelerate” is now marked as deprecated. Now, that approach never really instilled confidence, but are there any plans to implement anything more advanced, or do we stick with something like constant-force pull of the solvent or pull some sort of a solid piston introduced artificially?

By something more advanced, here is what I mean: consider a system consisting of a thick solid slab with a pore + liquid above and below. Neither accelerate, nor pulling the entire solvent is physically correct when it comes to the solvent portion confined inside the pore. Instead, LAMMPS, for example, allows position-dependent pressure applied in the “bulk” regions of the solvent. Are there any plans to enable similar functionality in Gromacs?



I have been using acc-grps and accelerate whithout knowing they were deprecated. I am not sure why they are deprecated, though (any insight from GROMACS dev team?).

As far as I know, at the present moment accelerate is the only way to unduce a pressure-driven-like flow in GROMACS; it works if you aim to reproduce a Poiseuille flow in a nanochannel, however for more complicated stuff (like the porous substrate you mention) it may be unphysical.

I have one idea to produce pressure-driven flows which should be easy to code in GROMACS; it is based on this paper:

Basically: apply accelerate to the solvant but only in a limited region of the domain (‘inlet’), and let a pressure gradient develop as a consequence of this ‘piston’ action; if you place a buffer between the piston and the region you want to simulate, then forces and densities de-correlate and you get something equivalent to a pressure gradient.

I’m guessing that it’s deprecated because using it massively slows down simulations for some reason – at least I can see it very clearly and have no idea why it’s happening. By the way, how does ‘accelerate’ actually work? The documentation states that a group will have a constant acceleration… Is this acceleration artificially added to every particle in the group before the integrator? I feel that constant-force pulling of the solvent is doing exactly the same thing, except there is an artificial force added.

Not sure how a fluidic piston would work in what you described (haven’t looked at the paper yet), as my understanding of the whole thing is that the “buffer” has to be solid & impermeable. This can be done without modifying the Gromacs code, it’s just cumbersome…

Does it? Adding a constant acceleration to each molecule has complexity O(N) and it’s almost trivial to parallelize. I have run a couple of large scale water droplet parallel simulations with a constant acceleration field and noticed only minimal slowdown; for small systems simulated on my workstation I can hardly spot any difference.

By the way, how does ‘accelerate’ actually work?

I believe documentation is a bit sloppy there… I am pretty positive the acceleration is added on top of the integration step, i.e. it is not imposed. So for all intents and purposes it works just an an external force field.

… as my understanding of the whole thing is that the “buffer” has to be solid & impermeable

No, it needs to be a fluid buffer; I am pretty sure you can emulate a solid piston in GROMACS, but that won’t produce a constant pressure difference. It wouldn’t be that cumbersome, though: you can utilize different position restraints and an auxillary free energy calculation to make the piston ‘move’.

Yeah, it does run much slower in my case, I have no idea why. All my simulations are heavily GPU-accelerated, turning on ‘accelerate’ immediately results in massive load imbalances. Maybe this conflict is the reason for deprecation…

Adding constant acceleration prior to the integration step or adding the corresponding velocity and position updates during the integration step are mathematically equivalent. I am not sure what you mean by “an external force field.” All this does is introduce constant artificial gravity, even if you don’t like the word “impose.” :)

With a solid piston under constant force pull (using Gromacs pull code), if the system is large enough and the piston moves sufficiently slowly for the system to reach some sort of a steady-state flow, I do believe it would be temporarily close to a constant-pressure situation.

Maybe this conflict is the reason for deprecation…

Could be, although it seems really unlikely to me; I guess it may be worth opening another discussion about it.

I am not sure what you mean by “an external force field". All this does is introduce constant artificial gravity

Constant artificial gravity is an external force field :-) I don’t like to word impose because it does not substitute the particle’s acceleration, but rather gets added on top of it, so probably the word superimpose would be a better term.

if the system is large enough and the piston moves sufficiently slowly for the system to reach some sort of a steady-state flow…

Yes, but only until the piston gets close to the pbc box limit (or the porour substrate, in your case). So it’s not a steady state, because you cannot keep running it and collect statistics as long as you would like. In case of a fluidic piston, on the other hand, one can actually obtain a steady flow and keep averaging it ad libitum.

This could be the reason for it being deprecated:

Constant artificial gravity is constant artificial gravity, but if you prefer sci-fi terminology, there’s noone to stop you.
Please read what I said earlier when I asked about ‘accelerate’. I never said the term was replacing anything. I clearly stated in the earlier message that it was added, it’s a trivial matter.

‘Force field’ is not sci-fi, it’s basic physics.
Since it is a volume force, possibly varying in space, it is, by definition, a force (or acceleration, if you prefer) field.

Please share this discussion (especially going from ‘force field’ terminology to ‘basic physics’) with Erik and Berk, because laughter is important. ;)

I am sorry, are you writing on this forum to ask about GROMACS or because you fancy trolling people about terminology?

Berk is my PhD thesis supervisor, I will surely share this ‘discussion’ with him, don’t worry.

I had a specific question (just like other questions posted by me on this forum, which you can easily pull), which did not necessitate your sudden lectures on terminology or on what constitutes a field. Not everyone here is a fellow grad student, please show some humility. So no, I do not fancy trolling.


  • I showed effort answering your question;
  • highlited the importance of your question and opened another discussion specifically to investugate why accelerate has been deprecated and if something can be done about it,
  • provided you some references and discussed alternative approches on how to solve your problem (even if we don’t agree, but that’s ok),

and… I am not showing humility. I write on this forum because I see that I am not the only one using MD to do something else than biochemistry and biophysics and I believe it’s good to share insight about nanofluidics/complex-surfaces, not because I want to show off. You don’t appreciate my suggestions? Fine, but please at least refrain from unrespectful comments.