PLaSK library
Loading...
Searching...
No Matches
plask::electrical::shockley::ElectricalFem3DSolver Struct Referenceabstract

Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method. More...

#include <solvers/electrical/shockley/electr3d.hpp>

Inheritance diagram for plask::electrical::shockley::ElectricalFem3DSolver:
[legend]
Collaboration diagram for plask::electrical::shockley::ElectricalFem3DSolver:
[legend]

Classes

struct  Active
 Details of active region. More...
 

Public Member Functions

 ElectricalFem3DSolver (const std::string &name="")
 
void loadConfiguration (XMLReader &source, Manager &manager) override
 Load configuration from given source.
 
void parseConfiguration (XMLReader &source, Manager &manager)
 
 ~ElectricalFem3DSolver ()
 
double compute (unsigned loops=1)
 Run voltage calculations.
 
double integrateCurrent (size_t vindex, bool onlyactive=false)
 Integrate vertical total current at certain level.
 
double getTotalCurrent (size_t nact=0)
 Integrate vertical total current flowing vertically through active region.
 
double getTotalEnergy ()
 Compute total electrostatic energy stored in the structure.
 
double getCapacitance ()
 Estimate structure capacitance.
 
double getTotalHeat ()
 Compute total heat generated by the structure in unit time.
 
double getErr () const
 Return the maximum estimated error.
 
double getCondPcontact () const
 Get p-contact layer conductivity [S/m].
 
void setCondPcontact (double cond)
 Set p-contact layer conductivity [S/m].
 
double getCondNcontact () const
 Get n-contact layer conductivity [S/m].
 
void setCondNcontact (double cond)
 Set n-contact layer conductivity [S/m].
 
DataVector< const Tensor2< double > > getCondJunc () const
 Get data with junction effective conductivity.
 
void setCondJunc (double cond)
 Set junction effective conductivity to the single value.
 
void setCondJunc (Tensor2< double > cond)
 Set junction effective conductivity to the single value.
 
void setCondJunc (const DataVector< Tensor2< double > > &cond)
 Set junction effective conductivity to previously read data.
 
- Public Member Functions inherited from plask::FemSolverWithMaskedMesh< Geometry3D, RectangularMesh< 3 > >
 FemSolverWithMaskedMesh (const std::string &name="")
 
EmptyElementsHandling getEmptyElements () const
 Are we using full mesh?
 
void setEmptyElements (EmptyElementsHandling val)
 Set whether we should use full mesh.
 
bool parseFemConfiguration (XMLReader &reader, Manager &manager)
 
void setupMaskedMesh ()
 
void onInitialize ()
 Initialize the solver.
 
FemMatrixgetMatrix ()
 
FemMatrixgetMatrix ()
 
- Public Member Functions inherited from plask::FemSolverWithMesh< SpaceT, MeshT >
 FemSolverWithMesh (const std::string &name="")
 
bool parseFemConfiguration (XMLReader &reader, Manager &manager)
 
FemMatrixgetMatrix ()
 
FemMatrixgetMatrix ()
 
- Public Member Functions inherited from plask::SolverWithMesh< SpaceT, MeshT >
 SolverWithMesh (const std::string &name="")
 
 ~SolverWithMesh ()
 
void loadConfiguration (XMLReader &source, Manager &manager) override
 Load configuration from given source.
 
void parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element")
 
virtual void onMeshChange (const typename MeshT::Event &PLASK_UNUSED(evt))
 This method is called just after the mesh has been changed.
 
void onGeometryChange (const Geometry::Event &PLASK_UNUSED(evt)) override
 This method is called when the geometry is changed.
 
MeshTmeshRef () const
 Get current module mesh.
 
shared_ptr< MeshTgetMesh () const
 Get current solver mesh.
 
void setMesh (const shared_ptr< MeshT > &mesh)
 Set new mesh for the solver.
 
void setMesh (shared_ptr< MeshGeneratorD< MeshT::DIM > > generator)
 Set new mesh got from generator.
 
