Skip to main content

Standard Process Control Library for chemical process control - Semantic API for chemical plant design using familiar ML patterns

Project description

SPROCLIB - Standard Process Control Library

A comprehensive Python library for chemical process control, providing essential classes and functions for PID control, process modeling, simulation, optimization, and advanced control techniques.

SPROCLIB provides a semantic API for chemical plant design that uses familiar patterns from machine learning frameworks like TensorFlow and Keras.

Installation

pip install sproclib

Features

  • Semantic Plant Design: Intuitive API similar to ML frameworks for building complex chemical processes
  • Process Units: CSTR, pumps, heat exchangers, distillation columns, reactors, and tanks
  • Economic Optimization: Built-in optimization algorithms for cost minimization and profit maximization
  • PID Controllers: Classical and advanced PID control implementations with auto-tuning
  • Analysis Tools: Transfer functions, simulation, and system identification
  • Advanced Control: Model predictive control, state-space controllers, and IMC
  • Transport Models: Continuous and batch transport for liquids and solids

Quick Start

Create and optimize a chemical plant in just a few lines:

from sproclib.unit.plant import ChemicalPlant
from sproclib.unit.pump import CentrifugalPump
from sproclib.unit.reactor import CSTR

# Define plant
plant = ChemicalPlant(name="Process Plant")

# Add units
plant.add(CentrifugalPump(H0=50.0, eta=0.75), name="feed_pump")
plant.add(CSTR(V=150.0, k0=7.2e10), name="reactor")

# Connect units
plant.connect("feed_pump", "reactor", "feed_stream")

# Configure optimization
plant.compile(
   optimizer="economic",
   loss="total_cost",
   metrics=["profit", "conversion"]
)

# Optimize operations
plant.optimize(target_production=1000.0)

Advanced Example

# Traditional PID control example
import sproclib as spc

# Create a PID controller
controller = spc.PIDController(kp=1.0, ki=0.1, kd=0.05)

# Create a tank model
tank = spc.Tank(volume=100, area=10)

# Simulate step response
response = spc.step_response(tank, time_span=100)

Requirements

  • Python 3.8+
  • NumPy >= 1.20.0
  • SciPy >= 1.7.0
  • Matplotlib >= 3.3.0

License

MIT License

Author

Thorsten Gressling gressling@paramus.ai

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

sproclib-2.0.3.tar.gz (10.5 MB view details)

Uploaded Source

Built Distribution

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

sproclib-2.0.3-py3-none-any.whl (417.3 kB view details)

Uploaded Python 3

File details

Details for the file sproclib-2.0.3.tar.gz.

File metadata

  • Download URL: sproclib-2.0.3.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for sproclib-2.0.3.tar.gz
Algorithm Hash digest
SHA256 02ca40362b59f6c2b4a1171a537726e7faf8a21b4c71a3ae853e5a7cb045ad84
MD5 eb9dae9604dd4e611419ea78bdecc2b3
BLAKE2b-256 00fe415c19a21609e84a05c4aee1dca5b8ec9bca8b789cc3d1a228c85e933db8

See more details on using hashes here.

File details

Details for the file sproclib-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: sproclib-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 417.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for sproclib-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1e63594d51d369588dc7acda94050e00354516bef00a8e54264c350c9d55e3b2
MD5 563d2e6b63a6706082f85b0f590ed2d1
BLAKE2b-256 d7ec7e67888e9dcceb93c920c5a086eaac61e979b1c37a70e9a5ddab1d92e5aa

See more details on using hashes here.

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