# NEMD simulation of Ar thermal conductivity # Initialization units lj dimension 3 newton on boundary p p p atom_style atomic neighbor 0.3 bin neigh_modify check yes lattice fcc 0.844 region box block -4 4 -4 4 -4 4 units lattice create_box 1 box create_atoms 1 box region hot block INF INF INF INF -0.5 0 units lattice region cold block INF INF INF INF 3.5 4 units lattice mass 1 1.0 velocity all create 0.71 458127641 mom yes rot yes dist gaussian units box # Tersoff potential ********************************************************* pair_style lj/cut 2.8 pair_coeff 1 1 1.0 1.0 # LJ parameters for Ar-Ar fix temp all temp/berendsen 0.71 0.71 0.0466 fix nve all nve compute ke all ke/atom variable temp atom c_ke/(1.5*1.0) fix temp_profile all ave/spatial 1 100000 100000 z lower 0.5 v_temp file temp.profile units lattice compute hot_temp all temp/region hot compute cold_temp all temp/region cold variable delta_temp equal c_hot_temp-c_cold_temp fix delta_out all ave/time 1 100000 100000 v_delta_temp file delta_temp.dat thermo_style custom step temp etotal vol thermo_modify lost warn thermo 100 # Run timestep 0.000466 run 100001 unfix temp fix heat_swap all thermal/conductivity 10 z 16 fix e_exchange all ave/time 10 10000 100000 f_heat_swap file e_exchange.dat variable thermal_conductivity equal f_e_exchange/(0.000466*10.0*2.0*f_delta_out)*1.3806504e-23/(3.405e-10*3.405e-10)*sqrt(1.67e-21/6.633e-26) fix thermal_conductivity_out all ave/time 100000 1 100000 v_thermal_conductivity file thermal_conductivity.dat # Run run 10000000