Key Information

Register
Submit
The challenge is finished.

Challenge Overview

We have improved the Nemoh https://github.com/lawsonro3/Nemoh - A frequency-domain potential flow hydrodynamics code developed by École Centrale de Nantes that has recently been released under the Apache 2.0 license.

In this challenge, we have several objectives to be achieved:

  • The 1st objective is to simplify I/O and make Nemoh more robust with respect to future developments. The actual model for input parameters is to use a bunch of ASCII files. 4 files are needed to run Nemoh. Concerning the output and intermediate computations, there is also numerous text files that are written in different directories and in a format that is not always suitable for later use of results in Matlab. We can count 6 files created by the preprocessor, 7 files created by the solver and 2 other files are for the moment written by the postprocessor. This is a lot... Beside that, file path delimiters are hard coded and tailored for Windows, making the code not portable
    • We will apply HDF5 for input and output of Nemoh. Here is a short HDF5 Python implementation youtube video: https://www.youtube.com/watch?v=hnhN2_TpY8g
    • The idea behind HDF5 is that it behaves just like a filesystem embedded in a single binary file. The hierarchical structure of the data model associated to HDF5 make it usable to organize heterogeneous data in a single file. There is three main kind of objects in HDF5 : groups, datasets and attributes. Groups are similar to directories and permit to store together arbitrary number of other groups or datasets that are similar to files. Datasets can store arrays of arbitrary dimension and data type. With that two objects, we can easily arrange our input parameters inside an 'input' group and store datasets inside subgroups for better clarity. Finally, both of groups and datasets can handle an attribute. This special object can handle metadata. It is usable to store information about the object it is attached. By doing so, we can for example document datasets on unit used, nature of the data... It makes an HDF5 file self-descriptive. Virtually no need to consult the documentation to know what we are dealing with. Beside that, Hdfview is a software developed by the Hdfgroup. It allows to open an HDF5 file, visualize its hierarchical structure, datasets, plot some graphs with data for result preview, modify input data, visualize attributes .
  • The 2nd objective is more update the structure of Nemoh and the way I/O are managed in the code. We would like only the expensive parts of the code to be kept in Fortran and that code should only do computations, not I/O. One great thing would be to wrap these computation kernels with Python. Python is easy and really quick to implement and modify (no need to compile, it is interpreted). Python would be in charge of all the I/O, and of the application management, acting as a glue between computation components.
    • To the same extent, preprocessing and postprocessing module would be re-written in Python in order to make the code more flexible for future enhancements.
    • Besides that, a set of python functions could be written to allow extraction and conversion of result data for use in visualization softwares, numerical computing environment or other specialized  : Paraview, Tecplot, Matlab, Python itself, Orcaflex, etc...
    • The Fortran code would be compiled into python modules (basically shared libraries) using f2py. Doing this way, Nemoh would just become a python module and its subroutines would be callable from python. It would make it easier to integrate Nemoh in other larger piece of software if needed.
    • Python has a great module called h5py which permits to use manage I/O in Python. This is a nice module as it make it easy to use HDF5. One good reference for using h5py is the book of Andrew Colette : "Python and HDF5" from O'Reilly. We also welcome the other suggestions and ideas.
  • Regarding the output data from Nemoh, the good practice is not to dissociate output data from input data that have been used in order to always keep track of the whole informations about a computation. Nemoh would then output its results in a 'result' group located at the same level as the 'input' group. Other subgroups could be used for example to store apart intermediate results that could be erased after the solver has been run (data quickly reproducible from the preprocessor for example).


Final Submission Guidelines

Submission:

  • The source code
  • A detailed deployment guide with all deployment steps and all verifications (using HDFView to verify the input and output HDF5 structures is required).

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30046341