Skip to content

Use non-ConcentricGrid for iota computation in ForceBalance #1876

@dpanici

Description

@dpanici
from desc.examples import get

for name in ["precise_QA","precise_QH","W7-X","ESTELL","NCSX","DSHAPE_current"]:
    eq = get(name)
    from desc.grid import *
    grid_conc =  ConcentricGrid(L=eq.L_grid, M=eq.M_grid, N=eq.N_grid, NFP=eq.NFP, axis=False,sym=True)
    rho=grid_conc.nodes[grid_conc.unique_rho_idx,0]
    grid = LinearGrid(rho =rho, M=eq.M_grid, N=eq.N_grid, NFP=eq.NFP, axis=False)
    iota = grid.compress(eq.compute("iota",grid=grid, override_grid=False)["iota"])
    iota_conc = grid_conc.compress(eq.compute("iota",grid=grid_conc, override_grid=False)["iota"])
    
    import matplotlib.pyplot as plt
    plt.figure()
    plt.plot(rho, iota,label="linear")
    plt.plot(rho, iota_conc,label="concentric")
    plt.title(name)
Image Image

Metadata

Metadata

Assignees

Labels

P3Highest Priority, someone is/should be actively working on thisenhancementGeneral label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions