Calculating Shear Stress Strain

Hello all,

I want to calculate the shear stress under displacement loading, the value I am getting from “pxy” , “pyz” and “pxz”. Is this pressure tensor are giving the shear stress value? If not then please guide me how to calculate them.
Thanks in advance.

units		real
atom_style	full
dimension        3
newton on on
boundary	p p p
#Styles

# System definition
read_data	relax_4420model.data

 #   Region of model

     region        up block  17 INF INF INF INF INF units box
     region        low block INF .97 INF INF INF INF units box

     group        up region up
     group        low region low
     group        boundary union up low
     group        mobile subtract all boundary


# Fix rigid boundary atoms

#     compute         new2 mobile temp
     fix             2 boundary setforce 0.0 0.0 0.0
#     unfix           2
     fix	     3 all npt temp 310 310 100 iso 0 0 100
#     fix_modify      4 temp new2

# Apply displacement control loading

     velocity        up set 0.0 0.0 0.02 units box
     velocity        low set 0.0 0.0 -0.02 units box
     velocity        mobile ramp vz -0.02 0.02 x .97 17 sum yes

     
timestep	1
thermo_style    custom step temp etotal pxx pyy pzz pxy pxz pyz
 thermo_modify   flush yes
thermo          100
dump            1 all xyz 100 dump.xyz
compute     str all stress/atom NULL
 dump        2 all custom 10000 dump.*.stress id type x y z c_str[1] c_str[2] c_str[3] c_str[4] c_str[5] c_str[6]

run 		150000

write_data     shear_model.data

I’m not sure I see where the shear strain is applied: if you have a specific question rather than asking to look at your entire input, please point it out.

For a periodic system, this would typically entail using a triclinic simulation cell and change its off-diagonal elements to induce strain. This can be done either in discrete steps with change_box or continuously with fix deform.

The former gives you the ability to discard part of the trajectory each time you re-define the cell to minimize the contribution of non-equilibrium effects. We used this approach here for example. fix deform is conceptually more consistent with a continuous-loading experiment, with the caveat that you need to factor in the very high strain rates when discussing results. Which one is better is entirely dependent on the specific problem.

Giacomo

This whole setup makes no sense.

You have two regions that you move at fixed speed and as rigid objects in z-direction.
Thus you must not apply any pressure control in the two periodic dimensions of those layers.
And most certainly do you not have an isotropic/homogeneous system that would justify using fix npt with the iso option. In fact even using a variable cell in z-direction makes little sense, since you cannot compute a consistent pressure in z-direction either and periodic boundaries in z don’t seem the right choice either.

Your setup seems more like one of the flow examples from the LAMMPS distributions promoted to 3d.