- Public Member Functions inherited from plask::SolverOver< SpaceT >
 SolverOver (const std::string &name="")
 
 ~SolverOver ()
 
void parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element")
 
virtual void onGeometryChange (const Geometry::Event &)
 This method is called when the geometry is changed.
 
shared_ptr< SpaceTgetGeometry () const
 Get current solver geometry space.
 
void setGeometry (const shared_ptr< SpaceT > &geometry)
 Set new geometry for the solver.
 
- Public Member Functions inherited from plask::Solver
bool initCalculation ()
 This should be called on beginning of each calculation method to ensure that solver will be initialized.
 
 Solver (const std::string &name="")
 Construct uninitialized solver.
 
virtual ~Solver ()
 Virtual destructor (for subclassing). Do nothing.
 
void parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element")
 Load standard configuration (geometry, mesh) tags from source.
 
bool isInitialized ()
 Check if solver is already initialized.
 
void invalidate ()
 This method should be and is called if something important was changed: calculation space, mesh, etc.
 
virtual std::string getClassName () const =0
 Get name of solver.
 
std::string getId () const
 Get solver id.
 
std::string getName () const
 
virtual std::string getClassDescription () const
 Get a description of this solver.
 
template<typename ArgT = double, typename ValT = double>
DataLog< ArgT, ValTdataLog (const std::string &chart_name, const std::string &axis_arg_name, const std::string &axis_val_name)
 
template<typename ArgT = double, typename ValT = double>
DataLog< ArgT, ValTdataLog (const std::string &axis_arg_name, const std::string &axis_val_name)
 
template<typename ... Args>
void writelog (LogLevel level, std::string msg, Args &&... params) const
 Log a message for this solver.
 

Public Attributes

Convergence convergence
 Convergence method.
 
double maxerr
 Maximum relative current density correction accepted as convergence.
 
Vec< 3, doublemaxcur
 Maximum current in the structure.
 
BoundaryConditions< RectangularMesh< 3 >::Boundary, doublevoltage_boundary
 Boundary condition of constant voltage (K)
 
ProviderFor< Voltage, Geometry3D >::Delegate outVoltage
 
ProviderFor< CurrentDensity, Geometry3D >::Delegate outCurrentDensity
 
ProviderFor< Heat, Geometry3D >::Delegate outHeat
 
ProviderFor< Conductivity, Geometry3D >::Delegate outConductivity
 
ReceiverFor< Temperature, Geometry3DinTemperature
 
- Public Attributes inherited from plask::FemSolverWithMesh< SpaceT, MeshT >
FemMatrixAlgorithm algorithm = ALGORITHM_CHOLESKY
 Factorization algorithm to use.
 
IterativeMatrixParams iter_params
 Parameters of iterative solver.
 

Protected Member Functions

void setMatrix (FemMatrix &A, DataVector< double > &B, const BoundaryConditionsWithMesh< RectangularMesh< 3 >::Boundary, double > &bvoltage, const LazyData< double > &temperature)
 Set stiffness matrix and load vector.
 
virtual Tensor2< doubleactiveCond (size_t n, double U, double jy, double T)=0
 Compute conductivity int the active region.
 
LazyData< doubleloadConductivity ()
 Load conductivities.
 
void saveConductivity ()
 Save conductivities of active region.
 
void saveHeatDensity ()
 Create 3D-vector with calculated heat density.
 
void onInitialize () override
 Initialize the solver.
 
void onInvalidate () override
 Invalidate the data.
 
void setupActiveRegions ()
 Get info on active region.
 
size_t isActive (const Vec< 3 > &point) const
 Return true if the specified point is at junction.
 
size_t isActive (const RectangularMesh< 3 >::Element &element) const
 Return true if the specified element is a junction.
 
size_t isActive (const RectangularMaskedMesh< 3 >::Element &element) const
 Return true if the specified element is a junction.
 
const LazyData< doublegetVoltage (shared_ptr< const MeshD< 3 > > dest_mesh, InterpolationMethod method) const
 
