Fusion-Power-Plant-Framework / bluemira

Bluemira is an integrated inter-disciplinary design tool for future fusion reactors. It incorporates several modules, some of which rely on other codes, to carry out a range of typical conceptual fusion reactor design activities.
https://bluemira.readthedocs.io/
GNU Lesser General Public License v2.1
59 stars 16 forks source link

Add the ability to reconstruct stellarator plasma boundary in cad form #3397

Closed ym1906 closed 3 months ago

ym1906 commented 3 months ago

Closes #3363

Description

As a modeller and reactor designer I want to develop the capability to optimise stellarator designs with Bluemira. This requires the ability to represent the plasma's boundary in CAD form.

The software package Simsopt is widely used to optimise stellarators. Simsopt can generate a 3D plasma surface but this must be translated into a NURBS (Non-uniform rational B Spline) surface for CAD representation within Bluemira.

Solution

Added make_bsplinesurface to geometry tools and free_cad api

Checklist

I confirm that I have completed the following checks:

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 74.29%. Comparing base (2a2c8b0) to head (a2fbe22). Report is 3 commits behind head on develop.

Files Patch % Lines
bluemira/codes/_freecadapi.py 33.33% 4 Missing :warning:
bluemira/geometry/tools.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3397 +/- ## =========================================== - Coverage 74.51% 74.29% -0.22% =========================================== Files 230 230 Lines 26813 26772 -41 =========================================== - Hits 19979 19890 -89 - Misses 6834 6882 +48 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 3 months ago

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (5) #### On collect - `/home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/ufl_type.py:56: DeprecationWarning: attach_operators_from_hash_data deprecated, please use UFLObject instead.` #### On runtest - `/home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/basix/ufl.py:1909: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead` - `/home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/expr.py:275: DeprecationWarning: Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.` - `/home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:23: DeprecationWarning: Use of elements created by UFL is deprecated. You should create elements directly using Basix.` - `/home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:26: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead`
je-cook commented 3 months ago

dunno why sonarcloud isnt running...