# Elastic Strain

Hello.

I’m simulating an Aluminum box. I’m going to measure it’s Young’s modulus.
I first used “fix deform” command. Then I realized that it’s a big mistake to use it as a tool for stretching the box like what exists in experiments.
Because when I unfix the fix deform there’s no contraction as much as elastic strain. Correct me if I’m wrong on “fix deform”.
So I used velocity command to assign velocity to one wall of cube and see what happens.
I set velocity command for one wall then I set velocity to NULL value. I intended to see the contraction for elastic strain.
I wanted to release the speeding wall atoms and let them go on their own not with a defined velocity after being tense.
But after even the command
“velocity Upper set 0 0 NULL units box”
wall still is having velocity.
input file :

units metal
boundary s s s
atom_style atomic

lattice fcc 4.05
region r1 block 0 5 0 5 0 10 units lattice
create_box 1 r1
create_atoms 1 region r1

variable L equal 40.5 #L is total length of lattice
variable dz equal 2.1
variable z1 equal -0.0
variable z2 equal {dz} region Lower block INF INF INF INF {z1} {z2} units box group Lower region Lower variable z1 equal {L}-{dz} variable z2 equal {L}
region Upper block INF INF INF INF {z1} {z2} units box
group Upper region Upper
group middle_atoms subtract all Lower Upper
group boundary union Lower Upper

pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al

velocity all create 300 511124 rot yes mom yes

variable sigmavolume equal c_fz[3]vol10^-5
variable strain equal (lz-v_L)/v_L
compute perfz all stress/atom pair virial
compute fz all reduce sum &
c_perfz[1] c_perfz[2] c_perfz[3] &
c_perfz[4] c_perfz[5] c_perfz[6]
thermo 200
thermo_style custom step lz vol v_strain v_sigmavolume c_fz[3]

dump mydump1 all xyz 20 AlElasticReleased.xyz

fix relax all nvt temp 300 300 .01
timestep 1e-3
run 100
unfix relax

variable upper_vel equal 1
fix fixing_Left_side 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 0.0 \${upper_vel} units box

fix fix1 middle_atoms nvt temp 300 300 .01
fix fix2 boundary nve
run 2000

velocity Upper set 0 0 NULL units box
run 1000

Hello,

Please be aware that velocity command just initializes the velocity once and can’t keep the velocity. I think you need to go back to “fix deform”. That’s the right tool to do strain-stress thing. See Lammps doc for details.

Xiaopeng

2011/4/21 Reza <reza.esmaeili@…8…>