Skip to content

saakethramoju/FullFlow

FullFlow

PyPI version Python Downloads License Build Release

FullFlow is a Python framework for fluid, thermal, and propulsion network simulation.

It provides a component-based architecture for constructing and solving engineering systems composed of interconnected fluid, thermal, combustion, turbomachinery, and heat-transfer elements.

FullFlow is inspired by tools such as:

  • ROCETS
  • GFSSP
  • NPSS
  • EcosimPro

while remaining fully open-source and Python-native.

Why FullFlow?

Engineering systems are often modeled as networks:

  • Fluid networks
  • Thermal networks
  • Feed systems
  • Propulsion systems
  • Turbomachinery systems
  • Heat exchanger systems
  • Regenerative cooling systems
  • Coupled fluid-thermal systems

Traditional network solvers are frequently proprietary, difficult to extend, or difficult to integrate into modern Python workflows.

FullFlow allows engineers to construct simulation networks directly in Python using reusable components and shared states.

For example:

from fullflow import *

FeedSystem = Network("Feed System")

SourcePressure = State(5e5)
TankPressure = State(3e5)

FeedLine = DarcyWeisbach(
    "Feed Line",
    FeedSystem,
    upstream_pressure=SourcePressure,
    downstream_pressure=TankPressure,
)

solution = SteadyState(FeedSystem).solve()

0.1.3 Core Streamline

FullFlow 0.1.3 starts a core cleanup focused on API consistency and speed. The System layer now uses lighter State, Composition, Balance, Component, and Network internals, cached iteration-variable metadata, safer StateLike handling, simpler export paths, and fewer unnecessary imports. The unused Exceptions package has been removed in favor of standard Python exceptions.

The solver and component layers were also streamlined. SteadyState.py is now a thin public wrapper over the modular Solvers/steady_state/ implementation, Network.solve() is available for simpler scripts, and common scalar branch calculations now avoid unnecessary NumPy calls. Solver runtime plans are keyed to Network.version, so repeated residual calls reuse cached metadata until the network structure changes. Lookup components cache dynamic attribute proxies, callable signature metadata, reusable-object update checks, and optional memoized results through memo_size, reducing overhead in ThermoProp-heavy networks.

New code may also use the lower-case import aliases fullflow.core and fullflow.components.*; the existing fullflow.System.* imports remain supported.

Features

  • Component-based network architecture
  • Steady-state network solver
  • Fluid, thermal, and propulsion modeling
  • Real fluids, ideal gases, and propellants
  • Temperature-dependent material properties
  • Compressible and incompressible flow
  • Conduction, convection, and radiation
  • Turbomachinery maps
  • Model switching and correlation comparison
  • HDF5 result and statistics export
  • Pure Python implementation

Example Applications

FullFlow can be used to model:

  • Pump-fed liquid rocket engines
  • Pressure-fed propulsion systems
  • Turbomachinery and pump maps
  • Counterflow heat exchangers
  • Regenerative cooling systems
  • Fluid mixture separation and mixing
  • Compressible flow systems
  • Coupled fluid-thermal networks
  • Material thermal response
  • Engineering correlation studies

Installation

pip install fullflow

or

uv add fullflow

Core Concepts

FullFlow models engineering systems using three primary concepts:

Network

A Network contains the complete engineering system.

Networks manage:

  • Components
  • States
  • Tracking variables
  • Solver interactions
NetworkModel = Network("Example System")

State

A State represents a simulation variable.

Examples include:

  • Pressure
  • Temperature
  • Mass flow rate
  • Enthalpy
  • Heat rate
  • Rotor speed
Pressure = State(5e5)
Temperature = State(300)

Component

A Component represents a physical device, process, or relationship.

Examples include:

  • Pipes
  • Valves
  • Pumps
  • Tanks
  • Heat transfer elements
  • Sensors
  • Fluid property models

Components define equations that contribute to the overall network solution.

Custom Components

Custom components should be ordinary Python classes with simple physics in evaluate_states(). They expose equations through two clear properties:

  • dynamics for real storage, inertia, or capacitance. Steady state drives the derivative to zero; transient integrates it.
  • balances for algebraic equations that have no storage of their own.

A simple algebraic component looks like this:

