-
Notifications
You must be signed in to change notification settings - Fork 33
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
[docs] PRESCRIBED
heating and current source profiles
#212
Comments
I would be happy to extend |
Fully agree that supporting arbitrary source profiles should be done in the near-term. At the moment we are working on supporting arbitrary initial and prescribed core profiles, and the infrastructure is already there to a large extent. After this long preamble :) , I think we should reuse all this infrastructure to enable arbitrary source profiles as well. Can envisage adding a new supported mode (see You could indeed also extend
Where the user has a choice whether to use the profile as is, or to renormalize to |
and yes, feel free to go ahead and give it a go if you're up for it :) |
@araju for any further insight here |
@theo-brown , note #215 in case you get confusing results when playing around with the source config. |
Adding a |
Encountering some difficulty with the difference between grids; current density seems to be computed on the hi-resolution grid, but the
Skipping over the hardcoded Gaussian for the moment, this results in the following obstacle for adding support for
An easy fix could be to re-interpolate the low-resolution interpolation onto the high-resolution grid. My concern is that this is a bit of a sticking-plaster solution, and is avoiding tackling the underlying pitfall. |
Some deficient/not-yet-implemented elements have been exposed here :) , and good to raise them for prioritization. First some explanation on the hires grid and what it's used for. It's only used for initializing the psi profile for when the current profile is set to determine the initial psi profile (when Now, in that function, there is a deficiency that the only external current that can be included now is You can see this commit to see what adding a new source entails. There is work coming soon to simplify the process of registering a new source. |
Which sources are you interested in implementing as That is a bit more involved due indeed to the need to extend |
Thanks for the explanation about the hires grid! That makes a lot of sense, and I hadn't spotted that it would only be used in the initialisation. Yes, my main interest is However, as you've highlighted, it's come across some of the surrounding bits that aren't quite there yet and implementing a new mode is wider in scope than I first realised! There's definitely a tradeoff between making a generally-applicable contribution and biting off a manageably-sized problem... Basically, I'm interested in this part of the code and would be keen to contribute. Let me know if there are any ways I can better dovetail with existing or planned work. |
I think that you can still consider setting up a |
PRESCRIBED mode with tests finalised in #221. |
Has this now been completed with 6aeb322? If so, then I'm happy to add to the docs. |
Yes, this is now merged. Thanks for suggesting to add to the docs! |
PRESCRIBED
heating and current source profiles
I wasn't quite aware how much the implementation of prescribed profiles has changed. As it stands, I'm no longer on top of the complexity of it, so I'm not suitable for writing the docs! |
No problem. We can do it. FYI: the implementation of the underlying interpolated_param objects has changed in the following ways, both for prescribed quantities in profile_conditions (e.g. Ti, ne) as well as the PRESCRIBED mode for sources:
But the following variants are now also acceptable, and much more convenient:
or
where jext_profile is a 2d array containing all the time slices, i.e.
I will update the test with this latter more concise input variation. So we'll just add a note in the docs advertising the new PRESCRIBED mode, and point to the existing documentation on allowed data structures for time-varying arrays. I'll close the issue after that change is in very soon. |
Closing with #400 (PR 400 🥳) |
While future work may focus on developing specific physically realistic profiles for current and heating actuators, in the meantime it would be useful to be able to represent arbitrary source profiles so that scenarios generated in other codes can be run in TORAX.
The most basic of these would be a piecewise linear profile.
The text was updated successfully, but these errors were encountered: