Skip to content

Add synthetic turbulence generation for the incompressible solver

João Isler requested to merge jisler/nektar:feature/InfTurbIncForcing into master

Issue/feature addressed

In this merge request, the Synthetic Eddy Method (SEM) based on the source term formulation is implemented. In this formulation, the user can inject eddies in any part of the domain, not only in the inlet boundary condition as most methodologies do. The eddies are created by defining an synthetic eddy region (box of eddies) which the parameters are provided in the xml file.

Proposed solution

The SEM was implemented as a forcing term. Firstly, the forcing term is applied taking into account all the eddies using the superposition principle, so that all eddies are injected in the first time step. Then, the eddies are convected downstream. When one or few eddies leave the domain, they are reintroduced in the inlet plane of the synthetic eddy region. In order to re-inject them, the forcing term is again applied only for the eddies that left the outlet plane of the box created. Thus, this mechanism re-energise the system. The number of eddies added in the domain are based on the parameters provided by the user.

Implementation

The SEM forcing term was implemented as a derived class of the Forcing class. The name of the new derived class is ForcingIncNSSyntheticEddy. The main functions of this method are described below

  • ComputeStochasticSignal() - This function computes the stochastic signal based on gaussian functions (shape functions).
  • ComputeVelocityFluctuation() - This function calculates the velocity fluctuation by multiplying the Cholesky decomposition of the Reynolds Stresses and the stochastic signal.
  • UpdateEddiesPositions() - This function updates the position of the eddy in each time step and checks if the eddy left the synthetic eddy region. In case the eddy leaves the eddy, it is reintroduced close to the inlet plane of the synthetic eddy region.
  • CalculateForcing() - This function calculates the forcing term to be applied in the synthetic eddy region.

Tests

The test case below was added

  1. solvers/IncNavierStokesSolver/Tests/ChanFlow3D_infTurb.xml
  • This test case checks the space-dependent Reynolds stresses, anisotropic synthetic turbulence generation and also the re-injection of eddies after they leave through the outlet plane of the synthetic eddy region (box of eddies). Note that additional code was implemented to deal with the test case since eddies could not be randomly generated in the synthetic eddy region for a test case.

Notes

Most of the SEM code is similar for the incompressible and compressible solvers. So, when the compressible version is ready to be merged, the code that can be shared for both solvers must be moved to another class.

Note that, in the merge request, the SEM only supports fully three-dimensional incompressible simulations.

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by João Isler

Merge request reports