chombo-discharge
Loading...
Searching...
No Matches
CD_DischargeInceptionTagger.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_DISCHARGEINCEPTIONTAGGER_H
14#define CD_DISCHARGEINCEPTIONTAGGER_H
15
16// Our includes
17#include <CD_CellTagger.H>
18#include <CD_NamespaceHeader.H>
19
20namespace Physics {
21namespace DischargeInception {
22
31{
32public:
37
42
47
55 DischargeInceptionTagger(const RefCountedPtr<AmrMesh>& a_amrMesh,
56 const EBAMRCellData* const a_electricField,
57 const std::function<Real(const Real E, const RealVect x)>& a_alphaEff,
58 const phase::which_phase a_phase = phase::gas);
59
64
68 virtual void
69 parseOptions() override final;
70
74 virtual void
75 regrid() override final;
76
83 virtual bool
84 tagCells(EBAMRTags& a_tags) override final;
85
90 virtual int
91 getNumberOfPlotVariables() const override;
92
99 virtual void
100 writePlotData(EBAMRCellData& a_output, Vector<std::string>& a_plotVariableNames, int& a_icomp) const;
101
102protected:
106 RefCountedPtr<AmrMesh> m_amr;
107
111 const EBAMRCellData* m_electricField;
112
116 mutable EBAMRCellData m_tracerField;
117
121 std::function<Real(const Real& E, const RealVect x)> m_alphaEff;
122
126 phase::which_phase m_phase;
127
131 std::string m_realm;
132
137
142
146 bool m_plot;
147
151 virtual void
152 computeTracerField() const noexcept;
153};
154} // namespace DischargeInception
155} // namespace Physics
156
157#include <CD_NamespaceFooter.H>
158
159#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:25
Class for handling spatial operations.
Definition CD_AmrMesh.H:45
Base class for tagging cells across an AMR hierarchy.
Definition CD_CellTagger.H:33
CellTagger for the DischargeInception module.
Definition CD_DischargeInceptionTagger.H:31
Real m_maxVoltage
Reference voltage used to scale the electric field when computing the tracer field.
Definition CD_DischargeInceptionTagger.H:141
virtual int getNumberOfPlotVariables() const override
Get number of plot variables that will be written to file (by Driver).
Definition CD_DischargeInceptionTagger.cpp:160
Real m_refAlpha
Threshold for refinement: refine if .
Definition CD_DischargeInceptionTagger.H:136
const EBAMRCellData * m_electricField
Pointer to electric field.
Definition CD_DischargeInceptionTagger.H:111
virtual void writePlotData(EBAMRCellData &a_output, Vector< std::string > &a_plotVariableNames, int &a_icomp) const
Write plot data.
Definition CD_DischargeInceptionTagger.cpp:171
bool m_plot
If true, write the tracer field to the plot file.
Definition CD_DischargeInceptionTagger.H:146
EBAMRCellData m_tracerField
Tracer field. Will be populated with |grad(E)|*dx/|E|.
Definition CD_DischargeInceptionTagger.H:116
DischargeInceptionTagger()=delete
Disallowed constructor.
virtual ~DischargeInceptionTagger()
Destructor.
Definition CD_DischargeInceptionTagger.cpp:39
DischargeInceptionTagger(const DischargeInceptionTagger &)=delete
Disallowed constructor.
virtual void parseOptions() override final
Parse options.
Definition CD_DischargeInceptionTagger.cpp:48
virtual void computeTracerField() const noexcept
Compute alpha_eff*dx at max voltage.
Definition CD_DischargeInceptionTagger.cpp:192
virtual bool tagCells(EBAMRTags &a_tags) override final
Tag cells for refinement.
Definition CD_DischargeInceptionTagger.cpp:84
std::function< Real(const Real &E, const RealVect x)> m_alphaEff
Net effective ionization coefficient callable.
Definition CD_DischargeInceptionTagger.H:121
virtual void regrid() override final
Regrid hook. Re-allocates internal data holders after the AMR hierarchy changes.
Definition CD_DischargeInceptionTagger.cpp:67
RefCountedPtr< AmrMesh > m_amr
AmrMesh reference.
Definition CD_DischargeInceptionTagger.H:106
std::string m_realm
Realm name where solver data lives.
Definition CD_DischargeInceptionTagger.H:131
DischargeInceptionTagger(const DischargeInceptionTagger &&)=delete
Disallowed constructor.
phase::which_phase m_phase
Phase (gas/solid) on which the tagger operates.
Definition CD_DischargeInceptionTagger.H:126
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38
@ gas
Gas phase.
Definition CD_MultiFluidIndexSpace.H:39