Commit e7810f94 authored by Adel Kara Slimane's avatar Adel Kara Slimane
Browse files

Add rst file to energy example in doc/

Add small comment improvements in
parent b7b016fe
Pipeline #34419 failed with stages
in 23 minutes and 6 seconds
......@@ -132,7 +132,7 @@ def main():
# Initialize the solver (to solve t-dep SEQ)
solver = tkwant.manybody.State(syst, tmax, occupation, params={'t0': t0, 'ε0': ε0, 'Δε': Δε}, error_op=energy_density_op)
# Have the system evolve forward in time, calculating the operator over the system
energy_current = []
energy_source = []
energy_density = []
......@@ -141,13 +141,14 @@ def main():
heat_current_right = []
energy_current_divergence = []
# Have the system evolve forward in time, calculate the operator's expectation values at each time step
start = timer.perf_counter()
for time in times:
# evolve scattering states in time
solver.refine_intervals(atol=1E-6, rtol=1E-6)
# ignore kwant's warnings
......@@ -191,7 +192,7 @@ def main():
label = "$\\partial_t \\varepsilon_1 + I^E_{0,1} + I^E_{2,1}$", linestyle='None',
marker='.', markersize=6, markevery=4)
# The previous curve doesn't superimpose over the source one because the time step isn't small enough,
# making the time step smaller makes the calculation last longer unfrotunately.
# making the time step smaller makes the calculation last longer unfortunately.
plt.xlabel('time $[\\hbar / \\Gamma]$')
plt.ylabel('Energy flux $[\\Gamma^2 / \\hbar]$')
.. _quantum_dot:
Quantum dot
**tkwant features highlighted**
- Calculation of energy quantities: current, density, source, heat current
The code can be also found in
:download:` <>`.
.. jupyter-execute::
# prevent problems with figures from the first code
import matplotlib.pyplot as plt
%matplotlib inline
.. jupyter-execute::
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment