Implement external_E_field
This commit is contained in:
parent
bd53af7829
commit
f1f1eecf07
@ -36,7 +36,14 @@ void PenningTrap::add_particle(Particle particle)
|
||||
|
||||
arma::vec PenningTrap::external_E_field(arma::vec r)
|
||||
{
|
||||
arma::vec::fixed<3> res;
|
||||
double x = r(0), y = r(1), z = r(2);
|
||||
double f = this->V_0/2*this->d*this->d;
|
||||
res(0) = f*2*x;
|
||||
res(1) = f*2*y;
|
||||
res(2) = -f*4*z;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
arma::vec PenningTrap::external_B_field(arma::vec r)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user