-
Notifications
You must be signed in to change notification settings - Fork 2
Streams
A chemical plant is a complex system of different type of Streams flowing from one end to another. Streams can be of solid, liquid or gas. Or it can be Energy flowing in form of electricity, steam or hot heat transfer medium. These streams have associated physical properties which governs their behaviour within the system. Simluation softwares often have stream objects as way to describe the fluid flowing and also serves as a means to connect one equipmnet object with another, with property of that stream changing as it moves in the system. Taking the similar approch, Propylean has Stream class which has two derived classes, MaterialStream and EnergyStream for users to simulate material flow and energy flow in a system.
MaterialStream is a class which is used to define a material fluid flowing through equipments in a process plant. Currently, we only support gas and liquids only. Users can set values of property manually or let Propylean set the values. Propylean uses the thermo package to derive the properties.
User can set or get the properties of below described properties as demonstrated as follows:
from propylean.streams import MaterialStream
# or
from propylean import MaterialStream
from propylean import properties as prop
sour_gas = MaterialStream(tag="sour_gas_from_fields")
sour_gas.temperature = prop.Temperature(25, "C")
sour_gas.pressure = prop.Pressure(75, "bar")
mol_fractions = {"methane": 0.95, "Ethane": 0.2, "Butane": 0.1, "Propane": 0.05, "water":0.05, "Hydrogen Sulphide": 0.01}
sour_gas.components = prop.Components(mol_fractions, type="mol")
# Get the density of the sour_gas MaterialStream.
print(sour_gas.density)
The molar flowrate of the material stream. This property cannot be set but is derived from mass flowrate and molecular weight. Type: MolarFlowRate
The volumetic flowrate of the material stream. This property cannot be set but is derived from mass flowrate and density. Type: VolFlowRate
Critical pressure of the material stream. Type: Pressure
Saturation pressure of the material stream. Type: Pressure
The gas phase compressibility of the material stream. Type: Dimensionless
The liquid phase compressibility of the material stream. Type: Dimensionless
The components of the mixture in the material stream. Can be mixture of various pure compunds in mol fraction, mass fraction or volume fraction. Set this property using propylean.properties.components class. Type: Components
The dynamic viscosity of the material stream in mixed phase. Type: DViscosity
The dynamic viscosity of the material stream in gas phase. Type: DViscosity
The dynamic viscosity of the material stream in liquid phase. Type: DViscosity
The density of the material stream in mixed phase. Type: Density
The density of the material stream in gas phase. Type: Density
The density of the material stream in liquid phase. Type: Density
The isentropic exponent or the specific heat ratio (Cp/Cv) of the material stream. Type: Dimensionless
Mass flowrate of the material stream. Type: MassFlowRate
The molecular weight of the material stream. Type: MassFlowRate
The phase of the material stream. "l" for liguid, "g" for gas, "l/g" for mixed phase as per fluids package. Type: String
The pressure of the material stream. It is recommended to set it to help derive other properties. Type: Pressure
The temperature of the material stream. It is recommended to set it to help derive other properties. Type: Temperature
EnergyStream is a class which is used to define flow of energy(power) through equipments in a process plant.
User can set energy flow property which is also similar to Power in properties submodule.
from propylean.streams import EnergyStream
# or
from propylean import EnergyStream
heating = EnergyStream(tag="stream heating")
heating.amount = prop.Power(25, "C")
Power or energy flowrate of the stream. Type: Power