2.2. MFiX Installation on Mac

MFiX is not presently not supported on M1-based Macs. (M1 may be supported in future MFiX releases.) Intel Macs are likely to work. If you have an issue running MFiX on your Mac, ask for help at Support Forum.

2.2.1. Install Anaconda

Download the Python 3, Mac version of Anaconda (~500 MB download) or Miniconda (~50 MB download). Either the Graphical Installer or Command Line Installer would work.

For instance, with the Anaconda Graphical Installer:

  1. Open up Finder and navigate to the Download directory.

  2. Double-click the downloaded file. (At the time of this writing, Anaconda3-2021.11-MacOSX-x86_64.pkg for Graphical Installer).

  3. Follow the installation guide, using the default settings.

2.2.2. Install MFiX

After installing Anaconda, install MFiX:

  1. Open a Terminal (Type “⌘-Spacebar”, type “terminal”)

  2. Browse to MFiX Download (requires registration and login)

  3. Copy the conda command

  4. Paste it in the Terminal.

Note

If you already installed MFiX, you may see the following message. Select y to confirm.

WARNING: A conda environment already exists
Remove existing environment (y/[n])? y

MFiX will be installed in a new conda environment. The process will take a few minutes to complete.

2.2.3. Install Solver Build Dependencies

Build dependencies are needed for building a Custom Solver.

Building the MFiX solver requires:

  • Fortran 2003 compiler (GFortran 4.8 or later)

  • CMake

  • For DMP support, an MPI implementation (such as OpenMPI)

For building with other compilers, or for building with DMP, see Building Custom Interactive Solver.

Homebrew is the recommended way to install MFiX build dependencies. Go to the Homebrew website and follow the installation instructions.

Once Homebrew is installed, install the build dependencies:

  1. Open a Terminal (Type “⌘-Spacebar”, type “terminal”)

  2. Run brew install gcc cmake open-mpi

2.2.4. Run MFiX

Open Terminal (if not open already), and run the following commands:

  1. Run conda activate mfix-22.1

  2. Run mfix⏎

Your prompt should look something like this:

> conda env list
# conda environments:
#
base        *  /Users/user/anaconda3
mfix-22.1      /Users/user/anaconda3/envs/mfix-22.1

> conda activate mfix-22.1
(mfix-22.1) > conda env list
# conda environments:
#
base           /Users/user/anaconda3
mfix-22.1   *  /Users/user/anaconda3/envs/mfix-22.1

(mfix-22.1) > mfix

You are now ready to proceed to the First Tutorial and Tutorials.

Note

Activating a conda environment sets certain environment variables such as PATH in the current shell. It does not create a new shell session.

You will need to activate the environment every time before running MFiX.

2.2.5. Deactivate Conda Environment

After using MFiX you can just exit to leave the Terminal session. However, if you need to deactivate the mfix-22.1 conda environment, you can do so with:

(mfix-22.1)> deactivate
>

This returns to the base conda environment.

2.2.6. Uninstall MFiX

To uninstall MFiX from a conda environment:

(mfix-22.1)> conda uninstall mfix

To remove the conda environment (if you have the environment activated, deactivate it first):

(mfix-22.1)> conda deactivate
> conda env remove -n mfix-22.1

To uninstall Anaconda entirely, remove the Anaconda directory. By default, ~/anaconda3 in your home directory. From the Terminal:

> cd ~
> rm -rf anaconda3/

Note

To learn more about managing conda environments, visit the conda documentation .