Tank - abhishekvraman/Propylean GitHub Wiki

DESCRIPTION:

Class to create object which represents a Tank in low pressure rage. All the properties associated with a Tank 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
# or
from propylean import Tank
from propylean import properties as prop
LNG_Tank = Tank(tag="LNG_Tank", ID=prop.Length(4, "m"),
                       length=(10, "m"), is_blanketed=True)
print(LNG_Tank)
LNG_Tank.operating_pressure = prop.Pressure(5, "bar")

#Set liquid level settings.
LNG_Tank.main_fluid = "gas"
LNG_Tank.LLLL = (0.5, "m")
LNG_Tank.LLL = (0.8, "m")
LNG_Tank.NLL = (1.5, "m")
LNG_Tank.HLL = (2, "m")
LNG_Tank.HHLL = (3, "m")
LNG_Tank.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")
LNG_Tank.connect_stream(vessel_inlet, "in", stream_governed=False) 

# Get volume and invetory.
print(LNG_Tank.vessel_volume)
print(LNG_Tank.get_inventory("mass"))

# Set series of data with property
import pandas as pd
LNG_Tank.operating_temperature.df = 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.
            
            
            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: Tank
            Description: object of Tank with 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 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 Tank with all properties of
                        a Tank used in process industry.