hello
I am trying to simulate tensile test and calculate stress-strain curve.i applied the below code but the result was weird also the curve was wrong ( the curve was attached).Could anyone give me any possible reason for this?does the compute that used for calculating the stress wrong?

``````I will be grateful to you, if someone can help and suggest solutin.thank you for your consideration
``````

#—initialize simulation------
units metal
dimension 3
boundary s s p
atom_style atomic
#----create atoms-----------
#-------- LJ potentials-------------

pair_style eam/alloy
pair_coeff * * Zope-Ti-Al-2003.eam.alloy Ti Al

#----variable
variable L equal 82.3
variable dy equal 8.23
variable y1 equal -0.0
variable y2 equal {dy} #-------------region----- region Lower block INF INF {y1} {y2} INF INF units box group Lower region Lower variable y1 equal {L}-{dy} variable y2 equal {L}
region Upper block INF INF {y1} {y2} INF INF units box
group Upper region Upper
group boundary union Lower Upper
group middle_atoms subtract all boundary

#—Give some initial velocity to all the atoms randomly at a temperature of 0.01K.
velocity all create 300 511124 rot yes mom yes

#—Compute the stress for each atom and sum each component for all atoms.
compute peratom all stress/atom NULL pair virial
compute fy all reduce sum &
c_peratom[1] c_peratom[2] c_peratom[3] &
c_peratom[4] c_peratom[5] c_peratom[6]
compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
#—Create a variable called sigmavolume that stores the y component of the stress tensor.
variable sigmavolume equal c_fy[2]/vol
#Create a variable called strain, which calculates the strain during the simulation
variable strain equal (ly-v_L)/v_L
#–Create a variable called press that computes the total pressure.
variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol)
#–Definition of the frequency with which the output information is going to be registered and which variables are going to be recorded.
thermo 10000
thermo_style custom step ly vol v_strain v_sigmavolume temp etotal press v_press
fix relax all nvt temp 0.01 0.01 .01
timestep 0.005
run 500

unfix relax
variable upper_vel equal 0.01
fix zeroing_force_on_lower Lower setforce 0.0 0.0 0.0
fix zeroing_force_on_upper Upper setforce 0.0 0.0 0.0
velocity Lower set 0.0 0.0 0.0 units box
velocity Upper set 0.0 \${upper_vel} 0.0 units box
fix fix1 middle_atoms nvt temp 300 300 0.01
fix fix2 boundary nve
dump 1 all atom 100 s-s.in
run 300000
velocity Upper set 0 0 0
run 1000

sorry , in last mail i wrote this part9fix fix1 middle_atoms nvt temp 300 300 0.01)wrong.that was fix fix1 middle_atoms nvt temp 0.01 0.01 0.1

In order to receive a response, you need to post a specific question. “Could anyone give me any possible reason for this?” is not a specific quesiton. Also, try to avoid phases like “the result was weird”, “the curve was wrong”