#Parameters of simulation and atoms units metal dimension 3 boundary p p p atom_style full newton on off #Atom definition read_data graphene_1008atoms #Creating Regions region up block INF INF INF INF -5 5 units box region down block INF INF INF INF -50 -40 units box #Potentials pair_style tersoff pair_coeff * * SiC.tersoff C neighbor 4.0 bin neigh_modify delay 0 every 1 check yes timestep 0.0005 velocity all create 100.0 12345 mom yes rot yes dist gaussian units box # take some potential energy out of the system minimize 1.0e-8 1.0e-6 1000 10000 reset_timestep 0 fix thermostat all nvt temp 300.0 300.0 0.1 compute alltemp all temp # Obtaining temperature compute ke all ke/atom variable temp atom c_ke/(1.5*1.0)/8.617343*100000.0 variable temp atom c_ke*1.60217e-17/(1.5*1.380654e-23) fix temp_profile all ave/spatial 1 100000 100000 z -50 50 v_temp file temp.profile units box fix temp_atom all ave/atom 1 100000 100000 v_temp compute up_temp all temp/region up compute down_temp all temp/region down variable delta_t equal c_up_temp-c_down_temp fix delta_t all ave/time 100 5 1000 v_delta_t file delta_t.dat dump 1 all xyz 100000 dump.coord.* dump 2 all custom 100000 dump.vel.* id type mass vx vy vz fx fy fz f_temp_atom #Thermal conductivity calculations fix nve all nve fix heat_swap all thermal/conductivity 10 z 10 fix e_exchange all ave/time 40 2500 100000 f_heat_swap file e_exchange.dat variable thermal_conductivity equal f_heat_swap*1.60217e-19/(2*0.0005*100000*1.0e-12*50*51.77*f_delta_t*1.0e-10)*51.03 #2: To address heat flux in periodic boundary conditions #0.0005 – Timestep #100000 – Total number of steps in simulation #1.0e-12: ps to second conversion #50: Half the length of simulation box along z (i.e. heat flow direction) #51.77: Total length of simulation box along y direction #1.0e-10: Angstrom to metre conversion #51.03: Length of simulation box in x direction fix thermal_conductivity all ave/time 100000 1 100000 v_thermal_conductivity file thermal_conductivity.dat thermo_style custom step atoms temp press pe ke etotal xlo xhi ylo yhi zlo zhi vol v_delta_t v_thermal_conductivity run 9000000