|
PLaSK library
|
Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method. More...
#include <solvers/electrical/shockley/electr3d.hpp>
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. | |
| FemMatrix * | getMatrix () |
| FemMatrix * | getMatrix () |
Public Member Functions inherited from plask::FemSolverWithMesh< SpaceT, MeshT > | |
| FemSolverWithMesh (const std::string &name="") | |
| bool | parseFemConfiguration (XMLReader &reader, Manager &manager) |
| FemMatrix * | getMatrix () |
| FemMatrix * | getMatrix () |
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. | |
| MeshT & | meshRef () const |
| Get current module mesh. | |
| shared_ptr< MeshT > | getMesh () 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< SpaceT > | getGeometry () 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, ValT > | dataLog (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, ValT > | dataLog (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, double > | maxcur |
| Maximum current in the structure. | |
| BoundaryConditions< RectangularMesh< 3 >::Boundary, double > | voltage_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, Geometry3D > | inTemperature |
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< double > | activeCond (size_t n, double U, double jy, double T)=0 |
| Compute conductivity int the active region. | |
| LazyData< double > | loadConductivity () |
| 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< double > | getVoltage (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< double > | getHeatDensity (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< double > | default_junction_conductivity |
| default electrical conductivity for p-n junction in y-direction [S/m] | |
| DataVector< Tensor2< double > > | conds |
| Cached element conductivities. | |
| DataVector< double > | potential |
| Computed potentials. | |
| DataVector< Vec< 3, double > > | current |
| Computed current densities. | |
| DataVector< double > | heat |
| Computed and cached heat source densities. | |
| std::vector< Active > | active |
| 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< MeshT > | mesh |
| 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< SpaceT > | geometry |
| 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 | |
Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method.
Definition at line 24 of file electr3d.hpp.
| plask::electrical::shockley::ElectricalFem3DSolver::ElectricalFem3DSolver | ( | const std::string & | name = "" | ) |
Definition at line 20 of file electr3d.cpp.
| plask::electrical::shockley::ElectricalFem3DSolver::~ElectricalFem3DSolver | ( | ) |
Definition at line 39 of file electr3d.cpp.
|
protectedpure virtual |
Compute conductivity int the active region.
| n | active region number |
| U | junction voltage (V) |
| jy | vertical current (kA/cm²) |
| T | temperature (K) |
Run voltage calculations.
| loops | maximum number of loops to run |
Definition at line 356 of file electr3d.cpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::getCapacitance | ( | ) |
Estimate structure capacitance.
Definition at line 602 of file electr3d.cpp.
|
inline |
Get data with junction effective conductivity.
Definition at line 265 of file electr3d.hpp.
|
inline |
Get n-contact layer conductivity [S/m].
Definition at line 257 of file electr3d.hpp.
|
inline |
Get p-contact layer conductivity [S/m].
Definition at line 249 of file electr3d.hpp.
|
protected |
Definition at line 559 of file electr3d.cpp.
|
protected |
Definition at line 517 of file electr3d.cpp.
|
inline |
Return the maximum estimated error.
Definition at line 246 of file electr3d.hpp.
|
protected |
Definition at line 538 of file electr3d.cpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::getTotalCurrent | ( | size_t | nact = 0 | ) |
Integrate vertical total current flowing vertically through active region.
| nact | number of the active region |
Definition at line 499 of file electr3d.cpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::getTotalEnergy | ( | ) |
Compute total electrostatic energy stored in the structure.
Definition at line 568 of file electr3d.cpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::getTotalHeat | ( | ) |
Compute total heat generated by the structure in unit time.
Definition at line 612 of file electr3d.cpp.
|
protected |
Definition at line 507 of file electr3d.cpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::integrateCurrent | ( | size_t | vindex, |
| bool | onlyactive = false |
||
| ) |
Integrate vertical total current at certain level.
| vindex | vertical index of the element mesh to perform integration at |
| onlyactive | if true only current in the active region is considered |
Definition at line 480 of file electr3d.cpp.
|
inlineprotected |
Return true if the specified element is a junction.
Definition at line 177 of file electr3d.hpp.
|
inlineprotected |
Return true if the specified element is a junction.
Definition at line 174 of file electr3d.hpp.
|
inlineprotected |
Return true if the specified point is at junction.
Definition at line 148 of file electr3d.hpp.
|
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.
| source | source of configuration |
| manager | manager 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.
|
overrideprotectedvirtual |
Initialize the solver.
Reimplemented from plask::Solver.
Definition at line 185 of file electr3d.cpp.
|
overrideprotectedvirtual |
| void plask::electrical::shockley::ElectricalFem3DSolver::parseConfiguration | ( | XMLReader & | source, |
| Manager & | manager | ||
| ) |
Definition at line 45 of file electr3d.cpp.
|
protected |
Save conductivities of active region.
Definition at line 227 of file electr3d.cpp.
|
protected |
Create 3D-vector with calculated heat density.
Definition at line 444 of file electr3d.cpp.
|
inline |
Set junction effective conductivity to previously read data.
Definition at line 277 of file electr3d.hpp.
Set junction effective conductivity to the single value.
Definition at line 267 of file electr3d.hpp.
|
inline |
Set junction effective conductivity to the single value.
Definition at line 272 of file electr3d.hpp.
Set n-contact layer conductivity [S/m].
Definition at line 259 of file electr3d.hpp.
Set p-contact layer conductivity [S/m].
Definition at line 251 of file electr3d.hpp.
|
protected |
Set stiffness matrix and load vector.
| [out] | A | matrix to fill-in |
| [out] | B | load vector |
| bvoltage | boundary conditions: constant voltage |
Definition at line 239 of file electr3d.cpp.
|
protected |
Get info on active region.
Definition at line 89 of file electr3d.cpp.
|
protected |
Active regions information.
Definition at line 96 of file electr3d.hpp.
|
protected |
Cached element conductivities.
Definition at line 90 of file electr3d.hpp.
| Convergence plask::electrical::shockley::ElectricalFem3DSolver::convergence |
Convergence method.
Definition at line 180 of file electr3d.hpp.
|
protected |
Computed current densities.
Definition at line 93 of file electr3d.hpp.
|
protected |
default electrical conductivity for p-n junction in y-direction [S/m]
Definition at line 88 of file electr3d.hpp.
|
protected |
Computed and cached heat source densities.
Definition at line 94 of file electr3d.hpp.
| ReceiverFor<Temperature, Geometry3D> plask::electrical::shockley::ElectricalFem3DSolver::inTemperature |
Definition at line 196 of file electr3d.hpp.
|
protected |
electrical conductivity for p-n junction in y-direction [S/m]
Definition at line 87 of file electr3d.hpp.
|
protected |
Number of completed loops.
Definition at line 83 of file electr3d.hpp.
Maximum current in the structure.
Definition at line 183 of file electr3d.hpp.
| double plask::electrical::shockley::ElectricalFem3DSolver::maxerr |
Maximum relative current density correction accepted as convergence.
Definition at line 182 of file electr3d.hpp.
|
protected |
n-contact electrical conductivity [S/m]
Definition at line 81 of file electr3d.hpp.
| ProviderFor<Conductivity,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outConductivity |
Definition at line 194 of file electr3d.hpp.
| ProviderFor<CurrentDensity,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outCurrentDensity |
Definition at line 190 of file electr3d.hpp.
| ProviderFor<Heat,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outHeat |
Definition at line 192 of file electr3d.hpp.
| ProviderFor<Voltage,Geometry3D>::Delegate plask::electrical::shockley::ElectricalFem3DSolver::outVoltage |
Definition at line 188 of file electr3d.hpp.
|
protected |
p-contact electrical conductivity [S/m]
Definition at line 80 of file electr3d.hpp.
|
protected |
Computed potentials.
Definition at line 92 of file electr3d.hpp.
|
protected |
Maximum estimated error during all iterations (useful for single calculations managed by external python script)
Definition at line 84 of file electr3d.hpp.
| 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.