8000 More accurately simulate the neutron flux profile by OceanNuclear · Pull Request #3653 · ukaea/PROCESS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

More accurately simulate the neutron flux profile #3653

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

Draft
wants to merge 87 commits into
base: main
Choose a base branch
from

Conversation

OceanNuclear
Copy link
Contributor
@OceanNuclear OceanNuclear commented May 2, 2025

Description

Calculates the neutron flux profile in the first wall and blanket, using an extremely simplified diffusion-based model of an infinite slab sandwich.

Reason for choosing this model

It's better than not having a neutronics model.
It's also very simplified, so it can be calculated on the fly, without installing any deterministic neutron transport codes as dependency.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@codecov-commenter
Copy link
codecov-commenter commented May 2, 2025

Codecov Report

Attention: Patch coverage is 48.16128% with 1170 lines in your changes missing coverage. Please review.

Project coverage is 37.27%. Comparing base (52e7288) to head (bff2bc1).
Report is 77 commits behind head on main.

Files with missing lines Patch % Lines
process/io/plot_proc.py 2.74% 319 Missing ⚠️
process/constraints.py 52.12% 270 Missing ⚠️
process/neutronics.py 0.00% 205 Missing ⚠️
process/power.py 17.72% 130 Missing ⚠️
process/costs.py 66.66% 84 Missing ⚠️
process/costs_2015.py 84.80% 43 Missing ⚠️
process/pfcoil.py 19.23% 21 Missing ⚠️
process/neutronics_data.py 0.00% 15 Missing ⚠️
process/build.py 56.25% 14 Missing ⚠️
process/main.py 15.38% 11 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3653      +/-   ##
==========================================
+ Coverage   36.99%   37.27%   +0.28%     
==========================================
  Files          84       90       +6     
  Lines       21689    23050    +1361     
==========================================
+ Hits         8023     8592     +569     
- Misses      13666    14458     +792     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OceanNuclear OceanNuclear requested a review from chris-ashe May 2, 2025 21:04
@chris-ashe chris-ashe added Physics Relating to the physics models Neutronics Power Cycle and removed Physics Relating to the physics models labels May 6, 2025
@OceanNuclear OceanNuclear changed the title First commit - made a mockup of NeutronFluxProfile calculator. More accurately simulate the neutron flux profile, to get a more accurate estimate of the neutronics quantities. Jun 4, 2025
@OceanNuclear OceanNuclear changed the title More accurately simulate the neutron flux profile, to get a more accurate estimate of the neutronics quantities. More accurately simulate the neutron flux profile Jun 4, 2025
chris-ashe and others added 11 commits July 12, 2025 14:39
* 🔄 Refactored coolant pump calculations in `power.py` for improved clarity and efficiency; simplified conditional checks and consolidated pump power calculations.

* 🔄 Renamed variable `pthermblkt_liq` to `p_blkt_liquid_breeder_heat_deposited_mw` in `power.py` for improved clarity and consistency.

* 🔄 Updated power calculations in power.py to improve clarity and accuracy. added detailed handling for secondary breeder coolant scenarios and refined heat deposition calculations.

* Renamed power1 to component_thermal_powers in multiple files for improved clarity and consistency in function naming. updated related calculations and comments to reflect the change.

* 🔄 Renamed variable pinjht to p_hcd_electric_loss_mw in the heat_transport_variables module to improve clarity.

* ❇️ Added output_cryogenics method to Power class for detailed cryogenic system heat loads reporting; integrated into write function for comprehensive output.

* 🔄 Updated variable names from emult to f_p_blkt_multiplication

* 🔄 replace emultmw with p_blkt_multiplication_mw for clarity and consistency across the codebase.

* 🔄 Reorganized sections in power-requirements.md for improved clarity and consistency; adjusted headings for TF coils and power conversion parameters.

* 🔄 Replaced instances of 'cpttf' with 'c_tf_turn' across multiple files to improve clarity and consistency in variable naming.

* 🔄 Updated variable names from 'tflegmw' to 'p_tf_leg_resistive_mw' across multiple files for improved clarity and consistency in the codebase.

* 🔄 Renamed 'pres_joints' to 'p_tf_joints_resistive' across multiple files for improved clarity and consistency in variable naming.

* 🔄 Renamed 'tfjtsmw' to 'p_tf_joints_resistive_mw' in tfcoil_variables and updated references in power.py for improved clarity and consistency in variable naming.

* 🔄 Renamed 'tfcpmw' to 'p_cp_resistive_mw' across multiple files for improved clarity and consistency in variable naming.

* 🔄 Renamed 'tfacpd' to 'p_tf_electric_supplies_mw' for clarity and uniformity.

* 🔄 Renamed variable pfwpmw to p_pf_electric_supplies_mw across multiple files to improve clarity and maintain consistency in naming conventions.

* Add changed inputs to obsolete variables

---------

Co-authored-by: Timothy Nunn <timothy.nunn@ukaea.uk>
* remove cost AnnotatedVariables and within create_dicts add these vars to the dicts