class PumpPressureMatch(Component):
    def __init__(self, name, network, mass_flow, pressure_error=0.0):
        self.pressure_error = 0.0
        self.setup()

    def evaluate_states(self):
        self.pressure_error = self.predicted_pressure.value - self.target_pressure.value

    @property
    def balances(self):
        return [(self.mass_flow, self.pressure_error)]

A simple dynamic component looks like this:

class FirstOrderDecay(Component):
    def __init__(self, name, network, x=1.0, rate=1.0):
        self.x_dot = 0.0
        self.setup()

    def evaluate_states(self):
        self.x_dot = -self.rate.value * self.x.value

    @property
    def dynamics(self):
        return [(self.x, self.x_dot)]

A conservative storage component can solve with a convenient variable while integrating a different stored quantity:

@property
def dynamics(self):
    return [(self.pressure, self.mass, self.mass_dot)]

That means: vary pressure, but conserve/integrate mass.

self.setup() still handles FullFlow's normal conversion rules: numbers become State objects, existing state-like objects are preserved, optional output States are created when None is passed, and the component is registered with its network.

Solvers

SteadyState

The SteadyState solver computes a converged operating point for the network. The existing explicit solver API is still supported:

solution = SteadyState(NetworkModel).solve()

For simpler scripts, a network can now call the steady-state solver directly:

solution = NetworkModel.solve()

Static evaluation is also available without nonlinear iteration:

solution = NetworkModel.static_evaluate()

Component Categories

Branch Components

Branch components model transport processes between nodes.

Examples include:

  • Darcy-Weisbach flow elements
  • Discharge coefficients
  • Pumps
  • Turbines
  • Regulators
  • Compressible flow elements
  • Heat transfer elements

Node Components

Node components model storage and accumulation.

Examples include:

  • Volumes
  • Tanks
  • Combustion chambers
  • Solid thermal nodes

Lookup Components

Lookup components provide thermodynamic and material properties.

Examples include:

  • FluidLookup
  • IdealGasLookup
  • PropellantLookup
  • MaterialLookup

Sensors

Sensor components provide instrumentation-style measurements.

Examples include:

  • Thermocouples
  • Pressure transducers

Fluid Systems

FullFlow supports modeling of:

  • Compressible flow
  • Incompressible flow
  • Real fluids
  • Ideal gases
  • Fluid mixtures
  • Liquid rocket propellants
  • Flow splitting
  • Flow mixing

through integration with ThermoProp.

Thermal Systems

FullFlow supports:

  • Lumped thermal networks
  • Conduction
  • Convection
  • Radiation
  • Temperature-dependent material properties
  • Coupled fluid-thermal simulation

Propulsion Systems

FullFlow is designed to support rocket propulsion applications including:

  • Feed systems
  • Turbopumps
  • Turbines
  • Combustion chambers
  • Nozzles
  • Regenerative cooling systems
  • Integrated propulsion cycles

Dependencies

FullFlow builds upon several scientific and aerospace libraries:

  • NumPy
  • SciPy
  • ThermoProp
  • Rich
  • h5py

Project Status

FullFlow is currently under active development.

Current development focuses on:

  • Fluid networks
  • Thermal networks
  • Propulsion system modeling
  • Heat transfer
  • Turbomachinery
  • Solver infrastructure

The API may evolve as capabilities continue to expand.

Roadmap

Planned future capabilities include:

  • Unit conversions
  • Advanced combustors
  • Improved transient simulation
  • Two-phase flow support
  • Control system modeling
  • Advanced turbomachinery models
  • Heat exchanger libraries
  • Cycle analysis tools
  • Expanded reporting and visualization

Documentation

Documentation is currently under development.

Examples, source code, and release history are available on GitHub.

Examples

Pump-Fed Rocket Engine

FullFlow can be used to model complete liquid rocket propulsion systems, including pressurization systems, tanks, pumps, injector manifolds, combustion chambers, and nozzles.

Run the example:

uv run python examples/pump_fed_engine.py
from fullflow import *

PumpNetwork = Network("Pumped System")

fuel_shaft_speed = State(25000)
ox_shaft_speed = State(25000)

FuelTankFluid = FluidLookup(...)
OxTankFluid = FluidLookup(...)

