|
chombo-discharge
|
Base class for interaction between Kinetic Monte Carlo and Ito-based plasma solvers. More...
#include <CD_ItoPlasmaPhysics.H>


Public Member Functions | |
| ItoPlasmaPhysics () | |
| Constructor. Does nothing. | |
| virtual | ~ItoPlasmaPhysics () |
| Destructor. Does nothing. | |
| virtual Real | computeDt (const RealVect a_E, const RealVect a_pos, const Vector< FPR > a_numParticles) const noexcept |
| Compute a time step to use. More... | |
| virtual Real | computeAlpha (const RealVect a_E) const =0 |
| Compute Townsend ionization coefficient. More... | |
| const Vector< RefCountedPtr< ItoSpecies > > & | getItoSpecies () const |
| Get all particle species. More... | |
| const Vector< RefCountedPtr< RtSpecies > > & | getRtSpecies () const |
| Get all photon species. More... | |
| int | getNumPlasmaSpecies () const |
| Return number of ion equations. | |
| int | getNumPhotonSpecies () const |
| Return number of RTE equations. | |
| virtual void | parseRuntimeOptions () noexcept |
| Parse run-time options. | |
| virtual Real | initialSigma (const Real a_time, const RealVect a_pos) const |
| Set initial surface charge. Default is 0, override if you want. More... | |
| virtual Vector< Real > | computeItoMobilities (const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept=0 |
| Compute the Ito solver mobilities. More... | |
| virtual Vector< Real > | computeItoDiffusion (const Real a_time, const RealVect a_pos, const RealVect a_E) const noexcept=0 |
| Compute the Ito solver diffusion coefficients. More... | |
| virtual void | injectParticlesEB (Vector< List< ItoParticle >> &a_outgoingParticles, Vector< List< Photon >> &a_outgoingPhotons, const Vector< List< ItoParticle >> &a_incomingParticles, const Vector< List< Photon >> &a_incomingPhotons, const Vector< FPR > &a_newNumParticles, const Vector< FPR > &a_oldNumParticles, const RealVect &a_E, const RealVect &a_cellCenter, const RealVect &a_cellCentroid, const RealVect &a_bndryCentroid, const RealVect &a_bndryNormal, const Real a_bndryArea, const Real a_dx, const Real a_dt, const bool a_isDielectric, const int a_matIndex) const noexcept=0 |
| Resolve particle and photon injection at the EB. More... | |
| void | advanceKMC (Vector< FPR > &a_numParticles, Vector< FPR > &a_numNewPhotons, const Real a_dt, const RealVect a_E, const Real a_dx, const Real a_kappa) const |
| Advance particles. More... | |
| void | reconcileParticles (Vector< List< ItoParticle > * > &a_particles, const Vector< FPR > &a_newNumParticles, const Vector< FPR > &a_oldNumParticles, const RealVect a_cellPos, const RealVect a_centroidPos, const RealVect a_lo, const RealVect a_hi, const RealVect a_bndryCentroid, const RealVect a_bndryNormal, const Real a_dx, const Real a_kappa) const noexcept |
| Reconcile the number of particles. More... | |
| void | reconcilePhotons (Vector< List< Photon > * > &a_newPhotons, const Vector< FPR > &a_numNewPhotons, const RealVect a_cellPos, const RealVect a_centroidPos, const RealVect a_lo, const RealVect a_hi, const RealVect a_bndryCentroid, const RealVect a_bndryNormal, const Real a_dx, const Real a_kappa) const noexcept |
| Generate new photons. More... | |
| void | reconcilePhotoionization (Vector< List< ItoParticle > * > &a_particles, const Vector< List< Photon > * > &a_absorbedPhotons) const noexcept |
| Reconcile photoionization reactions. More... | |
Protected Types | |
| enum class | Algorithm { SSA , Tau , Hybrid } |
| Enum for switching between KMC algorithms. More... | |
| enum class | ParticlePlacement { Random , Centroid } |
| Enum for switching between various particle placement algorithms. | |
Protected Member Functions | |
| void | defineKMC () noexcept |
| Define the KMC solver and state. | |
| void | parsePPC () noexcept |
| Parse the maximum number of particles generated per cell. | |
| void | parseDebug () noexcept |
| Parse the maximum number of particles generated per cell. | |
| void | parseAlgorithm () noexcept |
| Parse reaction algorithm. | |
| virtual void | updateReactionRates (const RealVect a_E, const Real a_dx, const Real a_kappa) const noexcept=0 |
| Update reaction rates. More... | |
| void | removeParticles (List< ItoParticle > &a_particles, const long long a_numToRemove) const |
| Remove particles from the input list. More... | |
Protected Attributes | |
| Algorithm | m_algorithm |
| Algorithm to use for KMC advance. | |
| ParticlePlacement | m_particlePlacement |
| Particle placement algorithm. | |
| std::string | m_className |
| Class name. Used for options parsing. | |
| bool | m_debug |
| Turn on/off debugging. | |
| KMCState | m_kmcState |
| Kinetic Monte Carlo state. | |
| KMCSolverType | m_kmcSolver |
| Kinetic Monte Carlo solver. | |
| std::vector< std::shared_ptr< const KMCReaction > > | m_kmcReactions |
| List of reactions for the KMC solver. | |
| std::vector< std::shared_ptr< const ItoPlasmaPhotoReaction > > | m_photoReactions |
| List of photoionization reactions. | |
| Vector< RefCountedPtr< ItoSpecies > > | m_plasmaSpecies |
| List of solver-tracked particle species. | |
| Vector< RefCountedPtr< RtSpecies > > | m_rtSpecies |
| List of solver-tracked photon species. | |
| int | m_maxNewParticles |
| Maximum new number of particles generated by the chemistry advance. | |
| int | m_maxNewPhotons |
| Maximum new number of photons generated by the chemistry advance. | |
| int | m_Ncrit |
| Solver setting for the Cao et. al algorithm. More... | |
| int | m_NSSA |
| Solver setting for the Cao et. al algorithm. More... | |
| Real | m_SSAlim |
| Solver setting for the Cao et. al. algorithm. More... | |
| Real | m_eps |
| Solver setting for the Cao et. al. algorithm. More... | |
Base class for interaction between Kinetic Monte Carlo and Ito-based plasma solvers.
When using this class, the user should populate m_kmcReactions with the appropriate reactions AND implement routines for computing the mobility/diffusion coefficeints.
|
strongprotected |
Enum for switching between KMC algorithms.
'SSA' is the Gillespie algorithm, 'Tau' is tau-leaping and 'Hybrid' is the Cao et. al. algorithm.
|
inline |
Advance particles.
| [in,out] | a_numParticles | Number of physical particles |
| [out] | a_numNewPhotons | Number of new physical photons to generate (of each type) |
| [in] | a_dt | Time step |
| [in] | a_E | Electric field |
| [in] | a_dx | Grid resolution |
| [in] | a_kappa | Cut-cell volume fraction. |
|
pure virtual |
Compute Townsend ionization coefficient.
| [in] | a_E | Electric field. |
Implemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
inlinevirtualnoexcept |
Compute a time step to use.
| [in] | a_E | Electric field. |
| [in] | a_pos | Position |
| [in] | a_numParticles | Number of reactive particles of each species |
Reimplemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
pure virtualnoexcept |
Compute the Ito solver diffusion coefficients.
| [in] | a_time | Time |
| [in] | a_pos | Position |
| [in] | a_E | Electric field |
Implemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
pure virtualnoexcept |
Compute the Ito solver mobilities.
| [in] | a_time | Time |
| [in] | a_pos | Position |
| [in] | a_E | Electric field |
Implemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
inline |
Get all particle species.
|
inline |
Get all photon species.
|
inlinevirtual |
Set initial surface charge. Default is 0, override if you want.
| [in] | a_time | Simulation time |
| [in] | a_pos | Physical coordinate |
|
pure virtualnoexcept |
Resolve particle and photon injection at the EB.
Routine is here to handle charge injection, secondary emission etc.
| [out] | a_outgoingParticles | Outgoing plasma species particles. |
| [out] | a_outgoingPhotons | Photons injected through the EB |
| [in] | a_incomingParticles | Particles that left the computational domain through the EB |
| [in] | a_incomingPhotons | Photons that left the computational domain through the EB |
| [in] | a_newNumParticles | Total number of particles in the cut-cell AFTER the transport step |
| [in] | a_oldNumParticles | Total number of particles in the cut-cell BEFORE the transport step |
| [in] | a_electricField | Electric field |
| [in] | a_cellCenter | Physical position of the cell center. |
| [in] | a_cellCentroid | Cell centroid relative to the cell center (not multiplied by dx) |
| [in] | a_bndryCentroid | EB face centroid relative to the cell center (not multiplied by dx) |
| [in] | a_bndryNormal | Cut-cell normal vector. |
| [in] | a_bndryArea | Cut-cell boundary area - not multiplied by dx (2D) or dx^2 (3D) |
| [in] | a_dx | Grid resolution on this level. |
| [in] | a_dt | Time step |
| [in] | a_isDielectric | Dielectric or electrode. |
| [in] | a_matIndex | Material index (taken from computationalGeometry) |
Implemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
inlinenoexcept |
Reconcile the number of particles.
This will add/remove particles and potentially also adjust the particle weights.
| [in,out] | a_particles | Computational particles |
| [in] | a_newNumParticles | New number of particles (i.e., after the KMC advance) |
| [in] | a_oldNumParticles | Previous number of particles (i.e., before the KMC advance) |
| [in] | a_cellPos | Cell center position |
| [in] | a_centroidPos | Cell centroid position |
| [in] | a_loCorner | Low corner of minimum box enclosing the cut-cell |
| [in] | a_hiCorner | High corner of minimum box enclosing the cut-cell |
| [in] | a_bndryCentroid | Cut-cell boundary centroid |
| [in] | a_bndryNormal | Cut-cell normal (pointing into the domain) |
| [in] | a_dx | Grid resolution |
| [in] | a_kappa | Cut-cell volume fraction. |
|
inlinenoexcept |
Reconcile photoionization reactions.
| [in,out] | a_particles | Particle products. |
| [in] | a_absorbedPhotons | Photons absorbed on the mesh. |
This runs through the photo-reactions and associates photo-ionization products.
|
inlinenoexcept |
Generate new photons.
This will add photons
| [in] | a_newPhotons | New photons |
| [in] | a_numNewPhotons | Number of physical photons to be generated. |
| [in] | a_cellPos | Cell center position |
| [in] | a_centroidPos | Cell centroid position |
| [in] | a_loCorner | Low corner of minimum box enclosing the cut-cell |
| [in] | a_hiCorner | High corner of minimum box enclosing the cut-cell |
| [in] | a_bndryCentroid | Cut-cell boundary centroid |
| [in] | a_bndryNormal | Cut-cell normal (pointing into the domain) |
| [in] | a_dx | Grid resolution |
| [in] | a_kappa | Cut-cell volume fraction. |
|
inlineprotected |
Remove particles from the input list.
This will remove weight from the input particles if we can. Otherwise we remove full particles.
| [in,out] | a_particles | List of (super-)particles to remove from. |
| [in] | a_numToRemove | Number of physical particles to remove from the input list |
|
protectedpure virtualnoexcept |
Update reaction rates.
| [in] | a_E | Electric field |
| [in] | a_dx | Grid resolution |
| [in] | a_kappa | Cut-cell volume fraction |
Implemented in Physics::ItoPlasma::ItoPlasmaAir3LFA.
|
protected |
Solver setting for the Cao et. al. algorithm.
Equal to the maximum permitted change in the relative propensity for non-critical reactions
|
protected |
Solver setting for the Cao et. al algorithm.
Determines critical reactions. A reaction is critical if it is m_Ncrit firings away from depleting a reactant.
|
protected |
Solver setting for the Cao et. al algorithm.
Maximum number of SSA steps to run when switching into SSA-based advancement for non-critical reactions.
|
protected |
Solver setting for the Cao et. al. algorithm.
Equal to the maximum permitted change in the relative propensity for non-critical reactions