-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
A finite difference code to simulate 2D advection-convection, or Rayleigh-Bernard, systems. | ||
Has the dependencies: | ||
|
||
1. Python 3.7 | ||
2. Numpy | ||
3. SciPy | ||
4. Matplotlib | ||
|
||
Run the code by changing the configuration values in `main.py` and entering the following on your terminal: | ||
|
||
``` | ||
python main.py | ||
``` | ||
|
||
Make a video out of the results by going into the `simulations` directory and using ffmpeg like this: | ||
|
||
``` | ||
ffmpeg -framerate 5 -pattern_type glob -i '*.png' \ | ||
-c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 | ||
``` | ||
|
||
An example simulation with an unstable initial condition and 3:1 aspect ratio (which will favour 3 convection cells) is given below. This is the parameters currently set in `main.py`. | ||
|
||
![](example_simulation.gif) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.png | ||
|