This code finds exact, steady solutions that optimize vertical heat transport in 2D Rayleigh-Benard convection. Specific details on the approach and the numerics can be found in [1].
The flowmap algorithm is used to find steady solutions to the 2D Boussinesq equations. The Nusselt number is computed at each steady solution for a given $Ra$ and $Pr$. At each $(Ra, Pr)$ pair, steady solutions are computed in different box sizes, $L$. The size of the domain (box) in $x$ is given by $L=2\pi/\alpha$ where $\alpha$ is the wavenumber that sets the scale of the solution in $x$. The solution in box size $L$ that maximizes the Nusselt number is referred to as the optimal solution.
Line # | Column 1 | Column 2 | Column 3 |
---|---|---|---|
1 | $Pr$ | Initial $\alpha$ | $\alpha$ step |
2 | Initial $Ra$ | # of $Ra$s to do | $Ra$ increment multiplier |
3 | Flow map time | Time step | Leave blank |
4 | $y$ at bottom | $y$ at top | Leave blank |
5 | Nx | Ny | Nz |
6 | x-refinement | y-refinement | z-refinement |
7 | Save to VTK | Save binary restart files | Calculate actual optimal solution |
Run make
to generate an executable. The basic executable will be called Ra_loop.exe
. Run the executable from the command
line by typing ./Ra_loop.exe
. The code will automatically search for the input file input.data
and read in any
parameters.
Depending on how the input file is set up, the code will loop over different values of Ra. For each Ra, it will perform an optimization over the box size to find which box size maximizes the heat transport at the Ra. This optimization is done by fitting a parabola to three points. The code continues until a maximum Nu is found.
The results are written out in various formats:
Nu.txt
: Contains the Ra, Nu, optimal wavenumber, and optimal box sizevtkdata/
: Solution fields are written out in VTK format at each Ra for solutions optimizing heat transport (Note: Need to create vtkdata directory before running code)uy
, temperature
: Vertical velocity and temperature fields in binary format. Used for restarts. Note that ux
can be
computed from uy
in 2D from the continuity equation.Contributions to the code are very welcome. To contribute, please do the following:
git checkout -b <new_branch_name>
git push --set-upstream origin <new_branch_name>
git commit
locallygit push
to push your new changesmain
main
[1] Sondak, D., Smith, L.M., Waleffe, F. (2015). Optimal heat transport solutions for Rayleigh-Benard convection Journal of Fluid Mechanics, 784, 656-595.