Date: 2026-09-15 Purpose: Quench of an eight-tape REBCO stack: the tapestack3d geometry driven by a user-defined current ramp and a local Ic defect.
The geometry, layer stack and periodicity are those of [tapestack3d](tapestack3d) — eight 4 mm wide thin-shell tapes with solder between them, over a 10 mm length whose end planes are identified. What differs is the drive, and with it the question the deck asks: instead of a prescribed sigmoid current, a plugin supplies both the transport current and a local defect, so the run follows the current sharing from end to end.
Both plugin functions read their timing from one header, src/ramps.hpp, so the current and the defect cannot drift apart — the comment block at its top is the written form of the story above. They compile into a single plugin, userdefect.so; the deck names that same file in its materials { ybco { defect { } } } block and in its current boundary condition.
The coupled h-phi/T problem starts at 77 K and belfem announces the coupled solve at startup. Compared with tapestack3d, the deck also tightens both nonlinear tolerances to 1e-9 (current sharing between eight tapes is the quantity of interest), switches the conditioning estimates off, and turns edge coating off — the sharing of interest here goes through the solder, not around the tape edges.
Although tapestack3d.geo defines numTapes, the deck's sidesets, blocks, curves, and terminals are written explicitly for eight tapes, and src/defect.cpp hard-codes the tape plane positions it gates on. After changing the geometry, regenerate the topology with gmsh -0 tapestack3d.geo, update the deck, and re-check the constants near the top of defect.cpp.
| file | role |
|---|---|
| tapestack3d.geo | geometry; mesh it with gmsh |
| src/ramps.hpp | the time program: current ramp and defect switch-on, shared by both plugins |
| src/current.cpp | user current source (MyCurrent) |
| src/defect.cpp | user Ic defect (MyDefect), including the defect geometry |
| src/CMakeLists.txt | builds both into src/build/userdefect.so |
| input.conf | deck |
Build the plugin first; the deck loads src/build/userdefect.so:
The plugin needs CMake 4.0 or newer, the same floor BELFEM itself asks for. A distribution's CMake is often older, so use the one from the toolchain you build BELFEM with rather than whichever comes first on your PATH.
The first run builds Copper_RRR50.hdf5 and Silver_RRR10.hdf5 in the run directory; later runs reuse them. sp-ap.hdf5 ships in share/material.
The timing lives in src/ramps.hpp: the ramp rate and its safety cap, and the defect's switch-on time, transition width and fuzzyness. The defect's shape — where it sits, how wide it is, how deep it goes — is the constant block near the top of src/defect.cpp. Rebuild the plugin after editing either; the deck does not need to change.
Note that the ramp rate and the simulation time are tied: simulation time : 10 s at 200 A/s is what puts the stack past its self-field Ic within the run. Slow the ramp without lengthening the run and the stack never quenches inside the simulated time.
../scripts/Allrun generates the mesh, chooses ranks and threads, and can submit to Slurm; ../scripts/Allclean removes run output. To use them from this directory, copy the two wrapper scripts Allrun and Allclean from examples/helix/ here and run ./Allrun (./Allrun --dry-run prints the plan first). If you copy this deck out of the tree, copy examples/scripts/ along with it and point the wrappers at its new location. The launcher does not build plugins; do that step by hand as described above. Per-deck settings go in a run.conf next to input.conf; see ../scripts/README.md.