Getting started
Installation and running
Install FEniCS 2019.2.0 .
Download MilleFEuiIle from GitHub repository or Zenodo .
Follow the Tutorials.
Launch the code using the predefined bash script
run_MilleFEuiIle.sh.
bash run_MilleFEuiIle.sh &
In the script, define the name of the current parameter file (e.g., m_parameters_europa.py),
the number of cores to be used for the computation, the way of queueing in case of a parametric study,
orthe maximum number of cores the script can occupy.
Succesful launch in the foreground generates output on the screen. In case of running in the background, it returns something like this
[1] 816928
The number in brackets is the PID (process ID) of the bash script, not the python code. It can be used to stop the simulation (see below), but only until the user logs out.
The script then renames the main file and the terminal output accordingly (main_europa.py, europa.out and europa_e.out),
and runs the simulation on background or foreground, as selected.
Stopping the simulation
The way of stopping the simulation may depend on the way it was launched. If a single simulation was selected (loop=0), the bash script ends quickly and only the python code continues running. In such case, there are two options
The proper way to stop simulation is to identify the simulation using the command
htopand searching by its name.Another option is to call
pkill python, if no other simulation can be affected.
However, if the simulations were launched in a loop (loop=1) or (loop=2), the bash script needs to be terminated first.
kill -9 %nwherenis the number from the brackets (see above)using
htopand searching forrun_MilleFEuiIle
Finally, the remaining python code needs to be stopped, following the same procedure as described above (htop or pkill python).
Visualization
For visualization of the mesh data, use Paraview, or the example matplotlib scripts in Tutorials.
Attention
Note that even though the simulation may run in parallel, the plotting scripts need to be ran on a single core using python plot_demo*.py.
File tree
When running the code, the following tree is created:
/data_name
├── /HDF5
│ ├── /meshes
│ ├── data.h5
│ ├── data_timestamp.dat
│ ├── subdomains.pvd, *.pvtu, *.vtu
│ └── mesh.h5, mesh.xdmf
├── /anim
├── /img
├── /paraview
│ ├── /initial_condition
│ └── *.h5, *.xdmf
├── /source_code
├── /topography
├── /tracers
│ └── /trajectories (if applicable)
├── empty_cells.dat (if applicable)
├── picard_iter.dat (if applicable)
└── statistics.dat
Below, the data in individual directories are described.
/HDF5
The directory
/meshescontains files namedmesh_*.h5, which is an HDF5 file containing the mesh for each time output. These files can be used for plotting through matplotlib and cannot be opened in Paraview.The file
data.h5contains functions defined inparaview_outputparameter, but always at least those that are needed for restarting the computation. Data from this file are used for plotting and reloading the simulation.The file
data_timestamp.datcontains information about the steps when the data were written (time, simulation step, position in HDF5 file)Files starting
subdomains*contain Paraview-readable format of the subdomains, which enables to check whether the boundaries were defined and recognized correctly.Files
mesh.h5andmesh.xdmfcontain mesh in Paraview-readable format.
/anim and /img
These are auxiliary directories that are used in case of plotting images and making animations from the results.
When running the plotting scripts provided with the tutorials, images are placed to data_name/img/, while animations to data_name/anim/.
/paraview
Contains pairs of
*.xdmfand*.h5for each of the physical quantities specified inparaview_output(again at least those that are needed for restarting the computation).The directory
/initial_conditioncontains quantities that were used as an initial condition and specified inparaview_output_ini
/source_code
Contains all parts of the source code needed for reproduction of the results.
/topography
Contains files the x- and y- positions of the nodes of the bottom and top boundaries.
/tracers
Contains files with all tracers’ coordinates and carried properties.
The directory
trajectoruescontains position of tracers specified insave_tracer_trajectoryin every time step of the simulation.