Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
dd51b96
feat(hydraulics): add standalone lumped hydraulic network solver
lamdangelo Jul 7, 2026
7b7f0cc
feat(hydraulics): couple conductor channel ends to the hydraulic network
lamdangelo Jul 7, 2026
6db8545
feat(hydraulics): support pump-loop coupling on both channel ends
lamdangelo Jul 7, 2026
6f68e53
feat(hydraulics): write the network state time evolution to output files
lamdangelo Jul 7, 2026
ec35aa4
feat(hydraulics): couple several conductors to one hydraulic network
lamdangelo Jul 7, 2026
5a04109
feat(hydraulics): transport energy through the network nodes
lamdangelo Jul 7, 2026
702be45
feat(hydraulics): check valves, reservoir control and richer network …
lamdangelo Jul 23, 2026
e7bdb31
feat(inputs): csv/tsv auxiliary input files
lamdangelo Jul 23, 2026
e4622c3
feat(simulation): per-step driver callback and early-stop output inte…
lamdangelo Jul 23, 2026
aa0a6b6
feat(thermal): nonlocal transverse-conduction coupling between compon…
lamdangelo Jul 23, 2026
9fb5d1f
feat(thermal): induced-loss source terms (coupling, eddy, hysteresis)
lamdangelo Jul 23, 2026
43a3f33
add W7-X folder to .gitignore
lamdangelo Jul 23, 2026
b73a634
fix(gitignore): inline comments disabled five ignore patterns
lamdangelo Jul 23, 2026
f4b29c6
feat(hydraulics): first-class relief-valve branch kind
lamdangelo Jul 24, 2026
cfa5147
feat(simulation): autosave checkpoints and restart
lamdangelo Jul 29, 2026
687d30c
feat(hydraulics): selectable (mdot, p, T) formulation via Gauss-point…
lamdangelo Jul 29, 2026
bb3b281
feat(output): mass flow rate in spatial and time-evolution outputs
lamdangelo Jul 29, 2026
686565a
docs: HYDRAULIC_FORMULATION, autosave/restart, and developer notes
lamdangelo Jul 29, 2026
5a5e325
test(coupling): pin the legacy coupled comparisons to the velocity fo…
lamdangelo Jul 29, 2026
22ce990
fix(hydraulics): transform the source block with the Picard secant, n…
lamdangelo Sep 1, 2026
3c6e7cb
fix(network): relax the port inflow temperature on flow reversal
lamdangelo Sep 1, 2026
e73fda4
feat(verification): constant-property fluid and analytical suite V1-V5
lamdangelo Sep 1, 2026
e16ae34
feat(electromagnetics): steady-state current-consistency via damped N…
lamdangelo Sep 1, 2026
51ba9d2
fix(electromagnetics): advance the electric clock in steady mode
lamdangelo Sep 1, 2026
f762e14
fix(electromagnetics): survive non-finite trials in divider and line …
lamdangelo Sep 1, 2026
9961e86
feat(logging): simulation summary with hot-spot log and NZPV
lamdangelo Sep 1, 2026
811e7cd
fix(output): name stop-time spatial saves by their true step number
lamdangelo Sep 1, 2026
dfb26f6
fix(paths): fixed simulation_results output subtree
lamdangelo Sep 1, 2026
d398caa
fix(yaml): do not mistake dotted directory names for file paths
lamdangelo Sep 1, 2026
f3709f2
chore(gitignore): track sensitivity-analysis deliverables
lamdangelo Sep 1, 2026
0ea4c34
chore(gitignore): added working directories and data types
lamdangelo Sep 1, 2026
e717919
fix(materials): skip the Fickett magnetoresistance polynomial below i…
lamdangelo Oct 1, 2026
8502f22
feat(materials): register stainless steel in the electrical resistivi…
lamdangelo Oct 1, 2026
204f795
perf(assembly): scatter element matrices into the band with a numba k…
lamdangelo Oct 1, 2026
bcb6ca2
feat(mesh): read the axial mesh from a node-coordinate file (mesh_typ…
lamdangelo Oct 1, 2026
f928674
feat(hydraulics): explicit (mdot, p, T) assembly of the mass-flow for…
lamdangelo Oct 1, 2026
9d095c7
feat(verification): formulation suite, velocity vs explicit mass flow…
lamdangelo Oct 1, 2026
8a22549
feat(electromagnetics): resistance floor for the current-consistency …
lamdangelo Oct 1, 2026
4464ca4
feat(ac-loss): relaxation coupling-loss model, loop families and tape…
lamdangelo Oct 1, 2026
e65266d
fix(electromagnetics): load all strand currents before evaluating the…
lamdangelo Oct 1, 2026
68cdc3c
feat(checkpoint): allow restarting a finalized run
lamdangelo Oct 1, 2026
b7bc199
fix(simulation): advance transversely coupled conductors in lockstep
lamdangelo Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ $RECYCLE.BIN/
*.xlsx
*.ods
*.pdf
*.npz

# LaTeX
*.aux
Expand All @@ -258,12 +259,38 @@ $RECYCLE.BIN/
*.~

# Paths to be ignored #
source_code/Description_of_Components/**/ # Input files
Simulations_results/**/ # code output directory
source_code/opensc2/**/ # virtual environment
source_code/GUI_icons/**/ # graphical user interface images
TDD_examples/**/ # input files template for the three selected cases used whitin the Test Driven Development approach
# (gitignore has no inline comments: a '#' only starts a comment at the
# beginning of a line, so each comment sits above its pattern.)
# Input files
source_code/Description_of_Components/**/
# code output directory
Simulations_results/**/
# virtual environment
source_code/opensc2/**/
# graphical user interface images
source_code/GUI_icons/**/
# input files template for the three selected cases used within the
# Test Driven Development approach
TDD_examples/**/
refactoring/*
W7-X/*
models/*
analysis/*
.vscode/*

# Regression-test reference data must be tracked despite the global *.tsv rule
!tests/reference_data/**/*.tsv

# Sensitivity-analysis deliverables (figures + tables) must be tracked
# despite the global *.png / *.csv rules; the simulation cache and the
# per-sample run-directory clones stay untracked.
!analysis/sensitivity/results/**/*.png
!analysis/sensitivity/results/**/*.csv
analysis/sensitivity/cache/
analysis/sensitivity/runs/
!analysis/sensitivity/results_qp_model/**/*.png
!analysis/sensitivity/results_qp_model/**/*.csv

# Formulation verification suite outputs (regenerable: driver.py + make_plots.py)
/results/
/figures/
317 changes: 317 additions & 0 deletions docs/mass_flow_formulation_notes.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/yaml_input_key_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ \section*{simulation.yaml}
\endhead
\code{simulation.name} & SIMULATION & string; names the output folder \\
\code{simulation.end\_time} & TEND & float, s \\
\code{simulation.autosave\_interval} & AUTOSAVE\_INTERVAL & int $\ge 1$ or \code{none} (default): store a state checkpoint every $N$ accepted time steps (\code{Checkpoints/} next to \code{Output/}); YAML-only \\
\code{simulation.restart} & RESTART & boolean, default false: resume an \emph{interrupted} run from its newest checkpoint (bit-identical continuation; refuses finalized runs and mismatched method/formulation); YAML-only \\
\code{time\_stepping.method}\footnotemark & METHOD & \code{BE}, \code{CN}, \code{GAL}, \code{BDF2}, \code{AM4} \\
\code{time\_stepping.adaptivity} & IADAPTIME & \code{FIXED} (0), \code{LEGACY\_EIGENVALUE} (1), \code{LEGACY\_EIGENVALUE\_SOLID\_ONLY} (2), \code{CS3U2\_SCHEDULE} (3), \code{ERROR\_CONTROLLED} (4) \\
\code{time\_stepping.tolerance} & TOLTIME & float; relative local-truncation-error target (\code{ERROR\_CONTROLLED} only), default $10^{-3}$ \\
Expand Down Expand Up @@ -74,6 +76,7 @@ \section*{conductor.inputs}
\code{electric\_method} & ELECTRIC\_METHOD & \code{BE}, \code{CN}, \code{GAL} ($\theta$ family; \code{BDF2} falls back to \code{BE}) \\
\code{electric\_time\_step} & ELECTRIC\_TIME\_STEP & float, s (clamped to the thermal step) \\
\code{upwind} & UPWIND & boolean \\
\code{hydraulic\_formulation} & HYDRAULIC\_FORMULATION & \code{auto} (default), \code{velocity}, \code{mass\_flow}: primary variables of the channel hydraulics; \code{auto} $\Rightarrow$ \code{mass\_flow} when a \code{hydraulic\_network} port couples this conductor, else \code{velocity}; YAML-only \\
\code{phi\_radiative}, \code{phi\_convective} & Phi\_rad, Phi\_conv & float \\
\code{external\_free\_convection} \code{\_correlation} & (unchanged) & correlation name string \\
\bottomrule
Expand All @@ -92,6 +95,8 @@ \section*{conductor.operations}
\code{equipotential\_surface\_coordinates} & EQUIPOTENTIAL\_SURFACE\_COORDINATE & comma-separated floats, m \\
\code{inductance\_mode}, \code{self\_inductance\_mode} & INDUCTANCE\_MODE, SELF\_INDUCTANCE\_MODE & int flags \\
\code{maximum\_iteration\_number} & MAXIMUM\_ITERATION\_NUMBER & int \\
\code{electric\_current\_consistency} & ELECTRIC\_CURRENT\_CONSISTENCY & bool (default false): Newton iteration of the steady electric solve until strand resistances are consistent with the solved currents \\
\code{electric\_resistance\_floor} & ELECTRIC\_RESISTANCE\_FLOOR & float (default 0 = off): with the current-consistency solve, floor of the superconducting element resistance $R \ge \mathrm{floor}\cdot E_0 L_e / I_c$, which makes the current split among parallel superconducting strands unique (below $I_c$ the power law leaves any loop current at zero residual, and the split drifts from step to step); $10^{-3}$ leaves the resistive regimes unchanged \\
\bottomrule
\end{longtable}

Expand Down Expand Up @@ -167,6 +172,14 @@ \section*{Solid components --- shared operations (STR\_MIX, STR\_STAB, STACK, Z\
\code{current\_sharing\_temperature} \code{\_evaluation} & TCS\_EVALUATION & boolean; evaluate $T_{cs}$ every step \\
\code{fixed\_potential\_flag/number} & FIX\_POTENTIAL\_FLAG/NUMBER & boolean; int \\
\code{fixed\_potential\_coordinates/} \code{values} & FIX\_POTENTIAL\_COORDINATE/VALUE & comma-separated floats (m; V) \\
\code{magnetic\_field\_scales\_with\_current} & B\_SCALES\_WITH\_CURRENT & boolean; from-file field scaled by $I(t)/I_0$ \\
\code{coupling\_loss\_time\_constant} & COUPLING\_LOSS\_TIME\_CONSTANT & float or list, s: lumped coupling coefficient $n\tau$ per loop family (0 = off); $q = (n\tau/\mu_0)\dot B^2 A$ when the relaxation time is 0 \\
\code{coupling\_loss\_relaxation\_time} & COUPLING\_LOSS\_RELAXATION\_TIME & float or list, s (default 0): loop relaxation time $\tau$; with $\tau>0$ the coupling magnetisation follows $\tau\dot M + M = -(n\tau/\mu_0)\dot B$ and $q=\mu_0 M^2/(n\tau)\,A$ (energy fraction $n\tau/(\tau+\tau_d)$ of $B^2/2\mu_0$ for an exponential dump) \\
\code{coupling\_loss\_copper\_scaling}, \code{coupling\_loss\_reference\_temperature/field} & COUPLING\_LOSS\_COPPER\_SCALING, \dots\_REFERENCE\_TEMPERATURE/FIELD & boolean (default false); K; T: scale $n\tau$ with $\rho_{\mathrm{Cu}}(T_{\mathrm{ref}},B_{\mathrm{ref}})/\rho_{\mathrm{Cu}}(T,B)$ (NIST, component RRR) \\
\code{eddy\_loss\_geometry\_constant} & EDDY\_LOSS\_GEOMETRY\_CONSTANT & float, m$^4$: second moment of the conducting section, $q=\sigma(T,B)\dot B^2 C$ (0 = off) \\
\code{filament\_diameter} & FILAMENT\_DIAMETER & float, m: filament diameter of the round-filament hysteresis loss (LTS strands; 0 = off) \\
\code{tape\_hysteresis\_loss} & TAPE\_HYSTERESIS\_LOSS & boolean (STACK only, default false): thin-strip hysteresis of the tape stack, $q=\min\!\big(\tfrac{2}{\pi}N I_c w/4,\; B A_{\mathrm{stack}}/\mu_0\big)|\dot B|$; replaces \code{filament\_diameter} for stacks \\
\code{transverse\_coupling\_file} & TRANSVERSE\_COUPLING\_FILE & path: nonlocal transverse-conduction patches (jackets) \\
\bottomrule
\end{longtable}

Expand Down Expand Up @@ -222,6 +235,7 @@ \section*{grid}
\code{minimum/maximum\_element\_size} & SIZMIN, SIZMAX & float, m \\
\code{growth\_ratio\_left/right} & DXINCRE\_LEFT/RIGHT & float $>1$ \\
\code{maximum\_number\_of\_nodes} & MAXNOD & int \\
\code{mesh\_file} & MESH\_FILE & path (relative to the deck directory) of a one-column text file with the node $z$ coordinates in m, strictly increasing from 0 to the conductor length; required by and only used with \code{mesh\_type: -1}. NELEMS is then derived from the file (a differing value is overridden with a warning) and MAXNOD, if given, is checked against it \\
\bottomrule
\end{longtable}

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ dependencies = [
"numpy>=1.26",
"scipy>=1.12",
"pandas>=2.2",
# Compiled kernels (banded system-matrix assembly); a numpy fallback is used
# when numba is missing
"numba>=0.60",

# Plotting
"matplotlib>=3.8",
Expand Down
Loading
Loading