mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Addressing changes from PR review.
This commit is contained in:
parent
ca7cba57df
commit
895249b6ca
10 changed files with 129 additions and 327 deletions
|
|
@ -33,34 +33,6 @@
|
|||
"We'll need to download the unstructured mesh file used in this notebook. We'll be retrieving those using the function and URLs below."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%matplotlib inline\n",
|
||||
"from matplotlib import pyplot as plt\n",
|
||||
"plt.rcParams[\"figure.figsize\"] = (30,10)\n",
|
||||
"\n",
|
||||
"import urllib.request\n",
|
||||
"\n",
|
||||
"pin_mesh_url = 'https://tinyurl.com/u9ce9d7' # 1.2 MB\n",
|
||||
"\n",
|
||||
"def download(url, filename='dagmc.h5m'):\n",
|
||||
" \"\"\"\n",
|
||||
" Helper function for retrieving dagmc models\n",
|
||||
" \"\"\"\n",
|
||||
" u = urllib.request.urlopen(url)\n",
|
||||
" \n",
|
||||
" if u.status != 200:\n",
|
||||
" raise RuntimeError(\"Failed to download file.\")\n",
|
||||
" \n",
|
||||
" # save file as dagmc.h5m\n",
|
||||
" with open(filename, 'wb') as f:\n",
|
||||
" f.write(u.read())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
|
|
@ -467,7 +439,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"download(pin_mesh_url, \"pins1-4.h5m\")\n",
|
||||
"umesh = openmc.UnstructuredMesh(filename=\"pins1-4.h5m\")\n",
|
||||
"umesh = openmc.UnstructuredMesh(\"pins1-4.h5m\")\n",
|
||||
"mesh_filter = openmc.MeshFilter(umesh)"
|
||||
]
|
||||
},
|
||||
|
|
@ -893,7 +865,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We hope you've found this example notebook useful. More unstructured mesh features are under development and will be included in additional examples soon."
|
||||
"We hope you've found this example notebook useful!"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"unstructured_mesh = openmc.UnstructuredMesh(filename=\"manifold.h5m\")\n",
|
||||
"unstructured_mesh = openmc.UnstructuredMesh(\"manifold.h5m\")\n",
|
||||
"\n",
|
||||
"mesh_filter = openmc.MeshFilter(unstructured_mesh)\n",
|
||||
"\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue