stella icon indicating copy to clipboard operation
stella copied to clipboard

Should we keep the flag set_bmag_const?

Open rd1042 opened this issue 3 years ago • 3 comments

The flag set_bmag_const forces the quantity bmag to be constant when the geometry is initialised. However, the code does this after all other geometric quantities are calculated, and so bmag(z) isn't consistent with (for example) dbdzed. This is likely to cause confusion, and so I was wondering if we should:

  1. Remove the flag completely (the comments from @alexvboe indicate it was intended as a temporary flag to test a particular problem). bmag can be overwritten using the overwrite_bmag flag, which is done nearer the start of the init_geometry subroutine, and so is more consistent.
  2. Refactor the geometry initialisation so that set_bmag_const occurs nearer the start of the geometry initialisation.
  3. Add more documentation/warnings for the flag.

What your thoughts on this @mabarnes @DenSto @alexvboe ?

rd1042 avatar Nov 29 '22 11:11 rd1042

I say we ditch it, as set_bmag_const is really just a hack. What we really need is a separate geometry module for sheared slabs. I don't think this would be hard, and I think @mrhardman has mentioned that the geometry coefficients for this geometry in the ballooning formalism are documented somewhere, though they should be easily derivable.

DenSto avatar Nov 29 '22 13:11 DenSto

This sounds sensible to me. I usually use Edmund Highcock's thesis for the geometric quantities in a sheared slab.

rd1042 avatar Nov 29 '22 14:11 rd1042

agree with removal and support anyone interested in implementing slab geometry as an option

mabarnes avatar Nov 30 '22 09:11 mabarnes