LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Fwd: Setting temperature during the pure shear's run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Fwd: Setting temperature during the pure shear's run


From: Asadollahzadeh <niliasadollahzadeh@...24...>
Date: Tue, 4 Jul 2017 14:13:40 +0430


Forwarded conversation
Subject: Setting temperature during the pure shear's run
------------------------

From: Asadollahzadeh <niliasadollahzadeh@...24...>
Date: Mon, Jul 3, 2017 at 2:42 PM
To: lammps-users@...48...eforge.net


Hi my friends!
I am using LAMMPS to simulate an  eam  system recently.My system was relaxed on 100 K, but when I applying pure shear , it has notable fluctuation and I don't know how can I set it on my desired temp??!!

May anyone give some advice to make the system on the fix temp ?

Thank you in advance.

regards,
Nili

velocity        lower set  0          0    0   units box
velocity        upper set  0.0006     0    0   units box

fix             3 lower setforce 0 0 0
fix             4 upper setforce 0 0 0


group           middle subtract all upper lower 
 
velocity    middle ramp vx 0.0 0.0006 y ${lim02} ${lim03} sum yes

compute    mystress middle stress/atom NULL virial
compute    reducedstress middle reduce sum c_mystress[4]     # press*volume

variable    middleVolume equal (${length_x}*${midlength}*${length_z})      
variable    stress equal (c_reducedstress)/(10^4*${middleVolume})
variable        strain equal (0.5*(1-(1/((step*0.001*0.0006/(${midlength}))+1)^2)))

fix        5    middle  nvt temp 100 100 0.1  
fix        6    lower   nve
fix        7    upper   nve
fix                    8    temp/rescale  10  100  100  0.1  1

----------
From: Axel Kohlmeyer <akohlmey@...24...>
Date: Mon, Jul 3, 2017 at 6:13 PM
To: Asadollahzadeh <niliasadollahzadeh@...24...>
Cc: LAMMPS Users Mailing List <lammps-users@lists.sourceforge.net>




On Mon, Jul 3, 2017 at 6:12 AM, Asadollahzadeh <niliasadollahzadeh@...24...> wrote:
Hi my friends!
I am using LAMMPS to simulate an  eam  system recently.My system was relaxed on 100 K, but when I applying pure shear , it has notable fluctuation and I don't know how can I set it on my desired temp??!!

​there is no indication in the input lines below, that you are doing what you claim you are doing.
i only see a one-time velocity assignment and a number of integrator/thermostat assignments, the last of which is not correct syntax.
with the assignment of fix nvt to the "middle" group, you are effectively annihilating your initial velocity ramp.
if you want to thermostat a shearing system, you have to very carefully think which degrees of freedom of your system, you need to thermostat, if at all.

also, in microscopic simulations, instantaneous temperature *always* fluctuates and the magnitude of the fluctuation depends on the size of the system. question is, does it fluctuate suitable around the desired average. ...and are you monitoring the correct temperature?

axel.

p.s.: fix temp/rescale is very bad for a production simulation and should not be used

 

May anyone give some advice to make the system on the fix temp ?

Thank you in advance.

regards,
Nili

velocity        lower set  0          0    0   units box
velocity        upper set  0.0006     0    0   units box

fix             3 lower setforce 0 0 0
fix             4 upper setforce 0 0 0


group           middle subtract all upper lower 
 
velocity    middle ramp vx 0.0 0.0006 y ${lim02} ${lim03} sum yes

compute    mystress middle stress/atom NULL virial
compute    reducedstress middle reduce sum c_mystress[4]     # press*volume

variable    middleVolume equal (${length_x}*${midlength}*${length_z})      
variable    stress equal (c_reducedstress)/(10^4*${middleVolume})
variable        strain equal (0.5*(1-(1/((step*0.001*0.0006/(${midlength}))+1)^2)))

fix        5    middle  nvt temp 100 100 0.1  
fix        6    lower   nve
fix        7    upper   nve
fix                    8    temp/rescale  10  100  100  0.1  1

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

----------
From: Asadollahzadeh <niliasadollahzadeh@...24...>
Date: Mon, Jul 3, 2017 at 9:00 PM
To: LAMMPS Users Mailing List <lammps-users@lists.sourceforge.net>


Thanks for your help, but the same as my code is in lammps example(shear),and I got idea from there...

My temp after relax is 100,99,101... but after I apply velocity it fix on 85 K.

echo            both
units           metal
atom_style      atomic
boundary        s s p


region          simbox block -300 300 -300 300 -300 300   units box
create_box      2 simbox

lattice         fcc 4.0500
region          cube block -30 30 -30 30 -30 30 units box
create_atoms 1 region cube
set             group all type/fraction 2 1 12393 
mass 1 63.546
mass 2 26.9815

pair_style eam/alloy
pair_coeff * * AlCu.eam.alloy Cu Al

velocity        all create 100 123456 mom yes rot yes
fix            1 all nvt temp 100 100 0.1
timestep        0.001

min_style         cg
minimize          1.0e-8 1.0e-8 1000 10000

velocity          all create 100 123456 mom yes rot yes
reset_timestep    0
run               100000
unfix             1
******************************************************************
reset_timestep    0

