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 {
21namespace ItoKMC {
22
26template <typename I = ItoSolver, typename C = CdrCTU, typename R = McPhoto, typename F = FieldSolverGMG>
28{
29public:
34 ItoKMCBackgroundEvaluator(RefCountedPtr<ItoKMCPhysics>& a_physics) noexcept;
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
77protected:
83
89
95
100
105
110
115
120
125
129 std::string m_opticalSolver;
130
135 MFAMRCellData m_backgroundField;
136
140 virtual void
141 computeBackgroundField() noexcept;
142
147 [[nodiscard]]
148 virtual std::pair<Real, Real>
150
156 [[nodiscard]]
157 virtual Real
158 integrateElectrodeSurfaceCharge() const noexcept;
159
165 [[nodiscard]]
166 virtual Real
167 integrateOhmicCharge() const noexcept;
168
174 [[nodiscard]]
175 virtual std::pair<Real, Real>
176 integrateOpticalExcitations() const noexcept;
177};
178} // namespace ItoKMC
179} // namespace Physics
180
181#include <CD_NamespaceFooter.H>
182
184
185#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:94
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:129
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:99
MFAMRCellData m_backgroundField
For storing the background field.
Definition CD_ItoKMCBackgroundEvaluator.H:135
Real m_relFieldExitCrit
Exit criterion for relative field – if the relative change in the background field in any cell change...
Definition CD_ItoKMCBackgroundEvaluator.H:88
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:104
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:119
Real m_sumOpticalSrc
Integrated optical emissions (source term)
Definition CD_ItoKMCBackgroundEvaluator.H:124
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:109
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:82
Real m_ohmicCharge
Total charge that left through the electrode in the last time step.
Definition CD_ItoKMCBackgroundEvaluator.H:114
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:31
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16