Added Mover for zero magnetic field
This commit is contained in:
@@ -47,4 +47,18 @@ class DriftMover : public Mover {
|
|||||||
const blitz::TinyVector<double, 3>& electric_field) const;
|
const blitz::TinyVector<double, 3>& electric_field) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Mover for the case of 0 magnetic field. Simply ignores electric and magnetic field
|
||||||
|
// for the movement step, i.e. velocity doesn't change.
|
||||||
|
class EulerMover : public Mover {
|
||||||
|
public:
|
||||||
|
EulerMover(double maximal_distance);
|
||||||
|
|
||||||
|
void move(particle::Particle* particle,
|
||||||
|
double mfp_m,
|
||||||
|
ElectricField* electric_field,
|
||||||
|
MagneticField* magnetic_field);
|
||||||
|
private:
|
||||||
|
const double maximal_distance_m_;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* MOVER_H */
|
#endif /* MOVER_H */
|
||||||
|
|||||||
+830
@@ -0,0 +1,830 @@
|
|||||||
|
{
|
||||||
|
"GlobalPositionBinning": {
|
||||||
|
"CylinderBinning": {
|
||||||
|
"Radial": {
|
||||||
|
"NumberOfBins": 5,
|
||||||
|
"MaxRadius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Longitudinal": {
|
||||||
|
"NumberOfBins": 166,
|
||||||
|
"MaxLength": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Azimuthal": {
|
||||||
|
"NumberOfBins": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SourceGeometry": {
|
||||||
|
"Cylinder": {
|
||||||
|
"Radius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Species": {
|
||||||
|
"Background": {
|
||||||
|
"TritiumGas": {
|
||||||
|
"ParticleType": "T2",
|
||||||
|
"ConstantDensityField": {
|
||||||
|
"ScalarField": {
|
||||||
|
"ScalarFieldFunctionInZ": {
|
||||||
|
"zFunction": {
|
||||||
|
"Product": {
|
||||||
|
"fi": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fj": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fk": {
|
||||||
|
"PiecewiseLinearFromFile": {
|
||||||
|
"PathToH5": {
|
||||||
|
"Type": "RelativeToHomebase",
|
||||||
|
"RelativePath": "data/densityDistributions/T2",
|
||||||
|
"Filename": "T2_n_vs_z_kuckert_approximated_relative.h5"
|
||||||
|
},
|
||||||
|
"xValuesKey": "/z_position(m)",
|
||||||
|
"yValuesKey": "/n(m3)",
|
||||||
|
"prefactor": 6.337599E19
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"VelocityDistribution": {
|
||||||
|
"VelocityDistributionFromFunction": {
|
||||||
|
"VelocityDistributionFunction": {
|
||||||
|
"IsotropicDistribution": {
|
||||||
|
"EnergyDistributionFunction": {
|
||||||
|
"MaxwellBoltzmann": {
|
||||||
|
"Temperature": {
|
||||||
|
"value": 80,
|
||||||
|
"unit": "K"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Mass": {
|
||||||
|
"FromParticleType": "T2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DriftVelocity": {
|
||||||
|
"VectorField": {
|
||||||
|
"VectorFieldFunctionInZ": {
|
||||||
|
"zFunction": {
|
||||||
|
"Product": {
|
||||||
|
"fi": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fj": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fk": {
|
||||||
|
"PiecewiseLinearFromFile": {
|
||||||
|
"PathToH5": {
|
||||||
|
"Type": "RelativeToHomebase",
|
||||||
|
"RelativePath": "data/velocityDistributions/T2_vz/KuckertPaper",
|
||||||
|
"Filename": "T2_vz_vs_z_kuckert_approximated.h5"
|
||||||
|
},
|
||||||
|
"xValuesKey": "/z_position(m)",
|
||||||
|
"yValuesKey": "/vz(ms)",
|
||||||
|
"prefactor": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Tracked": {
|
||||||
|
"e-": {
|
||||||
|
"ParticleType": "electron",
|
||||||
|
"Mover": {
|
||||||
|
"Drift": {
|
||||||
|
"MaximalMovedDistance": {
|
||||||
|
"value": 0.001,
|
||||||
|
"unit": "m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Terminator": {
|
||||||
|
"MaximumInteractions": 1E6,
|
||||||
|
"MaxTimeAlive": {
|
||||||
|
"value": 1,
|
||||||
|
"unit": "s"
|
||||||
|
},
|
||||||
|
"BoundaryGeometry": {
|
||||||
|
"Cylinder": {
|
||||||
|
"Radius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Reflector": {
|
||||||
|
"ReflectorDPS": {
|
||||||
|
"position_z": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DensityField": {
|
||||||
|
"DynamicDensityField": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"EnergyBinning": {
|
||||||
|
"Type": "Logarithmic",
|
||||||
|
"NumberOfBins": 100,
|
||||||
|
"MinEnergy": {
|
||||||
|
"value": 1E-6,
|
||||||
|
"unit": "eV"
|
||||||
|
},
|
||||||
|
"MaxEnergy": {
|
||||||
|
"value": 20E3,
|
||||||
|
"unit": "eV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"VelocityDistribution": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"DriftVelocity": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"Loggers": {
|
||||||
|
"Deletion": {
|
||||||
|
"Type": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CurrentCollector": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Interactions": {
|
||||||
|
"elastic": {
|
||||||
|
"Type": "ElasticScattering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "eT2_elastic_scattering"
|
||||||
|
},
|
||||||
|
"ScatteringAngleDistribution": {
|
||||||
|
"CompositeAngleDistribution": {
|
||||||
|
"LowerDistribution": {
|
||||||
|
"Isotropic": {}
|
||||||
|
},
|
||||||
|
"HigherDistribution": {
|
||||||
|
"AngleDistributionFromFile": {
|
||||||
|
"PathToH5": {
|
||||||
|
"Type": "RelativeToHomebase",
|
||||||
|
"RelativePath": "data/crossSections/eT2_elastic_scattering",
|
||||||
|
"Filename": "eT2_elastic_cross_section_scattering_angle.h5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DeciderEnergy": {
|
||||||
|
"value": 10,
|
||||||
|
"unit": "eV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ionization1": {
|
||||||
|
"Type": "ElectronIonization",
|
||||||
|
"IonizationModel": "JanevNonDiss",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"OutgoingElectron": "e-",
|
||||||
|
"OutgoingIon": "T2+"
|
||||||
|
},
|
||||||
|
"ionization2": {
|
||||||
|
"Type": "ElectronIonization",
|
||||||
|
"IonizationModel": "JanevDissToGround",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"OutgoingElectron": "e-",
|
||||||
|
"OutgoingIon": "T+"
|
||||||
|
},
|
||||||
|
"ionization3": {
|
||||||
|
"Type": "ElectronIonization",
|
||||||
|
"IonizationModel": "JanevDissToFirstExcited",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"OutgoingElectron": "e-",
|
||||||
|
"OutgoingIon": "T+"
|
||||||
|
},
|
||||||
|
"excitation0": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_B1"
|
||||||
|
},
|
||||||
|
"excitation1": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_B1prime"
|
||||||
|
},
|
||||||
|
"excitation2": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_B1primeprime"
|
||||||
|
},
|
||||||
|
"excitation3": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_C1"
|
||||||
|
},
|
||||||
|
"excitation4": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_D1"
|
||||||
|
},
|
||||||
|
"excitation5": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_D1prime"
|
||||||
|
},
|
||||||
|
"excitation6": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_symmetry_forbidden_EF1"
|
||||||
|
},
|
||||||
|
"excitation7": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_symmetry_forbidden_HHb"
|
||||||
|
},
|
||||||
|
"excitation8": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_symmetry_forbidden_GK1"
|
||||||
|
},
|
||||||
|
"excitation9": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_singlet_symmetry_forbidden_I1"
|
||||||
|
},
|
||||||
|
"excitation10": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_triplet_A3"
|
||||||
|
},
|
||||||
|
"excitation11": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_triplet_B3"
|
||||||
|
},
|
||||||
|
"excitation12": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_triplet_C3"
|
||||||
|
},
|
||||||
|
"excitation13": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_triplet_E3"
|
||||||
|
},
|
||||||
|
"excitation14": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_triplet_D3"
|
||||||
|
},
|
||||||
|
"excitation15": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_vibrational_first"
|
||||||
|
},
|
||||||
|
"excitation16": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "janev_vibrational_second"
|
||||||
|
},
|
||||||
|
"excitation17": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "england_rotational_j0_to_j2"
|
||||||
|
},
|
||||||
|
"excitation18": {
|
||||||
|
"Type": "Excitation",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"ExcitationState": "england_rotational_j1_to_j3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"T2+": {
|
||||||
|
"ParticleType": "T2+",
|
||||||
|
"Mover": {
|
||||||
|
"Drift": {
|
||||||
|
"MaximalMovedDistance": {
|
||||||
|
"value": 0.001,
|
||||||
|
"unit": "m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Terminator": {
|
||||||
|
"MaximumInteractions": 1E6,
|
||||||
|
"MaxTimeAlive": {
|
||||||
|
"value": 10,
|
||||||
|
"unit": "s"
|
||||||
|
},
|
||||||
|
"BoundaryGeometry": {
|
||||||
|
"Cylinder": {
|
||||||
|
"Radius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Reflector": {
|
||||||
|
"NoReflector": {}
|
||||||
|
},
|
||||||
|
"DensityField": {
|
||||||
|
"DynamicDensityField": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"EnergyBinning": {
|
||||||
|
"Type": "Logarithmic",
|
||||||
|
"NumberOfBins": 100,
|
||||||
|
"MinEnergy": {
|
||||||
|
"value": 1E-6,
|
||||||
|
"unit": "eV"
|
||||||
|
},
|
||||||
|
"MaxEnergy": {
|
||||||
|
"value": 1E3,
|
||||||
|
"unit": "eV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"VelocityDistribution": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"DriftVelocity": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"Loggers": {
|
||||||
|
"Deletion": {
|
||||||
|
"Type": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CurrentCollector": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Interactions": {
|
||||||
|
"charge exchange": {
|
||||||
|
"Type": "ChargeExchange",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "T2pT2_charge_exchange_janev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clustering": {
|
||||||
|
"Type": "Clustering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"Product": "T3+",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "T2pT2_clustering_janev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"free_movement_example": {
|
||||||
|
"Type": "FreeMovement"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"T+": {
|
||||||
|
"ParticleType": "T+",
|
||||||
|
"Mover": {
|
||||||
|
"Drift": {
|
||||||
|
"MaximalMovedDistance": {
|
||||||
|
"value": 0.001,
|
||||||
|
"unit": "m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Terminator": {
|
||||||
|
"MaximumInteractions": 1E6,
|
||||||
|
"MaxTimeAlive": {
|
||||||
|
"value": 10,
|
||||||
|
"unit": "s"
|
||||||
|
},
|
||||||
|
"BoundaryGeometry": {
|
||||||
|
"Cylinder": {
|
||||||
|
"Radius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Reflector": {
|
||||||
|
"NoReflector": {}
|
||||||
|
},
|
||||||
|
"DensityField": {
|
||||||
|
"DynamicDensityField": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"EnergyBinning": {
|
||||||
|
"Type": "Logarithmic",
|
||||||
|
"NumberOfBins": 100,
|
||||||
|
"MinEnergy": {
|
||||||
|
"value": 1E-6,
|
||||||
|
"unit": "eV"
|
||||||
|
},
|
||||||
|
"MaxEnergy": {
|
||||||
|
"value": 1E3,
|
||||||
|
"unit": "eV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"VelocityDistribution": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"DriftVelocity": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"Loggers": {
|
||||||
|
"Deletion": {
|
||||||
|
"Type": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CurrentCollector": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Interactions": {
|
||||||
|
"elasitc scattering": {
|
||||||
|
"Type": "ElasticScattering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "TpT2_elasitc_scattering_tabata"
|
||||||
|
},
|
||||||
|
"ScatteringAngleDistribution": {
|
||||||
|
"Isotropic": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clustering1": {
|
||||||
|
"Type": "Clustering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"Product": "T3+",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "TpT2_clustering_radiative_ascendion_pasil"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clustering2": {
|
||||||
|
"Type": "Clustering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"Product": "T3+",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "TpT2_clustering_tertiary_ascendion_pasil"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"free_movement_example": {
|
||||||
|
"Type": "FreeMovement"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"T3+": {
|
||||||
|
"ParticleType": "T3+",
|
||||||
|
"Mover": {
|
||||||
|
"Drift": {
|
||||||
|
"MaximalMovedDistance": {
|
||||||
|
"value": 0.001,
|
||||||
|
"unit": "m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Terminator": {
|
||||||
|
"MaximumInteractions": 1E6,
|
||||||
|
"MaxTimeAlive": {
|
||||||
|
"value": 10,
|
||||||
|
"unit": "s"
|
||||||
|
},
|
||||||
|
"BoundaryGeometry": {
|
||||||
|
"Cylinder": {
|
||||||
|
"Radius": {
|
||||||
|
"value": 4.5,
|
||||||
|
"unit": "cm"
|
||||||
|
},
|
||||||
|
"Height": {
|
||||||
|
"value": 1657,
|
||||||
|
"unit": "cm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Reflector": {
|
||||||
|
"NoReflector": {}
|
||||||
|
},
|
||||||
|
"DensityField": {
|
||||||
|
"DynamicDensityField": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"EnergyBinning": {
|
||||||
|
"Type": "Logarithmic",
|
||||||
|
"NumberOfBins": 100,
|
||||||
|
"MinEnergy": {
|
||||||
|
"value": 1E-6,
|
||||||
|
"unit": "eV"
|
||||||
|
},
|
||||||
|
"MaxEnergy": {
|
||||||
|
"value": 1E3,
|
||||||
|
"unit": "eV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"VelocityDistribution": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"DriftVelocity": {
|
||||||
|
"null": {}
|
||||||
|
},
|
||||||
|
"Loggers": {
|
||||||
|
"Deletion": {
|
||||||
|
"Type": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CurrentCollector": {
|
||||||
|
"PositionBinning": {
|
||||||
|
"CreateSameAs": [
|
||||||
|
"GlobalPositionBinning"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Interactions": {
|
||||||
|
"elastic scattering": {
|
||||||
|
"Type": "ElasticScattering",
|
||||||
|
"Target": "TritiumGas",
|
||||||
|
"CrossSection": {
|
||||||
|
"PredefinedFunction": "T3pT2_elasitc_scattering_tabata"
|
||||||
|
},
|
||||||
|
"ScatteringAngleDistribution": {
|
||||||
|
"Isotropic": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"free_movement_example": {
|
||||||
|
"Type": "FreeMovement"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Injector": {
|
||||||
|
"CreatedSpecies": {
|
||||||
|
"specie1": {
|
||||||
|
"TrackedSpecieName": "e-",
|
||||||
|
"CreationVelocityDistribution": {
|
||||||
|
"VelocityDistributionFromFunction": {
|
||||||
|
"VelocityDistributionFunction": {
|
||||||
|
"IsotropicDistribution": {
|
||||||
|
"EnergyDistributionFunction": {
|
||||||
|
"TritiumBetaDecay": {}
|
||||||
|
},
|
||||||
|
"Mass": {
|
||||||
|
"FromParticleType": "electron"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"specie2": {
|
||||||
|
"TrackedSpecieName": "T2+",
|
||||||
|
"CreationVelocityDistribution": {
|
||||||
|
"VelocityDistributionFromFunction": {
|
||||||
|
"VelocityDistributionFunction": {
|
||||||
|
"IsotropicDistribution": {
|
||||||
|
"EnergyDistributionFunction": {
|
||||||
|
"MaxwellBoltzmann": {
|
||||||
|
"Temperature": {
|
||||||
|
"value": 80,
|
||||||
|
"unit": "K"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Mass": {
|
||||||
|
"FromParticleType": "T2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"EventPositionDistribution": {
|
||||||
|
"ScalarField": {
|
||||||
|
"ScalarFieldFunctionInZ": {
|
||||||
|
"zFunction": {
|
||||||
|
"Product": {
|
||||||
|
"fi": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fj": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fk": {
|
||||||
|
"PiecewiseLinearFromFile": {
|
||||||
|
"PathToH5": {
|
||||||
|
"Type": "RelativeToHomebase",
|
||||||
|
"RelativePath": "data/densityDistributions/T2",
|
||||||
|
"Filename": "T2_n_vs_z_kuckert_approximated_relative.h5"
|
||||||
|
},
|
||||||
|
"xValuesKey": "/z_position(m)",
|
||||||
|
"yValuesKey": "/n(m3)",
|
||||||
|
"prefactor": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"DensityLimit": {
|
||||||
|
"min": 0,
|
||||||
|
"max": 1
|
||||||
|
},
|
||||||
|
"PositionLimits": {
|
||||||
|
"rPosition": {
|
||||||
|
"min": 0,
|
||||||
|
"max": 0.045
|
||||||
|
},
|
||||||
|
"phiPosition": {
|
||||||
|
"min": 0,
|
||||||
|
"max": 6.28318530718
|
||||||
|
},
|
||||||
|
"zPosition": {
|
||||||
|
"min": 0,
|
||||||
|
"max": 16.57
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"MotherDriftVelocity": {
|
||||||
|
"VectorField": {
|
||||||
|
"VectorFieldFunctionInZ": {
|
||||||
|
"zFunction": {
|
||||||
|
"Product": {
|
||||||
|
"fi": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fj": {
|
||||||
|
"Constant": {
|
||||||
|
"constant": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fk": {
|
||||||
|
"PiecewiseLinearFromFile": {
|
||||||
|
"PathToH5": {
|
||||||
|
"Type": "RelativeToHomebase",
|
||||||
|
"RelativePath": "data/velocityDistributions/T2_vz/KuckertPaper",
|
||||||
|
"Filename": "T2_vz_vs_z_kuckert_approximated.h5"
|
||||||
|
},
|
||||||
|
"xValuesKey": "/z_position(m)",
|
||||||
|
"yValuesKey": "/vz(ms)",
|
||||||
|
"prefactor": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Activity": {
|
||||||
|
"value": 1E14,
|
||||||
|
"unit": "Bq"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ElectricField": {
|
||||||
|
"Background": {
|
||||||
|
"VectorField": {
|
||||||
|
"VectorFieldConstant": {
|
||||||
|
"constant": {
|
||||||
|
"vector": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "V/m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Dynamic": {
|
||||||
|
"VectorField": {
|
||||||
|
"VectorFieldConstant": {
|
||||||
|
"constant": {
|
||||||
|
"vector": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "V/m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"MagneticField": {
|
||||||
|
"VectorField": {
|
||||||
|
"VectorFieldFunctionInZ": {
|
||||||
|
"zFunction": {
|
||||||
|
"Constant3D": {
|
||||||
|
"constant": 2.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PoissonSolver": {
|
||||||
|
"UseInSimulation": "false"
|
||||||
|
},
|
||||||
|
"Simulation": {
|
||||||
|
"SimulatedEvents": 10000000,
|
||||||
|
"EventStride": 1000
|
||||||
|
},
|
||||||
|
"Output": {
|
||||||
|
"folder": "output",
|
||||||
|
"filename": "katrin",
|
||||||
|
"DensityFields": {
|
||||||
|
"Species": "all",
|
||||||
|
"Intervall": 1,
|
||||||
|
"OverwriteLast": "true"
|
||||||
|
},
|
||||||
|
"CurrentBorders": {
|
||||||
|
"Species": "all",
|
||||||
|
"Intervall": "EachSync",
|
||||||
|
"OverwriteLast": "true"
|
||||||
|
},
|
||||||
|
"DeletionLogger": {
|
||||||
|
"Species": "all",
|
||||||
|
"Intervall": "EachSync",
|
||||||
|
"OverwriteLast": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"RandomNumbers": {
|
||||||
|
"Seed": 1337
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,6 +18,14 @@ std::shared_ptr<Mover> buildMover(Parameter& parameter,
|
|||||||
json_read_length(parameter.jsonObjectFromBase(json_path_append(
|
json_read_length(parameter.jsonObjectFromBase(json_path_append(
|
||||||
path_to_mover, {"Drift", "MaximalMovedDistance"})));
|
path_to_mover, {"Drift", "MaximalMovedDistance"})));
|
||||||
return std::make_shared<DriftMover>(maximal_moved_distance);
|
return std::make_shared<DriftMover>(maximal_moved_distance);
|
||||||
|
} else if (parameter.jsonObjectFromBase(
|
||||||
|
json_path_append(path_to_mover, {"Euler"}))) {
|
||||||
|
DEBUG_LEVEL_3("Creating mover: Euler.");
|
||||||
|
SIM_INFO("Warning: any magnetic or electric field are going to be ignored.");
|
||||||
|
double maximal_moved_distance =
|
||||||
|
json_read_length(parameter.jsonObjectFromBase(json_path_append(
|
||||||
|
path_to_mover, {"Euler", "MaximalMovedDistance"})));
|
||||||
|
return std::make_shared<EulerMover>(maximal_moved_distance);
|
||||||
} else {
|
} else {
|
||||||
ERROR("This mover is not implemented");
|
ERROR("This mover is not implemented");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -277,3 +277,57 @@ blitz::TinyVector<double, 3> DriftMover::driftVelocity(
|
|||||||
return -blitz::cross(magnetic_field, electric_field) /
|
return -blitz::cross(magnetic_field, electric_field) /
|
||||||
blitz::dot(magnetic_field, magnetic_field);
|
blitz::dot(magnetic_field, magnetic_field);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EulerMover::EulerMover(double maximal_distance) :
|
||||||
|
maximal_distance_m_(maximal_distance) {}
|
||||||
|
|
||||||
|
void EulerMover::move(particle::Particle* particle,
|
||||||
|
double mfp_m,
|
||||||
|
ElectricField* electric_field,
|
||||||
|
MagneticField* magnetic_field) {
|
||||||
|
auto old_position = particle->position();
|
||||||
|
const auto old_velocity = particle->velocity();
|
||||||
|
const double old_absolute_velocity = particle->absoluteVelocity();
|
||||||
|
double old_kinetic_energy = particle->kineticEnergy_eV();
|
||||||
|
|
||||||
|
double leftover_distance = mfp_m;
|
||||||
|
|
||||||
|
bool changed_position_bin = false;
|
||||||
|
bool changed_energy_bin = false;
|
||||||
|
bool left_simulation_domain = false;
|
||||||
|
bool died_in_bin = false;
|
||||||
|
|
||||||
|
while(!(changed_energy_bin || changed_position_bin ||
|
||||||
|
left_simulation_domain || died_in_bin) && (leftover_distance > 0.)) {
|
||||||
|
old_kinetic_energy = particle->kineticEnergy_eV();
|
||||||
|
old_position = particle->position();
|
||||||
|
|
||||||
|
const double stepsize = std::min(leftover_distance, maximal_distance_m_);
|
||||||
|
const double delta_t = stepsize/old_absolute_velocity;
|
||||||
|
|
||||||
|
blitz::TinyVector<double, 3> movement_linear =
|
||||||
|
old_velocity.cartesianEntries(old_position)*delta_t;
|
||||||
|
|
||||||
|
particle->move(CartesianCoordinate(movement_linear));
|
||||||
|
particle->increaseTimeAlive(delta_t);
|
||||||
|
particle->increaseTimeInBin(delta_t);
|
||||||
|
|
||||||
|
changed_position_bin = particle->specie()->dynamicDensityField()
|
||||||
|
->changedPositionBin(old_position, particle->position());
|
||||||
|
|
||||||
|
changed_energy_bin = particle->specie()->dynamicDensityField()
|
||||||
|
->changedEnergyBin(old_kinetic_energy, particle->kineticEnergy_eV());
|
||||||
|
|
||||||
|
left_simulation_domain = particle->specie()->terminator()
|
||||||
|
->leftSimulationDomain(particle);
|
||||||
|
|
||||||
|
died_in_bin = particle->specie()->terminator()->reachedMaxTimeAlive(particle);
|
||||||
|
|
||||||
|
leftover_distance -= stepsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
particle->specie()->dynamicDensityField()->logMovement(old_position,
|
||||||
|
old_kinetic_energy, particle->timeInBin());
|
||||||
|
particle->resetTimeInBin();
|
||||||
|
particle->specie()->currentCollector()->collect(particle, old_position);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user