A CFD python package for the shallow water equations
A CFD python package for the shallow water equations.
MattFlow simulates the surface of the water after any initial conditions, such as drops or stones falling on.
How to install & run MattFlow
- anaconda environment (recommended)
$ conda create --name mattflow python=3 matplotlib $ conda activate mattflow $ pip install mattflow $ mattflow
- venv (python>=3.3)
$ python3 -m venv mattflow_env $ source mattflow_env/bin/activate $ pip install mattflow $ mattflow
$ pip install --user mattflow $ mattflow
Swallow Water Equations
SWE is a simpified CFD problem which models the surface of the water, with the assumption
that the horizontal length scale is much greater than the vertical length scale.
SWE is a coupled system of 3 hyperbolic partial deferential equations, that derive from
conservation of mass and conservation of linear momentum (Navier-Stokes) equations, in
case of a horizontal stream bed, with no Coriolis, frictional or viscours forces (wiki).
η : height
u : velocity along the x axis
υ : velocity along the y axis
ρ : density
g : gravity acceleration
More details at this jupyter notebook
- configuration of the simulation via a config file
- mesh sizing
- domain sizing
- initial conditions (single drop, multiple drops, rain)
- boundary conditions (currently: reflective)
- plotting style
- animation options
Currently, you can configure the simulation at the config module
- Simple API to configure the simulation
- Implementation of higher order schemes
- Addition of source terms
- Addition of viscous models
- Moving core to C++, Cython or Numba
- Support moving objects inside the domain
- Unstructured mesh
- Extent to 3D CFD
Start the flow!
(C) 2019, Thanasis Mattas
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size mattflow-1.0.6-py3-none-any.whl (34.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size mattflow-1.0.6.tar.gz (17.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|