Skip to content

benchmark02_RRBC_julien_JFM96

Robert Sawko edited this page Mar 16, 2021 · 6 revisions

Benchmark02: Rayleigh Bénard convection

We expand benchmark 01 by adding global rotation to the setup. The purpose is two-fold:

  • compare the turbulent heat transport in the stationary regime to values reported in the literature (Julien, Legg, McWilliams & Werne, J Fluid Mech. 1996),
  • illustrate the flexibility of Coral by implementing the governing equations in their primitive (velocity-pressure) formulation, or using a toroidal-poloidal potentials decomposition for velocity. Naturally, we check that the turbulent stationary regime are statistically identical, as expected.

Input files for this benchmark are located in the {CORAL_ROOT}/etc/benchmarks/02_RRBC_julienJFM96, together with a python routine for the computation of the Nusselt number, and a jupyter notebook that contains equations omitted here.

Overview

In this benchmark, we compute the fluid instability that develops when a layer of fluid is heated from below and cooled from the top in presence of rotation. The heat transport in the statistically steady state is computed and checked against values reported by Julien, Legg, McWilliams, and Werne (J. Fluid Mech. 1996). Further, supposing an incompressible flow, we show how the problem can be formulated using velocity-pressure variables, or decomposing the velocity field using toroidal and poloidal potentials.

### Governing equations

Numerical simulation

Prepare a directory for this benchmark, where you copy the content of this folder. The input files are setup for reproducing the third no-slip case reported in Julien et al., J. Fluid Mech. 1996 (see their Table 1, p248): using Pr = 1, Ra=2.81e5 and E = 0.0014142..., in a (2,2,1) box. Before running the executable, depending on which formulation you wish to use, enter one of the following

cp coral.equations.velocityPressure coral.equations
cp coral.equations.toroidalPoloidal coral.equations

The coral.paramaters.in file defines the numbers of alias-free modes to (NX,NY,NZ)=(96,96,48), identical to the resolution used in Julien JFM 96. This corresponds to a grid-size (NXAA, NYAA, NZAA)=(144,144,72).

The output file coral.timeseries is set to record time series of horizontally-averages temperature at the top (first grid point z=1) and at the bottom (last grid point z=72). We use these time series to compute the Nusselt number (heat flux). Run the code using a handful of cores (possibly on a laptop), ideally for a few tens of thousand of time steps. For reference, on 20 Intel Skylake cores, using the velocity-pressure formulation, one time step takes approximately 0.27 seconds (i.e. 5.4 core-seconds). On the same machine, the toroidal-poloidal velocity decomposition run is 25% faster, and takes 0.20 wall-clock seconds (i.e. 4.0 core-seconds).

A posteriori, you can compute the Nusselt number using compute_nusselt.py. Both formulation yield to a similar Nusselt number:

cd /path/to/my/velocityPressureRun/
python compute_nusselt.py 
===================================================
===================================================
nusselt top (1/4):    4.797475404828448
nusselt bottom (1/4): 4.798635848634696
nusselt top (2/4):    4.77931067525003
nusselt bottom (2/4): 4.785796396068935
nusselt top (3/4):    4.764406644521471
nusselt bottom (3/4): 4.76218680324456
nusselt top (4/4):    4.76431314493297
nusselt bottom (4/4): 4.758308333471894
===================================================
===================================================
Neglecting the first quarter of the timeseries,
the mean Nusselt number is: 4.76905366624831
and the standard deviation: 0.009934859274015244
cd /path/to/my/toroidalPoloidalRun/
python compute_nusselt.py 
===================================================
===================================================
nusselt top (1/4):    4.6867197771960605
nusselt bottom (1/4): 4.687830538904671
nusselt top (2/4):    4.766437120727346
nusselt bottom (2/4): 4.76523164557966
nusselt top (3/4):    4.787173054642154
nusselt bottom (3/4): 4.7886018154931955
nusselt top (4/4):    4.772537967127313
nusselt bottom (4/4): 4.773967286711462
===================================================
===================================================
Neglecting the first quarter of the timeseries,
the mean Nusselt number is: 4.775658148380188
and the standard deviation: 0.009187540842645432

heat_flux_timeseries

The time series of the heat flux are very similar for both formulations. We can also display the temperature slice at the last grid-point (z00072), i.e. slightly above the bottom plate. This field is proportional to the heat flux through the bottom plate, and thus gives an instantaneous map of heat transfers. Both formulations yield similar fields.

python3 colorplot_slice.py 
Linear (l) or Quadratic (q) variable? [l/q] >> l
Var. number? [integer]                      >> 4
Slice position? [eg x00001, y00512, z00064] >> z00072
Time? [integer]                             >> 300000

heat transfer at the bottom plate

Conclusion

In sum, we have demonstrated that widely different (yet mathematically equivalent) formulations of the same problems yield statistically identical solutions, that coincide with values reported in the literature. As a side note, we observe that the toroidal-poloidal formulation reduces the number of transforms and the size of the systems, which results in faster computations.