Skip to content

exasim-project/turbulentSpotMethodBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boundary condition for divergence free turbulent inflow with arbitrary anisotropy


Overview

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


OpenFOAM Compatibility

This library is developed against and primarily tested with OpenFOAM v2412.


Origin & Copyright Notices

This project is a derivative work that modifies code from two projects, both licensed under the GNU General Public License v2 (GPLv2):

  1. InsightCAE

  2. LeMoS-inflowgenerator


Modifications

All subsequent modifications and new code added to this project are:
Copyright (C) 2025 Jonathan Schmitt jonathan.schmitt@kit.edu


License

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.


Installation

Compilation Process

  • ./Allwmake [-p|--path <output_directory>] [-j|--cores <number_of_cores>]
  • if no out_directory is given then the $FOAM_USER_LIBBIN is used.
  • ./Allwclean only 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.

Usage

  • 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 U and 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 name 0/. 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!

Documentation

  • 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/

About

A turbulent inlet boundary condition based on the method by Kröger & Kornev, Comput. Fluids 165:78 (2018)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors