chombo-discharge
CD_DischargeInceptionTagger.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_DischargeInceptionTagger_H
13 #define CD_DischargeInceptionTagger_H
14 
15 // Our includes
16 #include <CD_CellTagger.H>
17 #include <CD_NamespaceHeader.H>
18 
19 namespace Physics {
20  namespace DischargeInception {
21 
28  {
29  public:
34 
39 
44 
52  DischargeInceptionTagger(const RefCountedPtr<AmrMesh>& a_amrMesh,
53  const EBAMRCellData* const a_electricField,
54  const std::function<Real(const Real E, const RealVect x)>& a_alphaEff,
55  const phase::which_phase a_phase = phase::gas);
56 
60  virtual ~DischargeInceptionTagger();
61 
65  virtual void
66  parseOptions() override final;
67 
71  virtual void
72  regrid() override final;
73 
79  virtual bool
80  tagCells(EBAMRTags& a_tags) override final;
81 
86  virtual int
87  getNumberOfPlotVariables() const override;
88 
95  virtual void
96  writePlotData(EBAMRCellData& a_output, Vector<std::string>& a_plotVariableNames, int& a_icomp) const;
97 
98  protected:
102  RefCountedPtr<AmrMesh> m_amr;
103 
108 
113 
117  std::function<Real(const Real& E, const RealVect x)> m_alphaEff;
118 
122  phase::which_phase m_phase;
123 
127  std::string m_realm;
128 
133 
138 
142  bool m_plot;
143 
147  virtual void
148  computeTracerField() const noexcept;
149  };
150  } // namespace DischargeInception
151 } // namespace Physics
152 
153 #include <CD_NamespaceFooter.H>
154 
155 #endif
Declaration of a base class for tagging cells across an AMR hierarchy.
Vector< RefCountedPtr< LayoutData< DenseIntVectSet > >> EBAMRTags
Declaration of cell tags.
Definition: CD_EBAMRTags.H:22
Class for handling spatial operations.
Definition: CD_AmrMesh.H:44
Base class for tagging cells across an AMR hierarchy.
Definition: CD_CellTagger.H:31
Class for tagging cells in the DischargeInception module.
Definition: CD_DischargeInceptionTagger.H:28
Real m_maxVoltage
Max voltage.
Definition: CD_DischargeInceptionTagger.H:137
virtual int getNumberOfPlotVariables() const override
Get number of plot variables that will be written to file (by Driver).
Definition: CD_DischargeInceptionTagger.cpp:149
Real m_refAlpha
Curvature refinement factor.
Definition: CD_DischargeInceptionTagger.H:132
const EBAMRCellData * m_electricField
Pointer to electric field.
Definition: CD_DischargeInceptionTagger.H:107
virtual void writePlotData(EBAMRCellData &a_output, Vector< std::string > &a_plotVariableNames, int &a_icomp) const
Write plot data.
Definition: CD_DischargeInceptionTagger.cpp:160
bool m_plot
Plot tracer field or not.
Definition: CD_DischargeInceptionTagger.H:142
EBAMRCellData m_tracerField
Tracer field. Will be populated with |grad(E)|*dx/|E|.
Definition: CD_DischargeInceptionTagger.H:112
DischargeInceptionTagger()=delete
Disallowed constructor.
virtual ~DischargeInceptionTagger()
Destructor.
Definition: CD_DischargeInceptionTagger.cpp:43
DischargeInceptionTagger(const DischargeInceptionTagger &)=delete
Disallowed constructor.
virtual void parseOptions() override final
Parse options.
Definition: CD_DischargeInceptionTagger.cpp:52
virtual void computeTracerField() const noexcept
Compute alpha_eff*dx at max voltage.
Definition: CD_DischargeInceptionTagger.cpp:181
virtual bool tagCells(EBAMRTags &a_tags) override final
Tag cells for refinement.
Definition: CD_DischargeInceptionTagger.cpp:86
std::function< Real(const Real &E, const RealVect x)> m_alphaEff
Ionization coefficient.
Definition: CD_DischargeInceptionTagger.H:117
virtual void regrid() override final
Parse options.
Definition: CD_DischargeInceptionTagger.cpp:69
RefCountedPtr< AmrMesh > m_amr
AmrMesh reference.
Definition: CD_DischargeInceptionTagger.H:102
std::string m_realm
Realm.
Definition: CD_DischargeInceptionTagger.H:127
DischargeInceptionTagger(const DischargeInceptionTagger &&)=delete
Disallowed constructor.
phase::which_phase m_phase
Phase.
Definition: CD_DischargeInceptionTagger.H:122
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15
phase names
Definition: CD_MultiFluidIndexSpace.H:27