-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from fusion-energy/updates_for_2024_york_ws
Updates for 2024 york workshop
- Loading branch information
Showing
5 changed files
with
568 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "72324188-e724-46bf-9a3c-f7f6501ccc73", | ||
"metadata": {}, | ||
"source": [ | ||
"This activity allows you to put lots of simulation skills to the test.\n", | ||
"\n", | ||
"We are going to simulate a tokamak where you get to decide the materials.\n", | ||
"\n", | ||
"The goal is to:\n", | ||
"\n", | ||
"maximize the Tritium Breeding Ratio\n", | ||
"minimize the heating on the center colum\n", | ||
"maximize the heat in the blanket" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "7114fda7-b184-46d4-bbce-0d88206c573e", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "ef814191-35a3-44a9-b088-f27c1bb53457", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import openmc\n", | ||
"\n", | ||
"# surfaces\n", | ||
"central_column_surface_outer = openmc.ZCylinder(r=100)\n", | ||
"central_column_surface_mid = openmc.ZCylinder(r=90)\n", | ||
"central_column_surface_inner = openmc.ZCylinder(r=80)\n", | ||
"\n", | ||
"inner_sphere_surface = openmc.Sphere(r=480)\n", | ||
"middle_sphere_surface = openmc.Sphere(r=500) \n", | ||
"outer_sphere_surface = openmc.Sphere(r=600)\n", | ||
"outer_outer_sphere_surface = openmc.Sphere(r=650)\n", | ||
"edge_of_simulation_surface = openmc.Sphere(r=650, boundary_type='vacuum')\n", | ||
"\n", | ||
"# regions\n", | ||
"central_column_region = -central_column_surface_inner & -edge_of_simulation_surface\n", | ||
"central_column_coolant_region = +central_column_surface_inner & -central_column_surface_mid & -edge_of_simulation_surface\n", | ||
"central_column_fw_region = +central_column_surface_mid & -central_column_surface_outer & -edge_of_simulation_surface\n", | ||
"\n", | ||
"inner_vessel_region = +central_column_surface_outer & -inner_sphere_surface\n", | ||
"\n", | ||
"blanket_fw_region = -middle_sphere_surface & +inner_sphere_surface & +central_column_surface_outer\n", | ||
"blanket_coolant_region = +middle_sphere_surface & -outer_sphere_surface & +central_column_surface_outer\n", | ||
"blanket_breeder_region = +outer_sphere_surface & -outer_outer_sphere_surface & +central_column_surface_outer\n", | ||
"blanket_reflector_region = +outer_outer_sphere_surface & -edge_of_simulation_surface & +central_column_surface_outer\n", | ||
"\n", | ||
"# cells\n", | ||
"central_column_cell = openmc.Cell(region=central_column_region)\n", | ||
"central_column_coolant_cell = openmc.Cell(region=central_column_coolant_region)\n", | ||
"central_column_fw_cell = openmc.Cell(region=central_column_fw_region)\n", | ||
"\n", | ||
"inner_vessel_cell = openmc.Cell(region=inner_vessel_region)\n", | ||
"\n", | ||
"blanket_fw_cell = openmc.Cell(region=blanket_fw_region)\n", | ||
"blanket_coolant_cell = openmc.Cell(region=blanket_coolant_region)\n", | ||
"blanket_breeder_cell = openmc.Cell(region=blanket_breeder_region)\n", | ||
"blanket_reflector_cell = openmc.Cell(region=blanket_reflector_region)\n", | ||
"\n", | ||
"geometry = openmc.Geometry([\n", | ||
" central_column_cell,\n", | ||
" central_column_coolant_cell,\n", | ||
" central_column_fw_cell,\n", | ||
" inner_vessel_cell,\n", | ||
" blanket_fw_cell,\n", | ||
" blanket_coolant_cell,\n", | ||
" blanket_breeder_cell,\n", | ||
" blanket_reflector_cell,\n", | ||
"])\n", | ||
"\n", | ||
"# visualization\n", | ||
"plot = geometry.plot(basis='xz')\n", | ||
"plot.figure.savefig('xz-cell.png')\n", | ||
"\n", | ||
"plot = geometry.plot(basis='xy')\n", | ||
"plot.figure.savefig('xy-cell.png')\n", | ||
"\n", | ||
"plot = geometry.plot(basis='yz')\n", | ||
"plot.figure.savefig('yz-cell.png')" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.