Coder Social home page Coder Social logo

larsgeb / rayleigh-bernard Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 1.99 MB

A simple finite difference scheme for the Rayleigh-Bernard equations (buoyancy driven convection).

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
rayleigh-taylor transport-equation thermal-convection thermal-conductivity porous-media finite-difference fdtd finite-difference-time-domain

rayleigh-bernard's Introduction

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.

rayleigh-bernard's People

Contributors

larsgeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lelelovejing

rayleigh-bernard's Issues

Question on the governing PDE

Hi Lars, great job! Here I have one question about the governing equations (of T, Psi) you referred to. It looks that the equation for T is
image

What about the equation for Psi? Any reference or link would be appreciated. Thank you.

help to understand

Hi

I find your code very good. I would like to use it for a very specific application of a low-temperature nitrogen slot between -160°C and -100°C, 1m long, and 0.4m high (possibly with a thickness of 4mm). I would like to adapt your code for a 2D case and possibly try to add a third dimension. What do you think?

Steven

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.