PLaSK library
Loading...
Searching...
No Matches
plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType > Struct Template Referenceabstract

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

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

Inheritance diagram for plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >:
[legend]
Collaboration diagram for plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >:
[legend]

Classes

struct  Active
 Details of active region. More...
 

Public Member Functions

double compute (unsigned loops=1)
 Run electrical 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.
 
void loadConfiguration (XMLReader &source, Manager &manager) override
 Load configuration from given source.
 
void parseConfiguration (XMLReader &source, Manager &manager)
 
 ElectricalFem2DSolver (const std::string &name="")
 
 ~ElectricalFem2DSolver ()
 
double integrateCurrent (size_t vindex, bool onlyactive)
 
double integrateCurrent (size_t vindex, bool onlyactive)
 
double getTotalEnergy ()
 
double getTotalEnergy ()
 
double getTotalHeat ()
 
double getTotalHeat ()
 
- Public Member Functions inherited from plask::FemSolverWithMaskedMesh< Geometry2DType, RectangularMesh< 2 > >
 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

double maxerr
 Maximum relative current density correction accepted as convergence.
 
BoundaryConditions< RectangularMesh< 2 >::Boundary, doublevoltage_boundary
 Boundary condition.
 
ProviderFor< Voltage, Geometry2DType >::Delegate outVoltage
 
ProviderFor< CurrentDensity, Geometry2DType >::Delegate outCurrentDensity
 
ProviderFor< Heat, Geometry2DType >::Delegate outHeat
 
ProviderFor< Conductivity, Geometry2DType >::Delegate outConductivity
 
ReceiverFor< Temperature, Geometry2DTypeinTemperature
 
Convergence convergence
 Convergence method.
 
- 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 setLocalMatrix (double &k44, double &k33, double &k22, double &k11, double &k43, double &k21, double &k42, double &k31, double &k32, double &k41, double ky, double width, const Vec< 2, double > &midpoint)
 Save locate stiffness matrix to global one.
 
virtual Tensor2< doubleactiveCond (size_t n, double U, double jy, double T)=0
 Compute conductivity int the the active region.
 
LazyData< doubleloadConductivities ()
 Load conductivities.
 
void saveConductivities ()
 Save conductivities of active region.
 
void saveHeatDensities ()
 Create 2D-vector with calculated heat densities.
 
void onInitialize () override
 Initialize the solver.
 
void onInvalidate () override
 Invalidate the data.
 
void setupActiveRegions ()
 Get info on active region.
 
void setMatrix (FemMatrix &A, DataVector< double > &B, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &bvoltage, const LazyData< double > &temperature)
 Set stiffness matrix + load vector.
 
size_t isActive (const Vec< 2 > &point) const
 Return true if the specified point is at junction.
 
size_t isActive (const RectangularMaskedMesh2D::Element &element) const
 Return true if the specified element is a junction.
 
const LazyData< doublegetVoltage (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method) const
 
const LazyData< doublegetHeatDensities (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method)
 
const LazyData< Vec< 2 > > getCurrentDensities (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method)
 
const LazyData< Tensor2< double > > getConductivity (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method)
 
void setLocalMatrix (double &, double &, double &, double &, double &, double &, double &, double &, double &, double &, double, double, const Vec< 2, double > &)
 
void setLocalMatrix (double &k44, double &k33, double &k22, double &k11, double &k43, double &k21, double &k42, double &k31, double &k32, double &k41, double, double, const Vec< 2, double > &midpoint)
 
- 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)
 
Vec< 2, doublemaxcur
 Maximum current in the structure.
 
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< doublepotentials
 Computed potentials.
 
DataVector< Vec< 2, double > > currents
 Computed current densities.
 
DataVector< doubleheats
 Computed and cached heat source densities.
 
std::vector< Activeactive
 Active regions information.
 
- Protected Attributes inherited from plask::FemSolverWithMaskedMesh< Geometry2DType, RectangularMesh< 2 > >
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

template<typename Geometry2DType>
struct plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >

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

Definition at line 25 of file electr2d.hpp.

Constructor & Destructor Documentation

◆ ElectricalFem2DSolver()

plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::ElectricalFem2DSolver ( const std::string &  name = "")

Definition at line 19 of file electr2d.cpp.

◆ ~ElectricalFem2DSolver()

Member Function Documentation

◆ activeCond()

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

Compute conductivity int the the active region.

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

◆ compute()

Run electrical calculations.

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

Definition at line 363 of file electr2d.cpp.

◆ getCapacitance()

Estimate structure capacitance.

Returns
static structure capacitance [pF]

Definition at line 617 of file electr2d.cpp.

◆ getCondJunc()

Get data with junction effective conductivity.

Definition at line 238 of file electr2d.hpp.

◆ getCondNcontact()

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

Definition at line 230 of file electr2d.hpp.

◆ getCondPcontact()

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

Definition at line 222 of file electr2d.hpp.

◆ getConductivity()

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

Definition at line 565 of file electr2d.cpp.

◆ getCurrentDensities()

const LazyData< Vec< 2 > > plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::getCurrentDensities ( shared_ptr< const MeshD< 2 > >  dest_mesh,
InterpolationMethod  method 
)
protected

Definition at line 520 of file electr2d.cpp.

◆ getErr()

Return the maximum estimated error.

Definition at line 219 of file electr2d.hpp.

◆ getHeatDensities()

const LazyData< double > plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::getHeatDensities ( shared_ptr< const MeshD< 2 > >  dest_mesh,
InterpolationMethod  method 
)
protected

Definition at line 542 of file electr2d.cpp.

◆ getTotalCurrent()

Integrate vertical total current flowing vertically through active region.

Parameters
nactnumber of the active region
Returns
computed total current

