Skip to content
Snippets Groups Projects

Add synthetic turbulence generation for the compressible solver

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

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

  1. solvers/CompressibleFlowSolver/Tests/ChanFlow3D_infTurbImpl.xml

  2. 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).
Edited by Jacques Xing

Merge request reports

Merge request pipeline #8292 passed with warnings

Merge request pipeline passed with warnings for 5e151c3b

Test coverage 74.30% (0.00%) from 1 job

Merged by Jacques XingJacques Xing 5 months ago (Sep 28, 2024 10:01am UTC)

Loading

Pipeline #8293 passed with warnings

Pipeline passed with warnings for ce6e4eed on master

Test coverage 74.30% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • João Isler changed milestone to %v6.0.0

    changed milestone to %v6.0.0

  • João Isler requested review from @ssherw and @CFD-Xing

    requested review from @ssherw and @CFD-Xing

  • assigned to @jisler

  • João Isler changed title from Add synthetic turbulence generator for compressible solver to Add synthetic turbulence generator for compressible the solver

    changed title from Add synthetic turbulence generator for compressible solver to Add synthetic turbulence generator for compressible the solver

  • João Isler changed title from Add synthetic turbulence generator for compressible the solver to Add synthetic turbulence generator for the compressible solver

    changed title from Add synthetic turbulence generator for compressible the solver to Add synthetic turbulence generator for the compressible solver

  • João Isler added 3 commits

    added 3 commits

    • 2e030d98 - tweaked test case
    • 7e9730ca - Add test cases for the compressible implicit and explicit solvers.
    • c8fd4784 - Update user-guide

    Compare with previous version

  • João Isler marked the checklist item User guide/documentation is updated. as completed

    marked the checklist item User guide/documentation is updated. as completed

  • João Isler changed the description

    changed the description

  • João Isler changed title from Add synthetic turbulence generator for the compressible solver to Add synthetic turbulence generation for the compressible solver

    changed title from Add synthetic turbulence generator for the compressible solver to Add synthetic turbulence generation for the compressible solver

  • João Isler changed the description

    changed the description

  • João Isler changed the description

    changed the description

  • João Isler marked the checklist item License added to any new files. as completed

    marked the checklist item License added to any new files. as completed

  • João Isler marked the checklist item No extraneous files have been added (e.g. compiler output or test data files). as completed

    marked the checklist item No extraneous files have been added (e.g. compiler output or test data files). as completed

  • João Isler added 5 commits

    added 5 commits

    Compare with previous version

  • João Isler marked the checklist item Changelog is updated. as completed

    marked the checklist item Changelog is updated. as completed

  • João Isler added 2 commits

    added 2 commits

    Compare with previous version

  • João Isler changed the description

    changed the description

  • João Isler marked the checklist item Functions and classes, or changes to them, are documented. as completed

    marked the checklist item Functions and classes, or changes to them, are documented. as completed

  • João Isler marked the checklist item Suitable tests added for new functionality. as completed

    marked the checklist item Suitable tests added for new functionality. as completed

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading