Skip to main content

outram_foam_basic_lib/
lib.rs

1// SPDX-License-Identifier: GPL-3.0-only
2// Copyright (C) 2026 OUTRAM PARK contributors
3// Derived from OpenFOAM (www.openfoam.com)
4// Copyright (C) 2004-2023 OpenFOAM Foundation
5// Copyright (C) 2016-2023 OpenCFD Ltd.
6//
7// This file is part of OUTRAM PARK.
8//
9// OUTRAM PARK is free software: you can redistribute it and/or modify it
10// under the terms of the GNU General Public License as published by the
11// Free Software Foundation, either version 3 of the License, or (at your
12// option) any later version.
13//
14// OUTRAM PARK is distributed in the hope that it will be useful, but
15// WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17// General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License along
20// with OUTRAM PARK.  If not, see <https://www.gnu.org/licenses/>.
21
22//! **This is OUTRAM PARK's independent Rust translation of selected
23//! OpenFOAM® primitive/finite-volume algorithms — it is not the official
24//! OpenFOAM® software and is not affiliated with, endorsed by, or
25//! sanctioned by OpenCFD Ltd. or the ESI Group.** OpenFOAM® is a registered
26//! trademark of OpenCFD Limited. See `TRADEMARKS.md` (this crate's
27//! directory, mirrored from the workspace root) for the full attribution
28//! and non-affiliation notice.
29
30/// Layer 2 — field containers (`VolField`/`SurfaceField`), boundary
31/// conditions, and field-level tensor algebra.
32pub mod fields;
33/// Layer 4 — field-level fluid and solid thermodynamics (`FluidThermo`,
34/// `SolidThermo`, `PsiThermo`, `RhoThermo`).
35pub mod fluid_thermo;
36/// Layer 3 — finite-volume discretisation operators (`fvc` explicit, `fvm`
37/// implicit, and `adjust_phi` continuity correction).
38pub mod fv_operators;
39/// Layer 1f — one-dimensional data interpolation (linear and spline).
40pub mod interpolation;
41/// Layer 2 — asymmetric Krylov iterative solvers (BiCGStab, restarted GMRES)
42/// and preconditioners (Jacobi, ILU(0)) for the sparse `LduMatrix`.
43pub mod krylov;
44/// Layer 2 — sparse LDU (lower/diagonal/upper) matrices, the assembled
45/// `FvMatrix`, and iterative linear solvers (CG, Gauss–Seidel, GAMG).
46pub mod ldu_matrix;
47pub mod limiters;
48/// Layer 1g — mathematical special functions (inverse error function,
49/// incomplete gamma functions and their inverse).
50pub mod math;
51/// Layer 1b — dense `SquareMatrix` with direct (LU) solve.
52pub mod matrix;
53/// Layer 2 — the finite-volume mesh: cells, faces, boundary patches, and
54/// geometric metrics.
55pub mod mesh;
56/// OpenFOAM ASCII case I/O — `FoamFile` dictionaries, `polyMesh` read/write,
57/// time-directory field read/write, and whole-case reading.
58pub mod io;
59/// Layer 1e — ordinary-differential-equation solvers (Euler, RKF45,
60/// Rosenbrock23).
61pub mod ode;
62/// Layers 1c/1d — polynomial evaluation and closed-form equation solvers
63/// (linear, quadratic, cubic).
64pub mod polynomial;
65/// Convenience re-exports of the most commonly used types and functions.
66pub mod prelude;
67/// Layer 1a — dimensionless scalar constants and the tensor-algebra
68/// primitives (`Vector3`, `Tensor`, `SymmTensor`, `SphericalTensor`).
69pub mod primitives;
70/// Layer 1h — specie-level thermophysics: equations of state, thermo, and
71/// transport models.
72pub mod thermophysics;
73
74/// this part is extension in Rust
75/// Now under here, I want to expose the openfoam primitives to something
76/// that can be human readable
77///
78/// Also useful add-ons for the underlying libraries are put here,
79/// eg. generating one dimensional meshes for system code type simulations
80/// in TAMPINES
81pub mod interface;