Added the analytical approximation for the magnetic

field in the P8 LFA scenario:
Ioffe: infinite wire approximations
Bottle: Gaussian profile in Bz
This commit is contained in:
2026-06-09 09:29:21 +02:00
parent 46277ae340
commit ca7b637577
3 changed files with 122 additions and 0 deletions
+31
View File
@@ -6,6 +6,7 @@
#include "simulation/coordinates.h"
#include "simulation/position_binning.h"
#include "constants/physical_constants.h"
class VectorField {
public:
@@ -50,4 +51,34 @@ class VectorFieldFunctionInZ : public VectorField {
std::function<double(double, double, double)> F_z_;
};
// Vector field implementing the analytical approximation to the
// magnetic field in the Project 8 LFA case, all parameters are hard-coded for now
// Note that only one half of the whole system is considered -> only one Gaussian peak
class PredefinedMagneticVectorFieldLFA : public VectorField {
public:
PredefinedMagneticVectorFieldLFA();
// Important: coordinate has to be a Cartesian Coordinate in oder for the calculation to be correct
CylinderVector value(const Coordinate& coordinate) const;
private:
// half opening angle of the cones = 35 deg, I_Ioffe = 5kA
const double cosa = std::cos(M_PI*35./180.);
const double sina = std::sin(M_PI*35./180.);
const double B0Ioffe = SI::mu0*5000/(2*M_PI); // Tm
// background field
const double Bbg = 0.0207; // T
// radius of ioffe wires
const double RIoffe = 0.3326; // m
// steepness of transition functions, currently not used
const double c1 = 10.; // 1/m
const double c2 = 100.; // 1/m
blitz::Array<double, 1> cosktheta{128};
blitz::Array<double, 1> sinktheta{128};
// z1, z2 in the system, where the Ioffe cone tip is in the origin,
// zoffset the distance between ioffe cone tip and cavity cone tip,
// z1 is the start of the ioffe frustum and z2 the transition from cone to cylinder
double z1, z2, zoffset;
};
#endif /* VECTOR_FIELD_H */