flush_time: Flush time

View source: R/flush_time.R

flush_timeR Documentation

Flush time

Description

Calculates the time taken to flush a respirometer with new water.

Usage

flush_time(volume, flow, tolerance)

Arguments

volume

numeric. Volume of the respirometer in L.

flow

numeric. Flow rate of the input of new water in L/s.

tolerance

numeric. Proportion of the volume to be exchanged. See Details.

Details

flush_time calculates the time taken to flush a respirometer with new water. It requires the volume of the respirometer (in L) and the flow rate (in L/s) of the input of new water.

The function calculates the time in seconds to exchange the proportion of water described by the tolerance input, which by default is 0.99. That is, the function calculates the time taken to exchange 99% of the water. The tolerance is required because of mixing during the exchange. Because old and new water are always mixing, the exchange of water is asymptotic: you can never replace 100% of the old water; there will be an ever decreasing proportion of it remaining (down to the final molecule, assuming perfect mixing). For all practical purposes, a tolerance value of 0.99 is sufficient. It is also important to note that the function takes no account of any shared reservoir of water, that is when the 'old' water is flushed out into the source of the 'new' water.

Value

Time in seconds for the tolerance proportion of the volume to be exchanged.

Author(s)

Nicholas Carey - nicholascarey@gmail.com

Examples

## How long to exchange 99% of a 10L respirometer when the input pump has
## a flow rate of 0.15 L/s
flush_time(volume = 10, flow = 0.15, tolerance = 0.99)


nicholascarey/respfun documentation built on June 15, 2025, 11:46 a.m.