Definition at line 498 of file electr2d.cpp.

◆ getTotalEnergy() [1/3]

◆ getTotalEnergy() [2/3]

◆ getTotalEnergy() [3/3]

Compute total electrostatic energy stored in the structure.

Returns
total electrostatic energy [J]

◆ getTotalHeat() [1/3]

◆ getTotalHeat() [2/3]

◆ getTotalHeat() [3/3]

Compute total heat generated by the structure in unit time.

Returns
total generated heat (mW)

◆ getVoltage()

const LazyData< double > plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::getVoltage ( shared_ptr< const MeshD< 2 > >  dest_mesh,
InterpolationMethod  method 
) const
protected

Definition at line 508 of file electr2d.cpp.

◆ integrateCurrent() [1/3]

double plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DCartesian >::integrateCurrent ( size_t  vindex,
bool  onlyactive 
)

Definition at line 466 of file electr2d.cpp.

◆ integrateCurrent() [2/3]

double plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DCylindrical >::integrateCurrent ( size_t  vindex,
bool  onlyactive 
)

Definition at line 481 of file electr2d.cpp.

◆ integrateCurrent() [3/3]

double plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::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

◆ isActive() [1/2]

Return true if the specified element is a junction.

Definition at line 158 of file electr2d.hpp.

◆ isActive() [2/2]

size_t plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::isActive ( const Vec< 2 > &  point) const
inlineprotected

Return true if the specified point is at junction.

Parameters
pointpoint to test
Returns
number of active region + 1 (0 for none)

Definition at line 132 of file electr2d.hpp.

◆ loadConductivities()

Load conductivities.

Returns
current temperature

Definition at line 331 of file electr2d.cpp.

◆ loadConfiguration()

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::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 37 of file electr2d.cpp.

◆ onInitialize()

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::onInitialize ( )
overrideprotectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 171 of file electr2d.cpp.

◆ onInvalidate()

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::onInvalidate ( )
overrideprotectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 181 of file electr2d.cpp.

◆ parseConfiguration()

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::parseConfiguration ( XMLReader source,
Manager manager 
)

Definition at line 42 of file electr2d.cpp.

◆ saveConductivities()

Save conductivities of active region.

Definition at line 355 of file electr2d.cpp.

◆ saveHeatDensities()

Create 2D-vector with calculated heat densities.

Definition at line 442 of file electr2d.cpp.

◆ setCondJunc() [1/3]

Set junction effective conductivity to previously read data.

Definition at line 250 of file electr2d.hpp.

◆ setCondJunc() [2/3]

Set junction effective conductivity to the single value.

Definition at line 240 of file electr2d.hpp.

◆ setCondJunc() [3/3]

Set junction effective conductivity to the single value.

Definition at line 245 of file electr2d.hpp.

◆ setCondNcontact()

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

Definition at line 232 of file electr2d.hpp.

◆ setCondPcontact()

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

Definition at line 224 of file electr2d.hpp.

◆ setLocalMatrix() [1/3]

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DCartesian >::setLocalMatrix ( double ,
double ,
double ,
double ,
double ,
double ,
double ,
double ,
double ,
double ,
double  ,
double  ,
const Vec< 2, double > &   
)
inlineprotected

Definition at line 190 of file electr2d.cpp.

◆ setLocalMatrix() [2/3]

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DType >::setLocalMatrix ( double k44,
double k33,
double k22,
double k11,
double k43,
double k21,
double k42,
double k31,
double k32,
double k41,
double  ky,
double  width,
const Vec< 2, double > &  midpoint 
)
inlineprotected

Save locate stiffness matrix to global one.

◆ setLocalMatrix() [3/3]

void plask::electrical::shockley::ElectricalFem2DSolver< Geometry2DCylindrical >::setLocalMatrix ( double k44,
double k33,
double k22,
double k11,
double k43,
double k21,
double k42,
double k31,
double k32,
double k41,
double  ,
double  ,
const Vec< 2, double > &  midpoint 
)
inlineprotected

Definition at line 207 of file electr2d.cpp.

◆ setMatrix()

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

Set stiffness matrix + load vector.

Definition at line 235 of file electr2d.cpp.

◆ setupActiveRegions()

Get info on active region.

Definition at line 90 of file electr2d.cpp.

Member Data Documentation

◆ active

Active regions information.

Definition at line 67 of file electr2d.hpp.

◆ conds

Cached element conductivities.

Definition at line 62 of file electr2d.hpp.

◆ convergence

Convergence method.

Definition at line 176 of file electr2d.hpp.

◆ currents

Computed current densities.

Definition at line 64 of file electr2d.hpp.

◆ default_junction_conductivity

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

Definition at line 60 of file electr2d.hpp.

◆ heats

Computed and cached heat source densities.

Definition at line 65 of file electr2d.hpp.

◆ inTemperature

◆ junction_conductivity

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

Definition at line 59 of file electr2d.hpp.

◆ loopno

Number of completed loops.

Definition at line 54 of file electr2d.hpp.

◆ maxcur

Maximum current in the structure.

Definition at line 57 of file electr2d.hpp.

◆ maxerr

Maximum relative current density correction accepted as convergence.

Definition at line 161 of file electr2d.hpp.

◆ ncond

n-contact electrical conductivity [S/m]

Definition at line 52 of file electr2d.hpp.

◆ outConductivity

◆ outCurrentDensity

◆ outHeat

◆ outVoltage

◆ pcond

p-contact electrical conductivity [S/m]

Definition at line 51 of file electr2d.hpp.

◆ potentials

Computed potentials.

Definition at line 63 of file electr2d.hpp.

◆ toterr

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

Definition at line 55 of file electr2d.hpp.

◆ voltage_boundary


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