LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Region instead of group
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Region instead of group

From: Zohreh Ahadi <zohreh.ahadi@...24...>
Date: Sun, 6 May 2018 20:40:09 +0430

because when the water become group, they always, even after enough time, diffuse in other group with same group NVT temp, and NVE did not , and their temp decrease or increase  incorrectly.

when I considered the MOS2 nanotube only as cold or hot group and when water reach them, again cann't reach temp we set.

On Sun, May 6, 2018 at 8:18 PM, Zohreh Ahadi <zohreh.ahadi@...24...> wrote:
I should correct the temp vertical axis :

On Sun, May 6, 2018 at 8:15 PM, Zohreh Ahadi <zohreh.ahadi@...1125.....> wrote:
Dear Dr axel

Thanks for your attention.
Yes, the thermal conductivity of our nanotube (MoS2) according our result in this article is very much lower than carbon nanotubes.
I thought my details are annoyed you, as you said  "my description is too vague to give specific advice"
I should mention them:

# Created by charmm2lammps v1.8.3 on 
echo            both
boundary        p p p
units           metal

atom_style      full
bond_style      harmonic
angle_style     harmonic
neigh_modify    delay 2 every 1

#read_restart    eq.restart.300000

group           water type 1 2
group           oxy   type 2
group           nanotube type 3 4

neighbor        2.0 bin
#neigh_modify    every 2 one 10000 page 200000 #include all  binsize 2.0 #delay 10 check yes exclude all  
#fix 1 nanotube rigid molecule
#0.00058595          epsilon_MM
#0.01386             epsilon_SS
#4.200               sigma_MM 
#3.130               sigma_SS

pair_style     hybrid rebomos  lj/cut/tip4p/long 2 1 1 1 0.1546  8.5 
pair_coeff     *  *  rebomos  MoS.REBO.set5b  NULL  NULL  M  S

pair_coeff   2   2     lj/cut/tip4p/long  0.008031034   3.1589
pair_coeff   1   1     lj/cut/tip4p/long  0.0   0.0
pair_coeff   1   2     lj/cut/tip4p/long  0.0   0.0 
pair_coeff   1   3     lj/cut/tip4p/long  0.0   0.0
pair_coeff   1   4     lj/cut/tip4p/long  0.0   0.0 
pair_coeff   2   3     lj/cut/tip4p/long  0.002169  3.67945
pair_coeff   2   4     lj/cut/tip4p/long  0.01055   3.14445

kspace_style  pppm/tip4p 1e-4
delete_atoms    overlap 1.0   water nanotube mol yes

 # region +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

region        coldl  block  INF INF  INF INF  INF 6.32  units box
group          coldl region coldl

region          1 block    INF INF  INF INF  6.32  12.64   units box
group           1 region 1

region          2 block   INF INF  INF INF   12.64  18.96   units box
group           2 region 2

region          3 block   INF INF  INF INF   18.96  25.28  units box
group           3 region 3

region          4 block    INF INF  INF INF  25.28  31.6  units box
group           4 region 4

region          5 block   INF INF  INF INF  31.6  37.92    units box
group           5 region 5

region          6 block  INF INF  INF INF   37.92  44.24   units box
group           6 region 6

region          hot block   INF INF  INF INF  44.24  56.88   units box
group           hot  region hot

region          7  block   INF INF  INF INF  56.88  63.2    units box
group           7 region 7

region          8  block  INF INF  INF INF     63.2  69.52   units box
group           8 region 8

region          9  block    INF INF  INF INF   69.52  75.84   units box
group           9 region 9

region          10   block   INF INF  INF INF   75.84  82.16   units box
group           10 region 10

region          11 block   INF INF  INF INF    82.16  88.48    units box
group           11 region 11

region          12 block   INF INF  INF INF   88.4  94.8  units box
group           12 region 12

region         coldr block   INF INF  INF INF  94.8  INF units box
group           coldr region coldr 

group           middle subtract all hot coldl coldr

 region          inc cylinder z 100 100  12.035  0.7  100.34  units box side in
group           inc region inc
variable     natoms equal count(inc)
variable        nmass equal mass(inc)