const LazyData< Vec< 3 > > getCurrentDensity (shared_ptr< const MeshD< 3 > > dest_mesh, InterpolationMethod method)
 
const LazyData< doublegetHeatDensity (shared_ptr< const MeshD< 3 > > dest_mesh, InterpolationMethod method)
 
const LazyData< Tensor2< double > > getConductivity (shared_ptr< const MeshD< 3 > > dest_mesh, InterpolationMethod method)
 
- Protected Member Functions inherited from plask::SolverOver< SpaceT >
template<typename Boundary , typename ConditionT >
void readBoundaryConditions (Manager &manager, XMLReader &reader, BoundaryConditions< Boundary, ConditionT > &dest)
 Read boundary conditions using information about the geometry of this solver.
 

Protected Attributes

double pcond
 p-contact electrical conductivity [S/m]
 
double ncond
 n-contact electrical conductivity [S/m]
 
int loopno
 Number of completed loops.
 
double toterr
 Maximum estimated error during all iterations (useful for single calculations managed by external python script)
 
DataVector< Tensor2< double > > junction_conductivity
 electrical conductivity for p-n junction in y-direction [S/m]
 
Tensor2< doubledefault_junction_conductivity
 default electrical conductivity for p-n junction in y-direction [S/m]
 
DataVector< Tensor2< double > > conds
 Cached element conductivities.
 
DataVector< doublepotential
 Computed potentials.
 
DataVector< Vec< 3, double > > current
 Computed current densities.
 
DataVector< doubleheat
 Computed and cached heat source densities.
 
std::vector< Activeactive
 Active regions information.
 
- Protected Attributes inherited from plask::FemSolverWithMaskedMesh< Geometry3D, RectangularMesh< 3 > >
plask::shared_ptr< RectangularMaskedMesh< MeshT::DIM > > maskedMesh
 
EmptyElementsHandling empty_elements
 Should we use full mesh?
 
- Protected Attributes inherited from plask::SolverWithMesh< SpaceT, MeshT >
shared_ptr< MeshTmesh
 Mesh over which the calculations are performed.
 
boost::signals2::connection mesh_signal_connection
 Connection of mesh to onMeshChange method, see http://www.boost.org/doc/libs/1_55_0/doc/html/signals2/tutorial.html#idp204830936.
 
- Protected Attributes inherited from plask::SolverOver< SpaceT >
shared_ptr< SpaceTgeometry
 Space in which the calculations are performed.
 
- Protected Attributes inherited from plask::Solver
bool initialized
 true only if solver is initialized
 

Additional Inherited Members

- Public Types inherited from plask::SolverWithMesh< SpaceT, MeshT >
typedef MeshT MeshType
 Type of the mesh for this solver.
 
- Public Types inherited from plask::SolverOver< SpaceT >
typedef SpaceT SpaceType
 of the space for this solver
 

Detailed Description

Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method.

Definition at line 24 of file electr3d.hpp.

Constructor & Destructor Documentation

◆ ElectricalFem3DSolver()

plask::electrical::shockley::ElectricalFem3DSolver::ElectricalFem3DSolver ( const std::string &  name = "")

Definition at line 20 of file electr3d.cpp.

◆ ~ElectricalFem3DSolver()

plask::electrical::shockley::ElectricalFem3DSolver::~ElectricalFem3DSolver ( )

Definition at line 39 of file electr3d.cpp.

Member Function Documentation

◆ activeCond()

virtual Tensor2< double > plask::electrical::shockley::ElectricalFem3DSolver::activeCond ( size_t  n,
double  U,
double  jy,
double  T 
)
protectedpure virtual

Compute conductivity int the active region.

Parameters
nactive region number
Ujunction voltage (V)
jyvertical current (kA/cm²)
Ttemperature (K)

◆ compute()

double plask::electrical::shockley::ElectricalFem3DSolver::compute ( unsigned  loops = 1)

Run voltage calculations.

