Cell size changes during the stress relaxation process after strain

Dear lammps users

I attempted to observe the stress relaxation process of a crosslinked polymer after applying strain.
I applied a strain of 0.3 using the following commands:

fix 1 all npt temp 100 100 50 y 0 0 1000 z 0 0 1000 drag 2
fix 2 all deform 1 x erate 1e-5 units box remap x

Afterward, I performed stress relaxation use unfix deform but observed that the elongated x cell size did not decrease.

As an alternative approach, I added
unfix 1 and 2 and
fix 3 all npt temp 100 100 50 x 0 0 1000 y 0 0 1000 z 0 0 1000

This time, the x-direction cell size decreased, but I found that the stress of the crosslinked polymer dropped to 0, which should not occur.
image

Is there a proper way to reduce the elongated cell size after applying strain with fix deform while performing relaxation without the stress dropping to 0?

#################################################################

units real
dimension 3
boundary p p p

atom_style full

read_restart restart.dyn_npt300
pair_style lj/cut 12.5

pair_modify shift yes
bond_style harmonic
angle_style harmonic
dihedral_style opls

reset_timestep 0

dump 1 all atom 100 strain_1e-5.lammpstrj

neighbor 0.4 bin
neigh_modify every 10 one 10000

Uniaxial Tensile Deformation

compute stress all stress/atom NULL
compute pxx all reduce sum c_stress[1]

variable tmp equal “lx”
variable strain equal “(lx - v_L0)/v_L0”
variable L0 equal ${tmp}
variable p1 equal “v_strain”
variable pxx equal c_pxx
variable Lx equal lx
variable Ly equal ly
variable Lz equal lz
variable Vol equal vol
variable STEP equal step

fix 2 all ave/time 1 100 100 v_pxx

variable p2 equal “f_2[1]/10000*1.013259/v_Vol”

thermo_style custom step temp density v_strain pxx lx ly lz
thermo 100

fix a1 all npt temp 300 300 50 y 0 0 1000 z 0 0 1000 drag 2
fix a2 all deform 1 x erate 1e-5 units box remap x
fix def1 all print 100 “{STEP} {p1}” file tstep_1_1e-5.def1.txt screen no

run 30000

unfix a1
unfix a2

fix r1 all npt temp 300 300 50 x 0 0 1000 y 0 0 1000 z 0 0 1000 drag 2

run 100000

write_restart restart.relax300

Hello

This seems to me like the expected behavior if you impose a pressure of 0 along x. What do you mean by “should not occur”? What did you expect?

Simon

Thank you for your reply.

I understand that, in general, the stress of crosslinked polymers does not drop to zero. However, I used that adding the following command:
fix r1 all npt temp 300 300 50 x 0 0 1000 y 0 0 1000 z 0 0 1000 drag 2

And then, the stress droped to 0.