PTetraWorkshop

Teaching materials for PTetra workshop (https://4dspace-uio.github.io/PTetraWorkshop/)

View the Project on GitHub

Welcome to the PTetra Workshop

Universities already excel at teaching knowledge. In this workshop, however, we aim to teach you the practical skills necessary for applying simulations in your own space or plasma-related research. This will complement the theoretical background of the computational scientist, but there is also no reason for experimentalists or theorists to put up with uncertain assumptions. We believe you do not have to be a computational scientist to use simulations, in much the same way you don’t have to be a theoretician to use equations. In this workshop, we provide you with a tool to complement your other methods, and to go beyond their limitations. Rather than giving a vague overview of many tools, we focus on providing working knowledge from beginning to end with one tool: PTetra.

About PTetra

PTetra is an electrostatic, high performance Particle-In-Cell (PIC) code, with support for complex geometries through the use of an unstructured mesh. Its main purpose is the study of spacecraft-environment interactions.

Cylinder

Disclaimer: PTetra is Prof. Richard Marchand’s property, but is provided for the participants to use, with the belief that it will be instructive and useful. The correctness of the results obtained with PTetra relies in part on the skill of the user, and in any case, we take no responsibility for your results. Any use of PTetra leading to publication should cite the following two papers:

  1. Marchand - PTetra, a Tool to Simulate Low Orbit Satellite-Plasma Interaction
  2. Marchand, Lira - Kinetic Simulation of Spacecraft-Environment Interaction

Dates

There will be three or four sessions, first with a presentation followed by some hands-on:

Dates:

  1. 25.01.2022
  2. 27.01.2022
  3. 01.02.2022
  4. 03.02.2022

Time: 15:00 - 17:00 CET

Session 1 (25.01.2022):

Time Talk/assignment  
15:00 - 15:30 CET Introduction to the PTetra Workshop (slide link, video link) Dr. Sigvald Marholm, UiO, Norway
15:30 - 17:00 CET Mesh generation with Gmsh (slide link, video link) Dr. Sayan Adhikari, UiO, Norway
  Hands-on, part1  

Session 2 (27.01.2022):

Time Talk/assignmet  
15:00 - 17:00 CET Introduction to PIC and PTetra (slide link, video link) Prof. Richard Marchand, University of Alberta, Edmonton, Canada
  Hands-on, part2  

Session 3 (01.02.2022):

Time Talk/assignmet  
15:00 - 15:45 CET Using supercomputers for PIC (slide link, video link) Dr. Sigvald Marholm, UiO, Norway
16:00 - 16:45 CET Introduction to PIC and PTetra, continued (slide link,video link) Prof. Richard Marchand, University of Alberta, Edmonton, Canada
  Available for support  

Session 4 (03.02.2022):

Time Talk/assignmet  
15:00 - 15:45 CET Post-processing (slide link, video link) Dr. Sigvald Marholm, UiO, Norway
16:00 - 16:45 CET Which parameters to simulate (slide link, video link) Dr. Sigvald Marholm, UiO, Norway
  Hands-on, part 3  

Prerequisites

Installation

STEP - 1:

Install Conda

Installing on Linux

Download the Miniconda installer for Linux.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Run the installer and follow the interactive instruction.

bash Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc

Installing on macOS

Download the Miniconda installer for macOS.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

Run the installer and follow the interactive instruction.

bash Miniconda3-latest-MacOSX-x86_64.sh
source ~/.bash_profile

STEP - 2:

Clone the workshop repository

git clone https://github.com/4DSpace-UiO/PTetraWorkshop.git

Enter inside the repository

cd PTetraWorkshop

STEP - 4:

Now create a conda environment using the given environment.yml file

conda env create -f environment.yml

Activate the conda environment

conda activate ptetra

STEP - 5:

Extract the source codes for PTetra using the 7zip tool. It will ask for a password; use the password shared on email.

7za x PTetra.zip

STEP - 6:

Compile BLAS

cd BLAS-3.10.0
make
cd ..

Compile SPARSKIT

cd SPARSKIT2
make
cd ..

Compile msh2topo

cd msh2topo
make
cd ..

Copy the linked libraries

cp BLAS-3.10.0/blas_LINUX.a MPI_V50i/libblas.a 
cp SPARSKIT2/libskit.a MPI_V50i/libskit.a 

Compile PTetra

cd MPI_V50i
make
cd ..

STEP - 7:

Create symbolic links for PTetra

ln -s MPI_V50i/mptetra

Create symbolic links for msh2topo

cd Geometry
ln -s ../msh2topo/msh2topo
cd ..

STEP - 8:

Install Paraview

Installing on Linux

Download the installer for Linux preferably to $HOME Link: ParaView-5.10.0-MPI-Linux-Python3.9-x86_64.tar.gz

Extract the compressed installer.

tar -xvf ParaView-5.10.0-MPI-Linux-Python3.9-x86_64.tar.gz

Create an alias of the executable by adding the following line at the end of your .bashrc file

alias paraview='~/ParaView-5.10.0-MPI-Linux-Python3.9-x86_64/bin/paraview'
source ~/.bashrc

Installing on macOS

Download the installer for macOS.

For macOS with M1 processor (ARM) Link: ParaView-5.10.0-MPI-OSX11.0-Python3.9-arm64

For macOS with intel processor (x86_64) Link: ParaView-5.10.0-MPI-Linux-Python3.9-x86_64

Double click on the .pkg file to install.

Support or Contact

Having trouble with setting up your machines? Join our Slack workspace: PTetraWorkshop and we’ll help you sort it out.