Crates.io | Dzahui |
lib.rs | Dzahui |
version | 0.2.0 |
source | src |
created_at | 2022-03-24 23:46:12.758884 |
updated_at | 2023-04-01 21:17:29.871148 |
description | CFD Library for real-time simulation |
homepage | https://github.com/Arthur-phys/Dzahui |
repository | https://github.com/Arthur-phys/Dzahui |
max_upload_size | |
id | 555976 |
size | 1,217,151 |
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:
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:
let window_builder: DzahuiWindowBuilder = DzahuiWindow::builder("./assets/1dbar.obj")
.solve_static_pressure(naviers_params)
.with_integration_iteration(350);
let window = window_builder.build();
and runs the window:
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:
esc
to quit simulations
to save current resultt
to view triangles of meshDzahui is a project to mayor in physics at Facultad de Ciencias, UNAM.