Parameters
loopsmaximum number of loops to run
Returns
max correction of voltage against the last call

Definition at line 356 of file electr3d.cpp.

◆ getCapacitance()

double plask::electrical::shockley::ElectricalFem3DSolver::getCapacitance ( )

Estimate structure capacitance.

Returns
static structure capacitance [pF]

Definition at line 602 of file electr3d.cpp.

◆ getCondJunc()

DataVector< const Tensor2< double > > plask::electrical::shockley::ElectricalFem3DSolver::getCondJunc ( ) const
inline

Get data with junction effective conductivity.

Definition at line 265 of file electr3d.hpp.

◆ getCondNcontact()

double plask::electrical::shockley::ElectricalFem3DSolver::getCondNcontact ( ) const
inline

Get n-contact layer conductivity [S/m].

Definition at line 257 of file electr3d.hpp.

◆ getCondPcontact()

double plask::electrical::shockley::ElectricalFem3DSolver::getCondPcontact ( ) const
inline

Get p-contact layer conductivity [S/m].

Definition at line 249 of file electr3d.hpp.

◆ getConductivity()

const LazyData< Tensor2< double > > plask::electrical::shockley::ElectricalFem3DSolver::getConductivity ( shared_ptr< const MeshD< 3 > >  dest_mesh,
InterpolationMethod  method 
)
protected

Definition at line 559 of file electr3d.cpp.

◆ getCurrentDensity()

const LazyData< Vec< 3 > > plask::electrical::shockley::ElectricalFem3DSolver::getCurrentDensity ( shared_ptr< const MeshD< 3 > >  dest_mesh,
InterpolationMethod  method 
)
protected

Definition at line 517 of file electr3d.cpp.

◆ getErr()

double plask::electrical::shockley::ElectricalFem3DSolver::getErr ( ) const
inline

Return the maximum estimated error.

Definition at line 246 of file electr3d.hpp.

◆ getHeatDensity()

const LazyData< double > plask::electrical::shockley::ElectricalFem3DSolver::getHeatDensity ( shared_ptr< const MeshD< 3 > >  dest_mesh,
InterpolationMethod  method 
)
protected

Definition at line 538 of file electr3d.cpp.

◆ getTotalCurrent()

double plask::electrical::shockley::ElectricalFem3DSolver::getTotalCurrent ( size_t  nact = 0)

Integrate vertical total current flowing vertically through active region.

Parameters
nactnumber of the active region
Returns
computed total current

Definition at line 499 of file electr3d.cpp.

◆ getTotalEnergy()

double plask::electrical::shockley::ElectricalFem3DSolver::getTotalEnergy ( )

Compute total electrostatic energy stored in the structure.

Returns
total electrostatic energy [J]

Definition at line 568 of file electr3d.cpp.

◆ getTotalHeat()

double plask::electrical::shockley::ElectricalFem3DSolver::getTotalHeat ( )

Compute total heat generated by the structure in unit time.

Returns
total generated heat (mW)

Definition at line 612 of file electr3d.cpp.

◆ getVoltage()

const LazyData< double > plask::electrical::shockley::ElectricalFem3DSolver::getVoltage ( shared_ptr< const MeshD< 3 > >  dest_mesh,
InterpolationMethod  method 
) const
protected

Definition at line 507 of file electr3d.cpp.

◆ integrateCurrent()

double plask::electrical::shockley::ElectricalFem3DSolver::integrateCurrent ( size_t  vindex,
bool  onlyactive = false 
)

Integrate vertical total current at certain level.

Parameters
vindexvertical index of the element mesh to perform integration at
onlyactiveif true only current in the active region is considered
Returns
computed total current

Definition at line 480 of file electr3d.cpp.

◆ isActive() [1/3]

size_t plask::electrical::shockley::ElectricalFem3DSolver::isActive ( const RectangularMaskedMesh< 3 >::Element &  element) const
inlineprotected

Return true if the specified element is a junction.

Definition at line 177 of file electr3d.hpp.

◆ isActive() [2/3]

