Getting started with Propylean - abhishekvraman/Propylean GitHub Wiki

Installation

To install Propylean run the following command:

pip install propylean

Start importing Propylean supported objects and start analyzing

You can import each object independently and start your analysis using input and output attributes if the object. For example, if you wish to analyze AirCooler, import propylean classes like below:

# Import required modules.
from propylean.exchangers import AirCooler
from propylean import properties as prop
import pandas as pd

# Import your data.
df = pd.read_csv('Cooler_1_plant_data.csv')

# Create AirCooler object.
ac_1 = AirCooler(tag="Cooler_1", temperature_decrease=(50,"C"))
ac_1.pressure_drop = prop.Pressure(1, "bar") # or use tuple(10, "bar")
ac_1.inlet_temperature.time_series = df["time", "inlet_temperature"](/abhishekvraman/Propylean/wiki/"time",-"inlet_temperature")
ac_1.outlet_temperature.time_series = df["time", "outlet_temperature"](/abhishekvraman/Propylean/wiki/"time",-"outlet_temperature") 

Supported objects that can be imported:

  • equipments.rotary
    1. CentrifugalPump
    2. PositiveDisplacementPump
    3. CentrifugalCompressor
  • equipments.static
    1. PipeSegment
  • equipments.exchangers
    1. AirCooler
    2. ElectricHeater
  • instruments
    1. ControlValve
    2. FlowMeter
  • streams
    1. MaterialStream
    2. EnergyStream
  • properties
    1. Pressure
    2. Temperature
    3. MassFlowRate
    4. Components (Molecular components)
    5. And many more..

Connect each objects

Using connect_stream() method of each equipment or instrument object, connect them with a MaterialStream object to connect everythin together. For more details on the method, have a look at documentation page Connect and Disconnect Equipment Object with Stream Object.

Delete an object

Using delete() method of each object to delete the object.

Sample Models

To help you get started with calculations, have a look at sample pump circuit model. https://github.com/abhishekvraman/Propylean/blob/main/Models/pump_circuit.ipynb

To help you get started with analytics, have a look at sample LPG bullet analysis. https://github.com/abhishekvraman/Propylean/blob/main/Models/LPG_bullet_analysis.ipynb