ML: OpenFOAM-DNS数据集

研究数据驱动类CFD,需要使用数据集。数据集要么是实验获得,要么是DNS计算而来。本文发布一些不同几何的DNS模拟数据集,相关数据被转化为OpenFOAM原生数据,可通过paraview读取,也可以通过OpenFOAM的后处理工具进行处理。可以理解为OpenFOAM原生的DNS算例。数据集的发布为方便相关科研人员训练数据驱动类模型。这些数据集的来源主要是:

  1. 公开发表的的DNS数据;

  2. 通过其他软件计算后的数据;

槽道流

本DNS原始数据以及下方的图片来自Johns Hopkins Turbulence Databases。算例为槽道流,原始几何为\(8 \pi \times 2\times 3\pi\),三个方向各采用\(2048 \times 512 \times 1536\)个网格点,共16亿个网格。

_images/hpdns.JPG

求解方法使用的为伪谱方法。采用周期性网格,压力梯度给定为\(0.0025\)。摩擦速度\(u_\tau=0.0499\)。粘度为\(5\times 10^{-5}\)。摩擦雷诺数大约为1000。

Warning

摩擦速度计算公式:\({u_\tau } = \sqrt {\frac{{{\tau _w}}}{\rho }} {\rm{ = }}\sqrt {\nu \frac{{\partial u}}{{\partial y}}}\)。 摩擦雷诺数:\(Re_\tau=\frac{u_\tau\delta}{\nu}\)\(\delta\)是管道半径。本算例管道半径为1。\(y^+\)的计算公式为:\(y^+=\frac{u_\tau y}{\nu}\)\(u^+\)的计算公式为:\(u^+=\frac{u}{u_\tau}\)\(p^+\)的计算公式为\(p^+=\frac{p}{u_\tau^2}\)

算例转换成为OpenFOAM格式后,也可用于OpenFOAM计算。经测试,经过OpenFOAM的boundaryFoam并调用低雷诺数湍流模型后,OpenFOAM计算的速度与DNS的速度结果如下:

_images/dnsu1.svg
_images/dnsu2.svg
_images/dnsuu.svg
_images/dnsk.svg

可以点击此处下载OpenFOAM原始算例。算例0文件夹中:

  • k_resolved.orig表示DNS计算的湍流动能;

  • U.orig表示DNS计算的速度;

  • p.orig表示DNS计算的压力;

  • UPrime2Mean.orig表示DNS计算的解析的雷诺应力;

上述场均可以通过paraivew进行显示。

Warning

算例也可以直接运行boundaryFoam来进行有限体积法求解。如果使用boundaryFoam进行求解,要注意其进行了1维假设,同时其调用了RANS湍流模型。因此只有模化后的雷诺应力。

Research in data-driven Computational Fluid Dynamics (CFD) necessitates the use of datasets, which can either be obtained from experiments or derived from Direct Numerical Simulation (DNS). This article presents DNS simulation datasets for various geometries, where the data has been converted into native OpenFOAM format. These datasets can be visualized using ParaView or processed using OpenFOAM’s post-processing tools. They are designed as native OpenFOAM DNS test cases, facilitating the training of data-driven models for researchers. The primary sources of these datasets include:

  1. Publicly published DNS data.

  2. Data computed using other software.

Channel Flow

The original DNS data and the image below are sourced from Johns Hopkins Turbulence Databases. The case is channel flow with an original geometry of \(8 \pi \times 2\times 3\pi\), employing \(2048 \times 512 \times 1536\) grid points in each direction, totaling 1.6 billion grid points.

_images/hpdns.JPG

The solver method used is the pseudospectral method with periodic grids. The pressure gradient is set to 0.0025. The friction velocity \(u_\tau=0.0499\). The viscosity is \(5\times 10^{-5}\). The friction Reynolds number is approximately 1000.

After converting the case into OpenFOAM format, it can also be used for OpenFOAM computations. Testing has shown that the velocity results from OpenFOAM computations using boundaryFoam and invoking low Reynolds number turbulence models closely match the DNS velocity results:

_images/dnsu1.svg
_images/dnsu2.svg
_images/dnsuu.svg
_images/dnsk.svg

You can download the original OpenFOAM case here. In folder “0”:

  • k_resolved.orig represents DNS-calculated turbulent kinetic energy.

  • U.orig represents DNS-calculated velocity.

  • p.orig represents DNS-calculated pressure.

  • UPrime2Mean.orig represents DNS-calculated resolved Reynolds stress.

The above fields can be displayed using ParaView.

Warning

The case can also be directly solved using boundaryFoam for finite volume method computations. Note that boundaryFoam assumes a 1D hypothesis and employs RANS turbulence models, thus providing only modeled Reynolds stresses.