PLaSK library
Loading...
Searching...
No Matches
plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType > Struct Template Reference

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

#include <solvers/electrical/capacitance/capacitance2d.hpp>

Inheritance diagram for plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >:
[legend]
Collaboration diagram for plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >:
[legend]

Classes

struct  Active
 Details of active region. More...
 

Public Member Functions

std::string getClassName () const override
 Get name of solver.
 
double getFrequency () const
 Return current frequency.
 
void setFrequency (double freq)
 Set new frequency.
 
void compute ()
 Run electrical calculations.
 
dcomplex integrateCurrent (size_t vindex, bool active_current=false, bool onlyactive=false) const
 Integrate vertical total current (AC only) at certain level.
 
dcomplex getAcCurrent (size_t nact=0, bool active_current=false) const
 Integrate vertical current (AC only) flowing vertically through active region.
 
dcomplex getImpedance () const
 Compute impedance at given frequency.
 
dcomplex getS11 (dcomplex Z0=50.) const
 Compute structure S11 parameter at given frequency.
 
void loadConfiguration (XMLReader &source, Manager &manager) override
 Load configuration from given source.
 
void parseConfiguration (XMLReader &source, Manager &manager)
 
 Capacitance2DSolver (const std::string &name="")
 
 ~Capacitance2DSolver ()
 
dcomplex integrateCurrent (size_t vindex, bool active_current, bool onlyactive) const
 
dcomplex integrateCurrent (size_t vindex, bool active_current, bool onlyactive) const
 
std::string getClassName () const
 Get name of solver.
 
std::string getClassName () const
 Get name of solver.
 
