/CJsnappyHexMesh

Adaptation to OpenFOAM 2.1.x of "Christoffer Järpner: Projection of a mesh on an stl surface" available at http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/ which originally was for OpenFOAM 1.6-ext.

Primary LanguageC++


Table of Contents

Description

Brought to my attention here: http://www.cfd-online.com/Forums/openfoam/105558-need-directtopochange-h.html

Source of modifications at http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/:

Original sources from OpenFOAM 2.1.x and 1.6-ext:
  • 2.1.x commit 334ec14f742f95b1198bc0de318d625fc724b5e7
  • 1.6-ext commit c04489736fa1e44c123c6d801f54044f2679bfca
This git repository was brought to you by Bruno Santos (wyldckat@github working at blueCAPE Lda).

Usage instructions

  1. Download, either using git or use the Downloads pseudo-button on the top right at https://github.com/wyldckat/CJsnappyHexMesh.
  2. Depending on whether you're using 1.6-ext or 2.1.x, go into the respective CJsnappyHexMesh* folder.
  3. Run:
    wmake
  4. Go to the respective case folder tutorials/SnappyTestCase-* and there you can run one of the following 2 commands:
    ./Allrun
    ./Allrun2
  5. Read the comments in Allrun2 to learn the differences between the two scripts.
  6. Reset the case folder by running:
    ./Allclean

Additional adaptations

Given that Christoffer Järpner's modifications were meant for 1.6-ext, there were several adaptations required for things to work with 2.1.x. Those were:

  1. Had to include:
    #include "polyTopoChange.H"
    #include "polyTopoChanger.H"
    Instead of:
    #include "directTopoChange.H"
  2. This lead to renaming the references of directTopoChange to polyTopoChange.
  3. Added references to dynamicFvMesh in Make/options.
  4. This:
    boolList boundaryPoint(mesh.allPoints().size(), false);
    Changed to this:
    boolList boundaryPoint(mesh.points().size(), false);
  5. Had to stich by hand some of the modifications to mysnappyHexMesh.C.

Whenever there was a problem during the build, I looked for the variable/class/name in 1.6-ext's folder applications/utilities using grep. Example:

grep -r "directTopoChange.H" *
Then looked at grep's output, picked out a file where the occurence was found and opened the respective file in 2.1.x. Compared the differences and voilà!

License

This is bound to the same license as OpenFOAM, namely GPLv3. Which means that you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See http://www.gnu.org/licenses/ for more information about GPL.