-
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
Rewritten TS model with segmented laser geometry #219
Rewritten TS model with segmented laser geometry #219
Conversation
Segmented cylinder as laser geometry rewritten laser model to correct power units new laser model laser material obtains all properties needed for scattering calculation laser_spectrum and laser_model independent of plasma or laser added tests for laser
I'm going to propose we merge this into a feature branch first, so we can make a few tweaks before the merge into development. |
This PR is looking a lot better and a lot cleaner. I see there are potentially some areas of improvement in the notification/change handling. I should be able to address that after merge if necessary, provided I'm sure of the original intentions. There are a few things I'd tweak. The material does seem a little over complicated. Some of the properties on the material should really be on the laser etc... if you compare the laser material with the beam material, that is really as complex as it should be. |
Laser material simplified. Most of the calculations moved to the scattering model. Caches of plasma and laser transforms ScatteringModel got reference to the plasma and laser_model to provide values for the scattering calculations ScatteringModel changed to LaserEmissionModel Model manager handling emission models added to laser Propagation of changes and notifications changed to be more like the beam model.
I have simplified the material to be closer to the beam material as suggested by @CnlPepper. The code was moved to the scattering emission calculation. I have inspired myself in the beam model and simplified the notifications. What should be the next step? Should I remove the draft flag so it is merged to the feature branch? |
I think we should get it in a feature branch and do any final iterations there. I'm going to do a quick check over now. |
I've added some comments to the existing review. |
Segmented cylinder as laser geometry rewritten laser model to correct power units new laser model laser material obtains all properties needed for scattering calculation laser_spectrum and laser_model independent of plasma or laser added tests for laser
Laser material simplified. Most of the calculations moved to the scattering model. Caches of plasma and laser transforms ScatteringModel got reference to the plasma and laser_model to provide values for the scattering calculations ScatteringModel changed to LaserEmissionModel Model manager handling emission models added to laser Propagation of changes and notifications changed to be more like the beam model.
Hey @Mateasek I see you marked this as ready for review, however there are some outstanding queries above. |
move files model* to profile*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Mateasek,
This is a very important new feature. As far as I know, the Thomson scattering synthetic diagnostic is in great demand at ITER. Thanks a lot for this!
The comments are many but all the issues are minor.
Also, could you please update the changelog?
There is currently no need to keep laser reference n LaserProfile. This was a leftover from version, where some laser properties were in Laser
minor ones
In LaserSpectrum class
from laser._plasma to laser.plasma
Rebuilding segment primitives was separated from assigning materials to segment primitives. Rebuilding primitives is now called only in needed cases. Added configure_geometry to laser_profile notifier Fixed missing addition of _plasma_changed to plasma notifier Changing integrator changes only integrators within materials
Thank you very much @vsnever for doing this very thorough review and for suggesting the improvements and spotting problems. In case of the minor suggestions I applied the suggestions and marked them as resolved. There are few regarding the notifications and rebuilding of the geometry and materials, which I left opened because the applied changes should be checked again. I would like to ask you to see if it is what you had in mind, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing all the issues. Now everything looks fine, except for a couple of leftover attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Mateasek, I'm happy with this PR.
914dbc2
to
29267ab
Compare
I decided to do new PR, because at the end there were many changes:
Unittests checking the following were added:
I hope that this time I minimised PEP8 incompatibilitity. If this state of the model is acceptable and won't be changed much, I will move to writting docstrings, documentation and examples: