You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of units are missing from that file making it hard to verify correctness e.g. it is not clear what units are self.brate and self.grate, therefore not clear what mb = 1000 * max(self.brate) or m_gas = 1000 * max(self.grate) represent.
Lots of commented out, unused codes.
This was discovered while attempting to fix #2855.
Suggested fix
Trace back all of the variables to their creation, and add the appropriate units back into the docstrings (& create the docstrings if they don't already exist)
Delete all of the unused lines (Consult @CoronelBuendia to check that they are actually no longer needed).
useful checklist of variables that needs to have its units specified/renaming
self.max_T
self.min_T
self.m_T
self.m_dot_release
self.m_T_in
self.m_T_req
self.m_T_start
self.M_T_bred
self.M_T_stack
self.M_T_burnt
self.I_blanket
self.I_plasma
self.I_stack
self.I_tfv
self.grate
self.brate
self.prate
self.DEMO_rt
self.DEMO_t
self.DD_rate
self.DT_rate
self.bci
self.arg_t_d
self.arg_t_infl
self.t
self.t_d
self.t_infl
m_gas
m_in
(And any other: Add more in the comments/editing this post)
The text was updated successfully, but these errors were encountered:
Furthermore, once these units are determined, the local variables inside calc_m_release needs to be checked to make sure that the unit conversions are done correctly.
This fuel cycle module is something I wrote back in 2016-2017 or thereabouts. Frankly this part of the code it is quite poorly written, and could do with a broader overhaul. I did at one point have a think about how it could be made more like a block flock diagram, but decided it would be too much of a pain, for relatively little gain. Ever since Chris Day et al (KIT) have come up with the DIR fuel cycle design with metal foil pumps, there is basically nothing better in terms of architecture, and it is pretty agnostic of things like fusion power or machine size.
However this module could do with a serious clean-up. I'd also like to add the functionality to be able to run in a deterministic manner which should be a faster way to get an idea of some average response to a parameter change.
Also needs to be lined up in terms of life-cycle / timeline stuff with Tiago's power cycle stuff.
In other words, units and source code documentation are the least of our worries!
Describe the bug
mb = 1000 * max(self.brate)
orm_gas = 1000 * max(self.grate)
represent.This was discovered while attempting to fix #2855.
Suggested fix
useful checklist of variables that needs to have its units specified/renaming
The text was updated successfully, but these errors were encountered: