Trying to to strain controlled run series using NPT and fix_deform. Results seem to consistently over-shoot target strain

I am using fix NPT fix with fix deform to predict equilibrium properties for a strain-controlled simulation. Output states LAMMPS version is 31 March 2017. Method is to start with 400 K temp and 0 bar stress to get equilibrium conditions, (aniso, initially orthogonal sample), ramp to a certain strain, let the runs settle, then sample the results. I do this from 0 to 10 strain\. From 0 to 4 I use 0.25% strain increments. From 4 to 10% is use 0.5 strain increments\. I have used both scale and erate methods to do this and I get same result\. The output shows a positive overshoot of the target strain, such that the strain error for each increment cumulatively increases in a straight line \(constant increase per increase in strain. Results are actually 10.5 strain at a target strain of 10.

Is there something I am doing wrong? Is there a way to increase the tolerance, or method that forces the simulation to the correct target? The error in my test analysis is fit by : actual_strain (Lx-Lxo)/Lxo vs target_strain : actual_strain =0.5049*target_strain-0.0013 with an R squared of 0.9999 (plot is very straight and tight straight line) from 0 to 0.1 target_strain.

Here is an example script used to generate the results:

#------------------------ INITIALIZATION ----------------------------
#units metal
#dimension 3
#boundary p p p
#atom_style atomic
#atom_modify map array
# ------------------------ FORCE FIELDS ------------------------------
read_restart restart.equil remap # restart.equil is equilibrium file for system at 400 K and 0 bar
pair_style eam/alloy
pair_coeff * * PdH_Zhou.eam.alloy Pd H
# ------------------------ VARIABLES -----------------------------
# Set up to run to to from 0 to 4% strain Uniaxial tension in 0.25% increments,
# 4 to 10 by 0.5% increments

variable i index 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00&
3.25 3.50 3.75 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 9.50&
10.00

variable i_inc index .25 .25 .25 .25 .25 .25 .25 .25 .25&
.25 .25 .25 .25 .25 .25 .25&
.5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5 .5

variable time_step equal 0.001
variable time_npt1 equal 20000
variable time_npt2 equal 10000
variable time_npt3 equal 10000
variable tdamp equal "v_time_step*100"
variable pdamp equal "v_time_step*1000"
variable strain equal 0.0
variable strain_final equal "v_i"
variable scale_f equal "1+v_i_inc/100"
timestep ${time_step}
variable temp1 equal 400
# ------------------------ 0 Gpa ---------------------------------
# set initial thermo printout and variables
thermo 10000
thermo_style custom step lx ly lz vol press pxx pyy pzz pe etotal temp &
pxy pxz pyz xy xz yz

# ------------ Start at 0 GPA
thermo 1000
thermo_style custom step lx ly lz vol press pxx pyy pzz temp
reset_timestep 0
fix 1 all npt temp 400. 400. \{tdamp\} x 0\. 0\. {pdamp} y 0. 0. \{pdamp\} & z 0\. 0\. {pdamp} xy 0.0 0.0 \{pdamp\} xz 0\. 0\. {pdamp} yz 0. 0. \{pdamp\} run {time_npt3}
unfix 1

label start_of_loop_1 # sets up strains after 0 GPA
# ------------------------ strain loop ---------------------------------
# ramp
fix 1 all npt temp 400. 400. \{tdamp\} y 0\. 0\. {pdamp} z 0. 0. \{pdamp\} & xy 0\. 0\. {pdamp} xz 0. 0. \{pdamp\} yz 0\. 0\. {pdamp}

fix 2 all deform 1 x scale \{scale\_f\} remap v flip yes run {time_npt1}
unfix 1
unfix 2

# settle
fix 1 all npt temp 400. 400. \{tdamp\} y 0\. 0\. {pdamp} z 0. 0. \{pdamp\} & xy 0\. 0\. {pdamp} xz 0. 0. \{pdamp\} yz 0\. 0\. {pdamp}
run ${time_npt2}
unfix 1

#sample and print results to file
fix 4 all npt temp 400. 400. \{tdamp\} y 0\. 0\. {pdamp} z 0. 0. \{pdamp\} & xy 0\. 0\. {pdamp} xz 0. 0. \{pdamp\} yz 0\. 0\. {pdamp}
run ${time_npt3}
unfix 4

next i
next i_inc
jump SELF start_of_loop_1

# SIMULATION DONE
print "All done"

I am using fix NPT fix with fix deform to predict equilibrium
properties for a strain-controlled simulation. Output states LAMMPS
version is 31 March 2017. Method is to start with 400 K temp and 0
bar stress to get equilibrium conditions, (aniso, initially orthogonal
sample), ramp to a certain strain, let the runs settle, then sample
the results. I do this from 0 to 10 strain\. From 0 to 4 I use
0.25% strain increments. From 4 to 10% is use 0.5 strain increments\. I have used both scale and erate methods to do this and I get same result\. The output shows a positive overshoot of the target strain, such that the strain error for each increment cumulatively increases in a straight line \(constant increase per increase in
strain. Results are actually 10.5 strain at a target strain of 10.

To my understanding, with the deform command within a loop, you actually
obtain an increasing engineering strain rate (you apply the same strain,
but on increasing Lx0). Same thing with the erate command if it is use
in a loop, since it reinitialized lx0 each time you call the fix.

You might want to use "fix deform" with the delta option, by computing a
delta based on the initial box size?

Julien

> I am using fix NPT fix with fix deform to predict equilibrium
> properties for a strain-controlled simulation. Output states LAMMPS
> version is 31 March 2017. Method is to start with 400 K temp and 0
> bar stress to get equilibrium conditions, (aniso, initially orthogonal
> sample), ramp to a certain strain, let the runs settle, then sample
> the results. I do this from 0 to 10 strain\. From 0 to 4 I use
> 0.25% strain increments. From 4 to 10% is use 0.5 strain > increments\. I have used both scale and erate methods to do this and I > get same result\. The output shows a positive overshoot of the target > strain, such that the strain error for each increment cumulatively > increases in a straight line \(constant increase per increase in
> strain. Results are actually 10.5 strain at a target strain of 10.
>
To my understanding, with the deform command within a loop, you actually
obtain an increasing engineering strain rate (you apply the same strain,
but on increasing Lx0). Same thing with the erate command if it is use
in a loop, since it reinitialized lx0 each time you call the fix.

You might want to use "fix deform" with the delta option, by computing a
delta based on the initial box size?

or just use "change_box" with a sufficiently small delta, which is
what people usually use when doing this kind of simulation study using
a loop construct.

axel.