Skip to content

Output radial build components to MFile#3348

Merged
timothy-nunn merged 1 commit intomainfrom
3119-add-radial-build-vector-to-mfile-output
Oct 11, 2024
Merged

Output radial build components to MFile#3348
timothy-nunn merged 1 commit intomainfrom
3119-add-radial-build-vector-to-mfile-output

Conversation

@timothy-nunn
Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn commented Oct 11, 2024

Updates how the radial build thicknesses are written to the MFile. The data is collected in an array before outputting all of the elements at the end.

The same array is used for the OUT.DAT radial build and MFILE.DAT variables. Therefore, some of the descriptions have changed in both files.

In the OUT.DAT, there is no addition anymore so the components listed as (d_vv_in + shldith) are now given seperately on two lines.

The MFile contains a flattened dictionary of the radial build components. Each radial build element provides three lines in the MFile, where <n> is the index of the component (in order from the centreline, starting from 1):

  • radial_label(<n>): the name of the radial build element
  • radial_cum(<n>): the radius of the outboard edge of the radial build element
  • element: the thickness of the radial build element (where element == radial_label(<n>))

E.g.

 Machine_bore_radial_thickness_(m)_______________________________________ (bore)________________________      2.3488719291229387E-01 ITV
 Radial_build_component_1________________________________________________ (radial_label(1))_____________     bore
 Radial_build_cumulative_radius_1________________________________________ (radial_cum(1))_______________      2.3488719291229387E-01    
 Central_solenoid_radial_thickness_(m)___________________________________ (ohcth)_______________________      2.0164285405105731E-01 ITV
 Radial_build_component_2________________________________________________ (radial_label(2))_____________     ohcth
 Radial_build_cumulative_radius_2________________________________________ (radial_cum(2))_______________      4.3653004696335118E-01   

...

 Gap_radial_thickness_(m)________________________________________________ (tftsgap)_____________________      1.0000000000000000E-02    
 Radial_build_component_25_______________________________________________ (radial_label(25))____________     tftsgap
 Radial_build_cumulative_radius_25_______________________________________ (radial_cum(25))______________      9.8874434446387074E+00    
 TF_coil_outboard_leg_radial_thickness_(m)_______________________________ (tfthko)______________________      7.7430285743156235E-01    
 Radial_build_component_26_______________________________________________ (radial_label(26))____________     tfthko
 Radial_build_cumulative_radius_26_______________________________________ (radial_cum(26))______________      1.0661746302070270E+01  

I have attached the old and new ST and LT OUT.DATs
st_regression.NEW.OUT.DAT.txt
st_regression.OUT.DAT.txt
large_tokamak.NEW.OUT.DAT.txt
large_tokamak.OUT.DAT.txt
st_regression.NEW.MFILE.DAT.txt
large_tokamak.NEW.MFILE.DAT.txt

FYI @je-cook @athoynilimanew

@timothy-nunn timothy-nunn linked an issue Oct 11, 2024 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 11, 2024

Codecov Report

❌ Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.67%. Comparing base (032399f) to head (e6f53f0).
⚠️ Report is 621 commits behind head on main.

Files with missing lines Patch % Lines
process/build.py 0.00% 46 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3348      +/-   ##
==========================================
+ Coverage   26.65%   26.67%   +0.02%     
==========================================
  Files          76       76              
  Lines       17610    17596      -14     
==========================================
  Hits         4694     4694              
+ Misses      12916    12902      -14     

☔ 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.

@timothy-nunn timothy-nunn force-pushed the 3119-add-radial-build-vector-to-mfile-output branch from fffce4c to e6f53f0 Compare October 11, 2024 13:27
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed and LGTM

@timothy-nunn timothy-nunn merged commit 3181cff into main Oct 11, 2024
@timothy-nunn timothy-nunn deleted the 3119-add-radial-build-vector-to-mfile-output branch October 11, 2024 14:05
@mkovari
Copy link
Copy Markdown
Collaborator

mkovari commented Nov 4, 2025

How would you insert a new component?

@timothy-nunn
Copy link
Copy Markdown
Collaborator Author

How would you insert a new component?

@mkovari You can append items to the radial build array

PROCESS/process/build.py

Lines 2208 to 2210 in 5eeaeff

# an array that holds the following information
# description, variable name, thickness, radius
radial_build_data = []

The radial build is the order so this append statement needs to be inserted at the correct point in the code, between the two append statements this new component would be between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add radial build vector to MFILE output

4 participants