GithubHelp home page GithubHelp logo

fracturist / synthetic-turbulence-generator Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 362 KB

An efficient and low-divergence method for generating inhomogeneous and anisotropic turbulence with arbitrary spectra

License: GNU General Public License v3.0

C 75.20% C++ 24.80%

synthetic-turbulence-generator's Introduction

Synthetic-Turbulence-Generator

This repo provides code for our paper An efficient and low-divergence method for generating inhomogeneous and anisotropic turbulence with arbitrary spectra (arXiv version), implemented in the OpenFOAM framework.

Inverter-version method effectiveness in reducing divergence.

Real performance of inverter spectrum-based method against white noise maker.

Abstract:

In this article, we propose a divergence-free method for the generation of inhomogeneous and anisotropic turbulence. Based on the idea of correlation reconstruction, the method uses the Cholesky decomposition matrix to re-establish the turbulence correlation functions, which avoids the time-consuming procedure that solves eigenvalues and eigenvectors in every location needed by the coordinate transformation in the conventional method and thus reduces the computational complexity and improves the efficiency of generating synthetic turbulence. Through adjusting the generation strategy of specific random vectors, the proposed method, which is based on the classical spectrum-based method widely used to generate uniform isotropic turbulence, can obtain inhomogeneous and anisotropic turbulence with a relatively low divergence level in practice with almost no additional computational burden. There are two versions of this new method: the shifter version and the inverter version. Both versions of the method are highly efficient, easy to implement, and compatible with high-performance computing. Suitable for providing high-quality initial or boundary conditions for scale-resolving turbulence simulations with large grid numbers (such as direct numerical simulation or large eddy simulation), this method can be quickly implemented either based on various open-source CFD codes or common commercial CFD software.

Code structure:

  • src/ contains the source code of different generators.
    • whiteNoiseMaker contains the code of a simple white-noise generator for comparison.
    • spectralInverter contains the code of inverter-version spectrum-based generator.
    • auxiliaries contains some auxiliary functions and classes used by spectralInverter.
      • spectrumModel includes a set of spectrum models.
      • auxiliaryFunctions includes random unit vector generation and Cholesky decomposition.
  • examples/ contains a set of examples of using the framework.
    • boxTurbAnisotropy includes a classical box turbulence of different anisotropy types.

Compilation:

Run Allwmake.

Usage:

Use gitVerSpetralInverter -help.

Examples:

  1. boxTurbAnisotropy: run the buildInitialField script.

Requirements:

OpenFOAM v2106

Citation

If you find this repo useful in your research, please consider citing our paper: An efficient and low-divergence method for generating inhomogeneous and anisotropic turbulence with arbitrary spectra.

@article{Guo2023,
    title={An efficient and low-divergence method for generating inhomogeneous and anisotropic turbulence with arbitrary spectra},
    author={Guo, Hao and Jiang, Peixue and Ye, Lin and Zhu, Yinhai},
    year={2023},
    journal={Journal of Fluid Mechanics},
    volume={970},
    pages={A2},
    DOI={10.1017/jfm.2023.548},
}

License

Synthetic-Turbulence-Generator is published under the GNU GPL Version 3 license, which can be found in the LICENSE file.

Problems

If you find any bugs in the code or have trouble in compiling/running syntheticTurbulenceGenerator in your machine, you are very welcome to open an issue in this repository.

Future plan

A Fluent UDF version is in progress.

synthetic-turbulence-generator's People

Contributors

fracturist avatar

Stargazers

 avatar Xinyang Liu avatar Akshay Patil avatar Chuanqi Zhao avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.