chombo-discharge
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Physics::CdrPlasma::CdrPlasmaGodunovStepper Class Reference

Class for evolving plasma equations using a split step Godunov method. More...

#include <CD_CdrPlasmaGodunovStepper.H>

Inheritance diagram for Physics::CdrPlasma::CdrPlasmaGodunovStepper:
Inheritance graph
[legend]
Collaboration diagram for Physics::CdrPlasma::CdrPlasmaGodunovStepper:
Collaboration graph
[legend]

Classes

class  CdrStorage
 Utility class for memory handling in CdrPlasmaStepper. More...
 
class  FieldStorage
 Utility class for memory handling in CdrPlasmaStepper. More...
 
class  RtStorage
 Utility class for memory handling in CdrPlasmaStepper. More...
 
class  SigmaStorage
 Utility class for memory handling in CdrPlasmaStepper. More...
 

Public Member Functions

 CdrPlasmaGodunovStepper ()=delete
 Disallowed constructor – use strong construction.
 
 CdrPlasmaGodunovStepper (RefCountedPtr< CdrPlasmaPhysics > &a_physics)
 Full constructor. More...
 
virtual ~CdrPlasmaGodunovStepper ()
 Destructor.
 
void parseOptions () override
 Parse startup options.
 
void parseRuntimeOptions () override
 Parse run-time adjustable parameters.
 
Real advance (const Real a_dt) override
 Implementation of the advance method. More...
 
void preRegrid (const int a_lbase, const int a_oldFinestLevel) override
 Pre-regrid method. Used for storing important variables for the solvers. More...
 
