Skip to content

Code to create inputs for a 2D COMSOL simulation using Miller tokamak equilibria.

License

Notifications You must be signed in to change notification settings

quinntpratt/miller_geometry_comsol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

COMSOL 2DFW setup with Miller geometry

Python program to create inputs for two dimensional full-wave COMSOL-RF simulations based on Miller flux surfaces. COMSOL simulations require the plasma density (ne) and the magnetic field components (Bx, By, Bz) over an R, Z grid.

Toy models of plasma turbulence can also be included and written to a file for use in COMSOL.

The program can also generate inputs for the 3D Scotty beam-tracing code (ne.dat and topfile.json).

The user describes the plasma with,

  • Miller parameters (R0(r), delta(r), kappa(r))
  • Toroidal field function (I(r) = R*B_tor)
  • Saftey factor profile (q(r))
  • Density profile (ne(r))

The user also specifies the rectangular domain of the COMSOL simulation. COMSOL inputs are interpolated onto the rectangular domain with a higher resolution.

The resulting flux surfaces (and density profile) are not necessarily solutions to the Grad-Shafranov equation.

Example plots

This plot illustrates the flux surfaces and calculated poloidal magnetic field given the profiles input on the right side of the figure. The red rectangle indicates an example COMSOL domain.

image

This plot illustrates the mapped density profile as well as calculations of the midplane plasma cutoff frequencies. In this case we use a simple piecewise-continuous linear density profile.

image

This plot shows an example with include_turb=True. We use a toy model density perturbation with k_theta = 0.3 [rad/cm] and Gaussian localization in the r-direction.

image

About

Code to create inputs for a 2D COMSOL simulation using Miller tokamak equilibria.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages