Why can't we apply load along a non-periodic dimension?

Please keep the list in the loop.
I'll see what Aidan thinks about this.
He is the fix npt maestro.

Steve

Hi Aidan,
This is with respect to a question I had asked Steve, several days back.
I was wondering if we could make the stress-controlling commands
corresponding to ‘fix deform’ like ‘fix npt’ and ‘fix box/relax’ work for non-periodic boundary conditions.
For example currently, I cannot use “fix npt” or “fix box/relax” for
applying a shear stress, say SigmaXY, if X is periodic and Y is
non-periodic. They require that both directions be periodic. If ‘fix
deform’ & ‘displace_box’ (which are strain-controlling commands) could
be made free of this limitation, I think the same could be done for
the stress-controlling commands, right?
Please let me know your thoughts.

Thank you very much,
Sankar

Actually, we only require that it be periodic in the y direction. If it is
non-periodic in the x direction, you can still run fix npt with keyword
"xy". This corresponds to an infinite slab oriented normal to the x
direction. The infinite slab can be considered as being embedded in an
even more infinite linear elastic medium that is itself subjected to a
shear stress. The effect of this medium is to transmit a shear stress to
planes normal to the y direction along the x direction. Note that even
though our computational system is finite, the shear stress is
conceptulaly applied to the infinite system.

You want to flip the slab so that it lies normal to the y direction.
However, now the meaning of an applied xy shear stress is not defined,
because the sample is no longer infinite in the direction normal to the
plane of shear. This problem manifests itself in a variety of ways, all of
which are very confusing. One example is what Steve mentioned below.

Instead of trying to specify an applied stress, I think you should create
two groups of atoms at the upper and lower y boundaries. You can then
specify net forces on those groups in the x direction. This will apply a
shear stress to the system.

Aian

I had another thought. The whole point of a barostat such as fix npt is to
apply a shear stress to a periodic system *without* introducing boundary
effects. If you have a non-periodic system, you already have boundaries
effects, due to walls, free surfaces, or whatever. Therefore you don't
need a barostat*. You still need a way to apply a shear force to the
boundaries, but LAMMPS has other ways to do that e.g. fix setforce.

Aidan

*and coincidentally you also can not use one.

So I believe Aidan is saying that we already made
the fix npt and box/relax commands behave
just as fix deform (when we changed it a few weeks ago).
I had forgotten we did that.

In other words they all allow a deformation in
xy, but still require y to be periodic. They used to
also require x be periodic, but not any more.

As Aidan says, it really makes no sense to "deform"
the system in xy if y is not periodic. Without y periodicity
there is nothing to enforce xy strain, just as you can't do
a tensile deformation in x if x is not periodic.

Steve

Hi Aidan,
Thank you very much for your detailed reply. Please see my response below.
Thank you,
Sankar

Actually, we only require that it be periodic in the y direction. If it is
non-periodic in the x direction, you can still run fix npt with keyword
“xy”. This corresponds to an infinite slab oriented normal to the x
direction. The infinite slab can be considered as being embedded in an
even more infinite linear elastic medium that is itself subjected to a
shear stress. The effect of this medium is to transmit a shear stress to
planes normal to the y direction along the x direction. Note that even
though our computational system is finite, the shear stress is
conceptulaly applied to the infinite system.

You are right here with respect to ‘fix npt’ command. But I find that the fix box/relax command is not yet updated. Hence I cannot shear the box in xy, unless both x and y are periodic. I still get this error:"Cannot use fix box/relax on a 2nd non-periodic dimension "
Could you please verify?

Hey Aidan,
I was partly wrong earlier. I am able to apply a sigma-XY shear stress if Y is periodic and X is non-periodic (this is what you told me earlier and I understand it now) . But I can’t do the same if X is periodic and Y is non-periodic. I can of course get it done by flipping the box by 90 degrees to swap the X and Y directions. But is there any way to update lammps so that it could auto-detect the periodic dimension and tilt it in the non-periodic direction?
Thanks,
Sankar

First, a general comment. The number of lines of code in LAMMPS is large but finite. The number of possible simulations is infinite. Therefore, if you choose some random simulation, the probability that it is coded in LAMMPS is zero. If you want to get work done, your time is better spent acquainting yourself with what LAMMPS can do, rather than worrying about what it can not do.

Detailed comments:
-In LAMMPS, the first periodic direction (vector a) is fixed to lie along the x axis. Hence it can not be tilted in the y direction. However, tilting the second periodic direction (vector b) in the x direction is mathematically equivalent. Hence, if you want to introduce xy shearing, the cell must be periodic in the y direction. The condition that vector a lie along the x axis is unlikely to be relaxed anytime soon, as changing it would affect very many parts of LAMMPS, and would not add any new functionality to LAMMPS.

-I take it you now accept that all the relevant fixes allow xy deformations when x is periodic. If not, check that you are using the latest version of LAMMPS. If still not, send us the error message and the offending script.

-Regarding you desire to obtain shear strain versus shear stress at T=0 for a slab that is periodic in x and finite in y. I suggest inverting the problem, as follows:

  1. Relax the slab to zero stress
  2. Apply a small xy strain (displace top layer relative to bottom layer in x direction, using displace_atoms.
  3. Freeze top and bottom layers (fix_setforce 0 0 0))
  4. Relax atom positions
  5. Measure xy stress
  6. Repeat steps 2-4

-A final warning. There are lots of reasons why the results of the above protocol might not be to your liking. Most of these are due to problems inherent to the calculation and/or the physics (discontinuities in potentials, limits to mechanical stability, etc). These are not software issues. You are going to have to solve those problems yourself.

Aidan