Fix dumb mistake

This commit is contained in:
Cory Balaton 2023-10-22 17:44:08 +02:00
parent 944c52d22f
commit bd9600b6d1
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B
3 changed files with 6 additions and 6 deletions

View File

@ -75,7 +75,7 @@ public:
PenningTrap(
double B_0 = T,
std::function<double(double)> V_0
= [](double t) { return 25. * V / 1000.; },
= [](double t) { return (25. * V) / 1000.; },
double d = 500., double t = 0.);
/** @brief Constructor for the PenningTrap class

View File

@ -12,10 +12,10 @@
#ifndef __CONST__
#define __CONST__
#define K_E 138935.333 ///< Coulomb constant. unit: \f$\frac{u(\mu m)^3}{(\mu s)^2 e^2}\f$
#define K_E 1.38935333*1e5 ///< Coulomb constant. unit: \f$\frac{u(\mu m)^3}{(\mu s)^2 e^2}\f$
#define T 96.4852558 ///< 1 Tesla. unit: \f$ \frac{u}{(\mu s) e} \f$
#define T 9.64852558*1e1 ///< 1 Tesla. unit: \f$ \frac{u}{(\mu s) e} \f$
#define V 96485255.8 ///< 1 Volt. unit: \f$ \frac{u (\mu m)^2}{(\mu s)^2 e} \f$
#define V 9.64852558*1e7 ///< 1 Volt. unit: \f$ \frac{u (\mu m)^2}{(\mu s)^2 e} \f$
#endif

View File

@ -99,7 +99,7 @@ vec_3d PenningTrap::external_E_field(vec_3d r)
{
r(2) *= -2.;
return vec_3d(this->V_0(this->t) / (this->d * this->d) * r);
return vec_3d((this->V_0(this->t) / (this->d * this->d)) * r);
}
vec_3d PenningTrap::external_B_field(vec_3d r)
@ -141,7 +141,7 @@ vec_3d PenningTrap::total_force_particles(unsigned int i)
res += this->force_on_particle(i, j);
}
return vec_3d(res * K_E * (this->particles[i].q / this->particles[i].m));
return vec_3d(res * K_E * (this->particles[i].q));
}
vec_3d PenningTrap::total_force(unsigned int i)