MFiX

1 Overview | 2 Using | 2.1 Building | 2.2 Multicore

Overview

  • MFiX is an open-source multiphase flow solver, providing a Two-Fluid Model (TFM), a Discrete Element Model (DEM), a Particle In Cell (PIC) model, and a Hybrid model.

    • General documentation and manual.

    • As detailed in the Getting Stated MFiX is an open-source multiphase flow solver and is free to download and use. A one-time no-cost registration is required prior to downloading the software - register here and submit your account information.

Using

This application was requested specifically for a project. Due to the nature of their development pipeline it has not been installed as a general module.

Building

If you are extending the original source files, here is one possible pipeline to build your extensions:

# This example assumes using a fake project in /project/mfix_fake/ # which contains your copy of the original source in the folder: mfix-22.2.2 # Load required modules [@blog1 mfix_fake]$ gcc/12.2.0 openmpi/4.1.4 cmake/3.24.2 # Make a copy of the original source. [@blog1 mfix_fake]$ cp -R mfix-22.2.2 22.2.2_dev # Make your changes and build. [@blog1 mfix_fake]$ cd 22.2.2_dev/ [@blog1 22.2.2_dev]$ mkdir build [@blog1 22.2.2_dev]$ cd build/ [@blog1 build]$ cmake .. -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_Fortran_FLAGS="-O2 -g -Wall -Wno-tabs -fcheck=all" -DENABLE_MPI=1 -DENABLE_OpenMP=1 -DCMAKE_INSTALL_PREFIX=/project/mfix_fake/22.2.2_dev/ -- MFIX build settings summary: -- Build type = -- CMake version = 3.24.2 -- Fortran compiler = mpif90 -- Fortran flags = -O2 -g -Wall -Wno-tabs -fcheck=all -- ENABLE_MPI = 1 -- ENABLE_OpenMP = 1 -- ENABLE_CTEST = OFF -- ENABLE_COVERAGE = OFF -- The Fortran compiler identification is GNU 12.2.0 -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /apps/u/opt/gcc/12.2.0/openmpi/4.1.4/bin/mpif90 - skipped -- Performing Test ffpe_trap -- Performing Test ffpe_trap - Success -- Performing Test ffpe_summary -- Performing Test ffpe_summary - Success -- Found MPI_Fortran: /apps/u/opt/gcc/12.2.0/openmpi/4.1.4/bin/mpif90 (found version "3.1") -- Found MPI: TRUE (found version "3.1") -- Found Git: /usr/bin/git (found version "2.31.1") CMake Warning at model/cmake/MfixOptions.cmake:125 (message): Unknown CMake version Call Stack (most recent call first): model/CMakeLists.txt:629 (set_mfix_version) -- Configuring done -- Generating done -- Build files have been written to: /project/mfix_fake/22.2.2_dev/build [@blog1 build]$ make -j4 Scanning dependencies of target mfixcore [ 1%] Building Fortran object model/CMakeFiles/mfixcore.dir/dmp_modules/compar_mod.f.o [ 1%] Building Fortran object model/CMakeFiles/mfixcore.dir/funits_mod.f.o [ 2%] Building Fortran object model/CMakeFiles/mfixcore.dir/param_mod.f.o ... [ 99%] Built target mfixcore Scanning dependencies of target mfixsolver [ 99%] Building Fortran object CMakeFiles/mfixsolver.dir/model/mfix.f.o [100%] Linking Fortran executable mfixsolver [100%] Built target mfixsolver [@blog1 build]$ make install [ 99%] Built target mfixcore [100%] Built target mfixsolver Install the project... -- Install configuration: "" -- Installing: /project/mfix_fake//22.2.2_dev/mfixsolver [salexan5@blog1 build]$ cd .. [salexan5@blog1 22.2.2_dev]$ ls build doc legacy_tutorials mfixsolver PKG-INFO pyproject.toml setup.py tutorials CMakeLists.txt legacy_tests mfixgui model post_mfix queue_templates tests

If you update the source and need to rebuild:

[]$ cd /project/mfix_fake/22.2.2_dev/ [@blog1 22.2.2_dev]$ cd build/ [@blog1 build]$ rm -rf * [@blog1 build]$ cmake .. -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_Fortran_FLAGS="-O2 -g -Wall -Wno-tabs -fcheck=all" -DENABLE_MPI=1 -DENABLE_OpenMP=1 -DCMAKE_INSTALL_PREFIX=/project/mfix_fake/22.2.2_dev/ [@blog1 build]$ make -j4

Multicore

The mfixsolver can run across multiple cores/nodes - we are in the process of testing this.