PLaSK library

Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType > Struct Template Reference

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

`#include <solvers/thermal/static/therm2d.hpp>`

Inheritance diagram for plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >:
[legend]
Collaboration diagram for plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >:
[legend]

## Classes
struct | ThermalConductivityData

## Public Member Functions
double | compute (int loops=1)
| Run temperature calculations.
double | getErr () const
| Get max absolute correction for temperature.
void | loadConfiguration (XMLReader &source, Manager &manager) override
| Load configuration from given `source`.
| ThermalFem2DSolver (const std::string &name="")
std::string | getClassName () const override
| Get name of solver.
| ~ThermalFem2DSolver ()
const LazyData< double > | getTemperatures (const shared_ptr< const MeshD< 2 > > &dest_mesh, InterpolationMethod method) const
const LazyData< Vec< 2 > > | getHeatFluxes (const shared_ptr< const MeshD< 2 > > &dest_mesh, InterpolationMethod method)
const LazyData< Tensor2< double > > | getThermalConductivity (const shared_ptr< const MeshD< 2 > > &dest_mesh, InterpolationMethod method)
std::string | getClassName () const
| Get name of solver.
std::string | getClassName () const
| Get name of solver.
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 ()
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 | 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.
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
BoundaryConditions< RectangularMesh< 2 >::Boundary, double > | temperature_boundary
| Boundary condition of constant temperature (K)
BoundaryConditions< RectangularMesh< 2 >::Boundary, double > | heatflux_boundary
| Boundary condition of constant heat flux [W/m^2].
BoundaryConditions< RectangularMesh< 2 >::Boundary, Convection > | convection_boundary
| Boundary condition of convection.
BoundaryConditions< RectangularMesh< 2 >::Boundary, Radiation > | radiation_boundary
| Boundary condition of radiation.
ProviderFor< Temperature, Geometry2DType >::Delegate | outTemperature
ProviderFor< HeatFlux, Geometry2DType >::Delegate | outHeatFlux
ProviderFor< ThermalConductivity, Geometry2DType >::Delegate | outThermalConductivity
ReceiverFor< Heat, Geometry2DType > | inHeat
double | maxerr
| Maximum residual error accepted as convergence.
double | inittemp
| Initial temperature.
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< 2 >::Boundary, double > &btemperature, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &bheatflux, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > &bconvection, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > &bradiation)
| Set stiffness matrix + load vector.
template<typename MatrixT >
MatrixT | makeMatrix ()
| Setup matrix.
void | saveHeatFluxes ()
| Create 2D-vector with calculated heat fluxes.
void | onInitialize () override
| Initialize the solver.
void | onInvalidate () override
| Invalidate the data.
void | setMatrix (FemMatrix &A, DataVector< double > &B, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &btemperature, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &bheatflux, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > &bconvection, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > &bradiation)
void | setMatrix (FemMatrix &A, DataVector< double > &B, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &btemperature, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > &bheatflux, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > &bconvection, const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > &bradiation)
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
int | loopno
| Number of completed loops.
double | maxT
| Maximum temperature recorded.
double | toterr
| Maximum estimated error during all iterations (useful for single calculations managed by external python script)
DataVector< double > | temperatures
| Computed temperatures.
DataVector< double > | thickness
| Thicknesses of the layers.
DataVector< Vec< 2, double > > | fluxes
| Computed (only when needed) heat fluxes on our own mesh.
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< 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

## Detailed Description

template<typename Geometry2DType>
struct plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >

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

Definition at line 28 of file therm2d.hpp.

## Constructor & Destructor Documentation

## ◆ ThermalFem2DSolver()

template<typename Geometry2DType >

plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::ThermalFem2DSolver | ( | const std::string & | name = `""` | ) |

Definition at line 19 of file therm2d.cpp.

## ◆ ~ThermalFem2DSolver()

template<typename Geometry2DType >

plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::~ThermalFem2DSolver | ( |  | ) |

Definition at line 35 of file therm2d.cpp.

## Member Function Documentation

## ◆ compute()

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::compute | ( | int | loops = `1` | ) |

Run temperature calculations.

Parameters

  loops | maximum number of loops to run

Returns
  max correction of temperature against the last call

Definition at line 444 of file therm2d.cpp.

## ◆ getClassName() [1/3]

std::string plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DCartesian >::getClassName | ( |  | ) | const
| virtual

Get name of solver.

Returns
  name of this solver

Implements plask::Solver.

Definition at line 609 of file therm2d.cpp.

## ◆ getClassName() [2/3]

std::string plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DCylindrical >::getClassName | ( |  | ) | const
| virtual

Get name of solver.

Returns
  name of this solver

Implements plask::Solver.

Definition at line 610 of file therm2d.cpp.

## ◆ getClassName() [3/3]

template<typename Geometry2DType >

std::string plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::getClassName | ( |  | ) | const
| override virtual

Get name of solver.

Returns
  name of this solver

Implements plask::Solver.

## ◆ getErr()

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::getErr | ( |  | ) | const
| inline

Get max absolute correction for temperature.

Definition at line 89 of file therm2d.hpp.

## ◆ getHeatFluxes()

template<typename Geometry2DType >

const LazyData< Vec< 2 > > plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::getHeatFluxes | ( | const shared_ptr< const MeshD< 2 > > & | dest_mesh,
|  | InterpolationMethod | method
| ) |  |

Definition at line 556 of file therm2d.cpp.

## ◆ getTemperatures()

template<typename Geometry2DType >

const LazyData< double > plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::getTemperatures | ( | const shared_ptr< const MeshD< 2 > > & | dest_mesh,
|  | InterpolationMethod | method
| ) |  | const

Definition at line 544 of file therm2d.cpp.

## ◆ getThermalConductivity()

template<typename Geometry2DType >

