[lammps-users] Thermostat in fix thermal/conductivity

Hi Users,

I’m using fix thermal/conductivity for getting a output for heat conduction using hot plate experiment in Cu. For results I need a Temeprature Vs Depth graph.
Here’s my methodology in (in.swap)-
1.) Define two regions, lower and rest. The lower is of 3 A and rest of 57 A.
2.) Then used compute temp/region for lower and compute temp for rest.
3.) Them imparted velocities to 2 different regions separately at different temperatures.
4.) Applied a thermostat on total system and separate thermostat for lower region.
5.) Then used thermal conductivity for momentum exchange between lower and middle layer.
6.) Then used variable and compute ke/atom for calculating temperature.
7.) The results are output using fix ave/spatial.

My script file, temperature profile and log files are attached.

Now my questions-
1.) Why the lower layer is not held at specified temperature even though I have included fix temp/rescale in my code? So that I can plot a graph for T Vs Depth for layers (lower to middle layers).
2.) Does fix thermal/conductivity works for this application as I need a real time heat conduction profile for conductors. As it exchanges momentuum with middle layer instead of hot/cold interface of subsequent layers of workpiece.


in.swap (1.05 KB)

swap.profile (48.9 KB)

log.lammps (9.36 KB)

If (4) and (5) mean that you are applying multiple thermostats
to the same atoms, then I think that's a bad idea. In general,
I don't think you should use a thermostat at all with fix thermal/conductivity
since it is trying to set up a T profile. If you thermostat on top
of that, you screw things up.


Dear Mayank, I think you could use NVE (to update positiona and velocities) for the region where you want to get the temperature profile and thermostat for your heating region.

I have rerun the simulation with different thermostat for these lower region (0-3 A) and for rest of the workpiece (3-60 A).

My question is when I rerun this simulation the temperature set for lower was 1000 K and for rest is 300 K. But in “swap.profile” the temperature for lower layer after 100 ts is 249.788 (as I’m dumping the information after every 100 ts).

How come the temperature for lower layer (0-3A) is in 300’s in after all the timesteps , when I have set the temperature at 1000 K for lower?


3d Cu TC

boundary p p p
units metal
atom_style atomic

lattice fcc 3.36
region box block 0 150 0 150 0 60 units box
create_box 1 box
mass 1 63.00
create_atoms 1 region box

region 10 block INF INF INF INF 0 3 units box
region 20 block INF INF INF INF 57 60 units box
group lower region 10
group upper region 20
group boundary union lower upper
group rest subtract all lower

neighbor 2.0 bin
neigh_modify every 2 delay 6 page 5000 one 200

pair_style morse 4.5
pair_coeff 1 1 0.3429 1.3588 2.626

compute 30 lower temp/region 10
#compute 40 upper temp/region 20
compute 50 rest temp

velocity lower create 1000.00 562795 units box
#velocity upper create 300.00 482748 temp 40 units box
velocity rest create 300.00 482748 temp 50 units box

fix 1 rest nve
fix 4 lower temp/rescale 100 1000 1000 0.001 1.0
fix 2 all thermal/conductivity 100 z 20 swap 100

dump 1 all atom 500 dump.pos
compute ke all ke/atom

variable T1 atom c_ke[]/0.00051702
fix 3 all ave/spatial 5 20 100 z 0 3 v_T1 units box ave one file swap.profile

thermo 100
run 10000

Again you can't have multiple fixes (rescale, thermal/conductivity)
changing the velocities of atoms in a region and expect them
to stay at some chosen temperature.