Skip to the content.

Transient slug separator control example

This example wires a terrain-affected transient flowline to an inlet separator that is controlled by independent liquid-level and gas-pressure loops. The flowline uses a sinusoidal elevation profile to shed slugs into the separator while a choke on the inlet protects separator pressure and a pair of throttling valves, each driven by a transmitter/PID loop, work to hold the separator liquid level and gas outlet pressure near their set points. The sample program reports slug statistics plus the final liquid level and gas outlet pressure once the transient run finishes.

Key setup

What happens to level and pressure

Plotting the default run

The example records the separator liquid level and gas outlet pressure on every 0.5 s time step, and the --series flag prints those values as CSV for plotting. Over the ten-step transient, the separator level jumps toward 0.9 when the first slug reaches the vessel and stays elevated while the controller holds the outlet valve open, while the gas pressure peaks above 120 bara before decaying toward the 70 bara set point as the gas valve throttles. 【F:src/main/java/neqsim/process/controllerdevice/TransientSlugSeparatorControlExample.java†L22-L138】

How to run it

Execute TransientSlugSeparatorControlExample.main to print the slug statistics, separator liquid level, and gas outlet pressure for the default 5 s transient run (10 steps × 0.5 s). Use the --series flag to emit comma-separated time, level, and gas pressure for plotting (as used to build the graph above). The accompanying JUnit test TransientSlugSeparatorControlExampleTest simply calls runSimulation() to verify the example produces populated slug statistics and non-zero separator conditions.