chombo-discharge
CD_ItoKMCJSON.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2023 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_ItoKMCJSON_H
13 #define CD_ItoKMCJSON_H
14 
15 // Std includes
16 #include <map>
17 #include <memory>
18 #include <string>
19 
20 // Third-party includes
21 #include <nlohmann/json.hpp>
22 
23 // Our includes
25 #include <CD_ItoKMCPhysics.H>
26 #include <CD_LookupTable.H>
27 #include <CD_NamespaceHeader.H>
28 
29 namespace Physics {
30  namespace ItoKMC {
31 
35  class ItoKMCJSON : public ItoKMCPhysics
36  {
37  public:
43  using FunctionXt = std::function<Real(const RealVect a_position, const Real a_time)>;
44 
53  using FunctionEN = std::function<Real(const Real a_E, const Real a_N)>;
54 
60  using FunctionX = std::function<Real(const RealVect a_position)>;
61 
67  using FunctionEX = std::function<Real(const Real E, const RealVect x)>;
68 
76  using FunctionEVX = std::function<Real(const Real E, const Real V, const RealVect x)>;
77 
82  using FunctionT = std::function<Real(const Real a_T)>;
83 
89  using FunctionTT = std::function<Real(const Real a_T1, const Real a_T2)>;
90 
94  ItoKMCJSON();
95 
99  virtual ~ItoKMCJSON() noexcept;
100 
104  virtual void
105  parseRuntimeOptions() noexcept override;
106 
113  virtual Real
114  computeDt(const RealVect a_E, const RealVect a_pos, const Vector<Real> a_densities) const noexcept override;
115 
121  virtual Real
122  computeAlpha(const Real a_E, const RealVect a_pos) const noexcept override;
123 
129  virtual Real
130  computeEta(const Real a_E, const RealVect a_pos) const noexcept override;
131 
135  virtual Vector<std::string>
136  getPlotVariableNames() const noexcept override;
137 
147  virtual Vector<Real>
148  getPlotVariables(const RealVect a_E,
149  const RealVect a_pos,
150  const Vector<Real>& a_phi,
151  const Vector<RealVect>& a_gradPhi,
152  const Real a_dx,
153  const Real a_kappa) const noexcept override;
154 
158  virtual int
159  getNumberOfPlotVariables() const noexcept override;
160 
164  virtual bool
165  needGradients() const noexcept override;
166 
173  virtual Vector<Real>
174  computeMobilities(const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept override;
175 
182  virtual Vector<Real>
183  computeDiffusionCoefficients(const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept override;
184 
207  virtual void
208  secondaryEmissionEB(Vector<List<ItoParticle>>& a_secondaryParticles,
209  Vector<Real>& a_secondaryCDRFluxes,
210  Vector<List<Photon>>& a_secondaryPhotons,
211  const Vector<List<ItoParticle>>& a_primaryParticles,
212  const Vector<Real>& a_primaryCDRFluxes,
213  const Vector<List<Photon>>& a_primaryPhotons,
214  const RealVect& a_E,
215  const RealVect& a_cellCenter,
216  const RealVect& a_cellCentroid,
217  const RealVect& a_bndryCentroid,
218  const RealVect& a_bndryNormal,
219  const Real a_bndryArea,
220  const Real a_dx,
221  const Real a_dt,
222  const bool a_isDielectric,
223  const int a_matIndex) const noexcept override;
224 
225  protected:
229  bool m_verbose;
230 
234  bool m_plotGas;
235 
240 
244  bool m_plotEta;
245 
250 
255 
260 
265 
269  nlohmann::json m_json;
270 
274  std::string m_jsonFile;
275 
280  std::set<std::string> m_allSpecies;
281 
285  std::map<std::string, int> m_backgroundSpeciesMap;
286 
290  std::map<int, std::string> m_backgroundSpeciesMapInverse;
291 
297 
302  std::vector<bool> m_backgroundSpeciesPlot;
303 
307  std::map<std::string, SpeciesType> m_plasmaSpeciesTypes;
308 
312  std::map<std::string, int> m_itoSpeciesMap;
313 
317  std::map<std::string, int> m_cdrSpeciesMap;
318 
322  std::map<std::string, int> m_plasmaIndexMap;
323 
327  std::map<std::string, int> m_photonIndexMap;
328 
333 
338 
343 
348 
353  std::vector<FunctionEX> m_fluidRates;
354 
358  std::vector<std::list<size_t>> m_plasmaReactionBackgroundReactants;
359 
363  std::vector<std::list<size_t>> m_plasmaReactionPlasmaReactants;
364 
368  std::vector<std::list<size_t>> m_plasmaReactionPlasmaProducts;
369 
373  std::vector<std::list<size_t>> m_plasmaReactionPhotonProducts;
374 
378  std::vector<std::pair<bool, std::string>> m_kmcReactionGradientCorrections;
379 
383  std::vector<std::pair<bool, std::string>> m_kmcReactionRatePlots;
384 
388  std::map<int, std::pair<bool, int>> m_plasmaReactionSolovievCorrection;
389 
393  std::pair<bool, std::string> m_autoAlpha;
394 
398  std::pair<bool, std::string> m_autoEta;
399 
404 
409 
414 
419 
424 
429  virtual std::string
430  trim(const std::string& a_string) const noexcept;
431 
435  virtual void
436  parseJSON();
437 
441  virtual void
442  parseVerbose() noexcept;
443 
448  virtual void
449  throwParserError(const std::string a_error) const noexcept;
450 
455  virtual void
456  throwParserWarning(const std::string a_warning) const noexcept;
457 
462  virtual bool
463  doesFileExist(const std::string a_filename) const noexcept;
464 
469  virtual bool
470  isBackgroundSpecies(const std::string& a_name) const noexcept;
471 
476  virtual bool
477  isPlasmaSpecies(const std::string& a_name) const noexcept;
478 
483  virtual bool
484  isPhotonSpecies(const std::string& a_name) const noexcept;
485 
490  virtual bool
491  containsWildcard(const std::string a_str) const noexcept;
492 
497  virtual bool
498  containsBracket(const std::string a_str) const noexcept;
499 
504  virtual bool
505  isBracketed(const std::string a_str) const noexcept;
506 
511  virtual void
512  checkMolarFraction(const RealVect a_position) const noexcept;
513 
520  virtual void
521  sanctifyPlasmaReaction(const std::vector<std::string>& a_reactants,
522  const std::vector<std::string>& a_products,
523  const std::string& a_reaction) const noexcept;
524 
531  virtual void
532  sanctifyPhotoReaction(const std::vector<std::string>& a_reactants,
533  const std::vector<std::string>& a_products,
534  const std::string& a_reaction) const noexcept;
535 
539  virtual void
541 
545  virtual void
547 
552  virtual void
553  initializeTownsendCoefficient(const std::string a_coeff);
554 
559  virtual void
560  initializeAutomaticTownsend(const std::string a_coeff);
561 
567  virtual void
568  previewFunctionEX(const nlohmann::json& a_json, const FunctionEX& a_function) const;
569 
573  virtual void
574  printFluidRates() const noexcept;
575 
579  virtual void
581 
585  virtual void
587 
591  virtual void
593 
597  virtual void
599 
603  virtual void
605 
609  virtual void
611 
615  virtual void
617 
621  virtual void
623 
628  virtual void
629  initializeSurfaceEmission(const std::string a_surface);
630 
637  virtual void
638  parseReactionString(std::vector<std::string>& a_reactants,
639  std::vector<std::string>& a_products,
640  const std::string& a_reaction) const noexcept;
641 
653  virtual void
654  getReactionSpecies(std::list<size_t>& a_backgroundReactants,
655  std::list<size_t>& a_plasmaReactants,
656  std::list<size_t>& a_photonReactants,
657  std::list<size_t>& a_backgroundProducts,
658  std::list<size_t>& a_plasmaProducts,
659  std::list<size_t>& a_photonProducts,
660  const std::vector<std::string>& a_reactants,
661  const std::vector<std::string>& a_products) const noexcept;
662 
671  virtual std::pair<FunctionEVX, FunctionEX>
672  parsePlasmaReactionRate(const nlohmann::json& a_reactionJSON,
673  const std::list<size_t>& a_backgroundReactants,
674  const std::list<size_t>& a_plasmaReactants) const;
675 
680  virtual std::pair<bool, std::string>
681  parsePlasmaReactionPlot(const nlohmann::json& a_reactionJSON) const;
682 
687  virtual std::pair<bool, std::string>
688  parsePlasmaReactionGradientCorrection(const nlohmann::json& a_reactionJSON) const;
689 
695  virtual LookupTable1D<Real, 1>
696  parseTableEByN(const nlohmann::json& a_tableEntry, const std::string& a_dataID) const;
697 
705  virtual std::vector<std::tuple<std::string, std::vector<std::string>, std::vector<std::string>>>
706  parseReactionWildcards(const std::vector<std::string>& a_reactants,
707  const std::vector<std::string>& a_products,
708  const nlohmann::json& a_reactionJSON) const noexcept;
709 
720  virtual void
721  updateReactionRates(std::vector<std::shared_ptr<const KMCReaction>>& a_kmcReactions,
722  const RealVect a_E,
723  const RealVect a_pos,
724  const Vector<Real>& a_phi,
725  const Vector<RealVect>& a_gradPhi,
726  const Real a_dx,
727  const Real a_kappa) const noexcept override;
728 
734  std::vector<size_t>
735  multinomial(const size_t N, const std::discrete_distribution<size_t>& a_distribution) const noexcept;
736  };
737  } // namespace ItoKMC
738 } // namespace Physics
739 
740 #include <CD_NamespaceFooter.H>
741 
742 #endif
Declaration of a background species class for usage with ItoKMCJSON.
Main file for describing Ito-based plasma physics.
SpeciesType
Map to species type.
Definition: CD_ItoKMCPhysics.H:66
Declaration of a table for looking up coefficients etc.
A particle class for use with ItoSolvers, i.e. drifting Brownian walkers.
Definition: CD_ItoParticle.H:40
Reaction type for advancing a KMCDualState for Kinetic Monte Carlo.
Definition: CD_KMCDualStateReaction.H:33
Class for interpolation of f = f(x) data in one independent variable x.
Definition: CD_LookupTable1D.H:30
Particle class for usage with Monte Carlo radiative transfer.
Definition: CD_Photon.H:29
Encapsulation of a background species for usage with ItoKMCJSON.
Definition: CD_ItoKMCBackgroundSpecies.H:31
Implementation of ItoKMCPhysics which parses input data from a JSON file.
Definition: CD_ItoKMCJSON.H:36
virtual void initializeSurfaceEmission(const std::string a_surface)
Initialize surface reactions.
Definition: CD_ItoKMCJSON.cpp:1855
virtual bool containsBracket(const std::string a_str) const noexcept
Check if a string contains standard brackets.
Definition: CD_ItoKMCJSON.cpp:208
virtual Vector< Real > computeDiffusionCoefficients(const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept override
Compute the Ito solver diffusion coefficients.
Definition: CD_ItoKMCJSON.cpp:2964
virtual std::pair< bool, std::string > parsePlasmaReactionPlot(const nlohmann::json &a_reactionJSON) const
Parse whether or not a reaction rate should be plotted.
Definition: CD_ItoKMCJSON.cpp:2666
virtual void initializeDiffusionCoefficients()
Initialize diffusion coefficients.
Definition: CD_ItoKMCJSON.cpp:1342
std::vector< std::list< size_t > > m_plasmaReactionPhotonProducts
List of photon species on the right-hand side of a reaction.
Definition: CD_ItoKMCJSON.H:373
FunctionEX m_alpha
Townsend ionization coefficient. Defined during parseAlpha.
Definition: CD_ItoKMCJSON.H:403
virtual void updateReactionRates(std::vector< std::shared_ptr< const KMCReaction >> &a_kmcReactions, const RealVect a_E, const RealVect a_pos, const Vector< Real > &a_phi, const Vector< RealVect > &a_gradPhi, const Real a_dx, const Real a_kappa) const noexcept override
Update reaction rates.
Definition: CD_ItoKMCJSON.cpp:2982
std::vector< std::list< size_t > > m_plasmaReactionPlasmaProducts
List of plasma species on the right-hand side of a reaction.
Definition: CD_ItoKMCJSON.H:368
FunctionEX m_eta
Townsend attachment coefficient. Defined during parseEta.
Definition: CD_ItoKMCJSON.H:408
std::function< Real(const Real a_E, const Real a_N)> FunctionEN
Function for encapsulating operations f = f(E,N). field in Townsend units.
Definition: CD_ItoKMCJSON.H:53
virtual bool isPlasmaSpecies(const std::string &a_name) const noexcept
Return true if species is a plasma species.
Definition: CD_ItoKMCJSON.cpp:186
bool m_plotEta
Plot Townsend attachment coefficient.
Definition: CD_ItoKMCJSON.H:244
bool m_plotGas
Plot gas pressure, density, and temperature.
Definition: CD_ItoKMCJSON.H:234
virtual void initializeGasLaw()
Initialize gas law.
Definition: CD_ItoKMCJSON.cpp:303
std::vector< FunctionEVX > m_kmcReactionRates
Function-based plasma reaction rates. Same index as the actual reactions.
Definition: CD_ItoKMCJSON.H:347
virtual void sanctifyPhotoReaction(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const std::string &a_reaction) const noexcept
Check that a photo-reaction makes sense. I.e. that all species are properly defined and that it conse...
Definition: CD_ItoKMCJSON.cpp:2121
virtual void initializePhotonSpecies()
Initialize the photon species.
Definition: CD_ItoKMCJSON.cpp:1521
virtual void secondaryEmissionEB(Vector< List< ItoParticle >> &a_secondaryParticles, Vector< Real > &a_secondaryCDRFluxes, Vector< List< Photon >> &a_secondaryPhotons, const Vector< List< ItoParticle >> &a_primaryParticles, const Vector< Real > &a_primaryCDRFluxes, const Vector< List< Photon >> &a_primaryPhotons, const RealVect &a_E, const RealVect &a_cellCenter, const RealVect &a_cellCentroid, const RealVect &a_bndryCentroid, const RealVect &a_bndryNormal, const Real a_bndryArea, const Real a_dx, const Real a_dt, const bool a_isDielectric, const int a_matIndex) const noexcept override
Resolve secondary emission at the EB.
Definition: CD_ItoKMCJSON.cpp:3030
FunctionX m_gasPressure
Background gas pressure.
Definition: CD_ItoKMCJSON.H:413
virtual LookupTable1D< Real, 1 > parseTableEByN(const nlohmann::json &a_tableEntry, const std::string &a_dataID) const
Parse a table which is stored in E/N format.
Definition: CD_ItoKMCJSON.cpp:2749
std::function< Real(const Real a_T)> FunctionT
Function for encapsulating a function f = f(T) where T is the temperature of some species.
Definition: CD_ItoKMCJSON.H:82
virtual Real computeEta(const Real a_E, const RealVect a_pos) const noexcept override
Compute Townsend attachment coefficient.
Definition: CD_ItoKMCJSON.cpp:2935
std::pair< bool, std::string > m_autoAlpha
Flag if the user wants to compute the alpha coefficient from the reactions.
Definition: CD_ItoKMCJSON.H:393
virtual Vector< Real > getPlotVariables(const RealVect a_E, const RealVect a_pos, const Vector< Real > &a_phi, const Vector< RealVect > &a_gradPhi, const Real a_dx, const Real a_kappa) const noexcept override
Get plot variables.
Definition: CD_ItoKMCJSON.cpp:3240
std::set< std::string > m_allSpecies
All species that have been defined.
Definition: CD_ItoKMCJSON.H:280
virtual void previewFunctionEX(const nlohmann::json &a_json, const FunctionEX &a_function) const
Simple function for previewing a rate/coefficient defined as a function f = f(E,x)
Definition: CD_ItoKMCJSON.cpp:911
std::function< Real(const RealVect a_position)> FunctionX
Function for encapsulating a function f = f(x) where x is the physical coordinates.
Definition: CD_ItoKMCJSON.H:60
virtual Vector< std::string > getPlotVariableNames() const noexcept override
Get number of plot variables.
Definition: CD_ItoKMCJSON.cpp:3202
std::map< std::string, int > m_cdrSpeciesMap
Map for indexing from an ID to an Ito solver index.
Definition: CD_ItoKMCJSON.H:317
virtual void initializePlasmaReactions()
Initialize plasma reactions.
Definition: CD_ItoKMCJSON.cpp:1679
std::function< Real(const RealVect a_position, const Real a_time)> FunctionXt
Function alias for e.g. initial data.
Definition: CD_ItoKMCJSON.H:43
virtual Vector< Real > computeMobilities(const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept override
Compute the Ito solver mobilities.
Definition: CD_ItoKMCJSON.cpp:2946
virtual std::vector< std::tuple< std::string, std::vector< std::string >, std::vector< std::string > > > parseReactionWildcards(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const nlohmann::json &a_reactionJSON) const noexcept
Make a reaction set into a superset. This parses wildcards '@' in reaction string.
Definition: CD_ItoKMCJSON.cpp:2849
virtual std::pair< FunctionEVX, FunctionEX > parsePlasmaReactionRate(const nlohmann::json &a_reactionJSON, const std::list< size_t > &a_backgroundReactants, const std::list< size_t > &a_plasmaReactants) const
Parse a plasma reaction rate and turn it into a function.
Definition: CD_ItoKMCJSON.cpp:2310
virtual void initializeTownsendCoefficient(const std::string a_coeff)
Parse one of the Townsend coefficients.
Definition: CD_ItoKMCJSON.cpp:645
virtual void initializeAutomaticTownsend(const std::string a_coeff)
Initialize automatic Townsend coefficient (ionizatino or attachment) from the reaction rates.
Definition: CD_ItoKMCJSON.cpp:744
FunctionX m_gasNumberDensity
Background gas number density.
Definition: CD_ItoKMCJSON.H:423
virtual void sanctifyPlasmaReaction(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const std::string &a_reaction) const noexcept
Check that a plasma reaction makes sense. I.e. that all species are properly defined and that it cons...
Definition: CD_ItoKMCJSON.cpp:2013
ItoKMCJSON()
Default constructor.
Definition: CD_ItoKMCJSON.cpp:28
virtual bool doesFileExist(const std::string a_filename) const noexcept
Check if a file exists.
Definition: CD_ItoKMCJSON.cpp:151
bool m_previewRates
Preview rates or not.
Definition: CD_ItoKMCJSON.H:254
bool m_skipReactions
A flag for skipping reactions completely.
Definition: CD_ItoKMCJSON.H:249
virtual void initializePlasmaSpecies()
Initialize the plasma species.
Definition: CD_ItoKMCJSON.cpp:550
virtual void throwParserError(const std::string a_error) const noexcept
Throw a parser error.
Definition: CD_ItoKMCJSON.cpp:125
std::map< std::string, int > m_backgroundSpeciesMap
Map of string-int identifiers for background species.
Definition: CD_ItoKMCJSON.H:285
virtual void initializeMobilities()
Initialize mobility functions.
Definition: CD_ItoKMCJSON.cpp:1246
virtual void throwParserWarning(const std::string a_warning) const noexcept
Throw a parser wearning.
Definition: CD_ItoKMCJSON.cpp:138
virtual void checkMolarFraction(const RealVect a_position) const noexcept
Check that molar fraction is one. Throws a warning if it isn't.
Definition: CD_ItoKMCJSON.cpp:237
virtual void getReactionSpecies(std::list< size_t > &a_backgroundReactants, std::list< size_t > &a_plasmaReactants, std::list< size_t > &a_photonReactants, std::list< size_t > &a_backgroundProducts, std::list< size_t > &a_plasmaProducts, std::list< size_t > &a_photonProducts, const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products) const noexcept
Turn reactants and products strings into indices.
Definition: CD_ItoKMCJSON.cpp:2246
virtual ~ItoKMCJSON() noexcept
Destructor.
Definition: CD_ItoKMCJSON.cpp:85
std::map< std::string, int > m_photonIndexMap
Map for indexing a photon species name to a global index in the solver vectors.
Definition: CD_ItoKMCJSON.H:327
std::function< Real(const Real E, const RealVect x)> FunctionEX
Function for encapsulating a function f = f(E, x) where E is the electric field at physical coordinat...
Definition: CD_ItoKMCJSON.H:67
std::map< int, std::string > m_backgroundSpeciesMapInverse
Map of int-string identifiers for background species.
Definition: CD_ItoKMCJSON.H:290
std::vector< FunctionEX > m_fluidRates
Function-based plasma reaction rates as if they appeared in the reaction rate equation....
Definition: CD_ItoKMCJSON.H:353
nlohmann::json m_json
Nohmanns implementation of JSON files.
Definition: CD_ItoKMCJSON.H:269
virtual bool isBackgroundSpecies(const std::string &a_name) const noexcept
Return true if species is a background species.
Definition: CD_ItoKMCJSON.cpp:175
FunctionX m_gasTemperature
Background gas temperature.
Definition: CD_ItoKMCJSON.H:418
std::vector< size_t > multinomial(const size_t N, const std::discrete_distribution< size_t > &a_distribution) const noexcept
Sample a multinomial distribution with N samples.
Definition: CD_ItoKMCJSON.cpp:3287
int m_numPlasmaSpecies
Total number of plasma species.
Definition: CD_ItoKMCJSON.H:259
virtual void initializePhotoReactions()
Initialize photo-reactions.
Definition: CD_ItoKMCJSON.cpp:1774
std::function< Real(const Real a_T1, const Real a_T2)> FunctionTT
Function for encapsulating a function f = f(T1, T2) where T1/T2 are temperatures of two species.
Definition: CD_ItoKMCJSON.H:89
virtual bool containsWildcard(const std::string a_str) const noexcept
Check if a string contains the wildcard @ and return true if it does.
Definition: CD_ItoKMCJSON.cpp:164
int m_numPhotonSpecies
Total number of photon species.
Definition: CD_ItoKMCJSON.H:264
std::vector< bool > m_backgroundSpeciesPlot
Plot background species or not.
Definition: CD_ItoKMCJSON.H:302
virtual void initializeBackgroundSpecies()
Initialize the background species.
Definition: CD_ItoKMCJSON.cpp:358
std::vector< std::list< size_t > > m_plasmaReactionBackgroundReactants
List of background species involved in a reaction.
Definition: CD_ItoKMCJSON.H:358
virtual std::pair< bool, std::string > parsePlasmaReactionGradientCorrection(const nlohmann::json &a_reactionJSON) const
Parse whether or not a reaction uses a gradient correction for the rate.
Definition: CD_ItoKMCJSON.cpp:2688
virtual Real computeDt(const RealVect a_E, const RealVect a_pos, const Vector< Real > a_densities) const noexcept override
Compute a physics-based time step.
Definition: CD_ItoKMCJSON.cpp:2913
virtual bool needGradients() const noexcept override
Return true/false if physics model needs species gradients.
Definition: CD_ItoKMCJSON.cpp:3146
std::string m_jsonFile
Input JSON file name.
Definition: CD_ItoKMCJSON.H:274
virtual bool isPhotonSpecies(const std::string &a_name) const noexcept
Return true if species is a photon species.
Definition: CD_ItoKMCJSON.cpp:197
virtual Real computeAlpha(const Real a_E, const RealVect a_pos) const noexcept override
Compute Townsend ionization coefficient.
Definition: CD_ItoKMCJSON.cpp:2924
virtual void initializeTemperatures()
Initialize the plasma species temperatures.
Definition: CD_ItoKMCJSON.cpp:1437
std::function< Real(const Real E, const Real V, const RealVect x)> FunctionEVX
Function for encapsulating a function f = f(E, V, x) where E is the electric field at physical coordi...
Definition: CD_ItoKMCJSON.H:76
std::vector< std::pair< bool, std::string > > m_kmcReactionGradientCorrections
Whether or not a reaction uses a gradient correction for the rate (Soloviev et. al....
Definition: CD_ItoKMCJSON.H:378
std::vector< FunctionEX > m_diffusionCoefficients
Diffusion coefficients for the various species.
Definition: CD_ItoKMCJSON.H:337
std::map< std::string, SpeciesType > m_plasmaSpeciesTypes
Map for identifying a species name with a solver type.
Definition: CD_ItoKMCJSON.H:307
std::map< int, std::pair< bool, int > > m_plasmaReactionSolovievCorrection
Map of reactions that will be plotted.
Definition: CD_ItoKMCJSON.H:388
std::vector< std::pair< bool, std::string > > m_kmcReactionRatePlots
Map of reactions that will be plotted.
Definition: CD_ItoKMCJSON.H:383
std::vector< FunctionEX > m_mobilityFunctions
Mobilities for the various species.
Definition: CD_ItoKMCJSON.H:332
std::vector< FunctionEX > m_plasmaTemperatures
Plasma species temperatures.
Definition: CD_ItoKMCJSON.H:342
std::vector< std::list< size_t > > m_plasmaReactionPlasmaReactants
List of plasma species on the left-hand side of a reaction.
Definition: CD_ItoKMCJSON.H:363
virtual bool isBracketed(const std::string a_str) const noexcept
Check if a string contains starts with '(' and ends with ')'.
Definition: CD_ItoKMCJSON.cpp:231
std::vector< ItoKMCBackgroundSpecies > m_backgroundSpecies
Map of background species.
Definition: CD_ItoKMCJSON.H:296
std::map< std::string, int > m_itoSpeciesMap
Map for indexing from an ID to an Ito solver index.
Definition: CD_ItoKMCJSON.H:312
std::pair< bool, std::string > m_autoEta
Flag if the user wants to compute the alpha coefficient from the reactions.
Definition: CD_ItoKMCJSON.H:398
virtual void parseJSON()
Parse the JSON file.
Definition: CD_ItoKMCJSON.cpp:268
bool m_verbose
Verbose or not.
Definition: CD_ItoKMCJSON.H:229
virtual int getNumberOfPlotVariables() const noexcept override
Get number of plot variables.
Definition: CD_ItoKMCJSON.cpp:3165
virtual std::string trim(const std::string &a_string) const noexcept
Trim a string. This removes whitespace before/after.
Definition: CD_ItoKMCJSON.cpp:102
virtual void printFluidRates() const noexcept
Print the fluid-representation of the reaction rates.
Definition: CD_ItoKMCJSON.cpp:832
virtual void parseRuntimeOptions() noexcept override
Parse run-time options.
Definition: CD_ItoKMCJSON.cpp:91
virtual void parseVerbose() noexcept
Parse chattiness.
Definition: CD_ItoKMCJSON.cpp:255
virtual void initializeParticles()
Parse initial particles.
Definition: CD_ItoKMCJSON.cpp:990
bool m_plotAlpha
Plot Townsend ionization coefficient.
Definition: CD_ItoKMCJSON.H:239
std::map< std::string, int > m_plasmaIndexMap
Map for indexing a plasma species name to a global index in the solver vectors.
Definition: CD_ItoKMCJSON.H:322
virtual void parseReactionString(std::vector< std::string > &a_reactants, std::vector< std::string > &a_products, const std::string &a_reaction) const noexcept
Parses a reaction string into reactangs and products.
Definition: CD_ItoKMCJSON.cpp:2209
Base class for interaction between Kinetic Monte Carlo and Ito-based plasma solvers.
Definition: CD_ItoKMCPhysics.H:77
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15