HelgeGehring / femwell

FEM mode solver for photonic waveguides
https://helgegehring.github.io/femwell/
GNU General Public License v3.0
104 stars 30 forks source link

Nonlinear heater initial additions #144

Open hammy4815 opened 5 months ago

hammy4815 commented 5 months ago

This (incomplete) PR contains the initial changes for the nonlinear heater by introducing a temperature dependent thermal conductivity.

Currently, the nonlinear transient takes way too long. So this needs to be fixed before we can pull. This is mostly a proof of concept for the setup.

I added two new methods. One for calculate_temperature_transient and one for calculate_temperature. These include replacing the thermal_conducivity from a CellField to a function defined by the user and also changing the type of solver to NonlinearSolver.

The user in addition to defining the ϵ_conductivities function (as a function of temperature), needs to define its gradient to be used with the nonlinear solver's jacobian.

If we want to include more information such as phase shift information this is still a ToDo.

Additionally, this PR also contains overlap of the visualization from the other PR.

At this stage there isn't a need to check workflows, I'm mostly curious on thoughts regarding the implementation first.