This project is a modified version of the LeMoS-inflowgenerator, originally developed at the Chair of Modeling and Simulation (LeMoS), University of Rostock, Germany, which relies on the project InsightCAE of Dr.-Ing. Hannes Kröger.
This derivative work aims to remove dependencies on third-party libraries like vtk, armadillo or boost and rely on OpenFOAM's native capabilities. It is designed as a library for OpenFOAM from OpenCFD Ltd.
The boundary conditions are implemented in form of a library that can be dynamically linked.
The theoretical fundament is formed by the paper:
Kröger, H. & Kornev, N. (2018). Generation of divergence free synthetic inflow turbulence with arbitrary anisotropy. Computers & Fluids, 165, 78–88. https://doi.org/10.1016/j.compfluid.2018.01.018
This library is developed against and primarily tested with OpenFOAM v2412.
This project is a derivative work that modifies code from two projects, both licensed under the GNU General Public License v2 (GPLv2):
-
InsightCAE
- Authors and Contributors: Dr.-Ing. Hannes Kröger, Dr.-Ing. Ivan Shevchuk, Dr.-Ing. Johann Turnow
- Project repository: https://github.com/hkroeger/insightcae.git
- Copyright Notice: Copyright (C) 2014 Hannes Kroeger hannes@kroegeronline.net
-
LeMoS-inflowgenerator
- Author: Chair of Modeling and Simulation (LeMoS), University of Rostock, Germany
- Project repository: https://github.com/LeMoS-uni-rostock/LeMoS-inflowgenerator.git
All subsequent modifications and new code added to this project are:
Copyright (C) 2025 Jonathan Schmitt jonathan.schmitt@kit.edu
As a derivative work of software licensed under the GPLv2, this project is licensed under the version 2 of the GNU General Public License.
For the complete legal text of the license, please refer to the LICENSE file located in the root directory of this repository. This file contains the full text of the GNU General Public License.
./Allwmake [-p|--path <output_directory>] [-j|--cores <number_of_cores>]- if no out_directory is given then the $FOAM_USER_LIBBIN is used.
./Allwcleanonly removes the library object that is stored in $FOAM_USER_LIBBIN. If the output_directory isn't equal to the default one, it must be removed manually.
- add the library to the
system/controlDict:
libs (
"libinflowGeneratorBC.so"
);-
ensure that the right library is linked. Add the path:
export LD_LIBRARY_PATH=LIB_OUTPUT_DIR:$LD_LIBRARY_PATH -
add the following to the boundaryField inlet of
Uand adjust the different parameters:
inlet
{
type inflowGenerator<anisotropicVortonAnalyticCalcL2>;
scaleToMassflow true;
value uniform (0 0 0);
vortonDensityInput uniform 2;
calibrationFactorInput uniform 1;
UMeanInput
{
type mappedFile;
mapMethod nearest;
fieldTable Ui;
}
RInput
{
type mappedFile;
mapMethod nearest;
fieldTable Rij;
}
LInput
{
type mappedFile;
mapMethod nearest;
fieldTable Li;
}
}
- here Ui, Rij and Li are the names of the files, stored in
constant/boundaryData/inlet/0, that contain the inlet data information of those fields. Always the latest provided time step is used (of course if it is smaller then the current time step), so if one wants to always use the same just stick to one folder that has the name0/. The integral length scales Li that must be provided must be based on the definition given in the chapter 3.4. of the paper of Kroeger & Kornev (2018) but with a factor of 2. multiplied!
- the Doxyfile and the proper documentation of the code is still work in progress
- generate the documentation with
doxygen Doxyfile - the documentation is stored in
docs/html/