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
Line # | Column 1 | Column 2 | Column 3 |
---|---|---|---|
1 | Initial |
|
|
2 | Initial |
# of $Ra$s to do |
|
3 | Flow map time | Time step | Leave blank |
4 |
|
|
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 thatux
can be computed fromuy
in 2D from the continuity equation.
Contributions to the code are very welcome. To contribute, please do the following:
- Create a new issue
- Move that issue to "In Progress" on the Kanban board
- Create a new branch
- To create a branch locally do
git checkout -b <new_branch_name>
- To push this branch to the main repo do
git push --set-upstream origin <new_branch_name>
- This is only necessary the first time you create a branch.
- To create a branch locally do
- Make changes to the code on your branch and push your changes when they're ready
git commit
locallygit push
to push your new changes- Recommendation: Only push changes that compile
- When you're ready, make PR to
main
- Assign a reviewer
- After making the PR, link the issue with that PR
- Continue making changes on that branch until they are approved to be merged to
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.