Simulating Pipe Flow on a Staggered Grid in Python | with Inflow & Outflow

preview_player
Показать описание

The pipe flow (sometimes also called channel flow) is one of the simplest scenarios for interior flows. Due to the viscous effects of the Navier-Stokes equations, boundary layers create in the proximity to the walls at the top and bottom edge. The strength of these layers increases over the longitudinal axis of the pipe as well as over time until we reach a steady state.

-------

-------

Timestamps:
00:00 Introduction
01:27 Scenario, Geometry & Boundary
00:03:13 Expected Outcome
00:04:18 Co-Located Grid and its problems
00:06:58 Staggered Grid
00:10:35 Ghost Cells Layer in the Staggered Grid
00:13:28 Solution Algorithm (P2 pressure correction scheme)
00:17:20 Imports
00:17:58 Defining Simulation Constants
00:19:37 Main Function Boilerplate
00:19:56 Creating the mesh
00:21:54 Initial Condition
00:27:03 Preallocate Arrays
00:27:52 Time Loop Setup
00:28:08 Momentum Update Overview
00:28:22 Diffusion on u grid
00:30:41 Convection on u grid
00:35:15 Pressure Gradient on u grid
00:36:49 Solve u momentum equation
00:37:53 Boundary Conditions on u grid
00:40:50 Diffusion on v grid
00:42:11 Convection on v grid
00:46:19 Pressure Gradient on v grid
00:47:17 Solve v momentum equation
00:47:50 Boundary Conditions on v grid
00:51:27 Compute divergence of tentative velocity
00:53:55 Compute Pressure Poisson right-hand side
00:54:24 Solve Pressure Poisson Correction Problem
00:58:07 Pressure Boundary Conditions
01:00:59 Update the pressure
01:01:36 Correct Velocities for Incompressibility
01:04:24 Boundary Conditions for Velocity again
01:05:29 Advance in time
01:06:07 Visualization setup
01:09:02 First Run
01:09:29 Tweak Simulation
01:10:03 Dark Mode
01:10:48 Colorbar and Vector Plot
01:12:43 More Tweaks
01:13:04 Highlighting the cross-sectional velocity profile
01:15:53 Discussion
01:16:20 Ensure Global Mass Conservation
01:20:56 Stability Considerations
01:22:30 Outro
Рекомендации по теме
welcome to shbcf.ru