Volume of system in pressure calculation

Hi all
In the calculation of pressure of system we divide the summation term by (dimension x volume of system). If my system is not rectangular in shape, shouldn’t Lammps take volume of system as the volume of that region actually occupied by all atoms in the system for calculating pressure? Instead it takes the volume of simulation box. which is obviously larger than volume of region occupied by atoms thus under-estimating the system pressure value.

Or is it that we have to explicitly define a compute pressure calculation which takes this into account in such cases to get actual pressure values?

Please help me out.

Thanks in advance

Regards

Sreehari P D

Masters Student in Thermal Science and Engineering
Department of Mechanical Engineering
Indian Institute of Technology Kharagpur

Kharagpur, West Bengal, India

Hi all
In the calculation of pressure of system we divide the summation term by
(dimension x volume of system). If my system is not rectangular in shape,
shouldn't Lammps take volume of system as the volume of that region actually
occupied by all atoms in the system for calculating pressure? Instead it
takes the volume of simulation box. which is obviously larger than volume of
region occupied by atoms thus under-estimating the system pressure value.

no. the volume of the system is the volume of the system, rectangular or tilted.

I think I didn’t make myself clear previously.

The channel Im simulating is in T shape. and I have defined the simulation box to be a rectangular block which is large enough to confine the channel. Now, for calculating pressure system volume is taken as the volume of the rectangular block. My doubt is that shouldn’t it be just the volume occupied by “T” ?

Or is it that we have to explicitly define a compute pressure calculation which takes this into account in such cases to get actual pressure value?

Thanks

I think I didn't make myself clear previously.

The channel Im simulating is in T shape. and I have defined the simulation
box to be a rectangular block which is large enough to confine the channel.
Now, for calculating pressure system volume is taken as the volume of the
rectangular block. My doubt is that shouldn't it be just the volume occupied
by "T" ?

Or is it that we have to explicitly define a compute pressure calculation
which takes this into account in such cases to get actual pressure value?

simply put, pressure is not a well defined entity in this context.
remember that pressure is (like temperature!) a macroscopic property
(i.e. it is force per area).

let's take a simple example, and say you have a slab system, which is
periodic in 2d and has a vacuum in between the periodic images.
pressure in the 3rd dimension is irrelevant, since the system can
always expand as far as it wants in that direction.

let's take another example, and say you have a little droplet. here
you can have an "internal" pressure depending on the surface tension.
however, for the total pressure of the system (if periodic) only the
forces between periodic images of that droplet had any relevance.

now you can compute pressure of a microscopic system from the forces
on each atom with the help of the virial theorem, but that strictly
only applies to a periodic bulk system. there are ways to derive
expressions for local (or continuum pressure on a grid), but overall
this is not quite the same as what you seem to be thinking, since your
question suggests that your worrying about macroscopic pressure.

axel.

If you don’t want LAMMPS to include the
entire system Vol in the pressure, then
look at compute stress/atom. It leaves
the V term out, leaving it up to you.

If you know what the “volume” is that you
want to use, then you can add that
term yourself, e.g. define a variable that
takes the output of the sum of compute
stress/atom and divides by your V.

It is not simple in many cases to define
that V for irregular systems, so LAMMPS
doesn’t attempt to do it.

Steve

Thanks for the quick reply! Indeed it will be difficult to calculate volume if system is irregular.
Thanks again