3#ifndef G_MEDIUM_MAGBOLTZ_9
4#define G_MEDIUM_MAGBOLTZ_9
35 useAnisotropic =
true;
39 useAnisotropic =
false;
83 double& dx,
double& dy,
double& dz,
int& nion,
84 int& ndxc,
int& band);
94 double& ctheta,
int& nsec,
double& esec);
102 int& nAttachment,
int& nInelastic,
103 int& nExcitation,
int& nSuperelastic)
const;
107 bool GetLevel(
const int i,
int& ngas,
int& type, std::string& descr,
118 int& nInelastic)
const;
120 void RunMagboltz(
const double e,
const double b,
const double btheta,
121 const int ncoll,
bool verbose,
double& vx,
double& vy,
122 double& vz,
double& dl,
double& dt,
double& alpha,
123 double& eta,
double& vxerr,
double& vyerr,
double& vzerr,
124 double& dlerr,
double& dterr,
double& alphaerr,
125 double& etaerr,
double& alphatof);
129 const bool verbose =
true);
141 static const int nEnergySteps = 20000;
142 static const int nEnergyStepsLog = 200;
143 static const int nEnergyStepsGamma = 5000;
144 static const int nMaxInelasticTerms = 250;
145 static const int nMaxLevels = 512;
146 static const int nCsTypes = 6;
147 static const int nCsTypesGamma = 4;
149 static const int DxcTypeRad;
150 static const int DxcTypeCollIon;
151 static const int DxcTypeCollNonIon;
154 double eFinal, eStep;
155 double eHigh, eHighLog;
166 double wOpalBeaty[nMaxLevels];
175 double energyLoss[nMaxLevels];
177 int csType[nMaxLevels];
180 double scatParameter[nEnergySteps][nMaxLevels];
181 double scatParameterLog[nEnergyStepsLog][nMaxLevels];
182 int scatModel[nMaxLevels];
183 double scatCut[nEnergySteps][nMaxLevels];
184 double scatCutLog[nEnergyStepsLog][nMaxLevels];
187 char description[nMaxLevels][50];
190 double cfTot[nEnergySteps];
191 double cfTotLog[nEnergyStepsLog];
195 double cf[nEnergySteps][nMaxLevels];
196 double cfLog[nEnergyStepsLog][nMaxLevels];
205 int nCollisions[nCsTypes];
207 std::vector<int> nCollisionsDetailed;
211 double rPenning[nMaxLevels];
213 double lambdaPenning[nMaxLevels];
219 bool useDeexcitation;
225 struct deexcitation {
237 std::vector<double> p;
239 std::vector<int>
final;
241 std::vector<int> type;
255 std::vector<deexcitation> deexcitations;
257 int iDeexcitation[nMaxLevels];
260 int nIonisationProducts;
265 std::vector<ionProd> ionProducts;
268 int nDeexcitationProducts;
279 std::vector<dxcProd> dxcProducts;
293 double eFinalGamma, eStepGamma;
297 std::vector<double> cfTotGamma;
299 std::vector<std::vector<double> > cfGamma;
300 std::vector<int> csTypeGamma;
306 int nPhotonCollisions[nCsTypesGamma];
308 bool GetGasNumberMagboltz(
const std::string input,
int& number)
const;
309 bool Mixer(
const bool verbose =
false);
310 void SetupGreenSawada();
311 void ComputeAngularCut(
double parIn,
double& cut,
double& parOut);
312 void ComputeDeexcitationTable(
const bool verbose);
313 void ComputeDeexcitationInternal(
int iLevel,
int& fLevel);
314 bool ComputePhotonCollisionTable(
const bool verbose);
static const unsigned int m_nMaxGases
void SetSplittingFunctionGreenSawada()
int GetNumberOfPhotonCollisions() const
void SetExcitationScalingFactor(const double r, std::string gasname)
bool GetDeexcitationProduct(const int i, double &t, double &s, int &type, double &energy)
bool GetIonisationProduct(const int i, int &type, double &energy)
void ResetCollisionCounters()
void EnableRadiationTrapping()
int GetNumberOfDeexcitationProducts()
void EnablePenningTransfer(const double r, const double lambda)
void ComputeDeexcitation(int iLevel, int &fLevel)
void SetSplittingFunctionOpalBeaty()
void EnableCrossSectionOutput()
double GetPhotonCollisionRate(const double &e)
void GenerateGasTable(const int numCollisions=10, const bool verbose=true)
double GetMaxElectronEnergy() const
void DisableCrossSectionOutput()
void SetSplittingFunctionFlat()
double GetMaxPhotonEnergy() const
bool SetMaxPhotonEnergy(const double e)
bool GetElectronCollision(const double e, int &type, int &level, double &e1, double &dx, double &dy, double &dz, int &nion, int &ndxc, int &band)
void DisableDeexcitation()
void DisableAnisotropicScattering()
void DisableRadiationTrapping()
double GetElectronNullCollisionRate(const int band)
int GetNumberOfPenningTransfers() const
bool Initialise(const bool verbose=false)
void EnableEnergyRangeAdjustment()
bool GetLevel(const int i, int &ngas, int &type, std::string &descr, double &e)
bool SetMaxElectronEnergy(const double e)
void DisableEnergyRangeAdjustment()
int GetNumberOfIonisationProducts()
int GetNumberOfElectronCollisions() const
void RunMagboltz(const double e, const double b, const double btheta, const int ncoll, bool verbose, double &vx, double &vy, double &vz, double &dl, double &dt, double &alpha, double &eta, double &vxerr, double &vyerr, double &vzerr, double &dlerr, double &dterr, double &alphaerr, double &etaerr, double &alphatof)
double GetElectronCollisionRate(const double e, const int band)
void EnableDeexcitation()
void EnableAnisotropicScattering()
void DisablePenningTransfer()
bool GetPhotonCollision(const double e, int &type, int &level, double &e1, double &ctheta, int &nsec, double &esec)