chombo-discharge
CD_CdrPlasmaPhysics.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_CdrPlasmaPhysics_H
13 #define CD_CdrPlasmaPhysics_H
14 
15 // Chombo includes
16 #include <RealVect.H>
17 #include <RefCountedPtr.H>
18 #include <LoHiSide.H>
19 
20 // Our includes
21 #include <CD_CdrSpecies.H>
22 #include <CD_RtSpecies.H>
23 #include <CD_NamespaceHeader.H>
24 
25 namespace Physics {
26  namespace CdrPlasma {
27 
32  {
33  public:
38  {}
39 
44  {}
45 
49  virtual void
51 
52  };
53 
60  virtual int
62  {
63  return 0;
64  }
65 
72  virtual Vector<std::string>
74  {
75  return Vector<std::string>(this->getNumberOfPlotVariables(), std::string("empty data"));
76  }
77 
92  virtual Vector<Real>
93  getPlotVariables(const Vector<Real> a_cdrDensities,
94  const Vector<RealVect> a_cdrGradients,
95  const Vector<Real> a_rteDensities,
96  const RealVect a_E,
97  const RealVect a_position,
98  const Real a_dx,
99  const Real a_dt,
100  const Real a_time,
101  const Real a_kappa) const
102  {
103  return Vector<Real>(this->getNumberOfPlotVariables(), 1.0);
104  }
105 
112  virtual Real
113  computeAlpha(const Real a_E, const RealVect a_position) const = 0;
114 
121  virtual Real
122  computeEta(const Real a_E, const RealVect a_position) const = 0;
123 
140  virtual void
141  advanceReactionNetwork(Vector<Real>& a_cdrSources,
142  Vector<Real>& a_rteSources,
143  const Vector<Real> a_cdrDensities,
144  const Vector<RealVect> a_cdrGradients,
145  const Vector<Real> a_rteDensities,
146  const RealVect a_E,
147  const RealVect a_pos,
148  const Real a_dx,
149  const Real a_dt,
150  const Real a_time,
151  const Real a_kappa) const = 0;
152 
161  virtual Vector<RealVect>
162  computeCdrDriftVelocities(const Real a_time,
163  const RealVect a_pos,
164  const RealVect a_E,
165  const Vector<Real> a_cdrDensities) const = 0;
166 
175  virtual Vector<Real>
177  const RealVect a_pos,
178  const RealVect a_E,
179  const Vector<Real> a_cdrDensities) const = 0;
180 
195  virtual Vector<Real>
196  computeCdrElectrodeFluxes(const Real a_time,
197  const RealVect a_pos,
198  const RealVect a_normal,
199  const RealVect a_E,
200  const Vector<Real> a_cdrDensities,
201  const Vector<Real> a_cdrVelocities,
202  const Vector<Real> a_cdrGradients,
203  const Vector<Real> a_rteFluxes,
204  const Vector<Real> a_extrapCdrFluxes) const = 0;
205 
220  virtual Vector<Real>
221  computeCdrDielectricFluxes(const Real a_time,
222  const RealVect a_pos,
223  const RealVect a_normal,
224  const RealVect a_E,
225  const Vector<Real> a_cdrDensities,
226  const Vector<Real> a_cdrVelocities,
227  const Vector<Real> a_cdrGradients,
228  const Vector<Real> a_rteFluxes,
229  const Vector<Real> a_extrapCdrFluxes) const = 0;
230 
245  virtual Vector<Real>
246  computeCdrDomainFluxes(const Real a_time,
247  const RealVect a_pos,
248  const int a_dir,
249  const Side::LoHiSide a_side,
250  const RealVect a_E,
251  const Vector<Real> a_cdrDensities,
252  const Vector<Real> a_cdrVelocities,
253  const Vector<Real> a_cdrGradients,
254  const Vector<Real> a_rteFluxes,
255  const Vector<Real> a_extrapCdrFluxes) const = 0;
256 
262  virtual Real
263  initialSigma(const Real a_time, const RealVect a_pos) const = 0;
264 
268  const Vector<RefCountedPtr<CdrSpecies>>&
270  {
271  return m_cdrSpecies;
272  }
273 
277  const Vector<RefCountedPtr<RtSpecies>>&
278  getRtSpecies() const
279  {
280  return m_rtSpecies;
281  }
282 
286  int
288  {
289  return m_cdrSpecies.size();
290  }
291 
295  int
297  {
298  return m_rtSpecies.size();
299  }
300 
301  protected:
305  Vector<RefCountedPtr<CdrSpecies>> m_cdrSpecies;
306 
310  Vector<RefCountedPtr<RtSpecies>> m_rtSpecies;
311 
316 
321  };
322  } // namespace CdrPlasma
323 } // namespace Physics
324 
325 #include <CD_NamespaceFooter.H>
326 
327 #endif
Declaration of a class that passes information into CdrSolver (e.g., initial conditions).
Declaration of a class which supplies a user interface to radiative transfer code.
Abstract base class for specifying plasma kinetics. This is the base class used by CdrPlasmaStepper w...
Definition: CD_CdrPlasmaPhysics.H:32
virtual ~CdrPlasmaPhysics()
Base destructor. Does nothing.
Definition: CD_CdrPlasmaPhysics.H:43
virtual int getNumberOfPlotVariables() const
Get number of plot variables for this physics class.
Definition: CD_CdrPlasmaPhysics.H:61
virtual Real computeAlpha(const Real a_E, const RealVect a_position) const =0
Compute alpha. Should return Townsend ionization coefficient.
int m_numRtSpecies
Number of RTE species.
Definition: CD_CdrPlasmaPhysics.H:320
const Vector< RefCountedPtr< CdrSpecies > > & getCdrSpecies() const
Get all CDR species.
Definition: CD_CdrPlasmaPhysics.H:269
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 =0
Compute CDR fluxes on electrode-gas interfaces. This is used as a boundary condition in the CDR equat...
int getNumCdrSpecies() const
Return number of CDR species that we solve for.
Definition: CD_CdrPlasmaPhysics.H:287
virtual Vector< std::string > getPlotVariableNames() const
Get plot variable names. The.
Definition: CD_CdrPlasmaPhysics.H:73
virtual void parseRuntimeOptions()
Parse run-time options.
Definition: CD_CdrPlasmaPhysics.H:50
virtual Vector< RealVect > computeCdrDriftVelocities(const Real a_time, const RealVect a_pos, const RealVect a_E, const Vector< Real > a_cdrDensities) const =0
Compute velocities for the CDR equations.
virtual Real initialSigma(const Real a_time, const RealVect a_pos) const =0
Set the initial surface charge.
CdrPlasmaPhysics()
Default constructor. Does nothing.
Definition: CD_CdrPlasmaPhysics.H:37
int getNumRtSpecies() const
Return number of RTE equations that we solve for.
Definition: CD_CdrPlasmaPhysics.H:296
Vector< RefCountedPtr< CdrSpecies > > m_cdrSpecies
List of species.
Definition: CD_CdrPlasmaPhysics.H:305
virtual Real computeEta(const Real a_E, const RealVect a_position) const =0
Compute eta. Should return Townsend attachment coefficient.
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 =0
Compute CDR fluxes through domain sides. This is used as a boundary condition in the CDR equations.
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 =0
Routine intended for advancing a reaction network over a time a_dt.
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
Provide plot variables. This is used by CdrPlasmaStepper when writing plot files.
Definition: CD_CdrPlasmaPhysics.H:93
Vector< RefCountedPtr< RtSpecies > > m_rtSpecies
List of optical transitions between species.
Definition: CD_CdrPlasmaPhysics.H:310
virtual Vector< Real > computeCdrDiffusionCoefficients(const Real a_time, const RealVect a_pos, const RealVect a_E, const Vector< Real > a_cdrDensities) const =0
Compute diffusion coefficients for the CDR equations.
int m_numCdrSpecies
Number of species.
Definition: CD_CdrPlasmaPhysics.H:315
const Vector< RefCountedPtr< RtSpecies > > & getRtSpecies() const
Get all RTE species.
Definition: CD_CdrPlasmaPhysics.H:278
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 =0
Compute CDR fluxes on dielectric-gas interfaces. This is used as a boundary condition in the CDR equa...
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15