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

Forward calculaton #29

Open
kripnerl opened this issue Mar 9, 2020 · 1 comment
Open

Forward calculaton #29

kripnerl opened this issue Mar 9, 2020 · 1 comment

Comments

@kripnerl
Copy link
Contributor

kripnerl commented Mar 9, 2020

Hi,

I would like to ask whether there is a possibility of the forward calculation of plasma with a given profile from the coils.

I've tried something like this:

for name, coil in tokamak.coils: 
    coil.control=False
...
freegs_eq = freegs.Equilibrium(tokamak=tokamak, Rmin=eq.R_min, Rmax=eq.R_max, Zmin=eq.Z_min, Zmax=eq.Z_max, 
                               nx=Nx, ny=Ny, psi = grid.psi.T)
...
profiles = freegs.jtor.ConstrainPaxisIp(2.3e6, 2e6, eq.F0/mu_0)
...
freegs.solve(freegs_eq, profiles, psi_bndry=eq.lcfs.psi[0])

whereas a 'hint' I provide the Fiesta result (grid.psi.T). However this mock doesn't seem to be functional. Is there some similar functionality?

Thanks in advance,
Lukas

@bendudson
Copy link
Collaborator

In principle I think this should be possible, but it may be vertically unstable if a divertor geometry is being used: Each picard iteration the plasma may move towards one of the poloidal field coils. Perhaps adding a pair of poloidal field coils under feedback control might work?

Is the psi given to the Equilibrium constructor the total poloidal flux, or just due to the plasma? If you compare grid.psi.T to freegs_eq.psi() are they the same? It's a bit of a hack, but as a test you could try:

freegs_eq = freegs.Equilibrium(tokamak=tokamak, Rmin=eq.R_min, Rmax=eq.R_max, Zmin=eq.Z_min, Zmax=eq.Z_max, 
                               nx=Nx, ny=Ny, psi = grid.psi.T)

coil_psi = freegs_eq.psi() - freegs_eq.plasma_psi    # Flux due to coils
freegs_eq._updatePlasmaPsi(grid.psi.T - coil_psi)   # Set the plasma psi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants