chombo-discharge
Loading...
Searching...
No Matches
CD_ItoKMCBackgroundEvaluator.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_ITOKMCBACKGROUNDEVALUATOR_H
14#define CD_ITOKMCBACKGROUNDEVALUATOR_H
15
16// Our includes
18#include <CD_NamespaceHeader.H>
19
20namespace Physics {
21 namespace ItoKMC {
22
26 template <typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverGMG>
28 {
29 public:
35
39 virtual void
40 postInitialize() noexcept override final;
41
45 virtual void
46 postRegrid() noexcept override final;
47
51 virtual void
52 postCheckpointSetup() noexcept override final;
53
57 virtual void
58 printStepReport() noexcept override final;
59
65 virtual Real
66 advance(const Real a_dt) override;
67
74 virtual Real
75 computeDt() override;
76
77 protected:
82
87
92
97
102
107
112
117
122
127
133
137 virtual void
139
144 [[nodiscard]]
147
153 [[nodiscard]]
156
162 [[nodiscard]]
165
171 [[nodiscard]]
174 };
175 } // namespace ItoKMC
176} // namespace Physics
177
178#include <CD_NamespaceFooter.H>
179
181
182#endif
Implementation of CD_ItoKMCBackgroundEvaluator.H.
Declaration of a class which uses a semi-implicit Godunov method for Ito plasma equations.
Implementation of ItoKMCGodunovStepper that also evaluates the background field at every regrid/time ...
Definition CD_ItoKMCBackgroundEvaluator.H:28
virtual void postRegrid() noexcept override final
Post-regrid operations. Computes the background field.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:66
Real m_maxInitialTimeStep
Maximum time step for the very first advance, to prevent particles from moving too far during initial...
Definition CD_ItoKMCBackgroundEvaluator.H:91
virtual Real integrateElectrodeSurfaceCharge() const noexcept
Compute total charge on electrode.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:336
std::string m_opticalSolver
Name of the optical solver.
Definition CD_ItoKMCBackgroundEvaluator.H:126
virtual void computeBackgroundField() noexcept
Computes the background field. I.e., it allocates and fills m_backgroundField.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:178
virtual std::pair< Real, Real > evaluateSpaceChargeEffects() noexcept
Evaluate the maximum change in the background field.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:220
virtual void printStepReport() noexcept override final
Print a new step report. This is the old one plus the maximum field change.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:152
Real m_maxFieldChange
Change in max field.
Definition CD_ItoKMCBackgroundEvaluator.H:96
MFAMRCellData m_backgroundField
For storing the background field.
Definition CD_ItoKMCBackgroundEvaluator.H:132
Real m_relFieldExitCrit
Exit criterion for relative field – if the relative change in the background field in any cell change...
Definition CD_ItoKMCBackgroundEvaluator.H:86
virtual Real integrateOhmicCharge() const noexcept
Compute the total ohmic current through the electrode.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:395
Real m_relFieldChange
Change in relative field.
Definition CD_ItoKMCBackgroundEvaluator.H:101
virtual Real advance(const Real a_dt) override
Advance the system by a_dt, including background-field evaluation.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:94
Real m_sumOpticalPhi
Integrated optical emissions (phi)
Definition CD_ItoKMCBackgroundEvaluator.H:116
Real m_sumOpticalSrc
Integrated optical emissions (source term)
Definition CD_ItoKMCBackgroundEvaluator.H:121
virtual void postInitialize() noexcept override final
Post-initialization operations. Computes the background field.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:52
Real m_electrodeCharge
Total charge on the electrode, given by .
Definition CD_ItoKMCBackgroundEvaluator.H:106
virtual void postCheckpointSetup() noexcept override final
Post-checkpoint operations. Computes the background field.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:80
virtual Real computeDt() override
Compute a time step for the advance method.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:135
Real m_maxFieldExitCrit
Exit criterion for maximum field – if the background field changes by this much the simulation is ter...
Definition CD_ItoKMCBackgroundEvaluator.H:81
Real m_ohmicCharge
Total charge that left through the electrode in the last time step.
Definition CD_ItoKMCBackgroundEvaluator.H:111
virtual std::pair< Real, Real > integrateOpticalExcitations() const noexcept
Integrate the sum of the optical excitations.
Definition CD_ItoKMCBackgroundEvaluatorImplem.H:407
Implementation of ItoKMCStepper that uses a semi-implicit split-step formalism for advancing the Ito-...
Definition CD_ItoKMCGodunovStepper.H:30
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16