Skip to main content

No project description provided

Project description

FEEMS - Fuel, Emissions, Energy Calculation for Machinery System

PyPI version Python 3.10+ License: MIT

FEEMS is a comprehensive modeling framework for marine power and propulsion systems, developed by SINTEF Ocean. It enables accurate calculation of fuel consumption, emissions, and energy balance for complex machinery configurations including conventional diesel-electric, hybrid propulsion with PTI/PTO, fuel cell systems, and shore power integration.

Features

๐Ÿšข Supported System Types

  • Diesel Electric Propulsion (Hybrid/Conventional)

    • Multiple generator sets with load sharing
    • Electric propulsion drives with power converters
    • Battery energy storage integration
    • Shore power connections
  • Hybrid Propulsion with PTI/PTO

    • Power Take-In (PTI) and Power Take-Off (PTO) systems
    • Shaft generators and motors
    • Mechanical-electrical power transfer
  • Mechanical Propulsion

    • Main engines with gearboxes
    • Separate electric power system for auxiliaries
    • COGAS (Combined Gas and Steam) systems

โšก Key Capabilities

  • Component-Based Modeling: Build systems from individual components (engines, generators, motors, converters)
  • Power Balance Calculation: Automatic load distribution across power sources
  • Fuel Consumption: Detailed fuel consumption based on BSFC curves and load profiles
  • Emissions Calculation: CO2, NOx, SOx, PM emissions with multiple methodologies (IMO, FuelEU Maritime)
  • Energy Analysis: Track energy flows through mechanical and electrical domains
  • Time-Series Simulation: Analyze performance over operational profiles
  • Flexible Configuration: Configure complex systems via code or data files

Installation

From PyPI (Users)

pip install feems

From Source (Developers)

If you're working with the FEEMS workspace:

# Clone the repository
git clone https://github.com/SINTEF/FEEMS.git
cd FEEMS

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e feems/

Quick Start

Basic Example: Create a Genset

import numpy as np
from feems.components_model import Engine, Genset
from feems.components_model.component_electric import ElectricMachine
from feems.types_for_feems import Power_kW, Speed_rpm, SwbId, TypeComponent, TypePower

# Create an engine with BSFC curve
engine = Engine(
    type_=TypeComponent.AUXILIARY_ENGINE,
    name="Auxiliary Engine",
    rated_power=Power_kW(700),
    rated_speed=Speed_rpm(1500),
    bsfc_curve=np.array([
        [0.25, 0.5, 0.75, 1.0],          # Load points
        [280.0, 220.0, 200.0, 210.0]     # BSFC in g/kWh
    ]).T
)

# Create a generator
generator = ElectricMachine(
    type_=TypeComponent.GENERATOR,
    name="Generator",
    rated_power=Power_kW(665),
    rated_speed=Speed_rpm(1500),
    power_type=TypePower.POWER_SOURCE,
    switchboard_id=SwbId(1),
    eff_curve=np.array([
        [0.25, 0.5, 0.75, 1.0],
        [0.88, 0.92, 0.94, 0.95]
    ]).T
)

# Combine into a genset
genset = Genset(name="Genset 1", aux_engine=engine, generator=generator)

# Calculate fuel consumption at 450 kW electrical output
result = genset.get_fuel_cons_load_bsfc_from_power_out_generator_kw(Power_kW(450))
fuel_kg_per_s = result.engine.fuel_flow_rate_kg_per_s.fuels[0].mass_or_mass_fraction
print(f"Fuel consumption: {fuel_kg_per_s:.4f} kg/s")

Complete Power System Example

from feems.system_model import ElectricPowerSystem, IntegrationMethod

# Create components (gensets, loads, propulsion drives)
components = [genset_1, genset_2, propulsion_drive, auxiliary_load]

# Create the power system
power_system = ElectricPowerSystem(
    name="Ship Power System",
    power_plant_components=components,
    bus_tie_connections=[(1, 2)]  # Connect bus 1 and bus 2
)

# Set loads
power_system.set_power_input_from_power_output_by_switchboard_id_type_name(
    power_output=np.array([300, 350, 400]),  # kW time series
    switchboard_id=1,
    type_=TypePower.POWER_CONSUMER,
    name="Auxiliary Load"
)

