Predicting Liquid Production from a Mixed Well Stream
Simulation of the liquid production from a 2-stage separation of mixed wellstream from five wells.
Five gas condensates are mixed and produced through a two stage separator train operating at the following conditions:
Separator 1: P = 80 bara , T = 60°C
Separator 2: P = 1.01 bara , T = 15°C
Well no. 1 produces the leanest condensate and well no. 5 the richest. The separator train has a capacity of 10,000 kg/hour. The input mass flow rate to the separator train is therefore kept constant at 10,000 kg/hour, independently of the number of wells being online. An initial test of the system performance is performed where the wells are put online in the following order:
- Well 1
- Well 1 + 2
- Well 2
- Well 2 + 3
- Well 3
- Well 3 + 4
- Well 4
- Well 4 + 5
- Well 5
- Well 1 + 2
- Well 1 + 2 + 3
- Well 1 + 2 + 3 + 4
- Well 1 + 2 + 3 + 4 + 5
A Common EoS model is used to characterize the well streams. This common EoS model has been developed in PVTsim and exported in the .json format. The video below shows the simulated variation in the total liquid production from the separator train as the wells are turned on and off during the test.
Simulating the standard liquid production rate is done using Calsep’s Cloud Flash API. The Python code sample below shows how simple it is to set up a sequential separator train simulation, where the liquid from the first separator is sent to the second separator and flashed to standard conditions.
The standard liquid production rate is calculated based on the separator phase splits and the molar volume of the standard liquid.
Python Code Example
def processCall(client, cachedFluidResponse, feed_comp, total_flow): from pycalsep.flash_result import FlashPhase from pycalsep.common import FLASH_MODE, FLASH_OUTPUT_MODE, PHASE_TYPE import numpy # Save incoming feed_comp in new variable "liquidComposition" liquidComposition = feed_comp # Initialise list to hold liquid fractions from flash calculations liquidMolePercent =  # Process conditions # Process is a simple two-stage separator train. # Liquid from stage 1 is sent into stage 2. pressure = [8000000.0, 101325.0] temp = [333.15, 288.15] i = 0 # Run "len(pressure)" sequential flash calculations while i < len(pressure): # Use the runFlashWithId() method of Calsep's SDK to call the flash API flashResponse = client.runFlashWithId( FLASH_MODE.FlashModePt, pressure[i], temp[i], cachedFluidResponse.result.id, componentAmounts=liquidComposition, ) if flashResponse.isError: print(flashResponse.error.errorCode) print(flashResponse.error.message) else: liquidPhase: FlashPhase = next( x for x in flashResponse.result.phases if x.properties.phaseType == PHASE_TYPE.Liquid ) liquidComposition = list( map(lambda s: s.molePercent, liquidPhase.components) ) liquidMolePercent.append(liquidPhase.properties.molePercent / 100) i = 1 # Calculate volumetric flow rate out of separator 2 volumeRate = ( total_flow * numpy.prod(liquidMolePercent) * liquidPhase.properties.molarVolume ) return volumeRate
The shown example uses Calsep’s Cloud service, which offers access to the Flash API on Calsep hosted servers in Microsoft Azure. The servers are fast and robust and scale performance depending on the number of flash calculations required. The Flash API follows best practices on implementation and security for authentication and authorization of the user accessing the API. The Flash API can be accessed using the provided samples in Calsep’s SDKs for Python or C# or directly using an HTTPS library.
The data transferred from a local application to the Calsep Cloud is encrypted both when transferred to the API and when in rest on Calsep’s Cloud. A gateway in the cloud performs the authentication and authorization of users from different client applications. A metrics server keeps track of the usage of the Flash API.
Contact Calsep today to get started on incorporating Calsep’s Flash API in your software solutions for metering systems, production allocation systems, production optimization and monitoring software and flow assurance technologies.
Need a Flash Engine?
Calsep’s Flash API is designed to be the engine of software applications that require multiple flash calculations every second. This could be in connection with dynamic flow simulations, monitoring of process equipment or allocation of streams from multiple sources.