Sig Turbomachinery Utilities Cylindrical Coordinate System Converters
Converting data to cylindrical coordinates is a common need in Turbomachinery applications. This is a simple converter that does just that!
The converter is available from the SourceForge.NET site http://openfoam-extend.wiki.sourceforge.net/ through a Subversion source code repository.
The converters source code currently resides in the Breeder section of the repository, under the TurboMachinery OpenFOAM Special Interest Group (OSIG) section.
2.1 Downloading and Compiling
For OpenFOAM-1.6-ext users
svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_1.6/OSIG/TurboMachinery/applications/utilities/convertToCylindrical wmake
I am not sure if it will work in the OpenCFD version or in older releases. There is nothing special in this, so the changes should be trivial if it does not.
After the simulation has completed, run this application to convert the velocity field to cylindrical coordinates.
All the standard utility flags are available such
convertToCylindrical -time <solutionTime> convertToCylindrical -latestTime
Or don't us any flags and the velocity field will be converted for each time step.
A new file called Ucyl will be created for each selected time step. Even though ParaView and OpenFOAM will call the Ucyl components (x y z), they represent (r theta z). The "x", "y", and "z" are just component placeholders for referencing.
3.1 Running in parallel
This utility can also be used on decomposed data, so there is no need to reconstruct your data.
mpirun -np <num_proc> convertToCylindrical -parallel
The following must be true for your mesh and simulation.
- Velocity field must be titled "U"
- The model must be oriented with the x-y plan as the r-theta plane and the z-axis must be the center axis of rotation
In cases such as when using simpleSRFFoam, the velocity field in the absolute reference frame is called "Uabs". Just create a soft link between Ubas and U
If your model/geometry is not oriented as specified you will need to alter the code accordingly. It is not hard, just look at lines 75-76 and 170-172.
--Bryan Lewis 07:19, 22 June 2011 (CEST)