-
Notifications
You must be signed in to change notification settings - Fork 0
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
Interferometer #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using QuadGK, a simple line integration of electron density is added. However, no test has been added and this has not been tested yet but the workflow would more or less remain teh same. Also note that for line average density, currently the total path length is used while we want to average by path length in plasma.
* Added a test but it fails due to a bug in SD4SOLPS * Converted default_interferometer.yml to json * Added gridspacedesc.yml in samples * Fixed Project.toml
Utilizing the new ∈ operator from GGDUtils.jl, now using core_profile_2d for getting values inside core region and using GGDUtils.interp for getting values inside SOLPS grid outside of core region. Everywhere else, teh electron density is assumed to be zero. Chord length inside core is also measured using the same functionality. However, the implementation is very slow. It takes about 4s to integrate electron density along a chord for each time step . This is not acceptable. I'll look deeper into what is causing the slow down and fix it.
Using the new core profile interpolation function that returns an inteprolating function instead of values at specific points. This helped increase the speed of the code such that for relative tolerance of 10 minutes, most integrations finish withing 10 seconds. However, the horizontal line of sight chord is taking longer. The major reason for slow speed of numerical integration is the presence of peaks that require a lot of fine resolution function calls by quadGK to reach to the desired relative tolerance. These peaks are naturally present in the data and we can not do much about it. There is bit of commented code in this commit where I tried to use multi processing using threads but that is returning negative inegrated electron density and is not really speeding up the performance, so I have commented it out. Maybe in future this can be done more efficiently
* Most changes were required in GGDUtils for making interpolations and projection faster. * The main change in interferometer.jl was to reuse the calculations as much as possible. * I also tried calculating the integrated electron density in each segment of chord (where each segment is either in edge profile or in core profile) but this was slower than the current method of simply integrating over the whole chord and using ∈ to find the relevant function to use for interpolation. * I have left the other method as commented out code right now. Will clean up in next commit to store this work as well.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added interferometer that uses extrapolated core profile and thin plate smoothed edge profile electron density data to generate outputs.