Add synthetic turbulence generation for the compressible solver
Issue/feature addressed
In this merge request, the Synthetic Eddy Method (SEM) based on the source term formulation is implemented for the compressible solver. Note that the incompressible version was merged into the master branch in the MR !1664 (merged), so that this implementation is an extension of the previous code. In this version, the inflow turbulence can also be used with the compressible solver. As described in the previous MR, 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 main explanation of the methodology is provided in the MR !1664 (merged). However, in this version, a different approach is employed for the forcing term. Here, when an eddy is injected at the inlet plane of the synthetic eddy region, the forcing term keeps applying (forcing) the eddy at the inlet plane until the eddy exits the domain through the outlet plane of the synthetic eddy region. Once the eddy leaves, the forcing term for that particular eddy is removed. Then, as discussed in MR !1664 (merged), a random position at the inlet plane of the synthetic eddy region is chosen for the re-injection of a new eddy.
Implementation
In this implementation, the core functionality is encapsulated within the ForcingSyntheticEddy
class. This class leverages polymorphism through the Forcing
(class) interface. The ForcingCFSSyntheticEddy
and ForcingIncNSSyntheticEddy
classes implement specific forcing terms for the compressible and incompressible solvers, respectively. The ForcingCFSSyntheticEddy
and ForcingIncNSSyntheticEddy
classes also use both the Forcing
and ForcingSyntheticEddy
classes as interfaces. They utilize the v_Apply
and v_ApplyCoeff
(compressible) methods, which is initially defined in the Forcing
class, but the actual implementation of this method is provided in the ForcingCFSSyntheticEddy
and ForcingIncNSSyntheticEddy
classes. This allows each of these classes to implement the forcing terms specific to the compressible and incompressible solvers, respectively.
Regarding more specific implementation of this version. The RemoveEddiesFromForcing
method was implemented to remove the eddy from the forcing term when it exits the synthetic eddy region, as mentioned in the previous. Then, a new eddy will be calculated and re-injected in the CalculateForcing
method.
Tests
The test cases below were added
-
solvers/CompressibleFlowSolver/Tests/ChanFlow3D_infTurbImpl.xml
-
solvers/CompressibleFlowSolver/Tests/ChanFlow3D_infTurbExpl.xml
The two test cases share similarities, but they serve distinct purposes: the first test case evaluates the synthetic turbulence generator for the implicit solver, while the second focuses on the explicit solver. Both cases assess space-dependent Reynolds stresses, anisotropic synthetic turbulence generation, and the re-injection of eddies after they exit the outlet plane of the synthetic eddy region (box of eddies).
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).