All Projects → barbagroup → Cfdpython

barbagroup / Cfdpython

Licence: other
A sequence of Jupyter notebooks featuring the "12 Steps to Navier-Stokes" http://lorenabarba.com/

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Cfdpython

exadg
ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
Stars: ✭ 62 (-97.16%)
Mutual labels:  cfd, fluid-dynamics, navier-stokes-equations
CaNS
A code for fast, massively-parallel direct numerical simulations (DNS) of canonical flows
Stars: ✭ 144 (-93.39%)
Mutual labels:  cfd, fluid-dynamics
Kinetic.jl
Universal modeling and simulation of fluid dynamics upon machine learning
Stars: ✭ 82 (-96.24%)
Mutual labels:  cfd, fluid-dynamics
Fluid2d
A versatile Python-Fortran CFD code that solves a large class of 2D flows
Stars: ✭ 49 (-97.75%)
Mutual labels:  cfd, fluid-dynamics
hybridCentralSolvers
United collection of hybrid Central solvers - one-phase, two-phase and multicomponent versions
Stars: ✭ 42 (-98.07%)
Mutual labels:  cfd, fluid-dynamics
CFD
Basic Computational Fluid Dynamics (CFD) schemes implemented in FORTRAN using Finite-Volume and Finite-Difference Methods. Sample simulations and figures are provided.
Stars: ✭ 89 (-95.92%)
Mutual labels:  cfd, fluid-dynamics
WABBIT
Wavelet Adaptive Block-Based solver for Interactions with Turbulence
Stars: ✭ 25 (-98.85%)
Mutual labels:  cfd, fluid-dynamics
SNaC
A multi-block solver for massively parallel direct numerical simulations (DNS) of fluid flows
Stars: ✭ 26 (-98.81%)
Mutual labels:  cfd, fluid-dynamics
Machine Learning
机器学习&深度学习资料笔记&基本算法实现&资源整理(ML / CV / NLP / DM...)
Stars: ✭ 159 (-92.71%)
Mutual labels:  jupyter-notebook
Kaggle Environments
Stars: ✭ 158 (-92.75%)
Mutual labels:  jupyter-notebook
Yolo2
这个项目是基于论文YOLO9000: Better, Faster, Stronger的keras(backend:tensorflow)实现
Stars: ✭ 157 (-92.8%)
Mutual labels:  jupyter-notebook
Gasyori100knock
image processing codes to understand algorithm
Stars: ✭ 1,988 (-8.81%)
Mutual labels:  jupyter-notebook
Patch Based Texture Synthesis
Based on "Image Quilting for Texture Synthesis and Transfer" and "Real-Time Texture Synthesis by Patch-Based Sampling" papers
Stars: ✭ 159 (-92.71%)
Mutual labels:  jupyter-notebook
Tensorflow On Android For Human Activity Recognition With Lstms
iPython notebook and Android app that shows how to build LSTM model in TensorFlow and deploy it on Android
Stars: ✭ 157 (-92.8%)
Mutual labels:  jupyter-notebook
Tensorflow Dataset Tutorial
Notebook for my medium article about how to use Dataset API in TensorFlow
Stars: ✭ 158 (-92.75%)
Mutual labels:  jupyter-notebook
Pikachu Detection
Detecting Pikachu on Android using Tensorflow Object Detection API
Stars: ✭ 157 (-92.8%)
Mutual labels:  jupyter-notebook
Machine Learning Workflow With Python
This is a comprehensive ML techniques with python: Define the Problem- Specify Inputs & Outputs- Data Collection- Exploratory data analysis -Data Preprocessing- Model Design- Training- Evaluation
Stars: ✭ 157 (-92.8%)
Mutual labels:  jupyter-notebook
House Price Prediction
Predicting house prices using Linear Regression and GBR
Stars: ✭ 158 (-92.75%)
Mutual labels:  jupyter-notebook
Deepsets
Stars: ✭ 157 (-92.8%)
Mutual labels:  jupyter-notebook
Covid19 mobility
COVID-19 Mobility Data Aggregator. Scraper of Google, Apple, Waze and TomTom COVID-19 Mobility Reports🚶🚘🚉
Stars: ✭ 156 (-92.84%)
Mutual labels:  jupyter-notebook

CFD Python

Please cite as: Barba, Lorena A., and Forsyth, Gilbert F. (2018). CFD Python: the 12 steps to Navier-Stokes equations. Journal of Open Source Education, 1(9), 21, https://doi.org/10.21105/jose.00021

DOI

CFD Python, a.k.a. the 12 steps to Navier-Stokes, is a practical module for learning the foundations of Computational Fluid Dynamics (CFD) by coding solutions to the basic partial differential equations that describe the physics of fluid flow. The module was part of a course taught by Prof. Lorena Barba between 2009 and 2013 in the Mechanical Engineering department at Boston University (Prof. Barba since moved to the George Washington University).

