Added Electrodes to Poisson Solver

This commit is contained in:
2025-11-11 09:23:36 +01:00
parent 5d72083a25
commit 09dfddb6da
4 changed files with 1136 additions and 6 deletions
+18 -1
View File
@@ -29,11 +29,14 @@ struct GlobalBoundary {
BoundaryType type;
};
// only useful at the initialization of the PoissonSolver...
// (or if at later times a time dependent value is desired)
class Electrode {
public:
Electrode(double potential);
virtual bool isOnElectrode(const Coordinate& position) = 0;
double electrodePotential();
virtual double electrodePotential();
protected:
const double potential_;
@@ -45,6 +48,20 @@ class RearWall : public Electrode {
bool isOnElectrode(const Coordinate& position);
};
class RingElectrode : public Electrode {
public:
RingElectrode(double potential, const double zPosition,
const double innerRadius,
const double outerRadius,
const blitz::TinyVector<double, 2> stepsize);
bool isOnElectrode(const Coordinate& position);
private:
// stores (rinner, router, zpos) in this order
blitz::TinyVector<double,3> specs_;
blitz::TinyVector<double,2> stepsize_;
};
// for (r,z) axially density
class PoissonSolver {
public: