Skip to content

MIT-PSFC/SynthWave

Repository files navigation

SynthWave

Generating synthetic magnetic measurements of arbitrary m/n# MHD modes at fixed frequency and magnetic equilibrium, within an arbitrary conducting finite element mesh and arbitrary magnetic sensors, with ThinCurr (part of the OpenFUSION toolkit).

Originally developed by Rian Chandra here

Installation Instructions

  1. Run ./install.sh and everything should install

This will create a local version of OpenFUSIONToolkit and make a uv-managed virtual environment.

  1. (Optional) if you want to get proper highlighting in VSCode, add this to .vscode/settings.json:
{
    "python.analysis.extraPaths": [
        "${workspaceFolder}/submodules/OpenFUSIONToolkit/python"
    ],
}

Operation Instructions

The example autorun script in python generate_synthetic_mirnov_signals.py will launch a simulation run using the example finite element mesh, magnetic equilibrium, and sensor information packaged in the input_data/ subfolder (C_Mod_ThinCurr_VV-homology.h5, g1051202011.1000 and sensor_details_C_MOD_ALL.nc respectively).

These sensors represent the high-frequency Mirnovs and vacuum vessel conducting surface for the Alcator C-Mod tokamak. Additional and more detailed conducting meshes for the C-Mod, HBT-EP, DIII-D, and SPARC tokamaks can be provided to users with the appropriate permissions, on request.

The simulation will use a fillamentary representation of the plasma on the appropriate rational surface, tracing out the helicity of the field lines, oscillating at a fixed frequency (10kHz, in the example). The measured signal across the Mirnov sensors will include the direct inductive coupling to the ``plasma'' filaments, as well as coupling to the induced eddy current response in the conducting mesh.

Given the provided input files, the magnitude of the output signal across the sensor set should look like the below:

Basic sensor signal response output

Generative AI Disclosure

Github Copilot and Claude Code were used for code completion, snippet generation, and code review. However, the results of this were carefully vetted. A human has read and understands every line in this repo.

About

Generating synthetic magnetic measurements of MHD modes with ThinCurr

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors