LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Heat flux application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Heat flux application


From: ravindra dhumal <ravi.sun93@...24...>
Date: Tue, 19 Dec 2017 00:10:32 -0600

Hello,
         I am applying heat current at the center of a carbon nanotube structure and extracting it from one end of a substrate. I am using LAMMPS command fix heat. I have divided the structure into finite number of bins. However, after using this command, temperature of most of the bins is obtained to be zero. I had equilibrated the system to be at 300 Kelvin earlier. I do not know why the system temperature would go to zero. I have tried various values (of heat current as well as time steps) for this command and still got the same result. 
The file is attached.

I am using LAMMPS 26 Jan 2017 version.

Best,
Ravi
#---------------------NiCNT kappa----------------------------

units			metal
dimension		3
boundary		p p p
atom_style		atomic
newton			on
neigh_modify		delay 5

#------------------creating structure---------------------------------

lattice		fcc 3.52 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

region		Sibox block -30 80 -15 15 -15 15 units box
create_box		2 Sibox
create_atoms	2 region Sibox units box
group			Niall region Sibox

region		NileftL block -30 0 -15 15 -15 15 units box
group			Nileft region NileftL

region		NirightR block 50 80 -15 15 -15 15 units box
group			Niright region NirightR

region		NiMiddleR block 0 50 -15 15 -15 15 units box
group			NiMid region NiMiddleR


delete_atoms 	group NiMid


read_data		1010_SW_50A.data add append


region		CNTR block 0 50 -15 15 -15 15 units box
group			CNTG region CNTR

region 		fluxinr block 23.75 26.25 INF INF INF INF units box
group			Fluxin region fluxinr

region		fluxoutL block -30 -27.3 INF INF INF INF units box
group			Fluxoutleft region fluxoutL



#-------------------potentials-----------------------------------------

pair_style		hybrid airebo 3.0 eam/alloy morse 3.0
pair_coeff		* * airebo CH.airebo C NULL
pair_coeff		* * eam/alloy Ni99.eam.alloy NULL Ni
pair_coeff		1 2 morse 0.234 1.975 2.27 3.0

mass 			1 12.0111
mass 			2 58.6934

#-------------------------initial setting---------------------------------

variable 	T equal 300        	# temperature 10 Kelvin
variable 	dt equal 0.0005      	# timestep(0.5fs)
variable 	p equal 100        	# Nevery
variable 	s equal 100            # Nrepeat
variable 	d equal $p*$s       	# Nfreq
variable 	Tlo equal 250		#cold region@5K
variable 	Thi equal 350		#hot region@15K
variable 	tdiff equal c_Thot-c_Tcold

thermo_style 		custom step vol temp pe ke etotal
thermo_modify 		flush yes
timestep		${dt}
thermo			1000

#------------------equilibration & Nose-Hoover thermostat-----------------

compute			PE all pe/atom

dump			PEtotal all custom 15000 1Ni3wCNT.pe id type x y z c_PE

dump			ALL all xyz 15000 ALL.xyz

minimize 	1.0e-10 1.0e-10 10000 10000

velocity 	all create $T 102486 mom yes rot yes dist gaussian


fix		CANONICAL all nvt temp $T $T 0.05
run		100000
unfix		CANONICAL


#----------------------Apply Heat flux--------------------------

fix 		MICROCANONICAL all nve

dump			dump2 all custom 1000 Vel.txt id type x y z vx vy vz 

fix 		Qin Fluxin heat 1 10
fix		Qoutleft Fluxoutleft heat 1 -10


#----------------------mttm--------------------------------------------------

variable 	C_e equal 21.8293e-6 #2.16117e-6
variable 	rho_e equal 0.1828 #8.49e-2
variable 	kep equal 0.056615 #0.2503042
variable 	gmp equal 6.82117 #4.69781640
variable 	gms equal 0
variable 	v_0 equal 0
variable 	Nx equal 100
variable 	Ny equal 1
variable 	Nz equal 1
variable	kB equal 8.6173324e-5      # Maxwell-Boltzmann constant in eV/K

#---Calculate Kinetic Energies of atoms in different groups---#

compute		KEleft Nileft ke/atom
compute		KEright Niright ke/atom
compute		KECNT CNTG ke/atom

#---Calculate Temperatures of atoms in different groups---#

variable	TEMP1 atom c_KEleft/(${kB}*1.5)
variable	TEMP2 atom c_KECNT/(${kB}*1.5)
variable	TEMP3 atom c_KEright/(${kB}*1.5)


#---Create bins---#
compute		CC1 Nileft chunk/atom bin/1d x lower 0.04 units reduced

compute		CC2 CNTG chunk/atom bin/1d x lower 0.02 units reduced


compute		CC3 Niright chunk/atom bin/1d x lower 0.04 units reduced

#---Calculate Temperatures of atoms in bins---#

fix		AVECHUNK1 Nileft ave/chunk $p $s $d CC1 v_TEMP1 file templeft.data

fix		AVECHUNK2 CNTG ave/chunk $p $s $d CC2 v_TEMP2 file tempcnt.data

fix		AVECHUNK3 Niright ave/chunk $p $s $d CC3 v_TEMP3 file tempright.data
                

run		500000