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()) cooler1 = heater(stripper.getLiquidOutStream()) cooler1.setOutTemperature(313.0)
# Start by creating a fluid in neqsim fluid1 = fluid("srk") # create a fluid using the SRK-EoS fluid1.addComponent("methane", 99.0) fluid1.addComponent("nC10", 1.0) fluid1.setMixingRule(2) fluid1.setTemperature(50.0, "C") fluid1.setPressure(50.0, "bara") fluid1.setTotalFlowRate(10.0, "MSm3/day") clearProcess() stream1 = stream(fluid1) separator1 = separator(stream1, "inlet separator") cooler1 = heater(separator1.getGasOutStream()) cooler1.setOutTemperature(273.15+30.0) scrubber1 = separator(cooler1.getOutStream(), "inlet separator") runProcess() separator1.getMechanicalDesign().calcDesign(); separartorInnerDiameter = separator1.getMechanicalDesign().getInnerDiameter(); Ks = 0.1; import math Vtmax = Ks * math.sqrt((separator1.getThermoSystem().getPhase('oil').getDensity()-separator1.getThermoSystem().getPhase('gas').getDensity())/separator1.getThermoSystem().getPhase('gas').getDensity()); diameter = math.sqrt(separator1.getThermoSystem().getFlowRate("m3/sec")/Vtmax/3.14*4.0); separator1.getMechanicalDesign().displayResults();
mix1.addStream(cond_in) mix1.addStream(MEG_in) mix1.addStream(gas_in) TPflash(mix1.getOutStream().getThermoSystem()) S1 = separator3phase(mix1.getOutStream()) S1.setName("S1") gas1 = S1.getGasOutStream() MEG1 = S1.getWaterOutStream() cond1 = S1.getOilOutStream() # SECOND SEPARATOR (S2) mix2 = mixer() mix2.addStream(cond1) mix2.addStream(MEG1) heat2 = heater(mix2.getOutStream()) heat2.setOutTemperature(T[1] + 273.15) heat2.setOutPressure(P[1]) S2 = separator3phase(heat2.getOutStream()) S2.setName("S2") gas2 = S2.getGasOutStream() MEG2 = S2.getWaterOutStream() cond2 = S2.getOilOutStream() # THIRD SEPARATOR (S3) # make split split = splitter(cond2, [carryunderfrac, 1.0 - carryunderfrac]) carryunder = split.getSplitStream(0) # mix, set new condition, separate mix3 = mixer()
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")
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")
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())