size_t plask::electrical::shockley::ElectricalFem3DSolver::isActive ( const RectangularMesh< 3 >::Element &  element) const
inlineprotected

Return true if the specified element is a junction.

Definition at line 174 of file electr3d.hpp.

◆ isActive() [3/3]

size_t plask::electrical::shockley::ElectricalFem3DSolver::isActive ( const Vec< 3 > &  point) const
inlineprotected

Return true if the specified point is at junction.

Definition at line 148 of file electr3d.hpp.

◆ loadConductivity()

LazyData< double > plask::electrical::shockley::ElectricalFem3DSolver::loadConductivity ( )
protected

Load conductivities.

Returns
current temperature

Definition at line 203 of file electr3d.cpp.

◆ loadConfiguration()

void plask::electrical::shockley::ElectricalFem3DSolver::loadConfiguration ( XMLReader source,
Manager manager 
)
overridevirtual

Load configuration from given source.

XML reader (source) point to opening of this solver tag and after return from this method should point to this solver closing tag.

Parameters
sourcesource of configuration
managermanager from which information about geometry, meshes, materials, and so on can be get if needed

Reimplemented from plask::Solver.

Definition at line 41 of file electr3d.cpp.

◆ onInitialize()

void plask::electrical::shockley::ElectricalFem3DSolver::onInitialize ( )
overrideprotectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 185 of file electr3d.cpp.

◆ onInvalidate()

void plask::electrical::shockley::ElectricalFem3DSolver::onInvalidate ( )
overrideprotectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 195 of file electr3d.cpp.

◆ parseConfiguration()

void plask::electrical::shockley::ElectricalFem3DSolver::parseConfiguration ( XMLReader source,
Manager manager 
)

Definition at line 45 of file electr3d.cpp.

◆ saveConductivity()

void plask::electrical::shockley::ElectricalFem3DSolver::saveConductivity ( )
protected

Save conductivities of active region.

Definition at line 227 of file electr3d.cpp.

◆ saveHeatDensity()

void plask::electrical::shockley::ElectricalFem3DSolver::saveHeatDensity ( )
protected

Create 3D-vector with calculated heat density.

Definition at line 444 of file electr3d.cpp.

◆ setCondJunc() [1/3]

void plask::electrical::shockley::ElectricalFem3DSolver::setCondJunc ( const DataVector< Tensor2< double > > &  cond)
inline

Set junction effective conductivity to previously read data.

Definition at line 277 of file electr3d.hpp.

◆ setCondJunc() [2/3]

void plask::electrical::shockley::ElectricalFem3DSolver::setCondJunc ( double  cond)
inline

Set junction effective conductivity to the single value.

Definition at line 267 of file electr3d.hpp.

◆ setCondJunc() [3/3]

void plask::electrical::shockley::ElectricalFem3DSolver::setCondJunc ( Tensor2< double cond)
inline

Set junction effective conductivity to the single value.

Definition at line 272 of file electr3d.hpp.

◆ setCondNcontact()

void plask::electrical::shockley::ElectricalFem3DSolver::setCondNcontact ( double  cond)
inline

Set n-contact layer conductivity [S/m].

Definition at line 259 of file electr3d.hpp.

◆ setCondPcontact()

void plask::electrical::shockley::ElectricalFem3DSolver::setCondPcontact ( double  cond)
inline

Set p-contact layer conductivity [S/m].

Definition at line 251 of file electr3d.hpp.

◆ setMatrix()

void plask::electrical::shockley::ElectricalFem3DSolver::setMatrix ( FemMatrix A,
DataVector< double > &  B,
const BoundaryConditionsWithMesh< RectangularMesh< 3 >::Boundary, double > &  bvoltage,
const LazyData< double > &  temperature 
)
protected

Set stiffness matrix and load vector.

Parameters
[out]Amatrix to fill-in
[out]Bload vector
bvoltageboundary conditions: constant voltage

Definition at line 239 of file electr3d.cpp.

