Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1804
Closed
Open
Issue created Aug 08, 2020 by sss@ssss

BUG: Inconsistent energy spectrum with boxTurb

Summary

The utility boxTurb is supposed to generate a divergence-free velocity field with the following energy spectrum

E(\kappa) = A_0 (\frac{\kappa}{\kappa_0})^4 e^{-2 (\frac{\kappa}{\kappa_0})^2}
  1. However, when analyzing the energy spectrum from the file graphs/0/Ek.xy which appears appear running the application boxTurb, I don't see at the expected spectrum from the previous equation. I attach a picture comparing the obtained spectrum vs the theoretical spectrum.

  2. The computation of the ensemble kinetic energy presents a multiplication by a factor for 3 which seems wrong for me as k = \int_0^{\infty} E(\kappa) d\kappa = average(\sum \frac{1}{2} mag(U)^2) = \frac{3}{2} u_{RMS}^2

Info<< "k("
         << runTime.timeName()
         << ") = "
         << 3.0/2.0*average(magSqr(U)).value() << endl;
  1. At last the values of the wavenumber output in graphs/0/Ek.xy seems to not be in accordance with the mesh. One expects the maximum wavenumber to be \kappa_{max}= \frac{\pi}{h} where h is the cell size but I in my tests the maximum value of the wavenumber is not consistent with the theoretical formula

Steps to reproduce

  1. Run boxTurb in the boxTurb16 tutorial increasing the number of cells in each direction to 64 and changing the scale parameter to scale 6.28318530718; This value corresponds to 2pi. Decaying isotropic turbulence are commonly simulated using a box with 2pi edge length
  2. Compare the data from the file graphs/0/Ek.xy with the theoretical spectrum from the previous equation

Example case

What is the current bug behaviour?

What is the expected correct behavior?

Relevant logs and/or images

image

Environment information

  • OpenFOAM version : v2006
  • Operating system : ubuntu
  • Hardware info : -
  • Compiler : -

Possible fixes

Edited Jul 07, 2021 by Kutalmış Berçin
Assignee
Assign to
Time tracking