[lammps-users] nanoindentation simulation

Hi everyone;
I would like to simulate a nanoindentation deformation for a binary system. Please how can I obtain the nanoindentation unloading part in the load displacement curve? which command should I use?
Please find below my input script and P-h curve obtained.
Thanks in advance.

---------- indentation

variable z equal “162.5-0.1stepdt”
print “z is $z”
fix 5 all indent 1000.0 sphere 50.7 40.0 v_z 60 units box

---------- Run with indenter

timestep 0.001
thermo 10
thermo_modify temp new
thermo_style custom step f_5[3]
run 300000

Please note that what you are asking is not really a question about LAMMPS but a question about the model and thus the science you want to simulate.
Thus it is difficult to give a specific answer, because to tell you what to do in LAMMPS you first need to decide which kind of model you want to implement.

For example, to completely take away the load you can just use the unfix command, while to remove the load gradually, you just need to modify the equal style variable so that it retracts the indenter at a speed you desire after you have reached the maximal load you want to achieve. e.g. with something like this (untested) that will retract the indenter at the same speed as you first push it into your system while you also have to double the number of timesteps (or use $(2*v_maxload) instead of the explicit number of steps in the run command):

variable maxload index 300000
variable z equal “162.5-0.1*((step<v_maxload)step+(step>=v_maxload)(2*v_maxload-step))*dt”