◆ setupActiveRegions()

void plask::electrical::shockley::ElectricalFem3DSolver::setupActiveRegions ( )
protected

Get info on active region.

Definition at line 89 of file electr3d.cpp.

Member Data Documentation

◆ active

std::vector<Active> plask::electrical::shockley::ElectricalFem3DSolver::active
protected

Active regions information.

Definition at line 96 of file electr3d.hpp.

◆ conds

DataVector<Tensor2<double> > plask::electrical::shockley::ElectricalFem3DSolver::conds
protected

Cached element conductivities.

Definition at line 90 of file electr3d.hpp.

◆ convergence

Convergence plask::electrical::shockley::ElectricalFem3DSolver::convergence

Convergence method.

Definition at line 180 of file electr3d.hpp.

◆ current

DataVector<Vec<3, double> > plask::electrical::shockley::ElectricalFem3DSolver::current
protected

Computed current densities.

Definition at line 93 of file electr3d.hpp.

◆ default_junction_conductivity

Tensor2<double> plask::electrical::shockley::ElectricalFem3DSolver::default_junction_conductivity
protected

default electrical conductivity for p-n junction in y-direction [S/m]

Definition at line 88 of file electr3d.hpp.

◆ heat

DataVector<double> plask::electrical::shockley::ElectricalFem3DSolver::heat
protected

Computed and cached heat source densities.

Definition at line 94 of file electr3d.hpp.

◆ inTemperature

ReceiverFor<Temperature, Geometry3D> plask::electrical::shockley::ElectricalFem3DSolver::inTemperature

Definition at line 196 of file electr3d.hpp.

◆ junction_conductivity

DataVector<Tensor2<double> > plask::electrical::shockley::ElectricalFem3DSolver::junction_conductivity
protected

electrical conductivity for p-n junction in y-direction [S/m]

Definition at line 87 of file electr3d.hpp.

◆ loopno

int plask::electrical::shockley::ElectricalFem3DSolver::loopno
protected

Number of completed loops.

Definition at line 83 of file electr3d.hpp.

◆ maxcur

Vec<3, double> plask::electrical::shockley::ElectricalFem3DSolver::maxcur

Maximum current in the structure.

Definition at line 183 of file electr3d.hpp.

◆ maxerr

double plask::electrical::shockley::ElectricalFem3DSolver::maxerr

Maximum relative current density correction accepted as convergence.

Definition at line 182 of file electr3d.hpp.

◆ ncond

double plask::electrical::shockley::ElectricalFem3DSolver::ncond
protected

n-contact electrical conductivity [S/m]

Definition at line 81 of file electr3d.hpp.

◆ outConductivity

ProviderFor<Conductivity,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outConductivity

Definition at line 194 of file electr3d.hpp.

◆ outCurrentDensity

ProviderFor<CurrentDensity,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outCurrentDensity

Definition at line 190 of file electr3d.hpp.

◆ outHeat

ProviderFor<Heat,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outHeat

Definition at line 192 of file electr3d.hpp.

◆ outVoltage

ProviderFor<Voltage,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outVoltage

Definition at line 188 of file electr3d.hpp.

◆ pcond

double plask::electrical::shockley::ElectricalFem3DSolver::pcond
protected

p-contact electrical conductivity [S/m]

Definition at line 80 of file electr3d.hpp.

◆ potential

DataVector<double> plask::electrical::shockley::ElectricalFem3DSolver::potential
protected

Computed potentials.

Definition at line 92 of file electr3d.hpp.

◆ toterr

double plask::electrical::shockley::ElectricalFem3DSolver::toterr
protected

Maximum estimated error during all iterations (useful for single calculations managed by external python script)

Definition at line 84 of file electr3d.hpp.

◆ voltage_boundary

BoundaryConditions<RectangularMesh<3>::Boundary, double> plask::electrical::shockley::ElectricalFem3DSolver::voltage_boundary

Boundary condition of constant voltage (K)

Definition at line 186 of file electr3d.hpp.


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