Volume in compute pressure

Hi,

compute pressure documentation [compute pressure command — LAMMPS documentation] describes the formula for computing the pressure as: P = Nk_bT/V + virial term. V is the “system volume (or area in 2d)”. How is the volume defined exactly? Is it the volume of the simulation box?

Thanks in advance!

Hi @hydraulic_press,
Yes, the volume is defined as the product of the 3 box edges:
V=L_x\times{}L_y\times{}L_z where L_x=\mathrm{xhi-xlo} and so one.

1 Like