sarkas.particles.calc_pressure_tensor#

sarkas.particles.calc_pressure_tensor(vel, virial_species_tensor, species_masses, species_num, box_volume, dimensions)[source]#

Calculate the pressure tensor of each species.

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

  • virial_species_tensor (numpy.ndarray) – Virial tensor of each particle. Shape= (3, 3, total_num_ptcls). Note that the size of the first two axis is 3 even if the system is 2D.

  • species_masses (numpy.ndarray) – Mass of each species. Shape = (num_species)

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

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

  • dimensions (int) – Number of dimensions.

Returns

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

  • pressure_kin (numpy.ndarray) – Kinetic part of the Pressure tensor. Shape(dimensions,:attr:dimensions, num_species)

  • pressure_pot (numpy.ndarray) – Potential energy part of the Pressure tensor. Shape(dimensions,:attr:dimensions, num_species)