266 lines
13 KiB
Groff
266 lines
13 KiB
Groff
LAMMPS (4 May 2022)
|
|
using 1 OpenMP thread(s) per MPI task
|
|
# sample LAMMPS input script for thermal conductivity of liquid LJ
|
|
# thermostatting 2 regions via fix langevin
|
|
|
|
# settings
|
|
|
|
variable x equal 10
|
|
variable y equal 10
|
|
variable z equal 20
|
|
|
|
variable rho equal 0.6
|
|
variable t equal 1.35
|
|
variable rc equal 2.5
|
|
variable tlo equal 1.0
|
|
variable thi equal 1.70
|
|
|
|
#variable rho equal 0.85
|
|
#variable t equal 0.7
|
|
#variable rc equal 3.0
|
|
#variable tlo equal 0.3
|
|
#variable thi equal 1.0
|
|
|
|
# setup problem
|
|
|
|
units lj
|
|
atom_style atomic
|
|
|
|
lattice fcc ${rho}
|
|
lattice fcc 0.6
|
|
Lattice spacing in x,y,z = 1.8820721 1.8820721 1.8820721
|
|
region box block 0 $x 0 $y 0 $z
|
|
region box block 0 10 0 $y 0 $z
|
|
region box block 0 10 0 10 0 $z
|
|
region box block 0 10 0 10 0 20
|
|
create_box 1 box
|
|
Created orthogonal box = (0 0 0) to (18.820721 18.820721 37.641441)
|
|
2 by 1 by 4 MPI processor grid
|
|
create_atoms 1 box
|
|
Created 8000 atoms
|
|
using lattice units in orthogonal box = (0 0 0) to (18.820721 18.820721 37.641441)
|
|
create_atoms CPU = 0.000 seconds
|
|
mass 1 1.0
|
|
|
|
velocity all create $t 87287
|
|
velocity all create 1.35 87287
|
|
|
|
pair_style lj/cut ${rc}
|
|
pair_style lj/cut 2.5
|
|
pair_coeff 1 1 1.0 1.0
|
|
|
|
neighbor 0.3 bin
|
|
neigh_modify delay 0 every 1
|
|
|
|
# heat layers
|
|
|
|
region hot block INF INF INF INF 0 1
|
|
region cold block INF INF INF INF 10 11
|
|
compute Thot all temp/region hot
|
|
compute Tcold all temp/region cold
|
|
|
|
# 1st equilibration run
|
|
|
|
fix 1 all nvt temp $t $t 0.5
|
|
fix 1 all nvt temp 1.35 $t 0.5
|
|
fix 1 all nvt temp 1.35 1.35 0.5
|
|
thermo 100
|
|
run 1000
|
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
|
Neighbor list info ...
|
|
update every 1 steps, delay 0 steps, check yes
|
|
max neighbors/atom: 2000, page size: 100000
|
|
master list distance cutoff = 2.8
|
|
ghost atom cutoff = 2.8
|
|
binsize = 1.4, bins = 14 14 27
|
|
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
|
(1) pair lj/cut, perpetual
|
|
attributes: half, newton on
|
|
pair build: half/bin/atomonly/newton
|
|
stencil: half/bin/3d
|
|
bin: standard
|
|
Per MPI rank memory allocation (min/avg/max) = 3.152 | 3.152 | 3.152 Mbytes
|
|
Step Temp E_pair E_mol TotEng Press
|
|
0 1.35 -4.1241917 0 -2.0994448 -3.1961612
|
|
100 1.1819832 -3.7640881 0 -1.991335 0.53985757
|
|
200 1.2578365 -3.7395333 0 -1.8530144 0.69591862
|
|
300 1.3282971 -3.7215427 0 -1.7293461 0.79036065
|
|
400 1.3714367 -3.7043826 0 -1.6474847 0.85873226
|
|
500 1.3590952 -3.6707735 0 -1.6323855 0.99602024
|
|
600 1.3575117 -3.7118244 0 -1.6758114 0.81454305
|
|
700 1.3284444 -3.7075488 0 -1.7151313 0.81136596
|
|
800 1.3419995 -3.7155648 0 -1.7028172 0.82925676
|
|
900 1.3562214 -3.6965609 0 -1.6624831 0.88908117
|
|
1000 1.3732017 -3.7100044 0 -1.6504594 0.83982701
|
|
Loop time of 0.988841 on 8 procs for 1000 steps with 8000 atoms
|
|
|
|
Performance: 436874.916 tau/day, 1011.285 timesteps/s
|
|
98.4% CPU use with 8 MPI tasks x 1 OpenMP threads
|
|
|
|
MPI task timing breakdown:
|
|
Section | min time | avg time | max time |%varavg| %total
|
|
---------------------------------------------------------------
|
|
Pair | 0.54855 | 0.56275 | 0.57326 | 1.1 | 56.91
|
|
Neigh | 0.25337 | 0.2589 | 0.26473 | 0.7 | 26.18
|
|
Comm | 0.096617 | 0.10927 | 0.11899 | 2.2 | 11.05
|
|
Output | 0.00032266 | 0.00051276 | 0.0018134 | 0.0 | 0.05
|
|
Modify | 0.034998 | 0.042756 | 0.055888 | 4.0 | 4.32
|
|
Other | | 0.01466 | | | 1.48
|
|
|
|
Nlocal: 1000 ave 1020 max 982 min
|
|
Histogram: 1 0 2 1 0 1 1 1 0 1
|
|
Nghost: 2299.5 ave 2331 max 2268 min
|
|
Histogram: 1 1 1 1 0 0 0 3 0 1
|
|
Neighs: 27122 ave 28382 max 26337 min
|
|
Histogram: 2 0 2 1 1 0 0 1 0 1
|
|
|
|
Total # of neighbors = 216976
|
|
Ave neighs/atom = 27.122
|
|
Neighbor list builds = 162
|
|
Dangerous builds = 0
|
|
|
|
velocity all scale $t
|
|
velocity all scale 1.35
|
|
|
|
unfix 1
|
|
|
|
# 2nd equilibration run
|
|
|
|
fix 1 all nve
|
|
fix hot all langevin ${thi} ${thi} 1.0 59804 tally yes
|
|
fix hot all langevin 1.7 ${thi} 1.0 59804 tally yes
|
|
fix hot all langevin 1.7 1.7 1.0 59804 tally yes
|
|
fix cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes
|
|
fix cold all langevin 1 ${tlo} 1.0 287859 tally yes
|
|
fix cold all langevin 1 1 1.0 287859 tally yes
|
|
fix_modify hot temp Thot
|
|
fix_modify cold temp Tcold
|
|
|
|
variable tdiff equal c_Thot-c_Tcold
|
|
thermo_style custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff
|
|
thermo_modify colname c_Thot Temp_hot colname c_Tcold Temp_cold colname f_hot E_hot colname f_cold E_cold colname v_tdiff dTemp_step
|
|
thermo 1000
|
|
run 10000
|
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
|
Per MPI rank memory allocation (min/avg/max) = 3.906 | 3.906 | 3.906 Mbytes
|
|
Step Temp Temp_hot Temp_cold E_hot E_cold dTemp_step
|
|
1000 1.35 1.431295 1.2955644 -0 -0 0.13573065
|
|
2000 1.3593243 1.6602094 1.0898701 -0.13903162 0.14234352 0.57033928
|
|
3000 1.3412163 1.6308839 1.0677742 -0.2214765 0.25871329 0.56310968
|
|
4000 1.3275359 1.5248034 1.0792345 -0.26908328 0.34211202 0.44556887
|
|
5000 1.3230922 1.6266046 1.0523802 -0.33175886 0.43533756 0.5742244
|
|
6000 1.3037036 1.6021737 1.0408166 -0.3639815 0.49869333 0.56135712
|
|
7000 1.2903225 1.5701119 1.0603548 -0.40000421 0.55547714 0.50975712
|
|
8000 1.3050677 1.6420218 1.0221774 -0.46368839 0.60293974 0.61984444
|
|
9000 1.2950977 1.7153984 1.0583242 -0.51871512 0.66389344 0.65707419
|
|
10000 1.3100216 1.6680668 1.0871293 -0.57485359 0.7161839 0.58093752
|
|
11000 1.297052 1.6486494 1.088903 -0.60276081 0.75900024 0.55974633
|
|
Loop time of 12.8698 on 8 procs for 10000 steps with 8000 atoms
|
|
|
|
Performance: 335670.145 tau/day, 777.014 timesteps/s
|
|
99.0% CPU use with 8 MPI tasks x 1 OpenMP threads
|
|
|
|
MPI task timing breakdown:
|
|
Section | min time | avg time | max time |%varavg| %total
|
|
---------------------------------------------------------------
|
|
Pair | 4.6624 | 5.5614 | 6.4055 | 30.4 | 43.21
|
|
Neigh | 2.3761 | 2.7104 | 3.0796 | 19.6 | 21.06
|
|
Comm | 0.8473 | 1.9587 | 3.0217 | 68.6 | 15.22
|
|
Output | 0.00068778 | 0.00099949 | 0.0025433 | 0.0 | 0.01
|
|
Modify | 2.2811 | 2.3753 | 2.4584 | 3.8 | 18.46
|
|
Other | | 0.2629 | | | 2.04
|
|
|
|
Nlocal: 1000 ave 1112 max 841 min
|
|
Histogram: 1 1 0 2 0 0 0 0 1 3
|
|
Nghost: 2294.38 ave 2506 max 2077 min
|
|
Histogram: 2 1 1 0 0 0 0 1 1 2
|
|
Neighs: 27441.9 ave 32651 max 19438 min
|
|
Histogram: 1 1 0 2 0 0 0 0 0 4
|
|
|
|
Total # of neighbors = 219535
|
|
Ave neighs/atom = 27.441875
|
|
Neighbor list builds = 1674
|
|
Dangerous builds = 0
|
|
|
|
# thermal conductivity calculation
|
|
# reset langevin thermostats to zero energy accumulation
|
|
|
|
compute ke all ke/atom
|
|
variable temp atom c_ke/1.5
|
|
|
|
fix hot all langevin ${thi} ${thi} 1.0 59804 tally yes
|
|
fix hot all langevin 1.7 ${thi} 1.0 59804 tally yes
|
|
fix hot all langevin 1.7 1.7 1.0 59804 tally yes
|
|
fix cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes
|
|
fix cold all langevin 1 ${tlo} 1.0 287859 tally yes
|
|
fix cold all langevin 1 1 1.0 287859 tally yes
|
|
fix_modify hot temp Thot
|
|
fix_modify cold temp Tcold
|
|
|
|
fix ave all ave/time 10 100 1000 v_tdiff ave running
|
|
thermo_style custom step temp c_Thot c_Tcold f_hot f_cold v_tdiff f_ave
|
|
WARNING: New thermo_style command, previous thermo_modify settings will be lost (src/output.cpp:903)
|
|
thermo_modify colname c_Thot Temp_hot colname c_Tcold Temp_cold colname f_hot E_hot colname f_cold E_cold colname v_tdiff dTemp_step colname f_ave dTemp
|
|
|
|
compute layers all chunk/atom bin/1d z lower 0.05 units reduced
|
|
fix 2 all ave/chunk 10 100 1000 layers v_temp file profile.langevin
|
|
|
|
variable start_time equal time
|
|
variable kappa equal (0.5*(abs(f_hot)+abs(f_cold))/(time-${start_time})/(lx*ly)/2.0)*(lz/2.0)/f_ave
|
|
variable kappa equal (0.5*(abs(f_hot)+abs(f_cold))/(time-55)/(lx*ly)/2.0)*(lz/2.0)/f_ave
|
|
|
|
run 20000
|
|
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
|
Per MPI rank memory allocation (min/avg/max) = 4.156 | 4.157 | 4.159 Mbytes
|
|
Step Temp Temp_hot Temp_cold E_hot E_cold dTemp_step dTemp
|
|
11000 1.297052 1.6473904 1.088903 -0 -0 0.55848738 0
|
|
12000 1.2792808 1.6043738 1.0658375 -0.012256975 0.04611547 0.53853632 0.54492428
|
|
13000 1.2787101 1.7035572 1.1159037 -0.073806664 0.099529002 0.58765348 0.5581748
|
|
14000 1.289918 1.4642237 1.1073937 -0.11428779 0.13931657 0.35683005 0.56816328
|
|
15000 1.2932964 1.5032665 1.0523148 -0.17247717 0.19001309 0.45095174 0.57436291
|
|
16000 1.3025037 1.5424316 1.1185175 -0.22598282 0.22640921 0.42391405 0.56973168
|
|
17000 1.3009667 1.5582105 1.0745661 -0.27544101 0.26143452 0.48364439 0.5700118
|
|
18000 1.2970255 1.5019842 1.0228322 -0.31195285 0.31203237 0.479152 0.56544644
|
|
19000 1.2880631 1.5290587 1.0976483 -0.34645573 0.34243366 0.43141047 0.56338309
|
|
20000 1.3119675 1.6284144 1.1102294 -0.40922326 0.39217092 0.51818503 0.56614474
|
|
21000 1.2838063 1.6670934 0.97721382 -0.43809329 0.46021572 0.68987962 0.5686161
|
|
22000 1.2925041 1.7050682 1.0984963 -0.4871305 0.50520177 0.6065719 0.57226368
|
|
23000 1.2746463 1.6388503 1.0286701 -0.51212873 0.56478515 0.6101802 0.57290996
|
|
24000 1.2745381 1.7085713 1.1362975 -0.54529463 0.58540408 0.57227375 0.57296767
|
|
25000 1.2776401 1.5259253 1.0415158 -0.58389862 0.62623289 0.48440948 0.57386374
|
|
26000 1.2661888 1.4760829 0.99145001 -0.62638032 0.68155754 0.48463289 0.57021631
|
|
27000 1.2923677 1.6070495 1.0300276 -0.70014343 0.70236265 0.5770219 0.57001637
|
|
28000 1.2961449 1.7052335 1.0805793 -0.74856241 0.75775659 0.62465427 0.56927907
|
|
29000 1.2969474 1.5520176 1.1249649 -0.78900962 0.79539202 0.42705264 0.56986986
|
|
30000 1.2900596 1.6556864 1.0302676 -0.84180996 0.87187683 0.6254189 0.57245841
|
|
31000 1.2923209 1.6752068 1.0156911 -0.89036148 0.88285227 0.65951571 0.57358134
|
|
Loop time of 26.7885 on 8 procs for 20000 steps with 8000 atoms
|
|
|
|
Performance: 322526.365 tau/day, 746.589 timesteps/s
|
|
98.8% CPU use with 8 MPI tasks x 1 OpenMP threads
|
|
|
|
MPI task timing breakdown:
|
|
Section | min time | avg time | max time |%varavg| %total
|
|
---------------------------------------------------------------
|
|
Pair | 8.7499 | 11.122 | 13.336 | 57.7 | 41.52
|
|
Neigh | 4.4966 | 5.3849 | 6.2482 | 33.9 | 20.10
|
|
Comm | 1.6944 | 4.5797 | 7.4844 | 118.6 | 17.10
|
|
Output | 0.0026407 | 0.0029145 | 0.0048103 | 1.3 | 0.01
|
|
Modify | 4.9295 | 5.0982 | 5.1704 | 3.6 | 19.03
|
|
Other | | 0.6013 | | | 2.24
|
|
|
|
Nlocal: 1000 ave 1118 max 875 min
|
|
Histogram: 2 1 1 0 0 0 0 0 2 2
|
|
Nghost: 2298.62 ave 2535 max 2063 min
|
|
Histogram: 3 1 0 0 0 0 0 0 1 3
|
|
Neighs: 27462.4 ave 32904 max 21333 min
|
|
Histogram: 2 2 0 0 0 0 0 0 0 4
|
|
|
|
Total # of neighbors = 219699
|
|
Ave neighs/atom = 27.462375
|
|
Neighbor list builds = 3340
|
|
Dangerous builds = 0
|
|
print "Running average thermal conductivity: $(v_kappa:%.2f)"
|
|
Running average thermal conductivity: 3.29
|
|
Total wall time: 0:00:40
|