Bullet - abhishekvraman/Propylean GitHub Wiki
DESCRIPTION:
Class to create object which represents a Bullet (Horizontal vessel) in high pressure rage with various head types. All the properties associated with a bullet storage used in the process industry to analyse can be accessed as object property.
SAMPLE USE CASES:
# Importing and setting basic properties.
from propylean.equipment.storage import Bullet
# or
from propylean import Bullet
from propylean import properties as prop
propane_bullet = Bullet(tag="propane_bullet", ID=prop.Length(4, "m"),
length=(10, "m"), is_blanketed=True)
print(propane_bullet)
propane_bullet.operating_pressure = prop.Pressure(5, "bar")
#Set liquid level settings.
propane_bullet.main_fluid = "liquid"
propane_bullet.LLLL = (0.5, "m")
propane_bullet.LLL = (0.8, "m")
propane_bullet.NLL = (1.5, "m")
propane_bullet.HLL = (2, "m")
propane_bullet.HHLL = (3, "m")
propane_bullet.liquid_level = (1.8, "m")
# Connecting with MaterialStream
from propylean.streams import MaterialStream
# or
from propylean import MaterialStream
vessel_inlet = MaterialStream(tag="vessel_inlet")
vessel_inlet.components = prop.Components(fractions={"propane": 1}, type="mass")
propane_bullet.connect_stream(vessel_inlet, "in", stream_governed=False)
# Get vessel volume and liquid invetory.
print(propane_bullet.vessel_volume)
print(propane_bullet.get_inventory("mass"))
# Set series of data with property
import pandas as pd
propane_bullet.operating_temperature.time_series = pd.read_csv("vessel_inlet_pipe_data.csv")["time", "temperature"](/abhishekvraman/Propylean/wiki/"time",-"temperature")]
Have a look at sample vessel analysis.
Input Parameters and properties
PARAMETERS:
ID:
Required: No
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: Internal diameter of the vessel.
OD:
Required: No
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: Outer diameter of the vessel.
thickness:
Required: No
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: thickness of the vessel.
length:
Required: No
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: tan-line length of the vessel.
LLL, LLLL, HLL, NLL and HHLL:
Required: No
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: Low Liquid Level(LLL), Low-Low Liquid Level(LLLL), High Liquid Level(HLL),
Normal Liquid Level(NLL), and High-high Liquid Level.
head_type:
Required: No
Type: String
Acceptable values: ["hemispherical", "elliptical", "torispherical", "flat"]
Default value: elliptical
Description: Type of head for the vessel.
main_fluid:
Required: No
Type: String
Acceptable values: ["liquid", "gas"]
Default value: liquid
Description: Type of fluid which the vessel stores.
is_blanketed:
Required: No
Type: Boolean
Default value: False
Description: Specifies if the vessel is blanketed or not.
RETURN VALUE:
Type: Bullet
Description: Object with all Bullet and other related properties.
PROPERTIES:
operating_pressure:
Type: int or float or Pressure(recommended)
Acceptable values: Any
Default value: 101325 Pa
Description: Operating pressure of the vessel. operating_pressure is
considered equal to outlet_pressure and can be considered as
alias of each other. Setting or getting one effects the other.
operating_temperature:
Type: int or float or Pressure(recommended)
Acceptable values: Any
Default value: 298 K
Description: Operating temperature of the vessel. operating_temperature is
considered equal to outlet_temperature and can be considered as
alias of each other. Setting or getting one effects the other.
vessel_volume:
Type: int or float or Volume(recommended)
Acceptable values: Any
Default value: 0 m^3
Description:Total volumetric space of the vessel including heads.
liquid_level:
Type: int or float or Length(recommended)
Acceptable values: Non-negative integer
Default value: 0 m
Description: liquid level of the vessel.
METHODS:
get_inventory(type="volume")
DESCRIPTION:
Function to get the fluid inventory in the vessel.
PARAMETERS:
type:
Type: String
Acceptable values: "volume" or "mass"
Default value: "volume"
Description: The type of inventory to be calculated.
"volume" calculates volumetic inventroy and
"mass" calculates mass inventory of corresponding
volumetic inventory based on density of liquid.
Property main_fluid should be set for vessel
to use this method. Density data is needed for mass
inventory.
ERROR RAISED:
Type:
Description:
RETURN VALUE:
Type: Bullet
Description: Returns an object of type Bullet with all properties of
a Bullet used in process industry.