# Configure generator status (on/off)
status = np.ones([3, 2]).astype(bool)  # Both gensets on for 3 time points
power_system.set_status_by_switchboard_id_power_type(
    switchboard_id=1,
    power_type=TypePower.POWER_SOURCE,
    status=status
)

# Set load sharing mode (0 = equal sharing)
load_sharing = np.zeros([3, 2])
power_system.set_load_sharing_mode_power_sources_by_switchboard_id_power_type(
    switchboard_id=1,
    power_type=TypePower.POWER_SOURCE,
    load_sharing_mode=load_sharing
)

# Run power balance calculation
power_system.set_time_interval(60, integration_method=IntegrationMethod.simpson)
power_system.do_power_balance_calculation()

# Get results
result = power_system.get_fuel_energy_consumption_running_time()
print(f"Total fuel: {result.multi_fuel_consumption_total_kg.fuels[0].mass_or_mass_fraction:.2f} kg")
print(f"Total CO2: {result.co2_emission_total_kg.tank_to_wake_kg_or_gco2eq_per_gfuel:.2f} kg")

Architecture

Component Hierarchy

FEEMS uses a component-based modeling approach where complex systems are built from individual components.

Base Classes:

Component (abstract base)
โ”œโ”€โ”€ BasicComponent
โ”‚   โ”œโ”€โ”€ ElectricComponent
โ”‚   โ”‚   โ”œโ”€โ”€ ElectricMachine (Generator/Motor)
โ”‚   โ”‚   โ”œโ”€โ”€ Battery
โ”‚   โ”‚   โ”œโ”€โ”€ BatterySystem
โ”‚   โ”‚   โ”œโ”€โ”€ FuelCell
โ”‚   โ”‚   โ”œโ”€โ”€ FuelCellSystem
โ”‚   โ”‚   โ”œโ”€โ”€ ShorePowerConnection
โ”‚   โ”‚   โ”œโ”€โ”€ ShorePowerConnectionSystem
โ”‚   โ”‚   โ”œโ”€โ”€ SuperCapacitor
โ”‚   โ”‚   โ”œโ”€โ”€ SuperCapacitorSystem
โ”‚   โ”‚   โ””โ”€โ”€ MechanicalPropulsionComponent (Propeller, Gearbox, Clutch)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ SerialSystem (composite components)
โ”‚   โ”‚   โ”œโ”€โ”€ SerialSystemElectric
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PTIPTO (Power Take In/Power Take Off)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ PropulsionDrive (Converter chain + Motor)
โ”‚   โ”‚   โ””โ”€โ”€ COGAS (Combined Gas and Steam)
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ COGES (Combined Gas and Electric System)
โ”‚
โ”œโ”€โ”€ Engine
โ”‚   โ”œโ”€โ”€ EngineDualFuel (e.g., Diesel/Gas)
โ”‚   โ””โ”€โ”€ EngineMultiFuel (multiple fuel options)
โ”‚
โ”œโ”€โ”€ MainEngineForMechanicalPropulsion
โ”‚   โ””โ”€โ”€ MainEngineWithGearBoxForMechanicalPropulsion
โ”‚
โ””โ”€โ”€ Genset (Engine + Generator composite)

System Structure

FEEMS supports three main system configurations:

1. Electric Power System

For diesel-electric and hybrid electric propulsion:

