In this tutorial, I go step-by-step through the original 12 Steps to Navier-Stokes that was created by Lorena Barber.
However, I use the API from this library which uses many other libraries as the backbone, e.g. FiniteDiffX, Diffrax, jaxdf, and kernex.
1D Problems¶
Linear Convection
∂t∂u+c∂x∂u=0 Diffusion
∂t∂u=ν∂x2∂2u Advection Diffusion
∂t∂u+u∂x∂u=ν∂x2∂2u 2D Problems¶
Linear Convection
∂t∂u+c∂x∂u+c∂y∂u=0 Nonlinear Convection
∂t∂u+u∂x∂u+v∂y∂u∂t∂v+u∂x∂v+v∂y∂v=0=0 Diffusion
∂t∂u=ν∂x2∂2u+ν∂y2∂2u Burgers Equation
∂t∂u∂t∂v+u∂x∂u+v∂y∂u=ν(∂x2∂2u+∂y2∂2u)+u∂x∂v+v∂y∂v=ν(∂x2∂2v+∂y2∂2v) Elliptical Equations¶
Laplace's Equation
∂x2∂2p+∂y2∂2p=0 Poisson's Equation
∂x2∂2u+∂y2∂2u=∇u=b Navier-Stokes (TODO)
∂t∂u∂t∂v∂x2∂2p+u∂x∂u+v∂y∂u=−ρ1∂x∂p+ν(∂x2∂2u+∂y2∂2u)+u∂x∂v+v∂y∂v=−ρ1∂y∂p+ν(∂x2∂2v+∂y2∂2v)+∂y2∂2p=−ρ(∂x∂u∂x∂u+2∂y∂u∂x∂v+∂y∂v∂y∂v)