2.3. Installing MFix on Windows

MFiX has been developed and tested on the following Windows versions:

  • Windows 10 (64-bit)

  • Windows 11 (64-bit)

If you have an issue running or installing MFiX on your system, ask for help at Support forum.

2.3.1. Install Miniforge3

Miniforge3 is a minimal version of the Anaconda Python distribution, which is used for many scientific computing projects. MFiX uses many supporting libraries, and the easiest way to install MFiX and its dependencies is via the conda packages hosted at conda-forge and NETL. As of the 23.4 release we recommend the Miniforge3/mamba installation over Anaconda for easier installation. (However, you may continue to use an existing Anaconda installation, see below.) Note that the terms conda package and conda environment refer generically to both Miniforge and Anaconda.

First, download the Windows version of the Miniforge3 installer (~64MB)

Next, double-click the downloaded file to run it. You can install to the default location of %UserProfile%Miniforge3 or select a different install location. Leave Create start menu shortcuts selected. It is not necessary to add Miniforge to the system PATH or register Miniforge3 as the default Python interpreter.

Miniforge is now installed. To verify, open the Start menu, and run Miniforge Prompt⏎ or use the desktop icon.

If you are upgrading from a previous version of MFiX and you already have Miniforge or Anaconda installed, you may skip this step (but see note below).

Note

If you have previously installed MFiX with Anaconda, you can continue to use your existing Anaconda installation. We are recommending Miniforge for new installations, because it is a smaller download, and it includes the mamba package manager which works much better than conda (it is a multi-threaded version, reimplemented in C++. Many scientific computing packages have switched over from Anaconda to Miniforge and mamba.)

If you are using Anaconda, we recommend installing mamba in the base environment.

C:\> conda activate base
(base)C:\> conda config --add channels conda-forge
(base)C:\> conda config --set channel_priority strict

After doing this, you can use the mamba command in place of conda. (Note that the channel name conda-forge remains unchanged). If there are problems with mamba you can always try the same command with conda instead.

2.3.2. Install MFiX

After installing Miniforge, install MFiX:

  1. Open a Miniforge prompt

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

  3. Copy the installation command.

  4. Paste it in to the Miniforge prompt.

  5. Press enter to run the command.

Note

If you have previously installed this version of MFiX, you will see the following message. Select y to confirm. This will delete the previous MFiX installation and replace it.

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

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

2.3.3. Run MFiX

Open the Miniforge prompt from the start menu or desktop icon. Then run the following commands:

  1. Run mamba activate mfix-24.2.1

  2. Run mfix⏎

Your prompt should look something like this:

C:\> mamba create -n mfix-24.2.1 mfix==24.2.1 ...

C:\> mamba env list
# conda environments:
#
base        *  C:\Users\user\miniforge3
mfix-24.2.1      C:\Users\user\miniforge3\envs\mfix-24.2.1

C:\> mamba activate mfix-24.2.1

(mfix-24.2.1) C:\> mfix

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

2.3.4. Deactivate conda environment

After using MFiX you can just exit to leave the Miniforge prompt, or just close the window. However, if you need to deactivate the mfix-24.2.1 conda environment, you can do so with:

(mfix-24.2.1) C:\> mamba deactivate
C: \>

This returns to the base conda environment.

2.3.5. Uninstall MFiX

To remove an MFiX version installed with conda, remove the conda environment (if you have the environment activated, deactivate it first):

(mfix-24.2.1) C:\> mamba deactivate
C:\> mamba env remove -n mfix-24.2.1

To uninstall Miniforge or Anaconda entirely, go to “Add or remove programs” under Windows Control Panel, and uninstall Miniforge/Anaconda.

Note

To learn more about managing conda environments, visit the conda documentation . To learn more about miniforge, see the Miniforge3 README.