Flow of oil or gas from the wellbore opening is controlled by pumps and valves at the opening. [0006] For simulation, the hydrocarbon stock which flows from the wellbore is analysed and parameters such as the compressibility and the viscosity are determined.