hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
thermal.hpp
Go to the documentation of this file.
1#pragma once
10#include <map>
11#include <utility>
12#include <vector>
13
15#include "hpfem/core/types.hpp"
18#include "hpfem/mesh/mesh.hpp"
20
21namespace hpfem::physics {
22
29template <int Dim>
31 const Vector& e_h, Real omega,
32 const materials::MaterialMap& materials,
33 const fespace::DofMap<Dim>& h1);
34
41template <int Dim>
42[[nodiscard]] Vector absorbed_power_load(const fespace::NedelecDofMap<Dim>& dofs, const Vector& e_h,
43 Real omega, const materials::MaterialMap& materials,
44 const fespace::DofMap<Dim>& h1, int extra_order = 2);
45
54
57template <int Dim>
58class Thermal {
59 public:
62 [[nodiscard]] const fespace::DofMap<Dim>& dofs() const noexcept { return *dofs_; }
63 [[nodiscard]] const ThermalSetup& setup() const noexcept { return setup_; }
65 [[nodiscard]] Real conductivity(Index cell) const;
68 [[nodiscard]] SparseMatrix stiffness() const;
69 [[nodiscard]] SparseMatrix mass() const;
73 [[nodiscard]] Vector solve(const Vector& q) const;
75 [[nodiscard]] Vector solve_load(const Vector& load) const;
78 [[nodiscard]] Real total_power(const Vector& q) const;
79
80 private:
81 const fespace::DofMap<Dim>* dofs_;
82 ThermalSetup setup_;
83};
84
87 const fespace::DofMap<2>&);
90 const fespace::DofMap<3>&);
93 const fespace::DofMap<2>&, int);
96 const fespace::DofMap<3>&, int);
97extern template class Thermal<2>;
98extern template class Thermal<3>;
99
100} // namespace hpfem::physics
Definition dof_map.hpp:51
Definition material.hpp:149
Definition thermal.hpp:58
const ThermalSetup & setup() const noexcept
Definition thermal.hpp:63
Thermal(const fespace::DofMap< Dim > &dofs, ThermalSetup setup)
Real conductivity(Index cell) const
κ of a cell.
Real total_power(const Vector &q) const
Vector solve(const Vector &q) const
const fespace::DofMap< Dim > & dofs() const noexcept
Definition thermal.hpp:62
Vector solve_load(const Vector &load) const
Temperature for an assembled load (absorbed_power_load).
SparseMatrix mass() const
SparseMatrix stiffness() const
Definition absorption.hpp:21
template Vector absorbed_power_density< 2 >(const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 2 > &)
Vector absorbed_power_load(const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, const fespace::DofMap< Dim > &h1, int extra_order=2)
template Vector absorbed_power_density< 3 >(const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 3 > &)
template Vector absorbed_power_load< 3 >(const fespace::NedelecDofMap< 3 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 3 > &, int)
template Vector absorbed_power_load< 2 >(const fespace::NedelecDofMap< 2 > &, const Vector &, Real, const materials::MaterialMap &, const fespace::DofMap< 2 > &, int)
Vector absorbed_power_density(const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Real omega, const materials::MaterialMap &materials, const fespace::DofMap< Dim > &h1)
DirectSolverBackend
Direct solver backends.
Definition linear_solver.hpp:70
double Real
Definition types.hpp:15
Eigen::SparseMatrix< Complex, Eigen::RowMajor, Index > SparseMatrix
Definition types.hpp:24
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > Vector
Definition types.hpp:20
Description of the heat-conduction problem.
Definition thermal.hpp:47
Real background_conductivity
κ [W/(m K)] of untagged / unlisted cells
Definition thermal.hpp:48
int extra_quadrature_order
Definition thermal.hpp:52
std::vector< std::pair< mesh::Tag, Real > > fixed_temperature
facet tag → T [K]
Definition thermal.hpp:50
solvers::DirectSolverBackend solver
Definition thermal.hpp:51
std::map< mesh::Tag, Real > conductivity
κ by cell tag
Definition thermal.hpp:49