Skip to content

Commit

Permalink
Merge pull request #282 from fusion-energy/develop
Browse files Browse the repository at this point in the history
changing to cad_to_h5m and graveyard removal
  • Loading branch information
shimwell authored Dec 31, 2022
2 parents 8e41bff + ed243c2 commit e5f7137
Show file tree
Hide file tree
Showing 16 changed files with 337 additions and 931 deletions.
3 changes: 1 addition & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ requirements:
- mpmath
- plasmaboundaries >=0.1.8
- plotly
- brep_part_finder >=0.5.0 # [not win]
- brep_to_h5m >=0.4.0 # [not win]
- cad_to_dagmc >=0.1.2 # [not win]
- moab * nompi_tempest_*
# - jupyter-cadquery not available on conda

Expand Down
14 changes: 7 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ dependencies:
- python=3.8
- pyparsing~=2.4.7
- cadquery=master
- pytest
- plotly
- scipy
- numpy
- matplotlib
- pillow
- plasmaboundaries
- pip
- pip:
- pytest
- plotly
- scipy
- numpy
- matplotlib
- pillow
- plasmaboundaries
- sympy
- sphinx-autodoc-typehints
- sphinxcadquery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def generate_random_reactor():
my_reactor.rotation_angle = 180

for input_var in [
"graveyard_size",
"graveyard_offset",
"largest_shapes",
"elongation",
"triangularity",
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ dependencies = [
"plasmaboundaries>=0.1.8",
"jupyter-client<7",
"jupyter-cadquery>=3.2.0",
"brep_part_finder>=0.5.2",
"brep_to_h5m>=0.4.2",
"cad_to_dagmc>=0.1.2",
"setuptools_scm[toml]>=7.0.5"
]

Expand Down
94 changes: 94 additions & 0 deletions src/paramak/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,97 @@
from .parametric_reactors.negative_triangularity_reactor import (
NegativeTriangularityReactor,
)

__all__ = [
Shape,
Reactor,
rotate,
extend,
distance_between_two_points,
diff_between_angles,
find_center_point_of_circle,
angle_between_two_points_on_circle,
find_radius_of_circle,
export_solids_to_brep,
export_solids_to_dagmc_h5m,
get_center_of_bounding_box,
EdgeLengthSelector,
FaceAreaSelector,
ExtrudeMixedShape,
ExtrudeSplineShape,
ExtrudeStraightShape,
ExtrudeCircleShape,
RotateMixedShape,
RotateSplineShape,
RotateStraightShape,
RotateCircleShape,
SweepMixedShape,
SweepSplineShape,
SweepStraightShape,
SweepCircleShape,
CircularPort,
HexagonPin,
Plasma,
PlasmaFromPoints,
PlasmaBoundaries,
BlanketConstantThicknessArcH,
BlanketConstantThicknessArcV,
BlanketFP,
BlanketFPPoloidalSegments,
ITERtypeDivertor,
ITERtypeDivertorNoDome,
CenterColumnShieldCylinder,
CenterColumnShieldHyperbola,
CenterColumnShieldFlatTopHyperbola,
CenterColumnShieldPlasmaHyperbola,
CenterColumnShieldCircular,
CenterColumnShieldFlatTopCircular,
CoolantChannelRingStraight,
CoolantChannelRingCurved,
InboardFirstwallFCCS,
PoloidalFieldCoil,
PoloidalFieldCoilFP,
PoloidalFieldCoilCase,
PoloidalFieldCoilCaseFC,
PoloidalFieldCoilSet,
PoloidalFieldCoilCaseSet,
PoloidalFieldCoilCaseSetFC,
ExtrudeRectangle,
ExtrudeHollowRectangle,
PoloidalSegments,
PortCutterRotated,
PortCutterRectangular,
PortCutterCircular,
RotatedTrapezoid,
RotatedIsoscelesTriangle,
CuttingWedge,
CuttingWedgeFS,
BlanketCutterParallels,
BlanketCutterStar,
InnerTfCoilsCircular,
InnerTfCoilsFlat,
ToroidalFieldCoilCoatHanger,
ToroidalFieldCoilRectangle,
ToroidalFieldCoilTripleArc,
ToroidalFieldCoilPrincetonD,
TFCoilCasing,
ToroidalFieldCoilRectangleRoundCorners,
ConstantThicknessDome,
VacuumVessel,
DishedVacuumVessel,
VacuumVesselInnerLeg,
CapsuleVacuumVessel,
HollowCube,
ShellFS,
EuDemoFrom2015PaperDiagram,
BallReactor,
SubmersionTokamak,
SingleNullSubmersionTokamak,
SingleNullBallReactor,
SegmentedBlanketBallReactor,
CenterColumnStudyReactor,
SparcFrom2020PaperDiagram,
IterFrom2020PaperDiagram,
FlfSystemCodeReactor,
NegativeTriangularityReactor,
]
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def error(z_0, R0, R2):

def get_segment(a, b, z_0):
a_R = np.linspace(a, b, num=70, endpoint=True)
asol = integrate.odeint(solvr, [z_0, 0], a_R)
asol = integrate.odeint(solvr, [z_0[0], 0], a_R)
return a_R, asol[:, 0], asol[:, 1]

def solvr(Y, R):
Expand Down
Loading

0 comments on commit e5f7137

Please sign in to comment.