hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
thermo_optical.hpp
Go to the documentation of this file.
1#pragma once
11#include <map>
12#include <vector>
13
14#include "hpfem/core/types.hpp"
16#include "hpfem/mesh/mesh.hpp"
19
20namespace hpfem::physics {
21
23template <int Dim>
33
35template <int Dim>
45
47template <int Dim>
49 public:
54 [[nodiscard]] const ThermoOpticalSetup<Dim>& setup() const noexcept { return setup_; }
57 [[nodiscard]] materials::MaterialMap materials_at(const Vector& temperature) const;
60 [[nodiscard]] Vector total_field(const ScatteringSolution<Dim>& solution) const;
63 [[nodiscard]] ThermoOpticalState<Dim> solve() const;
64
65 private:
66 const fespace::NedelecDofMap<Dim>* optical_;
67 const fespace::DofMap<Dim>* thermal_;
69};
70
71extern template struct ThermoOpticalSetup<2>;
72extern template struct ThermoOpticalSetup<3>;
73extern template struct ThermoOpticalState<2>;
74extern template struct ThermoOpticalState<3>;
75extern template class ThermoOptical<2>;
76extern template class ThermoOptical<3>;
77
78} // namespace hpfem::physics
Definition dof_map.hpp:51
Definition material.hpp:149
Runs the optical–thermal feedback loop on a Nédélec and an H1 space of the same mesh.
Definition thermo_optical.hpp:48
ThermoOptical(const fespace::NedelecDofMap< Dim > &optical_dofs, const fespace::DofMap< Dim > &thermal_dofs, ThermoOpticalSetup< Dim > setup)
materials::MaterialMap materials_at(const Vector &temperature) const
Vector total_field(const ScatteringSolution< Dim > &solution) const
const ThermoOpticalSetup< Dim > & setup() const noexcept
Definition thermo_optical.hpp:54
ThermoOpticalState< Dim > solve() const
Definition absorption.hpp:21
double Real
Definition types.hpp:15
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > Vector
Definition types.hpp:20
Description of a scattering problem.
Definition scattering.hpp:49
Coefficients of the unknown field on the DoF map.
Definition scattering.hpp:86
Description of the heat-conduction problem.
Definition thermal.hpp:47
Description of the coupled problem.
Definition thermo_optical.hpp:24
Real tolerance
converged when max |T_new − T_old| < tolerance [K]
Definition thermo_optical.hpp:30
ScatteringSetup< Dim > optical
materials give εr(T0) by tag
Definition thermo_optical.hpp:25
Real relaxation
T ← (1 − r) T_old + r T_new.
Definition thermo_optical.hpp:31
ThermalSetup thermal
Definition thermo_optical.hpp:26
Real reference_temperature
T0 [K] of the optical materials.
Definition thermo_optical.hpp:28
std::map< mesh::Tag, Complex > thermo_optic
dεr/dT [1/K] by cell tag (others: 0)
Definition thermo_optical.hpp:27
int max_iterations
Definition thermo_optical.hpp:29
Converged (or last) state of the loop.
Definition thermo_optical.hpp:36
bool converged
Definition thermo_optical.hpp:43
Real absorbed_power
[W] (3D) or [W/m] (2D)
Definition thermo_optical.hpp:40
materials::MaterialMap materials
with the per-cell permittivities of the last step
Definition thermo_optical.hpp:39
Vector temperature
on the H1 map [K]
Definition thermo_optical.hpp:38
std::vector< Real > history
max |ΔT| per iteration
Definition thermo_optical.hpp:41
ScatteringSolution< Dim > solution
optical solution with the final permittivities
Definition thermo_optical.hpp:37
int iterations
Definition thermo_optical.hpp:42