neqsim
neqsim copied to clipboard
Error/Exception when using a 3 phase separator for a stream with only gas and oil
Example when we get the error: In this case the water in the feed is set to 0, and we will only have gas and oil in inlet separator.
feedFluid = {'ComponentName': ['water', 'MEG', "methane", "ethane", "propane","i-butane", "n-butane","i-pentane","n-pentane", "C6", "C7", "C8", "C9", "C10"], 'MolarComposition[-]': [0.0, 0.0, 80.0, 6.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.01, 0.05, 1.01], 'MolarMass[kg/mol]': [None,None, None,None,None,None, None,None,None,0.091, 0.110, 0.13, 0.15, 0.25], 'RelativeDensity[-]': [None,None, None,None,None,None, None,None,None, 0.7, 0.78, 0.8, 0.82, 0.83] }
reservoirFluiddf = pd.DataFrame(feedFluid)
fluid7 = fluid_df(reservoirFluiddf).autoSelectModel()
fluid7.setMultiPhaseCheck(True)
glycolFluid = fluid7.clone()
glycolFluid.setMolarComposition([0.0, 1.0, 0.0, 0.0,0.0, 0.0,0.0, 0.0,0.0, 0.0,0.0, 0.0,0.0,0.0])
clearProcess()
feedStream = stream(fluid7)
feedStream.setFlowRate(self.feedFlowRateTrain1, 'kg/hr')
feedStream.setPressure(self.feedPressure, 'barg')
feedStream.setTemperature(self.feedTemperature, 'C')
glycolFeedStream = stream(glycolFluid)
glycolFeedStream.setFlowRate(self.glycolFlow, 'kg/hr')
glycolFeedStream.setTemperature(self.feedTemperature, 'C')
glycolFeedStream.setPressure(self.feedPressure, 'barg')
slugCatcher = separator3phase(feedStream)
saturatedGasFromSlugCatcher = saturator(slugCatcher.getGasOutStream(), 'water saturator')
valve1 = valve(saturatedGasFromSlugCatcher.getOutStream())
valve1.setOutletPressure(self.sep1Pressure)
sep1 = separator3phase(valve1.getOutStream())
cooler1 = cooler(sep1.getGasOutStream())
cooler1.setOutTemperature(self.cooler1T, 'C')
sep2 = separator3phase(cooler1.getOutStream())
mixer1 = mixer()
mixer1.addStream(sep2.getGasOutStream())
mixer1.addStream(glycolFeedStream)
expander1 = expander(mixer1.getOutStream(), self.expOutPressure)
sep3 = separator3phase(expander1.getOutStream())
gasToExport = stream(sep3.getGasOutStream())
runProcess()