diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ee18f4a..26be1350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] steps: - name: Install system packages diff --git a/docs/usage_spherical_tokamak.rst b/docs/usage_spherical_tokamak.rst index 6c2c67d9..90c68d2b 100644 --- a/docs/usage_spherical_tokamak.rst +++ b/docs/usage_spherical_tokamak.rst @@ -1,26 +1,3 @@ -Usage -===== - -There are two main reactors to choose from, Tokamak and Spherical Tokamak. -These can be built with: -- A radial and vertical build -- A radial build and plasma elongation. - -The former gives the user more control of the size of components allowing reactor blankets to vary both radially and vertically. -The later allows reactors to be built with a minimal number of parameters. -In all cases it is possible to add additional components such as divertors, poloidal and toroidal magnets and any self made geometry as a CadQuery Workplane. -The reactors can be varied in terms of their radial build, vertical build, elongation and triangularity which gives a lot of variability. -These examples show how to make various reactors with and without different components, each example is minimal and aims to show a single feature, you will have to combine examples to make a complete model. - - - -.. toctree:: - :maxdepth: 3 - - usage-tokamak - usage-spherical-tokamak - - Spherical tokamak from plasma ----------------------------- diff --git a/docs/usage_tokamak.rst b/docs/usage_tokamak.rst index 391042cb..6e05aa9b 100644 --- a/docs/usage_tokamak.rst +++ b/docs/usage_tokamak.rst @@ -1,26 +1,3 @@ -Usage -===== - -There are two main reactors to choose from, Tokamak and Spherical Tokamak. -These can be built with: -- A radial and vertical build -- A radial build and plasma elongation. - -The former gives the user more control of the size of components allowing reactor blankets to vary both radially and vertically. -The later allows reactors to be built with a minimal number of parameters. -In all cases it is possible to add additional components such as divertors, poloidal and toroidal magnets and any self made geometry as a CadQuery Workplane. -The reactors can be varied in terms of their radial build, vertical build, elongation and triangularity which gives a lot of variability. -These examples show how to make various reactors with and without different components, each example is minimal and aims to show a single feature, you will have to combine examples to make a complete model. - - - -.. toctree:: - :maxdepth: 3 - - usage_tokamak - usage_spherical_tokamak - - Tokamak from plasma ------------------- diff --git a/examples/tokamak_from_plasma_with_divertor.py b/examples/tokamak_from_plasma_with_divertor.py index bf7e0065..a6b83d93 100644 --- a/examples/tokamak_from_plasma_with_divertor.py +++ b/examples/tokamak_from_plasma_with_divertor.py @@ -12,21 +12,18 @@ my_reactor = paramak.tokamak_from_plasma( radial_build=[ - [ - (paramak.LayerType.GAP, 10), - (paramak.LayerType.SOLID, 30), - (paramak.LayerType.SOLID, 50), - (paramak.LayerType.SOLID, 10), - (paramak.LayerType.SOLID, 120), - (paramak.LayerType.SOLID, 20), - (paramak.LayerType.GAP, 60), - (paramak.LayerType.PLASMA, 300), - (paramak.LayerType.GAP, 60), - (paramak.LayerType.SOLID, 20), - (paramak.LayerType.SOLID, 120), - (paramak.LayerType.SOLID, 10), - ], - # [(paramak.LayerType.GAP, 300), ("lower_divertor", 150)], + (paramak.LayerType.GAP, 10), + (paramak.LayerType.SOLID, 30), + (paramak.LayerType.SOLID, 50), + (paramak.LayerType.SOLID, 10), + (paramak.LayerType.SOLID, 120), + (paramak.LayerType.SOLID, 20), + (paramak.LayerType.GAP, 60), + (paramak.LayerType.PLASMA, 300), + (paramak.LayerType.GAP, 60), + (paramak.LayerType.SOLID, 20), + (paramak.LayerType.SOLID, 120), + (paramak.LayerType.SOLID, 10), ], elongation=2, triangularity=0.55, diff --git a/pyproject.toml b/pyproject.toml index b100d61b..57228ae4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,8 @@ docs = [ "numpy<=1.26.4", "mpmath", "sympy", - "scipy" + "scipy", + "ipython" ] [tool.black] diff --git a/src/paramak/assemblies/spherical_tokamak.py b/src/paramak/assemblies/spherical_tokamak.py index 9103b326..5b2ccd96 100644 --- a/src/paramak/assemblies/spherical_tokamak.py +++ b/src/paramak/assemblies/spherical_tokamak.py @@ -235,7 +235,7 @@ def spherical_tokamak( if len(extra_intersect_shapes)>0: all_shapes = [] for shape in inner_radial_build + blanket_layers: - all_shapes.extend(shape) + all_shapes.append(shape) # makes a union of the the radial build to use as a base for the intersect shapes reactor_compound=inner_radial_build[0] diff --git a/src/paramak/assemblies/tokamak.py b/src/paramak/assemblies/tokamak.py index 0a778c43..505ef437 100644 --- a/src/paramak/assemblies/tokamak.py +++ b/src/paramak/assemblies/tokamak.py @@ -262,7 +262,7 @@ def tokamak( if len(extra_intersect_shapes)>0: all_shapes = [] for shape in inner_radial_build + blanket_layers: - all_shapes.extend(shape) + all_shapes.append(shape) # makes a union of the the radial build to use as a base for the intersect shapes reactor_compound=inner_radial_build[0]