I am attempting to simulate the bending of a silicon nanowire using LAMMPS. However, I am struggling to find a sample script that demonstrates how to model this scenario. My specific goal is to model a nanowire with a load applied at its midpoint, and then plot the relationship between the applied load and the deflection of its center. Additionally, I need to determine the Young’s modulus. Could someone kindly assist me with this issue and provide detailed guidance on how to do it?
This is the code I wrote:
Nanoscale plastic deformation mechanisms of single crystalline silicon under compression, tension and indentation
###INPUTS###
variable dt equal 0.001
timestep ${dt}
variable T equal 298
variable iterequi equal 00000
variable iterrun equal 700000
##################### Step 1: Initialization #####################
echo both
units metal
atom_style atomic
dimension 3
timestep ${dt}
boundary s s s # free boundary conditions
##################### Step 2: Atom and Lattice Definition #####################
Create a diamond lattice with <100> orientation
variable latconst equal 5.43
lattice diamond ${latconst} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
Define the dimensions of the nanowire
variable XEdge equal 217.2
variable YEdge equal 217.2
variable ZEdge equal 108.6
Create a simulation box
region Simbox block 0 {XEdge} 0 {YEdge} 0 ${ZEdge} units box
create_box 1 Simbox
mass * 28.0855
Create a Nanowire
region Nanowire block 0 {XEdge} 0 {YEdge} 0 {ZEdge} units box
lattice diamond {latconst} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region Nanowire units box
##################### Step 3: Force Field #####################
pair_style tersoff
pair_coeff * * Si.tersoff Si # Tersoff potential for silicon
##################### Step 4: Minimization and RELAXATION #####################
min_style cg
minimize 0.0 1.0e-8 10000 10000
##################### Step 5: Equilibration #####################
velocity all create ${T} 48284121 mom yes rot yes
fix 1 all nvt temp {T} {T} $(100.0*dt)
dump 000 all custom 100 dumpequilibration.xyz id type x y z
thermo 1000
thermo_style custom step temp pe ke etotal
run ${iterequi}
unfix 1
undump 000
##################### SETTING #####################
reset_timestep 0
variable fixL equal 2*${latconst}
variable lim01 equal c_zmin
variable lim02 equal c_zmin+v_fixL
Create the lower part including two atomic layers
region lower block 0 {XEdge} 0 {YEdge} 0 ${fixL} units box
group lower region lower
group middle subtract all lower
set region lower type 1
######### Step 6: Movement of indenter in +z direction #########
reset_timestep 0
Run simulation
fix 1 lower setforce 0.0 0.0 0.0
compute mystress middle stress/atom NULL virial
#fix 2 middle indent 100 sphere 108.6 108.6 v_z 50 # Define indenter
fix 2 all indent 100 sphere 108.6 108.6 v_z 50 # Define indenter
variable z equal vdisplace(158.6,0.4)
#variable z equal vdisplace(108.6,-0.4)
fix 3 all nvt temp {T} {T} $(100.0*dt)
variable deflection equal abs(f_2[1])
variable Zforce equal abs(f_2[2])
variable totalforce equal abs(f_2[3])
fix result all ave/time 1 1000 1000 v_deflection v_Zforce v_totalforce
thermo 1000
thermo_style custom step f_result[1] f_result[2] f_result[3]
dump 1 all custom 1000 dumpFast.lammpstrj id type xs ys zs c_mystress[1] c_mystress[2] c_mystress[3]
dump 4 all custom 100 dumpSlow.lammpstrj id type xs ys zs c_mystress[1] c_mystress[2] c_mystress[3]
log logFigure.txt
run ${iterrun}