* remove AnnotatedVariables from power.py, costs.py and costs_2015.py
edit create_dicts to get variable names, initial values and descriptions from the process/data_structure dir

* fix failing example notebook, remove reference to AnnotatedVariable in build.py

* add missing init functions to data_structure files

* make test_costs_2015 use necessary variables from data_structure.cost_2015_variables

* Remove AnnotatedVariables class and anywhere it is used

* use data_structure.power_variables in test_power.py

* use data_structure.cost_python_variables in test_costs_1990.py

* small changes

* fix rebase error

* fix name of DICT_MODULE entry

* addressing PR comments

* Initialise all variables to None

* Correct handling of the Python-defined build data structure

* pr comments: add typewarnings, remove unnecessary todo statement and lines left over from previous iterations of my work

* split error message lines up, add in str_variable option

---------

Co-authored-by: Timothy Nunn <timothy.nunn@ukaea.uk>
* Convert constraint_eqns to Python

* Write infrastructure to register Python constraints

* Convert remaining equality constraints to Python

* Convert upper limit constraints to Python

* Convert lower limit constraints to Python

* Convert init_constraint_variables to Python

* Clarify documentation and variable names for Python constraint manager

* Fix list formatting in docs
* ✨ Add full output plotting option to Process class

* 📝 Update documentation for plotting and running PROCESS with full output option

* 📝 Update VS Code documentation and modify integration test to use full output option

* Update documentation/proc-pages/usage/plotting.md

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>

* Update documentation/proc-pages/usage/plotting.md

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>

* 📝 Refactor output path handling in plotting scripts for clarity and consistency

---------

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
)

* 📝 Refactor documentation for adding variables and constraints in `PROCESS` code

* Update documentation/proc-pages/development/add-vars.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update documentation/proc-pages/development/add-vars.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove old constraint infrastructure

* Typo in constraints.py
chris-ashe and others added 30 commits July 12, 2025 14:39
…across multiple data files and test cases to improve clarity and maintain consistency in the codebase.
…ultiple files for improved clarity and consistency in the codebase.
…pace across multiple files for improved clarity and consistency in the codebase.
…n across multiple files for improved clarity and consistency in the codebase.
…iple files for improved clarity and consistency in the codebase.
…oss multiple files for improved clarity and consistency in the codebase.
…ltiple test files and data files for consistency and clarity.
* Rename tfcind to tf_coil_self_inductance

* 🔄 Refactor tf_coil_self_inductance calls in ResistiveTFCoil and SuperconductingTFCoil for improved clarity and consistency

* 🔄 Update TfcindParam structure in test_tfcoil.py for improved clarity and consistency

* Update documentation/proc-pages/eng-models/tf-coil.md

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>

---------

Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
…placements, and improve marker sizes for clarity
…the addition of the 11th page and update figure captions for clarity
* ✨ Add confinement time comparison plotting function to plot_proc.py

* Refactor confinement time calculations in plot_proc.py by removing unused variables and functions for improved clarity and performance.

* 🐛 Fix confinement time comparison plotting by applying f2py compatibility to scaling labels

* 📝 Update figure caption for density limit comparison page to include confinement time
* 🔄 Refactor variable names from r_wp_inner to r_tf_wp_inner across multiple files for improved clarity and consistency in the codebase.

* 🔄 Rename r_wp_outer to r_tf_wp_outer across multiple files for consistency and clarity in the codebase.

* 🔄 Rename variable awptf to a_tf_wp_no_insulation across multiple files for improved clarity and consistency in the codebase.

* 🔄 Updated variable names from tinstf to dx_tf_wp_insulation across multiple files for consistency and clarity.

* 🔄 Renamed variable tfinsgap to dx_tf_wp_insertion_gap in the Fortran source file tfcoil_variables.f90 to improve clarity and consistency

* 🔄 Renamed variable acond to a_tf_wp_conductor across multiple files for improved clarity and consistency in the codebase.

* 🔄 Renamed a_tf_turn_cable_space to a_tf_turn_cable_space_no_void in multiple files to clarify that the area does not include voids.

* 🔄 Updated variable names from dr_tf_wp to dr_tf_wp_with_insulation across multiple input files and test cases to improve clarity and consistency regarding the inclusion of insulation in the winding pack thickness.

* 🔄 Renamed variable a_ground_ins to a_tf_wp_ground_insulation across multiple files for improved clarity and consistency regarding the insulation in the winding pack.

* 🔄 Replace awpc with a_tf_wp_with_insulation for consistency and clarity.

* 🔄 Updated variable names from aswp to a_tf_wp_steel for consistency.

* 🔄 Updated variable names from acasetf to a_tf_coil_inboard_case across multiple data files including large_tokamak_MFILE.DAT

* 🔄 Updated references from a_tf_steel to a_tf_coil_inboard_steel in multiple files including

* 🔄 Updated variable names from a_tf_ins to a_tf_coil_inboard_insulation across multiple files for clarity and consistency.

* 🔄 Renamed variable avwp to a_tf_wp_extra_void for clarity and consistency across multiple files.

* 🔄 Updated variable name from vftf to f_a_tf_turn_cable_space_extra_void in various integration and regression input files to improve clarity and consistency.