FuelPump = PolytropicPump(...)
OxPump = PolytropicPump(...)

MainChamber = MainCombustionChamber(...)
Nozzle = IsentropicNozzle(...)

solution = SteadyState(PumpNetwork).solve()

See examples/pump_fed_engine.py for the complete model.

Mixture Splitter

FullFlow supports fluid mixtures, composition tracking, mixing, and separation.

Run the example:

uv run python examples/mixture_splitter.py
from fullflow import *

SourceFluid = FluidLookup(
    "Source Fluid",
    MixtureNetwork,
    {"gn2": 0.75, "O2": 0.01, "Ar": 0.24},
    pressure=3e5,
    temperature=300,
)

Separator = FlowSplitter(
    "Separator",
    MixtureNetwork,
    pressure=VolumeFluid.pressure,
    composition=VolumeFluid.composition,
    composition_out1=SeparatorOutlet1Composition,
    composition_out2=SeparatorOutlet2Composition,
)

solution = SteadyState(MixtureNetwork).solve()

This example demonstrates:

  • Multicomponent fluid mixtures
  • Composition tracking
  • Flow splitting
  • Composition balances
  • Mixture thermodynamic property evaluation

See examples/mixture_splitter.py for the complete model.

Counterflow Heat Exchanger

FullFlow supports coupled fluid and thermal simulations, allowing heat exchangers to be modeled using fluid networks, thermal networks, material properties, and heat-transfer correlations within a unified framework.

Run the example:

uv run python examples/heat_exchanger.py
from fullflow import *

HeatExchanger = Network("Heat Exchanger")

LiquidSource = FluidLookup(
    "Liquid Source",
    HeatExchanger,
    "rp-1",
    pressure=6e5,
    temperature=1000,
)

CoolantSource = FluidLookup(
    "Coolant Source",
    HeatExchanger,
    "water",
    pressure=20e5,
    temperature=300,
)

TubeNode1 = Solid(...)
TubeNode2 = Solid(...)

TubeConduction = Conduction(...)

Liquid1Solid1Convection = Convection(...)
Coolant2Solid1Convection = Convection(...)

HeatTransferModel = Model(
    "Heat Transfer Correlation",
    HeatExchanger,
    GnielinskiOption,
    DittusBoelterOption,
)

solution = SteadyState(HeatExchanger).solve(
    model="Heat Transfer Correlation"
)

This example demonstrates:

  • Counterflow heat exchanger modeling
  • Coupled fluid and thermal networks
  • Temperature-dependent material properties
  • Conduction and convection
  • Internal and annular flow passages
  • Gnielinski and Dittus-Boelter heat-transfer correlations
  • Model switching with Model and ModelOption

See examples/heat_exchanger.py for the complete model.

Model Comparison and Correlation Sweeps

FullFlow supports interchangeable physics models through Model and ModelOption.

This allows multiple component formulations to be evaluated within the same network without rebuilding the system.

Run the example:

uv run python examples/model_comparison.py
from fullflow import *

PumpModel = Model(
    "Main Pump",
    PumpNetwork,
    ConstantDensityPumpOption,
    PolytropicPumpOption,
)

solution = SteadyState(PumpNetwork).solve(
    model="Main Pump",
    evaluate_all_model_options=True,
)

This example demonstrates:

  • Model switching
  • Alternative component formulations
  • Pump-model comparison
  • Shared turbomachinery maps
  • Correlation sweeps
  • Automated evaluation of multiple model options

See examples/model_comparison.py for the complete model.

Running Examples

Clone the repository:

git clone https://github.com/saakethramoju/FullFlow.git
cd FullFlow

Install dependencies:

uv sync

Run an example:

uv run python examples/pump_fed_engine.py

or

uv run python examples/mixture_splitter.py

or

uv run python examples/heat_exchanger.py

or

uv run python examples/model_comparison.py

Contributing

Bug reports, feature requests, discussions, and pull requests are welcome.

Please open an issue if you encounter a problem or would like to propose an enhancement.

Source Code

GitHub:

https://github.com/saakethramoju/FullFlow

License

FullFlow is released under the GNU General Public License v3.0.

See LICENSE for details.

About

A generalized steady-state and transient network solver for complex fluid and propulsion systems

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages