Skip to content

Commit

Permalink
Fix bug in fields from transport current
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh committed Mar 28, 2024
1 parent 01125dd commit aa64fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superscreen/solver/solve_film.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ def solve_film(
g[indices] += current # g[hole] = I_circ
Ha_eff += -(A @ g[indices])

g_transport = 0
if film_info.name in device.terminals:
g_transport = solve_for_terminal_current_stream(
device,
Expand Down Expand Up @@ -497,7 +498,7 @@ def solve_film(
# Current density J = curl(g \hat{z}) = [dg/dy, -dg/dx]
J = np.array([grad_y @ g, -(grad_x @ g)]).T
# Eq. 7 in [Kirtley1], Eq. 7 in [Kirtley2]
screening_field = Q @ (weights * g)
screening_field = Q @ (weights * (g - g_transport))
if field_from_other_films is not None:
field_from_other_films = field_from_other_films / field_conversion
return FilmSolution(
Expand Down

0 comments on commit aa64fe7

Please sign in to comment.