1 unstable release
0.1.0 | Apr 17, 2020 |
---|
#26 in #average
58KB
273 lines
Finite-volume methods in Rust 🌪️
lib.rs
:
Use Godunov's method to solve linear partial differential equations in 1D.
Godunov's idea:
- Discretize domain into non-overlapping cells.
- Compute average of the initial condition in each cell.
- Solve a Riemann problem on each boundary to find the fluxes.
- Advance each cell average.
This implementation uses simple convective upwinding.
Properties
Godunov's method is 1st-order in space and time. Twice as many cells cuts the error in half.
When would I use this?
This scheme was cutting edge in 1959. These days, it's used as a basis for more advanced methods.
That said, it's a classic result from one of the founding fathers of computational fluid dynamics.
Dependencies
~65MB
~863K SLoC