# Uniaxial tension for a single aluminum crystal

Dear all Lammps user,

I am trying to deform an aluminum single crystal by applying uniaxial tension along x direction and calculate stress strain curve in Lammps.

The input script is

# ------------------------ INITIALIZATION ----------------------------

``````units 		metal
dimension	3
boundary	p	p	p
atom_style	atomic
variable latparam equal 4.05

# ----------------------- ATOM DEFINITION ----------------------------
lattice		fcc \${latparam}
region		whole block 0 10 0 10 0 10
create_box	1 whole
lattice 	fcc \${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms	1 region whole

# ------------------------ FORCE FIELDS ------------------------------
pair_style	eam/alloy
pair_coeff	* * Al99.eam.alloy Al

# ------------------------- SETTINGS ---------------------------------
compute csym all centro/atom fcc
compute peratom all pe/atom

# EQUILIBRATION
reset_timestep	0
timestep 0.001
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1

# Set thermo output
thermo 1000
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

# Run for at least 10 picosecond (assuming 1 fs timestep)
run 20000
unfix 1

# Store final cell length for strain calculations
variable tmp equal "lx"
variable L0 equal \${tmp}
print "Initial Length, L0: \${L0}"

# DEFORMATION
reset_timestep	0

fix		1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1
variable srate equal 1.0e10
variable srate1 equal "v_srate / 1.0e12"
fix		2 all deform 1 x erate \${srate1} units box remap x

# Output strain and stress info to file
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
# p2, p3, p4 are in GPa
variable strain equal "(lx - v_L0)/v_L0"
variable p1 equal "v_strain"
variable p2 equal "-pxx/10000"
variable p3 equal "-pyy/10000"
variable p4 equal "-pzz/10000"
fix def1 all print 100 "\${p1} \${p2} \${p3} \${p4}" file Al_SC_100.def1.txt screen no

# Use cfg for AtomEye
dump 		1 all cfg 250 dump.tensile_*.cfg mass type xs ys zs c_csym c_peratom fx fy fz
dump_modify 1 element Al

# Display thermo
thermo 	1000
thermo_style	custom step v_strain temp v_p2 v_p3 v_p4 ke pe press

run		20000

``````

Dear all Lammps user,

I am trying to deform an aluminum single crystal by applying uniaxial tension along x direction and calculate stress strain curve in Lammps.

The input script is
# ------------------------ INITIALIZATION ----------------------------

units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.05

# ----------------------- ATOM DEFINITION ----------------------------
lattice fcc \{latparam\} region whole block 0 10 0 10 0 10 create\_box 1 whole lattice fcc {latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region whole

# ------------------------ FORCE FIELDS ------------------------------
pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al

# ------------------------- SETTINGS ---------------------------------
compute csym all centro/atom fcc
compute peratom all pe/atom

# EQUILIBRATION
reset_timestep 0
timestep 0.001
velocity all create 300 12345 mom yes rot no
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1

# Set thermo output
thermo 1000
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

# Run for at least 10 picosecond (assuming 1 fs timestep)
run 20000
unfix 1

# Store final cell length for strain calculations
variable tmp equal "lx"
variable L0 equal \{tmp\} print &quot;Initial Length, L0: {L0}"

# DEFORMATION
reset_timestep 0

fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1
variable srate equal 1.0e10
variable srate1 equal "v_srate / 1.0e12"
fix 2 all deform 1 x erate \${srate1} units box remap x

# Output strain and stress info to file
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa]
# p2, p3, p4 are in GPa
variable strain equal "(lx - v_L0)/v_L0"
variable p1 equal "v_strain"
variable p2 equal "-pxx/10000"
variable p3 equal "-pyy/10000"
variable p4 equal "-pzz/10000"
fix def1 all print 100 "\{p1\} {p2} \{p3\} {p4}" file Al_SC_100.def1.txt screen no

# Use cfg for AtomEye
dump 1 all cfg 250 dump.tensile_*.cfg mass type xs ys zs c_csym c_peratom fx fy fz
dump_modify 1 element Al

# Display thermo
thermo 1000
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press

run 20000

Different potential == different numerical material. It is typical to have different elasto-plastic response for the same “real” material modeled by different potential. There is plenty of literature on that topic. And it is not a Lammps issue, but a proper research question. NPT: probably to start the tenseil-test with a globally stress-free system. s, f and m do not generate a periodic direction. p does it. What is the unit of the pxx variable? Stress. What is the unit of the stree/atom compute? Stress*volume. All is described in the documentation of the compute, with a proper example. Julien