Skip to content
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
42 changes: 24 additions & 18 deletions .github/workflows/test_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,54 +40,60 @@ jobs:
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task1.ipynb
conda run python task1.py
jupyter-nbconvert --to python task01.ipynb
conda run python task01.py

- name: Run Task 2
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task2.ipynb
conda run python task2.py
jupyter-nbconvert --to python task02.ipynb
conda run python task02.py
- name: Run Task 3
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task3.ipynb
conda run python task3.py
jupyter-nbconvert --to python task03.ipynb
conda run python task03.py
- name: Run Task 4
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task4.ipynb
conda run python task4.py
jupyter-nbconvert --to python task04.ipynb
conda run python task04.py
- name: Run Task 5
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task5.ipynb
conda run python task5.py
jupyter-nbconvert --to python task05.ipynb
conda run python task05.py
- name: Run Task 6
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task6.ipynb
conda run python task6.py
jupyter-nbconvert --to python task06.ipynb
conda run python task06.py
- name: Run Task 7
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task7.ipynb
conda run python task7.py
jupyter-nbconvert --to python task07.ipynb
conda run python task07.py
- name: Run Task 8
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task8.ipynb
conda run python task8.py
jupyter-nbconvert --to python task08.ipynb
conda run python task08.py
- name: Run Task 9
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task9.ipynb
conda run python task9.py
jupyter-nbconvert --to python task09.ipynb
conda run python task09.py
- name: Run Task 10
shell: bash -l {0}
run: |
cd tasks
jupyter-nbconvert --to python task10.ipynb
conda run python task10.py
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@

## Contents

[Task 1](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task1.ipynb): Simple hydrogen transport simulation
[Task 1](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task01.ipynb): Simple hydrogen transport simulation

[Task 2](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task2.ipynb): Simulation of a Thermo-Desorption experiment
[Task 2](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task02.ipynb): Simulation of a Thermo-Desorption experiment

[Task 3](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task3.ipynb): Simple permeation model
[Task 3](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task03.ipynb): Simple permeation model

[Task 4](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task4.ipynb): Permeation barrier modelling
[Task 4](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task04.ipynb): Permeation barrier modelling

[Task 5](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task5.ipynb): Post-processing and visualisation
[Task 5](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task05.ipynb): Post-processing and visualisation

[Task 6](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task6.ipynb): Advection-diffusion problem
[Task 6](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task06.ipynb): Advection-diffusion problem

[Task 7](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task7.ipynb): Heat transfer simulation
[Task 7](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task07.ipynb): Heat transfer simulation

[Task 8](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task8.ipynb): CAD integration
[Task 8](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task08.ipynb): CAD integration

[Task 9](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task9.ipynb): Integration with the HTM library
[Task 9](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task09.ipynb): Integration with the HTM library

[Task 10](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task10.ipynb): Fitting a TDS spectrum

## Getting started

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- matplotlib==3.7.1
- pip>=20.1
- pip:
- festim==1.1.1
- festim==1.2
- matplotlib==3.7.1
- meshio[all]
- pyparsing
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
festim==1.1.1
festim==1.2
matplotlib==3.7.1
meshio[all]
pyparsing
Expand Down
55 changes: 31 additions & 24 deletions tasks/task1.ipynb → tasks/task01.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": 85,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 86,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -61,24 +61,24 @@
"source": [
"## 1. Mesh\n",
"\n",
"FESTIM simulations need a mesh. FESTIM provides support for simple 1D meshes. More complicated meshes can be imported from external software (see [Task 7](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task7.ipynb)).\n",
"FESTIM simulations need a mesh. FESTIM provides support for simple 1D meshes. More complicated meshes can be imported from external software (see [Task 7](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task07.ipynb)).\n",
"\n",
"The most straightforward mesh is `MeshFromVertices`, which takes a `vertices` argument.\n",
"Here's a simple mesh with 4 cells:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 87,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<festim.meshing.mesh_from_vertices.MeshFromVertices at 0x7f73754f72d0>"
"<festim.meshing.mesh_from_vertices.MeshFromVertices at 0x7f6f99443bf0>"
]
},
"execution_count": 3,
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 88,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -130,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 89,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -157,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 90,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -189,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 91,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 92,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -252,12 +252,12 @@
"\n",
"> Note:\n",
">\n",
"> Transient simulations can be accelerated with adaptive stepsize. See [Task 2](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task2.ipynb)"
"> Transient simulations can be accelerated with adaptive stepsize. See [Task 2](https://github.com/festim-dev/FESTIM-workshop/blob/main/tasks/task02.ipynb)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 93,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -286,18 +286,18 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 94,
"metadata": {},
"outputs": [],
"source": [
"results_folder = \"task1\"\n",
"results_folder = \"task01\"\n",
"my_model.exports = [\n",
" F.XDMFExport(\n",
" field=\"solute\",\n",
" filename=results_folder + \"/hydrogen_concentration.xdmf\",\n",
" checkpoint=False # needed in 1D\n",
" ),\n",
" F.TXTExport(field=\"solute\", times=[0.1, 0.2, 0.5, 1], label=\"mobile_concentration\", folder=results_folder)\n",
" F.TXTExport(field=\"solute\", times=[0.1, 0.2, 0.5, 1], filename=results_folder+\"/mobile_concentration.txt\")\n",
"]"
]
},
Expand All @@ -313,7 +313,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 95,
"metadata": {},
"outputs": [
{
Expand All @@ -325,7 +325,7 @@
"Defining source terms\n",
"Defining boundary conditions\n",
"Time stepping...\n",
"100.0 % 2.0e+00 s Ellapsed time so far: 0.4 s\n"
"100.0 % 2.0e+00 s Ellapsed time so far: 0.7 s\n"
]
}
],
Expand All @@ -349,7 +349,14 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 96,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -391,21 +398,21 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 97,
"metadata": {},
"outputs": [],
"source": [
"my_model.settings.transient = False\n",
"my_model.dt = None\n",
"\n",
"my_model.exports = [\n",
" F.TXTExport(field=\"solute\", label=\"mobile_concentration_steady\", folder=results_folder)\n",
" F.TXTExport(field=\"solute\", filename=results_folder+\"/mobile_concentration_steady.txt\")\n",
"]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 98,
"metadata": {},
"outputs": [
{
Expand All @@ -429,7 +436,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 99,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -471,7 +478,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.12.0"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
File renamed without changes.
File renamed without changes.
Loading