Pressure Driven Pipe Flow Simulation in Python | Hagen-Poiseuille Profile

Описание к видео Pressure Driven Pipe Flow Simulation in Python | Hagen-Poiseuille Profile

Let's write Python/NumPy code for the simplest Navier-Stokes simulation in CFD, a pipe flow with periodic boundary conditions that is driven by a constant pressure gradient. Over time, the Hagen-Poiseuille parabolic profile will develop. Download the source-code here: https://github.com/Ceyron/machine-lea...

Due to the viscous effects of the Navier-Stokes equations, the flow is creating boundary layers near solid wall boundary conditions. In this video, we look at a pipe flow for which the top end bottom edge of the domain is a wall Boundary Condition. This symmetry forces the initially uniform velocity profile to attain a parabolic shape. The pipe flow driven by a pressure gradient is also one of these rare cases for which we actually have an analytic solution to the Navier-Stokes equations, the law of Hagen Poiseuille. https://en.wikipedia.org/wiki/Hagen%E...

Although we are using a time-stepping here, the actual trajectory is not really relevant, once we reach a stead state. You can think of the time-stepping here as a way to circumvent the nonlinearity in our equation through a couple of steps of explicit approximations.

-------

📺 : If you like my way of teaching and love fluid dynamics (that's of course a jackpot), take a look at this video:    • Pressure Driven Pipe Flow Simulation ...  

📝 : Check out the GitHub Repository of the channel, where I upload all the handwritten notes and source-code files (contributions are very welcome): https://github.com/Ceyron/machine-lea...

📢 : Follow me on LinkedIn or Twitter for updates on the channel and other cool Machine Learning & Simulation stuff:   / felix-koehler   and   / felix_m_koehler  

💸 : If you want to support my work on the channel, you can become a Patreon here:   / mlsim  

-------

⚙️ My Gear:

(Below are affiliate links to Amazon. If you decide to purchase the product or something else on Amazon through this link, I earn a small commission.)

- 🎙️ Microphone: Blue Yeti: https://amzn.to/3NU7OAs
- ⌨️ Logitech TKL Mechanical Keyboard: https://amzn.to/3JhEtwp
- 🎨 Gaomon Drawing Tablet (similar to a WACOM Tablet, but cheaper, works flawlessly under Linux): https://amzn.to/37katmf
- 🔌 Laptop Charger: https://amzn.to/3ja0imP
- 💻 My Laptop (generally I like the Dell XPS series): https://amzn.to/38xrABL
- 📱 My Phone: Fairphone 4 (I love the sustainability and repairability aspect of it): https://amzn.to/3Jr4ZmV

If I had to purchase these items again, I would probably change the following:

- 🎙️ Rode NT: https://amzn.to/3NUIGtw
- 💻 Framework Laptop (I do not get a commission here, but I love the vision of Framework. It will definitely be my next Ultrabook): https://frame.work

As an Amazon Associate I earn from qualifying purchases.

-------

Timestamps:
00:00 Introduction
01:21 The scenario with periodic Boundary Conditions
02:31 Expected Outcome
03:42 Simplifications & Discretizations
05:44 Solution Strategy / Algorithm
07:24 Imports
07:43 Defining Constants
09:17 Boilerplate
09:32 Creating a Mesh
11:05 Periodic Central Differences
13:31 Periodic Five-Point Stencil for the Laplace Operator
14:56 Time-Loop Setup
15:11 Initial Condition
16:42 Convection
17:17 Diffusion
17:31 Velocity Update with explicit Euler
18:44 Enforce Wall Boundary Conditions
19:07 Advancing in time
19:29 Interactive Visualization Setup
21:22 First Run
21:58 Plotting in Dark-Mode - why not?
22:41 Visualizing velocity profile
23:44 Discussing the Hagen-Poiseuille profile
24:37 Playing with the parameters
25:42 Stability Considerations
27:27 Outro

Комментарии

Информация по комментариям в разработке