예제 #1
0
# Start by creating a fluid in neqsim
fluid1 = fluid("srk")  # create a fluid using the SRK-EoS
fluid1.setTemperature(28.15, "C")
fluid1.setPressure(100.0, "bara")
fluid1.addComponent("nitrogen", 10.0, "mol/sec")
fluid1.addComponent("n-heptane", 5.0, "mol/sec")
fluid1.addComponent("water", 1.0, "kg/sec")
fluid1.setMixingRule(2)
fluid1.setMultiPhaseCheck(True)

# demonstration of setting up a simple process calculation
clearProcess()
stream1 = stream(fluid1)
inletValve = valve(stream1, 50.0)  # add valve and set outlet pressure
inletSeparator = separator(inletValve.getOutStream())
oilValve = valve(inletSeparator.getLiquidOutStream(), 1.0)
compressor1 = compressor(inletSeparator.getGasOutStream(),
                         100.0)  # add compressor and set out pressure

#sensoir to read from Omnia
#temperatureTranmitter1 = temperatureTransmitter(stream1, "PT20232")
#pressureTranmitter1 = pressureTransmitter(stream1,"TIP2030I")

#signals to calculate
#VTemperatureTransmitter1 = VtemperatureTransmitter(inletValve.getOutStream(),"VT20314")

runProcess()
viewProcess()

print("compressor power ", compressor1.getPower())
예제 #2
0
fluid2.addComponent("ethane", 1.0e-10)
fluid2.addComponent("propane", 1.0e-10)
fluid2.addComponent("water", 1.0, 'kg/sec')
fluid2.addComponent("TEG", 99.0, 'kg/sec')
fluid2.setMixingRule(10)
fluid2.setMultiPhaseCheck(True)
fluid2.setTemperature(313.15, "K")
fluid2.setPressure(75.0, "bara")
fluid2.setTotalFlowRate(10625.0, 'kg/hr')

# demonstration of setting up a simple process calculation
clearProcess()
stream1 = stream(fluid1)
glycolstream = stream(fluid2)
separator1 = separator(stream1, "inlet separator")
compressor1 = compressor(separator1.getGasOutStream(), 75.0)

heater1 = heater(compressor1.getOutStream())
heater1.setOutTemperature(313.0)

mixer1 = mixer()
mixer1.addStream(heater1.getOutStream())
mixer1.addStream(glycolstream)

scrubberLP = separator(mixer1.getOutStream())
valve1 = valve(scrubberLP.getLiquidOutStream(), 10.0, "Glycol valve")
flashDrum = separator(valve1.getOutStream())
heater1 = heater(flashDrum.getLiquidOutStream())
heater1.setOutTemperature(273.15+195.0)
stripper = separator(heater1.getOutStream())
예제 #3
0
fluid1 = fluid("srk")  # create a fluid using the SRK-EoS
fluid1.addComponent("nitrogen", 1.0)
fluid1.addComponent("CO2", 2.0)
fluid1.addComponent("methane", 85.0)
fluid1.addComponent("ethane", 5.0)
fluid1.addComponent("propane", 3.0)
fluid1.addComponent("i-butane", 2.0)
fluid1.addComponent("n-butane", 2.0)
fluid1.setMixingRule(2)

fluid1.setTemperature(28.15, "C")
fluid1.setPressure(30.0, "bara")
fluid1.setTotalFlowRate(10.0, "MSm3/day")
# demonstration of setting up a simple process calculation

clearProcess()
stream1 = stream(fluid1)
compressor1 = compressor(stream1, 60.0)  # add compressor and set out pressure
compressor1.setIsentropicEfficiency(0.8)
cooler1 = heater(compressor1.getOutStream())
cooler1.setOutTemperature(303.0)
compressor2 = compressor(cooler1.getOutStream(), 120.0)
compressor2.setIsentropicEfficiency(0.77)

runProcess()

print("compressor1 power ", compressor1.getPower()/1e6, " MW")
print("compressor2 power ", compressor2.getPower()/1e6, " MW")

print("temperature out of compressor1 ", compressor1.getOutStream().getTemperature()-273.15, " °C")
print("temperature out of compressor2 ", compressor2.getOutStream().getTemperature()-273.15, " °C")
예제 #4
0
fluid_1.setTemperature(30.0, "C")
fluid_1.setTotalFlowRate(1000.0, "kg/hr")

clearProcess()
stream_1 = stream(fluid_1)
stream_1.setSpecification("bubT")

JTvalve = valve(stream_1, 1.0)

cooler_1 = cooler(JTvalve.getOutStream())
cooler_1.setSpecification("out stream")

stream_2 = stream(cooler_1.getOutStream())
stream_2.setSpecification("dewP")

cooler_1.setOutStream(stream_2)
JTvalve.setOutletPressure(stream_2.getPressure());

compressor_1 = compressor(stream_2, 10.0);
compressor_1.setSpecification("out stream")
compressor_1.setOutletPressure(stream_1.getPressure())

