question about atom length

Dear lammps

I was calculating Young’s modulus of metal.

To calculate Young’s modulus, I had to know elongation of the metal.

The following is the code.

variable ly1 equal ly

variable ly0 equal ${ly1}

variable lydelta equal “v_strain*v_ly0/2”

variable print1 equal “(ly-v_ly0)/v_ly0”

displace_atoms gblow move 0 0 0 units box

displace_atoms gbhigh move 0 1 0 units box

The value of “ly” was constant even though I could see elongation in dump file.

Because ly means box length (not atom length)

How do I get the value of atom length?

Dear lammps

I was calculating Young's modulus of metal.

To calculate Young's modulus, I had to know elongation of the metal.

The following is the code.

.....

variable ly1 equal ly

variable ly0 equal ${ly1}

variable lydelta equal "v_strain*v_ly0/2"

variable print1 equal "(ly-v_ly0)/v_ly0"

displace_atoms gblow move 0 0 0 units box

displace_atoms gbhigh move 0 1 0 units box

........

The value of "ly" was constant even though I could see elongation in dump
file.

​because you are displacing atoms, not deforming the box. why should the
box length change?​

Because ly means box length (not atom length)

How do I get the value of atom length?

​what is an "atom length"?

axel.​