Skip to content

Commit

Permalink
Merge pull request #27 from RemDelaporteMathurin/exercise-task-two
Browse files Browse the repository at this point in the history
Exercise for task 2
  • Loading branch information
RemDelaporteMathurin authored Jun 29, 2023
2 parents 0752ea6 + 5038417 commit f58ee36
Showing 1 changed file with 43 additions and 20 deletions.
63 changes: 43 additions & 20 deletions tasks/task2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -32,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -57,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -91,7 +91,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -136,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -188,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -217,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -251,7 +251,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -266,7 +266,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -292,7 +292,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -317,7 +317,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -329,14 +329,14 @@
"Defining source terms\n",
"Defining boundary conditions\n",
"Time stepping...\n",
"0.6 % 3.1e+00 s Ellapsed time so far: 0.4 s\r"
"0.2 % 1.0e+00 s Ellapsed time so far: 0.3 s\r"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"100.0 % 5.0e+02 s Ellapsed time so far: 13.5 s\n"
"100.0 % 5.0e+02 s Ellapsed time so far: 22.3 s\n"
]
}
],
Expand All @@ -347,7 +347,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -360,7 +360,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand All @@ -369,7 +369,7 @@
"Text(0.5, 0, 'Time (s)')"
]
},
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -402,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -425,7 +425,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"outputs": [
{
Expand All @@ -434,7 +434,7 @@
"Text(0.5, 0, 'Time (s)')"
]
},
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -474,7 +474,30 @@
"source": [
"### Task:\n",
"1) Increase the implantation temperature to 500 K and see how the TDS spectrum is affected\n",
"2) Vary the detrapping energy of the first trap"
"2) Vary the detrapping energy of the first trap\n",
"3) At the end of the implantation phase, what is the proportion of hydrogen trapped in trap 2?\n",
"\n",
" <details>\n",
" <summary>Show solution</summary>\n",
" <br>\n",
" Make use of the exported derived quantities.\n",
"\n",
" We computed the hydrogen inventory in traps 1, 2 and 3 as well as the mobile inventory.\n",
"\n",
" ```python\n",
" t = derived_quantities.t\n",
" trap_1 = derived_quantities.filter(fields=\"1\").data\n",
" trap_2 = derived_quantities.filter(fields=\"2\").data\n",
" trap_3 = derived_quantities.filter(fields=\"3\").data\n",
" mobile = derived_quantities.filter(fields=\"solute\", instances=F.TotalVolume).data\n",
" total = derived_quantities.filter(fields=\"retention\").data\n",
"\n",
" plt.stackplot(t, trap_1, trap_2, trap_3, mobile)\n",
" ```\n",
"\n",
" Try to run it!\n",
"\n",
" </details>\n"
]
}
],
Expand Down

0 comments on commit f58ee36

Please sign in to comment.