heater = heater(compressor_1.getOutStream())
heater.setSpecification("out stream");
heater.setOutStream(stream_1);

runProcess()

print("Compressor power ", compressor_1.getTotalWork()/1e3, " kW")
print("Cooling duty ", cooler_1.getDuty()/1e3, " kW")
print("Heating duty ", heater.getDuty()/1e3, " kW")
예제 #5
0
fluid1.addComponent("nC10", 5.1)
fluid1.setMixingRule('classic')
fluid1.setTemperature(35.15, "C")
fluid1.setPressure(feedPressure, "bara")
fluid1.setTotalFlowRate(10.0, "MSm3/day")

# demonstration of setting up a simple process calculation
clearProcess()
stream1 = stream(fluid1)
separator1 = separator(stream1, "inlet separator")
valve1 = valve(separator1.getLiquidOutStream(), MPpressure, "HP oil valve")
separator2 = separator(valve1.getOutStream(), "MP separator")
valve2 = valve(separator2.getLiquidOutStream(), LPpressure)
separator3 = separator(valve2.getOutStream(), "LP separator")

compressorLP1 = compressor(separator3.getGasOutStream(), MPpressure)
coolerMP1 = heater(compressorLP1.getOutStream())
coolerMP1.setOutTemperature(303.0)
scrubberLP = separator(coolerMP1.getOutStream())

recycleLP = recycle(scrubberLP.getLiquidOutStream())
#separator2.addStream(recycleLP.getOutStream())

mixerLP = mixer()
mixerLP.addStream(scrubberLP.getGasOutStream())
mixerLP.addStream(separator2.getGasOutStream())

compressorMP1 = compressor(mixerLP.getOutStream(), feedPressure)
coolerMP1 = heater(compressorMP1.getOutStream())
coolerMP1.setOutTemperature(303.0)
scrubberMP1 = separator(coolerMP1.getOutStream())
예제 #6
0
#fluid1.addComponent("CO2", 2.0)
fluid1.addComponent("methane", 91.0)
fluid1.addComponent("ethane", 5.0)
fluid1.addComponent("propane", 3.0)
fluid1.addComponent("i-butane", 2.0)
fluid1.addComponent("n-butane", 2.0)
fluid1.setMixingRule(2)

fluid1.setTemperature(25.0, "C")
fluid1.setPressure(50.0, "bara")
fluid1.setTotalFlowRate(0.635, "MSm3/day")
# demonstration of setting up a simple process calculation

clearProcess()
stream1 = stream(fluid1)
compressor2 = compressor(stream1, 51.0)


MW=28.01
inlepPres=100.0
inletTemp=26.2
Zinlet=0.89
curveConditions = [MW, inlepPres, inletTemp, Zinlet]

speed = [1000.0, 2000.0, 3000.0, 4000.0]
flow = [[453.2, 600.0, 750.0, 800.0], [453.2, 600.0, 750.0, 800.0],[453.2, 600.0, 750.0, 800.0],[453.2, 600.0, 750.0, 800.0]]
head = [[ 10000.0, 9000.0, 8000.0, 7500.0], [10000.0, 9000.0, 8000.0, 7500.0 ], [10000.0, 9000.0, 8000.0, 7500.0], [ 10000.0, 9000.0, 8000.0, 7500.0]]
polyEff = [[ 90.0, 91.0, 89.0, 88.0 ], [90.0, 91.0, 89.0, 88.0 ], [90.0, 91.0, 89.0, 88.1],[90.0, 91.0, 89.0, 88.1]] 
compressorChart(compressor2, curveConditions, speed, flow, head, polyEff)

예제 #7
0
# Create a gas-condensate fluid
naturalgas = {
    'ComponentName': [
        "nitrogen", "CO2", "methane", "ethane", "propane", "i-butane",
        "n-butane", "i-pentane", "n-pentane", "n-hexane"
    ],
    'MolarComposition[-]':
    [0.633, 1.371, 85.697, 6.914, 3.086, 0.475, 0.886, 0.242, 0.254, 0.016]
}
naturalgasFluid = fluid_df(pd.DataFrame(naturalgas))

#Setting up a process with an inpu stream and a compressor
clearProcess()
stream1 = stream(naturalgasFluid)
compressor2 = compressor(stream1)

#setting up the compressor performance
MW = 19.7
inlepPres = 60.0
inletTemp = 22.9
Zinlet = 0.851
curveConditions = [MW, inlepPres, inletTemp, Zinlet]

speed = [11533.0]
flow = [[4327.9175, 4998.517, 5505.8851, 6027.6167, 6506.9064, 6908.2832]]
polytropicheadmeter = [[
    18882.3055, 18235.1912, 17531.6259, 16489.7195, 15037.1474, 13618.7919
]]
polytropicefficiency = [[72.54, 74.44, 74.5, 74.66, 72.66, 70.19]]