Skip to content

Add Josephson junction (RCSJ) lumped element (supersedes #152) - #164

Merged
ajnonaka merged 5 commits into
AMReX-Microelectronics:developmentfrom
tyh0123:artemis_RCSJ
Nov 9, 2026
Merged

ajnonaka merged 5 commits into
AMReX-Microelectronics:developmentfrom
tyh0123:artemis_RCSJ

Conversation

@tyh0123

@tyh0123 tyh0123 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This carries forward @tyh0123's Josephson junction work from #152. It's rebased on current development, conflicts are resolved, and stray files are removed.

What it adds

This adds a new JosephsonJunction lumped element (Source/FieldSolver/LumpedElement/), which acts as a nonlinear inductor on grid edges:

  • Supercurrent: on every edge where the critical current is nonzero, it adds a supercurrent density J_J = Ic·sin(φ)/A.
  • Phase: the phase follows dφ/dt = (2e/ħ)·V, with V = E_edge·edge_length. It's advanced with leapfrog: a -dt/2 initialization push, then dt each step.
  • Current accumulation: J is persistent state in this solver, so each step the junction swaps its previous contribution for the new one instead of adding on top. This fixes the accumulation bug in the last commit of Added JJ function #152, and it works alongside London or inductor current on the same edge.
  • Full RCSJ model: the junction element supplies only the supercurrent. For the resistor and capacitor parts, use the existing macroscopic.lumped_resistor_* / lumped_capacitor_* inputs (implement lumped capacitor and resistor #141) on the same edges.

Inputs

algo.use_josephson_junction = 1
josephson.Ic_x_function(x,y,z) = "..."   # critical current [A]; nonzero marks junction edges
josephson.Ic_y_function(x,y,z) = "..."
josephson.Ic_z_function(x,y,z) = "..."

Diagnostics: josephson_phi_{x,y,z} and josephson_Ic_{x,y,z} are available as plotfile fields.

Checkpoint/restart: φ and the stored supercurrent are written to the checkpoint and read back on restart. Without this, φ would silently reset to 0 while the fields were restored. The junction is also included in the existing London and inductor handling of J in checkpoints, current setup and Evolve.

Changes from #152

Testing

  • Affected sources compile (3D, CPU, no MPI, LLG on)
  • Junction example from a fresh start
  • Junction example restarted from a checkpoint; φ continues smoothly across the restart
  • Existing lumped inductor, R/C and London tests unchanged

tyh0123 and others added 5 commits July 1, 2026 12:49
)

Resolve conflicts with the lumped R/C implementation merged upstream (AMReX-Microelectronics#141):
- MacroscopicProperties.H/.cpp, MacroscopicEvolveE.cpp: take development's
  version (the PR's changes here were equivalent refactors of the same code).
- WarpXInitData.cpp: keep upstream's ordering (london -> lumped elements ->
  diagnostics), with inductor + Josephson junction InitData before
  InitDiagnostics and JJ ReadCheckpoint on restart.
- WarpX.H/.cpp: keep use_josephson_junction.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UToDzavtDTwzaLRf56VjXE
@ajnonaka
ajnonaka merged commit c1eff20 into AMReX-Microelectronics:development Nov 9, 2026
10 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants