Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create structure and evolution for build currents #18

Merged
merged 8 commits into from
Sep 25, 2024
Merged

Conversation

bclyons12
Copy link
Member

This will allow for the evolution of currents in active & passive conducting structures (hereafter all referred to as coils) with implicit coupling to the changing plasma current and explicit coupling to the changing plasma shape (through provided, fixed time-derivatives of the plasma-coil mutuals).

@bclyons12 bclyons12 added enhancement New feature or request work in progress labels Sep 13, 2024
@bclyons12
Copy link
Member Author

@lstagner The goal here is to keep QED very lightweight. We should build the inductance matrix, resistivity vector, and plasma-coil mutual/mutual-derivative vectors externally (from an IMAS dd or TokSys model), then just pass it to a QED_build struct.

I've made the evolve!() function to do the θ-implicit time evolution of just the coil currents (no plasma coupling). It is completely untested even for syntax errors right now, but the goal of this is to reproduce what you've done with DifferentialEquations.jl so far. We should do some benchmarking.

After this, we need to couple it to the diffusion inside the plasma, which amounts to combining the matrix equations defined in diffuse! and evolve!. These couple together as the plasma Ip used in the coil current evolution will come from the edge value of iota, while the edge loop voltage (Neumman-like boundary condition) in the diffusion equation will now come as a sum over the mutual inductance with each coil current.

@bclyons12
Copy link
Member Author

As of this commit, the build evolution gives the same result as @lstagner's DifferentialEquations.jl implementation.
Screenshot 2024-09-16 at 6 35 41 PM

@bclyons12
Copy link
Member Author

7a2ecca is untested, but should evolve the coupled plasma-build system.

- Move plasma boundary condition in coupled problem to after adding non-inductive source
- Renormalize build part of A matrix to improve condition number
- Debug outputs plasma current with coil currents
- Add some examples
@bclyons12
Copy link
Member Author

As of the last commit, the plasma-as-coil boundary condition produces the same results for the plasma and coil currents as a system where an extra coil is added with the same L, R, and V_noninductive as the plasma. If L, R, and V_ni are correct, then this should work.

@bclyons12 bclyons12 changed the title WIP: Create structure and evolution for build currents Create structure and evolution for build currents Sep 25, 2024
@bclyons12 bclyons12 merged commit 80f5fe2 into master Sep 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants