PUReIBM / PS3D

Particle-Resolved Uncontaminated-fluid Immersed Boundary Method in 3D Pseudo-Spectral Implementation
GNU General Public License v3.0
13 stars 9 forks source link

1) DESCRIPTION

PUReIBM-PS3D is a three-dimensional psudeo-spectral particle-resolved direct numerical simulation solver for detailed analysis of homogeneous fixed and freely evolving fluid-particle suspensions. PUReRIBM-PS3D is a continuum Navier-Stokes solver based on Cartesian grid that utilizes Immeresed Boundary method to represent particle surfuces.

2) REQUIRED PACKAGES

In PUReIBM-PS3D, Fourier transforms are handles using the FFTW library. Therefore, it is required that this package be downloaded from "www.fftw.org" website and compiled as prior to compiling PUReIBM. It is recommended that the latest version of FFTW be used for this purpose. Then, the address to the "include" directory of the FFTW should be modified on top of the file "SRC/FLO/fftw3_interface.F90". Note that in the serial and parallel modes, the files "fftw3.f03" and "fftw3-mpi.f90" should be used.

The parallelization of PUReIBM-PS3D is done by two-dimensional domain decomposition technique along the y and z directions in the physical space. This domain decomposition technique is currently the state of the art and highly for performing scalable fast Fourier transform on coputer clusters. In PUReIBM-PS3D, PFFT library is used to handle paralleization of FFTW that can be downloaded from the websites "https://www-user.tu-chemnitz.de/~mpip/software.php.en#pfft" or "https://github.com/mpip/pfft". You need to compile this package after FFTW because it is built on FFTW. Then, the address to the "include" directory of the PFFT should be modified on top of the file "SRC/FLO/fftw3_interface.F90".

3) COMPILATION

One list of file dependencies and two scripts are used to generate the makefile required for compiling PUReIBM-PS3D. The files lists are "src_flo_scal" and "src_post" that which inlclude the name of files needed for compiling, respectively, the main code and post-processor. If any additional file is added in future to the source code, it should also be included in these file lists.

The first script that is used to generate the makefile is called "xdomake" that is the main directory. It calls another script called "domake" that is localted in the folder "DOMAKE". Prior to compiling the code, it is required that the path to FFTW library directory in front of "FFTW_LIBDIR", the path to PFFT lirary directory in front of "ADD_LIBDIR", and aslo the path to MPI lirary directory "MPI_LIBDIR" be changed in "domake" file. Note that we have successfully compiled and tested PUReIBM_PS3D with Intel FORTRAN compiler. On machinse where several fortran compilers are installed, it is always safe to explicitly define the path to the compiler and linker in the "domake" file in fromt of "CC" and "LINK".

Once the "domake" file is modified, the makefiles can be generated by running the follwing in the main folder:

./xdomake OPTIM flo_scale ibm.exe ifc

In the above command, "OPTIM" means optimal mode. If the debug mode compilation is needed, it should be replace with "DEBUG". "flo_scal" refers to the file list "src_flo_scal". If you intend to generate the makefile for post-processor, replaec it with "post". "ibm.exe" is the name of the executable file. "ifc" is the name of the compiler that refers to Intel FORTRAN compiler. In the "DOMAKE" folder, there is a file titles "f77_opt_ifc" that defines the switches known by Intel compiler. There are also other files that contain switches for other compilers such as gfortran, path, Portland Group, but they have not been tested for PUReIBM-PS3D. The script also asks if the makefile for parallel simuation is needed to gnerate. Once the make files are made, the code is compiled as:

make -f MAKE/OPTIM_ifc_makeflo_scal

If everything goes well, an execution file is generated in the main folder.