What is the best software for quickly implement and test a Reynolds Averaged Navier-Stokes turbulence model ?
How to quickly implement and test a turbulence model?
libraries;reference request;fluid dynamics
OpenFOAM. It's really easy to implement models there, even if you do not know how to program in C++, everything is set up, and you can just follow the pattern. If you do know something about similar class interfaces/dynamic polymorphism using virtual functions, then it is exceptionally easy. Model, explicit, or implicit, will involve manipulations on fields, and in OpenFOAM, field manipulation is really simple (Open Field Operaton And Manipulation), as you can see on e.g. page 21 of the OpenFOAM programming slides. Generic programming and function overloading allows for top level coding when it comes to model development: your code looks exactly as the governing equations you are solving, or the calculation you are doing on the fields. On this level, the resulting code is automatically parallel, with a choice between various types of parallel libraries (flavorus of MPI and recently OpenMP). Testing the model is easy as well, the model will have (if you have just followed the structure of other models, existing turbulence models, viscosity models, etc, the code structure is always the same) automatically enabled run-time selectivity, which means that you can change parameters durign a run. That's from the top of my head.... there are other advantages: the library is modular, supports highly advanced topological changes on arbirary unstructured meshes (sliding interfaces, refinement, mixing planes, etc), has top notch numerical solvers... all in all: it's really cool. :)Additonal info: you can examine the hierarchy of of models here, then find a model in the source code using the locate command : locate turbulenceModel.H brings you to the source directory of the abstract base class (root class, basic type of the turbulence model), in my case it is (src/turbulenceModels/incompressible/RAS). After that, find the one that resembles your model, copy the code, rename the classes (if you are using a vim editor, try %s/oldName/newName/g in all the source files), and compile it as a part of your new library. Et voila, a new turbulence model, parallel, shiny, run-time modifiable, etc. 