# Question about temperature control when one wall is moving

Please read this (very nice and detailed) reply from Axel to another
user on a similar question.

Ray

Dear Lammpa users,

I am trying to calculate frictional heat generation in nanoscale (confined) shear.
In my system I have some polymer molecules confined between two walls and I gave the upper wall a linear velocity 10m/sec ( I want to go upto 150m/sec).
I want to calculate temperature rise and polymer degradation due to mechanical shear.

I have about 30000 atoms in my system, top and bottom walls are fixed.
I am using NVE ensemble with a time step 1 fs and running for about 1 ns with temperature rescale.
But I see very high (~4000K or more) temperature rise.

In reply to my earlier posting Ray Shan suggested to see the link of another posting on use of different thermostats for temperature control.
As discussed in earlier posting fix Langevin is better than temperature rescale to control temperature.
So I used fix Langevin. But with this I get errors ( bond atom missing, dihedral atoms missing) if I use 1 fs time step.

So now I am trying smaller timestep 0.001 fs with fix langevin to equillibriate the system.

My question is if the use of NVE ensemble OK for this type of calculation ( frictional heat generation) ?
What is the best way to run this simulation ?
If anyone has some experience with calculation on frictional heat generation can help me with some suggestions.

Thanks for replies.

Mani

NVE + fix langevin with a 1 fsec timestep should be fine.

However, you need to insure you are

a) measuring the temperature accurately, which means
you need to subtract out the flow profile. Compute temp/deform
or compute temp/profile can do this.

b) you are thermostatting correctly. Again you do
not want to thermostat the flow velocity, but only the
thermal velocities. Using a bias with fix langevin
can do this, e.g. only thermostat the non-flow dimensions.
Section 6.16 of the manual discusses details.

Steve

Thank you very much, Let me try this.

Regards
Mani

Hello Steve,
Thanks for the reply.

I tried fix langevin with compute temp/profile
But with fix langevin I cannot run for longer time. it gives error ( bond atom missing).
Only fix nve/limit with temperature rescale allow me to run longer simulation with 1 fs time step.
Do you think : fix nve/limit 0.5 with temperature rescale can be used ?

This is what I did for the temperature control:

fix 1 all nve
#fix 11 all temp/rescale 100 300.0 300.0 50.0 0.5

fix 12 fluid langevin 300.0 300.0 100.0 123456
velocity top2 set 0.0001 0.0 0.0 sum no units box

compute mobile fluid temp/profile 0 1 1 xyz 20 20 20
compute_modify mobile dynamic yes

Before this ( applying velocity to top wall) I have equillibrated the system with a NVT ensemble for 200000 steps (0.01 fs time step resulting only 2 ps). During this equillibration the polymer interected with the bottom wall only.

Mani

Hello Steve,
Thanks for the reply.

I tried fix langevin with compute temp/profile
But with fix langevin I cannot run for longer time. it gives error ( bond
atom missing).

which means that your dynamics are bad.

Only fix nve/limit with temperature rescale allow me to run longer
simulation with 1 fs time step.

yes, but - as i told you before - your dynamics
is completely bogus this way.

Do you think : fix nve/limit 0.5 with temperature rescale can be used ?

you can use it, but the resulting trajectory will be meaningless.
also, it is not about what people here think, *you* will have to
*know* that what you are doing is right. if you don't you have to
go back and re-learn the basics of doing MD simulations correctly.

a mailing list is not replacement for a classroom and/or an adviser.

axel.

You didn't use fix modify to assign the compute temp/profile
to fix langevin - so the thermostat knows nothing about
the flow profile and is thermostatting the flow as if it
were temperature. I suggest you re-read the fix langevin
and Section 6.16 doc pages.

Steve

Hello Steve,

Thanks for the reply.
I modified the input file, now using fix_modify:

compute mobile fluid temp/profile 0 1 1 xyz 20 20 20
compute_modify mobile dynamic yes
fix 1 all nve
fix 12 fluid langevin 300.0 300.0 100.0 123456
fix_modify 12 temp mobile
velocity top2 set 0.0001 0.0 0.0 sum no units box

It is running, but need to run in small time step (0.01 fs) to avoid errors.
Now my question is:
I have made different regions in z direction to see temperature variation with z.
The temperatures in these regions are still high ~ 20000 K in top layer.
Is it because I have not run long enough time to see it equillibrate ?

The overall temperature ( thermo output temp) is ~400 /500 k.
I have kept the top and bottom wall atoms fixed. So they have temp 0. Do you think I should keep atleast a few layers of atoms in top and bottom wall movable ? because in reality they will also heat up due to shear flow (distance between top and bottom wall is 3.3 nm)

Thanks for your suggestions.

Regards
Mani

I don't know the answer to all your questions.
I've told you the general ideas for how to run
these kinds of models, but the details are up to you.

Steve