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
- Download, either using
git
or use the Downloads pseudo-button on the top right at https://github.com/wyldckat/CJsnappyHexMesh. - Depending on whether you're using 1.6-ext or 2.1.x, go into the respective
CJsnappyHexMesh*
folder. - Run:
wmake
- Go to the respective case folder
tutorials/SnappyTestCase-*
and there you can run one of the following 2 commands:./Allrun ./Allrun2
- Read the comments in
Allrun2
to learn the differences between the two scripts. - Reset the case folder by running:
./Allclean
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:
- Had to include:
#include "polyTopoChange.H" #include "polyTopoChanger.H"
Instead of:#include "directTopoChange.H"
- This lead to renaming the references of
directTopoChange
topolyTopoChange
. - Added references to
dynamicFvMesh
inMake/options
. - This:
boolList boundaryPoint(mesh.allPoints().size(), false);
Changed to this:boolList boundaryPoint(mesh.points().size(), false);
- 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à!
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.