Prerequisites

For this course knowledge of stress tensor, strong and weak form of equations, function spaces and familiarity with python/jupyter notebooks is recommended.

And to follow along with the examples, you need to install docker on your system. You need Windows 10/11 Education or Professional for this to work. This does not work on Windows 10/11 Home.

  • Docker
  • Paraview
  • CMDER (Only for Windows) (After installation, open cmder and then go to Settings(Win+Alt+P)➡import and choose the cmlab.xml provided in the repository.)

  • Google Chrome (After installation, open Chrome and paste the following in the address bar, chrome://flags/. In the flags screen, enable WebGL Developer Extensions )

Install FEniCS

Once the docker system is installed and running, open CMDER/terminal and run:

docker pull iitrabhi/fenics_notebook

Running

To start the notebook server, use the following:

docker run -p 8888:8888 -v host_system_path:/root/ -w /root/ iitrabhi/fenics_notebook

Note: you should replace the variable host_system_path with the path of the folder that contains your code. e.g., If D:\Codes contains your code, then to start the command line interface, you have to run:

docker run -p 8888:8888 -v D:\Codes:/root/ -w /root/ iitrabhi/fenics_notebook

Once you run the above command in cmder, you will get a URL starting with http://127.0.0.1:8888/lab. Press Control and click on the URL to open a new Jupyter Notebook.

To make the startup easier, you may also put the above line of code in a start_up.bat file after changing the D:\Codes to your own local directory. Also make sure that your file path has no spaces i.e. please do not name your folder with spaces. You may use _ to fill in the spaces.

If you have Windows home

You can use google collab to run FEniCS on the cloud. Open Collab, upload your notebook and paste the following in the first cell of your notebook.

try:
    import dolfin
except ImportError:
    !wget "https://fem-on-colab.github.io/releases/fenics-install-real.sh" -O "/tmp/fenics-install.sh" && bash "/tmp/fenics-install.sh"
    import dolfin

https://fem-on-colab.github.io/packages.html