Sphere - abhishekvraman/Propylean GitHub Wiki
DESCRIPTION:
Class to create object which represents a Sphere in high pressure rage with various head type. All the properties associated with a Sphere 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 Tank
from propylean import properties as prop
LPG_sphere = Sphere(tag="LPG_Sphere", ID=prop.Length(4, "m"),
is_blanketed=True)
print(LPG_sphere)
LPG_sphere.operating_pressure = prop.Pressure(5, "bar")
#Set liquid level settings.
LPG_sphere.main_fluid = "gas"
LPG_sphere.LLLL = (0.5, "m")
LPG_sphere.LLL = (0.8, "m")
LPG_sphere.NLL = (1.5, "m")
LPG_sphere.HLL = (2, "m")
LPG_sphere.HHLL = (3, "m")
LPG_sphere.liquid_level = (1.8, "m")
# Connecting with MaterialStream
from propylean.streams import MaterialStream
vessel_inlet = MaterialStream(tag="vessel_inlet")
vessel_inlet.components = prop.Components(fractions={"LNG": 1}, type="mass")
LPG_sphere.connect_stream(vessel_inlet, "in", stream_governed=False)
# Get volume and invetory.
print(LPG_sphere.vessel_volume)
print(LPG_sphere.get_inventory("mass"))
# Set series of data with property
import pandas as pd
LPG_sphere.operating_temperature.df = pd.read_csv("vessel_inlet_pipe_data.csv")["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.
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.
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: Sphere
Description: object with Sphere and 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.
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 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 vessesl
containging liquid.
ERROR RAISED:
Type:
Description:
RETURN VALUE:
Type: Tank
Description: Returns an object of type Sphere with all properties of
a Sphere used in process industry.