Skip to main content

Process Dynamics Engine

Project description

PDEngine - Process Dynamics Engine

Process Dynamics Engine (PDEngine) is an online, iterative simulator for process control models described by transfer functions or state space representations. PDE is implemented in Python and uses the Python Control Systems Library. Users can interact with the simulation by using an API to send control actions (e.g. increasing a reflux rate or shutting off a valve) and query process variables like temperature and pressure. PDE is intended to be an educational tool in chemical engineering process control courses.

Usage

Models are defined by inheriting from the Model parent class. An example using the Wood-Berry distillation model (3 inputs - 2 MVs, 1 FF & 2 outputs) is provided in /src/WoodBerryModel.py.

A PDEngine Model must include:

  • Name (e.g. Wood-Berry Distillation)
  • Input names (e.g. $R$ - Reflux flow rate, $S$ - Steam flow rate, $F$ - Feed flow rate)
  • Ouput names (e.g. $X_D$ - top composition, $X_B$ - bottom composition)
  • Steady-state values for inputs and outputs
  • Validity limits for inputs and outputs
  • Typical moves for inputs

A driver program is then created to set up the simulation and initialize the model. Users must define:

  • The simulation step size, $dt$
  • Simulation speed, in terms of a time delay, $T_D$ between steps
wm = WoodBerryModel()
dt=0.02 # in minutes, for the Wood-Berry model
woodberry = wm.create_system(dt=dt) # make the actual generator with step size = 0.02

At each iteration of the simulation, users can send values to the simulation by using send() with a dictionary with the Input names as keys:

# the main engine loop
for i in range(N):        
    y = woodberry.send({'R': 0.01, 'S': 0.01, 'F': 0.05}) # send this value to the model
    time.sleep(0.001) # this is the time delay T_D for the simulation speed

An example driver program is provided in the Example.ipynb notebook that uses the Wood-Berry distillation example.

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

pdengine-0.0.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

pdengine-0.0.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pdengine-0.0.4.tar.gz.

File metadata

  • Download URL: pdengine-0.0.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pdengine-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f8f63c1ec9219dd4925e2f3f511d2db1c0bc9807282b3174899c05e7f8a4fc32
MD5 40de125b6d0c5d61724886ec361fbbc2
BLAKE2b-256 7641eeb3130906f998f3bc02d1ee5517d5e166d158824cdf390cf7e596265658

See more details on using hashes here.

File details

Details for the file pdengine-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pdengine-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pdengine-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f76e43e86645dd8aab2d353a85677647441ec4a57f6292005a2d46ed10d838c2
MD5 b6258d59e9560c133d6b805b29ad629e
BLAKE2b-256 b3e7a431e08aec08f0196086ac25d875c99df3f2b8aa41a84842a6a5e9a67ee9

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