Class TF17Field¶
- Defined in File TF17Field.h
Inheritance Relationships¶
Base Type¶
public MagneticField
(Class MagneticField)
Class Documentation¶
-
class
TF17Field
: public MagneticField¶ TF17Field galactic magnetic field model.
Implements the TF2017 galactic magnetic field model, consisting of large-scale regular disk and halo fields. The field is defined in the usual galactocentric coordinate system with the Galactic center at the origin, the x-axis pointing in the opposite direction of the Sun, and the z-axis pointing towards Galactic north. See: Terral, Ferriere 2017 - Constraints from Faraday rotation on the magnetic field structure in the galactic halo, DOI: 10.1051/0004-6361/201629572, arXiv:1611.10222
Public Functions
-
TF17Field
(TF17DiskModel disk_model_ = TF17DiskModel::Ad1, TF17HaloModel halo_model_ = TF17HaloModel::C1)¶ Constructor
- Parameters
disk_model_
: model to use for the disk (model are defined in enum class TF17DiskModel: Ad1, Bd1, Dd1)halo_model_
: model to use for the halo (model are defined in enum class TF17HaloModel: C0, C1)
-
void
setUseDiskField
(bool use)
-
void
setUseHaloField
(bool use)¶
-
bool
isUsingDiskField
()
-
bool
isUsingHaloField
()¶
-
void
set_B1_disk
(const double B1)¶ set reference amplitude for the disk magnetic field Automatically set at initialization
- Parameters
B1
: magnetic field amplitude in Gauss
-
void
set_z1_disk
(const double z1)¶ set reference height for the disk magnetic field (model Dd1) Automatically set at initialization
- Parameters
z1
: height in kpc
-
void
set_r1_disk
(const double r1)¶ set reference radius for the disk magnetic field (models Ad1 and Bd1) Automatically set at initialization
- Parameters
r1
: radius in kpc
-
void
set_H_disk
(const double H)¶ set scale height of Br for the disk magnetic field (models Ad1 and Bd1) Automatically set at initialization
- Parameters
H
: height in kpc
-
void
set_L_disk
(const double L)¶ set scale length of Bz for the disk magnetic field (models Dd1) Automatically set at initialization
- Parameters
L
: length in kpc
-
void
set_a_disk
(const double a)¶ set opening parameter for poloidal lines for the disk magnetic field (models Ad1) Automatically set at initialization
- Parameters
a
: opening parameter in / kpc / kpc
-
void
set_phi_star_disk
(const double phi)¶ set orientation angle of the azimuthal pattern for the disk magnetic field Automatically set at initialization
- Parameters
phi
: opening parameter in rad
-
void
set_B1_halo
(const double B1)¶ set reference amplitude for the halo magnetic field Automatically set at initialization
- Parameters
B1
: magnetic field amplitude in Gauss
-
void
set_z1_halo
(const double z1)¶ set reference height for the halo magnetic field Automatically set at initialization
- Parameters
z1
: height in kpc
-
void
set_L_halo
(const double L)¶ set scale length of Bz for the halo magnetic field Automatically set at initialization
- Parameters
L
: length in kpc
-
void
set_a_halo
(const double a)¶ set opening parameter for poloidal lines for the halo magnetic field Automatically set at initialization
- Parameters
a
: opening parameter in / kpc / kpc
-
void
set_phi_star_halo
(const double phi)¶ set orientation angle of the azimuthal pattern for the disk magnetic field Automatically set at initialization
- Parameters
phi
: opening parameter in rad
-
void
set_p0
(const double p0)¶ set pitch angle origin (all models) Automatically set at initialization
- Parameters
p0
: height in rad
-
void
set_Hp
(const double H)¶ set scale height of winding function (all models) Automatically set at initialization
- Parameters
H
: height in kpc
-
void
set_Lp
(const double L)¶ set scale length of winding function (all models) Automatically set at initialization
- Parameters
L
: length in kpc
-
string
getDiskModel
() const¶ Get the disk model used as a string.
- Return
- disk model
-
string
getHaloModel
() const¶ Get the halo model used as a string.
- Return
- halo model
-
Vector3d
getDiskField
(const double &r, const double &z, const double &phi, const double &sinPhi, const double &cosPhi) const
-
Vector3d
getHaloField
(const double &r, const double &z, const double &phi, const double &sinPhi, const double &cosPhi) const¶
-
double
azimuthalFieldComponent
(const double &r, const double &z, const double &B_r, const double &B_z) const¶ Compute the azimuthal field component Bphi as define by equation 28 in TF17.
- Return
- the value of the azimuthal field component Bphi
- Parameters
r
: radius in cylindrical coordinatesz
: radius in cylindrical coordinatesBr
: radial component of the magnetic field at position (r,z)Bz
: height component of the magnetic field at position (r,z)
-
double
radialFieldScale
(const double &B1, const double &phi_star, const double &z1, const double &phi, const double &r, const double &z) const¶ Compute the scaling of the disk magnetic field amplitude (equation 30, models Ad1 and Bd1)
- Return
- the radial field component Br(r1, z1, phi1)
- Parameters
B1
: magnetic field amplitude in Gaussphi_star
: orientation angle of the azimuthal pattern in radz1
: scale height in kpcphi
: cylindrical coordinatesr
: cylindrical coordinatesz
: cylindrical coordinates
-
double
shiftedWindingFunction
(const double &r, const double &z) const¶ Compute the shifted winding function (equation 23)
- Return
- g_phi, the shifted winding function
- Parameters
r
: cylindrical coordinatesz
: cylindrical coordinates
-
double
zscale
(const double &z) const¶ Compute the height scaling appearing numerous times in the equations.
- Return
- z_scale = 1 + (z/Hp)^2
- Parameters
z
: cylindrical coordinates
-
size_t
addReference
() const
-
size_t
removeReference
() const
-
int
removeReferenceNoDelete
() const
-
size_t
getReferenceCount
() const
Protected Attributes
-
size_t
_referenceCount
-