Author: | Pauli Virtanen <pauli@ltl.tkk.fi> |
---|---|
Organization: | Low Temperature Laboratory, Helsinki University of Technology |
Date: | 2005-2006 |
A solver for Keldysh-Usadel 1D circuit equations.
To find out how this library can be used, you should peek at
Geometry of the setup.
Parameters: |
|
---|
Examples
A three-probe structure:
3
0 S----*----S 1
0 | 1
|
|2
|
N
2
>>> g = Geometry(nwire=3, nnode=4)
>>> g.t_type = [NODE_CLEAN_S_TERMINAL,
... NODE_CLEAN_S_TERMINAL,
... NODE_CLEAN_NODE]
>>> g.w_type = WIRE_TYPE_N
>>> g.w_ends[0,:] = [0, 3]
>>> g.w_ends[1,:] = [1, 3]
>>> g.w_ends[2,:] = [2, 3]
>>> g.w_length = [0.5, 0.5, 2]
>>> g.t_delta = [100, 100, 0]
>>> g.t_phase = array([-.5, .5, 0]) * pi/2
>>> g.t_t = 1
>>> g.t_mu = 0
Compare two geometries.
Parameters
array(nnode) of types of nodes
Possible choices are: NODE_CLEAN_N_TERMINAL (normal terminal; clean interface), NODE_CLEAN_S_TERMINAL (superconducting terminal; clean interface), NODE_CLEAN_NODE (node connecting several wires; clean interface), NODE_FREE_INTERFACE (vacuum interface).
array(nwire) of wire types
Possible choices are: WIRE_TYPE_N (normal wire) and WIRE_TYPE_S (superconducting wire).
array(nx) of discretization points.
NOTE: These must be in the range [0,1] !
Note also that this does not affect the actual mesh chosen by all solvers – however, it always affects the discretization used for spectral solutions and kinetic coefficients.
Low-level interface to the Usadel solver.
Set the geometry to use.
Parameters: |
|
---|
Set the coefficients for the kinetic equations.
Parameters: |
|
---|
Solve spectral equations.
Parameters: |
|
---|---|
Returns: |
|
Solve kinetic equations.
Parameters: |
|
---|---|
Returns: |
|
The result from a spectral calculation.
The parameters a and b correspond to the representation
of the retarded Green function.
Attributes: |
|
---|
The result from a kinetic calculation.
Attributes: |
|
---|
Coefficients in the kinetic equations.
Attributes: |
|
---|
Solver for currents flowing in a given geometry.
Parameters: |
|
---|---|
Attributes: |
|
References
[1] | Applied Physics A, 89, 625-637 (2007) |
Solving equations
Solve the spectral equations.
Store the results to self.spectral and self.kinetic.
Solve the kinetic equations and store the result to self.kinetic.
Parameters: |
|
---|
Solve for spectral data if there is none yet.
Parameters: |
|
---|
Solve for spectral data if there is none yet, and save the result to a file.
Parameters: |
Other parameters as in save. |
---|
Compute the spectral conductance matrix.
Warning
Spectral quantities (such as G) are not conserved in superconducting wires. Be aware that the G is evaluated at x[0] in each wire.
Parameters: |
|
---|
Find an approximation for the G-matrix, up to first order in and .
Stores the result to self.G.
Parameters: |
|
---|
Set solver types and tolerances.
Parameters: |
|
---|
Computing currents
Calculate currents, using fixed-grid discretization.
Parameters: |
|
---|---|
Returns: |
|
Calculate currents, using an adaptive integrator.
Will solve kinetic equations at energy points where the solutions are needed.
Parameters: |
Also takes the same parameters as get_currents. |
---|---|
Returns: | Returns similar output as get_currents. |
Calculate currents, from the spectral conductance matrix.
Parameters: |
|
---|---|
Returns: |
|
Calculate currents from the G-matrix, for given distribution functions at the terminals.
Parameters: |
|
---|---|
Returns: |
|
Computing linear response
Compute the linear response in currents to changes in potentials and temperatures in the terminals.
This function assumes that the distribution function in each terminal is a Fermi function.
Parameters: |
|
---|---|
Returns: |
|
Compute the linear response in currents to changes in distribution functions in the terminals.
Parameters: |
|
---|---|
Returns: |
|
Saving and loading data:
Load data from an open HDF5 file.
Parameters: |
|
---|
Save date to an open HDF5 file.
Parameters: |
|
---|
Notes
Geometry is saved in all cases.
Find a configuration where the specified quantity vanishes, by adjusting the specified variables.
Parameters: |
Other keyword arguments accepted by scipy.optimize.fsolve can be given. |
---|
Notes
If AlreadyConvergedException is raised by zero_func, the optimization terminates successfully with the current value.
Self-consistent real-time iteration for the order parameter.
Adjusts the parameters in the given Geometry object until convergence is met.
Parameters: |
|
---|---|
Yields: |
|
Notes
In real-time iteration, some care must be taken to choose the energy grid so that it is sufficiently dense in the energy range where the peak in the -function will be.
The energy cutoff is eliminated by using the formula:
and in the latter term taking the bulk expressions for and , the latter being the bulk function corresponding to (the bulk gap). Here, is the energy limit up to which numerical solutions are calculated for .
Examples
>>> solver = CurrentSolver(geometry)
>>> it = self_consistent_realtime_iteration(solver)
>>> for k, d, v in it:
>>> if d.residual_norm() < 0.1 and v < 1e-4:
>>> break
>>> else:
>>> raise RuntimeError("Iteration did not converge")
Self-consistent Matsubara iteration for the order parameter.
Adjusts the parameters in the given Geometry object until convergence is met. Applicable only to equilibrium situations.
Parameters: |
|
---|---|
Yields: |
|
Notes
The energy cutoff is eliminated by using the formula:
and in the latter term taking the bulk expressions for and , the latter being the bulk function corresponding to (the bulk gap). Here, is the energy limit up to which numerical solutions are calculated for F.
Examples
>>> it = self_consistent_matsubara_iteration(geometry)
>>> for k, d, v in it:
>>> if d.residual_norm() < 0.1 and v < 1e-4:
>>> break
>>> else:
>>> raise RuntimeError("Iteration did not converge")
The HDF5 files produced by CurrentSolver.save() have the layout:
/geometry/w_type
/geometry/t_type
...
/spectral/a
/spectral/b
...
/kinetic/fL
/kinetic/fT
...
/coefficient/DL
/coefficient/DT
...
i.e. the attributes of the Geometry, SpResult, KinResult, and KineticCoefficient objects are simply dumped to the file to an appropriate place.
You can easily load the HDF5 files by using the supplied h5load.m script (probably requires a recent version of Matlab).
See also