ElectricPowerSystem
โ”‚
โ”œโ”€โ”€ Switchboard 1 (electrical bus)
โ”‚   โ”œโ”€โ”€ Power Sources
โ”‚   โ”‚   โ”œโ”€โ”€ Genset (Engine + Generator)
โ”‚   โ”‚   โ”œโ”€โ”€ FuelCellSystem
โ”‚   โ”‚   โ”œโ”€โ”€ ShorePowerConnection
โ”‚   โ”‚   โ””โ”€โ”€ COGES
โ”‚   โ”œโ”€โ”€ Energy Storage
โ”‚   โ”‚   โ”œโ”€โ”€ Battery / BatterySystem
โ”‚   โ”‚   โ””โ”€โ”€ SuperCapacitor / SuperCapacitorSystem
โ”‚   โ”œโ”€โ”€ Propulsion Drives
โ”‚   โ”‚   โ””โ”€โ”€ SerialSystemElectric (Converters + Motor)
โ”‚   โ”œโ”€โ”€ PTI/PTO Systems
โ”‚   โ”‚   โ””โ”€โ”€ PTIPTO (shaft generator/motor)
โ”‚   โ””โ”€โ”€ Other Loads
โ”‚       โ””โ”€โ”€ ElectricComponent (hotel, auxiliary loads)
โ”‚
โ”œโ”€โ”€ Switchboard 2 (electrical bus)
โ”‚   โ””โ”€โ”€ [same structure as Switchboard 1]
โ”‚
โ””โ”€โ”€ Bus-Tie Breakers
    โ””โ”€โ”€ BusBreaker (connects Switchboard 1 โ†” Switchboard 2)

Key Features:

  • Multiple switchboards with independent or connected operation
  • Automatic load sharing among power sources
  • Battery/shore power integration
  • Bus-tie breakers for switchboard coupling

2. Mechanical Propulsion System

For conventional mechanical propulsion:

MechanicalPropulsionSystem
โ”‚
โ”œโ”€โ”€ ShaftLine 1
โ”‚   โ”œโ”€โ”€ Main Engine
โ”‚   โ”‚   โ””โ”€โ”€ MainEngineForMechanicalPropulsion
โ”‚   โ”‚       โ””โ”€โ”€ MainEngineWithGearBoxForMechanicalPropulsion
โ”‚   โ”œโ”€โ”€ PTI/PTO (optional)
โ”‚   โ”‚   โ””โ”€โ”€ PTIPTO (connects to electric system)
โ”‚   โ””โ”€โ”€ Mechanical Loads
โ”‚       โ”œโ”€โ”€ Propeller
โ”‚       โ”œโ”€โ”€ Gearbox
โ”‚       โ””โ”€โ”€ Clutch
โ”‚
โ””โ”€โ”€ ShaftLine 2
    โ””โ”€โ”€ [same structure as ShaftLine 1]

Key Features:

  • Multiple independent shaftlines
  • Optional PTI/PTO for hybrid operation
  • Main engine with or without gearbox

3. Hybrid System (Mechanical + Electric)

For vessels with both mechanical propulsion and electric auxiliary power:

MechanicalPropulsionSystemWithElectricPowerSystem
โ”‚
โ”œโ”€โ”€ MechanicalPropulsionSystem
โ”‚   โ””โ”€โ”€ ShaftLine(s)
โ”‚       โ”œโ”€โ”€ Main Engine(s)
โ”‚       โ”œโ”€โ”€ PTI/PTO (optional, connects to electric side)
โ”‚       โ””โ”€โ”€ Propeller(s)
โ”‚
โ””โ”€โ”€ ElectricPowerSystem
    โ””โ”€โ”€ Switchboard(s)
        โ”œโ”€โ”€ Genset(s) (auxiliary power)
        โ”œโ”€โ”€ Shore Power
        โ””โ”€โ”€ Hotel/Auxiliary Loads

Key Features:

  • Independent mechanical propulsion
  • Separate electric system for auxiliaries
  • PTI/PTO coupling between systems
  • Full PTI mode for boost propulsion power

Real-World Applications

FEEMS has been used in various marine vessel design and analysis studies:

  • Hydrogen-Powered Ferry Design: Complete machinery system modeling for hydrogen fuel cell powered ferries, including operational simulation with real AIS data, power management system optimization, and Total Cost of Ownership (TCO) analysis. The framework successfully handled 2,400+ voyage simulations with detailed propulsion power predictions validated against actual vessel measurements.

  • Emissions Compliance: FuelEU Maritime regulation compliance calculation for various vessel types, enabling accurate carbon intensity indicators (CII) and emissions reporting.

  • Hybrid System Optimization: Analysis of battery sizing, load-dependent genset operation, and energy management strategies for various operating profiles.

  • Shore Power Integration: Economic and environmental analysis of cold ironing capabilities for port operations, demonstrating 100% fuel and emission savings potential during port stays.