variable        A32cm3 equal 1e-24 # Angstrom^3 in cm^3
variable        volInCNT equal 99.64*3.14*11.9*11.9
variable DensityIn equal (v_nmass/6.02e23)/(v_volInCNT*${A32cm3})
print    ${DensityIn}


 compute MSDwat water msd com yes
 #compute MSDeq all msd com yes
 variable Temp equal  temp 
  variable Atoms equal atoms
  variable Ke equal ke
  variable Pe equal pe
  variable Enthalpy equal enthalpy  
  variable Press equal press  
  variable Etotal equal etotal  
  variable Eperatom equal etotal/atoms 
  variable Ebond equal ebond
  variable Density equal density
  variable  ncoldl equal count(coldl)
  variable n1 equal count(1)
  variable n2 equal count(2)
  variable n3 equal count(3)
  variable n4 equal count(4)
  variable n5 equal count(5)
  variable n6 equal count(6)
  variable  nhot equal count(hot)
  variable n7 equal count(7)
  variable n8 equal count(8)
  variable n9 equal count(9)
  variable n10 equal count(10)
  variable n11 equal count(11)
  variable n12 equal count(12)
  variable  ncoldr equal count(coldr)
compute Tcoldl coldl temp
compute T1 1 temp
compute T2 2 temp
compute T3 3 temp
compute T4 4 temp
compute T5 5 temp
compute T6 6 temp
compute Thot hot temp
compute T7 7 temp
compute T8 8 temp
compute T9 9 temp
compute T10 10 temp
compute T11 11 temp
compute T12 12 temp
compute Tcoldr coldr temp

#kinetik Energy profile="">=====================================================================

compute kecoldl coldl ke
compute ke1 1 ke
compute ke2 2 ke
compute ke3 3 ke
compute ke4 4 ke
compute ke5 5 ke
compute ke6 6 ke
compute kehot hot ke
compute ke7 7 ke
compute ke8 8 ke
compute ke9 9 ke
compute ke10 10 ke
compute ke11 11 ke
compute ke12 12 ke
compute kecoldr coldr ke


compute percoldl coldl pe/atom
compute         pe_coldl  coldl reduce sum c_percoldl
compute per1 1 pe/atom
compute         pe_1 1 reduce sum c_per1
compute per2 2 pe/atom
compute         pe_2 2 reduce sum c_per2
compute per3 3 pe/atom
compute         pe_3 3 reduce sum c_per3
compute per4 4 pe/atom
compute         pe_4 4 reduce sum c_per4
compute per5 5 pe/atom
compute         pe_5 5 reduce sum c_per5
compute per6 6 pe/atom
compute         pe_6 6 reduce sum c_per6
compute perhot hot pe/atom
compute         pe_hot hot reduce sum c_perhot
compute per7 7 pe/atom
compute         pe_7 7 reduce sum c_per7
compute per8 8 pe/atom
compute         pe_8 8 reduce sum c_per8
compute per9 9 pe/atom
compute         pe_9 9 reduce sum c_per9
compute per10 10 pe/atom
compute         pe_10 10 reduce sum c_per10
compute per11 11 pe/atom
compute         pe_11 11 reduce sum c_per11
compute per12 12 pe/atom
compute         pe_12 12 reduce sum c_per12
compute percoldr coldr pe/atom
compute         pe_coldr  coldr reduce sum c_percoldr
  variable  Etcoldl equal c_kecoldl+c_pe_coldl
  variable  Et1 equal c_ke1+c_pe_1
  variable  Et2 equal c_ke2+c_pe_2
  variable  Et3 equal c_ke3+c_pe_3
  variable  Et4 equal c_ke4+c_pe_4
  variable  Et5 equal c_ke5+c_pe_5
  variable  Et6 equal c_ke6+c_pe_6
  variable    Ethot equal c_kehot+c_pe_hot
  variable Et7 equal c_ke7+c_pe_7
  variable Et8 equal c_ke8+c_pe_8
  variable Et9 equal c_ke9+c_pe_9
  variable Et10 equal c_ke10+c_pe_10
  variable Et11 equal c_ke11+c_pe_11
  variable Et12 equal c_ke12+c_pe_12
  variable  Etcoldr equal c_kecoldr+c_pe_coldr

compute         MSDcoldl coldl msd com yes 
compute         msd1 1 msd com yes
compute         msd2 2 msd com yes
compute         msd3 3 msd com yes
compute         msd4 4 msd com yes
compute         msd5 5 msd com yes
compute         msd6 6 msd com yes
compute         msdhot hot msd com yes
compute         msd7 7 msd com yes
compute         msd8 8 msd com yes
compute         msd9 9 msd com yes
compute         msd10 10 msd com yes
compute         msd11 11 msd com yes
compute         msd12 12 msd com yes
compute         MSDcoldr coldr msd com yes

#relaxation ==================================================================================================
minimize          0.001 0.001 1000 10000
fix               2 all nvt temp 300 300 0.1
 timestep          0.001
