How openorion/turbodesigner works
Project Overview and Identification
• TurboDesigner is an open-source turbomachinery design tool focused on generating axial compressors (and eventually axial turbopumps). It uses input parameters (e.g., pressure ratio, mass flow rate) to perform mean-line design, blade flow analysis, and finally produces a CAD model exportable to STL/STEP.
• The project is modular, with distinct components for flow calculations, blade and airfoil design, CAD model generation, and visualization.
Key Components
a. Input/Configuration:
• Parameters/Ingestion: Input files (e.g., tests/designs/*.json) supply design parameters.
• Environment & Setup: Environment configurations such as .devcontainer, .github workflows, and configuration files ensure consistent builds and tests.
b. Core Calculation Modules:
• Turbomachinery Module: Located in turbodesigner/turbomachinery.py, + turbodesigner/flow_station.py, turbodesigner/stage.py, and related classes. This module handles overall compressor design and performance calculations.
• Blade Design Module: Under turbodesigner/blade, containing subdirectories for blade-specific computations (e.g., vortex methods in free_vortex.py and common aerodynamic calculations).
• Airfoil Module: Found in turbodesigner/airfoils, with implementations like DCA.py and common.py to define and manage blade airfoil geometries.
• Attachments Module: Located in turbodesigner/attachments for additional design features.
c. CAD and Export Logic:
• CAD Module: turbodesigner/cad contains blades, casing, and shaft generation. This module translates calculated parameters into CAD models.
• Exporter: turbodesigner/exporter.py converts internal design representations to exportable formats (STL/STEP).
d. Visualization:
• in turbodesigner/visualizer.py to render or visually inspect the design.
e. Testing and Examples:
• Tests directory: Validates each subcomponent (compressor stages, blade design, etc.).
• Examples directory: Includes Jupyter notebooks (e.g., airfoil.ipynb, cad.ipynb) which serve as practical usage cases and demonstration of the design workflow.
Relationships and Data/Control Flow
• From the Turbomachinery module split out:
• The “Flow Station” component (managing basic fluid dynamics and thermodynamics)
• The “Stage” and “Blade Design” submodules where the physics of blade formation and vortex methods (e.g., FreeVortex) are applied.
• Link the “Airfoil Module” into “Blade Design” for geometric observations.
• “Exporter” that receives data from the CAD module and then outputs files in STL/STEP formats.
• A pathway to “Visualization” that likely taps into both raw design data and CAD outputs.
• Optionally, represent testing and examples as side processes that verify or demonstrate the flow from parameter ingestion to exported CAD models.
Architectural Patterns & Design Principles
• A modular, layered architecture. Each module (turbomachinery, blade, CAD, visualization) maintains single responsibility, making testing and future enhancement easier.
• That the design supports extension (e.g., adding different methods for blade analysis or additional geometries).
• Separation between computation and presentation (visualization and CAD export are clearly distinct from the aerodynamic calculations).
Including Technologies and Frameworks
• External libraries: For instance, note that CadQuery is used for CAD operations (pip installs indicate its importance).
• Developer tooling such as Gitpod, VSCode, and GitHub Actions (from .github/workflows) should be noted in auxiliary areas to emphasize development environment support.