CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   REEF3D (https://www.cfd-online.com/Forums/reef3d/)
-   -   REEF3D FAQ (https://www.cfd-online.com/Forums/reef3d/234658-reef3d-faq.html)

kamath March 14, 2021 11:58

Reef3d faq
 
What pre-requisites do I need to install and execute REEF3D?
To install and execute REEF3D, you need to have installed the GNU GCC compilers (gcc, g++, gfortran) and the MPI wrapper (OpenMPI).
In addition, REEF3D uses the following third-party external dependencies:
Hypre: highly parallel nonlinear solvers from Lawrence Livermore National Labaratories (https://github.com/hypre-space/hypre)
Eigen: template library for linear algebra


What operating systems/ computers can I install REEF3D on?
You can install REEF3D on computers with a UNIX operating system or have UNIX features. This includes Mac OS, Ubuntu and other flavours of Linux and on Windows 10 using the Ubuntu app.

Do I need to download the third-party software?

You will need to download Hypre from the Github link above.
Eigen, on the other hand, is provided in the zip folder that you download.

How can I access the latest version of REEF3D?
REEF3D is hosted as a public repository on Github. You can download the latest version from https://github.com/REEF3D/REEF3D. Here, click on the green button at the right top corner, that says Code and download the zip from the dropdown menu.

Once I have downloaded the required files, how do I install REEF3D?
A detailed screencast explaining the steps involved in the installation process and some basic operations in the Ubuntu terminal are provided here: https://reef3d.wordpress.com/installation/
Other than the steps required to install the Ubuntu app, the procedure for installation is the same for Mac OS and Linux users and you can follow the steps from video no. 6 in the link above.
In short: Use the terminal to navigate to the location of the REEF3D folder and once inside this folder, use the command:
make -j n
where n is the number of cores on your computer. On successful compilation of the program, a folder named bin is created that holds the reef3d executable.

How do I install REEF3D on a cluster/ high-performance machine?
In this case, the procedure depends on the management strategy used for the high-performance machine. You will need to contact your local system administrator to find out how modules that provide the GNU GCC compilers and Hypre can be made available to you. From there on, make a copy of the Makefile provided and rename it to say Makefile_copy:
Mv Makefile Makefile_copy
Change the paths relating to Hypre and compile the code using:
make -j n -f Makefile_copy (use "-j n" only if the cluster permits parallel compilation)

How do I generate the mesh for my simulations in REEF3D?
DIVEMesh is the mesh-generating software used to generate the mesh for REEF3D. A similar FAQ for DIVEMesh is available.

How do I set the boundary conditions for my simulation?
The boundary conditions are set in the input file control.txt, which is read by DIVEMesh. Please refer to the FAQ on DIVEMesh for this.

How do I define the numerical methods, wave generation and other simulation parameters?
This input is provided to REEF3D using the file ctrl.txt. Refer to the User Guide for REEF3D to explore the options available to you. You can also use the example files provided in the folder Tutorials in your downloaded REEF3D folder as a template to setup your simulation.

What do the four filled/empty circles before every command in the REEF3D User Guide stand for?
The hydrodynamic model REEF3D currently has four main modules which have different governing equations. The CFD model (Navier-Stokes Equations), the FNPF model (Laplace equations), SFLOW (Shallow water/ Saint Venant equations) and NSEFLOW (single-phase Navier-Stokes equations). The four circles stand for S F N C (written at the start fo every chapter), standing for SFLOW, FNPF, NSEFLOW and CFD respectively. A filled circle signifies that the particular command is valid for that module.
Eg. B 91 has four filled circles and is valid for all the four modules.
On the other hand A 241 has a filled circle only for S- denoting that it is valid only for the SFLOW module.


What does a star beside a command (eg for P 51) in the REEF3D User Guide stand for?
The star beside a command denotes that the command can be called multiple times. For eg. To place multiple wave gauges, using the example of P 51.
All other commands (which don’t have a star beside them) will be overwritten by the last input that is given to the command. Eg. In a file with two occurrences of B 91, the input from the last call of B 91 will be the final accepted input.

Can I make comments in the input file?
Yes, you can include comments to make notes to yourself using the // symbol. Anything following that symbol will not be read.

Is it possible to deactivate a command without removing it from the input file?
Yes, you can deactivate a command by using small letters in place of the capital letters.
Eg. B 91 0.04 5.0 -> will be read as input, whereas b 91 0.04 5.0 -> will be ignored.


How do I include floating structures in the simulation domain? Can I input a structure I create myself using a CAD software?
The X commands in REEF3D relate to floating structures. You can create a complex structure using the primitive soilds available inn REEF3D. You also have the option to include an STL file generated by a CAD software that defines your floating object. Please remember that the file has to be in the ASCII format. In case you need to convert an STL file from binary to Ascii, open the file in paraview and use the File> Save Data option, chose file type STL and select ASCII when prompted.
The stl file needs to be named floating.stl to be recognised as a floating body in REEF3D.

How do I visualise the results from REEF3D?
The output from REEF3D are written into folders that have:
Text file output which can be plotted using plotting software of your choice:
eg. WSF for wave gauge data (activated using P 51),
WSFLINE for free surface location in the entire tank (activated using P 52),
VTK-based file output which are opened in Paraview:
eg. VTU (activated using P 20/ 30/ 35)
VTP (activated using P 180)
Reef3d_Solid.vtp which contains the solids in the domain

What kinds of waves can be generated in REEF3D?
REEF3D can generates a wide range of waves, including linear, nonlinear regular waves, unidirectional and multi-directional irregular waves, focused waves, etc. Wavemaker signals and wave reconstruction are also available. To see the complete catalogue of available waves, please refer to the B 92 command in the REEF3D user manual.

Where can I get more technical information about REEF3D?
All the scientific publications using REEF3D are made available in their post-script form at https://reef3d.wordpress.com/publications-reef3d/

kamath November 17, 2021 10:28

edit: the commenting feature above is currently non-functional.
Any capital letter in the file will result in the program looking for a valid command sequence

kamath March 1, 2022 04:08

edit: If you are updating REEF3D or DiveMESH to a new version using
Code:

git pull
then remember to first use:
Code:

make clean
and then use:
Code:

make -j N
where N is the number of cores

to compile the new version of the code.
This ensures that previously created objects do not interfere with new compilation. Not doing this can under many occasions lead to unforeseen errors.

kamath March 1, 2022 04:17

When there is a new release of DiveMESH along with a new release of REEF3D, please update both of them.
In such cases, the new REEF3D is NOT backward compatible with the older DiveMESH.
Therefore, crucial to update both in the case of a double release :)


All times are GMT -4. The time now is 18:06.