The module assumes only basic programming knowledge (in any language) and some background in partial differential equations and fluid mechanics. The "steps" were inspired by ideas of Dr. Rio Yokota, who was a post-doc in Prof. Barba's lab until 2011, and the lessons were refined by Prof. Barba and her students over several semesters teaching the CFD course. We wrote this set of Jupyter notebooks in 2013 to teach an intensive two-day course in Mendoza, Argentina.

Guiding students through these steps (without skipping any!), they learn many valuable lessons. The incremental nature of the exercises means they get a sense of achievement at the end of each assignment, and they feel they are learning with low effort. As they progress, they naturally practice code re-use and they incrementally learn programming and plotting techniques. As they analyze their results, they learn about numerical diffusion, accuracy and convergence. In about four weeks of a regularly scheduled course, they become moderately proficient programmers and are motivated to start discussing more theoretical matters.

How to use this module

In a regular-session university course, students can complete the CFD Python lessons in 4 to 5 weeks. As an intensive tutorial, the module can be completed in two or three full days, depending on the learner's prior experience. The lessons can also be used for self study. In all cases, learners should follow along the worked examples in each lesson by re-typing the code in a fresh Jupyter notebook, maybe taking original notes as they try things out.

Lessons

Launch an interactive session with this module using the Binder service: Binder

Steps 1–4 are in one spatial dimension. Steps 5–10 are in two dimensions (2D). Steps 11–12 solve the Navier-Stokes equation in 2D. Three "bonus" notebooks cover the CFL condition for numerical stability, array operations with NumPy, and defining functions in Python.

  • Quick Python Intro —For Python novices, this lesson introduces the numerical libraries (NumPy and Matplotlib), Python variables, use of whitespace, and slicing arrays.
  • Step 1 —Linear convection with a step-function initial condition (IC) and appropriate boundary conditions (BCs).
  • Step 2 —With the same IC/BCs, nonlinear convection.
  • CFL Condition —Exploring numerical stability and the Courant-Friedrichs-Lewy (CFL) condition.
  • Step 3 —With the same IC/BCs, diffusion only.
  • Step 4 —Burgers’ equation, with a saw-tooth IC and periodic BCs (with an introduction to Sympy).
  • Array Operations with NumPy
  • Step 5 —Linear convection in 2D with a square-function IC and appropriate BCs.
  • Step 6 —With the same IC/BCs, nonlinear convection in 2D.
  • Step 7 —With the same IC/BCs, diffusion in 2D.
  • Step 8 —Burgers’ equation in 2D
  • Defining Functions in Python
  • Step 9 —Laplace equation with zero IC and both Neumann and Dirichlet BCs.
  • Step 10 —Poisson equation in 2D.
  • Step 11 —Solves the Navier-Stokes equation for 2D cavity flow.
  • Step 12 —Solves the Navier-Stokes equation for 2D channel flow.

Dependencies

To use these lessons, you need Python 3, and the standard stack of scientific Python: NumPy, Matplotlib, SciPy, Sympy. And of course, you need Jupyter—an interactive computational environment that runs on a web browser.

This mini-course is built as a set of Jupyter notebooks containing the written materials and worked-out solutions on Python code. To work with the material, we recommend that you start each lesson with a fresh new notebook, and follow along, typing each line of code (don't copy-and-paste!), and exploring by changing parameters and seeing what happens.

Installing via Anaconda

We highly recommend that you install the Anaconda Python Distribution. It will make your life so much easier. You can download and install Anaconda on Windows, OSX and Linux.

After installing, to ensure that your packages are up to date, run the following commands in a terminal:

conda update conda
conda update jupyter numpy sympy scipy matplotlib

If you prefer Miniconda (a mini version of Anaconda that saves you disk space), install all the necessary libraries to follow this course by running the following commands in a terminal:

conda update conda
conda install jupyter
conda install numpy scipy sympy matplotlib

Without Anaconda

If you already have Python installed on your machine, you can install Jupyter using pip:

pip install jupyter

Please also make sure that you have the necessary libraries installed by running

pip install numpy scipy sympy matplotlib

Running the notebook server

Once Jupyter is installed, open up a terminal and then run

jupyter notebook

This will start up a Jupyter session in your browser!

How to contribute to CFD Python

We accept contributions via pull request—in fact, several users have already submitted pull requests making corrections or small improvements. You can also open an issue if you find a bug, or have a suggestion.

Copyright and License

(c) 2017 Lorena A. Barba, Gilbert F. Forsyth. All content is under Creative Commons Attribution CC-BY 4.0, and all code is under BSD-3 clause (previously under MIT, and changed on March 8, 2018).

We are happy if you re-use the content in any way!

License License: CC BY 4.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].