thermo  1000
dump            1 all atom 1000  equi.lammpstrj
thermo_style    custom step temp etotal enthalpy press pe v_DensityIn    
fix  3  all ave/time 1 1000 1000 c_Tcoldl c_T1 c_T2 c_T3 c_T4 c_T5 c_T6  c_T7 c_Thot c_T8 c_T9 c_T10 c_T11 c_T12 c_Tcoldr v_Etcoldl v_Et1 v_Et2 v_Et3 v_Et4 v_Et5 v_Et6 v_Ethot v_Et7 v_Et8 v_Et9 v_Et10 v_Et11 v_Et12  v_Etcoldr v_ncoldl v_n1 v_n2 v_n3 v_n4 v_n5 v_n6 v_nhot v_n7 v_n8 v_n9 v_n10 v_n11 v_n12  v_ncoldr file avequi.txt

restart 100000  equi.restart
run  300000
unfix  2
unfix  3
fix 4 hot  nvt temp 350 350 0.1
fix 5 coldl nvt temp 200 130 0.1
fix 6 coldr nvt temp 200 130 0.1
fix             7 middle nve 

thermo_style    custom step temp etotal enthalpy press pe 
timestep          0.001
dump             2 all atom 1000  gradian.lammpstrj
dump             2dcd  all dcd 2000  gradian.dcd
 dump_modify     2dcd  unwrap yes

fix  8  all ave/time 1 1000 1000 c_Tcoldl c_T1 c_T2 c_T3 c_T4 c_T5 c_T6  c_T7 c_Thot c_T8 c_T9 c_T10 c_T11 c_T12  c_Tcoldr v_Etcoldl v_Et1 v_Et2 v_Et3 v_Et4 v_Et5 v_Et6 v_Ethot v_Et7 v_Et8 v_Et9 v_Et10 v_Et11 v_Et12 v_Etcoldr v_ncoldl v_n1 v_n2 v_n3 v_n4 v_n5 v_n6  v_nhot v_n7 v_n8 v_n9 v_n10 v_n11 v_n12 v_ncoldr v_Pe v_Press v_Enthalpy v_Etotal v_Eperatom v_DensityIn c_MSDwat[1] c_MSDwat[2] c_MSDwat[3] c_MSDwat[4]  file avfreez.txt 
fix   9 all  ave/time 1 1000 1000 c_MSDcoldl[4] c_msd1[4] c_msd2[4] c_msd3[4] c_msd4[4] c_msd5[4] c_msd6[4] c_msdhot[4] c_msd7[4] c_msd8[4] c_msd9[4] c_msd10[4] c_msd11[4] c_msd12[4] c_MSDcoldr[4] file aveMSd.txt
thermo  1000

restart 100000  grad.restart
run  2500000

I ask my question in other words: as clear in input I considered 15 regions along of axis of MoS2 nanotube, 12 middles, two ends are cold , one center is hot.
my question all of them did not reach to temp which I want. of course in my previous article without water, when we calculated the thermal conductivity of Mos2, we could reach the desire temp. but MoS2 nanotube with filled water it didn't happen. 
when water and Mos2nanotube  around water considered as a cold or hot group, after steady state didn't reach appropriate temp, I send the temp of each region. 
of course before the inducing temp gradient I relax my system( MoS2 nanotube and water inside it) and checked the energy of system and  density which I send my pic.

I hope I clear my question.
Sincerely yours.


On Sun, May 6, 2018 at 6:49 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:
On Sun, May 6, 2018 at 6:26 AM, Zohreh Ahadi <zohreh.ahadi@...24...> wrote:
> Dear all lammps user
> Thanks with your regarding , I have one question about the regions, It maybe
> considered easy but stop my project.
> I simulated the nanotube which filled water, the two end of nanotube are
> considered cold groups and the center of nanotube is hot group by NVT at
> specific temperature.
> I tested two strategy: Firstly , I considered the two end of nanotube with
> water, as cold group , after running  the  temp  result didn't match with
> the NVT temp which I set, and the cold group were very colder, and hot, was
> very hotter than I am set in NVT.
> Secondly:  I considered the two end of nanotube, without water as one
> group...again the result temp was not match.( The nanotube has low thermal
> conductivity)

actually, nanotubes have high thermal conductivity due to their
rigidity, but along the axis.

> Question:I would like to Know, Is it possible instead of one group, (cold or
> hot) the region set as NVT?( untill water moleculars when come or exit from
> this region feel the NVT)
> I am eager to know your advise for solving this problem.

your description is too vague to give specific advice. it looks from
your description, that you are not considering time scales (and
possibly also length scales) well enough and that you are looking at a
slow process. if that is the case, there is no use to accelerating
this process with a thermostat. you will replace computer simulation
with computer animation and the scientific value of your results will
approach zero.


> sincerely yours,
> Zohreh
> PhD student nano physics
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites,!
> _______________________________________________
> lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.