Skip to content

GlobalStudents/MFC

Repository files navigation

Multi-component Flow Code (MFC)

DOI

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:

Installation

The documents that describe how to configure and install the MFC are located in the source code as CONFIGURE and INSTALL. They are also described here.

Step 1: Configure and ensure dependencies can be located

Main dependencies: MPI and Python

If you do not have Python, it can be installed via Homebrew on MacOS as:
brew install python

or compiled via your favorite package manager on Unix systems.

An MPI fortran compiler is required for all systems. If you do not have one, Homebrew can take care of this on MacOS:
brew install open-mpi

or compiled via another package manager on Unix systems.

Simulation code dependency: FFTW

If you already have FFTW compiled:

  • Specify the location of your FFTW library and include files in Makefile.user (fftw_lib_dir and fftw_include_dir)

If you do not have FFTW compiler, the library and installer are included in this package. Just:
cd installers
./install_fftw.sh

Post process code dependency: Silo/HDF5

Post-processing of parallel data files is not required, but can indeed be handled with the MFC. For this, HDF5 and Silo must be installed

On MacOS, a custom Homebrew tap for Silo is included in the installers directory. You can use it via
cd installers
brew install silo.rb

This will install silo and its dependences (including HDF5) in their usual locations (/usr/local/lib and /usr/local/include)

On Unix systems, you can install via a package manager or from source. On CentOS (also Windows 7), HDF5 binaries can be found here.

Untar this archive in your intended location via
tar -zxf [your HDF5 archive]

Silo should be downloaded here, then
tar -zxf [your Silo archive]
cd [your Silo archive]
./configure --prefix=[target installation directory] --enable-pythonmodule --enable-optimization --disable-hzip --disable-fpzip FC=mpif90 F77=mpif77 -with-hdf5=[your hdf5 directory]/include,/[your hdf5 directory]/lib --disable-silex
make
make install

Add the following line to your ~/.bash_profile:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/[your silo directory]/lib:/[your hdf5 directory]/lib

Finally:
source ~/.bash_profile

You will then need to modify silo_lib_dir and silo_include_dir in Makefile.user to point to your silo directory.

Step 2: Build and test

Once all dependencies have been installed, the MFC can be built via
make

from the MFC directory. This will build all MFC components. Individual components can be built via
make [component]

where [component] is one of pre_process, simulation, or post_process.

Once this is completed, you can ensure that the software is working as intended by
make test

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

Note that the post-processing step requires installation of Silo and HDF5.

MIT License

Copyright 2021

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgements

The development of the MFC was supported in part by multiple past grants from the US Office of Naval Research (ONR), the US National Institute of Health (NIH), and the US National Science Foundation (NSF), as well as current ONR grant numbers N0014-17-1-2676 and N0014-18-1-2625 and NIH grant number 2P01-DK043881. The computations presented here utilized the Extreme Science and Engineering Discovery Environment, which is supported under NSF grant number CTS120005. K.M. acknowledges support from the Funai Foundation for Information Technology via the Overseas Scholarship.

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%