Gas Gathering System
11 min
gas gathering system an upstream gas field, over enron modbus four well pads, a compressor station, a tank battery and a custody transfer meter run, 121 registers across eight flow computers operator view on 4019 , the enron modbus listener on 5029 what it demonstrates four scenarios at once, each on a different part of the field, with healthy neighbours beside it so the comparison is on screen rather than remembered a marginal well loading up with liquid, and dying a gas well carries its own produced water up the tubing as mist, but only while the gas moves fast enough below the turner critical velocity the droplets fall back and stand in the tubing that column is weight, so the flowing bottomhole pressure rises, and inflow goes as the square of the pressure difference, so the rate falls, so the velocity falls further the well spirals down from 570 to about 120 mcf/d and nothing alarms, because it is still flowing the whole way the tell is not the rate gas in the annulus cannot get past the standing column, so casing pressure climbs while tubing pressure sags, and two readings that normally sit 6 psi apart separate to nearly 400 the sales meter quietly drifting the orifice differential transmitter loses its zero aga 3 makes flow go as the square root of differential pressure, so a 4 percent error in inches of water is about 2 percent on volume, in one direction, on every hour of a measurement the gas is invoiced against the check meter in series is what makes it visible a flare pilot that has gone out the thermocouple goes cold while gas is still routed to the stack, so it leaves unburned that is both a loss and a reportable event, and methane is roughly 28 times co2 over a hundred years, so venting a unit of gas is not the same as selling it cheap a separator dump valve stuck shut level climbs to the high level switch and liquid begins to carry over into the gas leg, which is what damages the meter run downstream one cheap fault becoming an expensive one a loading well does not flow smoothly, it slugs those slugs arrive at the tank battery two miles downstream as liquid the level controller did not plan for, so the separator floods and carries over with no fault injected there at all nothing links the two in the model; the well pad produces slugs and the separator has to deal with what arrives why the tag names are the field's enron modbus is the gas measurement dialect of modbus, and its defining feature is that the address block declares the type a real flow computer lays itself out this way and a real polling host relies on it addresses what lives there register type 1000 1999 booleans 1x 3000 3999 16 bit integers 3x 5000 5999 32 bit integers 5x 7000 7999 32 bit floats 7x so 7011 is a flow rate because it is a float in the 7000 block, and every reading on the operator view is labelled with the register it arrived as what is on screen and what is in devicehub are the same address one listener serves all eight stations and litmus edge tells them apart by rtu station id, which is how a gathering system is really polled one host, many outstations on one line what it puts on litmus edge eight devicehub devices on the enron modbus driver, 121 registers four digital twin models across eight instances, which is a better account of this field than one would be the four pads share a wellpad model, the sales and check meters share a meterrun because they are the same measurement made twice, and a separator is not a well pad four analytics groups group what it computes, on the edge liquid loading risk gas velocity against the turner critical velocity custody measurement check the sales meter against its check meter in series flare combustion check pilot thermocouple against gas routed to the stack separator containment separator level against the dump valve deploy services oil gas production image us docker pkg dev/litmus customer facing/litmus solutions/oil gas production demo 0 1 0 container name oil gas production demo restart unless stopped ports \ target 4019 published 4019 protocol tcp \ target 5029 published 5029 protocol tcp environment \# fill these in edge url "${edge url }" edge api token "${edge api token }" sim host "${sim host auto}" apply on start "${apply on start 1}" edge verify tls "${edge verify tls 0}" http port "4019" enron port "5029" seed "11" log level "info" edge url=https //10 0 0 5 edge api token=your token sim host=10 0 0 9 docker compose up d open http //localhost 4019 configuration variable default what it does edge url the docker host litmus edge to configure edge api token unset token for that edge or a client id and secret sim host auto address the edge polls to reach this solution apply on start 1 configure the edge on startup edge verify tls 0 1 checks the edge's certificate seed 11 makes a run repeatable what you see across the top the field rate, and then three costs stated as a run rate per day rather than a running total that is deliberate a total is worth pennies in the first minute of a scenario and reads as "nothing is wrong" while gas is actively venting; a rate is visible the moment something breaks, and "$509 a day" is the number that decides whether to send somebody tonight the amount accumulated so far sits underneath as the evidence below, the gathering system left to right the four pads with their wellbores drawn, so the liquid standing in the tubing is something you watch rise; then compression, the separator with its level and dump valve, the flare with a flame that is there or is not, and the two meter runs in series with the difference between them printed underneath faults are the four scenarios above, injected per station, each with a card naming the datahub topics to watch and what changes about them applying and removing it the header carries both controls apply to edge pushes the devices, twins and analytics; it greys out once the solution is on the edge remove from edge previews first, listing exactly what would be removed and from which edge, and only then offers to remove it the solution removes only what it created it also records which edge its apply landed on and removes from that one, so repointing at a different edge in between cannot leave the first one carrying a solution nobody can see the operator view stays on its waiting panel until litmus edge is verified to be carrying the field every value on the page is read back from the edge, so a page showing data is itself evidence the chain is working reporting export report produces one self contained html file the shift's money figures, production by pad against each well's own baseline, the sales meter against the check meter, the separator and the flare no scripts and no external requests, so it opens offline and prints removing it docker compose down use remove from edge on the operator view, or clean up in the solutions provisioner # , to remove what it created on the edge support support\@litmus io mailto\ support\@litmus io