Incompact3d icon indicating copy to clipboard operation
Incompact3d copied to clipboard

Particle module remastered.

Open fangjian19 opened this issue 1 year ago • 3 comments

The new particle module now supports MPI-IO. Currently only inertial particles are included. Two examples are provided, TGV with particles, and Channel flow with consntantly injection of particle, i.e., the numerical hydrogen bubble experiment. Both are inclcude in the full ctest.

fangjian19 avatar Oct 23 '24 12:10 fangjian19

All problems raised by @mathrack have been sorted. module tested with single precision, including io and restart. new boundary condition (outflow) added to particle module.

fangjian19 avatar Oct 29 '24 12:10 fangjian19

There are plenty of unresolved comments, I think there is no need for a new review right now

mathrack avatar Oct 30 '24 10:10 mathrack

I have suggested some modifications. I have not yet looked at particle.f90. I have an error with the following build command :

rm -rf ./build/ && FC=mpif90 cmake -S ./ -B ./build -DBUILD_TESTING_FULL=on -DCMAKE_BUILD_TYPE=debug

The output is :

...
[100%] Completed 'downloadBuild2decomp'
[100%] Built target downloadBuild2decomp
-- Found MPI_Fortran: /usr/bin/mpif90 (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- X3D MPI_Fortran_COMPILER found: /usr/bin/mpif90
-- X3D MPI_VERSION found: 
-- X3D MPI FOUND: TRUE
-- X3D MPI INCL ALSO FOUND: 
-- X3D Path to mpirun /usr/bin/mpirun
-- COMP ID GNU
-- Fortran compiler name GNU
-- Fortran compiler version 13.2.0
-- Setting gfortran flags
-- Set New Fortran basic flags
-- Using mpi (default) IO backend
-- CMAKE_SOURCE_DIR: xxx/Incompact3d
-- PROJECT_BINARY_DIR: xxx/Incompact3d/build
CMake Error at examples/CMakeLists.txt:26 (add_subdirectory):
  The binary directory

    xxx/Incompact3d/build/examples/Particle-Tracking

  is already used to build a source directory.  It cannot be used to build
  source directory

    xxx/Incompact3d/examples/Particle-Tracking

  Specify a unique binary directory name.


-- Found Python3: /usr/bin/python3 (found version "3.12.3") found components: Interpreter 
-- Add Test TGV-Taylor-Green-vortex
-- Configuring incomplete, errors occurred!

Problem solved by moving Particle-Tracking from test_full

fangjian19 avatar Oct 30 '24 11:10 fangjian19

The merge will be the basic framework of the particle tracking module. The particles are only massless fluid's tracker. But the module already contains some functions for heavy particles (currently not been used), such as, fluid's force, time interpolation. Further development can be carried on within the framework. @pbartholomew08 @rfj82982 please review the particle.f90 file? @mathrack and I have gone through all other files.

fangjian19 avatar Oct 31 '24 10:10 fangjian19

LGTM. I tested with GNU/Intel/NVHPC and with GNU i have also used ADIOS2 and FFTW. Everything is working with the exception of NVHPC. There is a problem with isnan function that is not part of the standard. I think a dedicated PR will be a better way to sort the issue.

Many thanks Stefano.

fangjian19 avatar Nov 08 '24 13:11 fangjian19