The present invention relates to a device (1) comprising at least a first flow channel (5) and a liquid space (3) for a liquid. The device (1) also comprises a second flow channel (7) arranged in a flow connection with the liquid space (3), and a steam space (4) arranged to receive steam forming in the liquid space (3). The first flow channel (5) is arranged in a flow connection with the steam space (4). The device (1) also comprises means (8) for conveying a gas flow from the outside of the device (1) via the second flow channel (7) to the liquid space (3), and means (6) for conveying a gas flow from the steam space (4) via the first flow channel (5) to the out- side of the device (1). Furthermore, the invention relates to a method in the device (1). In the method, a gas flow to the device (1) is conveyed via the second flow channel (7) to the liquid space (3). Resistance is induced to the exhaled gas flow flowing through the second flow channel (7) and pressure is increased in the liquid space (3). As a result of the pressure increase, steam produced in the liquid space (3) is received in the steam space (4). The gas flow is conveyed from the steam space (4) via the first flow channel (5) to the outside of the device (1).