PLaSK library

Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
plask::thermal::dynamic::DynamicThermalFem3DSolver Struct Reference

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

`#include <solvers/thermal/dynamic/femT3d.hpp>`

Inheritance diagram for plask::thermal::dynamic::DynamicThermalFem3DSolver:
[legend]
Collaboration diagram for plask::thermal::dynamic::DynamicThermalFem3DSolver:
[legend]

## Classes
struct | ThermalConductivityData

## Public Member Functions
double | compute (double time)
| Run temperature calculations.
double | getElapsTime () const
| Get calculations elapsed time.
void | loadConfiguration (XMLReader &source, Manager &manager) override
| Load configuration from given `source`.
| DynamicThermalFem3DSolver (const std::string &name="")
std::string | getClassName () const override
| Get name of solver.
| ~DynamicThermalFem3DSolver ()
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.
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< 3 >::Boundary, double > | temperature_boundary
| Boundary condition of constant temperature (K)
ProviderFor< Temperature, Geometry3D >::Delegate | outTemperature
ProviderFor< HeatFlux, Geometry3D >::Delegate | outHeatFlux
ProviderFor< ThermalConductivity, Geometry3D >::Delegate | outThermalConductivity
ReceiverFor< Heat, Geometry3D > | inHeat
double | inittemp
| Initial temperature.
double | methodparam
| Initial parameter determining the calculation method (0.5 - Crank-Nicolson, 0 - explicit, 1 - implicit)
double | timestep
| Time step in nanoseconds.
double | elapstime
| Calculations elapsed time.
bool | lumping
| Whether use lumping for matrices?
size_t | rebuildfreq
| Frequency of mass matrix rebuilding.
size_t | logfreq
| Frequency of iteration progress reporting.
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, FemMatrix &B, DataVector< double > &F, const BoundaryConditionsWithMesh< RectangularMesh< 3 >::Boundary, double > &btemperature)
| Set stiffness matrix + load vector.
void | saveHeatFluxes ()
| Create 3D-vector with calculated heat fluxes.
void | onInitialize () override
| Initialize the solver.
void | onInvalidate () override
| Invalidate the data.
const LazyData< double > | getTemperatures (const shared_ptr< const MeshD< 3 > > &dst_mesh, InterpolationMethod method) const
const LazyData< Vec< 3 > > | getHeatFluxes (const shared_ptr< const MeshD< 3 > > &dst_mesh, InterpolationMethod method)
const LazyData< Tensor2< double > > | getThermalConductivity (const shared_ptr< const MeshD< 3 > > &dst_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 | maxT
| Maximum temperature recorded.
DataVector< double > | temperatures
| Computed temperatures.
DataVector< double > | thickness
| Thicknesses of the layers.
DataVector< Vec< 3, double > > | fluxes
| Computed (only when needed) heat fluxes on our own mesh.
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

## Detailed Description

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

Definition at line 25 of file femT3d.hpp.

## Constructor & Destructor Documentation

## ◆ DynamicThermalFem3DSolver()

plask::thermal::dynamic::DynamicThermalFem3DSolver::DynamicThermalFem3DSolver | ( | const std::string & | name = `""` | ) |

Definition at line 22 of file femT3d.cpp.

## ◆ ~DynamicThermalFem3DSolver()

plask::thermal::dynamic::DynamicThermalFem3DSolver::~DynamicThermalFem3DSolver | ( |  | ) |

Definition at line 42 of file femT3d.cpp.

## Member Function Documentation

## ◆ compute()

double plask::thermal::dynamic::DynamicThermalFem3DSolver::compute | ( | double | time | ) |

Run temperature calculations.

Returns
  max correction of temperature against the last call

Definition at line 250 of file femT3d.cpp.

## ◆ getClassName()

std::string plask::thermal::dynamic::DynamicThermalFem3DSolver::getClassName | ( |  | ) | const
| inline override virtual

Get name of solver.

Returns
  name of this solver

Implements plask::Solver.

Definition at line 85 of file femT3d.hpp.

## ◆ getElapsTime()

double plask::thermal::dynamic::DynamicThermalFem3DSolver::getElapsTime | ( |  | ) | const
| inline

Get calculations elapsed time.

Definition at line 79 of file femT3d.hpp.

## ◆ getHeatFluxes()

const LazyData< Vec< 3 > > plask::thermal::dynamic::DynamicThermalFem3DSolver::getHeatFluxes | ( | const shared_ptr< const MeshD< 3 > > & | dst_mesh,
|  | InterpolationMethod | method
| ) |  |
| protected

Definition at line 374 of file femT3d.cpp.

## ◆ getTemperatures()

const LazyData< double > plask::thermal::dynamic::DynamicThermalFem3DSolver::getTemperatures | ( | const shared_ptr< const MeshD< 3 > > & | dst_mesh,
|  | InterpolationMethod | method
| ) |  | const
| protected

Definition at line 363 of file femT3d.cpp.

## ◆ getThermalConductivity()

const LazyData< Tensor2< double > > plask::thermal::dynamic::DynamicThermalFem3DSolver::getThermalConductivity | ( | const shared_ptr< const MeshD< 3 > > & | dst_mesh,
|  | InterpolationMethod | method
| ) |  |
| protected

Definition at line 414 of file femT3d.cpp.

## ◆ loadConfiguration()

void plask::thermal::dynamic::DynamicThermalFem3DSolver::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::Solver.

Definition at line 46 of file femT3d.cpp.

## ◆ onInitialize()

void plask::thermal::dynamic::DynamicThermalFem3DSolver::onInitialize | ( |  | ) |
| override protected virtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 74 of file femT3d.cpp.

## ◆ onInvalidate()

void plask::thermal::dynamic::DynamicThermalFem3DSolver::onInvalidate | ( |  | ) |
| override protected virtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 120 of file femT3d.cpp.

## ◆ saveHeatFluxes()

void plask::thermal::dynamic::DynamicThermalFem3DSolver::saveHeatFluxes | ( |  | ) |
| protected

Create 3D-vector with calculated heat fluxes.

Definition at line 318 of file femT3d.cpp.

## ◆ setMatrix()

void plask::thermal::dynamic::DynamicThermalFem3DSolver::setMatrix | ( | FemMatrix & | A,
|  | FemMatrix & | B,
|  | DataVector< double > & | F,
|  | const BoundaryConditionsWithMesh< RectangularMesh< 3 >::Boundary, double > & | btemperature
| ) |  |
| protected

Set stiffness matrix + load vector.

Definition at line 127 of file femT3d.cpp.

## Member Data Documentation

## ◆ elapstime

double plask::thermal::dynamic::DynamicThermalFem3DSolver::elapstime

Calculations elapsed time.

Definition at line 67 of file femT3d.hpp.

## ◆ fluxes

DataVector<Vec<3,double> > plask::thermal::dynamic::DynamicThermalFem3DSolver::fluxes
| protected

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

Definition at line 35 of file femT3d.hpp.

## ◆ inHeat

ReceiverFor<Heat, Geometry3D> plask::thermal::dynamic::DynamicThermalFem3DSolver::inHeat

Definition at line 62 of file femT3d.hpp.

## ◆ inittemp

double plask::thermal::dynamic::DynamicThermalFem3DSolver::inittemp

Initial temperature.

Definition at line 64 of file femT3d.hpp.

## ◆ logfreq

size_t plask::thermal::dynamic::DynamicThermalFem3DSolver::logfreq

Frequency of iteration progress reporting.

Definition at line 70 of file femT3d.hpp.

## ◆ lumping

bool plask::thermal::dynamic::DynamicThermalFem3DSolver::lumping

Whether use lumping for matrices?

Definition at line 68 of file femT3d.hpp.

## ◆ maxT

double plask::thermal::dynamic::DynamicThermalFem3DSolver::maxT
| protected

Maximum temperature recorded.

Definition at line 29 of file femT3d.hpp.

## ◆ methodparam

double plask::thermal::dynamic::DynamicThermalFem3DSolver::methodparam

Initial parameter determining the calculation method (0.5 - Crank-Nicolson, 0 - explicit, 1 - implicit)

Definition at line 65 of file femT3d.hpp.

## ◆ outHeatFlux

ProviderFor<HeatFlux,Geometry3D>::Delegate plask::thermal::dynamic::DynamicThermalFem3DSolver::outHeatFlux

Definition at line 58 of file femT3d.hpp.

## ◆ outTemperature

ProviderFor<Temperature,Geometry3D>::Delegate plask::thermal::dynamic::DynamicThermalFem3DSolver::outTemperature

Definition at line 56 of file femT3d.hpp.

## ◆ outThermalConductivity

ProviderFor<ThermalConductivity,Geometry3D>::Delegate plask::thermal::dynamic::DynamicThermalFem3DSolver::outThermalConductivity

Definition at line 60 of file femT3d.hpp.

## ◆ rebuildfreq

size_t plask::thermal::dynamic::DynamicThermalFem3DSolver::rebuildfreq

Frequency of mass matrix rebuilding.

Definition at line 69 of file femT3d.hpp.

## ◆ temperature_boundary

BoundaryConditions<RectangularMesh<3>::Boundary,double> plask::thermal::dynamic::DynamicThermalFem3DSolver::temperature_boundary

Boundary condition of constant temperature (K)

Definition at line 54 of file femT3d.hpp.

## ◆ temperatures

DataVector<double> plask::thermal::dynamic::DynamicThermalFem3DSolver::temperatures
| protected

Computed temperatures.

Definition at line 31 of file femT3d.hpp.

## ◆ thickness

DataVector<double> plask::thermal::dynamic::DynamicThermalFem3DSolver::thickness
| protected

Thicknesses of the layers.

Definition at line 33 of file femT3d.hpp.

## ◆ timestep

double plask::thermal::dynamic::DynamicThermalFem3DSolver::timestep

Time step in nanoseconds.

Definition at line 66 of file femT3d.hpp.

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

- solvers/thermal/dynamic/femT3d.hpp
- solvers/thermal/dynamic/femT3d.cpp