ControlValve - abhishekvraman/Propylean GitHub Wiki

DESCRIPTION:

Class to create object which represents a control valve. All the properties associated with a control valve used in the process industry to analyse can be accessed as object property.

SAMPLE USE CASES:

# Importing and setting basic properties.
from propylean.instruments.control import ControlValve
# or
from propylean import ControlValve
from propylean import properties as prop
cv_1 = ControlValve(tag="cv_1", pressure_drop=prop.Pressure(2, "bar"))
print(cv_1)
cv_1.inlet_pressure = prop.Pressure(5, "bar")

# Connecting with MaterialStream.
from propylean.streams import MaterialStream
bullet_outlet = MaterialStream(tag="propane_bullet_outlet")
bullet_outlet.components = prop.Components(fractions={"propane": 1}, type="mass")
cv_1.connect_stream(bullet_outlet, "in", stream_governed=False) 

# Get pressure drop.
print(cv_1.outlet_pressure)

# Set series of data with property.
import pandas as pd
cv_1.pressure_drop.time_series = pd.read_csv("bullet_outlet_line_control_vale_data.csv")

Have a look at sample pump circuit calculations.

Input Parameters and properties

       PARAMETERS:
           pressure_drop:
               Required: No
               Type: int or float or property.Pressure(recommended)
               Acceptable values: Any. Negative value means increase in pressure. 
               Default value: None
               Description: Pressure drop accross the control valve.
       
      
       PROPERTIES:
          Properties can be accessed using the dot '.' operator. 
          For e.g. `feed_inlet_valve.inlet_pressure`

          inlet_pressure
             Type: Pressure
             Description: Inlet pressure of the ControlValve.

          outlet_pressure
            Type: Pressure
            Description: Outlet pressure of the ControlValve.

         inlet_temperature
            Type: Temperature
            Description: Inlet temperature of the ControlValve.

         outlet_temperature
            Type: Temperature
            Description: Outlet temperature of the ControlValve.

         inlet_mass_flowrate
            Type: MassFlowRate
            Description: Inlet temperature of the ControlValve.
      
         outlet_mass_flowrate
            Type: MassFlowRate
            Description: Outlet temperature of the ControlValve.
         
         pressure_drop
            Type: Pressure
            Description: Pressure drop in the ControlValve.
         
         Cv
            Type: float
            Decription: Cv of the control valve.
                        NOTE: Cv is automatically calculated and cannot be set.
                              Connect ControlValve with material stream with properties
                              for calulations.

       RETURN VALUE:
           Type: ControlValve
           Description: Returns an object of type ControlValve with all properties of
                        a control valve used in process industry.