-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started with Propylean
To install Propylean run the following command:
pip install propylean
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"]]
ac_1.outlet_temperature.time_series = df[["time", "outlet_temperature"]]
Supported objects that can be imported:
- equipments.rotary
- CentrifugalPump
- PositiveDisplacementPump
- CentrifugalCompressor
- equipments.static
- PipeSegment
- equipments.exchangers
- AirCooler
- ElectricHeater
- instruments
- ControlValve
- FlowMeter
- streams
- MaterialStream
- EnergyStream
- properties
- Pressure
- Temperature
- MassFlowRate
- Components (Molecular components)
- And many more..
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.
Using delete()
method of each object to delete the object.
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