WarpX
Loading...
Searching...
No Matches
EffectivePotentialES Class Referencefinal

#include <EffectivePotentialES.H>

Inheritance diagram for EffectivePotentialES:
ElectrostaticSolver

Public Member Functions

 EffectivePotentialES (int nlevs_max)
 
void InitData () override
 
void ComputeSpaceChargeField (ablastr::fields::MultiFabRegister &fields, MultiParticleContainer &mpc, MultiFluidContainer *mfl, int max_level) override
 Computes charge density, rho, and solves Poisson's equation to obtain the associated electrostatic potential, phi. Using the electrostatic potential, the electric field is computed in lab frame, and if relativistic, then the electric and magnetic fields are computed using potential, phi, and velocity of source for potential, beta. This function must be defined in the derived classes.
 
void ComputeSigma (amrex::MultiFab &sigma) const
 
void computePhi (ablastr::fields::MultiLevelScalarField const &rho, ablastr::fields::MultiLevelScalarField const &phi, ablastr::fields::MultiLevelVectorField const &efield) const
 
void computePhi (ablastr::fields::MultiLevelScalarField const &rho, ablastr::fields::MultiLevelScalarField const &phi, ablastr::fields::MultiLevelVectorField const &efield, amrex::MultiFab const &sigma, amrex::Real required_precision, amrex::Real absolute_tolerance, int max_iters, int verbosity) const
 
- Public Member Functions inherited from ElectrostaticSolver
 ElectrostaticSolver ()=default
 
 ElectrostaticSolver (int nlevs_max)
 
virtual ~ElectrostaticSolver ()
 
 ElectrostaticSolver (const ElectrostaticSolver &)=delete
 
ElectrostaticSolveroperator= (const ElectrostaticSolver &)=delete
 
 ElectrostaticSolver (ElectrostaticSolver &&)=delete
 
ElectrostaticSolveroperator= (ElectrostaticSolver &&)=delete
 
void ReadParameters ()
 
void setPhiBC (ablastr::fields::MultiLevelScalarField const &phi, amrex::Real t) const
 Set Dirichlet boundary conditions for the electrostatic solver. The given potential's values are fixed on the boundaries of the given dimension according to the desired values from the simulation input file, boundary.potential_lo and boundary.potential_hi.
 
void computePhi (ablastr::fields::MultiLevelScalarField const &rho, ablastr::fields::MultiLevelScalarField const &phi, std::array< amrex::Real, 3 > beta, amrex::Real required_precision, amrex::Real absolute_tolerance, int max_iters, int verbosity, bool is_igf_2d_slices, std::optional< ablastr::fields::MultiLevelVectorField > efield=std::nullopt) const
 
void computeE (ablastr::fields::MultiLevelVectorField const &E, ablastr::fields::MultiLevelScalarField const &phi, std::array< amrex::Real, 3 > beta) const
 Compute the electric field that corresponds to phi, and add it to the set of MultiFab E. The electric field is calculated by assuming that the source that produces the phi potential is moving with a constant speed $\vec{\beta}$:
 
void computeB (ablastr::fields::MultiLevelVectorField const &B, ablastr::fields::MultiLevelScalarField const &phi, std::array< amrex::Real, 3 > beta) const
 Compute the magnetic field that corresponds to phi, and add it to the set of MultiFab B. The magnetic field is calculated by assuming that the source that produces the phi potential is moving with a constant speed $\vec{\beta}$:
 

Additional Inherited Members

- Public Attributes inherited from ElectrostaticSolver
int num_levels
 
std::unique_ptr< PoissonBoundaryHandlerm_poisson_boundary_handler
 
amrex::Real self_fields_required_precision = 1e-11
 
amrex::Real self_fields_absolute_tolerance = 0.0
 
int self_fields_max_iters = 200
 
int self_fields_verbosity = 2
 
bool is_igf_2d_slices = false
 

Constructor & Destructor Documentation

◆ EffectivePotentialES()

EffectivePotentialES::EffectivePotentialES ( int nlevs_max)
inline

Member Function Documentation

◆ computePhi() [1/2]

void EffectivePotentialES::computePhi ( ablastr::fields::MultiLevelScalarField const & rho,
ablastr::fields::MultiLevelScalarField const & phi,
ablastr::fields::MultiLevelVectorField const & efield ) const

◆ computePhi() [2/2]

void EffectivePotentialES::computePhi ( ablastr::fields::MultiLevelScalarField const & rho,
ablastr::fields::MultiLevelScalarField const & phi,
ablastr::fields::MultiLevelVectorField const & efield,
amrex::MultiFab const & sigma,
amrex::Real required_precision,
amrex::Real absolute_tolerance,
int max_iters,
int verbosity ) const

Compute the potential phi by solving the semi-implicit Poisson equation using the Effective Potential method with rho as the source. More specifically, this solves the equation

\[     \vec{\nabla}\cdot(\sigma\vec{\nabla}) \phi = -\frac{\rho}{\epsilon_0}
\]

Parameters
[in]rhoThe total charge density
[out]phiThe potential to be computed by this function
[out]efieldThe electric field corresponding to the calculated phi (only used with embedded boundaries)
[in]sigmaRepresents the modified dielectric
[in]required_precisionThe relative convergence threshold for the MLMG solver
[in]absolute_toleranceThe absolute convergence threshold for the MLMG solver
[in]max_itersThe maximum number of iterations allowed for the MLMG solver
[in]verbosityThe verbosity setting for the MLMG solver

◆ ComputeSigma()

void EffectivePotentialES::ComputeSigma ( amrex::MultiFab & sigma) const

◆ ComputeSpaceChargeField()

void EffectivePotentialES::ComputeSpaceChargeField ( ablastr::fields::MultiFabRegister & fields,
MultiParticleContainer & mpc,
MultiFluidContainer * mfl,
int max_level )
overridevirtual

Computes charge density, rho, and solves Poisson's equation to obtain the associated electrostatic potential, phi. Using the electrostatic potential, the electric field is computed in lab frame, and if relativistic, then the electric and magnetic fields are computed using potential, phi, and velocity of source for potential, beta. This function must be defined in the derived classes.

Implements ElectrostaticSolver.

◆ InitData()

void EffectivePotentialES::InitData ( )
overridevirtual

Reimplemented from ElectrostaticSolver.


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