Mechanica provides numerous methods to compute a range of derived quantities. Some of these are top-level metrics, and depend on the entire simulation volume, and others are localized to individual objects. Simulator
For a system of N particles in a volume V, we can compute the surface tension from the diagonal components of the pressure tensor Pα, α(α = x, y, z). The Pxx components are:
where N is the number of particles, ρ is the particle density density, k Boltzmann constant, T is the temperature, rij is the vector between the particles i and j, and fij is the force between them. Some important concepts here is that the force here is only between the particles used in the pressure tensor calculation, it specifically excludes any external force. The pressure tensor here is a measure of how much internal force exists in the specified set of particles.
We comonly refer to the right hand side above as the virial, it represents half of the the product of the stress due to the net force between pairs of particles and the distance between them. We formally define the virial tensor components as
The volume of a group of particles is not well defined, as such we separate out computing the virial component, and the volume, and give users the flexiblity of using different volume metrics.
We provide a number of different options for calculating the virial tensor. You can compute the pressure tensor for the entire simulation domain, or a specific region using the Universe.virial
method. Can compute the pressure tensor for a specific cluster using the Cluster.virial
method, or can compute the tensor at a specific particle location using Particle.virial
method.
In the radius of gyration is measure of the dimensions of a group (Cluster
) of particles such as a polymer chain, macro-molecule or some larger object. The radius of gyration of group of particles at a given time is defined as:
We can compute the radius of gyration for a cluster of particles using the Cluster.radius_of_gyration
method.
The center of mass of a system of particles,
with R defined as:
where M is the sum of the masses of all of the particles.
We can compute the center of mass of a cluster particles with the Cluster.center_of_mass
method.
Computes the geometric center of a group of particles with the Cluster.center_of_geometry
method, or equivalently, with the Cluster.centroid
method.
For a system of N particles, the moment of inertia tensor is a symmetric tensor, and is defined as:
Its diagonal elements are defined as
and the the off-diagonal elements, also called the are:
We can compute the inertia tensor for a group of particles using the Cluster.moment_of_inertia
or Cluster.inertia
methods.