Dzahui is a library oriented to real-time simulation of ODE/PDE via Finite Element Method and OpenGL providing a simple interface.
To use it, one simply creates an .obj file (see blender and obj files) composed of triangles representing a mesh, specifies initial and/or boundary conditions:
rust
let naviers_params = StokesParams::static_pressure().
hydrostatic_pressure(100_f64)
.density(1_f64)
.force_function(
Box::new(|_| -10_f64)
)
.build();
builds a window indicating the problem to solve:
```rust let windowbuilder: DzahuiWindowBuilder = DzahuiWindow::builder("./assets/1dbar.obj") .solvestaticpressure(naviersparams) .withintegrationiteration(350);
let window = window_builder.build(); ```
and runs the window:
rust
window.run();
The resulting mesh will be colored from blue to red indicating speed (or pressure in the case of the hydrostatic pressure equation).
For now, only three equations with Dirichlet boundaries are implemented, but more will be added in the future, including two an three-dimensional cases of Navier Stokes.
Dzahui is available on crates.io. Only add it as a dependency and follow one of the many binaries available in the crate to generate a simulation.
Dzahui has a few ways to interact with the GUI:
On MacOS:
* You can press esc
to quit simulation
* Press s
to save current result
* Hold t
to view triangles of mesh
* Left-click and move mouse or trackpad to move camera
Dzahui is a project to mayor in physics at Facultad de Ciencias, UNAM.