- Public Member Functions inherited from plask::electrical::capacitance::ComplexFemSolverWithMaskedMesh< Geometry2DType, RectangularMesh< 2 > >
 ComplexFemSolverWithMaskedMesh (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< dcomplex > * getMatrix ()
 
FemMatrix< dcomplex > * getMatrix ()
 
- Public Member Functions inherited from plask::electrical::capacitance::ComplexFemSolverWithMesh< SpaceT, MeshT >
 ComplexFemSolverWithMesh (const std::string &name="")
 
bool parseFemConfiguration (XMLReader &reader, Manager &manager)
 
FemMatrix< dcomplex > * getMatrix ()
 
FemMatrix< dcomplex > * 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.
 
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.
 
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

BoundaryConditions< RectangularMesh< 2 >::Boundary, dcomplex > voltage_boundary
 Boundary condition.
 
ProviderFor< AcVoltage, Geometry2DType >::Delegate outAcVoltage
 
ProviderFor< AcCurrentDensity, Geometry2DType >::Delegate outAcCurrentDensity
 
ReceiverFor< Conductivity, Geometry2DTypeinDifferentialConductivity
 
ReceiverFor< Temperature, Geometry2DTypeinTemperature
 
- Public Attributes inherited from plask::electrical::capacitance::ComplexFemSolverWithMesh< SpaceT, MeshT >
ComplexFemMatrixAlgorithm algorithm = ALGORITHM_GAUSS
 Factorization algorithm to use.
 

Protected Member Functions

void setLocalMatrix (dcomplex &k44, dcomplex &k33, dcomplex &k22, dcomplex &k11, dcomplex &k43, dcomplex &k21, dcomplex &k42, dcomplex &k31, dcomplex &k32, dcomplex &k41, dcomplex ky, double width, const Vec< 2, double > &midpoint)
 Save locate stiffness matrix to global one.
 
void onInitialize () override
 Initialize the solver.
 
void onInvalidate () override
 Invalidate the data.
 
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.
 
void setupActiveRegions ()
 Get info on active region.
 
void setMatrix (FemMatrix< dcomplex > &A, DataVector< dcomplex > &B, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, dcomplex > &bvoltage)
 Set stiffness matrix + load vector.
 
void loadConductivities ()
 
Vec< 2, dcomplex > getElementCurrentDensity (const RectangularMaskedMesh2D::Element &element, bool active_current=false) const
 
void computeCurrentDensities ()
 
const LazyData< dcomplex > getVoltage (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method) const
 
const LazyData< Vec< 2, dcomplex > > getCurrentDensities (shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod method)
 
void setLocalMatrix (dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex &, dcomplex, double, const Vec< 2, double > &)
 
void setLocalMatrix (dcomplex &k44, dcomplex &k33, dcomplex &k22, dcomplex &k11, dcomplex &k43, dcomplex &k21, dcomplex &k42, dcomplex &k31, dcomplex &k32, dcomplex &k41, dcomplex, 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

std::vector< Activeactive
 Active regions information.
 
DataVector< dcomplex > potentials
 Computed potentials.
 
DataVector< Tensor2< dcomplex > > conductivities
 Conductivities in mesh points.
 
DataVector< Vec< 2, dcomplex > > currents
 Computed current densities.
 
double frequency = 20.
 Frequency of AC signal [GHz].
 
- Protected Attributes inherited from plask::electrical::capacitance::ComplexFemSolverWithMaskedMesh< 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::capacitance::Capacitance2DSolver< Geometry2DType >

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

Definition at line 27 of file capacitance2d.hpp.

Constructor & Destructor Documentation

◆ Capacitance2DSolver()

plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::Capacitance2DSolver ( const std::string &  name = "")

Definition at line 19 of file capacitance2d.cpp.

◆ ~Capacitance2DSolver()

Member Function Documentation

◆ compute()

Run electrical calculations.

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

Definition at line 259 of file capacitance2d.cpp.

◆ computeCurrentDensities()

Definition at line 306 of file capacitance2d.cpp.

◆ getAcCurrent()

dcomplex plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::getAcCurrent ( size_t  nact = 0,
bool  active_current = false 
) const

Integrate vertical current (AC only) flowing vertically through active region.

Parameters
nactnumber of the active region
active_currentif true, the active current (in phase with the voltage) is returned, otherwise the total current is returned
Returns
computed total current

Definition at line 350 of file capacitance2d.cpp.

◆ getClassName() [1/3]

std::string plask::electrical::capacitance::Capacitance2DSolver< Geometry2DCartesian >::getClassName ( ) const
virtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 411 of file capacitance2d.cpp.

◆ getClassName() [2/3]

std::string plask::electrical::capacitance::Capacitance2DSolver< Geometry2DCylindrical >::getClassName ( ) const
virtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 412 of file capacitance2d.cpp.

◆ getClassName() [3/3]

std::string plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::getClassName ( ) const
overridevirtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

◆ getCurrentDensities()

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

Definition at line 387 of file capacitance2d.cpp.

◆ getElementCurrentDensity()

Vec< 2, dcomplex > plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::getElementCurrentDensity ( const RectangularMaskedMesh2D::Element element,
bool  active_current = false 
) const
protected

Definition at line 288 of file capacitance2d.cpp.

◆ getFrequency()

Return current frequency.

Definition at line 142 of file capacitance2d.hpp.

◆ getImpedance()

Compute impedance at given frequency.

Definition at line 359 of file capacitance2d.cpp.

◆ getS11()

dcomplex plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::getS11 ( dcomplex  Z0 = 50.) const

Compute structure S11 parameter at given frequency.

Parameters
Z0reference impedance (default 50 Ohm)
Returns
S11 parameter (complex)

Definition at line 370 of file capacitance2d.cpp.

◆ getVoltage()

const LazyData< dcomplex > plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::getVoltage ( shared_ptr< const MeshD< 2 > >  dest_mesh,
InterpolationMethod  method 
) const
protected

Definition at line 375 of file capacitance2d.cpp.

◆ integrateCurrent() [1/3]

dcomplex plask::electrical::capacitance::Capacitance2DSolver< Geometry2DCartesian >::integrateCurrent ( size_t  vindex,
bool  active_current,
bool  onlyactive 
) const

Definition at line 315 of file capacitance2d.cpp.

◆ integrateCurrent() [2/3]

dcomplex plask::electrical::capacitance::Capacitance2DSolver< Geometry2DCylindrical >::integrateCurrent ( size_t  vindex,
bool  active_current,
bool  onlyactive 
) const

Definition at line 332 of file capacitance2d.cpp.

◆ integrateCurrent() [3/3]

dcomplex plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::integrateCurrent ( size_t  vindex,
bool  active_current = false,
bool  onlyactive = false 
) const

Integrate vertical total current (AC only) at certain level.

Parameters
vindexvertical index of the element mesh to perform integration at
active_currentif true, the active current (in phase with the voltage) is returned, otherwise the total current is returned
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 111 of file capacitance2d.hpp.

◆ isActive() [2/2]

size_t plask::electrical::capacitance::Capacitance2DSolver< 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 85 of file capacitance2d.hpp.

◆ loadConductivities()

< Cached complex conductivities

Definition at line 243 of file capacitance2d.cpp.

◆ loadConfiguration()

void plask::electrical::capacitance::Capacitance2DSolver< 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 28 of file capacitance2d.cpp.

◆ onInitialize()

void plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::onInitialize ( )
overrideprotectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 115 of file capacitance2d.cpp.

◆ onInvalidate()

void plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::onInvalidate ( )
overrideprotectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 122 of file capacitance2d.cpp.

◆ parseConfiguration()

void plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::parseConfiguration ( XMLReader source,
Manager manager 
)

Definition at line 33 of file capacitance2d.cpp.

◆ setFrequency()

Set new frequency.

Definition at line 145 of file capacitance2d.hpp.

◆ setLocalMatrix() [1/3]

void plask::electrical::capacitance::Capacitance2DSolver< Geometry2DCartesian >::setLocalMatrix ( dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex &  ,
dcomplex  ,
double  ,
const Vec< 2, double > &   
)
inlineprotected

Definition at line 129 of file capacitance2d.cpp.

◆ setLocalMatrix() [2/3]

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

Save locate stiffness matrix to global one.

◆ setLocalMatrix() [3/3]

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

Definition at line 146 of file capacitance2d.cpp.

◆ setMatrix()

void plask::electrical::capacitance::Capacitance2DSolver< Geometry2DType >::setMatrix ( FemMatrix< dcomplex > &  A,
DataVector< dcomplex > &  B,
const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, dcomplex > &  bvoltage 
)
protected

Set stiffness matrix + load vector.

Definition at line 174 of file capacitance2d.cpp.

◆ setupActiveRegions()

Get info on active region.

Definition at line 47 of file capacitance2d.cpp.

Member Data Documentation

◆ active

Active regions information.

Definition at line 52 of file capacitance2d.hpp.

◆ conductivities

Conductivities in mesh points.

Definition at line 55 of file capacitance2d.hpp.

◆ currents

Computed current densities.

Definition at line 56 of file capacitance2d.hpp.

◆ frequency

Frequency of AC signal [GHz].

Definition at line 58 of file capacitance2d.hpp.

◆ inDifferentialConductivity

◆ inTemperature

◆ outAcCurrentDensity

◆ outAcVoltage

◆ potentials

Computed potentials.

Definition at line 54 of file capacitance2d.hpp.

◆ voltage_boundary

Boundary condition.

Definition at line 129 of file capacitance2d.hpp.


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