DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
test_RANS.cpp File Reference

Unit tests for RANS turbulence model functions in RANS_ke.hpp. More...

#include "doctest.h"
#include "Euler/RANS_ke.hpp"
#include <Eigen/Dense>
#include <cmath>
#include <iostream>
#include <iomanip>
Include dependency graph for test_RANS.cpp:

Go to the source code of this file.

Macros

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
 

Functions

 TEST_CASE ("GetMut_KOWilcox: non-negative")
 
 TEST_CASE ("GetMut_KOWilcox: bounded by 1e5 * muLam")
 
 TEST_CASE ("GetMut_KOWilcox: golden value")
 
 TEST_CASE ("GetMut_SST: non-negative")
 
 TEST_CASE ("GetMut_SST: bounded by 1e5 * muLam")
 
 TEST_CASE ("GetMut_SST: golden value")
 
 TEST_CASE ("GetMut_RealizableKe: non-negative")
 
 TEST_CASE ("GetMut_RealizableKe: bounded by 1e5 * muLam")
 
 TEST_CASE ("GetMut_RealizableKe: golden value")
 
 TEST_CASE ("GetSource_KOWilcox: zero gradient finite and has destruction")
 
 TEST_CASE ("GetSource_SST: zero gradient finite")
 
 TEST_CASE ("GetSource_RealizableKe: zero gradient finite")
 
 TEST_CASE ("GetSource_KOWilcox: shear gradient golden")
 
 TEST_CASE ("GetSource_SST: shear gradient golden")
 
 TEST_CASE ("GetSource_RealizableKe: shear gradient golden")
 
 TEST_CASE ("GetSource_KOWilcox mode=1: implicit diagonal non-negative")
 
 TEST_CASE ("GetVisFlux_KOWilcox: zero gradient -> zero flux")
 
 TEST_CASE ("GetVisFlux_SST: zero gradient -> zero flux")
 
 TEST_CASE ("GetVisFlux_RealizableKe: zero gradient -> zero flux")
 
 TEST_CASE ("GetVisFlux_KOWilcox: k-gradient produces k-flux")
 
 TEST_CASE ("GetMut_KOWilcox: mut increases with k")
 
 TEST_CASE ("GetMut_SST: mut increases with k")
 
 TEST_CASE ("GetMut_KOWilcox: very small k/omega produces finite mut")
 
 TEST_CASE ("GetMut_SST: very small k/omega produces finite mut")
 
 TEST_CASE ("GetMut_RealizableKe: very small k/eps produces finite mut")
 

Detailed Description

Unit tests for RANS turbulence model functions in RANS_ke.hpp.

Tests cover:

  • GetMut_KOWilcox: turbulent viscosity from k-omega Wilcox 2006
  • GetMut_SST: turbulent viscosity from k-omega SST
  • GetMut_RealizableKe: turbulent viscosity from Realizable k-epsilon
  • GetSource_KOWilcox: source terms (mode 0 = full, mode 1 = Jacobian diagonal)
  • GetSource_SST: source terms
  • GetSource_RealizableKe: source terms
  • GetVisFlux_KOWilcox: viscous flux for turbulent transport variables
  • GetVisFlux_SST: viscous flux
  • GetVisFlux_RealizableKe: viscous flux

Key properties tested:

  • mut >= 0 (non-negative turbulent viscosity)
  • mut <= 1e5 * muLam (CFL3D limiting)
  • Zero gradient -> zero production in source
  • Zero gradient -> zero viscous flux
  • Finite output (no NaN/Inf)
  • Golden values for specific test vectors

All functions are pure template functions (no MPI, no mesh). SA model is excluded because GetSource_SA references EulerEvaluator settings.

Definition in file test_RANS.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

Definition at line 28 of file test_RANS.cpp.

Function Documentation

◆ TEST_CASE() [1/25]

TEST_CASE ( "GetMut_KOWilcox: bounded by 1e5 * muLam"  )

Definition at line 103 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/25]

TEST_CASE ( "GetMut_KOWilcox: golden value"  )

Definition at line 112 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [3/25]

TEST_CASE ( "GetMut_KOWilcox: mut increases with k"  )

Definition at line 408 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [4/25]

TEST_CASE ( "GetMut_KOWilcox: non-negative"  )

Definition at line 93 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [5/25]

TEST_CASE ( "GetMut_KOWilcox: very small k/omega produces finite mut"  )

Definition at line 438 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [6/25]

TEST_CASE ( "GetMut_RealizableKe: bounded by 1e5 * muLam"  )

Definition at line 174 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [7/25]

TEST_CASE ( "GetMut_RealizableKe: golden value"  )

Definition at line 183 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [8/25]

TEST_CASE ( "GetMut_RealizableKe: non-negative"  )

Definition at line 164 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [9/25]

TEST_CASE ( "GetMut_RealizableKe: very small k/eps produces finite mut"  )

Definition at line 458 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [10/25]

TEST_CASE ( "GetMut_SST: bounded by 1e5 * muLam"  )

Definition at line 139 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [11/25]

TEST_CASE ( "GetMut_SST: golden value"  )

Definition at line 148 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [12/25]

TEST_CASE ( "GetMut_SST: mut increases with k"  )

Definition at line 421 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [13/25]

TEST_CASE ( "GetMut_SST: non-negative"  )

Definition at line 129 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [14/25]

TEST_CASE ( "GetMut_SST: very small k/omega produces finite mut"  )

Definition at line 448 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [15/25]

TEST_CASE ( )

Definition at line 303 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [16/25]

TEST_CASE ( "GetSource_KOWilcox: shear gradient golden"  )

Definition at line 248 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [17/25]

TEST_CASE ( "GetSource_KOWilcox: zero gradient finite and has destruction"  )

Definition at line 199 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [18/25]

TEST_CASE ( "GetSource_RealizableKe: shear gradient golden"  )

Definition at line 283 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [19/25]

TEST_CASE ( "GetSource_RealizableKe: zero gradient finite"  )

Definition at line 231 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [20/25]

TEST_CASE ( "GetSource_SST: shear gradient golden"  )

Definition at line 267 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [21/25]

TEST_CASE ( "GetSource_SST: zero gradient finite"  )

Definition at line 216 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [22/25]

TEST_CASE ( "GetVisFlux_KOWilcox: k-gradient produces k-flux"  )

Definition at line 384 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [23/25]

TEST_CASE ( "GetVisFlux_KOWilcox: zero gradient -> zero flux"  )

Definition at line 334 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [24/25]

TEST_CASE ( "GetVisFlux_RealizableKe: zero gradient -> zero flux"  )

Definition at line 365 of file test_RANS.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [25/25]

TEST_CASE ( "GetVisFlux_SST: zero gradient -> zero flux"  )

Definition at line 350 of file test_RANS.cpp.

Here is the call graph for this function: