How to apply shear traction or shear deformation in Quasi-static analysis (at 0 K)

Hi, fellow LAMMPSer’s. I am studying the example examples/shear/in.shear. I wonder how to shear the specimen as in this example (see figure below), but in a quasi-static way, such that the kinetic energy of the atoms is 0.

In particular, the example applies a velocity to the upper layer group of the atoms to generate the shear deformation. But in this way the KE of the atoms are not 0. I wonder how to generate a similar shear deformation by “pushing” the upper layers of the atoms in a quasi-static manner? I also listed my attemps. It is greatly appreciated if you could point me to a similar example code (i.e., quasi-static shear) or hint on the correct command.

Here were my attemps.

  1. First, I tried applying a traction to the upper layers, as in the following code snipet, but it didn’t have any effect. I suspect that I need to specify a potential energy in this case, but can’t find any detailed explanation on how to define this “variable with name that calculates the potential energy”. (Any hint or example on defining the potential is appreciated!)
# Defining the system; same as the example: examples/shear/in.shear but removed all the fix and velocity commands. 

variable n equal 10
variable i loop $n

label loop_i
  variable shearforce equal $i*1000.0
  variable shearforce2 equal $i*(-1000.0)
  fix upshear upper addforce ${shearforce} 0.0 0.0
  fix lowshear lower addforce ${shearforce2} 0.0 0.0

  minimize  0.0 ${tol} 100000 1000000

  run 1
next i
  1. Then I tried directly moving the upper layer atoms, as in the following code. This time, only the upper layer atoms are displaced. The other atoms are not sheared.
variable s equal 0.5
variable i loop $n

# increment (2)
label loop_i

  variable strain equal $i*$s
  print ">>> step $i, total strain ${strain}"
  displace_atoms upper move ${strain} 0 0 units lattice

  minimize  0.0 ${tol} 100000 1000000
  run 1
next i
  1. I also tried change_box as the following:
# Defining the system; same as the example: examples/shear/in.shear but without all the fix and velocity commands except "fix 2 boundary setforce 0.0 0.0 0.0"

variable dgamma equal 0.5
variable n equal 10
variable i loop $n

label loop_i
  change_box all xy delta ${dgamma} remap units lattice
  minimize  0.0 ${tol} 100000 1000000
  run 1
next i
jump in.shear loop_i

However, in this case, the whole specimen is sheared, so the dislocation happens at multiple places. This case does not match the example, where only the upper layer is being “pushed”.

Thank you in advance.

using a variables the way it is done in this section is a clear example for the pointless abuse of the variable command. a loop as shown can be done much simpler:

variable i index 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
label loop_i

print "force is now ${i}"

next i
jump SELF loop_i

This combination of commands makes very little sense. Once you have minimized a system (i.e. brought it to a state that is close to 0K) very little will happen when applying a force unless that force is gigantic and then it will likely just rip the system apart. The single MD step does nothing useful.

See my comment from above about the behavior of 0K systems. What happens will crucially depend on how much you displace the top atoms. There need by strong enough interactions with the rest of the system and a slow enough displacement per step so that the sandwiched system can follow.

LAMMPS just does what you ask it to do.

Thanks a lot. That makes it clearer.