Package Structure¶
This page explains how the Pyskyfire repository is organised. It is written for users who are comfortable with engineering and Python scripts, but who may not have spent much time inside a Python package before.
The goal of this page is to give you a mental map of where things live, what each part is responsible for, and how the different parts of the project fit together.
1. The repository as a whole¶
When you open the Pyskyfire repository, you are looking at more than the Python code itself. A software repository usually contains:
the source code,
examples showing how the code is used,
validation cases showing whether the code reproduces known results,
documentation,
configuration files telling Python and Git how to treat the project,
images and generated content
A simplified view of the root directory is:
pyskyfire/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── pyproject.toml
├── docs/
├── examples/
├── images/
├── src/
└── validation/
The most important folder for the actual library code is src/. The other folders explain, demonstrate, test, package, or present that code.
File or folder |
What it is for |
|---|---|
|
Tells Git which files should not be tracked. In practice, this keeps local caches, virtual environments, build products, generated outputs, private data, and temporary files out of the repository history. |
|
Gives GitHub extra instructions about how to treat certain files. In Pyskyfire it marks generated HTML reports in |
|
States the legal terms for using and modifying the project. Pyskyfire uses the MIT License, which is permissive, but also makes clear that the software is provided without warranty. |
|
The front page of the GitHub repository. It introduces what Pyskyfire is, shows the main capabilities, gives a minimal installation command, and points users toward examples and validation cases. |
|
The main configuration file for the Python package. It defines the package name, version, core and optional dependencies, developer dependency groups, build system, and tells the build system that the importable package lives in |
|
Contains the documentation website. This includes tutorials, how-to guides, explanations such as this page, and generated API reference pages. |
|
Contains scripts that demonstrate how to use the package. These are primarily teaching material: they show workflows and interfaces that users can copy and adapt. |
|
Stores figures used in the README and documentation, such as plots, screenshots, and rendered engine or cooling-channel images. |
|
Contains the actual installable Python package. When a user writes |
|
Contains cases that compare Pyskyfire against reference data, published results, known solutions, or other tools. These are mainly about credibility rather than teaching the interface. |
2. src/pyskyfire/¶
The src/pyskyfire/ directory contains the code that becomes the pyskyfire Python package after installation.
The package content is as follows:
src/pyskyfire/
├── __init__.py
├── common/
├── network/
├── regen/
├── thermo/
├── pump/
├── turbine/
├── heat_exchanger/
├── ducts/
├── injector/
└── viz/
Each subfolder is a subpackage. A subpackage is a folder containing related Python modules. A module is a single .py file.
For example:
src/pyskyfire/regen/coupled_solver.py
is a module, and it belongs to the subpackage:
pyskyfire.regen
__init__.py¶
The top-level file src/pyskyfire/__init__.py marks pyskyfire as a Python package and exposes the main subpackages.
pyskyfire.common¶
common holds dependency-free primitives that any other subpackage can use. It does not import from regen, ducts, pump, turbine, network, or viz — this keeps it a true leaf package and avoids circular imports. Fluid definitions and property models belong to thermo.
Module |
Role |
|---|---|
|
Defines material-property models for solids. These can represent constant, polynomial, tabulated, or piecewise temperature-dependent properties such as thermal conductivity. |
|
Defines a dictionary-like |
|
Defines 2D cross-section primitives (circular and elliptical arcs, lines, boundary construction) shared by cooling-channel geometry in |
|
Shared heat-transfer functions: Bartz, Colburn, Gnielinski and recovery temperature. |
|
Shared Darcy factors and continuous-curvature corrections. |
|
Shared reversible acceleration pressure change. |
|
Defines |
|
Defines |
|
Stores shared constants that may be used across modules. Keeping constants in one place avoids repeating the same numbers throughout the code. |
|
Re-exports selected objects from the |
pyskyfire.network¶
network connects component models from other subpackages into a full engine-cycle calculation. Unlike common, it sits above the other subpackages: it is free to import from regen, ducts, thermo, and common.
Module |
Role |
|---|---|
|
Defines |
|
Defines the block interface used by the engine network. A block reads stations and/or scalar signals, performs a calculation, and returns updated stations and signals. |
|
Re-exports selected objects from the |
pyskyfire.regen¶
regen contains the thrust-chamber and regenerative-cooling model. This is one of the central subpackages in Pyskyfire.
A useful mental model is:
geometry + materials + coolant + hot-gas properties
↓
regenerative cooling solver
↓
wall temperatures, coolant temperatures, pressure losses, heat fluxes
Module |
Role |
|---|---|
|
Defines the hot-gas contour of the chamber and nozzle. It provides local radius, area, throat geometry, expansion ratio, contraction ratio, and wall slope. |
|
Defines cooling-channel cross-section models. These provide flow area, hydraulic diameter, thermal perimeter, coolant wetted perimeter, and thermal resistance information. |
|
Contains logic for channel-height distributions along the chamber. This lets cooling-channel geometry vary with axial position. |
|
Describes how cooling channels are placed around or inside the chamber wall. This includes channel counts and placement logic that affect per-channel mass flow. |
|
Ties the physical thrust-chamber model together. It contains wall layers, cooling circuits, film-cooling inputs, and the chamber object used by the solver. |
|
Shared engineering correlations used by the solver. |
|
Runs the regenerative-cooling calculation. It marches along the cooling circuit, solves local wall heat balances, and updates coolant temperature and pressure. |
|
Defines the regenerative-cooling film-property policy through |
|
Contains film-cooling model functionality. Film cooling is separate from regenerative cooling because coolant is injected into the hot-gas side rather than only flowing inside wall channels. |
|
Contains a newer or alternative film-cooling implementation. New users should normally start from documented examples or validation cases before relying on experimental modules. |
|
Re-exports selected objects from the |
pyskyfire.thermo¶
thermo owns fluid definitions, thermodynamic state resolution, transport properties, and combustion-gas aerothermodynamics. It connects engine geometry and propellant choices to the fluid properties needed by the rest of the package; coolant-specific heat-transfer policy remains in regen.
Module |
Role |
|---|---|
|
Defines |
|
Defines |
|
Defines |
|
Defines the |
|
Defines |
|
Defines |
|
Defines |
|
Publicly exports |
Thermo migration (unreleased)¶
Update imports directly; no backwards aliases are provided. Paths below are
relative to pyskyfire:
Previous import |
Current import |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All classes in the table are also available directly from pyskyfire.thermo.
Film-property evaluation is no longer a method on the state resolver: use
pyskyfire.regen.coolant_properties.film_properties(resolver, T_film, p, getters).
The coolant_transport argument on cooling circuits and film inputs retains its
name; pass a thermo.FluidTransport instance.
Old stored pickle files may require regenerating because modules and class names have changed. Compatibility with those files is not guaranteed.
pyskyfire.ducts¶
ducts holds duct hydraulics that no single component owns: the friction
physics shared by cooling channels and piping, explicit pipe geometry,
annular ducts, and volute and collector manifolds. It depends only on common for planar section
primitives and on thermo for fluid state records, and it imports from neither
regen nor network, so cooling channels, turbopump hardware and engine-cycle
adapters can all build on it without a circular import.
Module |
Role |
|---|---|
|
Shared path nodes, stations, connections, sampling of curves into paths ( |
|
Geometry-agnostic friction correlations shared with regen and heat exchangers. |
|
Explicit pipe geometry, with an optional core, and the loss march every duct shares: friction, bends, area change, and swirl. Returns a |
|
Annular ducts about the shaft ( |
|
Orifices (round, annular, slot) discharging into a volume, with isentropic flow that chokes and cavitates, and ISO 5167 orifice plates in a pipe. |
|
Volute cross-section families: an elliptical bore at fixed inlet slot width, sized by one parameter and reshaped by a second. |
|
Rules relating azimuth to passage size: conservation of angular momentum for a shaped volute, uniform area for a collector. |
|
The duct carrying a volute’s collected flow to its pipe flange, at any angle between tangential and radial and any elevation out of the volute’s own plane. |
|
Volute geometry generation and Aungier’s one-dimensional loss analysis. |
pyskyfire.injector¶
injector holds injector hardware and the flow through it. It depends on
ducts, whose Orifice is every hole, and on thermo; the engine network
adapts it through network.InjectorBlock. Each element type is its own class.
Module |
Role |
|---|---|
|
|
|
|
|
|
pyskyfire.pump / pyskyfire.turbine¶
The pump and turbine subpackages contain tools for turbopumps. They are both under development, and currently the pyskyfire package works fine without them. pump sizes radial impellers and generates their blade geometry. turbine designs axial turbines at mean radius (AxialTurbine), describes them as hardware (TurbineDefinition, BladeRow) and generates their blades. pump.PumpDuty and turbine.TurbineDuty state what each machine is asked to do. Volute manifolds live in pyskyfire.ducts, and the meridional passage both machine types share lives in pyskyfire.common.
pyskyfire.viz¶
viz turns simulation data into plots, reports, and geometry views. It is where the package moves from numerical results to things a user can inspect visually.
Module |
Role |
|---|---|
|
Defines common Plotly helper functionality used by several plotting classes. It provides shared behaviour for configuring, showing, and saving figures. |
|
Plotting tools for regenerative-cooling results, such as wall temperature, coolant temperature, pressure, heat flux, and heat-transfer coefficients. |
|
Plotting tools for film-cooling results. |
|
Plotting tools for aerothermodynamic and CEA-derived results. |
|
Shared plotting utilities used by several plotting modules. |
|
3D engine and cooling-channel visualisation tools. This includes geometry-oriented views of cooling circuits and engine structure. |
|
Visualisation tools for pump and impeller geometry. |
|
Adapts engineering objects — thrust chambers, impellers, pipes, annular ducts, volutes — into scene hierarchies. |
|
Report-generation helpers for collecting plots, tables, and simulation summaries. |
|
Lookup-table support used by plotting or reporting workflows. |
|
Re-exports selected visualisation functions and classes for easier imports. |
3. How the subpackages fit together¶
The subpackages each have a responsibility, but in order to run a regenerative cooling analysis or a full cycle analysis, the packages work together. A typical regenerative-cooling analysis might work like this:
commondefines shared, dependency-free primitives such as solids, results, and section geometry.thermodefines fluids and provides gas and coolant state and property models.regendefines the thrust chamber, cooling channels, wall layers, heat-transfer correlations, and regenerative-cooling solver.pumpandturbineprovide machinery-related utilities and can be connected into an engine-cycle model.network.engine_networkandnetwork.blocksallow component models to be connected into a full engine network.vizturns the resulting data into plots, reports, and geometry visualisations.
Geometry, material data, gas properties, heat-transfer correlations, numerical solvers, engine-cycle logic, and visualisation are different responsibilities. The idea is that keeping these responsibilities in different subpackages makes the code easier to test, replace, and understand.
4. Example versus validation entry¶
The differences between examples and validation cases are important.
An example primarily teaches usage. A good example says:
“Here is how you use this feature.”
It may use simplified input data. It may prioritise readability over physical correctness. It should be easy to copy, modify, and run.
Examples belong in the examples/ folder in the root directory.
A validation entry primarily tests credibility. A good validation case says:
“Here is evidence that this feature gives reasonable results for a known case.”
It should explain:
what reference data is used,
where the reference data came from,
what assumptions were made,
what quantities are compared,
where the model agrees and where it does not,
an interpretation of the result.
Validation cases belong in the validation/ folder in thr root directory:
A validation case can also be educational. After all, they show how the program is used to represent real hardware. But their primary purposes are different:
| Folder | Main question |
|—|—|—|
| examples/ | “How do I use this?” |
| validation/ | “What does the result reveal” |
5. How to read the code without getting lost¶
Pyskyfire is mostly written in an object-oriented style. This means that the code is organised around objects that represent things in the problem.
An object combines data and behaviour. For example, a thrust chamber is not only a list of numbers. It has geometry, wall layers, cooling circuits, coolant properties, and hot-gas properties. It also has methods that answer questions such as “what is the local channel area?” or “what is the wall thickness here?”
In object-oriented code, you can build larger objects from smaller objects:
Material models
↓
Wall layers
↓
Cooling-channel cross-section + channel placement + channel height
↓
Cooling circuit + Contour
↓
Thrust chamber
A ThrustChamber object therefore acts as a container for many other objects. It may contain a Contour, one or more CoolingCircuit objects, Wall objects, FluidTransport objects, and an aerothermodynamic model for the combustion gas. The solver therefore does not need every detail written directly inside solver.py. Instead, it receives the thrust-chamber object and asks it for the geometry, material, gas-property, and coolant-property information it needs.
A value used in the solver may come from another object several layers away. For example, the solver may ask a cooling circuit for its hydraulic diameter, and that cooling circuit may compute it from a cross-section object, a channel-height function, and a channel-placement object.
For regenerative cooling, start with:
Start here |
Why |
|---|---|
|
Shows a complete setup script where the objects are actually created and connected. |
|
Shows how the physical thrust chamber, wall layers, and cooling circuits are represented. |
|
Shows the regenerative and film-coupled cooling solve procedure. |
|
Shows the local equations and correlations used by the solver. |
|
Shows where the hot-gas properties come from. |
|
Shows how regenerative-cooling results are plotted. |
For engine-cycle work, start with:
Start here |
Why |
|---|---|
|
Defines the component blocks that read and write stations/signals. |
|
The underlying orchestrator that connects the blocks. |
6. Summary¶
Pyskyfire is organised like a typical Python engineering package:
pyproject.tomldefines how the package is built and installed..gitignorekeeps local, generated, private, and temporary files out of version control..gitattributeshelps GitHub classify generated outputs correctly.README.mdintroduces the project.docs/contains the documentation website.examples/teaches usage.validation/demonstrates credibility against reference cases.images/stores figures used in documentation and presentation.src/pyskyfire/contains the actual importable Python package.
Inside src/pyskyfire/:
commoncontains dependency-free shared primitives: solid-material helpers, results containers, and section geometry.networkcontains the engine-cycle blocks and theEngineNetworkorchestrator that connects them.regencontains thrust-chamber geometry, cooling-channel definitions, heat-transfer correlations, and the regenerative-cooling solver.thermoprovides fluid definitions, state resolution, transport-property interfaces, and CEA-based aerothermodynamics.pumpcontains preliminary centrifugal pump and impeller design tools.turbinecontains early turbine-related utilities.vizcontains plotting, reporting, and visualisation tools.
Pyskyfire is a set of cooperating objects and modules. The package separates geometry, properties, physics, solvers, engine-cycle blocks, and visualisation, and orchestrates them together to run a regenerative cooling or full cycle simulation.
pyskyfire.heat_exchanger¶
circuit.py defines channel banks, prescribed gas, and explicit thermal/flow
connections. solver.py couples segment heat rates to enthalpy and static
pressure. chamber.py places assemblies in prescribed chamber flow and reports
displaced volume. Paths come from ducts.path, sections from regen.cross_section,
and scalar correlations from common. See Heat exchangers.