Further information on the solver package itself can be found here: NTMpy.
Documentation and example sessions can be found in the Wiki.
Please cite the referring article.
This is a code providing a solution to the heat diffusion in a 1D structure in a 2-temperature model approximation.
We consider:
- Material comprising piecewise homogeneous layers
- Heating of electron system with an energy source with Gaussian shape (i.e. an ultrashort laser pulse)
- Three temperature model: electron, lattice and spin systems are considered and coupled
- Transfer Matrix Method to account for local absorbed energy in the multi layer material
The equation under consideration is:
where C = specific heat, k = conductivity, G is the coupling constant between the two systems (Electron and Lattice)
and
are the respective temperatures of the electron lattice abd spin system with respect to space x and time t. The superscripts L and E indicate whether a parameter belongs to the electron (E) lattice (L) or spin (S) system and the sub index i denotes to which layer the parameter belongs.
Our approach is to use a combination of finite elements (B-Splines) to approximate the derivation in space and Explicit Euler to approximate the evolution in time. To stay within the stability region of the Explicit Euler algorithm, a well suited time step is automatically computed.
Using the material parameters, reported in Ultrafast Spin Dynamics in Ferromagnetic Nickel we consider a 3- temperature system in a Nickel layer. We are able to simulate the reported temperatuer map for all systems, in accordance with the paper.
| Temperature evolution of 3-coupled systems | Gaussian laser pulse S(x,t) hitting sample |
|---|---|
![]() |
![]() |
Here we consider an energy source S(x,t), that is Gaussian in time and decays exponentially, representing a laser pulse hitting the material from the left. Note, that the implemented Transfer Matrix Method makes it easily able to simulate realistic laser sources, taking multiple reflection, different incident angles and polarization into account.
The animation clearly shows the following effects:
- The electron system heats up immediately, as expected looking at the equation above.
- The heat in the electronic system diffuses along the x-axis.
- The heat transfers to the subsystems on longer time scales.
Documentation and example sessions can be found in the Wiki
This is a project from the Ultrafast Condensed Matter physics groupe in Stockholm. The main contributors are:
You can directly contact us via mail: Lukas Alber
@misc{alber2020ntmpy, title={NTMpy: An open source package for solving coupled parabolic differential equations in the framework of the three-temperature model}, author={Lukas Alber and Valentino Scalera and Vivek Unikandanunni and Daniel Schick and Stefano Bonetti}, year={2020}, eprint={2002.04559}, archivePrefix={arXiv}, primaryClass={cond-mat.other} }
Since finding the thermophysical parameters needed to solve the equation under consideration (see above) is currently subject to research, we want to encourage our users to contribute with their knowledge of parameters. That is, please send us the data of the parameters in use, together with references from literature ( Lukas Alber). We are working on providing an open source data base. Also see NTMpy page.
Fork from the Developer- branch and pull request to merge back into the original Developer- branch.
Working updates and improvements will then be merged into the Master branch, which will always contain the latest working version.
Note that by downloading the package via pip install NTMpy a routine, which automatically checks if all the required packages are existent on the local machine is implemented. If one of the dependent pip packages, listed here, is missing an automatic download is initiated.



