Skip to content

Issue in recreating plasma configuration with forward solver using coil currents from inverse solver. #51

@geekygiks

Description

@geekygiks

Hi,

I am running freegsnke ver 2.0 and I am facing issues in recreating the plasma shape profile. The working schema is as follows,

  1. Initially, I fix all the coil position and pass the following to inverse solver,

eq.tokamak.set_coil_current('CS1', 20e6)
eq.tokamak['CS1'].control = True
eq.tokamak.set_coil_current('CS2', 20e6)
eq.tokamak['CS2'].control = True
eq.tokamak.set_coil_current('CS3', 20e6)
eq.tokamak['CS3'].control = True

eq.tokamak.set_coil_current('PF1', 9.742e+06)
eq.tokamak['PF1'].control = True
eq.tokamak.set_coil_current('PF2', 10.0e+06)
eq.tokamak['PF2'].control = False
eq.tokamak.set_coil_current('PF3', -3.381e+06)
eq.tokamak['PF3'].control = True

I am using paxis module

from freegsnke.jtor_update import ConstrainPaxisIp
profiles = ConstrainPaxisIp(
eq=eq,
paxis=1.30E+06,
Ip=9.0e6,
fvac=24,
alpha_m=2.5,
alpha_n=1.2
)

with inverse_solver running as follows,

from freegsnke import GSstaticsolver
GSStaticSolver = GSstaticsolver.NKGSsolver(eq)
GSStaticSolver.inverse_solve(eq=eq,
profiles=profiles,
constrain=constrain,
target_relative_tolerance=1e-8,
verbose=False, # print output
)

I get a set of coil currents for my pre-defined constrain parameters.

{'CS1': np.float64(33775637.18984738),
'CS2': np.float64(8452064.547979241),
'CS3': np.float64(26347627.95361948),
'PF1': np.float64(6050308.471069523),
'PF2': np.float64(10000000.0),
'PF3': np.float64(-8388258.053080285)}

Image
  1. This I pass to my forward solver in different notebook keeping every other thing same.

eq.tokamak.set_coil_current('CS1', np.float64(33775637.18984738))
eq.tokamak['CS1'].control = False
eq.tokamak.set_coil_current('CS2', np.float64(8452064.547979241))
eq.tokamak['CS2'].control = False
eq.tokamak.set_coil_current('CS3', np.float64(26347627.95361948))
eq.tokamak['CS3'].control = False
eq.tokamak.set_coil_current('PF1', np.float64(6050308.471069523))
eq.tokamak['PF1'].control = False
eq.tokamak.set_coil_current('PF2', np.float64(10000000.0))
eq.tokamak['PF2'].control = False
eq.tokamak.set_coil_current('PF3', np.float64(-8388258.053080285))
eq.tokamak['PF3'].control = False

and solving with

#call the solver
GSStaticSolver.solve(eq=eq,
profiles=profiles,
constrain=None,
target_relative_tolerance=1e-8,
verbose=False, # print output
)
I am not getting exact plasma shape as I receive while inverse solver.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions