Metadata-Version: 2.4
Name: cfdlab
Version: 1.2.0
Summary: Terminal-first CAE orchestrator: drive external CAD, meshing, and solver programs from one parametric project file
Author: Nghia
License: MIT
Project-URL: Homepage, https://github.com/TranTrongNghiaNguyen/CFDLab
Project-URL: Repository, https://github.com/TranTrongNghiaNguyen/CFDLab
Project-URL: Documentation, https://github.com/TranTrongNghiaNguyen/CFDLab/blob/main/docs/orchestrator_guide.md
Project-URL: Issues, https://github.com/TranTrongNghiaNguyen/CFDLab/issues
Keywords: cae,cfd,orchestration,workflow,meshing,su2,gmsh,openfoam,simulation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: numerical
Requires-Dist: numpy>=1.26; extra == "numerical"
Requires-Dist: scipy>=1.11; extra == "numerical"
Requires-Dist: pandas>=2.0; extra == "numerical"
Provides-Extra: geometry
Requires-Dist: gmsh>=4.11; extra == "geometry"
Requires-Dist: meshio>=5.3; extra == "geometry"
Requires-Dist: build123d>=0.9; extra == "geometry"
Provides-Extra: visualization
Requires-Dist: matplotlib>=3.8; extra == "visualization"
Requires-Dist: pyvista>=0.43; extra == "visualization"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: ruff==0.16.0; extra == "dev"
Requires-Dist: mypy==2.3.0; extra == "dev"
Provides-Extra: all
Requires-Dist: cfdlab[geometry,numerical,visualization]; extra == "all"
Dynamic: license-file

# CFDLab

**A terminal-first CAE orchestrator.** You enter parameters; CFDLab passes them to the
CAD, meshing, solver, and post-processing programs you already have installed, and
re-runs only the steps your change affected.

CFDLab **draws no CAD, generates no mesh, and solves no equations**. It is the conductor,
not the orchestra. Gmsh meshes, SU2 solves, ParaView renders — CFDLab decides what to run,
with which parameters, and in what order. Think ANSYS Workbench's dependency behaviour, in
a terminal, over open-source tools.

## Install

```bash
pip install cfdlab
```

The orchestrator is **stdlib-only** — no compiled wheels, nothing to break. The scientific
stack is optional, and only needed for the analysis subpackages:

```bash
pip install "cfdlab[numerical]"     # numpy, scipy, pandas
pip install "cfdlab[geometry]"      # gmsh, meshio, build123d
pip install "cfdlab[visualization]" # matplotlib, pyvista
pip install "cfdlab[all]"           # everything above
```

CFDLab ships no CAE software. Install Gmsh, SU2, FreeCAD, or OpenFOAM yourself and point
CFDLab at them.

## Quick start

Describe your case in one file:

```toml
[parameters.mesh]
size = 0.01

[parameters.solve]
mach = 0.3

[backends.gmsh]
command = ["gmsh", "wing.step", "-clmax", "{mesh.size}", "-3", "-o", "mesh.su2"]

[backends.su2]
command = ["SU2_CFD", "case.cfg"]

[[nodes]]
id = "mesh"
stage = "mesh"
backend = "gmsh"
produces = ["mesh.su2"]

[[nodes]]
id = "solve"
stage = "solve"
backend = "su2"
depends_on = ["mesh"]
consumes = ["mesh.su2"]
produces = ["flow.dat"]
```

Then drive it:

```bash
cfdlab-orchestrator project.toml
```

```text
cfdlab> doctor                # is every program actually on PATH?
cfdlab> run                   # mesh, then solve
cfdlab> set mesh.size 0.005   # only mesh and solve re-run — CAD is untouched
cfdlab> resume                # continue after a crash; keep the finished mesh
```

Adding a program means writing its command line. Removing one means deleting that line.
No CFDLab code changes.

## What it does

| Capability | What it means in practice |
|---|---|
| Dependency graph | Change a mesh parameter and the CAD step is not re-run; the solve is |
| Hot-reload | Save the project file and the affected steps re-run on their own |
| `resume` | A crashed overnight solve does not cost you the eight-hour mesh |
| `[[loops]]` | Two-way FSI/CHT coupling, and transient time marching |
| Artifact contracts | A program that exits 0 without writing its file is recorded as failed |
| Units | `set chord 250 mm` reaches a metre-based model as `0.25`; wrong dimensions are refused |
| `sweep` | Parametric studies and DOE, each case in its own directory |
| `converge` | Grid convergence with Roache's GCI — a coefficient from one mesh is not a result |
| `optimize` | Closed-loop design search driven by your solver |
| Streaming logs | `tail -f logs/solve.out.log` while the solver runs |

## Documentation

[Full user guide](docs/orchestrator_guide.md) — bilingual (Tiếng Việt + English), covering
project files, connecting your installed software, presets, units, and every command.

## Beyond the orchestrator

The repository also contains research subpackages for geometry, airfoils, meshing, and SU2
automation. These need the extras above and are at varying maturity; the orchestrator is
the part that is packaged and documented for use.

## Project status

v1.2.0, in development. 2007 automated tests. Python 3.12+. Linux.

## License

MIT
