Compute temp/com vs temp/partial vs temp/profile: thermostating in a flowing stream

I have been working with nanofluid stream in nanochannels. The flowing nanofluid is liquid Argon in the simplest case. The flow is in x-direction, and the channel walls are made of Platinum. I have periodic boundaries. There are regions where I need to apply langevin thermostat to reset the temperature of the flowing fluid at that region. I’ve read several research articles and almost all of them mention that I need to “remove streaming velocity bias”. Nothing more clearly mentioned. After reading the documentation, I understood that the flowing stream velocity doesn’t contribute to thermal motion, i.e temperature, in case of a flowing fluid system. But I’m confused whether to completely nullify/ignore the flowing velocity (Vx), or I need to do something different, i.e basically about handling the dofs.

Now I have 2 challenges:

  1. applying thermostat without affecting the flow velocity, that is removing the streaming velocity bias

  2. measuring temperature corresponding to thermal motions excluding the streaming velocity bias (as streaming velocity of flowing fluid doesn’t contribute to thermal motions)

Now, while applying the Langevin thermostat, I used “compute temp/partial 0 1 1” to modify the fix (fix_modify) to use only y & z axis thermal motions. I also tried “compute temp/com” and “compute temp/profile 0 1 1”, but all these are giving very different results. I read the documentation, and all of these talk about removing the bias. But I don’t know which one should be actually most appropriate in case of removing streaming velocity bias.

Secondly, same goes for measuring the temperature. I wanted to see the temperature profiles at different locations (x, along the flow). I don’t understand how to incorporate the proper compute (that removes streaming velocity bias) with “compute chunk/atom” and proper “fix” to eventually get temperature profiles. If I use only “compute chunk/atom” and “fix”, it’ll calculate temperature but not removing streaming velocity bias, rather it’ll include it. Is there any other way of doing it?

Hi @fuadh,

There are two issues here for what I understand.

  1. You seems to struggle understanding the idea underlying bias in temperature of NEMD simulation implying a flow. Have your looked at the howto page related to this question? Reading the reference at the bottom of the page (or some relevant section) might make clarify things if you take time to put them down and go through the equations.

  2. The way to compute a temperature that removes a bias from the streaming velocity will depend on how the streaming is induced in your system. If the streaming velocity is in place (in a stationary regime) and caused by constant shear of the box then compute temp/deform is your command. If the flow is caused by a pressure gradient (like a typical Poiseuille flow), then maybe compute temp/profile[1] is more suited to your needs. This is something that depends on your setup and what you want to simulate. For now the methods you tried only remove degrees of freedom from the computation and appear incorrect to me. What you need is likely removing the corresponding flow quantity from the flow direction. That is the “bias”.


  1. Be careful with this one and read the documentation with care. The meaning of the flag is the opposite of how you use them with compute temp/partial. ↩︎

Dear @Germain sir, thanks a lot for your gracious reply.
Yes sir, I read the howto section. After reading it, I discovered these 3 options, sir. But yes, perhaps there’s something I’m missing sir.

Sir my system is of nanochannel with periodic boundary conditions just like the poiseulle flow. There are 3 regions: 1) forcing 2) inlet 3) data collection.
I’m adding the force using ‘add force’ just before the inlet region. At the inlet region, I’m applying the langevin thermostat. And at the data collection, I’m computing the temperature.

In case of inlet, perhaps “compute temp/partial 0 1 1” suits best, as I’m ignoring the flow stream velocity completely while applying the langevin.

In case of measuring temperature for temperature profile, it’s getting complicated sir. I’m basically failing to understand ‘what the bias should be’ and ‘how to remove it while measuring temperature’. Is the bias the velocity of the bulk fluid, i.e COM? or should I again completely ignore the ‘Vx’ component and use “compute temp/partial 0 1 1”?

As is and without an example of what you are implementing, your comments make no physical sense.

You can’t “ignore the stream velocity completely” while applying the thermostat. You will simply thermalize two degrees of freedom out of three. You stilll need to compute the temperature in this region. Moreover, if you have periodic boundary condition, the stream velocity wraps around.

Refer to the literature I mentioned. It is the average streaming velocity along the profile that you remove from your particle. But you have to ensure that this profile is steady in certain case.