-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow for profiles created with map3d to extend outside the last closed flux surface #371
Comments
Hi @TKhare, I think that removing the However, the map2d(self, object profile, Function2D mask=None, double value_outside_mask=0.0) If no mask is specified, the profile = Interpolator1DArray(profile[0, :], profile[1, :], 'cubic', ''quadratic'', INFINITY) I would like to hear others' opinions. Is it worth generalising the |
A while back I was also proposing to extend the interpolation ouside LCFS, but the decision was not to take this step (sorry, I can't find the issue). Although there can be some asymmetries within LCFS, the assumption of constant values on surfaces is a good approximation and is being used quite often. This does not apply for SOL, where the quantities are far from being constant on surfaces. I personally think that we should not allow the SOL mapping within the EFITEquilibrium class. The Raysect function framework should be capable of covering everything needed to make some kind of edge profiles, shouldn't it? You can use blending to distinguish between in/out of lcfs (as is done in the map2d), it should be possible to use blending and clamp on psi normallised to distinguish between PFR and SOL, shouldn't it? This would still not add the evolution along surfaces and should be used in limited cases. Maybe we could add a demo showing some tricks which can be used to get some arbitrary edge profiles instead? |
As above, it doesn't make sense to map SOL/PFR quantities to the equilibrium: the relavant quantities are not flux functions outside the LCFS. If you don't have a sensible 2D or 3D profile from a code output to build an interpolator from, you could consider parametrising a SOL quantity as From memory, the main reason we didn't add mapping outside the LCFS in Cherab core is because there isn't a generic, machine-independent way to do it well (and core should be general and machine independent). |
There are situations where specifying an |
For the use case of wanting to evaluate a function
We should definitely add a demo illustrating the simple (and common) use cases @rmchurch describes, where we make clear what simplifications are being made and what caveats about the overall validity of the model apply. |
I am currently using CHERAB to create a forward model for a diagnostic that views the edge region of a tokamak, outside the last closed flux surface. I have been using
map3d()
to map one dimensional profiles that extend past the lcfs in 3d space. However, I recently noticed that themap3d()
function has avalue_outside_lcfs
parameter, and prevents the user from defining non-constant values for profiles outside the lcfs.I've gotten around this with a simple modification to the source code in efit.pyx, changing the
map2d()
function in line 252 fromreturn ScalarBlend2D(value_outside_lcfs, f, self.inside_lcfs)
toreturn ScalarBlend2D(value_outside_lcfs, f, 1)
so that values outside the lcfs are not masked off. Could themap3d
function be changed altogether to be more general and allow for profiles outside of psin=1? Perhaps taking a psin cutoff parameter for profiles that extend to a certain psin value?The text was updated successfully, but these errors were encountered: