A method for detecting and extracting a gaseous fluid contained in a closed loop operating on a Rankine cycle, the closed loop comprising a multiplicity of constituents successively positioned, which includes a circulation and compression pump for a working fluid, a heat exchanger associated with a hot source, an expansion machine, a cooling exchanger, a working fluid tank and circulation pipes connecting the multiplicity of constituents, the method comprising:
- measuring a temperature and a pressure of the working fluid at a point of the closed loop when the closed loop is at rest, wherein the closed loop is at rest when no working fluid circulation occurs at extraction equipment, and
- as the measured pressure exceeds a threshold value for a given ambient temperature (T), activating the extraction equipment for extracting the gaseous fluid in order to discharge the gaseous fluid from the closed loop.