Skip to content
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

trying 3.12 #337

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

steps:
- name: Install system packages
Expand Down
23 changes: 0 additions & 23 deletions docs/usage_spherical_tokamak.rst
Original file line number Diff line number Diff line change
@@ -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
-----------------------------
Expand Down
23 changes: 0 additions & 23 deletions docs/usage_tokamak.rst
Original file line number Diff line number Diff line change
@@ -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
-------------------
Expand Down
27 changes: 12 additions & 15 deletions examples/tokamak_from_plasma_with_divertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ docs = [
"numpy<=1.26.4",
"mpmath",
"sympy",
"scipy"
"scipy",
"ipython"
]

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion src/paramak/assemblies/spherical_tokamak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/paramak/assemblies/tokamak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down