Each simulation is defined by three files, the .rea file, the .usr file, and the SIZE file. In addition, there is a derived .map file that is generated from the .rea file by running genmap and, optionally, the .re2 file holding binary mesh and boundary condition data that can be derived from the .rea file or generated directly by various nek-tools. For large simulations (say >100,000 elements), a .re2 file is highly recommended.
Suppose you want to run a case called “foo”. The key steps for you to do are:
- Setup your case specific files: foo.usr, foo.rea, SIZE file (you may want to take one of the examples as a template)
- Generate a mesh (this will generate a .re2 or a ??? file). More ...
- Run the domain partitioning tool genmap
- Build Nek5000. Yes, you have to this as soon as you want to run a new case or modify an existing case. Just copy ' makenek' from nek5_svn/trunk/nek to your working directory (containing foo.* and SIZE) and compile the code by issuing ' makenek foo' on the command line. This step takes usually less than one minute and will give you an executable called nek5000.
- Launch your run. Run 'nek5000' on the command line or make use of the appropriate command to start a parallel job on your machine. Several sample scripts found in nek5_svn/trunk/tools/scripts can assist in running Nek5000 from the command line and manipulating the output into logfiles for easy post-processing.
- Analyze your checkpoint data stored in your field files foo.f%05d (e.g. foo.f00001) using a viz tool (e.g. VisIt).
Probably the weakest part of the Nek project!
Contributions are always welcome. Like everything else concerning Nek, these docs are maintained by members of the Nek community, and any help is much appreciated. Contributions can be simple typo corrections or a write up of new or previously undocumented features. Some of the links below are using an earlier version and you may find some differences compared to the latest release.
- New Nek5000 manual (2010) - under construction and presently a combination of the Primer and NEKTON manuals listed below.
- Nek Primer
- NEKTON Manual (partial, c. 1990)
- dOxygen generated documentation
NEK5000 comes with various tools which can be built using the maketools script. The following main tools are currently available:
- genmap RSB partitioner
- genbox simple mesher for box geometries
- n2to3 extrude a 2D mesh in third dimension (z)
- nekmerge merge multiple meshes
- reatore2 convert a .rea file (old format) into .rea/.re2 (new format)
- amg_matlab Matlab based tool to generate AMG solver input files
- scripts shell script collection to make your life easier
Pretty old but still powerful in some situations:
Data Visualization & Post-Processing
The file format for the field files are set by parameter 66 in the .rea file. The options are as follows:
param(66) < 0 : produces a .fld file in ASCII format param(66) >=0 : produces a .f0???? file in binary format
Alternatively, param(66) can be set in the .usr file in the usrdat subroutine. This will override what was set in the .rea file. Here the protocol for manipulating param(66) is difference:
param(66) = 6 or -6 : produces a .f0???? file in binary format param(66) = 0 : produces a .fld file in ASCII format param(66) = all others : produces a .fld file in binary format
The solver can be used compute post-processing quantities (e.g. statistics, derivatives). Set the number of timesteps in the .rea file to zero to run the solver in the post-processing mode and do all the post-processing in userchk().