chombo-discharge
CD_CdrPlasmaJSON.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Copyright © 2022 NTNU.
4  * Copyright © 2022 Fanny Skirbekk.
5  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
6  */
7 
15 #ifndef CD_CdrPlasmaJSON_H
16 #define CD_CdrPlasmaJSON_H
17 
18 // Std includes
19 #include <map>
20 #include <memory>
21 #include <string>
22 
23 // Third-party includes
24 #include <nlohmann/json.hpp>
25 
26 // Our includes
27 #include <CD_CdrPlasmaPhysics.H>
28 #include <CD_NeutralSpeciesJSON.H>
29 #include <CD_CdrSpeciesJSON.H>
30 #include <CD_RteSpeciesJSON.H>
34 #include <CD_LookupTable.H>
35 #include <CD_NamespaceHeader.H>
36 
37 using json = nlohmann::json;
38 
39 namespace Physics {
40  namespace CdrPlasma {
41 
46  {
47  public:
53  using InitialDataFunction = std::function<Real(const RealVect a_position, const Real a_time)>;
54 
63  using FunctionEN = std::function<Real(const Real a_E, const Real a_N)>;
64 
70  using FunctionX = std::function<Real(const RealVect a_position)>;
71 
77  using FunctionEX = std::function<Real(const Real E, const RealVect x)>;
78 
83  using FunctionT = std::function<Real(const Real a_T)>;
84 
90  using FunctionTT = std::function<Real(const Real a_T1, const Real a_T2)>;
91 
95  CdrPlasmaJSON();
96 
103  CdrPlasmaJSON(const int a_dummy);
104 
108  virtual ~CdrPlasmaJSON();
109 
113  virtual void
114  parseRuntimeOptions() override;
115 
121  virtual int
122  getNumberOfPlotVariables() const override;
123 
127  virtual Vector<std::string>
128  getPlotVariableNames() const override;
129 
143  virtual Vector<Real>
144  getPlotVariables(const Vector<Real> a_cdrDensities,
145  const Vector<RealVect> a_cdrGradients,
146  const Vector<Real> a_rteDensities,
147  const RealVect a_E,
148  const RealVect a_position,
149  const Real a_dx,
150  const Real a_dt,
151  const Real a_time,
152  const Real a_kappa) const override;
153 
159  virtual Real
160  computeAlpha(const Real E, const RealVect a_position) const override;
161 
168  virtual Real
169  computeEta(const Real a_E, const RealVect a_position) const override;
170 
187  virtual void
188  advanceReactionNetwork(Vector<Real>& a_cdrSources,
189  Vector<Real>& a_rteSources,
190  const Vector<Real> a_cdrDensities,
191  const Vector<RealVect> a_cdrGradients,
192  const Vector<Real> a_rteDensities,
193  const RealVect a_E,
194  const RealVect a_pos,
195  const Real a_dx,
196  const Real a_dt,
197  const Real a_time,
198  const Real a_kappa) const override;
199 
208  virtual Vector<RealVect>
209  computeCdrDriftVelocities(const Real a_time,
210  const RealVect a_pos,
211  const RealVect a_E,
212  const Vector<Real> a_cdrDensities) const override;
213 
222  virtual Vector<Real>
223  computeCdrDiffusionCoefficients(const Real a_time,
224  const RealVect a_pos,
225  const RealVect a_E,
226  const Vector<Real> a_cdrDensities) const override;
227 
241  virtual Vector<Real>
242  computeCdrElectrodeFluxes(const Real a_time,
243  const RealVect a_pos,
244  const RealVect a_normal,
245  const RealVect a_E,
246  const Vector<Real> a_cdrDensities,
247  const Vector<Real> a_cdrVelocities,
248  const Vector<Real> a_cdrGradients,
249  const Vector<Real> a_rteFluxes,
250  const Vector<Real> a_extrapCdrFluxes) const override;
251 
265  virtual Vector<Real>
266  computeCdrDielectricFluxes(const Real a_time,
267  const RealVect a_pos,
268  const RealVect a_normal,
269  const RealVect a_E,
270  const Vector<Real> a_cdrDensities,
271  const Vector<Real> a_cdrVelocities,
272  const Vector<Real> a_cdrGradients,
273  const Vector<Real> a_rteFluxes,
274  const Vector<Real> a_extrapCdrFluxes) const override;
275 
289  virtual Vector<Real>
290  computeCdrDomainFluxes(const Real a_time,
291  const RealVect a_pos,
292  const int a_dir,
293  const Side::LoHiSide a_side,
294  const RealVect a_E,
295  const Vector<Real> a_cdrDensities,
296  const Vector<Real> a_cdrVelocities,
297  const Vector<Real> a_cdrGradients,
298  const Vector<Real> a_rteFluxes,
299  const Vector<Real> a_extrapCdrFluxes) const override;
300 
306  virtual Real
307  initialSigma(const Real a_time, const RealVect a_pos) const override;
308 
309  protected:
313  enum class LookupMethod
314  {
315  Constant,
316  FunctionX,
317  FunctionT,
318  FunctionTT,
319  FunctionEN,
320  FunctionEX,
321  TableEN,
322  TableEnergy,
323  AlphaV,
324  EtaV
325  };
326 
331  {
332  None,
333  ExplicitEuler,
334  ExplicitTrapezoidal,
335  ExplicitMidpoint,
336  ExplicitRK4
337  };
338 
345  {
346  AddMean,
347  SubtractMean,
348  AddDirect,
349  SubtractDirect,
350  External
351  };
352 
356  bool m_verbose;
357 
361  bool m_plotGas;
362 
367 
371  bool m_plotEta;
372 
377 
382 
386  json m_json;
387 
392 
396  std::string m_jsonFile;
397 
401  std::vector<json> m_cdrSpeciesJSON;
402 
406  std::vector<json> m_rteSpeciesJSON;
407 
411  std::function<Real(const RealVect a_position, const Real a_time)> m_initialSigma;
412 
417 
422 
427 
432 
436  std::vector<FunctionX> m_neutralSpeciesDensities;
437 
441  std::vector<std::shared_ptr<NeutralSpeciesJSON>> m_neutralSpecies;
442 
446  std::map<std::string, int> m_neutralSpeciesMap;
447 
451  std::map<int, std::string> m_neutralSpeciesInverseMap;
452 
457  std::map<std::string, int> m_cdrSpeciesMap;
458 
464  std::map<int, std::string> m_cdrSpeciesInverseMap;
465 
469  std::map<int, bool> m_cdrIsEnergySolver;
470 
474  std::map<int, bool> m_cdrHasEnergySolver;
475 
480  std::map<int, std::tuple<Real, Real, Real>> m_cdrEnergyComputation;
481 
487  std::map<int, int> m_cdrTransportEnergyMap;
488 
493  std::map<int, Real> m_cdrMasses;
494 
499  std::map<std::string, int> m_rteSpeciesMap;
500 
506  std::map<int, std::string> m_rteSpeciesInverseMap;
507 
508  // =====================================================
509  // TOWNSEND IONIZATION COEFFICIENT QUANTITIES BEGIN HERE
510  // =====================================================
511 
516 
521 
526 
531 
536 
541 
546 
551 
552  // ================================
553  // MOBILITY QUANTITIES BEGIN HERE
554  // ================================
555 
559  std::map<int, LookupMethod> m_mobilityLookup;
560 
564  std::map<int, Real> m_mobilityConstants;
565 
569  std::map<int, FunctionEN> m_mobilityFunctionsEN;
570 
574  std::map<int, FunctionEX> m_mobilityFunctionsEX;
575 
579  std::map<int, LookupTable1D<Real, 1>> m_mobilityTablesEN;
580 
585  std::map<int, LookupTable1D<Real, 1>> m_mobilityTablesEnergy;
586 
587  // ================================
588  // DIFFUSION QUANTITIES BEGIN HERE
589  // ================================
590 
594  std::map<int, LookupMethod> m_diffusionLookup;
595 
599  std::map<int, Real> m_diffusionConstants;
600 
604  std::map<int, FunctionEN> m_diffusionFunctionsEN;
605 
610  std::map<int, LookupTable1D<Real, 1>> m_diffusionTablesEN;
611 
616  std::map<int, LookupTable1D<Real, 1>> m_diffusionTablesEnergy;
617 
618  // ===========================================
619  // PLASMA SPECIES TEMPERATURE DATA BEGINS HERE
620  // ===========================================
621 
625  std::map<int, LookupMethod> m_temperatureLookup;
626 
630  std::map<int, FunctionX> m_temperatureConstants;
631 
635  std::map<int, LookupTable1D<Real, 1>> m_temperatureTablesEN;
636 
637  // ================================
638  // REACTION DATA BEGINS HERE
639  // ================================
640 
644  std::map<int, std::string> m_plasmaReactionDescriptions;
645 
649  std::map<int, LookupMethod> m_plasmaReactionLookup;
650 
654  std::map<int, Real> m_plasmaReactionConstants;
655 
659  std::map<int, int> m_plasmaReactionAlphaV;
660 
664  std::map<int, int> m_plasmaReactionEtaV;
670  std::map<int, std::pair<int, FunctionT>> m_plasmaReactionFunctionsT;
671 
681  std::map<int, std::tuple<int, int, FunctionTT>> m_plasmaReactionFunctionsTT;
682 
686  std::map<int, FunctionEN> m_plasmaReactionFunctionsEN;
687 
691  std::map<int, LookupTable1D<Real, 1>> m_plasmaReactionTablesEN;
692 
697  std::map<int, std::pair<int, LookupTable1D<Real, 1>>> m_plasmaReactionTablesEnergy;
698 
702  std::map<int, FunctionEX> m_plasmaReactionEfficiencies;
703 
707  std::vector<CdrPlasmaReactionJSON> m_plasmaReactions;
708 
712  std::map<int, bool> m_plasmaReactionPlot;
713 
718  std::map<int, std::pair<bool, int>> m_plasmaReactionSolovievCorrection;
719 
726  std::map<int, std::map<int, std::pair<ReactiveEnergyLoss, Real>>> m_plasmaReactionEnergyLosses;
727 
731  std::map<int, bool> m_plasmaReactionHasEnergyLoss;
732 
733  // ================================
734  // PHOTO-REACTIONS BEGIN HERE
735  // ================================
736 
740  std::map<int, FunctionEX> m_photoReactionEfficiencies;
741 
745  std::map<int, bool> m_photoReactionUseHelmholtz;
746 
750  std::vector<CdrPlasmaPhotoReactionJSON> m_photoReactions;
751 
757  std::map<int, std::list<std::pair<int, Real>>> m_photoReactionEnergyLosses;
758 
762  std::map<int, bool> m_photoReactionHasEnergyLoss;
763 
764  // ===========================================
765  // ELECTRODE SURFACE REACTIONS BEGIN HERE
766  // ===========================================
767 
771  std::map<int, LookupMethod> m_electrodeReactionLookup;
772 
776  std::map<int, Real> m_electrodeReactionConstants;
777 
781  std::map<int, FunctionEX> m_electrodeReactionEfficiencies;
782 
786  std::vector<CdrPlasmaSurfaceReactionJSON> m_electrodeReactions;
787 
793  std::map<int, std::list<std::pair<int, Real>>> m_electrodeReactionEnergyLosses;
794 
798  std::map<int, bool> m_electrodeReactionHasEnergyLoss;
799 
803  std::map<int, bool> m_electrodeExtrapBC;
804 
805  // ===========================================
806  // DIELECTRIC SURFACE REACTIONS BEGIN HERE
807  // ===========================================
808 
812  std::map<int, LookupMethod> m_dielectricReactionLookup;
813 
817  std::map<int, Real> m_dielectricReactionConstants;
818 
822  std::map<int, FunctionEX> m_dielectricReactionEfficiencies;
823 
827  std::vector<CdrPlasmaSurfaceReactionJSON> m_dielectricReactions;
828 
834  std::map<int, std::list<std::pair<int, Real>>> m_dielectricReactionEnergyLosses;
835 
840 
844  std::map<int, bool> m_dielectricExtrapBC;
845 
846  // ===========================================
847  // DOMAIN SURFACE REACTIONS BEGIN HERE
848  // ===========================================
849 
854  std::map<std::pair<int, Side::LoHiSide>, std::map<int, LookupMethod>> m_domainReactionLookup;
855 
860  std::map<std::pair<int, Side::LoHiSide>, std::map<int, Real>> m_domainReactionConstants;
861 
867  std::map<std::pair<int, Side::LoHiSide>, std::map<int, FunctionEX>> m_domainReactionEfficiencies;
868 
873  std::map<std::pair<int, Side::LoHiSide>, std::vector<CdrPlasmaSurfaceReactionJSON>> m_domainReactions;
874 
878  const std::map<char, int> m_dirCharToInt{{'x', 0}, {'y', 1}, {'z', 2}};
879 
883  const std::map<std::string, Side::LoHiSide> m_sideStringToSide{{"lo", Side::Lo}, {"hi", Side::Hi}};
884 
889  std::map<std::tuple<int, Side::LoHiSide, int>, bool> m_domainExtrapBC;
890 
891  // ===========================================
892  // VARIOUS MEMBER FUNCTIONS BEGIN HERE
893  // ===========================================
894 
898  virtual void
899  parseOptions();
900 
904  virtual void
905  parseIntegrator();
906 
910  virtual void
911  parseJSON();
912 
918  virtual void
919  initializeSigma();
920 
924  virtual void
926 
931  virtual void
933 
938  virtual void
940 
944  virtual void
945  parseMobilities();
946 
950  virtual void
951  parseDiffusion();
952 
956  virtual void
958 
962  virtual void
963  parseAlpha();
964 
968  virtual void
969  parseEta();
970 
974  virtual void
976 
981  virtual InitialDataFunction
982  parsePlasmaSpeciesInitialData(const json& a_json) const;
983 
988  virtual List<PointParticle>
989  parsePlasmaSpeciesInitialParticles(const json& a_json) const;
990 
998  virtual std::list<std::tuple<std::string, std::vector<std::string>, std::vector<std::string>>>
999  parseReactionWildcards(const std::vector<std::string>& a_reactants,
1000  const std::vector<std::string>& a_products,
1001  const json& a_reaction);
1008  virtual void
1009  parseReactionString(std::vector<std::string>& a_reactants,
1010  std::vector<std::string>& a_products,
1011  const std::string& a_reaction) const;
1012 
1020  virtual void
1021  sanctifyPlasmaReaction(const std::vector<std::string>& a_reactants,
1022  const std::vector<std::string>& a_products,
1023  const std::string a_reaction) const;
1024 
1036  virtual void
1037  getReactionSpecies(std::list<int>& a_plasmaReactants,
1038  std::list<int>& a_neutralReactants,
1039  std::list<int>& a_photonReactants,
1040  std::list<int>& a_plasmaProducts,
1041  std::list<int>& a_neutralProducts,
1042  std::list<int>& a_photonProducts,
1043  const std::vector<std::string>& a_reactants,
1044  const std::vector<std::string>& a_products) const;
1045 
1051  virtual void
1052  parsePlasmaReactionRate(const int a_reactionIndex, const json& a_reactionJSON);
1053 
1059  virtual void
1060  parsePlasmaReactionScaling(const int a_reactionIndex, const json& a_reactionJSON);
1061 
1067  virtual void
1068  parsePlasmaReactionPlot(const int a_reactionIndex, const json& a_reactionJSON);
1069 
1075  virtual void
1076  parsePlasmaReactionDescription(const int a_reactionIndex,
1077  const json& a_reactionJSON,
1078  const std::string a_wildcard);
1079 
1085  virtual void
1086  parsePlasmaReactionSoloviev(const int a_reactionIndex, const json& a_reactionJSON);
1087 
1093  virtual void
1094  parsePlasmaReactionEnergyLosses(const int a_reactionIndex, const json& a_reactionJSON);
1095 
1099  virtual void
1101 
1107  virtual void
1108  parsePhotoReactionScaling(const int a_reactionIndex, const json& a_reactionJSON);
1109 
1115  virtual void
1116  parsePhotoReactionEnergyLosses(const int a_reactionIndex, const json& a_reactionJSON);
1117 
1122  virtual void
1123  sanityCheckSpecies() const;
1124 
1132  virtual void
1133  sanctifyPhotoReaction(const std::vector<std::string>& a_reactants,
1134  const std::vector<std::string>& a_products,
1135  const std::string a_reaction) const;
1136 
1140  virtual void
1142 
1148  virtual void
1149  parseElectrodeReactionRate(const int a_reactionIndex, const json& a_reactionJSON);
1150 
1157  virtual void
1158  parseElectrodeReactionScaling(const int a_reactionIndex, const json& a_reactionJSON);
1159 
1165  virtual void
1166  parseElectrodeReactionEnergyLosses(const int a_reactionIndex, const json& a_reactionJSON);
1167 
1171  virtual void
1173 
1179  virtual void
1180  parseDielectricReactionRate(const int a_reactionIndex, const json& a_reactionJSON);
1181 
1188  virtual void
1189  parseDielectricReactionScaling(const int a_reactionIndex, const json& a_reactionJSON);
1190 
1196  virtual void
1197  parseDielectricReactionEnergyLosses(const int a_reactionIndex, const json& a_reactionJSON);
1198 
1202  virtual void
1204 
1211  virtual void
1212  parseDomainReactionRate(const int a_reactionIndex,
1213  const json& a_reactionJSON,
1214  const std::vector<std::string>& a_sides);
1215 
1223  virtual void
1224  parseDomainReactionScaling(const int a_reactionIndex,
1225  const json& a_reactionJSON,
1226  const std::vector<std::string>& a_sides);
1227 
1234  virtual void
1235  sanctifySurfaceReaction(const std::vector<std::string>& a_reactants,
1236  const std::vector<std::string>& a_products,
1237  const std::string a_reaction) const;
1238 
1245  virtual std::vector<Real>
1246  computePlasmaSpeciesTemperatures(const RealVect& a_position,
1247  const RealVect& a_E,
1248  const std::vector<Real>& a_cdrDensities) const;
1249 
1259  virtual std::vector<Real>
1260  computePlasmaSpeciesEnergies(const RealVect& a_position,
1261  const RealVect& a_E,
1262  const std::vector<Real>& a_cdrDensities) const;
1263 
1270  virtual std::vector<Real>
1271  computePlasmaSpeciesMobilities(const RealVect& a_position,
1272  const RealVect& a_E,
1273  const std::vector<Real>& a_cdrDensities) const;
1274 
1282  virtual std::vector<Real>
1283  computePlasmaSpeciesDiffusion(const RealVect a_position,
1284  const RealVect a_E,
1285  const std::vector<Real> a_cdrDensities) const;
1286 
1307  virtual Real
1308  computePlasmaReactionRate(const int& a_reactionIndex,
1309  const std::vector<Real>& a_cdrDensities,
1310  const std::vector<Real>& a_cdrMobilities,
1311  const std::vector<Real>& a_cdrDiffusionCoefficients,
1312  const std::vector<Real>& a_cdrTemperatures,
1313  const std::vector<Real>& a_cdrEnergies,
1314  const std::vector<RealVect>& a_cdrGradients,
1315  const RealVect& a_pos,
1316  const RealVect& a_vectorE,
1317  const Real& a_E,
1318  const Real& a_Etd,
1319  const Real& a_N,
1320  const Real& a_alpha,
1321  const Real& a_eta,
1322  const Real& a_time) const;
1323 
1328  void
1329  throwParserError(const std::string a_error) const;
1330 
1335  void
1336  throwParserWarning(const std::string a_warning) const;
1337 
1342  bool
1343  containsWildcard(const std::string a_str) const;
1344 
1349  bool
1350  containsBracket(const std::string a_str) const;
1351 
1357  bool
1358  isBracketed(const std::string a_str) const;
1359 
1363  std::string
1364  trim(const std::string& a_string) const;
1365 
1370  bool
1371  isNeutralSpecies(const std::string& a_name) const;
1372 
1377  bool
1378  isPlasmaSpecies(const std::string& a_name) const;
1379 
1384  bool
1385  isPhotonSpecies(const std::string& a_name) const;
1386 
1391  bool
1392  doesFileExist(const std::string a_filename) const;
1393 
1403  virtual void
1404  addPhotoIonization(std::vector<Real>& a_cdrSources,
1405  const std::vector<Real>& a_rteDensities,
1406  const RealVect a_position,
1407  const Real a_E,
1408  const Real a_dt,
1409  const Real a_dx) const;
1410 
1422  virtual void
1423  integrateReactions(std::vector<Real>& a_cdrDensities,
1424  std::vector<Real>& a_photonProduction,
1425  const std::vector<RealVect> a_cdrGradients,
1426  const RealVect a_E,
1427  const RealVect a_pos,
1428  const Real a_dx,
1429  const Real a_dt,
1430  const Real a_time,
1431  const Real a_kappa) const;
1432 
1445  void
1446  fillSourceTerms(std::vector<Real>& a_cdrSources,
1447  std::vector<Real>& a_rteSources,
1448  const std::vector<Real> a_cdrDensities,
1449  const std::vector<RealVect> a_cdrGradients,
1450  const RealVect a_E,
1451  const RealVect a_pos,
1452  const Real a_dx,
1453  const Real a_time,
1454  const Real a_kappa) const;
1455 
1468  void
1469  integrateReactionsExplicitEuler(std::vector<Real>& a_cdrDensities,
1470  std::vector<Real>& a_photonProduction,
1471  const std::vector<RealVect> a_cdrGradients,
1472  const RealVect a_E,
1473  const RealVect a_pos,
1474  const Real a_dx,
1475  const Real a_dt,
1476  const Real a_time,
1477  const Real a_kappa) const;
1478 
1491  void
1492  integrateReactionsImplicitEuler(std::vector<Real>& a_cdrDensities,
1493  std::vector<Real>& a_photonProduction,
1494  const std::vector<RealVect> a_cdrGradients,
1495  const RealVect a_E,
1496  const RealVect a_pos,
1497  const Real a_dx,
1498  const Real a_dt,
1499  const Real a_time,
1500  const Real a_kappa) const;
1501 
1516  void
1517  integrateReactionsExplicitRK2(std::vector<Real>& a_cdrDensities,
1518  std::vector<Real>& a_photonProduction,
1519  const std::vector<RealVect> a_cdrGradients,
1520  const RealVect a_E,
1521  const RealVect a_pos,
1522  const Real a_dx,
1523  const Real a_dt,
1524  const Real a_time,
1525  const Real a_kappa,
1526  const Real a_tableuAlpha) const;
1527 
1540  void
1541  integrateReactionsExplicitRK4(std::vector<Real>& a_cdrDensities,
1542  std::vector<Real>& a_photonProduction,
1543  const std::vector<RealVect> a_cdrGradients,
1544  const RealVect a_E,
1545  const RealVect a_pos,
1546  const Real a_dx,
1547  const Real a_dt,
1548  const Real a_time,
1549  const Real a_kappa) const;
1550  };
1551  } // namespace CdrPlasma
1552 } // namespace Physics
1553 
1554 #include <CD_NamespaceFooter.H>
1555 
1556 #endif
Declaration of a class that encapsulates reactions for usage with CdrPlasmaJSON.
Declaration of basic physics coupling functions for Physics/CdrPlasma.
Declaration of a class that encapsulates reactions for usage with CdrPlasmaJSON.
Declaration of a class that encapsulates reactions for usage with CdrPlasmaJSON.
Declaration of a class that encapsulates a CDR species for use with CdrPlasmaJSON.
Declaration of a table for looking up coefficients etc.
Declaration of a class that encapsulates a neutral species for use with CdrPlasmaJSON.
Declaration of a class that encapsulates a RTE species for use with CdrPlasmaJSON.
Class which implements CdrPlasmaPhysics and parses plasma chemistry from a JSON input file.
Definition: CD_CdrPlasmaJSON.H:46
void integrateReactionsExplicitRK4(std::vector< Real > &a_cdrDensities, std::vector< Real > &a_photonProduction, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const
Routine for integrating the reactive-only problem using the foruth order Runge-Kutta method.
Definition: CD_CdrPlasmaJSON.cpp:5766
std::map< std::tuple< int, Side::LoHiSide, int >, bool > m_domainExtrapBC
A container which determines if we should add the extrapolated flux as an inflow condition.
Definition: CD_CdrPlasmaJSON.H:889
virtual void sanctifyPhotoReaction(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const std::string a_reaction) const
Check if a photo-reaction makes sense in terms of the species that have been defined.
Definition: CD_CdrPlasmaJSON.cpp:2477
std::map< int, FunctionEX > m_dielectricReactionEfficiencies
Dielectric reaction effiencies. Used for scaling reactions on dielectrics in a "generic" way.
Definition: CD_CdrPlasmaJSON.H:822
std::map< int, std::map< int, std::pair< ReactiveEnergyLoss, Real > > > m_plasmaReactionEnergyLosses
For mapping reactive energy losses for all reactions.
Definition: CD_CdrPlasmaJSON.H:726
std::map< int, LookupMethod > m_diffusionLookup
Diffusion lookup method.
Definition: CD_CdrPlasmaJSON.H:594
virtual void initializeSigma()
Initialize surface charge.
Definition: CD_CdrPlasmaJSON.cpp:1236
virtual void parseDielectricReactionEnergyLosses(const int a_reactionIndex, const json &a_reactionJSON)
Parse dielectric-reaction energy losses.
Definition: CD_CdrPlasmaJSON.cpp:4108
virtual void parseIntegrator()
Parse the reactive integrator.
Definition: CD_CdrPlasmaJSON.cpp:107
std::map< int, LookupTable1D< Real, 1 > > m_mobilityTablesEN
Map for table-based mobilities. Stored as tables (E/N, mu*N)
Definition: CD_CdrPlasmaJSON.H:579
virtual void parseElectrodeReactionRate(const int a_reactionIndex, const json &a_reactionJSON)
Parse reaction rate for electrode surface reactions.
Definition: CD_CdrPlasmaJSON.cpp:3556
virtual void parseJSON()
Parse the JSON file.
Definition: CD_CdrPlasmaJSON.cpp:143
virtual void parsePlasmaReactionRate(const int a_reactionIndex, const json &a_reactionJSON)
Parse reaction rate for plasma reaction.
Definition: CD_CdrPlasmaJSON.cpp:2588
std::map< int, Real > m_plasmaReactionConstants
Constant plasma reaction rates.
Definition: CD_CdrPlasmaJSON.H:654
ReactionIntegrator m_reactionIntegrator
Reaction integrator.
Definition: CD_CdrPlasmaJSON.H:391
virtual std::vector< Real > computePlasmaSpeciesTemperatures(const RealVect &a_position, const RealVect &a_E, const std::vector< Real > &a_cdrDensities) const
Compute the various plasma species temperatures.
Definition: CD_CdrPlasmaJSON.cpp:4510
std::map< int, bool > m_electrodeReactionHasEnergyLoss
Associative container for determining if a reaction is associated with an energy loss/gain.
Definition: CD_CdrPlasmaJSON.H:798
std::map< int, FunctionEN > m_plasmaReactionFunctionsEN
Function-based plasma reaction rates.
Definition: CD_CdrPlasmaJSON.H:686
virtual void addPhotoIonization(std::vector< Real > &a_cdrSources, const std::vector< Real > &a_rteDensities, const RealVect a_position, const Real a_E, const Real a_dt, const Real a_dx) const
Add photoionization products to transport equations source terms.
Definition: CD_CdrPlasmaJSON.cpp:5407
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_CdrPlasmaJSON.H:77
std::map< std::pair< int, Side::LoHiSide >, std::map< int, LookupMethod > > m_domainReactionLookup
Lookup method for the domain reaction rates. The pair is made up of an int representing direction (0=...
Definition: CD_CdrPlasmaJSON.H:854
std::map< int, LookupMethod > m_temperatureLookup
Temperature lookup method.
Definition: CD_CdrPlasmaJSON.H:625
std::map< int, std::string > m_plasmaReactionDescriptions
Description of plasma reactions. Only used for I/O.
Definition: CD_CdrPlasmaJSON.H:644
virtual std::vector< Real > computePlasmaSpeciesDiffusion(const RealVect a_position, const RealVect a_E, const std::vector< Real > a_cdrDensities) const
Compute the various plasma species diffusion coefficients.
Definition: CD_CdrPlasmaJSON.cpp:4432
std::function< Real(const RealVect a_position, const Real a_time)> InitialDataFunction
Function alias for initial data function.
Definition: CD_CdrPlasmaJSON.H:53
std::map< int, int > m_plasmaReactionAlphaV
Plasma reaction rates that are alpha*|v|.
Definition: CD_CdrPlasmaJSON.H:659
std::map< int, LookupMethod > m_mobilityLookup
Mobility lookup method for each species.
Definition: CD_CdrPlasmaJSON.H:559
std::vector< CdrPlasmaReactionJSON > m_plasmaReactions
Plasma reactions.
Definition: CD_CdrPlasmaJSON.H:707
std::map< std::string, int > m_cdrSpeciesMap
string-int encoding of the CDr species.
Definition: CD_CdrPlasmaJSON.H:457
std::map< std::string, int > m_neutralSpeciesMap
Map for figuring out which where in m_neutralSpecies a neutral species is found.
Definition: CD_CdrPlasmaJSON.H:446
std::map< int, LookupTable1D< Real, 1 > > m_diffusionTablesEN
Map for table-based diffusion coefficients D = D(E,N).
Definition: CD_CdrPlasmaJSON.H:610
virtual List< PointParticle > parsePlasmaSpeciesInitialParticles(const json &a_json) const
Generate initial particles for a given plasma species.
Definition: CD_CdrPlasmaJSON.cpp:970
json m_json
JSON definition. This is populated when calling parseJSON.
Definition: CD_CdrPlasmaJSON.H:386
FunctionX m_gasDensity
Gas number density (in m^(-3))
Definition: CD_CdrPlasmaJSON.H:426
std::map< int, Real > m_electrodeReactionConstants
Constant electrode reaction rate.
Definition: CD_CdrPlasmaJSON.H:776
void throwParserError(const std::string a_error) const
Throw a parser error.
Definition: CD_CdrPlasmaJSON.cpp:159
std::vector< std::shared_ptr< NeutralSpeciesJSON > > m_neutralSpecies
These are the neutral species.
Definition: CD_CdrPlasmaJSON.H:441
bool isPlasmaSpecies(const std::string &a_name) const
Return true if species exists in map and false otherwise.
Definition: CD_CdrPlasmaJSON.cpp:4310
std::function< Real(const RealVect a_position)> FunctionX
Function for encapsulating a function f = f(x) where x is the physical coordinates.
Definition: CD_CdrPlasmaJSON.H:70
std::map< int, int > m_cdrTransportEnergyMap
int-int encoding for associating a transport solver with an energy solver.
Definition: CD_CdrPlasmaJSON.H:487
std::map< int, std::string > m_cdrSpeciesInverseMap
int-string encoding of the CDR species.
Definition: CD_CdrPlasmaJSON.H:464
virtual void parseElectrodeReactionScaling(const int a_reactionIndex, const json &a_reactionJSON)
Parse electrode reaction scaling for a specific reaction.
Definition: CD_CdrPlasmaJSON.cpp:3596
std::map< std::pair< int, Side::LoHiSide >, std::vector< CdrPlasmaSurfaceReactionJSON > > m_domainReactions
List of domain reactions. The pair is made up of an int representing direction (0=x,...
Definition: CD_CdrPlasmaJSON.H:873
virtual void parsePlasmaReactionPlot(const int a_reactionIndex, const json &a_reactionJSON)
Parse reaction plotting.
Definition: CD_CdrPlasmaJSON.cpp:3049
virtual std::list< 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 json &a_reaction)
Make a reaction set into a superset. This parses wildcards '@' in reaction string.
Definition: CD_CdrPlasmaJSON.cpp:2367
std::vector< json > m_cdrSpeciesJSON
JSON entries for species in the defined field 'plasma species'.
Definition: CD_CdrPlasmaJSON.H:401
virtual void sanctifySurfaceReaction(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const std::string a_reaction) const
Check if a surface-reaction makes sense in terms of the species that have been defined.
Definition: CD_CdrPlasmaJSON.cpp:2541
virtual void parseDomainReactionRate(const int a_reactionIndex, const json &a_reactionJSON, const std::vector< std::string > &a_sides)
Parse reaction rate for domain reactions.
Definition: CD_CdrPlasmaJSON.cpp:4002
std::map< int, std::list< std::pair< int, Real > > > m_electrodeReactionEnergyLosses
Associated energy losses for a surface reaction on electrodes.
Definition: CD_CdrPlasmaJSON.H:793
std::map< int, std::string > m_rteSpeciesInverseMap
int-string encoding of the RTE species.
Definition: CD_CdrPlasmaJSON.H:506
virtual void parseDielectricReactionScaling(const int a_reactionIndex, const json &a_reactionJSON)
Parse dielectric electrode reaction scaling for a specific reaction.
Definition: CD_CdrPlasmaJSON.cpp:3828
void fillSourceTerms(std::vector< Real > &a_cdrSources, std::vector< Real > &a_rteSources, const std::vector< Real > a_cdrDensities, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_time, const Real a_kappa) const
Routine for filling the source terms in the reactive problem.
Definition: CD_CdrPlasmaJSON.cpp:5540
std::map< int, std::list< std::pair< int, Real > > > m_photoReactionEnergyLosses
Associated energy losses for a photo-reaction.
Definition: CD_CdrPlasmaJSON.H:757
void throwParserWarning(const std::string a_warning) const
Throw a parser wearning.
Definition: CD_CdrPlasmaJSON.cpp:167
bool m_plotEta
Plot Townsend attachment coefficient.
Definition: CD_CdrPlasmaJSON.H:371
virtual void sanityCheckSpecies() const
Do a species sanity check.
Definition: CD_CdrPlasmaJSON.cpp:205
virtual Vector< Real > computeCdrDielectricFluxes(const Real a_time, const RealVect a_pos, const RealVect a_normal, const RealVect a_E, const Vector< Real > a_cdrDensities, const Vector< Real > a_cdrVelocities, const Vector< Real > a_cdrGradients, const Vector< Real > a_rteFluxes, const Vector< Real > a_extrapCdrFluxes) const override
Compute CDR fluxes on dielectric-gas interfaces. This is used as a boundary condition in the CDR equa...
Definition: CD_CdrPlasmaJSON.cpp:5143
FunctionX m_gasPressure
Gas pressure (in Pascal).
Definition: CD_CdrPlasmaJSON.H:416
std::vector< json > m_rteSpeciesJSON
JSON entries for species in photon_species.
Definition: CD_CdrPlasmaJSON.H:406
std::map< int, bool > m_electrodeExtrapBC
A container which determines if we should add the extrapolated flux as an inflow condition.
Definition: CD_CdrPlasmaJSON.H:803
FunctionX m_gasTemperature
Gas temperature (in Kelvin)
Definition: CD_CdrPlasmaJSON.H:421
virtual void parseReactionString(std::vector< std::string > &a_reactants, std::vector< std::string > &a_products, const std::string &a_reaction) const
Parses a reaction string into reactangs and products.
Definition: CD_CdrPlasmaJSON.cpp:257
std::map< int, std::tuple< int, int, FunctionTT > > m_plasmaReactionFunctionsTT
Maps for functions of the type k = f(T1,T2) where T1 and T2 are the temperatures of some species.
Definition: CD_CdrPlasmaJSON.H:681
virtual void parseDomainReactions()
Parse secondary emission on domain.
Definition: CD_CdrPlasmaJSON.cpp:3851
virtual void parsePhotoReactionEnergyLosses(const int a_reactionIndex, const json &a_reactionJSON)
Parse photo-reaction energy losses.
Definition: CD_CdrPlasmaJSON.cpp:3387
virtual void parseTemperatures()
Initialize species temperatures.
Definition: CD_CdrPlasmaJSON.cpp:2150
FunctionEN m_alphaFunctionEN
For when we can put alpha = alpha(E,N) as an analytic function.
Definition: CD_CdrPlasmaJSON.H:535
bool isBracketed(const std::string a_str) const
Return true if string starts and ends with a paranthesis.
Definition: CD_CdrPlasmaJSON.cpp:199
std::map< int, Real > m_diffusionConstants
Map for constant diffusion coefficients.
Definition: CD_CdrPlasmaJSON.H:599
LookupMethod
Enum class for distinguishing types of computation methods when computing transport data stuff.
Definition: CD_CdrPlasmaJSON.H:314
void integrateReactionsExplicitEuler(std::vector< Real > &a_cdrDensities, std::vector< Real > &a_photonProduction, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const
Routine for integrating the reactive-only problem using the explicit Euler rule.
Definition: CD_CdrPlasmaJSON.cpp:5691
std::map< int, int > m_plasmaReactionEtaV
Plasma reaction rates that are eta*|v|.
Definition: CD_CdrPlasmaJSON.H:664
std::string trim(const std::string &a_string) const
Remove whitespace from string.
Definition: CD_CdrPlasmaJSON.cpp:239
std::map< int, Real > m_cdrMasses
Map of the species masses. This is needed for imposing BCs on the energy equations.
Definition: CD_CdrPlasmaJSON.H:493
std::vector< CdrPlasmaSurfaceReactionJSON > m_dielectricReactions
List of dielectric reactions.
Definition: CD_CdrPlasmaJSON.H:827
bool isPhotonSpecies(const std::string &a_name) const
Return true if species exists in map and false otherwise.
Definition: CD_CdrPlasmaJSON.cpp:4325
std::map< int, std::string > m_neutralSpeciesInverseMap
Inverse of m_neutralSpeciesMap.
Definition: CD_CdrPlasmaJSON.H:451
virtual void parsePhotoReactionScaling(const int a_reactionIndex, const json &a_reactionJSON)
Parse scaling for photo-reactions. Includes Helmholtz corrections if doing Helmholtz reconstruction o...
Definition: CD_CdrPlasmaJSON.cpp:3303
std::map< int, bool > m_dielectricExtrapBC
A container which determines if we should add the extrapolated flux as an inflow condition.
Definition: CD_CdrPlasmaJSON.H:844
bool m_skipReactions
A flag for skipping reactions completely.
Definition: CD_CdrPlasmaJSON.H:381
std::map< int, bool > m_photoReactionHasEnergyLoss
Associative container for determining if a reaction is associated with an energy loss/gain.
Definition: CD_CdrPlasmaJSON.H:762
virtual void parseDielectricReactions()
Parse secondary emission on dielectrics.
Definition: CD_CdrPlasmaJSON.cpp:3678
std::map< int, FunctionEX > m_mobilityFunctionsEX
Map for function-based mobilities mu = mu(E,x)
Definition: CD_CdrPlasmaJSON.H:574
virtual Vector< Real > getPlotVariables(const Vector< Real > a_cdrDensities, const Vector< RealVect > a_cdrGradients, const Vector< Real > a_rteDensities, const RealVect a_E, const RealVect a_position, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const override
Provide plot variables. This is used by CdrPlasmaStepper when writing plot files.
Definition: CD_CdrPlasmaJSON.cpp:4206
std::map< int, bool > m_plasmaReactionHasEnergyLoss
Associative container for determining if a reaction is associated with an energy loss/gain.
Definition: CD_CdrPlasmaJSON.H:731
virtual void parsePlasmaReactionEnergyLosses(const int a_reactionIndex, const json &a_reactionJSON)
Parse plasma reaction energy losses.
Definition: CD_CdrPlasmaJSON.cpp:3143
virtual Vector< Real > computeCdrElectrodeFluxes(const Real a_time, const RealVect a_pos, const RealVect a_normal, const RealVect a_E, const Vector< Real > a_cdrDensities, const Vector< Real > a_cdrVelocities, const Vector< Real > a_cdrGradients, const Vector< Real > a_rteFluxes, const Vector< Real > a_extrapCdrFluxes) const override
Compute CDR fluxes on electrode-gas interfaces. This is used as a boundary condition in the CDR equat...
Definition: CD_CdrPlasmaJSON.cpp:5000
virtual void parseEta()
Parse the Townsend attachment coefficient.
Definition: CD_CdrPlasmaJSON.cpp:1393
virtual void parseOptions()
Parse class options.
Definition: CD_CdrPlasmaJSON.cpp:84
Real m_chemistryDt
Chemistry time step.
Definition: CD_CdrPlasmaJSON.H:431
std::function< Real(const RealVect a_position, const Real a_time)> m_initialSigma
Initial surface charge.
Definition: CD_CdrPlasmaJSON.H:411
FunctionEN m_etaFunctionEN
For when we can put eta = eta(E,N) as an analytic function.
Definition: CD_CdrPlasmaJSON.H:540
virtual Real computeAlpha(const Real E, const RealVect a_position) const override
Compute alpha. Should return Townsend ionization coefficient.
Definition: CD_CdrPlasmaJSON.cpp:4782
LookupTable1D< Real, 1 > m_alphaTableEN
For when we can put alpha = table(E,N)
Definition: CD_CdrPlasmaJSON.H:545
virtual Vector< Real > computeCdrDiffusionCoefficients(const Real a_time, const RealVect a_pos, const RealVect a_E, const Vector< Real > a_cdrDensities) const override
Compute diffusion coefficients for the CDR equations.
Definition: CD_CdrPlasmaJSON.cpp:4981
virtual void initializeNeutralSpecies()
Initialize neutral species.
Definition: CD_CdrPlasmaJSON.cpp:364
std::map< std::pair< int, Side::LoHiSide >, std::map< int, Real > > m_domainReactionConstants
Constant domain reaction rate. The pair is made up of an int representing direction (0=x,...
Definition: CD_CdrPlasmaJSON.H:860
virtual Vector< RealVect > computeCdrDriftVelocities(const Real a_time, const RealVect a_pos, const RealVect a_E, const Vector< Real > a_cdrDensities) const override
Compute velocities for the CDR equations.
Definition: CD_CdrPlasmaJSON.cpp:4934
std::map< int, FunctionEN > m_mobilityFunctionsEN
Map for function-based mobilities mu = mu(E,N)
Definition: CD_CdrPlasmaJSON.H:569
Real m_alphaConstant
For when we can use alpha = constant.
Definition: CD_CdrPlasmaJSON.H:525
LookupTable1D< Real, 1 > m_etaTableEN
For when we can put eta = table(E,N)
Definition: CD_CdrPlasmaJSON.H:550
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_CdrPlasmaJSON.H:63
bool m_discretePhotons
Using discrete photons or not.
Definition: CD_CdrPlasmaJSON.H:376
virtual void advanceReactionNetwork(Vector< Real > &a_cdrSources, Vector< Real > &a_rteSources, const Vector< Real > a_cdrDensities, const Vector< RealVect > a_cdrGradients, const Vector< Real > a_rteDensities, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const override
Routine intended for advancing a reaction network over a time a_dt.
Definition: CD_CdrPlasmaJSON.cpp:4847
std::map< int, std::pair< int, LookupTable1D< Real, 1 > > > m_plasmaReactionTablesEnergy
Map for table-based reaction coefficients where k = k(energy).
Definition: CD_CdrPlasmaJSON.H:697
std::vector< FunctionX > m_neutralSpeciesDensities
Neutral species densities.
Definition: CD_CdrPlasmaJSON.H:436
virtual int getNumberOfPlotVariables() const override
Get number of plot variables for this physics class.
Definition: CD_CdrPlasmaJSON.cpp:4083
virtual void parsePhotoReactions()
Parse photo-reactions.
Definition: CD_CdrPlasmaJSON.cpp:3242
std::vector< CdrPlasmaPhotoReactionJSON > m_photoReactions
Photo-reactions.
Definition: CD_CdrPlasmaJSON.H:750
virtual void parseDomainReactionScaling(const int a_reactionIndex, const json &a_reactionJSON, const std::vector< std::string > &a_sides)
Parse domain reaction scaling for a specific reaction.
Definition: CD_CdrPlasmaJSON.cpp:4050
bool isNeutralSpecies(const std::string &a_name) const
Return true if species exists in map and false otherwise.
Definition: CD_CdrPlasmaJSON.cpp:4295
std::map< std::string, int > m_rteSpeciesMap
string-int encoding of the RTE species.
Definition: CD_CdrPlasmaJSON.H:499
virtual void initializePlasmaSpecies()
Initialize species.
Definition: CD_CdrPlasmaJSON.cpp:590
std::map< int, LookupTable1D< Real, 1 > > m_diffusionTablesEnergy
Map for table-based diffusion coefficients as function of energy.
Definition: CD_CdrPlasmaJSON.H:616
std::map< int, LookupTable1D< Real, 1 > > m_mobilityTablesEnergy
Map for table-based mobilities as function of energy.
Definition: CD_CdrPlasmaJSON.H:585
std::map< int, FunctionEX > m_photoReactionEfficiencies
Flag for photo-reaction efficiencies. Includes Helmholtz corrections, if present.
Definition: CD_CdrPlasmaJSON.H:740
void integrateReactionsExplicitRK2(std::vector< Real > &a_cdrDensities, std::vector< Real > &a_photonProduction, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa, const Real a_tableuAlpha) const
Routine for integrating the reactive-only problem using a second order Runge-Kutta method.
Definition: CD_CdrPlasmaJSON.cpp:5721
std::map< int, bool > m_plasmaReactionPlot
Plot plasma reaction or not.
Definition: CD_CdrPlasmaJSON.H:712
virtual void initializePhotonSpecies()
Initialize photon species.
Definition: CD_CdrPlasmaJSON.cpp:1084
virtual Vector< Real > computeCdrDomainFluxes(const Real a_time, const RealVect a_pos, const int a_dir, const Side::LoHiSide a_side, const RealVect a_E, const Vector< Real > a_cdrDensities, const Vector< Real > a_cdrVelocities, const Vector< Real > a_cdrGradients, const Vector< Real > a_rteFluxes, const Vector< Real > a_extrapCdrFluxes) const override
Compute CDR fluxes through domain sides. This is used as a boundary condition in the CDR equations.
Definition: CD_CdrPlasmaJSON.cpp:5283
virtual InitialDataFunction parsePlasmaSpeciesInitialData(const json &a_json) const
Generate an initial data function for a given plasma species.
Definition: CD_CdrPlasmaJSON.cpp:751
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_CdrPlasmaJSON.H:83
virtual void parseMobilities()
Initialize species mobilities.
Definition: CD_CdrPlasmaJSON.cpp:1554
virtual ~CdrPlasmaJSON()
Destructor.
Definition: CD_CdrPlasmaJSON.cpp:78
ReactionIntegrator
Enum for distinguishing integration methods. Note that 'None' just fills directly with source terms.
Definition: CD_CdrPlasmaJSON.H:331
bool m_plotGas
Plot gas pressure, density, and temperature.
Definition: CD_CdrPlasmaJSON.H:361
Real m_etaConstant
For when we can use eta = constant.
Definition: CD_CdrPlasmaJSON.H:530
bool containsBracket(const std::string a_str) const
Protect all kinds of brackets in a string.
Definition: CD_CdrPlasmaJSON.cpp:181
LookupMethod m_alphaLookup
Lookup method for Townsend ionization coefficient.
Definition: CD_CdrPlasmaJSON.H:515
std::map< int, Real > m_mobilityConstants
Map for constant mobilities.
Definition: CD_CdrPlasmaJSON.H:564
void integrateReactionsImplicitEuler(std::vector< Real > &a_cdrDensities, std::vector< Real > &a_photonProduction, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const
Routine for integrating the reactive-only problem using the implicit Euler rule.
LookupMethod m_etaLookup
Lookup method for Townsend attachment coefficient.
Definition: CD_CdrPlasmaJSON.H:520
std::map< int, FunctionEN > m_diffusionFunctionsEN
Map for function-based diffusion coefficients. .
Definition: CD_CdrPlasmaJSON.H:604
virtual void parsePlasmaReactionScaling(const int a_reactionIndex, const json &a_reactionJSON)
Parse scaling factors for reactions.
Definition: CD_CdrPlasmaJSON.cpp:2935
std::map< int, bool > m_cdrIsEnergySolver
int-bool encoding for determining if a solver is an energy solver.
Definition: CD_CdrPlasmaJSON.H:469
const std::map< std::string, Side::LoHiSide > m_sideStringToSide
map to translate side from std::string to Side::LoHiSide
Definition: CD_CdrPlasmaJSON.H:883
virtual void integrateReactions(std::vector< Real > &a_cdrDensities, std::vector< Real > &a_photonProduction, const std::vector< RealVect > a_cdrGradients, const RealVect a_E, const RealVect a_pos, const Real a_dx, const Real a_dt, const Real a_time, const Real a_kappa) const
Routine for integrating the reactive-only problem using various algorithms.
Definition: CD_CdrPlasmaJSON.cpp:5460
std::map< int, Real > m_dielectricReactionConstants
Constant dielectric reaction rate.
Definition: CD_CdrPlasmaJSON.H:817
std::map< int, FunctionEX > m_electrodeReactionEfficiencies
Electrode reaction effiencies. Used for scaling reactions on electrodes in a "generic" way.
Definition: CD_CdrPlasmaJSON.H:781
virtual Vector< std::string > getPlotVariableNames() const override
Get plot variable names. The names and positions between this routine and getPlotVariables must be co...
Definition: CD_CdrPlasmaJSON.cpp:4167
std::map< int, LookupTable1D< Real, 1 > > m_plasmaReactionTablesEN
Map for table-based reaction coefficients, where k = k(E,N).
Definition: CD_CdrPlasmaJSON.H:691
std::map< int, LookupMethod > m_electrodeReactionLookup
Lookup method for the electrode surface reaction rates.
Definition: CD_CdrPlasmaJSON.H:771
virtual void parseAlpha()
Parse the Townsend ionization coefficient.
Definition: CD_CdrPlasmaJSON.cpp:1259
virtual void parseElectrodeReactionEnergyLosses(const int a_reactionIndex, const json &a_reactionJSON)
Parse electrode-reaction energy losses.
Definition: CD_CdrPlasmaJSON.cpp:3619
std::map< int, LookupMethod > m_dielectricReactionLookup
Lookup method for the dielectric surface reaction rates.
Definition: CD_CdrPlasmaJSON.H:812
std::map< int, std::pair< bool, int > > m_plasmaReactionSolovievCorrection
Flag for whether or not reaction includes Soloviev energy correction.
Definition: CD_CdrPlasmaJSON.H:718
std::map< int, FunctionEX > m_plasmaReactionEfficiencies
Scaled plasma reactions. These account for e.g. reaction efficiencies, collisional quenching,...
Definition: CD_CdrPlasmaJSON.H:702
std::map< int, LookupMethod > m_plasmaReactionLookup
Map for figuring out how to look up the rate for a certain plasma reaction.
Definition: CD_CdrPlasmaJSON.H:649
bool m_plotAlpha
Plot Townsend ionization coefficient.
Definition: CD_CdrPlasmaJSON.H:366
bool containsWildcard(const std::string a_str) const
Protect the @ character in a string.
Definition: CD_CdrPlasmaJSON.cpp:175
std::map< int, bool > m_dielectricReactionHasEnergyLoss
Associative container for determining if a reaction is associated with an energy loss/gain.
Definition: CD_CdrPlasmaJSON.H:839
virtual void parseDielectricReactionRate(const int a_reactionIndex, const json &a_reactionJSON)
Parse reaction rate for dielectric surface reactions.
Definition: CD_CdrPlasmaJSON.cpp:3788
virtual Real computePlasmaReactionRate(const int &a_reactionIndex, const std::vector< Real > &a_cdrDensities, const std::vector< Real > &a_cdrMobilities, const std::vector< Real > &a_cdrDiffusionCoefficients, const std::vector< Real > &a_cdrTemperatures, const std::vector< Real > &a_cdrEnergies, const std::vector< RealVect > &a_cdrGradients, const RealVect &a_pos, const RealVect &a_vectorE, const Real &a_E, const Real &a_Etd, const Real &a_N, const Real &a_alpha, const Real &a_eta, const Real &a_time) const
Compute the reaction rate for a plasma reaction.
Definition: CD_CdrPlasmaJSON.cpp:4617
std::map< int, bool > m_cdrHasEnergySolver
int-bool encoding for determining if a CDR solver HAS an associated energy solver.
Definition: CD_CdrPlasmaJSON.H:474
std::map< std::pair< int, Side::LoHiSide >, std::map< int, FunctionEX > > m_domainReactionEfficiencies
Domain reaction effiencies. Used for scaling reactions on domains in a "generic" way....
Definition: CD_CdrPlasmaJSON.H:867
std::map< int, std::list< std::pair< int, Real > > > m_dielectricReactionEnergyLosses
Associated energy losses for a surface reaction on dielectrics.
Definition: CD_CdrPlasmaJSON.H:834
virtual void parseDiffusion()
Initialize species diffusion coefficients.
Definition: CD_CdrPlasmaJSON.cpp:1867
std::map< int, std::pair< int, FunctionT > > m_plasmaReactionFunctionsT
Maps for functions of the type k = f(T) where T is the temperature of some species.
Definition: CD_CdrPlasmaJSON.H:670
std::string m_jsonFile
Input JSON file name.
Definition: CD_CdrPlasmaJSON.H:396
bool doesFileExist(const std::string a_filename) const
Check if file exists.
Definition: CD_CdrPlasmaJSON.cpp:4340
std::map< int, bool > m_photoReactionUseHelmholtz
Map over the Helmholtz reconstructions.
Definition: CD_CdrPlasmaJSON.H:745
std::map< int, LookupTable1D< Real, 1 > > m_temperatureTablesEN
Temperatures as functions of E/N.
Definition: CD_CdrPlasmaJSON.H:635
virtual void parsePlasmaReactionSoloviev(const int a_reactionIndex, const json &a_reactionJSON)
Parse plasma reaction energy correction.
Definition: CD_CdrPlasmaJSON.cpp:3094
const std::map< char, int > m_dirCharToInt
map to translate dir from char to int
Definition: CD_CdrPlasmaJSON.H:878
std::map< int, std::tuple< Real, Real, Real > > m_cdrEnergyComputation
Parameters for computing the mean energy from energy density and density.
Definition: CD_CdrPlasmaJSON.H:480
CdrPlasmaJSON()
Default constructor. Puts object in usable state.
Definition: CD_CdrPlasmaJSON.cpp:34
virtual void parsePlasmaReactions()
Parse plasma reactions.
Definition: CD_CdrPlasmaJSON.cpp:2284
virtual void sanctifyPlasmaReaction(const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products, const std::string a_reaction) const
Check if a plasma-reaction makes sense in terms of the species that have been defined.
Definition: CD_CdrPlasmaJSON.cpp:2431
std::vector< CdrPlasmaSurfaceReactionJSON > m_electrodeReactions
List of electrode reactions.
Definition: CD_CdrPlasmaJSON.H:786
virtual void getReactionSpecies(std::list< int > &a_plasmaReactants, std::list< int > &a_neutralReactants, std::list< int > &a_photonReactants, std::list< int > &a_plasmaProducts, std::list< int > &a_neutralProducts, std::list< int > &a_photonProducts, const std::vector< std::string > &a_reactants, const std::vector< std::string > &a_products) const
Get the int-encoding corresponding to species involved in some reaction.
Definition: CD_CdrPlasmaJSON.cpp:294
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_CdrPlasmaJSON.H:90
virtual std::vector< Real > computePlasmaSpeciesMobilities(const RealVect &a_position, const RealVect &a_E, const std::vector< Real > &a_cdrDensities) const
Compute the various plasma species mobilities.
Definition: CD_CdrPlasmaJSON.cpp:4353
virtual Real initialSigma(const Real a_time, const RealVect a_pos) const override
Set the initial surface charge.
Definition: CD_CdrPlasmaJSON.cpp:5401
virtual void parseRuntimeOptions() override
Parse run-time class options.
Definition: CD_CdrPlasmaJSON.cpp:99
virtual void parsePlasmaReactionDescription(const int a_reactionIndex, const json &a_reactionJSON, const std::string a_wildcard)
Parse plasma reaction descriptions.
Definition: CD_CdrPlasmaJSON.cpp:3066
ReactiveEnergyLoss
Enum class for distinguishing how we add/lose energy when running LEA-based models....
Definition: CD_CdrPlasmaJSON.H:345
std::map< int, FunctionX > m_temperatureConstants
Constant temperatures.
Definition: CD_CdrPlasmaJSON.H:630
virtual Real computeEta(const Real a_E, const RealVect a_position) const override
Compute eta. Should return Townsend attachment coefficient.
Definition: CD_CdrPlasmaJSON.cpp:4812
virtual std::vector< Real > computePlasmaSpeciesEnergies(const RealVect &a_position, const RealVect &a_E, const std::vector< Real > &a_cdrDensities) const
Compute the various plasma species energies. Returns a list of energies in electron-volts....
Definition: CD_CdrPlasmaJSON.cpp:4532
virtual void parseElectrodeReactions()
Parse secondary emission on electrodes.
Definition: CD_CdrPlasmaJSON.cpp:3446
bool m_verbose
Verbose or not.
Definition: CD_CdrPlasmaJSON.H:356
Abstract base class for specifying plasma kinetics. This is the base class used by CdrPlasmaStepper w...
Definition: CD_CdrPlasmaPhysics.H:32
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15