void regrid (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 Regrid method. More...
 
void postRegrid () override
 Perform post-regrid operations. More...
 
Real computeDt () override
 Compute the time step – this will be different for the different supported algorithms.
 
void postCheckpointSetup () override
 Run post-checkpoint setup operations. More...
 
- Public Member Functions inherited from Physics::CdrPlasma::CdrPlasmaStepper
 CdrPlasmaStepper ()
 Empty constructor.
 
 CdrPlasmaStepper (RefCountedPtr< CdrPlasmaPhysics > &a_physics)
 Full constructor. More...
 
 ~CdrPlasmaStepper ()
 Destructor.
 
virtual void setupSolvers () override
 Instantiate solvers.
 
virtual void allocate () override
 Allocate data for the time stepper and solvers.
 
virtual void initialData () override
 Fill all solvers with initial data.
 
virtual void postInitialize () override
 Post-initialize operations to be performed after filling solvers with initialData.
 
virtual void registerRealms () override
 Register realms to be used for the simulation.
 
virtual void registerOperators () override
 Register operators to be used for the simulation.
 
virtual void prePlot () override
 Compute some thing that go into plot files.
 
virtual int getNumberOfPlotVariables () const override
 Get the number of plot variables for this time stepper. More...
 
virtual Vector< std::string > getPlotVariableNames () const 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 override
 Write plot data to output holder. More...
 
virtual void synchronizeSolverTimes (const int a_step, const Real a_time, const Real a_dt) override
 Synchronize solver times. More...
 
virtual void printStepReport () override
 Print a step report. More...
 
virtual void preRegridInternals (const int a_lmin, const int a_oldFinestLevel)
 Do a preRegrid operation for internal storage (if needed). More...
 
virtual void computeJ (EBAMRCellData &a_J) const
 Compute the current density. More...
 
virtual void computeElectricField (MFAMRCellData &a_electricFieldCell, const MFAMRCellData &a_potential) const
 Compute the cell-centered electric field on both phases. More...
 
virtual void computeElectricField (EBAMRCellData &a_electricFieldCell, const phase::which_phase a_phase) const
 Compute the cell-centered electric field on a specific phase using whatever is available in m_fieldSolver. More...
 
virtual void computeElectricField (EBAMRCellData &a_E, const phase::which_phase a_phase, const MFAMRCellData &a_potential) const
 Compute the cell-centered electric field on a specific phase. More...
 
virtual void computeElectricField (EBAMRFluxData &a_electricFieldFace, const phase::which_phase a_phase, const EBAMRCellData &a_electricFieldCell) const
 Compute the face-centered electric field. This will only do the normal component. More...
 
virtual void computeElectricField (EBAMRIVData &a_electricFieldEB, const phase::which_phase a_phase, const EBAMRCellData &a_electricFieldCell) const
 Compute the EB-centered electric field. More...
 
virtual void computeMaxElectricField (Real &a_maxElectricField, const phase::which_phase a_phase)
 Compute the maximum of the electric field. More...
 
virtual Real getTime () const
 Return time. More...
 
virtual bool stationaryRTE ()
 Check if RTE solvers are stationary. More...
 
virtual void deallocate ()
 Deallocation function. This will deallocate internal storage in the subclasses as well as the solvers.
 
virtual void computeSpaceChargeDensity ()
 Compute the centroid-centered space charge density by using the data inside the CDR solvers. More...
 
virtual void computeSpaceChargeDensity (MFAMRCellData &a_rho, const Vector< EBAMRCellData * > &a_cdrDensities)
 Compute the centroid-centered space charge density. More...
 
virtual void computeCellConductivity (EBAMRCellData &a_cellConductivity) const
 Compute the cell-centered conductivity. More...
 
virtual void computeFaceConductivity (EBAMRFluxData &a_conductivityFace, EBAMRIVData &a_conductivityEB, const EBAMRCellData &a_conductivityCell) const
 Compute the face-centered conductivity from a cell-centered conductivity. More...
 
virtual void setupSemiImplicitPoisson (const Real a_dt)
 Set up a semi-implicit Poisson solver. More...
 
virtual void setupSemiImplicitPoisson (const EBAMRFluxData &a_conductivityFace, const EBAMRIVData &a_conductivityEB, const Real a_factor)
 Set up a semi-implicit Poisson solver. More...
 
virtual bool solvePoisson ()
 Solve the electrostatic Poisson equation. More...
 
virtual bool solvePoisson (MFAMRCellData &a_potential, MFAMRCellData &a_rho, const Vector< EBAMRCellData * > a_cdrDensities, const EBAMRIVData &a_sigma)
 General electrostatic Poisson solver routine. More...
 
virtual void advanceReactionNetwork (const Real a_time, const Real a_dt)
 Advance the reaction network. This will compute the electric field (on the appropriate phase) and call the other version. More...
 
virtual void advanceReactionNetwork (Vector< EBAMRCellData * > &a_cdrSources, Vector< EBAMRCellData * > &a_rteSources, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_rteDensities, const EBAMRCellData &a_E, const Real &a_time, const Real &a_dt)
 Compute reaction network source terms. More...
 
virtual void advanceReactionNetwork (Vector< EBAMRCellData * > &a_cdrSources, Vector< EBAMRCellData * > &a_rteSources, const Vector< EBAMRCellData * > &a_cdrDensities, const Vector< EBAMRCellData * > &a_cdrGradients, const Vector< EBAMRCellData * > &a_rteDensities, const EBAMRCellData &a_E, const Real &a_time, const Real &a_dt)
 Compute reaction network source terms. This is the AMR version that does all levels. More...
 
virtual void advanceReactionNetwork (Vector< LevelData< EBCellFAB > * > &a_cdrSources, Vector< LevelData< EBCellFAB > * > &a_rteSources, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const Vector< LevelData< EBCellFAB > * > &a_cdrGradients, const Vector< LevelData< EBCellFAB > * > &a_rteDensities, const LevelData< EBCellFAB > &a_E, const Real &a_time, const Real &a_dt, const int a_level)
 Compute reaction network source terms. This is the level version. More...
 
virtual void advanceReactionNetworkRegularCells (Vector< FArrayBox * > &a_cdrSources, Vector< FArrayBox * > &a_rteSources, const Vector< FArrayBox * > &a_cdrDensities, const Vector< FArrayBox * > &a_cdrGradients, const Vector< FArrayBox * > &a_rteDensities, const FArrayBox &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_cellBox)
 Compute reaction network sources. This is the regular version which does not do the cut-cells. More...
 
virtual void advanceReactionNetworkIrreg (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const BaseIVFAB< VoFStencil > &a_interpStencils, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_cellBox, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. This is the irregular version which only does the cut-cells. More...
 
virtual void advanceReactionNetworkIrregInterp (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const BaseIVFAB< VoFStencil > &a_interpStencils, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_box, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. This version interpolates everything to the centroid and runs with that data. More...
 
virtual void advanceReactionNetworkIrregKappa (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_rteDensities, const BaseIVFAB< VoFStencil > &a_interpStencils, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_box, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. This version assumes that some of the inputs are on the centroid. More...
 
virtual void advanceReactionNetworkIrregUpwind (Vector< EBCellFAB * > &a_cdrSources, Vector< EBCellFAB * > &a_rteSources, const Vector< EBCellFAB * > &a_cdrDensities, const Vector< EBCellFAB * > &a_cdrGradients, const Vector< EBCellFAB * > &a_cdrVelocities, const Vector< EBCellFAB * > &a_rteDensities, const BaseIVFAB< VoFStencil > &a_interpStencils, const EBCellFAB &a_E, const Real &a_time, const Real &a_dt, const Real &a_dx, const Box &a_box, const int a_lvl, const DataIndex &a_dit)
 Compute reaction network sources. More...
 
virtual void computeCdrDiffusion ()
 Compute diffusion things using whatever is available in the solvers. More...
 
virtual void computeCdrDiffusion (const EBAMRCellData &a_electricFieldCell, const EBAMRIVData &a_electricFieldEB)
 Compute diffusion things using whatever is available in the solvers. This version uses the input electric fields. More...
 
virtual void computeCdrDiffusionCell (Vector< EBAMRCellData > &a_cdrDcoCell, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_electricFieldCell, const Real &a_time)
 Compute CDR diffusion coefficients on cell centers. This will call the level version. More...
 
virtual void computeCdrDiffusionCell (Vector< LevelData< EBCellFAB > * > &a_cdrDcoCell, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const LevelData< EBCellFAB > &a_electricFieldCell, const int a_lvl, const Real &a_time)
 Compute diffusion coefficients. This is the level version and it will iterate through grid patches. More...
 
virtual void computeCdrDiffusionCellRegular (Vector< FArrayBox * > &a_cdrDcoCell, const Vector< FArrayBox * > &a_cdrDensities, const FArrayBox &a_electricFieldCell, const Box a_cellBox, const Real a_dx, const Real a_time)
 Compute diffusion coefficients on cell centers. This does all the regular cells. More...
 
virtual void computeCdrDiffusionCellIrregular (Vector< EBCellFAB * > &a_cdrDcoCell, const Vector< EBCellFAB * > &a_cdrDensities, const EBCellFAB &a_electricFieldCell, const Real a_dx, const Real &a_time, const int a_lvl, const DataIndex &a_dit)
 Compute diffusion coefficients on cell centers. This version does the irregular cells. More...
 
virtual void computeCdrDiffusionFace (Vector< EBAMRFluxData * > &a_cdrDcoFace, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_electricFieldCell, const Real &a_time)
 Compute diffusion coefficients on face centers. More...
 
virtual void computeCdrDiffusionEb (Vector< EBAMRIVData * > &a_cdrDcoEB, const Vector< EBAMRIVData * > &a_cdrDensitiesEB, const EBAMRIVData &a_electricFieldEB, const Real &a_time)
 Compute diffusion coefficients on the EB. This is the AMR version – it will call the level version. More...
 
virtual void computeCdrDiffusionEb (Vector< LevelData< BaseIVFAB< Real >> * > &a_cdrDcoEB, const Vector< LevelData< BaseIVFAB< Real >> * > &a_cdrDensitiesEB, const LevelData< BaseIVFAB< Real >> &a_electricFieldEB, const Real &a_time, const int a_lvl)
 Compute diffusion coefficients on the EB. This is a level version but it will go through all patches. More...
 
virtual void computeCdrDriftVelocities ()
 Compute the CDR drift velocities. More...
 
virtual void computeCdrDriftVelocities (Vector< EBAMRCellData * > &a_velocities, const Vector< EBAMRCellData * > &a_cdrDensities, const EBAMRCellData &a_E, const Real &a_time)
 Compute the cell-centered CDR velocities. This will call the level version. More...
 
virtual void computeCdrDriftVelocities (Vector< LevelData< EBCellFAB > * > &a_cdrVelocities, const Vector< LevelData< EBCellFAB > * > &a_cdrDensities, const LevelData< EBCellFAB > &a_electricField, const int a_lvl, const Real &a_time)
 Compute the cell-centered CDR velocities. More...
 
virtual void computeCdrDriftVelocitiesRegular (Vector< FArrayBox * > &a_cdrVelocities, const Vector< FArrayBox * > &a_cdrDensities, const FArrayBox &a_electricField, const Box &a_cellBox, const Real &a_time, const Real &a_dx)
 Compute the cell-centered CDR velocities. More...
 
virtual void computeCdrDriftVelocitiesIrregular (Vector< EBCellFAB * > &a_velocities, const Vector< EBCellFAB * > &a_cdrDensities, const EBCellFAB &a_electricField, const Real &a_time, const Real &a_dx, const int a_lvl, const DataIndex &a_dit)
 Compute the cell-centered CDR velocities. More...
 
virtual void computeCdrFluxes (Vector< EBAMRIVData * > &a_cdrFluxesEB, const Vector< EBAMRIVData * > &a_extrapCdrFluxes, const Vector< EBAMRIVData * > &a_extrapCdrDensities, const Vector< EBAMRIVData * > &a_extrapCdrVelocities, const Vector< EBAMRIVData * > &a_extrapCdrGradients, const Vector< EBAMRIVData * > &a_extrapRteFluxes, const EBAMRIVData &a_electricField, const Real &a_time)
 Compute CDR fluxes on the EB. This is the AMR version – it will call the level version. More...
 
virtual void computeCdrFluxes (Vector< LevelData< BaseIVFAB< Real >> * > &a_cdrFluxesEB, const Vector< LevelData< BaseIVFAB< Real >> * > &a_extrapCdrFluxes, const Vector< LevelData< BaseIVFAB< Real >> * > &a_extrapCdrDensities, const Vector< LevelData< BaseIVFAB< Real >> * > &a_extrapCdrVelocities, const Vector< LevelData< BaseIVFAB< Real >> * > &a_extrapCdrGradients, const Vector< LevelData< BaseIVFAB< Real >> * > &a_extrapRteFluxes, const LevelData< BaseIVFAB< Real >> &a_electricField, const Real &a_time, const int a_lvl)
 Compute CDR fluxes on the EB. This is the level version which will fill EB fluxes on both electrode and dielectric cells. More...
 
virtual void computeCdrDomainFluxes (Vector< EBAMRIFData * > &a_cdrFluxes, const Vector< EBAMRIFData * > &a_extrapCdrFluxes, const Vector< EBAMRIFData * > &a_extrapCdrDensities, const Vector< EBAMRIFData * > &a_extrapCdrVelocities, const Vector< EBAMRIFData * > &a_extrapCdrGradients, const Vector< EBAMRIFData * > &a_extrapRteFluxes, const EBAMRIFData &a_field, const Real &a_time)
 Compute CDR fluxes on domain faces for usage in boundary conditions. This is the AMR version. More...
 
virtual void computeCdrDomainFluxes (Vector< LevelData< DomainFluxIFFAB > * > a_cdrFluxes, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrFluxes, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrDensities, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrVelocities, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapCdrGradients, const Vector< LevelData< DomainFluxIFFAB > * > &a_extrapRteFluxes, const LevelData< DomainFluxIFFAB > &a_electricField, const Real &a_time, const int a_lvl)
 Compute CDR fluxes on domain faces for usage in boundary conditions. This is the level version. More...
 
virtual void computeExtrapolatedFluxes (Vector< EBAMRIVData * > &a_extrapCdrFluxesEB, const Vector< EBAMRCellData * > a_cdrDensities, const Vector< EBAMRCellData * > a_cdrVelocities, const phase::which_phase a_phase)
 Extrapolate cell-centered fluxes to the EB centroid. More...
 
virtual void computeExtrapolatedDomainFluxes (Vector< EBAMRIFData * > &a_cdrDomainFluxes, const Vector< EBAMRCellData * > a_cdrDensities, const Vector< EBAMRCellData * > a_cdrVelocities, const phase::which_phase a_phase)
 Extrapolate drift fluxes to domain faces. More...
 
virtual void computeExtrapolatedVelocities (Vector< EBAMRIVData * > &a_cdrVelocitiesEB, const Vector< EBAMRCellData * > a_cdrVelocitiesCell, const phase::which_phase a_phase)
 Extrapolated cell-centered velocities to the EB. More...
 
virtual void deallocateSolverInternals ()
 Deallocate internal solver storages.
 
virtual void extrapolateToEb (Vector< EBAMRIVData * > &a_ebData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolated cell-centered data to the EB. This is the AMR version for all species. More...
 
virtual void extrapolateToEb (EBAMRIVData &a_ebData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolated cell-centered data to the EB. This is the AMR version. More...
 
virtual void extrapolateToEb (LevelData< BaseIVFAB< Real >> &a_ebData, const phase::which_phase a_phase, const LevelData< EBCellFAB > &a_cellData, const int a_lvl)
 Extrapolated cell-centered data to the EB. This is the level version. More...
 
virtual void extrapolateToDomainFaces (Vector< EBAMRIFData * > &a_domainData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolate cell-centered data to domain faces. This is the AMR version that does all species. More...
 
virtual void extrapolateToDomainFaces (EBAMRIFData &a_domainData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolate cell-centered data to domain faces. This is the AMR version. More...
 
virtual void extrapolateToDomainFaces (LevelData< DomainFluxIFFAB > &a_domainData, const phase::which_phase a_phase, const LevelData< EBCellFAB > &a_cellData, const int a_lvl)
 Extrapolate cell-centered data to domain faces. This is the AMR version. More...
 
virtual void extrapolateVectorToDomainFaces (Vector< EBAMRIFData * > &a_domainData, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellData)
 Extrapolate vector data to domain faces. This is the AMR version that does all species. More...
 
virtual void extrapolateVectorToDomainFaces (EBAMRIFData &a_domainData, const phase::which_phase a_phase, const EBAMRCellData &a_cellData)
 Extrapolate vector data to domain faces. This is the AMR version. More...
 
virtual void extrapolateVelocitiesToDomainFaces (Vector< EBAMRIFData * > &a_domainVelocities, const phase::which_phase a_phase, const Vector< EBAMRCellData * > &a_cellVelocities)
 Extrapolate velocities data to domain faces. This is the AMR version that does all species. More...
 
virtual void getCdrMax (Real &a_cdrMax, std::string &a_solverName) const
 Get maximum density in the CDR species. This will fetch both the value and the solver name. More...
 
virtual void initialSigma ()
 Initialize the surface charge.
 
virtual void projectFlux (EBAMRIVData &a_projectedFlux, const EBAMRIVData &a_flux)
 Project a flux onto the EB normal. This is the AMR version. More...
 
virtual void projectFlux (LevelData< BaseIVFAB< Real >> &a_projectedFlux, const LevelData< BaseIVFAB< Real >> &a_flux, const int a_lvl)
 Project a flux onto the EB normal. This is the level version. More...
 
virtual void projectDomain (EBAMRIFData &a_projectedFlux, const EBAMRIFData &a_flux)
 Project flux onto domain edges/faces. More...
 
virtual void regridSolvers (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel)
 Regrid all of our solvers. More...
 
virtual void resetDielectricCells (EBAMRIVData &a_data) const
 Set data defined over dielectric cells to zero. More...
 
virtual void sanityCheck () const
 Do a sanity check. Only works when DEBUG=TRUE.
 
virtual void setupCdr ()
 Setup the CDR solvers.
 
virtual void setupPoisson ()
 Setup the field solver.
 
virtual void setupRadiativeTransfer ()
 Setup the RTE solvers.
 
virtual void setupSigma ()
 Set up the surface charge solver.
 
virtual void setSolverVerbosity ()
 Set solver verbosity. More...
 
virtual void solverDump ()
 All solvers writes plot files. These are not the same as the plot files written by Driver.
 
virtual void setVoltage (std::function< Real(const Real a_time)> a_voltage)
 Set voltage curve. More...
 
virtual void solveRadiativeTransfer (const Real a_dt)
 Solve the radiative transfer problem. More...
 
virtual void setCdrSolvers (RefCountedPtr< CdrLayout< CdrSolver >> &a_cdr)
 Set the CDR layout. More...
 
virtual void setFieldSolver (RefCountedPtr< FieldSolver > &a_fieldSolver)
 Set the field solver. More...
 
virtual void setRadiativeTransferSolvers (RefCountedPtr< RtLayout< RtSolver >> &a_rte)
 Set the RTE solvers. More...
 
virtual Real computeElectrodeCurrent ()
 Compute the ohmic current on electrodes. More...
 
virtual Real computeDielectricCurrent ()
 Compute the ohmic current on dielectrics. More...
 
virtual Real computeDomainCurrent ()
 Compute the ohmic current through the domain faces. More...
 
virtual Real computeOhmicInductionCurrent ()
 Compute induced current in external circuit due to ohmic conduction. More...
 
virtual Real computeRelaxationTime ()
 Compute the relaxation time as dt = eps0/conductivity.
 
virtual Real getDt ()
 Get dt.
 
- 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. More...
 
void setComputationalGeometry (const RefCountedPtr< ComputationalGeometry > &a_computationalGeometry)
 Set the computational geometry. More...
 
virtual void postPlot ()
 An option for calling special functions prior to plotting data. Called by Driver in the IMMEDIATELY after writing the plot file.
 
virtual Vector< long int > getCheckpointLoads (const std::string a_realm, const int a_level) const
 Get computational loads to be checkpointed. More...
 
virtual bool needToRegrid ()
 Fuction which can have Driver do regrids at arbitrary points in the simulation. More...
 
virtual bool loadBalanceThisRealm (const std::string a_realm) const
 Load balancing query for a specified realm. If this returns true for a_realm, load balancing routines will be called during regrids. More...
 
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)
 Load balance grid boxes for a specified realm. More...
 

Protected Types

enum class  FieldCoupling { Explicit , SemiImplicit }
 Enum for representing the coupling between the electric field and charge transport.
 
enum class  AdvectionSolver { Euler , RK2 , MUSCL }
 Enum for switching between various advection solvers.
 
enum class  DiffusionAlgorithm { Explicit , Implicit , Automatic }
 Enum for distinguishing various ways we handle diffusion.
 
- Protected Types inherited from Physics::CdrPlasma::CdrPlasmaStepper
enum class  SourceTermComputation { Interpolated , InterpolatedStable , CellAverage , Upwind }
 Enum for switching between source term computations. 'Interpolated' interpolates the cell-centered data to cell centroids. InterpolatedStable is the same as Interpolated but with a stability fix near inflow EBs. CellAverage assumes centroid-centered data, and Upwind uses the upwind formulation in Villa et. al.
 
enum class  TimeCode {
  Advection , Diffusion , AdvectionDiffusion , Source ,
  RelaxationTime , Restricted , Hardcap , Error ,
  Physics
}
 An enum for encapsulating how time steps were restricted.
 

Protected Member Functions

RefCountedPtr< CdrStorage > & getCdrStorage (const CdrIterator< CdrSolver > &a_solverIt)
 Function for getting the transient storage assocaited with a particular CDR solver. More...
 
RefCountedPtr< RtStorage > & getRtStorage (const RtIterator< RtSolver > &a_solverIt)
 Function for getting the transient storage assocaited with a particular RTE solver. More...
 
void regridInternals (const int a_lmin, const int a_oldFinestLevel, const int a_newFinestLevel) override
 For regridding internal storage. Does nothing. More...
 
void allocateInternals () override
 Allocate internal storage. More...
 
void allocateScratch ()
 Allocate internal storage. More...
 
void deallocateInternals () override
 Deallocate transient memory.
 
void deallocateScratch ()
 Allocate internal storage. More...
 
void computeElectricFieldIntoScratch ()
 Compute electric field into scratch storage. More...
 
void computeCdrGradients ()
 Compute gradients of the CDR densities into scratch storage.
 
void extrapolateWithSourceTerm (const Real a_dt)
 Extrapolate cell-centered states with the source term. More...
 
void extrapolateCdrToEB ()
 Extrapolate the cell-centered states to the EB.
 
void computeCdrFluxesEB ()
 Compute the CDR boundary condition fluxes on the EBs. More...
 
void extrapolateCdrToDomain ()
 Extrapolate the CDR cell-centered densities to domain edges/face.
 
void computeCdrDomainFluxes ()
 Compute the CDR boundary condition fluxes on the domain faces. More...
 
void computeSigmaFlux ()
 Compute the surface flux for the surface charge solver.
 
void advanceTransport (const Real a_dt)
 Advance the transport problem. More...
 
void advanceTransportExplicitField (const Real a_dt)
 Advance the transport problem using the explicit or explicit-implicit Euler rule. More...
 
void advanceTransportSemiImplicit (const Real a_dt)
 Advance the transport problem using a semi-implicit formulation for the electric field. More...
 
void advanceCdrReactions (const Real a_dt)
 Advance the reactive problem over a time step dt. More...
 
void advanceRadiativeTransfer (const Real a_dt)
 Advance the radiative transfer problem. More...
 
void floorMass (EBAMRCellData &a_data, const std::string a_message, const RefCountedPtr< CdrSolver > &a_solver) const
 Print how much mass was injected into the system. More...
 
void postStep ()
 Perform post-step operations.
 
void computeCdrDriftVelocities (const Real a_time)
 Compute CDR drift velocities. More...
 
void computeCdrDiffusionCoefficients (const Real a_time)
 Compute CDR diffusion coefficients. More...
 
void computeSourceTerms (const Real a_dt)
 Compute source terms for the CDR and RTE equations. More...
 
void parseAdvection ()
 Parse centering for the advective integrator.
 
void parseDiffusion ()
 Parse how we handle diffusion.
 
void parseField ()
 Parse the transport algorithm.
 
void parseFloor ()
 Parse whether or not we should floor the mass.
 
void parseDebug ()
 Parse debug mode.
 
void parseProfile ()
 Parse profiling mode.
 
void parseFHD ()
 Parse inclusion of random diffusion flux.
 
void parseRegridSlopes ()
 Parse whether or not to use slopes when regridding.
 
void parseFiltering ()
 Parse filtering settings.
 
bool solveSemiImplicitPoisson ()
 Solve the semi-implicit Poisson equation. More...
 
- Protected Member Functions inherited from Physics::CdrPlasma::CdrPlasmaStepper
virtual void parseVerbosity ()
 Parse class verbosity.
 
virtual void parseSolverVerbosity ()
 Parse solver verbosities.
 
virtual void parseCFL ()
 Parse the CFL number.
 
virtual void parseRelaxationTime ()
 Parse the relaxation time restriction.
 
virtual void parseMinDt ()
 Parse the minimum allowed time step.
 
virtual void parseMaxDt ()
 Parse the maximum allowed time step.
 
virtual void parseFastPoisson ()
 Parse the "fast poisson" method, i.e. how often we solve the Poisson equation.
 
virtual void parseFastRadiativeTransfer ()
 Parse the "fast rte" method, i.e. how often we solve the Poisson equation.
 
virtual void parseSourceComputation ()
 Parse how we compute the source terms. More...
 
virtual void writeJ (LevelData< EBCellFAB > &a_output, int &a_comp, const std::string a_outputRealm, const int a_level) const
 Compute and put the current density in output data holder. More...
 
virtual void computePhysicsPlotVars (EBAMRCellData &a_physicsPlotVars) const noexcept
 Calculate the user-supplied plot variables.
 
virtual void writeData (LevelData< EBCellFAB > &a_output, int &a_comp, const EBAMRCellData &a_data, const std::string a_outputRealm, const int a_level, const bool a_interpToCentroids, const bool a_interpGhost) const noexcept
 Write data to output. Convenience function. More...
 

Protected Attributes

FieldCoupling m_fieldCoupling
 For figuring out which transport algorithm we use.
 
DiffusionAlgorithm m_diffusionAlgorithm
 For figuring out how we handle diffusion.
 
AdvectionSolver m_advectionSolver
 Advection solver.
 
std::unique_ptr< Timerm_timer
 Timer for run-time profiling.
 
Vector< RefCountedPtr< CdrStorage > > m_cdrScratch
 Scratch storage for the CDR solvers.
 
Vector< RefCountedPtr< RtStorage > > m_rteScratch
 Scratch storage for the RTE solvers.
 
RefCountedPtr< FieldStoragem_fieldScratch
 Scratch storage for the field solver.
 
RefCountedPtr< SigmaStoragem_sigmaScratch
 Scratch storage for the surface charge solver.
 
EBAMRCellData m_semiImplicitRho
 Use for holding the "space charge" when doing semi-implicit solves. More...
 
EBAMRCellData m_conductivityFactorCell
 Used for storing conductivity*dt/eps0 on the cell center.
 
EBAMRFluxData m_conductivityFactorFace
 Used for storing conductivity*dt/eps0 on the face centers.
 
EBAMRIVData m_conductivityFactorEB
 Used for storing conductivity*dt/eps0 on the EB centers.
 
EBAMRCellData m_scratchSemiImplicitRho
 Scratch storage for storing m_semiImplicitRho on the old grids during regrid operations.
 
EBAMRCellData m_scratchConductivity
 Scratch storage for storing m_conductivityFactorCell on the old grids during regrid operations.
 
bool m_extrapAdvect
 A special flag for letting the CDR solvers know that we want to compute advective derivatives at half time steps.
 
bool m_debug
 Enable for debugging this class.
 
bool m_profile
 Enable performance profiling.
 
bool m_floor
 True if we floor the CDR densities. Due to reactions/EBs, they are not generally non-negative.
 
bool m_fhd
 If true, add a stochastic diffusion flux.
 
bool m_regridSlopes
 Regrid slopes or not.
 
bool m_filterCompensate
 Use compensation step in filter or not.
 
Real m_implicitDiffusionThreshold
 Diffusion threshold factor.
 
int m_diffusionOrder
 Integration order for diffusion equations.
 
int m_numFilterRho
 Number of filterings for space charge.
 
std::vector< bool > m_useImplicitDiffusion
 If true, we are using implicit diffusion. Otherwise it's explicit diffusion.
 
- Protected Attributes inherited from Physics::CdrPlasma::CdrPlasmaStepper
std::string m_realm
 Realm where the time stepper is registered. More...
 
std::string m_className
 Time stepper class name.
 
phase::which_phase m_phase
 Plasma phase.
 
SourceTermComputation m_whichSourceTermComputation
 Which source term computation.
 
RefCountedPtr< MultiFluidIndexSpacem_multifluidIndexSpace
 Index space.
 
RefCountedPtr< CdrPlasmaPhysicsm_physics
 Plasma kinetics.
 
RefCountedPtr< CdrLayout< CdrSolver > > m_cdr
 CDR solvers.
 
RefCountedPtr< RtLayout< RtSolver > > m_rte
 Radiative transfer solvers.
 
RefCountedPtr< FieldSolverm_fieldSolver
 Poisson solver.
 
RefCountedPtr< SurfaceODESolver< 1 > > m_sigma
 Surface charge solver.
 
EBAMRCellData m_currentDensity
 Storage for the current.
 
EBAMRCellData m_physicsPlotVars
 Storage for physics-observables.
 
std::function< Real(const Real a_time)> m_voltage
 Set the potential.
 
Real m_minDt
 Minimum allowed time step.
 
Real m_maxDt
 Maximum allowed time step.
 
Real m_cfl
 CFL number.
 
Real m_relaxTime
 Fudge factor for relaxation time.
 
Real m_time
 TIme.
 
Real m_dt
 Previous time step size.
 
Real m_dtCFL
 Computed CFL time step.
 
TimeCode m_timeCode
 Time code for step restriction.
 
int m_solverVerbosity
 Verbosity for solvers.
 
int m_fastRTE
 Fast RTE solver.
 
int m_fastPoisson
 Fast RTE solver.
 
int m_upwindFactor
 Upwind factor.
 
- 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.
 
RefCountedPtr< AmrMeshm_amr
 AmrMesh.
 
RefCountedPtr< ComputationalGeometrym_computationalGeometry
 Computational geometry.
 

Detailed Description

Class for evolving plasma equations using a split step Godunov method.

This class can use semi-implicit formulations for the transport.

Constructor & Destructor Documentation

◆ CdrPlasmaGodunovStepper()

CdrPlasmaGodunovStepper::CdrPlasmaGodunovStepper ( RefCountedPtr< CdrPlasmaPhysics > &  a_physics)

Full constructor.

Parameters
[in]a_physicsReference to the plasma physics implementation.

Member Function Documentation

◆ advance()

Real CdrPlasmaGodunovStepper::advance ( const Real  a_dt)
overridevirtual

Implementation of the advance method.

This will switch between the various available implementations.

Parameters
[in]a_dtTime step to try
Returns
Returns a_dt (no adjustable time step for this class)

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ advanceCdrReactions()

void CdrPlasmaGodunovStepper::advanceCdrReactions ( const Real  a_dt)
protected

Advance the reactive problem over a time step dt.

Parameters
[in]a_dtTime step
Note
Only does the CDR solvers.

◆ advanceRadiativeTransfer()

void CdrPlasmaGodunovStepper::advanceRadiativeTransfer ( const Real  a_dt)
protected

Advance the radiative transfer problem.

Parameters
[in]a_dtTime step
Note
This should be called after advanceReactions because that routine sets up the source terms

◆ advanceTransport()

void CdrPlasmaGodunovStepper::advanceTransport ( const Real  a_dt)
protected

Advance the transport problem.

Parameters
[in]a_dtTime step.
Note
This will switch between transport algorithms and call the other methods.

◆ advanceTransportExplicitField()

void CdrPlasmaGodunovStepper::advanceTransportExplicitField ( const Real  a_dt)
protected

Advance the transport problem using the explicit or explicit-implicit Euler rule.

Parameters
[in]a_dtTime step.

◆ advanceTransportSemiImplicit()

void CdrPlasmaGodunovStepper::advanceTransportSemiImplicit ( const Real  a_dt)
protected

Advance the transport problem using a semi-implicit formulation for the electric field.

Under the hood, this is still an Euler solve.

Parameters
[in]a_dtTime step.

◆ allocateInternals()

void CdrPlasmaGodunovStepper::allocateInternals ( )
overrideprotectedvirtual

Allocate internal storage.

This will set up extra memory needed in the semi-implicit coupling.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ allocateScratch()

void CdrPlasmaGodunovStepper::allocateScratch ( )
protected

Allocate internal storage.

Set up some scratch storage needed in the time advancement algorithms.

◆ computeCdrDiffusionCoefficients()

void CdrPlasmaGodunovStepper::computeCdrDiffusionCoefficients ( const Real  a_time)
protected

Compute CDR diffusion coefficients.

This is just like the parent method, except that we use the electric field stored in the scratch storage.

Parameters
[in]a_timeTime step

◆ computeCdrDomainFluxes()

void CdrPlasmaGodunovStepper::computeCdrDomainFluxes ( )
protected

Compute the CDR boundary condition fluxes on the domain faces.

Prior to calling this routine, one must extrapolated the CDR states to the domain faces (calling extrapolateCdrToDomain)

◆ computeCdrDriftVelocities()

void CdrPlasmaGodunovStepper::computeCdrDriftVelocities ( const Real  a_time)
protected

Compute CDR drift velocities.

This is just like the parent method, except that we use the electric field stored in the scratch storage.

Parameters
[in]a_timeTime step

◆ computeCdrFluxesEB()

void CdrPlasmaGodunovStepper::computeCdrFluxesEB ( )
protected

Compute the CDR boundary condition fluxes on the EBs.

Prior to calling this routine, one must extrapolated the CDR states to the EB (calling extrapolateCdrToEB)

◆ computeElectricFieldIntoScratch()

void CdrPlasmaGodunovStepper::computeElectricFieldIntoScratch ( )
protected

Compute electric field into scratch storage.

This computes the electric field into the scratch storages in m_fieldScratch

◆ computeSourceTerms()

void CdrPlasmaGodunovStepper::computeSourceTerms ( const Real  a_dt)
protected

Compute source terms for the CDR and RTE equations.

Parameters
[in]a_dtTime step

◆ deallocateScratch()

void CdrPlasmaGodunovStepper::deallocateScratch ( )
protected

Allocate internal storage.

Set up some scratch storage needed in the algorithms

◆ extrapolateWithSourceTerm()

void CdrPlasmaGodunovStepper::extrapolateWithSourceTerm ( const Real  a_dt)
protected

Extrapolate cell-centered states with the source term.

This will compute cell-centered states (in the scratch storage) as n = n(t) + 0.5*a_dt * S(t)

Parameters
[in]a_dtTime step size.

◆ floorMass()

void CdrPlasmaGodunovStepper::floorMass ( EBAMRCellData a_data,
const std::string  a_message,
const RefCountedPtr< CdrSolver > &  a_solver 
) const
protected

Print how much mass was injected into the system.

Occasionally, mass injection can be necessary due to negative densities arising the reactive problem, or due to redistribution near the embedded boundaries (which does not preserve non-negativeness).

Parameters
[in]a_messageBase message
[in]a_solverWhich CDR solver to compute the mass for.

◆ getCdrStorage()

RefCountedPtr< CdrStorage > & CdrPlasmaGodunovStepper::getCdrStorage ( const CdrIterator< CdrSolver > &  a_solverIt)
protected

Function for getting the transient storage assocaited with a particular CDR solver.

Parameters
[in]a_solverItSolver iterator
Returns
This returns the entry in m_cdrScratch corresponding to the solver.

◆ getRtStorage()

RefCountedPtr< RtStorage > & CdrPlasmaGodunovStepper::getRtStorage ( const RtIterator< RtSolver > &  a_solverIt)
protected

Function for getting the transient storage assocaited with a particular RTE solver.

Parameters
[in]a_solverItSolver iterator
Returns
This returns the entry in m_rteScratch corresponding to the solver.

◆ postCheckpointSetup()

void CdrPlasmaGodunovStepper::postCheckpointSetup ( )
overridevirtual

Run post-checkpoint setup operations.

The override is only relevant for the semi-implicit scheme because the field needs to be computed from a different equation. Fortunately, we've stored the necessary quantities (conductivity and space charge) to HDF5 so we can just set up a standard semi-implicit Poisson solve here.

Reimplemented from Physics::CdrPlasma::CdrPlasmaStepper.

◆ postRegrid()

void CdrPlasmaGodunovStepper::postRegrid ( )
overridevirtual

Perform post-regrid operations.

This releases transient memory needed during the regrid.

Reimplemented from Physics::CdrPlasma::CdrPlasmaStepper.

◆ preRegrid()

void CdrPlasmaGodunovStepper::preRegrid ( const int  a_lbase,
const int  a_oldFinestLevel 
)
overridevirtual

Pre-regrid method. Used for storing important variables for the solvers.

This is overriden because the semi-implicit scheme requires us to store some extra variables on the old grids.

Parameters
[in]a_lminThe coarsest level that changes
[in]a_oldFinestLevelThe finest level before the regrid.

Reimplemented from Physics::CdrPlasma::CdrPlasmaStepper.

◆ regrid()

void CdrPlasmaGodunovStepper::regrid ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
overridevirtual

Regrid method.

This overrides the parent class regrid method when using a semi-implicit scheme.

Parameters
[in]a_lminThe coarsest level that changed.
[in]a_oldFinestLevelThe finest level before the regrid.
[in]a_newFinestLevelThe finest level after the regrid.

Reimplemented from Physics::CdrPlasma::CdrPlasmaStepper.

◆ regridInternals()

void CdrPlasmaGodunovStepper::regridInternals ( const int  a_lmin,
const int  a_oldFinestLevel,
const int  a_newFinestLevel 
)
overrideprotectedvirtual

For regridding internal storage. Does nothing.

Parameters
[in]a_lminThe coarsest level that changed.
[in]a_oldFinestLevelThe finest level before the regrid.
[in]a_newFinestLevelThe finest level after the regrid.

Implements Physics::CdrPlasma::CdrPlasmaStepper.

◆ solveSemiImplicitPoisson()

bool CdrPlasmaGodunovStepper::solveSemiImplicitPoisson ( )
protected

Solve the semi-implicit Poisson equation.

Note
This is just like the parent method for solving it, except that we use m_semiImplicitRho for the space charge density. Note that the user should first have set up the semi-implicit Poisson equation by computing the conductivities and calling CdrPlasmasetupSemiImplicitPoisson.

Member Data Documentation

◆ m_semiImplicitRho

EBAMRCellData Physics::CdrPlasma::CdrPlasmaGodunovStepper::m_semiImplicitRho
protected

Use for holding the "space charge" when doing semi-implicit solves.

This is different from the actual space charge because it also includes a diffusive contribution


The documentation for this class was generated from the following files: