README.md 3.19 KB
Newer Older
Ron Rahaman's avatar
Ron Rahaman committed
1
MOON
Derek Gaston's avatar
Derek Gaston committed
2 3
=====

Ron Rahaman's avatar
Ron Rahaman committed
4
MOON (Multiphysics Object-Oriented Nek5000) uses the [MOOSE](http://www.mooseframework.org/) framework to implement multiphysics coupling with [Nek5000](https://nek5000.mcs.anl.gov/) CFD simulations.  The project is a collaboration between [Idaho National Laboratory](https://www.inl.gov/) and [Argonne National Laboratory](https://www.inl.gov/).
Derek Gaston's avatar
Derek Gaston committed
5

Ron Rahaman's avatar
Ron Rahaman committed
6 7 8 9 10 11 12 13 14 15

Downloading the Repo
--------------------
Cloning the MOON repository requires the `--recursive` flag, since MOOSE and libmesh are included as [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules).  For example:
```
git clone --recursive https://xgitlab.cels.anl.gov/nek5000/moon.git
```
This will download and populate the src/moose and src/moose/libmesh.


Ron Rahaman's avatar
Ron Rahaman committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Building PETSc
--------------
MOON requires PETSc, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/).  PETSc is not distributed with MOON.  PETSc must either be compiled from source or installed as part of the MOOSE Environment package.  After installing PETSc, you must define the `$PETSC_DIR` variable in your environment.


Building libmesh
----------------
MOON also requires libmesh, as described in the [MOOSE installation instructions](http://mooseframework.com/getting-started/).  The libmesh source code is distributed with MOOSE.  It should be compiled using the following scripts:
```
$ cd moose/
$ scripts/update\_and\_rebuild\_libmesh.sh.  
```
After installing libmesh, you must define the `$LIBMESH_DIR` in your environment.


Building and Running the Example Problems
-----------------------------------------
MOON is distributed with scripts for building and runninhg coupled example problems.  To build and run a given example (e.g.: "integration\_example"), use the following commands:
```
$ cd examples/integration_example/
$ ../../scripts/build_coupled_nek.sh
$ ../../scripts/run_coupled_nek.sh
```
Note that the build and run scripts must be executed from the example subdiretory.


Ron Rahaman's avatar
Ron Rahaman committed
42 43 44 45 46 47 48 49 50 51
Developing Nek5000 in MOON
--------------------------
Developers may freely modify src/Nek5000 as if it were a normal part of the MOON repo.  This is because Nek5000 is included as a Git subtree (rather than a submodule).  For routine commits, pushes, and pulls to the MOON repository, no extra Git commands are necessary.

With some additional Git commands, developers may easily merge upstream changes from [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000) into src/Nek5000.  Finally, developers may also request to merge changes from src/Nek5000 to [https://github.com/Nek5000/Nek5000](https://github.com/Nek5000/Nek5000). This [blog post](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/) from Atlassian gives a brief rundown of the procedures.  


Developing MOOSE and libmesh in MOON
------------------------------------
Modifying src/moose and src/moose/libmesh require additional Git commands, since they are included as Git submodules (rather than subtrees).  Modifying either of these libraries for MOON is intended to be unnecessary.  Should the situation arise, this [chapter](https://git-scm.com/book/en/v2/Git-Tools-Submodules) from _Pro Git_ describes the procedure for making modifications to submodules.