* 🔄 Renamed variable a_case_nose to a_tf_coil_nose_case across multiple files for clarity and consistency.

* 🔄 Updated variable name from f_tf_steel to f_a_tf_coil_inboard_steel in multiple files to enhance readability and maintain consistency across the codebase.

* 🔄 Updated variable names to use f_a_tf_coil_inboard_insulation instead of f_tf_ins for better clarity and consistency.

* 🔄 Renamed variable r_tf_wp_inner to r_tf_wp_inboard_inner across multiple files for clarity and consistency.

* 🔄 Renamed variable r_tf_wp_outer to r_tf_wp_inboard_outer across multiple files for clarity and consistency.

* 🔄 Refactored variable names for clarity and consistency across multiple files, updating r_wp_centre to r_tf_wp_inboard_centre and adjusting related calculations.

* 🔄 Renamed variable acasetfo to a_tf_coil_outboard_case across multiple files for clarity and consistency.

* 🔄 Renamed variable a_case_front to a_tf_plasma_case across multiple files for clarity and consistency.

* 🔄 Updated variable names from t_cable to dx_tf_turn_cable_space_average in multiple data files and Python scripts to improve clarity and consistency.

* 🔄 Renamed variable t_wp_toroidal to dx_tf_wp_toroidal_min across multiple files for clarity and consistency.

* 🔄 Renamed variable t_wp_toroidal_av to dx_tf_wp_toroidal_average across multiple files for clarity and consistency.

* 🔄 Added new obsolete variable mappings for insulation and gap parameters in obsolete_vars.py for improved input validation.
* 📝 Add new documentation for Resistive and Superconducting TF Coils and update navigation structure in mkdocs.yml

* 📝 Add documentation for Resistive and Superconducting TF coils, including class definitions and structural details

* Refactor TF coil documentation: streamline sections on topology, shape, and conductor types

- Consolidated and clarified the topology of TF coils and central solenoid, including options for ITER-like and alternative configurations.
- Revised descriptions of TF coil shapes, introducing D-shape and picture frame options with clear definitions.
- Updated the section on TF coil conductor types, detailing resistive and superconducting magnets with associated cooling methods.
- Removed redundant sections and improved overall structure for better readability and coherence.

* 📝 Add inboard peak field radius section to Resistive and Superconducting TF coil documentation
* 🔄 Add radial build plot function and update main_plot to include new figures

* 🔄 Implement radial build plotting function and integrate into main_plot

* 🎨 Update figures and captions in documentation for radial build plots
* 🔄 Add vertical build plotting function and integrate into main_plot

* 📝 Update plotting functions and documentation for new vertical build representation
* 🔄 Rename rtanbeam to radius_beam_tangency for clarity and consistency across documentation and code

* 🔄 Updated variable names from beamwd to dx_beam_duct across multiple files for consistency and clarity.

* 🔄 Rename rtanmax to radius_beam_tangency_max for clarity and consistency across code and documentation

* 🔄 Rename portsz function to calculate_beam_port_size for clarity and consistency in method naming

* 🔄 Rename variable frbeam to f_radius_beam_tangency_rmajor for clarity and consistency across documentation and code

* 📝 Enhance documentation for neutral beam injection, adding detailed equations and clarifying the maximum tangency radius constraints.

* 🔄 Refactor build process by consolidating beam port size calculations into the run method for improved clarity and efficiency

* 🔄 Rename variable fportsz to fradius_beam_tangency for clarity and consistency across code and documentation

* 🔄 Refactor test_calculate_beam_port_size to remove monkeypatching and directly call calculate_beam_port_size for improved clarity and efficiency
* Update portsz function

* 🔄 Rename rtanbeam to radius_beam_tangency for clarity and consistency across documentation and code

* 🔄 Updated variable names from beamwd to dx_beam_duct across multiple files for consistency and clarity.

* 🔄 Rename rtanmax to radius_beam_tangency_max for clarity and consistency across code and documentation

* 🔄 Rename portsz function to calculate_beam_port_size for clarity and consistency in method naming

* 🔄 Rename variable frbeam to f_radius_beam_tangency_rmajor for clarity and consistency across documentation and code

* 📝 Enhance documentation for neutral beam injection, adding detailed equations and clarifying the maximum tangency radius constraints.

* 🔄 Refactor build process by consolidating beam port size calculations into the run method for improved clarity and efficiency

* 🔄 Rename variable fportsz to fradius_beam_tangency for clarity and consistency across code and documentation

* 🔄 Refactor test_calculate_beam_port_size to remove monkeypatching and directly call calculate_beam_port_size for improved clarity and efficiency

* Revert "Update portsz function"

This reverts commit 504f452.

---------

Co-authored-by: Christopher Ashe <91618944+chris-ashe@users.noreply.github.com>
…3717)

* refactor update DCLL and CCFE_HCPB classes to inherit from BlanketLibrary

* Remove BlanketLibrary dependency from CCFE_HCPB and DCLL initializations in unit tests
…esmos). Next step is to write the program for solving multi-group fluxes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0