const LazyData< Tensor2< double > > plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::getThermalConductivity | ( | const shared_ptr< const MeshD< 2 > > & | dest_mesh,
|  | InterpolationMethod | method
| ) |  |

Definition at line 600 of file therm2d.cpp.

## ◆ loadConfiguration()

template<typename Geometry2DType >

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::loadConfiguration | ( | XMLReader & | source,
|  | Manager & | manager
| ) |  |
| override virtual

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

  source | source of configuration
  manager | manager from which information about geometry, meshes, materials, and so on can be get if needed

Reimplemented from plask::SolverWithMesh< SpaceT, MeshT >.

Definition at line 40 of file therm2d.cpp.

## ◆ makeMatrix()

template<typename Geometry2DType >
template<typename MatrixT >

MatrixT plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::makeMatrix | ( |  | ) |
| protected

Setup matrix.

## ◆ onInitialize()

template<typename Geometry2DType >

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::onInitialize | ( |  | ) |
| override protected virtual

Initialize the solver.

Reimplemented from plask::FemSolverWithMaskedMesh< Geometry2DType, RectangularMesh< 2 > >.

Definition at line 72 of file therm2d.cpp.

## ◆ onInvalidate()

template<typename Geometry2DType >

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::onInvalidate | ( |  | ) |
| override protected virtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 117 of file therm2d.cpp.

## ◆ saveHeatFluxes()

template<typename Geometry2DType >

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::saveHeatFluxes | ( |  | ) |
| protected

Create 2D-vector with calculated heat fluxes.

Definition at line 505 of file therm2d.cpp.

## ◆ setMatrix() [1/3]

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DCartesian >::setMatrix | ( | FemMatrix & | A,
|  | DataVector< double > & | B,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | btemperature,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | bheatflux,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > & | bconvection,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > & | bradiation
| ) |  |
| protected

Definition at line 177 of file therm2d.cpp.

## ◆ setMatrix() [2/3]

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DCylindrical >::setMatrix | ( | FemMatrix & | A,
|  | DataVector< double > & | B,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | btemperature,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | bheatflux,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > & | bconvection,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > & | bradiation
| ) |  |
| protected

Definition at line 302 of file therm2d.cpp.

## ◆ setMatrix() [3/3]

template<typename Geometry2DType >

void plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::setMatrix | ( | FemMatrix & | A,
|  | DataVector< double > & | B,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | btemperature,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, double > & | bheatflux,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Convection > & | bconvection,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 2 >::Boundary, Radiation > & | bradiation
| ) |  |
| protected

Set stiffness matrix + load vector.

## Member Data Documentation

## ◆ convection_boundary

template<typename Geometry2DType >

BoundaryConditions<RectangularMesh<2>::Boundary, Convection> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::convection_boundary

Boundary condition of convection.

Definition at line 67 of file therm2d.hpp.

## ◆ fluxes

template<typename Geometry2DType >

DataVector<Vec<2, double> > plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::fluxes
| protected

Computed (only when needed) heat fluxes on our own mesh.

Definition at line 39 of file therm2d.hpp.

## ◆ heatflux_boundary

template<typename Geometry2DType >

BoundaryConditions<RectangularMesh<2>::Boundary, double> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::heatflux_boundary

Boundary condition of constant heat flux [W/m^2].

Definition at line 66 of file therm2d.hpp.

## ◆ inHeat

template<typename Geometry2DType >

ReceiverFor<Heat, Geometry2DType> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::inHeat

Definition at line 76 of file therm2d.hpp.

## ◆ inittemp

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::inittemp

Initial temperature.

Definition at line 79 of file therm2d.hpp.

## ◆ loopno

template<typename Geometry2DType >

int plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::loopno
| protected

Number of completed loops.

Definition at line 30 of file therm2d.hpp.

## ◆ maxerr

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::maxerr

Maximum residual error accepted as convergence.

Definition at line 78 of file therm2d.hpp.

## ◆ maxT

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::maxT
| protected

Maximum temperature recorded.

Definition at line 31 of file therm2d.hpp.

## ◆ outHeatFlux

template<typename Geometry2DType >

ProviderFor<HeatFlux,Geometry2DType>::Delegate plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::outHeatFlux

Definition at line 72 of file therm2d.hpp.

## ◆ outTemperature

template<typename Geometry2DType >

ProviderFor<Temperature,Geometry2DType>::Delegate plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::outTemperature

Definition at line 70 of file therm2d.hpp.

## ◆ outThermalConductivity

template<typename Geometry2DType >

ProviderFor<ThermalConductivity,Geometry2DType>::Delegate plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::outThermalConductivity

Definition at line 74 of file therm2d.hpp.

## ◆ radiation_boundary

template<typename Geometry2DType >

BoundaryConditions<RectangularMesh<2>::Boundary, Radiation> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::radiation_boundary

Boundary condition of radiation.

Definition at line 68 of file therm2d.hpp.

## ◆ temperature_boundary

template<typename Geometry2DType >

BoundaryConditions<RectangularMesh<2>::Boundary, double> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::temperature_boundary

Boundary condition of constant temperature (K)

Definition at line 64 of file therm2d.hpp.

## ◆ temperatures

template<typename Geometry2DType >

DataVector<double> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::temperatures
| protected

Computed temperatures.

Definition at line 35 of file therm2d.hpp.

## ◆ thickness

template<typename Geometry2DType >

DataVector<double> plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::thickness
| protected

Thicknesses of the layers.

Definition at line 37 of file therm2d.hpp.

## ◆ toterr

template<typename Geometry2DType >

double plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >::toterr
| protected

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

Definition at line 32 of file therm2d.hpp.

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

- solvers/thermal/static/therm2d.hpp
- solvers/thermal/static/therm2d.cpp