|
chombo-discharge
|
Implementation of ItoKMCGodunovStepper that also evaluates the background field at every regrid/time step. More...
#include <CD_ItoKMCBackgroundEvaluator.H>


Public Member Functions | |
| ItoKMCBackgroundEvaluator (RefCountedPtr< ItoKMCPhysics > &a_physics) noexcept | |
| Constructor. | |
| virtual void | postInitialize () noexcept override final |
| Post-initialization operations. Computes the background field. | |
| virtual void | postRegrid () noexcept override final |
| Post-regrid operations. Computes the background field. | |
| virtual void | postCheckpointSetup () noexcept override final |
| Post-checkpoint operations. Computes the background field. | |
| virtual void | printStepReport () noexcept override final |
| Print a new step report. This is the old one plus the maximum field change. | |
| virtual Real | advance (const Real a_dt) override |
| Overriden advance method. | |
| virtual Real | computeDt () override |
| Compute a time step used for the advance method. | |
Public Member Functions inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F > | |
| ItoKMCGodunovStepper ()=delete | |
| Disallowed default constructor. Use the full constructor. | |
| ItoKMCGodunovStepper (RefCountedPtr< ItoKMCPhysics > &a_physics, bool a_parseOptions=true) | |
| Full constructor. | |
| virtual | ~ItoKMCGodunovStepper () |
| Destructor. Does nothing. | |
| virtual void | allocate () noexcept override |
| Allocate storage required for advancing the equations. | |
| virtual void | parseOptions () noexcept override |
| Parse options. | |
| virtual void | parseRuntimeOptions () noexcept override |
| Parse run-time options. | |
| virtual void | preRegrid (const int a_lmin, const int a_oldFinestLevel) noexcept override |
| Perform pre-regrid operations. | |
| virtual void | registerOperators () noexcept override |
| Register operators used for the simulation. | |
| virtual void | regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) noexcept override |
| Regrid methods – puts all data on the new mesh. | |
| virtual void | postPlot () noexcept override |
| Perform post-plot operations. | |
Public Member Functions inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F > | |
| ItoKMCStepper () noexcept | |
| Default constructor. Sets default options. | |
| ItoKMCStepper (RefCountedPtr< ItoKMCPhysics > &a_physics) noexcept | |
| Full constructor. Calls the other constructor. | |
| virtual | ~ItoKMCStepper () noexcept |
| Destructor. | |
| virtual void | setupSolvers () noexcept override |
| Set up solvers. | |
| virtual void | initialData () noexcept override |
| Fill solvers with initial data. | |
| virtual int | getNumberOfPlotVariables () const noexcept override |
| Get number of plot variables for the output file. | |
| virtual Vector< std::string > | getPlotVariableNames () const noexcept override |
| Get plot variable names. | |
| virtual void | writePlotData (LevelData< EBCellFAB > &a_output, int &a_icomp, const std::string a_outputRealm, const int a_level) const noexcept override |
| Write plot data to output holder. | |
| virtual Vector< long int > | getCheckpointLoads (const std::string a_realm, const int a_level) const override |
| Get computational loads to be checkpointed. | |
| virtual void | synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) noexcept override |
| Synchronize solver times for all the solvers. | |
| virtual void | registerRealms () noexcept override |
| Register realms used for the simulation. | |
| virtual void | prePlot () noexcept override |
| Perform pre-plot operations. | |
| virtual bool | loadBalanceThisRealm (const std::string a_realm) const override |
| Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines will be called during regrids for the input realm. | |
| virtual void | loadBalanceBoxes (Vector< Vector< int > > &a_procs, Vector< Vector< Box > > &a_boxes, const std::string a_realm, const Vector< DisjointBoxLayout > &a_grids, const int a_lmin, const int a_finestLevel) override |
| Load balance grid boxes for a specified realm. | |
| virtual void | setVoltage (const std::function< Real(const Real a_time)> &a_voltage) noexcept |
| Set voltage used for the simulation. | |
| virtual Real | getTime () const noexcept |
| Get current simulation time. | |
| virtual void | computeElectricField (EBAMRCellData &a_electricField, const phase::which_phase a_phase) const noexcept |
| Recompute the electric field onto the specified data holder. | |
Public Member Functions inherited from TimeStepper | |
| TimeStepper () | |
| Default constructor (does nothing) | |
| virtual | ~TimeStepper () |
| Default destructor (does nothing) | |
| void | setAmr (const RefCountedPtr< AmrMesh > &a_amr) |
| Set AmrMesh. | |
| void | setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry) |
| Set the computational geometry. | |
| virtual bool | needToRegrid () |
| Fuction which can have Driver do regrids at arbitrary points in the simulation. | |
| bool | keepGoing () const |
| Query whether the time stepper wants to continue stepping. | |
Protected Attributes | |
| Real | m_maxFieldExitCrit |
| Exit criterion for maximum field – if the background field changes by this much the simulation is terminated. | |
| Real | m_relFieldExitCrit |
| Exit criterion for relative field – if the relative change in the background field in any cell changes by this much the simulation is terminated. | |
| Real | m_maxInitialTimeStep |
| Initial time step size. Introduced to limit the initial particles from moving to far in the initial timestep. | |
| Real | m_maxFieldChange |
| Change in max field. | |
| Real | m_relFieldChange |
| Change in relative field. | |
| Real | m_electrodeCharge |
| Total charge on the electrode, given by \int(eps*E dA) | |
| Real | m_ohmicCharge |
| Total charge that left through the electrode in the last time step. | |
| Real | m_sumOpticalPhi |
| Integrated optical emissions (phi) | |
| Real | m_sumOpticalSrc |
| Integrated optical emissions (source term) | |
| std::string | m_opticalSolver |
| Name of the optical solver. | |
| MFAMRCellData | m_backgroundField |
| For storing the background field. | |
Protected Attributes inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F > | |
| bool | m_writeCheckpointParticles |
| If true, then the particles are checkpointed so we can regrid on checkpoint-restart. | |
| bool | m_readCheckpointParticles |
| If true, then the HDF5 checkpoint file contained particles that we can read. | |
| bool | m_canRegridOnRestart |
| If true, then the class supports regrid-on-restart. | |
| bool | m_extendConductivityEB |
| For achieving a slightly smoother gradient in the conductivity near the EB. | |
| bool | m_emitSecondaryParticlesBeforeReactions |
| If true, particles will be emitted before the reactive step. | |
| WhichAlgorithm | m_algorithm |
| Which advancement algorithm to use. | |
| Timer | m_timer |
| Timer used for run-time logging of routines. | |
| int | m_rhoFilterNum |
| Number of filterings when computing the semi-implicit space charge density. | |
| int | m_rhoFilterMaxStride |
| Stride when filtering the space charge density. | |
| Real | m_rhoFilterAlpha |
| Factor for strided filter. Alpha=0.5 yields a bilinear filter. | |
| int | m_condFilterNum |
| Number of filterings of the conductivity. | |
| int | m_condFilterMaxStride |
| Stride when filtering the conductivity. | |
| Real | m_condFilterAlpha |
| Factor for strided filter. Alpha=0.5 yields a bilinear filter. | |
| Real | m_maxFieldAbort |
| Limit for maximum field abort. | |
| Vector< RefCountedPtr< ParticleContainer< PointParticle > > > | m_conductivityParticles |
| Storage for simplified particles that gave us sigma^k. | |
| Vector< RefCountedPtr< ParticleContainer< PointParticle > > > | m_irregularParticles |
| Storage for particles that fell inside the EB but should still contribute to the conductivity. | |
| Vector< RefCountedPtr< ParticleContainer< PointParticle > > > | m_rhoDaggerParticles |
| Storage for particles that gave rho^dagger. | |
| EBAMRCellData | m_semiImplicitRhoCDR |
| Storage for CDR densities used during the semi-implicit solve. | |
| EBAMRCellData | m_semiImplicitConductivityCDR |
| Storage for conductivity term due to mobile CDR species. | |
| EBAMRCellData | m_scratchSemiImplicitRhoCDR |
| Scratch storage for CDR contribution to space charge density. | |
| EBAMRCellData | m_scratchSemiImplicitConductivityCDR |
| Scratch storage for CDR contribution to conductivity. | |
| Vector< EBAMRCellData > | m_cdrDivD |
| Storage for the finite-volume approximation of div(D*grad(phi)) for the CDR equations. | |
Protected Attributes inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F > | |
| BoxSorting | m_boxSort |
| Box sorting method when using dual-grid with particle load balancing. | |
| TimeCode | m_timeCode |
| Time code for understanding how the time step was restricted. | |
| std::string | m_fluidRealm |
| Realm used for the fluid part (i.e., electrostatic) part of the simulation. | |
| std::string | m_particleRealm |
| Realm used for the particle part of the simulation. | |
| std::string | m_name |
| Time stepper name. | |
| phase::which_phase | m_plasmaPhase |
| Phase where we solve for the plasma. | |
| RefCountedPtr< ItoKMCPhysics > | m_physics |
| Implementation of ItoKMCPhysics. | |
| RefCountedPtr< ItoLayout< ItoSolver > > | m_ito |
| Ito solvers. | |
| RefCountedPtr< CdrLayout< CdrSolver > > | m_cdr |
| CDR solvers. | |
| RefCountedPtr< RtLayout< McPhoto > > | m_rte |
| Radiative transfer solvers. | |
| RefCountedPtr< FieldSolver > | m_fieldSolver |
| Field solver. | |
| RefCountedPtr< SurfaceODESolver< 1 > > | m_sigmaSolver |
| Surface charge solver. | |
| Vector< ParticleContainer< ItoParticle > > | m_secondaryParticles |
| List of secondary particles injected through the EB. | |
| Vector< ParticleContainer< Photon > > | m_secondaryPhotons |
| List of secondary photons injected through the EB. | |
| Vector< EBAMRIVData > | m_cdrFluxes |
| CDR fluxes for CDR BCs. | |
| Vector< EBAMRIVData > | m_cdrFluxesExtrap |
| Extrapolated CDR fluxes. | |
| std::function< Real(const Real a_time)> | m_voltage |
| Voltage curve on the electrodes used in the simulation. | |
| bool | m_abortOnFailure |
| Flag for abandoning simulation of Poisson solver fails. | |
| bool | m_redistributeCDR |
| Flag for abandoning simulation of Poisson solver fails. | |
| bool | m_dualGrid |
| Using dual grid or not. | |
| bool | m_profile |
| Profile kernels or not. | |
| bool | m_regridSuperparticles |
| Do or do not superparticle merging/splitting on regrids. | |
| bool | m_loadBalanceParticles |
| Load balance particle realm or not. | |
| bool | m_loadBalanceFluid |
| Load balance fluid realm or not. | |
| bool | m_plotConductivity |
| Plot conductivity or not. | |
| bool | m_plotCurrentDensity |
| Plot conductivity or not. | |
| bool | m_plotParticlesPerPatch |
| Plot number of particles per patch or not. | |
| Vector< int > | m_particlesPerCell |
| Target number of particles per cell when squishing ItoParticle's into superparticles. | |
| int | m_mergeInterval |
| How often to merge superparticles. | |
| Real | m_maxReducedField |
| Storage for the maximum field strength that was computed. | |
| Real | m_prevDt |
| Previous time step. | |
| Real | m_maxGrowthDt |
| Maximum permissible time step growth. | |
| Real | m_maxShrinkDt |
| Maximum permissible time step shrinkage. | |
| Real | m_loadPerCell |
| The "background" load per cell when using particle load balancing. | |
| Real | m_toleranceEB |
| Accepted tolerance (relative to dx) for EB intersection. | |
| Real | m_minParticleAdvectionCFL |
| Minimum CFL-like time step for particle advection. | |
| Real | m_maxParticleAdvectionCFL |
| Maximum CFL-like time step for particle advection. | |
| Real | m_minParticleDiffusionCFL |
| Minium CFL-like time step for particle diffusion. | |
| Real | m_maxParticleDiffusionCFL |
| Maximum CFL-like time step for particle diffusion. | |
| Real | m_minParticleAdvectionDiffusionCFL |
| Maximum CFL-like time step for particle advection-diffusion. | |
| Real | m_maxParticleAdvectionDiffusionCFL |
| Maximum CFL-like time step for particle advection-diffusion. | |
| Real | m_fluidAdvectionDiffusionCFL |
| CFL-like time step for fluid advection-diffusion. | |
| Real | m_relaxTimeFactor |
| Factor proportional to the dielectric relaxation time dtRelax = eps0/sigma. | |
| Real | m_minDt |
| Minimum permitted time step. | |
| Real | m_maxDt |
| Maximum permitted time step. | |
| Real | m_particleAdvectionDt |
| The particle advective time step. | |
| Real | m_particleDiffusionDt |
| The particle diffusive time step. | |
| Real | m_particleAdvectionDiffusionDt |
| The advection-diffusion time step. | |
| Real | m_fluidAdvectionDiffusionDt |
| The advection-diffusion time step for the CDR equations. | |
| Real | m_relaxationTime |
| The relaxation time eps0/sigma. | |
| Real | m_physicsDt |
| The physics-based time step. | |
| Real | m_physicsDtFactor |
| Relative factor for controlling. | |
| Vector< EBAMRCellData > | m_loadBalancePPC |
| For holding the number of computational particles per cell when load balancing. | |
| Vector< EBAMRCellData > | m_cdrMobilities |
| For holding the mobilities for the CDR species. | |
| Vector< EBAMRCellData > | m_fluidGradPhiCDR |
| For holding the gradient of all CDR species densities. | |
| Vector< EBAMRCellData > | m_fluidGradPhiIto |
| For holding the gradient of all Ito species densities. | |
| Vector< EBAMRCellData > | m_fluidPhiIto |
| For holding the Ito species densities on the fluid realm. | |
| Vector< ParticleContainer< PointParticle > > | m_cdrPhotoiProducts |
| Photoionization products to be put in the CDR equations. | |
| Vector< int > | m_loadBalanceIndices |
| Solver indices used when load-balancing the particle solvers. | |
| EBAMRCellData | m_currentDensity |
| Storage for current density. | |
| EBAMRCellData | m_physicsPlotVariables |
| Storage for physics plot variables. | |
| EBAMRCellData | m_neutralDensity |
| Storage for the neutral density. | |
| EBAMRCellData | m_conductivityCell |
| Cell-centered conductivity. | |
| EBAMRFluxData | m_conductivityFace |
| Face-centered conductivity. | |
| EBAMRIVData | m_conductivityEB |
| EB-centered conductivity. | |
| EBAMRCellData | m_particleItoPPC |
| For holding the number of physical particles per cell for all Ito species. | |
| EBAMRCellData | m_particleYPC |
| For holding the number of generated photons per cell. | |
| EBAMRCellData | m_particleEPS |
| For holding the mean particle energy. | |
| EBAMRCellData | m_particleOldItoPPC |
| For holding the previous number of particles per cell for all species. | |
| EBAMRCellData | m_fluidCdrPPC |
| For holding the number of physical particles per cell for all CDR species. | |
| EBAMRCellData | m_fluidOldCdrPPC |
| For holding the previous number of physical particles per cell for all CDR species. | |
| EBAMRCellData | m_fluidPPC |
| For holding the number of particles per cell for all species. | |
| EBAMRCellData | m_fluidYPC |
| For holding the number of generated photons per cell. | |
| EBAMRCellData | m_electricFieldFluid |
| Storage for holding the plasma phase electric field on the fluid realm. | |
| EBAMRCellData | m_electricFieldParticle |
| Storage for holding the plasma phase electric field on the particle realm. | |
| EBAMRCellData | m_kmcDt |
| Storage for the non-critical time step computed by ItoKMCPhysics. | |
| Vector< EBAMRCellData > | m_energySources |
| Storage for holding the energy sources for each species. | |
| EBAMRCellData | m_EdotJ |
| Storage for holdnig E*J on the fluid realm. 1 component. | |
| EBAMRCellData | m_fluidScratch1 |
| Scratch storage on the fluid realm having 1 component. | |
| EBAMRCellData | m_fluidScratchD |
| Scratch storage on the fluid realm with SpaceDim components. | |
| EBAMRCellData | m_particleScratch1 |
| Scratch storage on the particle realm with 1 component. | |
| EBAMRCellData | m_particleScratchD |
| Scratch storage on the particle realm with SpaceDim components. | |
| EBAMRIVData | m_fluidScratchEB |
| Scratch storage for EB-only data on the fluid realm. One component. | |
| EBAMRIVData | m_particleScratchEB |
| Scratch storage for EB-only data on the particle realm. One component. | |
Protected Attributes inherited from TimeStepper | |
| int | m_verbosity |
| Class verbosity. | |
| int | m_timeStep |
| Time step. | |
| Real | m_time |
| TIme. | |
| Real | m_dt |
| Previous time step size. | |
| bool | m_keepGoing |
| If false, Driver will stop the time loop after the current step. | |
| RefCountedPtr< AmrMesh > | m_amr |
| AmrMesh. | |
| RefCountedPtr< ComputationalGeometry > | m_computationalGeometry |
| Computational geometry. | |
Additional Inherited Members | |
Protected Types inherited from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F > | |
| enum class | WhichAlgorithm { EulerMaruyama } |
| Simple enum for distinguishing between algorithms. | |
Protected Types inherited from Physics::ItoKMC::ItoKMCStepper< I, C, R, F > | |
| enum class | TimeCode { AdvectionIto , DiffusionIto , AdvectionDiffusionIto , AdvectionDiffusionCDR , RelaxationTime , Hardcap , Physics } |
| An enum for encapsulating how time steps were restricted. | |
Implementation of ItoKMCGodunovStepper that also evaluates the background field at every regrid/time step.
|
noexcept |
Constructor.
| [in] | a_physics | Physics kernel that will be used. |
Overriden advance method.
| [in] | a_dt | Time step |
Reimplemented from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >.
|
overridevirtual |
Compute a time step used for the advance method.
Reimplemented from Physics::ItoKMC::ItoKMCGodunovStepper< I, C, R, F >.
|
protectedvirtualnoexcept |
Evaluate the maximum change in the background field.
|
protectedvirtualnoexcept |
Compute total charge on electrode.
This returns \int(eps * E)*dA
|
protectedvirtualnoexcept |
Compute the total ohmic current through the electrode.
This returns the total charge that left the electrode in the last time step.
|
protectedvirtualnoexcept |
Integrate the sum of the optical excitations.
This returns the sum of the emissions, and the sum of the excitations.
|
finaloverridevirtualnoexcept |
Post-checkpoint operations. Computes the background field.
Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.
|
finaloverridevirtualnoexcept |
Post-initialization operations. Computes the background field.
Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.
|
finaloverridevirtualnoexcept |
Post-regrid operations. Computes the background field.
Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.
|
finaloverridevirtualnoexcept |
Print a new step report. This is the old one plus the maximum field change.
Reimplemented from Physics::ItoKMC::ItoKMCStepper< I, C, R, F >.
|
protected |
For storing the background field.
This field is space- and surface-charge free and is filled by computeBackgroundField
|
protected |
Initial time step size. Introduced to limit the initial particles from moving to far in the initial timestep.
Default constructed to 0.0, which indicates normal operation.