Newtonian gravity between the rest masses of two particles. Always attractive.
More...
|
| | universalForce () |
| | Make the force with G = 1.2331e-39 and no softening.
|
| |
| TVector3 | Evaluate (particle *p1_, particle *p2_) |
| | Gravitational force on p1_ by p2_ (amu c^2/fm).
|
| |
| Double_t | Potential (particle *p1_, particle *p2_) |
| | Gravitational potential energy of the pair (amu c^2).
|
| |
| void | SetG (Double_t g_) |
| | Set the gravitational constant G.
|
| |
| Double_t | GetG () |
| | The gravitational constant G.
|
| |
| void | SetSoftening (Double_t eps_) |
| | Set the softening length eps in fm (0 : none).
|
| |
| Double_t | GetSoftening () |
| | The softening length eps in fm.
|
| |
| virtual | ~force () |
| | Virtual : a force deleted through force* must run the subclass destructor.
|
| |
Newtonian gravity between the rest masses of two particles. Always attractive.
\[ U = -\frac{G m_1 m_2}{r} \]
with the rest masses m1, m2 in amu (also in the relativistic mode) and G in amu^-1 c^2 fm. The default is the SI value converted to these units, \(G/c^2 \times 1\,\mathrm{amu} = 1.2331\times10^{-54}\,\mathrm{m} = 1.2331\times10^{-39}\,\mathrm{fm}\). The force on p1 is \(-G m_1 m_2 (\vec x_1 - \vec x_2)/r^3\), towards p2.
With softening eps [fm], r^2 is replaced by r^2 + eps^2 in the potential and the force is its exact gradient, as in coulombForce. Unlike coulombForce, the softened formula is always used, so eps = 0 gives inf or NaN for coinciding particles. With many bodies every pair attracts, so the force on a body is the vector sum over all the others.
- Note
- Until 2026-11 the default was 1.2331e-17, a wrong exponent (too strong by 1e22). At nuclear scales gravity is about 1e-36 of the Coulomb force between two protons.
Definition at line 104 of file force.hpp.