Skip to content

DuMux

DuMuX documentation can be found here.

1. Load modules:

module load 2022r2
module load gcc/11.2.0
module load openmpi
module load cmake
module load python
module load intel-mkl
module load suite-sparse

And set correct environment variables:

export PATH=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/intel-mkl-2020.4.304-562z3j76h4zy26bjp5r2mrimud6fshrc/mkl/bin:$PATH
export CPATH=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/intel-mkl-2020.4.304-562z3j76h4zy26bjp5r2mrimud6fshrc/mkl/include:$CPATH
export LIBRARY_PATH=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/intel-mkl-2020.4.304-562z3j76h4zy26bjp5r2mrimud6fshrc/mkl/lib/intel64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/apps/arch/2022r2/software/linux-rhel8-skylake_avx512/gcc-8.5.0/intel-mkl-2020.4.304-562z3j76h4zy26bjp5r2mrimud6fshrc/mkl/lib/intel64:$LD_LIBRARY_PATH

export CPATH=$SUITE_SPARSE_ROOT/include:$CPATH
export LIBRARY_PATH=$SUITE_SPARSE_ROOT/lib64:$LIBRARY_PATH
Check if Suite-sparse was picked up by the compiler

If everything went well, you will see the following compilator output while compiling dune-foamgrid in step 3 below:

-- The following OPTIONAL packages have been found:

* dune-foamgrid
* QuadMath, GCC Quad-Precision Math Library, <https://gcc.gnu.org/onlinedocs/libquadmath>
* Python3
* Threads, Multi-threading library
* SuiteSparse, A suite of sparse matrix software, <http://faculty.cse.tamu.edu/davis/suitesparse.html>
* PkgConfig, Unified interface for querying installed libraries
  To find Dune module dependencies

2. Prepare folders and download sources:

cd /scratch/$USER/tools
mkdir dumux
cd dumux

2.1. Clone dune:

for module in common geometry grid localfunctions istl; do
  git clone -b releases/2.8 https://gitlab.dune-project.org/core/dune-$module.git
done

2.2. Clone dumux:

git clone -b releases/3.5 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git

Alternative source (if git page is down):

wget https://zenodo.org/record/6606582/files/dumux-3.5.0.tar.gz
tar -xvzf dumux-3.5.0.tar.gz
mv dumux-3.5.0.tar.gz dumux
rm dumux-3.5.0.tar.gz

2.3. Clone dune-foamgrid:

git clone -b releases/2.8 https://gitlab.dune-project.org/extensions/dune-foamgrid.git 

3. Configure and build:

./dune-common/bin/dunecontrol --opts=dumux/cmake.opts --builddir=$(pwd)/build all

4. Run tests:

Test 1:

cd /scratch/$USER/tools/dumux/build/dumux/examples/1ptracer
make example_1ptracer
./example_1ptracer

This will produce the following output:

...
...
...
[100%] Time step 500 done in 0.001 seconds. Wall clock time: 1.0139, time: 5000, time step size: 10
Simulation took 1.0139 seconds on 1 processes.
The cumulative CPU time was 1.0139 seconds.

Test 2:

cd /scratch/$USER/tools/dumux/build/dumux/examples/porenetwork_upscaling
make example_pnm1p_permeabilityupscaling
./example_pnm1p_permeabilityupscaling

This will produce the following output:

No parameter file given. Defaulting to 'params.input' for input file.
Reading parameters from file params.input.
PoreInscribedRadius is vertex parameter 0
PoreVolume is vertex parameter 1
PoreLabel is vertex parameter 2
ThroatInscribedRadius is element parameter 0
ThroatLength is element parameter 1
ThroatLabel is element parameter 2

Found 152 unconnected clusters.

Deleted 266 isolated elements.

*******
Warning!  1374 out of 6324 pore body radii have been capped automatically in order to prevent intersecting pores
*******
Creating generic grid from structured lattice with 8176 elements and 6324 vertices took 0.0294976 seconds.
Computed bounding box tree with 16351 nodes for 8176 grid entites in 0.00241432 seconds.
Using 'Square' as cross-sectional shape for all throats.
Using 'Sphere' as geometry for all pores.
Colored 8176 elements with 9 colors in 0.001606037 seconds.
Automatically determining side lengths of REV based on bounding box of pore network
Writing output for problem "upscaling_pnm". Took 0.11 seconds.

########################################

x-direction: Area = 1.600000e-07 m^2; Massflux = 4.734575e-13 kg/s; v_Darcy = 2.959109e-09 m/s; K = 2.959109e-13 m^2

########################################

Writing output for problem "upscaling_pnm". Took 0.17 seconds.

########################################

y-direction: Area = 1.600000e-07 m^2; Massflux = 4.656249e-13 kg/s; v_Darcy = 2.910155e-09 m/s; K = 2.910155e-13 m^2

########################################

Writing output for problem "upscaling_pnm". Took 0.094 seconds.

########################################

z-direction: Area = 1.600000e-07 m^2; Massflux = 4.348036e-13 kg/s; v_Darcy = 2.717523e-09 m/s; K = 2.717523e-13 m^2

########################################