ProjectTorreyPines / FUSE.jl

FUsion Synthesis Engine
https://fuse.help
Apache License 2.0
22 stars 1 forks source link

Vertical stability weird results #541

Open TimSlendebroek opened 6 months ago

TimSlendebroek commented 6 months ago

@bclyons12 I opened this issue to look furhter into the vertical stability we mentioned in the weekly meeting

I am running KDEMO with varied kappa (this will cause the whole build to change but this weird effect at low kappa isnt' obovious to me :

image

Here are the two dds at kappa = 1.25 and kappa =1.3

kappa_1.3_stable.json kappa_1.25_unstable.json

On another note can you add a field in toroidal mode that isn't growthrate but more in line what the metric is:

image

You also had an idea in the future of making a standard case that we can run and validate in TokSys (just adding it in here so it won't get lost)

bclyons12 commented 6 months ago

It looks like this is likely do to a change in the PF coil optimization, resulting in a sudden change in the location of the PF coils. @orso82 suggests that @TimSlendebroek run this test with the PF coils held fixed.

Unstable

Screenshot 2024-04-18 at 1 02 17 PM

Stable

Screenshot 2024-04-18 at 1 02 08 PM
TimSlendebroek commented 6 months ago

🏓 :P

kappa_1.25.json kappa_1.26.json

TimSlendebroek commented 6 months ago

more 🔥 kappa_1.1.json

TimSlendebroek commented 6 months ago

uniform ones

kappa_1.24_uniform.json

kappa_1.25_uniform.json

bclyons12 commented 6 months ago

Okay, the uniform ones look nearly identical, but the currents are so oscillatory in the OH that I think you're just getting noise. We need to find a way to regularize the currents more. For something with so little shaping, I see no reason you should get currents like below. Screenshot 2024-04-18 at 4 34 39 PM

orso82 commented 6 months ago

@bclyons12 can we include the vertical stability calculation as a leasts square constraint of the the PF coil currents calculation done in VacuumFields?

bclyons12 commented 6 months ago

Sure. I'd imagine we don't want to call ActorVerticalStability each time, so we'll need to reimplement some of this into the optimization function: https://github.com/ProjectTorreyPines/FUSE.jl/blob/a9bfd3742fe117a98e37d77bffd3b6e35b234e37/src/actors/stability/vertical_actor.jl#L65-L97

I'd recommend just doing the basic stability metric m_s for now, which ignores the resistances of various components. Some of that code won't change in each call to the cost function (like the shape of the vacuum vessel or the image currents of the equilibrium), so we can extract that outside the optimization. Basically active_coils will get updated each call, and maybe some additional passive_coils if we want passive plates.

Then we need to decide how to cost the vertical stability. We need m_s > 0.15 for stability. Maybe we want a linear-tanh then? Like this:

cost
orso82 commented 6 months ago

That's a plan!

bclyons12 commented 5 months ago

@orso82 I tried running init and ActorWholeFacility for the longest elongation (1.8), then for each desired kappa, I did:

ini.equilibrium.κ= kap
dd1 = deepcopy(dd0)
FUSE.init_pulse_schedule!(dd1,ini,act)
FUSE.ActorStationaryPlasma(dd1,act)
FUSE.ActorVerticalStability(dd1,act)

I still get the weird vertical stability results at low kappa. The build is staying the same, but the coil currents go crazy.

kappa=1.8

Screenshot 2024-04-24 at 5 22 41 PM

kappa=1.0, with >1 GA coil currents... seems bad

Screenshot 2024-04-24 at 5 22 51 PM