Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikhail11235/maccormacksolver
MacCormack solver for Burgers equation
https://github.com/mikhail11235/maccormacksolver
Last synced: 8 days ago
JSON representation
MacCormack solver for Burgers equation
- Host: GitHub
- URL: https://github.com/mikhail11235/maccormacksolver
- Owner: Mikhail11235
- Created: 2022-12-23T16:29:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T16:47:07.000Z (almost 2 years ago)
- Last Synced: 2024-03-06T18:18:12.316Z (9 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MacCormackSolver
MacCormack solver for Burgers equationBurgers equation:
$$\frac{\partial{u}}{\partial{t}} + u\frac{\partial{u}}{\partial{x}} = \frac{1}{Re}\frac{\partial^2{u}}{\partial{x}^2}$$
where
$$u(-50, 0) = u(-50, t) = -1$$
$$u(50, 0) = u(50, t) = 1$$
$$u(x, 0) = 0, x \in (-50, 50)$$MacCormack method:
$$u_j^{\overline{n + 1}} = u_j^n - \frac{\Delta t}{\Delta x} (F_{j+1}^n - F_{j}^n) + r (u_{j+1}^n - 2 u_{j}^n + u_{j-1}^n)$$$$u_j^{n + 1} = \frac{1}{2}\Bigl( u_j^n + u_j^{\overline{n + 1}} - \frac{\Delta t}{\Delta x} (F^{\overline{n + 1}}_j - F^{\overline{n + 1}}_{j-1})+ r (u_{j+1}^{\overline{n + 1}} - 2 u_{j}^{\overline{n + 1}} + u_{j-1}^{\overline{n + 1}})\Bigr)$$
where $r = \frac{\Delta t}{(\Delta x)^2 * Re}$
![maccormack-all](https://user-images.githubusercontent.com/59762084/209370168-04848ae6-46fa-4c03-b75e-852e625ecc3b.png)