compute  ymin   all  reduce  min  y 
compute  ymax   all  reduce  max  y 

compute  xmin   all  reduce  min  x 
compute  xmax   all  reduce  max  x

compute  zmin   all  reduce  min  z 
compute  zmax   all  reduce  max  z



variable  length_y   equal  c_ymax-c_ymin
variable  length_x   equal  c_xmax-c_xmin
variable  length_z   equal  c_zmax-c_zmin

variable    fix     equal  5
variable    lim01   equal  c_ymin
variable    lim02   equal  c_ymin+v_fix
variable    lim03   equal  c_ymax-v_fix
variable    lim04   equal  c_ymax


thermo_style  custom  step c_ymin  c_ymax  c_xmin  c_xmax  c_zmin  c_zmax
thermo      100000

log           log1.txt
run 0


region          lower block  INF  INF  ${lim01}  ${lim02}  INF  INF  units  box

region          upper block  INF  INF  ${lim03}  ${lim04}  INF  INF  units  box   
 
variable        midlength  equal  ${length_y}-2*${fix} 

group           lower region lower
group           upper region upper

velocity        lower set  0          0    0   units box
velocity        upper set  0.0006     0    0   units box

fix             3 lower setforce 0 0 0
fix             4 upper setforce 0 0 0


group           middle subtract all upper lower 
 
velocity    middle ramp vx 0.0 0.0006 y ${lim02} ${lim03} sum yes

compute    mystress middle stress/atom NULL virial
compute    reducedstress middle reduce sum c_mystress[4]     # press*volume

variable    middleVolume equal (${length_x}*${midlength}*${length_z})      
variable    stress equal (c_reducedstress)/(10^4*${middleVolume})
variable        strain equal (0.5*(1-(1/((step*0.001*0.0006/(${midlength}))+1)^2)))          #Almansi strain

fix        5    middle  nvt temp 100 100 0.1  
fix        6    lower   nve
fix        7    upper   nve
fix                    8    temp/rescale 10 100 100 0.1 1

thermo          10000
thermo_style custom step temp v_strain v_stress

dump            1  all custom 10000     dumplow.lammpstrj       id  type xs  ys  zs 
dump            2  all custom 100000    dumpnormal.lammpstrj    id  type xs  ys  zs  
dump            3  all custom 500000    dumpfast.lammpstrj      id  type xs  ys  zs  

log             logFigure.txt
run             100000000



Thank you in advance.

regards,
Nili












































































----------
From: Axel Kohlmeyer <akohlmey@...24...>
Date: Mon, Jul 3, 2017 at 9:08 PM
To: Asadollahzadeh <niliasadollahzadeh@...24...>
Cc: LAMMPS Users Mailing List <lammps-users@lists.sourceforge.net>




On Mon, Jul 3, 2017 at 12:30 PM, Asadollahzadeh <niliasadollahzadeh@...24...> wrote:
Thanks for your help, but the same as my code is in lammps example(shear),and I got idea from there...


​your code is *not* the same as in the shear example. the shear example uses a temperature bias, i.e. the thermostat is not applied to the shearing direction (x) but only in y and z.

examples in LAMMPS are **examples** to quickly show how to set up a particular kind of simulation. they are by no means to be interpreted as demonstrating the best practice for these kind of runs. that contradicts with the "quickly" part.

you can set up the same thing with a suitable thermostat and/or integrator.
 

My temp after relax is 100,99,101... but after I apply velocity it fix on 85 K.

​you input below is *still* no​t having correct syntax. and there is no need to define a velocity ramp, that should develop from the shearing interaction automatically.
in fact, the resulting ramp and its linearity is a quality control for your simulation.

axel.


----------
From: Asadollahzadeh <niliasadollahzadeh@...24...>
Date: Tue, Jul 4, 2017 at 5:50 AM
To: LAMMPS Users Mailing List <lammps-users@lists.sourceforge.net>


Dear Dr.Axel ;
I corrected my coad and got desired results...
What's your idea? Is it acceptable?

compute      mystress middle stress/atom NULL virial
compute     reducedstress middle reduce sum c_mystress[4]     # press*volume

variable     middleVolume equal (${length_x}*${midlength}*${length_z})      
variable     stress equal (c_reducedstress)/(10^4*${middleVolume})
variable        strain equal (0.5*(1-(1/((step*0.001*0.0006/(${midlength}))+1)^2)))          #Almansi strain


compute              T    middle  temp
compute            newT  middle  temp/partial   0 1 1
fix             5    middle  nvt   temp 100 100 0.1 
fix_modify    5    temp    newT
fix             6    lower   nve
fix             7    upper   nve


thermo          10000
thermo_style custom step temp v_strain v_stress
thermo_modify temp newT

dump            1  all custom 10000     dumplow.lammpstrj       id  type xs  ys  zs 
dump            2  all custom 100000    dumpnormal.lammpstrj    id  type xs  ys  zs  
dump            3  all custom 500000    dumpfast.lammpstrj      id  type xs  ys  zs  

log             logFigure.txt
run             100000000

Thank you in advance.

regards,
Nili