Dear Lammps users,
i am trying to find out the stress on a specified region in metal pillar
for that i used
compute 1 1 stress/atom
compute 2 1 reduce/region 1 sum c_1[3]
variable press equal “c_2/vol”
these commands.
My doubt is while calculating variable press will it use vol of whole pillar or just the volume of specified region?
if it is using volume of whole pillar, can any one tell me how to calculate the volume of required region only?

Dear Lammps users,
i am trying to find out the stress on a specified region in metal pillar
for that i used
compute 1 1 stress/atom
compute 2 1 reduce/region 1 sum c_1[3]
variable press equal "c_2/vol"
these commands.
My doubt is while calculating variable press will it use vol of whole pillar
or just the volume of specified region?

the thermo variable "vol" represents the _entire_ volume
of the simulation cell as documented.

if it is using volume of whole pillar, can any one tell me how to calculate
the volume of required region only?

defining volumes on the atomic level can be
a tricky thing, since it is non-trivial to define
the volume of a single atom (unlike the volume
per atom in a (homogeneous) bulk system)
and also surfaces are not flat.
any volume definition will thus be based on
some kind of approximation and assumptions.
how you do this, is your choice, but i would
recommend to rather look at better defined,
and thus better comparable, properties like
virial stress per atom.

thank you sir for giving quick reply
sir, actually i have to find out virial stress only. virial stress involves two terms, kinetic energy and pair potential energy but in lammps virial stress includes all bond,angle,fix,pair potential,dihedral,improper excluding ke. Thats is why i am calculating only ke and pair in stress/atom. so i now need to calculate the volume of specific region.
is there is any alternative?

thank you sir for giving quick reply
sir, actually i have to find out virial stress only. virial stress involves
two terms, kinetic energy and pair potential energy but in lammps virial
stress includes all bond,angle,fix,pair potential,dihedral,improper
excluding ke. Thats is why i am calculating only ke and pair in

sorry, but this statement doesn't make sense to me.

stress/atom. so i now need to calculate the volume of specific region.
is there is any alternative?

please re-read my response.
you obviously didn't pay much
attention to it.

i am compressing a pillar specifying strain rate, but in fix deform it requires the dimension on which we are applying strain rate should be periodic, i want my whole pillar to be non periodic. so i changed the coding in fix_deform.cpp. i made those lines which are checking whether that particular direction is periodic or not, comments. will it cause errors in results?

thank you sir
i am compressing a pillar specifying strain rate, but in fix deform it
requires the dimension on which we are applying strain rate should be
periodic, i want my whole pillar to be non periodic. so i changed the coding
in fix_deform.cpp. i made those lines which are checking whether that
particular direction is periodic or not, comments. will it cause errors in
results?

if you change the sacred LAMMPS source code without
knowing what you are doing, then you have to expect
that all hell will break loose.

have you considered, that this test was placed there for a good reason?

how does your model translate to physical reality?