The framework's ability to handle 100,000+ data points in time-series simulations makes it suitable for detailed operational analysis, from single voyage assessment to full annual performance evaluation.

Documentation

  • Examples: See the ../examples/ directory for comprehensive tutorials

    • 00_Basic_Example.ipynb: Component creation and system building
    • 01_Running_simulation.ipynb: Time-series simulations
    • 02_Shore_Power_Example.ipynb: Shore power integration
  • API Reference: See API_REFERENCE.md

  • Project Guide: See ../CLAUDE.md for development guidelines

Requirements

  • Python โ‰ฅ 3.10, < 3.13
  • pandas โ‰ฅ 2.1.1
  • scipy โ‰ฅ 1.11.2

Related Packages

  • MachSysS: Protocol Buffer definitions and data conversion utilities
  • RunFeemsSim: Higher-level simulation interface with Power Management System logic

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development Setup

# Clone and setup
git clone https://github.com/SINTEF/FEEMS.git
cd FEEMS
uv sync

# Run tests
uv run pytest feems/tests/

# Lint and format
uv run ruff check feems/
uv run ruff format feems/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use FEEMS in your research, please cite:

Software:

@software{feems2024,
  title = {FEEMS: Fuel, Emissions, Energy Calculation for Machinery System},
  author = {Yum, Kevin Koosup and contributors},
  year = {2024},
  url = {https://github.com/SINTEF/FEEMS}
}

Academic Paper:

@inproceedings{yum2024designlab,
  title = {Design Lab: A Simulation-Based Approach for the Design of Maritime Vessels Using Hydrogen Fuel Cells},
  author = {Yum, Kevin Kosup and Tavakoli, Sadi and Aarseth, Torstein and Bremnes Nielsen, Jรธrgen and Sternesen, Dag},
  year = {2024},
  booktitle = {Proceedings of the Maritime Conference},
  organization = {SINTEF Ocean},
  note = {Case study: STENA Jutlandica ferry hydrogen fuel cell conversion analysis}
}

Support

Acknowledgments

FEEMS is developed and maintained by SINTEF Ocean, Norway's leading marine technology research institute, for marine power system modeling, fuel consumption calculation, and emissions analysis.

The framework has been developed through various research projects focused on:

  • Decarbonization of maritime transport
  • Hybrid and electric propulsion systems
  • Alternative fuels (hydrogen, ammonia, methanol)
  • Energy efficiency optimization
  • FuelEU Maritime regulation compliance

Special thanks to all contributors and the maritime industry partners who have provided valuable feedback and validation data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feems-0.13.4.tar.gz (115.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feems-0.13.4-py3-none-any.whl (74.9 kB view details)

Uploaded Python 3

File details

Details for the file feems-0.13.4.tar.gz.

File metadata

  • Download URL: feems-0.13.4.tar.gz
  • Upload date:
  • Size: 115.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for feems-0.13.4.tar.gz
Algorithm Hash digest
SHA256 55fa46f85cb2e4cbcbcd616c9d598cc41a73d6b83dc392a0a395b90b4f346961
MD5 5fff670f5f4f2bd5b409c41c29890498
BLAKE2b-256 57e9f615fd44c75298987cd53ccd56fd4dc0774d7d2cc01a8779565a9db94c4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for feems-0.13.4.tar.gz:

Publisher: publish_feems.yml on SINTEF/FEEMS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file feems-0.13.4-py3-none-any.whl.

File metadata

  • Download URL: feems-0.13.4-py3-none-any.whl
  • Upload date:
  • Size: 74.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for feems-0.13.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f71dc2fa5ae8bbe864d4e3beaa83f6512b16c294c93eac5e10f064dbd387c298
MD5 de523ab70c0011bee58ae129a2a88144
BLAKE2b-256 77ab3cf01ace92384ef8b9503c515f7a3ffc20e2896a70b460ea7d1f34d14bac

See more details on using hashes here.

Provenance

The following attestation bundles were made for feems-0.13.4-py3-none-any.whl:

Publisher: publish_feems.yml on SINTEF/FEEMS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page