sarkas.tools.observables.calc_pressure_tensor#

sarkas.tools.observables.calc_pressure_tensor(vel, virial, species_mass, species_np, box_volume, dimensions)[source]#

Calculate the pressure tensor.

Parameters
  • pos (numpy.ndarray) – Particles’ positions.

  • vel (numpy.ndarray) – Particles’ velocities.

  • acc (numpy.ndarray) – Particles’ accelerations.

  • species_mass (numpy.ndarray) – Mass of each species.

  • species_np (numpy.ndarray) – Number of particles of each species.

  • box_volume (float) – Volume of simulation’s box.

Returns

  • pressure (float) – Scalar Pressure i.e. trace of the pressure tensor

  • pressure_tensor (numpy.ndarray) – Pressure tensor. Shape(no_dim,``no_dim``)