Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Hydrodynamics Adaptive Mesh Refinement Simulator (HAMeRS) for compressible multi-species/multi-phase simulations

License

NotificationsYou must be signed in to change notification settings

mlwong/HAMeRS

Repository files navigation

mlwong

HAMeRS is a compressible Navier-Stokes/Euler solver with the patch-based adaptive mesh refinement (AMR) technique. The parallelization of the code and all the construction, management and storage of cells are facilitated by theStructured Adaptive Mesh Refinement Application Infrastructure (SAMRAI) from theLawrence Livermore National Laboratory (LLNL).

The code consists of various explicit high-order finite difference schemes including the WCNS's (Weighted Compact Nonlinear Schemes) for capturing shock waves, material interfaces, and turbulent features, and also the kinetic-energy-preserving (KEP) schemes for large-eddy simulations with subgrid-scale models. The AMR algorithm implemented is based on the one developed by Berger et al.

How do I get set up?

Git is used for the version control of the code. To install Git on Debian-based distribution like Ubuntu, try apt-get:

sudo apt-get install git-all

To compile the code, in general all you need is to useCMake. For example, after cloning the repository withgit clone:

cd HAMeRSmkdir buildcd buildcmake ..make

The compilers to be used to compile C, C++ and Fortran parts of HAMeRS can be chosen by setting the environment variablesCC,CXX andF77 respectively before running CMake. For example, to use the default MPI compilers, you can run:

export CC=mpiccexport CXX=mpicxxexport F77=mpif77

To run the code, you need to provide the input file:

src/exec/main <input filename>

To restart a simulation, you need to provide restart directory and restore number in addition to the input file:

src/exec/main <input filename> <restart dir> <restore number>

To run the code in parallel, you need MPI. You can try mpirun:

mpirun -np <number of processors> src/exec/main <input filename>

What libraries do I need?

HAMeRS relies onHDF5,Boost andSAMRAI. Before installing HAMeRS, it is required to set up the environment variables forCMake to look for the locations of the libraries.

To set up HDF5:

export HDF5_ROOT=<path to the directory of HDF5>

To set up Boost:

export BOOST_ROOT=<path to the directory of Boost>

To set up SAMRAI:

export SAMRAI_ROOT=<path to the directory of SAMRAI>

HAMeRS has already been successfully tested with HDF5-1.8, Boost-1.60 and SAMRAI-3.11.2.

Note that SAMRAI does not depend on the Boost library anymore since version 3.12.0. Please install HAMeRS without Boost library dependency using the CMake flag-DHAMERS_USE_BOOST=OFF when SAMRAI verison is equal to or greater than 3.12.0.

How do I change the problem?

To change the problem that you want to run for an application, e.g. the Euler application, just simply link the corresponding initial conditions cpp symlink (EulerInitialConditions.cpp insrc/apps/Euler) to the actual problem file usingln -sf <absolute path to .cpp file containing problem's initial conditions> EulerInitialConditions.cpp. If the problem has special boundary conditions, the user can supply the boundary conditions withln -sf <absolute path to .cpp file containing problem's user-coded boundary conditions> EulerSpecialBoundaryConditions.cpp. There are some initial conditions and boundary conditions files from different example problems in theproblems folder.

Are there more tips and tutorials on how to compile and run the code?

Please have a look at theWiki page.

Who do I talk to?

The code is managed by the previous PhD graduate Man-Long Wong (mlwong@alumni.stanford.edu) of theFlow Physics and Aeroacoustics Laboratory (FPAL) at theDepartment of Aeronautics and Astronautics ofStanford University.

Copyright

HAMeRS is licensed under a GNU Lesser General Public License v3.0.

If you find this work useful, please consider citing the author's dissertation:

@phdthesis{wong2019thesis,title={High-order shock-capturing methods for study of shock-induced turbulent mixing with adaptive mesh refinement simulations},author={Wong, Man Long},year={2019},school={Stanford University}}

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp