TEP4280: Introduction to Computational Fluid Dynamics
# Model Equations
## Burger's Equation
$$\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} = \nu \frac{\partial ^2 u}{\partial x^2} $$
The inviscid version of the equation is
$$\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} = 0$$
The linear version of the Burger's Equation is often called the Convection–Diffusion equation
$$\frac{\partial u}{\partial t} + u_0 \frac{\partial u}{\partial x} = \alpha \frac{\partial ^2 u}{\partial x^2} $$
### Numerical Schemes
### Application
## Diffusion Equation
$$\frac{\partial u}{\partial t} = \alpha \frac{\partial ^2 u}{\partial x^2} $$
The diffusion equation is parabolic.
### Numerical Schemes
### Application
The diffusion equation is applied when a quantity $u$ is being distributed throughout a space or body with out moving the initial source of the quantity.
#### Heat Conduction
$$\frac{\partial T}{\partial t} = \alpha \frac{\partial ^2 T}{\partial x^2} $$
where $T$ is the temperature, and $alpha$ is the heat conduction constant.
#### Flow in porous media
$$\frac{\partial u}{\partial t} = c \frac{\partial ^2 u}{\partial x^2} $$
## Poisson Equation
$$\frac{\partial ^2 u}{\partial x^2} + \frac{\partial ^2 u}{\partial y^2} = f(x, y)$$
Setting $f(x, y) = 0 $ will give the Laplace equation.
### Numerical Schemes
### Application
## Wave Equation
$$\frac{\partial ^2 u}{\partial t^2} = \alpha_0 ^2 \frac{\partial ^2 u}{\partial x^2}$$
The linear version of the eqaution is
$$\frac{\partial u}{\partial t} + \alpha_0 \frac{\partial u}{\partial x} = 0$$
### Numerical Schemes
### Application
# Boundary Conditions
# Numerical Methods
## Euler
$$ y_{n+1} = y_n + h \cdot f(t_n, y_n)$$
### Errors
$$ e_{n+1} = \mathcal{O} (h^2)$$
$$ E_n = \mathcal{O} (h)$$
### Stability Region
$$ \{z \in \mathbb{C} |\quad |1 + z| \leq 1\}$$
## Implicitt Euler
$$ y_{n+1} = y_n + h \cdot f(t_{n+1}, y_{n+1})$$
### Errors
$$ E_n = \mathcal{O} (h)$$
### Stability Region
$$ \{z \in \mathbb{C} |\quad |\frac{1}{1- z}| \leq 1\}$$
## Trapezoidal
$$y_{n+1} = y_n + h\cdot \frac{1}{2}\cdot [f(x_n, y_n) +(f(x_{n+1}, y_{n+1})] $$
### Errors
$$ e_{n+1} = \mathcal{O} (h^3)$$
$$ E_n = \mathcal{O} (h^2)$$
### Stability region
$$ \{z \in \mathbb{C} | Re(z) < 0\}$$
## Heun
$$y_{n+1} = y_n + h\cdot \frac{1}{2}\cdot [f(x_n, y_n) +(f(x_{n+1}, y*_{n+1})] $$
where $y*_{n+1} = y_n + h\cdot f(x_n, y_n) $
### Errors
$$ e_{n+1} = \mathcal{O} (h^3)$$
$$ E_n = \mathcal{O} (h^2)$$
### Stability Region
$$ \{z \in \mathbb{C} |\quad |1 + z + \frac{z^2}{2}| \leq 1\}$$
## Runge-Kutta
$$ k_1 = f(t_n, y_n)$$
$$ k_2 = f(t_n + \frac{h}{2}, y_n + \frac{h}{2}\cdot k_1)$$
$$ k_3 = f(t_n + \frac{h}{2}, y_n + \frac{h}{2}\cdot k_2)$$
$$ k_2 = f(t_n + h, y_n + h\cdot k_3)$$
$$ y_{n+1} = y_n + \frac{h}{6} \cdot (k_1 + 2k_2 + 2k_3 + k4)$$
### Errors
$$ e_{n+1} = \mathcal{O} (h^5)$$
$$ E_n = \mathcal{O} (h^4)$$
### Stability Region
$$ \{z \in \mathbb{C} |\quad |1 + z + \frac{z^2}{2}+ \frac{z^3}{6}+ \frac{z^4}{24}| \leq 1\}$$
# Discretization methods
## FDM
## Definitions for FDM
#### General
Finite Difference Methods approximates in-between states and derivatives as
$$ \frac{d u(x_{j +\frac{1}{2}})}{dx} \approx \frac{u_{j +1} - u_j}{\Delta x}$$
$$ \frac{d^2 u(x_j)}{dx^2} \approx \frac{u_{j +1} -2 u_j + u_{j-1}}{\Delta x^2}$$
#### Consistency
A FDM of a PDE is called __consistent__ if it approximates the PDE such that the truncation error TE = FDM - PDE goes to zero as $\Delta x $ and $\Delta t$ goes to zero.
#### Stability
A FDM of a PDE is called __stable__, if the 2-norm of the FDM solution $ \mathbf{u}^n $ stays bounded for any time level $n$. Translated to english; for an initial value problem with inital condition $u(x, 0) = u^0(x)$, $ \mathbf{u}^n $ satisfies
$$\parallel\mathbf{u}^n \parallel _2 \space\leq \space Ke^{\alpha t_n}\parallel\mathbf{u}^0 \parallel _2$$
where $K$ and $\alpha$ are constants independent $\mathbf{u}^0$, $\Delta x$, and $\Delta t$.
Usually $ \alpha = 0$.
Stability for a discretization method is derived through __von Neumann stability analysis__, also known as Fourier analysis.
This analysis requires the following
1. The FDM is linear.
2. The FDM has constants coefficients.
3. The problem has __periodic__ boundary conditions.
4. The grid is __equidistant__.
### FTCS
$$ \frac{u_j^{n+1} - u_j ^n}{\Delta t} = \alpha \frac{u_{j +1}^n -2 u_j^n + u_{j-1}^n}{\Delta x^2}$$
## FVM
## FEM
## Spectral method
## Spectral element methods
# Termonology