View source: R/kappacorotation.R
| kappacorotation | R Documentation |
Computes the co-rotational kinetic energy fraction,
\kappa_\mathrm{co}, of a particle distribution. This quantity is
defined as the fraction of the total kinetic energy invested in ordered
co-rotation about the total angular momentum axis. It is commonly used as a
measure of the rotational support of galaxies in particle-based simulations.
kappacorotation(m, x, v, x0 = NULL, v0 = NULL)
m |
n-vector of particle masses. |
x |
|
v |
|
x0 |
Optional length-3 vector specifying the origin. If |
v0 |
Optional length-3 vector specifying the reference velocity. If
|
The rotation axis is taken to be the direction of the total angular momentum of the particle distribution after subtracting the centre-of-mass position and velocity. Only particles with positive angular momentum about this axis contribute to the co-rotational kinetic energy.
A scalar in the range [0,1] giving the fraction of the total kinetic
energy contained in co-rotating azimuthal motion,
\kappa_\mathrm{co}
=
\frac{\sum_{j_z>0} m\,v_\phi^2}
{\sum m\,|\mathbf{v}|^2},
where j_z is the specific angular momentum about the total angular
momentum axis and v_\phi=j_z/R is the azimuthal velocity. The common
factor of 1/2 in the kinetic energies cancels.
If m is NULL, NA is returned.
angularmomentum
#'
m <- rep(1, 100)
x <- matrix(rnorm(300), ncol = 3)
v <- matrix(rnorm(300), ncol = 3)
kappacorotation(m, x, v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.