Skip to content

added shellFS component and tests#629

Merged
shimwell merged 3 commits intodevelop_pre_reviewfrom
adding_shell_parametric_component
Dec 11, 2020
Merged

added shellFS component and tests#629
shimwell merged 3 commits intodevelop_pre_reviewfrom
adding_shell_parametric_component

Conversation

@shimwell
Copy link
Collaborator

@shimwell shimwell commented Dec 9, 2020

Proposed changes

This adds the shell from shape parametric component that we discussed earlier today with @RemDelaporteMathurin and @billingsley-john .

The final solution is based on a discovery @billingsley-john who found the .shell method.

The result is a versatile shape with quite a small amount of code.

The shell shape is cut using a WedgeCutterFS() based on the shape passed into the ShellFS()

Unfortunately it fails when trying to offset a certain blanket I'm working on. I believe that is due to the use of splines on the outer part. It works when the blanket is make entirely from straight sections

Also it can fail when the filleted edges make contact each other

TODO

  • Docs and images for docs
  • add a spline shape to the test
  • add a mixed shape to the tests
  • add an extrude shape to the tests
  • add a hollow shape to the tests

Here are some examples of the shape in use

base_shape = paramak.PoloidalFieldCoil(
    height=50,
    width=50,
    rotation_angle=90,
    center_point=(100,100)
)
casing_int = paramak.ShellFS(shape=base_shape, kind='intersection')
casing_int.export_stp('int.stp')
casing_arc = paramak.ShellFS(shape=base_shape, kind='arc')
casing_arc.export_stp('arc.stp')

Screenshot from 2020-12-09 22-43-51

Screenshot from 2020-12-09 22-43-27

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Pep8 applied
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #629 (6a7a224) into develop_pre_review (5b7ada0) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           develop_pre_review     #629      +/-   ##
======================================================
+ Coverage               97.96%   98.15%   +0.19%     
======================================================
  Files                      65       66       +1     
  Lines                    3628     4014     +386     
======================================================
+ Hits                     3554     3940     +386     
  Misses                     74       74              
Impacted Files Coverage Δ
paramak/parametric_components/shell_fs.py 100.00% <100.00%> (ø)
paramak/parametric_components/blanket_fp.py 100.00% <0.00%> (ø)
paramak/parametric_reactors/ball_reactor.py 100.00% <0.00%> (ø)
paramak/parametric_components/hollow_cube.py 100.00% <0.00%> (ø)
paramak/parametric_components/cutting_wedge.py 100.00% <0.00%> (ø)
paramak/parametric_components/vacuum_vessel.py 100.00% <0.00%> (ø)
paramak/parametric_shapes/sweep_mixed_shape.py 100.00% <0.00%> (ø)
paramak/parametric_components/tf_coil_casing.py 100.00% <0.00%> (ø)
paramak/parametric_components/tokamak_plasma.py 100.00% <0.00%> (ø)
paramak/parametric_shapes/rotate_mixed_shape.py 100.00% <0.00%> (ø)
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b7ada0...61b37d3. Read the comment docs.

Copy link

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Hi @shimwell. Nice new feature here. Do you think it's worth trying with the offset2d method ? If i understood well, it's fairly similar but we maybe wouldn't need that additionnal wedge cut at the end.

@shimwell shimwell changed the base branch from develop to develop_pre_review December 11, 2020 15:24
Co-authored-by: Rémi Delaporte-Mathurin <40028739+RemDelaporteMathurin@users.noreply.github.com>
@shimwell shimwell merged commit f7c2d49 into develop_pre_review Dec 11, 2020
@shimwell shimwell deleted the adding_shell_parametric_component branch December 16, 2020 11:25
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.

2 participants