Skip to content

Commit 1b10010

Browse files
committed
Update docstrings
1 parent a5fa0a3 commit 1b10010

15 files changed

Lines changed: 92 additions & 116 deletions

carbonfly/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
- Website: https://github.com/RWTH-E3D/carbonfly
1010
"""
1111

12-
__version__ = "0.8.0"
12+
__version__ = "0.8.0"

carbonfly/blockmesh_writer.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Writers for OpenFOAM blockMesh configuration files.
3+
4+
This module provides helper functions to generate `blockMeshDict`
5+
files for OpenFOAM cases, based on structured geometry definitions
6+
and user-defined mesh parameters.
7+
8+
The generated dictionaries are intended to be used as the base mesh
9+
before further refinement steps (e.g. snappyHexMesh).
1010
"""
1111

1212
from __future__ import annotations

carbonfly/boundary.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Data models for OpenFOAM boundary condition definitions.
3+
4+
This module defines lightweight Python data structures used to
5+
describe physical boundary conditions (e.g. inlet, outlet, wall)
6+
in a solver-agnostic way.
7+
8+
The boundary objects are later consumed by writer modules to
9+
generate OpenFOAM-compatible field dictionaries.
1010
"""
1111

1212
from __future__ import annotations

carbonfly/case.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
High-level OpenFOAM case builder.
3+
4+
This module orchestrates the full case generation workflow by combining
5+
geometry processing (Rhino Breps -> meshes -> STL export) with OpenFOAM
6+
dictionary and field writers.
7+
8+
It is intended as a convenience layer for Grasshopper components where
9+
a single function call generates a runnable OpenFOAM case folder.
1010
"""
1111

1212
from __future__ import annotations

carbonfly/constant_writer.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Writers for OpenFOAM `constant/` configuration files.
3+
4+
This module provides helper functions to populate the `constant/` directory
5+
of an OpenFOAM case using template dictionaries shipped with carbonfly.
106
"""
117

128
from __future__ import annotations

carbonfly/control_dict.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Writers and helpers for OpenFOAM `system/controlDict`.
3+
4+
This module provides utilities to generate and customize `controlDict`
5+
files for OpenFOAM cases, supporting both steady-state and transient
6+
simulations.
107
"""
118

129
from __future__ import annotations

carbonfly/field_writer.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Writers for OpenFOAM `0/` field files.
3+
4+
This module generates OpenFOAM initial/boundary condition files under the `0/`
5+
directory (e.g., `0/U`, `0/T`, `0/p`, `0/CO2`) based on patch-level field
6+
specifications.
7+
8+
It is designed to work together with `carbonfly.boundary`, where each patch
9+
spec object exposes a `to_dict()` representation (e.g., fixedValue, inletOutlet,
10+
wall functions). The writer converts these specs into OpenFOAM-compatible
11+
`boundaryField { ... }` blocks and assigns a suitable `internalField`.
1012
"""
1113

1214
from __future__ import annotations

carbonfly/fv_writer.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Writers and patchers for OpenFOAM `system/fvSchemes` and `system/fvSolution`.
3+
4+
This module helps manage finite-volume (FV) configuration files by:
5+
- Selecting and copying built-in `fvSchemes` / `fvSolution` templates into an
6+
OpenFOAM case (`<case>/system/`).
7+
- Optionally patching solver settings in `fvSolution`, currently focused on the
8+
`PIMPLE { ... }` block (e.g., `pRefPoint` and `residualControl`).
9+
10+
The functions are intended for programmatic case generation workflows, where
11+
users may start from carbonfly templates and then apply small, targeted edits
12+
without maintaining full custom dictionaries.
1013
"""
1114

1215
from __future__ import annotations

carbonfly/geo.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Geometry data models and RhinoCommon helpers for carbonfly.
3+
4+
This module defines the core geometry container used by carbonfly's case builder:
5+
- `CFGeo`: a single CFD region/surface entity (name + Brep + Boundary + refinement)
6+
- `Refine`: snappyHexMesh surface refinement levels (min_level, max_level)
107
118
.. note::
129
This module depends on the RhinoCommon API and can only be used

carbonfly/iaq.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
"""
2-
carbonfly
3-
a lightweight, easy-to-use Python API and
4-
toolbox for indoor CO2 CFD simulations in Grasshopper
5-
based on OpenFOAM and WSL
6-
7-
- Author: Qirui Huang
8-
- License: LGPL-3.0
9-
- Website: https://github.com/RWTH-E3D/carbonfly
2+
Indoor Air Quality (IAQ) utilities.
3+
4+
This module provides standards-based, CO2-based IAQ evaluation helpers that
5+
can be used in Carbonfly workflows (e.g., post-processing simulation results or
6+
interpreting sensor measurements).
107
"""
118

129
from __future__ import annotations

0 commit comments

Comments
 (0)