# How to model a longitudinal vibrational characteristics of a rod

I am trying to do a dynamic tensile test on a cube of 40.540.540.5 A. I am pushing the upper wall of my geometry but it seems that results are not correct. One reason is that the size of simulation box is not changing as I am moving the upper wall while fixing the lower wall. I am not doing any minimization (although I am doing a static analysis) as I want to change the same to get the dynamic characteristics of the longitudinal vibration after removing all the forces. Can anyone help me with the code or tell me directly how to code for longitudinal vibrational characteristics of a rod. (Displacing the upper end initially and then removing it to let it vibrate).

clear

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

units metal
dimension 3
boundary m s s
atom_style atomic
variable latparam equal 4.05

# ----------------------- ATOM DEFINITION ----------------------------

lattice fcc {latparam} region whole block 0 10 0 10 0 10 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

neighbor 0.3 bin
neigh_modify every 20 delay 0 check no

# Store final cell length for strain calculations

variable tmp equal “lx”
variable L0 equal {tmp} print "Initial Length, L0: {L0}"

Walls and the size of the box are not the same thing.
Moving a wall does not change the box, unless it
moves the atoms and the box is shrink-wrapped to the
atoms. Visualizing where your atoms are is the way
to see if the moving wall is doing what you expect.

If you have a periodic box, you probably want fix deform,
which changes the box size over time.

Steve

what if, if you want to move a wall and want to change the size of simulation box. I am using m as a boundary condition which allows shrink wrapped to atoms but the box size is not changing with wall. Should I use s as a boundary condition in the direction in which the wall is moving.

what if, if you want to move a wall and want to change the size of
simulation box. I am using m as a boundary condition which allows shrink

why this obsession with having to shrink the simulation box.
if you compress the system by moving the wall, you have
compressed the system. if you take the wall away, it is
released and the system will relax. since you want to look
at an isolated (nano) particle, you don't have to worry about
the box.

wrapped to atoms but the box size is not changing with wall. Should I use s
as a boundary condition in the direction in which the wall is moving.

actually, your input is not working at all. i get this error.

ERROR: Create_atoms command before simulation box is defined
(create_atoms.cpp:46)

so i wonder how you can see anything.

axel.

Actually I am stretching the upper wall instead of compressing. If I stretch it beyond the simulation box, it would simulate only a part of my system. If I define a bigger simulation box, the pressure tensor components which I am calculating would be incorrect (Since it would be doing the calculation for the whole simulation box while my system size is less than the simulation box). I was wondering if it is possible to change the simulation box size with the wall. Sorry for a wrong code, here is what i am doing.

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

units metal
dimension 3
boundary s s s
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

# Store final cell length for strain calculations

variable tmp equal “lx”
variable L0 equal {tmp} print "Initial Length, L0: {L0}"

Actually I am stretching the upper wall instead of compressing. If I stretch it beyond the simulation box, it would simulate only a part of my system. If I define a

A shrink-wrap boundary only moves when the atoms move. How can you
expect the atoms to follow voluntarily a reflective wall? Overall, the
method of moving the wall seems rather indirect to me. Either you want
the properties of the bulk material an then you run with periodic
boundaries and use fix deform to deform the box, or you want the
properties of a particle and then you use fix setforce and/or fix move
on the atoms of the affected particle boundaries.

bigger simulation box, the pressure tensor components which I am calculating would be incorrect

The pressure tensor will be incorrect in any case. The volume of you
particle is an ill defined property and taking the volume of the box
is a rather crude approximation. You can get the same information from
computing the min/max coordinates of the particle. Also what is the
"pressure" of a single particle anyway?

(Since it would be doing the calculation for the whole simulation box while my system size is less than the simulation box). I was wondering if it is possible to change the simulation box size with the wall.

You can try using fix deform, but in my opinion your general approach
has multiple and thus I suggest you rethink it and consider alternate
approaches.

Axel