|
| | coulombForce () |
| | Make the force with k = 0.00154629 and no softening.
|
| |
| TVector3 | Evaluate (particle *p1_, particle *p2_) |
| | Coulomb force on p1_ by p2_ (amu c^2/fm), see the class description.
|
| |
| Double_t | Potential (particle *p1_, particle *p2_) |
| | Coulomb potential energy of the pair (amu c^2), see the class description.
|
| |
| void | SetK (Double_t k_) |
| | Set k in amu c^2 fm / e^2.
|
| |
| Double_t | GetK () |
| | k in amu c^2 fm / e^2.
|
| |
| 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.
|
| |
Electric (Coulomb) force between the charges of two particles.
\[ U = \frac{k q_1 q_2}{r} \]
with the charges q1, q2 in e (particle::GetQ()) and \(k = 0.00154629\) amu c^2 fm / e^2 (about 1.44 MeV fm). Like charges repel, opposite charges attract; a particle with charge 0 feels nothing. The force is \(\vec F_1 = k q_1 q_2 (\vec x_1 - \vec x_2)/r^3\), pointing from p2 to p1 when repulsive.
With softening eps [fm]:
\[ U = \frac{k q_1 q_2}{\sqrt{r^2 + \epsilon^2}} \]
and the force is its exact gradient. It keeps the force finite at r -> 0. eps = 0 (default) runs the original unsoftened code, bit for bit, and diverges (inf or NaN) when two particles coincide. With many charged bodies the force on each is the vector sum of the Coulomb forces by all the others.
Definition at line 66 of file force.hpp.