Hello everyone
I am simulating the mechanical properties of graphene for different temperatures by the LAMMPS simulator. I am facing a problem of properties increasing as temperature increases instead of properties decreasing. And I think it must be a problem of balancing the system before deformation. I need help and I believe someone could help me. Thanks in advance
May be. But for that you will need to provide details on your system, your input, the commands that you use…
Hello Simon Gravelle,
Thank you for your reaction. I tried to attach some files regarding the details on my input file but I am not eligible.
So this is what my input file looks like:
#!/usr/bin/env bash
#------------------------ Tensile tests on material ------------------------------------
for Temp in 1 300 600 900 1200; do
#------------------------equilibration----------------------------------------
cat > Therma.in << EOF
clear
units metal
dimension 2
boundary p p p
atom_style atomic
##--------------------------------------------------------------------
variable TimeStep equal 0.001
variable T equal $Temp
variable P equal 1.01325
variable dT equal v_TimeStep*100.0
variable dP equal v_TimeStep*1000.0
##---------------ATOM DEFINITION------------------------------
read_data graphene.dat
##---------------FORCE FIELDS---------------------------------
pair_style airebo 3.0 1 1
pair_coeff * * ../../potentials/CH.airebo C
##------------------------------------------------------------
timestep \${TimeStep}
#------------------------------------------------------------
fix 1 all box/relax x \${P} y \${P} vmax 0.001
min_style cg
minimize 1e-10 1e-10 5000 10000
unfix 1
minimize 1e-10 1e-10 5000 10000
#-----------------Pressure Equilibriation-----------------------
reset_timestep 0
velocity all create \${T} 456783 dist uniform
fix 1 all npt temp \${T} \${T} \${dT} aniso \${P} \${P} \${dP}
run 250000
unfix 1
write_data Relax.dat
EOF
lmp_serial -i Therma.in > Therma.out
#------------------------ (1) x direction ------------------------------------
cat > X.in << EOF
#uniaxial tensile test of graphene
# INITIALIZATION
clear
units metal
dimension 2
boundary p p p
atom_style atomic
newton on
##--------------------------------------------------------------------
variable TimeStep equal 0.001
variable T equal $Temp
variable P equal 0.0
variable dT equal v_TimeStep*100.0
variable dP equal v_TimeStep*1000.0
##---------------ATOM DEFINITION------------------------------
read_data Relax.dat
##---------------FORCE FIELDS---------------------------------
pair_style airebo 3.0 1 1
pair_coeff * * ../../potentials/CH.airebo C
##------------------------------------------------------------
timestep \${TimeStep}
variable tmp equal "lx"
variable L0x equal \${tmp}
variable tmp equal "ly"
variable L0y equal \${tmp}
##---------------DEFORMATION--------------------------------------
reset_timestep 0
fix 2 all npt temp \${T} \${T} \${dT} y 0.0 0.0 \${dP}
variable srate equal 0.001
fix 3 all deform 1 x erate \${srate} units box remap x
compute 1 all pressure thermo_temp
thermo 100
thermo_style custom step temp lz pxx pyy
##--------------------------------------------------------------------
variable Lz equal lz
fix 4 all ave/time 5 1000 5000 v_Lz c_1[1] c_1[2] c_1[3] c_1[4]
run 0
##---------------THERMO-OUTPUTS--------------------------------------
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
variable ConvPres equal 1e-4
variable thickn equal 3.35 #nm
variable strain equal (lx-v_L0x)/v_L0x
variable stress equal -(f_4[2])*(f_4[1]/v_thickn)*v_ConvPres #GPa
variable StrainEnergy equal 0.5*v_stress*v_strain #GPa
fix Data all print 5000 "\${strain} \${stress} \${StrainEnergy}" file X\${T}.txt screen no
dump 2 all atom 5000 X\${T}.dat
run_style verlet
run 300000
EOF
lmp_serial -i X.in > X.out
done
Thanks !
Hello,
Posting your input is a good start, but it would be also good to explain what you are trying to measure and why you think there is a problem.
On the side note: are you sure a 1 fs timestep is allowed with airebo? From memory, I think that it should be 0.5 fs.
Simon
And here is the contents of the graphene.dat file:
LAMMPS data file via write_data, version 3 Mar 2020, timestep = 17
60 atoms
1 atom types
-4.8108192480347395e-02 1.2048108192480351e+01 xlo xhi
-4.9995500181758912e-02 1.2520761314677692e+01 ylo yhi
0.0000000000000000e+00 1.0000000000000007e+02 zlo zhi
Masses
1 12.0107
Atoms # atomic
1 1 -4.8108192480347020e-02 1.2520761314677690e+01 5.0000000000000036e+01 0 -1 0
2 1 1.1615134460157208e+00 6.4837987842154421e-01 5.0000000000000036e+01 0 0 0
3 1 1.1615134460157224e+00 2.0451306356281487e+00 5.0000000000000036e+01 0 0 0
4 1 -4.8108192480346999e-02 2.7435060142314533e+00 5.0000000000000036e+01 0 0 0
5 1 2.3711350845117933e+00 -4.9995500181758912e-02 5.0000000000000036e+01 0 0 0
6 1 3.5807567230078621e+00 6.4837987842154399e-01 5.0000000000000036e+01 0 0 0
7 1 3.5807567230078612e+00 2.0451306356281487e+00 5.0000000000000036e+01 0 0 0
8 1 2.3711350845117933e+00 2.7435060142314525e+00 5.0000000000000036e+01 0 0 0
9 1 4.7903783615039313e+00 1.2520761314677690e+01 5.0000000000000036e+01 0 -1 0
10 1 6.0000000000000018e+00 6.4837987842154321e-01 5.0000000000000036e+01 0 0 0
11 1 6.0000000000000000e+00 2.0451306356281487e+00 5.0000000000000036e+01 0 0 0
12 1 4.7903783615039313e+00 2.7435060142314516e+00 5.0000000000000036e+01 0 0 0
13 1 7.2096216384960670e+00 1.2520761314677690e+01 5.0000000000000036e+01 0 -1 0
14 1 8.4192432769921393e+00 6.4837987842154443e-01 5.0000000000000036e+01 0 0 0
15 1 8.4192432769921375e+00 2.0451306356281460e+00 5.0000000000000036e+01 0 0 0
16 1 7.2096216384960687e+00 2.7435060142314533e+00 5.0000000000000036e+01 0 0 0
17 1 9.6288649154882098e+00 1.2520761314677690e+01 5.0000000000000036e+01 0 -1 0
18 1 1.0838486553984282e+01 6.4837987842154365e-01 5.0000000000000036e+01 0 0 0
19 1 1.0838486553984282e+01 2.0451306356281469e+00 5.0000000000000036e+01 0 0 0
20 1 9.6288649154882116e+00 2.7435060142314533e+00 5.0000000000000036e+01 0 0 0
21 1 -4.8108192480347277e-02 4.1402567714380565e+00 5.0000000000000036e+01 0 0 0
22 1 1.1615134460157228e+00 4.8386321500413594e+00 5.0000000000000036e+01 0 0 0
23 1 1.1615134460157228e+00 6.2353829072479643e+00 5.0000000000000036e+01 0 0 0
24 1 1.2048108192480349e+01 6.9337582858512690e+00 5.0000000000000036e+01 -1 0 0
25 1 2.3711350845117920e+00 4.1402567714380565e+00 5.0000000000000036e+01 0 0 0
26 1 3.5807567230078607e+00 4.8386321500413594e+00 5.0000000000000036e+01 0 0 0
27 1 3.5807567230078621e+00 6.2353829072479643e+00 5.0000000000000036e+01 0 0 0
28 1 2.3711350845117911e+00 6.9337582858512690e+00 5.0000000000000036e+01 0 0 0
29 1 4.7903783615039321e+00 4.1402567714380591e+00 5.0000000000000036e+01 0 0 0
30 1 6.0000000000000000e+00 4.8386321500413594e+00 5.0000000000000036e+01 0 0 0
31 1 6.0000000000000018e+00 6.2353829072479643e+00 5.0000000000000036e+01 0 0 0
32 1 4.7903783615039313e+00 6.9337582858512690e+00 5.0000000000000036e+01 0 0 0
33 1 7.2096216384960687e+00 4.1402567714380574e+00 5.0000000000000036e+01 0 0 0
34 1 8.4192432769921393e+00 4.8386321500413603e+00 5.0000000000000036e+01 0 0 0
35 1 8.4192432769921393e+00 6.2353829072479643e+00 5.0000000000000036e+01 0 0 0
36 1 7.2096216384960687e+00 6.9337582858512690e+00 5.0000000000000036e+01 0 0 0
37 1 9.6288649154882116e+00 4.1402567714380565e+00 5.0000000000000036e+01 0 0 0
38 1 1.0838486553984282e+01 4.8386321500413612e+00 5.0000000000000036e+01 0 0 0
39 1 1.0838486553984282e+01 6.2353829072479643e+00 5.0000000000000036e+01 0 0 0
40 1 9.6288649154882098e+00 6.9337582858512681e+00 5.0000000000000036e+01 0 0 0
41 1 -4.8108192480347270e-02 8.3305090430578748e+00 5.0000000000000036e+01 0 0 0
42 1 1.1615134460157222e+00 9.0288844216611785e+00 5.0000000000000036e+01 0 0 0
43 1 1.1615134460157228e+00 1.0425635178867784e+01 5.0000000000000036e+01 0 0 0
44 1 -4.8108192480347395e-02 1.1124010557471085e+01 5.0000000000000036e+01 0 0 0
45 1 2.3711350845117933e+00 8.3305090430578748e+00 5.0000000000000036e+01 0 0 0
46 1 3.5807567230078607e+00 9.0288844216611785e+00 5.0000000000000036e+01 0 0 0
47 1 3.5807567230078625e+00 1.0425635178867784e+01 5.0000000000000036e+01 0 0 0
48 1 2.3711350845117920e+00 1.1124010557471083e+01 5.0000000000000036e+01 0 0 0
49 1 4.7903783615039321e+00 8.3305090430578748e+00 5.0000000000000036e+01 0 0 0
50 1 6.0000000000000000e+00 9.0288844216611785e+00 5.0000000000000036e+01 0 0 0
51 1 6.0000000000000000e+00 1.0425635178867784e+01 5.0000000000000036e+01 0 0 0
52 1 4.7903783615039313e+00 1.1124010557471085e+01 5.0000000000000036e+01 0 0 0
53 1 7.2096216384960687e+00 8.3305090430578748e+00 5.0000000000000036e+01 0 0 0
54 1 8.4192432769921375e+00 9.0288844216611785e+00 5.0000000000000036e+01 0 0 0
55 1 8.4192432769921375e+00 1.0425635178867784e+01 5.0000000000000036e+01 0 0 0
56 1 7.2096216384960687e+00 1.1124010557471088e+01 5.0000000000000036e+01 0 0 0
57 1 9.6288649154882098e+00 8.3305090430578748e+00 5.0000000000000036e+01 0 0 0
58 1 1.0838486553984282e+01 9.0288844216611785e+00 5.0000000000000036e+01 0 0 0
59 1 1.0838486553984282e+01 1.0425635178867784e+01 5.0000000000000036e+01 0 0 0
60 1 9.6288649154882116e+00 1.1124010557471088e+01 5.0000000000000036e+01 0 0 0
Velocities
1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
10 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
11 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
12 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
13 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
14 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
15 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
16 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
17 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
18 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
19 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
21 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
22 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
23 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
24 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
25 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
26 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
27 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
28 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
29 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
30 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
31 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
32 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
33 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
34 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
35 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
36 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
37 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
38 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
39 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
40 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
41 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
42 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
43 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
44 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
45 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
46 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
47 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
48 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
49 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
50 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
51 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
52 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
53 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
54 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
55 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
56 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
57 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
58 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
59 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
60 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
That would be if there are hydrogen atoms. For carbon only, 1fs should be fine.
Which properties are increasing that you expect to be decreasing? And by what margin?
The Young’s and shear moduli then the elastic constants C11, C22, C66 … when the temperature increases. These moduli and elastic constants should rather decrease
Okay Simon
I evaluate the effect of temperature on the mechanical properties of graphene. So, for each temperature case, I try to thermalize the system before applying the strain and then use the slope of the strain-stress relationship to calculate the moduli. My problem is that the slope increases when the temperature increases and therefore the modules too
The Young’s and shear moduli then the elastic constants C11, C22, C66… increase when the temperature increases. These moduli and elastic constants should rather decrease
Concerning the problem of the time step, I tried with 0.5 fs as with 1 fs. But it’s the same problem.
I wonder if I wrote the correct commands for thermalization or equilibration.
Hi @joe1,
This is a physics problem, you might want to consider what you’re doing with regards to the mechanics.
Your input is complicated but from what I understand you’re doing a strain-stress deformation on a very small system (60 atoms) along your x axis with constant pressure on your y axis. I have couple comments on your procedure:
- Equilibration
From those lines:
#-----------------Pressure Equilibriation-----------------------
reset_timestep 0
velocity all create \${T} 456783 dist uniform
fix 1 all npt temp \${T} \${T} \${dT} aniso \${P} \${P} \${dP}
run 250000
unfix 1
write_data Relax.dat
[...]
##---------------ATOM DEFINITION------------------------------
read_data Relax.dat
As I understand, the system you end up with is the final state of your simulation. Pressure and box lengths fluctuates using NPT fix so you might not be at zero strain at timestep 250000. Plus you do not equilibrate it before acquiring data. This is basic MD procedure: equilibrate your system before running NPT, take an average or your box values and resize it correctly. But since your system is small, your fluctuations will be large. So either get a lot of data with long simulation, or use a bigger system.
- Strain simulations:
This is what I understand from this part of your script:
fix 2 all npt temp \${T} \${T} \${dT} y 0.0 0.0 \${dP}
variable srate equal 0.001
fix 3 all deform 1 x erate \${srate} units box remap x
I do not know the details of your project but be aware that inducing strain along x axis will give rise to stress along x but also y at constant y strain. With the mathematics, say your strain is \varepsilon and your stress \sigma along axis x=1 and y=2 with your elastic tensor C, keeping the y axis unstrained should give two stress terms \sigma_1=C_{11}\varepsilon_1 and \sigma_2=C_{12}\varepsilon_1. But relaxing the pressure along y will make \varepsilon_2 non-zero wrt the reference state so \sigma_1=C_{11}\varepsilon_1+C_{12}\varepsilon_2. This can be a good way to proceed if you’re interested in Poisson’s ratio or others mechanical properties values, but I doubt it is straightforward to get C_{ij} out of it (one equation, several unknown values). Correct me if I’m wrong, again, your input is not that simple to read.
But these are details of your protocol you might want to discuss with people familiar with the how-to of MDs around you or check in the literature on the procedure people used to compute those values.
Hi Germain,
By the way, the system file shown here is the initial system state long before any simulation. I also took care to do the minimization (script between Therm.in … Therm.out) of the system via the conjugate gradient (CG) method before doing the NPT equilibration. At the end of the NPT equilibration for each temperature, I write the state of the system to the “Relax” file. And it is on this “Relax” file that I applied the deformation in the second part (script between X.in … X.out).
Except that I don’t know if this is the right procedure since I am a new LAMMPS user.
THANKS