NEMD and thermal conductivity of nanofluids

Dear lammps users

I am wondering if anyone could tell me which of the following NEMD input files could be used for binary systems (like nanofluids) without changing the lammps source code:

1- in.langevin = thermostat 2 regions at different temperatures via fix langevin
2- in.heat = add/subtract energy to 2 regions via fix heat
3- in.ehex = add/subtract energy to 2 regions via fix ehex
4- = use fix thermal/conductivity and the Muller-Plathe method

I think the fourth method (Muller-Plathe) is only for pure systems thus for nanofluids requires adjusting the source codes.


So long as your nanoparticle is not a rigid body you should be

able to use any of the methods. Fix thermal/cond just swaps

KE between 2 atoms. It doesn’t matter if they are in a molecule.

It probably also wouldn’t work if the molecule were constrained

with fix shake or rattle. Peter (CCd) can comment.


Dear Steve

thank you very much.

How could I contact Peter?


Dear Steve

thank you very much.

How could I contact Peter?

​you just did. just observe the list of people copied on your e-mail.



If you are dealing with rigid molecules, you need to be a bit careful in
order to avoid velocity components along rigid bonds. The implementation
of the eHEX algorithm, which actually has an option to default to the
HEX algorithm, allows you to thermostat small rigid molecules respecting
the constraints. So as long as you can use SHAKE or RATTLE to constrain
the molecules you would like to thermostat, it should be straightforward
to use fix ehex for your purposes.

The LAMMPS implementation of the Müller-Plathe method, on the other
hand, should not be used for rigid molecules, as mentioned on the doc
page. You would have to swap the centre of mass velocity of the entire
molecule instead.

If there are no rigid bonds any of the methods should work. I guess
another important point to consider is the underlying Physics: would you
like to fix the energy flux into the particle (eHEX / HEX) or the
temperature of the particle (langevin)?


Dear Peter

Your reply was very helpful.

I am working with a water based nanofluid with flexible nanoparticles. Any of the mentioned methods which work is fine. As my systems are near the freezing point, I cannot use a method which needs large temperature differences (some parts of the water will freeze).


I’d recommend you to have a look at the doc pages and relevant literature so that you can make an informed decision about which algorithm is most suitable for your purposes.

The algorithms listed below are probably quite similar when it comes to the minimum temperature gradient or heat flux you need to apply to get good statistics for a fixed simulation time. If you are interested in very small thermal gradients, there is always a chance that you won’t be able to resolve the signal within the computing time scales available.

These are things you can check by looking at other papers or by setting up preliminary simulations and performing block average analysis.

If you have more specific questions about fix ehex, let me know.


PS: I much prefer knowing who I’m talking to rather than replying to anonymous.