Skip to content

GlobalStudents/MFC

 
 

Repository files navigation

Multi-component Flow Code (MFC)

DOI YourActionName Actions Status

Welcome to the MFC! The MFC is a fully-documented parallel simulation software for multi-component, multi-phase, and bubbly flows.

Authors

This is the documentation for the MFC (Multicomponent Flow Code). The MFC is a simulation software for multi-component, multi-phase, and bubbly flows. MFC was first developed by the Colonius research group at Caltech. Now it is developed and maintained by the groups of Professors Tim Colonius, Spencer Bryngelson, and Mauro Rodriguez.

Documentation

The following codes are documented, please follow the links to see their Doxygen:

User's guide

A user's guide is included here.

MFC paper

The paper that describes the MFC's capabilities:

Related publications

Several publications have used the MFC in various stages of its development. A partial list is included here.

Refereed journal publications:

Ph.D. Disserations:

Simple Installation

To get MFC running as fast as possible without having to configure the dependencies yourself, you can follow the following steps on most UNIX-like systems. This method is best suited for development and Continous Integration (CI) workflows.

To fetch, build, and run MFC and its dependencies on a UNIX-like system, you must have installed common utilities (Tar, Wget, GNU Make, ...), Python2, Python3, Python's developement headers and libraries, a C/C++ compiler ((GCC and G++) or Clang), an MPI Fortran compiler (like Open MPI). Here are some commands for popular Operating Systems and package managers,

Package Manager Suggested Command
Aptitude (Debian-like) sudo apt install tar wget make gcc g++ python3 openmpi-* python python-dev python3-dev
Homebrew (macOS) brew install wget make python open-mpi make gcc

The following commands fetch and build the required dependencies to to the dependencies/ folder within your MFC installation. This should have no impact on your local installations of these packages.

cd dependencies
sh ./install.sh -j <num_threads>
cd ..

You can now run make -j <num_threads> on MFC to build it, and check your installation by running tests with make tests.

make -j <num_threads>
make tests

Advanced Installation

MFC is split into 3 components with (mostly) layered dependencies. The following table can be used to resolve the minimal amount of packages you are required to install and configure depending on your specific use case.

Codes Description Required Packages
Pre process Code "The pre-processor generates initial conditions and spatial grids from the physical patches specified in the Python input file andexports them as binary files to be read by the simulator." [1]
  • UNIX Utilities
  • GNU Make
  • C/C++ Compiler
  • Fortran MPI Compiler
  • Python
Simulation Code "The simulator, given the initial-condition files generated bythe pre-processor, solves the corresponding governing flowequations with the specified boundary conditions using ourinterface-capturingnumericalmethod." [1]
Post process Code "The post-processor reads simulation data and exports HDF5/Silo databases that include variables and derived variables, asspecifiedintheinputfile." [1]

[1] S. H. Bryngelson, K. Schmidmayer, V. Coralic, K. Maeda, J. Meng, T. Colonius (2020) Computer Physics Communications 4655, 107396

*Please note that Silo depends on HDF5.

Once you have decided on which dependencies you want to install, you can:

  • Build them from source
  • Obtain them through your package manager
  • Modify and run the install.sh script above

You can now modify the Makefile.user file at the root of MFC's source tree to specify the paths to those packages' binaries and header files, as well as to supply additional command line arguments.

Variable Description
FC Binary to execute to compile and preprocess Fortran files.
FFLAGS Command-line arguments to supply to your Fortran compiler of choice.
lapack_lib_dir Path to the Lapack's install location.
fftw_lib_dir Path to the parent folder containing FFTW's binaries (/lib).
fftw_include_dir Path to the parent folder containing FFTW's header files (/include).
silo_lib_dir Path to the parent folder containing Silo's binaries (/lib).
silo_include_dir Path to the parent folder containing Silo's header files (/include).

You can now run make -j <num_threads> on MFC to build it, and check your installation by running tests with make tests.

make -j <num_threads>
make tests

Running

The MFC can be run by changing into a case directory and executing the appropriate Python input file. Example Python input files can be found in the example_cases directories, and they are called input.py. Their contents, and a guide to filling them out, are documented in the user manual. A commented, tutorial script can also be found in example_cases/3d_sphbubcollapse/ MFC can be executed as

python pre_process

which will generate the restart and grid files that will be read by the simulation code. Then

python simulation

will execute the flow solver. The last (optional) step is to post treat the data files and output HDF5 databases for the flow variables via

python post_process

License

Copyright 2021. MFC is under the MIT license (see LICENSE file for full text).

Acknowledgements

The development of the MFC was supported in part by multiple current and past grants from the US Office of Naval Research (ONR), the US National Institute of Health (NIH), and the US National Science Foundation (NSF). MFC computations utilize the Extreme Science and Engineering Discovery Environment (XSEDE), under allocations TG-CTS120005 (PI Colonius) and TG-PHY210084 (PI Bryngelson) and ORNL Summit under allocation CFD154 (PI Bryngelson).

About

High-fidelity multiphase flow simulation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Fortran 77.6%
  • Python 21.9%
  • Other 0.5%