1 Introduction

Measuring instantaneous free surface deformations of liquids is of general interest in several practical applications such as in coating and food industries, in large applications such as to study ship wakes, and in offshore engineering (Moisy et al. 2009; Gomit et al. 2013). The interest also naturally extends to more fundamental fluid dynamics and physics problems such as studying interfacial fluid instabilities (Fermigier et al. 1992; Eddi et al. 2011), droplet dynamics (Chang et al. 2013, 2015), wave formation and propagation on the surface of a fluid (Paquier et al. 2015), and in oceanography (Gallego et al. 2011; Benetazzo et al. 2012).

The methods to quantitatively measure liquid surface behaviour may be broadly divided into two categories based on whether they are intrusive or not. Intrusive methods can be used when the extent of intrusion is small, and the average flow is not significantly disturbed. Traditionally, arrays of resistive (or capacitive) wave probes have been used to study the variation of water level in large set-ups studying waves (Benetazzo et al. 2012; Liberzon and Shemer 2011), but can only be installed in sparse distributions separated by gaps of (at least) several centimetres. Less intrusive methods that rely on flow velocities collected using a stereo particle-image-velocimetry set-up have also been shown to work for large-scale systems (Turney et al. 2009; van Meerkerk et al. 2020). Some non-intrusive methods for such measurements that only use reflections from the water surface and a set of multiple cameras for reconstruction have also been developed (Benetazzo et al. 2012; Wanek and Wu 2006).

A non-intrusive method compatible with smaller, laboratory-scale set-ups, to resolve deflections of the micrometre to millimetre scale of the free surface, is to use the liquid surface as a refracting or reflecting interface. Usually refraction is used, where the water surface acts as the surface of a lens. A reference pattern is placed underneath the water bath that is contained in a transparent tank. When the light rays from the pattern emerge through the liquid surface, they are refracted due to the jump in refractive index. The variation in heights of the free surface causes further movements of the refracted image of the reference pattern. These movements can be recorded using a camera and analysed to reconstruct the liquid profile. This method is a spin on the well-known Schlieren method and is known as the free surface synthetic Schlieren method. It was first proposed by Kurata et al. (1990) and since then, has been matured by the works of Moisy et al. (2009) and Wildeman (2018) to result in a packaged method that is quick and inexpensive to arrange. The optics of the problem is used to compute the spatial gradients of the liquid surface. The gradient fields are then integrated using a suitable algorithm to obtain a full reconstruction of the imaged area. Even when a fully quantitative reconstruction cannot be obtained, a great deal of qualitative information can be learnt from mere visualisations of the free surface, as used by Fermigier et al. (1992), Jain et al. (2021b) and Chang et al. (2013, 2015). Non-intrusive acoustic techniques to measure the interface dynamics have also been developed (Horstmann et al. 2019).

A few other methods use the reflections from the liquid surface acting this time as a mirror to compute its spatial profile. Cox and Munk (1954) were the first to use the specular reflections of the Sun from the sea surface to obtain information about spatial gradients of the water surface. Direct specular reflections can also be obtained from suitably placed lamps, a method used by Rupnik et al. (2015) to reconstruct the liquid profile. Another category of such methods uses structured light (such as spatially periodic bright bands of light) that are projected on the free surface. When the surface deforms, the projections also appear distorted. A camera is used to record the movements of the projected fringes, whose phase changes are interpreted to reconstruct the height profile of the liquid surface (Cobelli et al. 2009; Van der Jeught and Dirckx 2016). Such methods have long been used in solid mechanics where extremely small displacements (of the order 10 nm) need to be resolved (Notbohm et al. 2013; Grediac et al. 2016; Faber et al. 2012; Häusler et al. 2013; Devivier et al. 2016). They have come to be known as ‘deflectometry’.

Here we visualise the movements of the water surface by using it as a specularly reflecting surface in a total-internal-reflection (TIR) configuration. Taking inspiration from Moisy et al. (2009) and Wildeman (2018), we use a fixed pattern, whose distortions by the moving free surface are interpreted in a synthetic Schlieren sense to obtain displacement fields. Note that contrary to Moisy et al. (2009) and Wildeman (2018), we use the water surface as a mirror rather than as a lens. From the point of view of a ray optics problem, the presence of a mirror results in an additional complication as it is the reflecting ‘mirror’ that undergoes deformation, and not the apparent object that is behind the mirror. We exploit the ray optics in the set-up to derive relations between the measured displacement fields and the local spatial gradients of the free surface. Finally we discuss how this gradient information is integrated in a least-squares sense to obtain a fully reconstructed liquid surface profile from the imaged snapshot at a given instant.

The main offering of this particular method is that the liquid surface can be visualised when it is not optically accessible, due to, for instance, the presence of an opaque object above the free surface. An example of such a situation is when a solid projectile is close to slamming onto the liquid surface, and obstructs direct imaging needed for synthetic Schlieren.

As imperfections on a mirror are much easier detected than on a lens, our method is expected and shown to be inherently more sensitive than classical synthetic Schlieren.

The paper is organised as follows: in Sect. 2, we introduce the optics which allow the technique to work and details of the set-up in which we implemented the method. The first stage of the technique involves measuring the displacements of the reference pattern in the mirror plane. The methods to quantify these displacements are discussed in Sect. 3. Next, in Sect. 4, we discuss the relation between these displacements and the deformation of the water surface from which they originate. In Sect. 5, we discuss some subtleties involved in performing the inverse gradient operation in order to finally obtain the final height field, along with an example of the reconstructed surface. In Sect. 6.1, we cover sensitivity, optical limitations and uncertainty estimation. An example of this technique is discussed in Sect. 7, wherein we show a comparison between the measurements and simulations, thereby validating the technique. We end in Sect. 8 with conclusions, the advantages of this technique and its limitations when compared to other methods which may offer a similar range of accuracy in measurements.

2 Set-up requirements

Fig. 1
figure 1

Schematic of the TIR set-up. A brightly lit, large light source is used to illuminate the printed pattern O. The image from the printed pattern is reflected at the water–air interface and enters a suitably placed high-speed imaging camera. For a large enough angle of incidence, the interface acts as a mirror due to total internal reflection, and the camera only captures the mirror image. The light rays illustrate the general optics of the problem. In keeping with the TIR requirement, the angle \(\theta\) must satisfy: \(\theta \ge \arcsin n_a/n_w\), where \(n_a\) and \(n_w\) are the refractive indices of ambient fluid and water, respectively

The set-up consists of a water-filled transparent tank with flat walls, a fixed pattern that is allowed to project onto the liquid surface of interest and a camera to image the reflection from the liquid surface. A light source is used to illuminate the fixed pattern as shown in Fig. 1.

The light which enters the water tank is refracted towards the interface’s normal, as it enters an optically denser medium. Eventually it reaches the air–water interface, where depending on the magnitude of angle of the incidence (represented by \(\theta\) in Fig. 1), the light rays might either pass into the surrounding optically rarer medium (here, air) or get specularly reflected as if by a mirror. The latter case is what we aim to obtain, known as total internal reflection (TIR). It requires the angle of incidence at water surface to be greater than the critical angle \(\theta _c = \arcsin n_a/n_w\), where \(n_a\) and \(n_w\) are the refractive indices of air and water, respectively. For TIR to occur at an air–water interface, the angle of incidence needs to be greater than \(\theta _c \approx 48.75^\circ\), which may require the water bath depth to be of the order of the lateral width of the tank. Here we use a tank that is 50 cm in length and width, and is filled with water up to a depth of \(\sim 30 \text { cm }\).

2.1 Operating conditions

The method described here can be used to visualise the motion of air–water interface only if the light passing from water to air is fully reflected at the surface, which is easily obtained with large incident angles. However, TIR cannot be achieved if the air were replaced by a medium optically denser than water, such as glass (\(n \approx 1.52\)) or silicone oil (\(n \approx 1.40\)): the image of the original pattern (O in Fig. 1) would always be refracted and never reflected.

With the above conditions satisfied, the air–water surface will only act as a mirror if it exists. Any small contamination floating at the surface disrupts the free surface, such that the ‘mirror’ disappears at all such locations. This condition also sets the maximum magnitude of deformations that can be measured. Indeed, local and sharp distortions of the air–water interface produce large curvatures. Thus, with the condition \(\theta > \theta _c\) still holding true, the light rays reflected at the interface can be deflected away from the sensor of the camera. Additionally, even at small deformations, some ray crossing may occur, especially where curvature is large, making the imaging and interpretation ambiguous.

Note that due to arrangement of the optical set-up, the images recorded by an observer at the camera’s location are flattened in the \(y-\)direction, i.e. along the direction in which light rays are shown to propagate in Fig. 1 (to the reader, the direction in the plane of the paper). The result is such that a circular object suspended at the water surface appears elliptical. Thus, a conversion factor applies to the aspect ratio. This is found by placing a circular disc at the water surface and measuring the eccentricity of the ellipse that results from the distortion. There is no such distortion along the x-direction (to the reader, normal to the plane of the paper), and the pattern is reflected as is.

As the camera observes the liquid surface laterally, the field of view does not lie in a plane parallel to the camera. To deal with this, sufficient focal depth must be used, and this may demand stronger illumination of the reference pattern. As an alternative, Scheimpflug optics may be used, wherein an additional lens is placed in between the rotated subject plane and the camera to obtain a corrected properly re-scaled view in the image plane.

Clearly, also other deformations created by optical imperfections in the set-up (e.g. curved container walls) can be dealt with using standard digital image correlation techniques performed on the undisturbed image of the pattern.

3 Quantifying displacement fields

An example of the image of a stationary water surface, as recorded on camera, is shown in Fig. 2a. When a disturbance travels across the water surface, it deforms the interface such that the reflected image is distorted, as shown in Fig. 2b. The disturbances of the water surface are recorded with time, and the images are processed using an appropriate method to extract displacement vectors \(\mathbf {u} = (u_x,u_y)\), from the movements of the pattern. Here, both \(u_x\) and \(u_y\) are functions of the coordinate vectors \(\mathbf {r}=(x,y)\) that describe the undisturbed liquid surface and, of time t. Two such methods are discussed.

Fig. 2
figure 2

a The reference pattern O is reflected, as is, when the water surface is stationary. b Waves passing on the water surface create disturbances on the reflecting ‘mirror’, which results in a distorted image of the reference pattern being reflected towards the camera. c The magnitude \(\sqrt{u_x^2 + u_y^2}\) of the displacement vectors \((u_x,u_y)\) of bright squares such as shown in panel b is measured using a PIV routine. d The magnitude of displacement vectors of the same pattern shown in panel b is measured using Fourier demodulation. See Sect. 3.3 for comparisons between the two methods

3.1 Using cross-correlation

Cross-correlation methods are usually deployed on two subsequent images from a time series (for instance, as they are used in particle image velocimetry, PIV) and divide the region of interest into interrogation windows. In typical PIV measurements, a multi-stage algorithm is used, whereby each image is scanned multiple times, with successively decreasing size of the interrogation windows. Cross-correlation techniques, by their very nature, are best used with images that contain a large number of randomly distributed ‘particles’ (here, dots or squares) (Raffel et al. 2007). Note that although such a random pattern may be better suited for use with cross-correlation techniques, we here use a pattern with regularly spaced squares due to demanding illumination requirements. Any freely available or commercial PIV program may be used to obtain two-dimensional displacement fields in the x- and y-directions.

During the interrogation process, we choose window sizes in keeping with the recommendations made by Raffel et al. (2007) and Keane and Adrian (1992). However, Fig. 2c shows that the displacement field can still contain anomalies in some regions. This is due to how the spatial resolution and displacement resolution are affected by the size of the interrogation window. Most of the noise in the data may be smoothened in later stages when reconstructing the water surface (see Sect. 5.2).

3.2 Using Fourier demodulation

When regularly spaced patterns are used (O in Fig. 1), the images (shown in Fig. 2) can be processed using Fourier demodulation (FD)-based methods to extract displacement fields. In this case, images from a time series are usually compared to a reference image with the undisturbed pattern. These methods have been commonly used in solid mechanics (Grediac et al. 2016; Devivier et al. 2016) as they can resolve extremely small disturbances which are of use in measuring 2D strain fields. Recently these techniques have been introduced in fluid mechanics (Wildeman 2018). The principle is the following: given a regularly spaced pattern with a periodicity determined by two orthogonal wave vectors \(\mathbf {k}_s\) for \(s=1,2\), the intensity profile of the undisturbed pattern \(I_0(\mathbf {r})\) is dominated by the Fourier components corresponding to \(\mathbf {k}_s\). Here, \(\mathbf {r}\) is the position vector. A disturbed free surface reflects a distorted pattern, such that the reference intensity profile is slightly deformed, and changes to

$$\begin{aligned} I(\mathbf {r}) = I_0\!\left( \mathbf {r}-\mathbf {u}(\mathbf {r})\right) \,, \end{aligned}$$
(1)

where \(\mathbf {u}(\mathbf {r})\) denotes the displacement \(\mathbf {u}\) of the pattern at position \(\mathbf {r}\). By filtering out only the dominant Fourier modes, \(I_0(\mathbf {r})\) transforms into

$$\begin{aligned} g_0(\mathbf {r}) \approx a_s\exp \!\left[ i\mathbf {k}_s\cdot \mathbf {r}\right] \qquad \text {for}\,\,s=1,2\,, \end{aligned}$$
(2)

with \(a_s\) constant. Consequently, the deformed pattern \(I(\mathbf {r})\) transforms into

$$\begin{aligned} g(\mathbf {r}) = g_0\!\left( \mathbf {r}-\mathbf {u}(\mathbf {r})\right) \approx a_s\exp \!\left[ i\mathbf {k}_s\cdot \left( \mathbf {r} - \mathbf {u}(\mathbf {r})\right) \right] \\ \text {for}\,\,s=1,2\,, \nonumber \end{aligned}$$
(3)

i.e. it is phase-modulated by the disturbances \(\mathbf {u}(\mathbf {r})\) of the pattern. The latter can be extracted by multiplying \(g(\mathbf {r})\) with the complex conjugate of the filtered reference pattern \(g_0^*(\mathbf {r})\) and determining the phase shift

$$\begin{aligned} \arg \!\left( g(\mathbf {r})g_0^*(\mathbf {r})\right) \approx -\mathbf {k}_s\cdot \mathbf {u}(\mathbf {r})\qquad \text {for}\,\,s=1,2\,. \end{aligned}$$
(4)

For each position \(\mathbf {r}\), this constitutes a pair of linear equations, which can be readily solved for \(\mathbf {u}(\mathbf {r})\).

An example resulting from this procedure is shown in Fig. 2d. Naturally, some restrictions apply. For example, the components in the signal whose wavelengths are significantly shorter than the pattern wavelength are simply filtered out. The reader can refer to Wildeman 2018) for a more detailed discussion on how to select the wave vectors \(\mathbf {k}_s\) of the pattern appropriately.

3.3 Comparisons between the two methods

The main difference between using FD and PIV is that while the former compares each image on a stack to a fixed reference image (typically the first in the stack) to calculate the displacement, the latter involves comparing each image to the preceding one in the series (such that the reference image for a stack is not fixed and moves along the image stack). Thus, when a pattern deforms beyond a certain extent such that no amount of (even distorted) periodicity of the pattern can be detected, the FD method will fail to detect a displacement. In such instances, auto-correlation-based PIV will still yield a displacement field, which, however, will likely contain some inaccuracies.

Since PIV divides the total image into multiple windows, the displacements that occur within the outer margins of the image that are half the width of the interrogation windows, are not resolved. Additionally, the resolution of the displacement field depends on the overlap between adjacent interrogation windows. Obtaining a full-pixel resolution between the image and the displacement field are often computationally very expensive. In contrast, FD yields displacement fields at full-pixel resolution as that of the images being processed, and no information at the margins of the image is lost.

In both methods, displacements may be measured with sub-pixel resolution, but spatial structures smaller than the interrogation window (in the case of PIV), or the wavelength of the pattern (for FD) cannot be easily resolved.

4 Obtaining surface deformation from projected image distortions

Fig. 3
figure 3

Image reconstructions representing the decoupled ‘mirror’ deformation problem, which provides the relation between displacements recorded by the camera and the surface deformation h. a An angular tilt of the liquid free surface over an angle \(\alpha\) in the (yz)-plane shifts the image \(P'\) of an object P for the undisturbed free surface to \(P''\). A camera looking at the image from the direction in which the light ray (blue) is travelling observes a shift of \(P'\) indicated by the green arrow. b An angular tilt over an angle \(\alpha\) in the (xz)-plane, i.e. perpendicular to the situation depicted in (a), results in a predominantly horizontal shift of the image (green arrow), which again moves from \(P'\) to \(P''\). In this projected view, the camera now is located at the same point as the object P. c A vertical shift of the free surface over a distance h in the z-direction results in a vertical shift of the image \(P'\) over a vertical distance 2h. In the (yz)-plane of the drawing this leads to a shift observed by the camera as indicated by the green arrow. Clearly, there is no observable shift in the (xz)-plane. Note that H corresponds to the vertical distance between the reference pattern (the object P) and the free surface (and thus also to the vertical distance of the image \(P'\) in the undisturbed mirroring water surface), whereas L denotes the horizontal distance of P to the point where the light ray reflects, i.e. it is related to the angle of reflection \(\theta\) as \(\tan \theta = L/H\). The primed quantity \(H'\) is the distance of P to the deformed free surface (and thus also to the corresponding image \(P''\)). The quantities \(\Delta x\), \(\Delta y\) and \(\Delta z\) denote the displacements of the image \(P'\) in space. The vertical displacement h is the quantity that we ultimately want to measure. Note that all deformations of the free surface are greatly exaggerated for the purpose of this illustration

The last task is to relate the displacement vector \(\mathbf {u}(\mathbf {r})\) to the actual vertical deformation \({h(\mathbf {r},t)}\) of the liquid surface. To do so, we need to consider the ray optics of the set-up in some detail. As illustrated in Fig. 3, an object (source) is placed at position P, from which a light ray travels towards the ‘mirror’ (here, the air–water interface) from which it is reflected into the camera. Although we measure the displacement fields by tracking the deformation of a fixed pattern, the deformations actually take place at the air–water interface. In other words, it is the mirror that deforms and makes the image of the object behind it look distorted. The reader is asked to refer to Fig. 3 as a guide. Since the water surface can either (and often simultaneously) shift over a vertical distance h or tilt by some angle \(\alpha\) in either the (yz)-plane (i.e. parallel to the plane in which camera and pattern lie) or the (xz)-plane (that is, perpendicular to it), we have here a set of three, generally coupled problems, which we may treat as uncoupled by virtue of the smallness of the free surface deformations that we aim to measure: the ‘mirror’ may undergo angular deflection in two directions (Fig. 3a, b), or it may simply shift in the vertical direction (Fig. 3c).

The first step is to relate these three elementary deformations to the shifts that they cause in the camera images, represented by the green arrows in Fig. 3. The first case, where a tilt over an angle \(\alpha\) in the (yz)-plane occurs in isolation, is shown in Fig. 3a. A light ray (blue) emerging from P travels towards the mirroring undisturbed free surface (horizontal black line) and reflects towards the camera, the observer. To the observer this light ray appears to travel from a point \(P'\), the mirror image of P. With observer fixed, let the mirror tilt by a small angle \(\alpha\). As a result, the image point \(P'\) now translates to \(P''\), which can be found by mirroring P in the tilted free surface (red tilted line). To compute the displacements \(\Delta y\) and \(\Delta z\) in the (yz)-plane, we first concentrate on the distance d of the undisturbed and tilted free surface, measured along the line connecting P and \(P'\), as indicated in the figure. On the one hand, \(d = L\tan \alpha\), as is obtained from the triangle formed by the endpoints of d and the point where the blue light ray reflects. On the other hand, we can relate the distance H of P to the undisturbed free surface and \(H'\) of P to the tilted free surface as \(H' = (H - d) \cos \alpha = (H - L\tan \alpha ) \cos \alpha\), from the triangle formed by H, \(H'\) and the tilted free surface. Using this relation between \(H'\) and H, we have

$$\begin{aligned} \Delta y= \, & {} 2H' \sin \alpha \nonumber \\= \, & {} 2H (1 - \tan \theta \tan \alpha )\cos \alpha \,\sin \alpha \nonumber \\\approx \, & {} 2H\alpha + O(\alpha ^2)\,, \end{aligned}$$
(5)

where we used that \(\tan \theta = L/H\) and in the approximate equality made use of the fact that \(\alpha\) is small such that the trigonometric functions of \(\alpha\) can be approximated by their linear Taylor expansions around zero. Similarly, we have

$$\begin{aligned} \Delta z= \, & {} 2H - 2H' \cos \alpha \nonumber \\= \, & {} 2H (1 - (1 - \tan \theta \tan \alpha )\cos ^2\alpha ) \nonumber \\\approx \, & {} 2H \tan \theta \,\alpha + O(\alpha ^2)\,. \end{aligned}$$
(6)

To determine the shift \(\Delta S_\text {y,tilt}\) that is observed by the camera (shown by green arrows in Fig. 3a), we need to project \(\Delta y\) and \(\Delta z\) onto the plane perpendicular to the viewing direction (i.e. perpendicular to the imaginary light ray represented by the blue dashed line), such that

$$\begin{aligned} \Delta S_\text {y,tilt}= \, & {} \Delta z\sin \theta + \Delta y \cos \theta \nonumber \\\approx \, & {} 2H (\tan \theta \,\sin \theta + \cos \theta ) \alpha + O(\alpha ^2)\nonumber \\\approx \, & {} - 2H (\tan \theta \,\sin \theta + \cos \theta )\frac{\partial h}{\partial y} = \, - \frac{2H}{\cos \theta }\frac{\partial h}{\partial y}\,, \end{aligned}$$
(7)

where in the last line we have approximated \(\alpha\) by the local slope of the free surface at the point where the light ray touches the interface: \(\partial h/\partial y = \, -\tan \alpha \approx -\alpha + O(\alpha ^2)\).

The second case, depicted in Fig. 3b, corresponds to a tilt over an angle \(\alpha\) in the (xz)-plane, where for clarity the light ray has not been drawn since in this projection it would coincide with the line connecting the object P with the free surface. This case may be analysed in a very similar manner as the first. The displacements \(\Delta x\) and \(\Delta z\) in the (xz)-plane can now be directly deduced from the orthogonal triangle formed by P, \(P''\) and the intersection of the vertical through P and the horizontal through \(P''\), together with the relation \(H' = H\cos \alpha\) obtained from the lower triangle in the figure

$$\begin{aligned} \Delta x = 2H' \sin \alpha = 2H \cos \alpha \,\sin \alpha \approx 2H\alpha + O(\alpha ^3)\,, \end{aligned}$$
(8)

and

$$\begin{aligned} \Delta z= \, & {} 2H - 2H' \cos \alpha = \, 2H (1-\cos ^2 \alpha ) \nonumber \\\approx \, & {} 2H\alpha ^2 + O(\alpha ^4)\,, \end{aligned}$$
(9)

where it is good to note that the latter is of order \(\alpha ^2\) and also does not lead to a shift in the image plane of the camera. Therefore, the shift \(\Delta S_\text {x,tilt}\) that is observed by the camera equals

$$\begin{aligned} \Delta S_\text {x,tilt} = \, \Delta x \approx 2H \alpha \approx - 2H \frac{\partial h}{\partial x}, \end{aligned}$$
(10)

again approximating \(\alpha\) by the local slope of the free surface: \(\partial h/\partial x = -\tan \alpha \approx -\alpha + O(\alpha ^2)\).

The third case corresponds to a vertical shift h of the free surface in the positive z-direction as depicted in Fig. 3c. Clearly such a shift only leads to a corresponding shift of the camera image in the (yz)-plane, where the displacement of the image \(P'\) to \(P''\) is also a simple vertical shift over a distance 2h, that is, \(\Delta z = 2h\). As a consequence, the shift \(\Delta S_\text {y,shift}\) that is observed by the camera, i.e. the projection of \(\Delta z\) onto the plane perpendicular to the viewing direction is equal to

$$\begin{aligned} \Delta S_\text {y,shift} = -\Delta z \sin \theta = -2 \sin \theta \,h, \end{aligned}$$
(11)

where we took into account the opposite direction of the shift as compared to that of the first case by the minus sign. Finally we note that by using the same symbol (h) for the vertical shift and the local vertical deformation of the free surface, the result is already stated in terms of h(xyt). In summary, we find that our elementary deformations of the free surface result in a displacement field \((\Delta S_\text {x},\Delta S_\text {y})\) in the camera image that is given by:

$$\begin{aligned} \Delta S_\text {x}= \, & {} \Delta S_\text {x,tilt} \approx - 2H \frac{\partial h}{\partial x}\,,\nonumber \\ \Delta S_\text {y}= \, & {} \Delta S_\text {y,tilt} + \Delta S_\text {y,shift}\nonumber \\\approx \, & {} - \frac{2H}{\cos \theta }\frac{\partial h}{\partial y} -2 \sin \theta \,h\,, \end{aligned}$$
(12)

where h(xyt) is the deformation of the free surface that we are after.

The second step is to relate the displacement field \(\Delta \mathbf {S} = (\Delta S_\text {x},\Delta S_\text {y})\) in the camera image to the field \(\mathbf {u}\) discussed in the previous section, which is a rather subtle one. One may be tempted to just equate the two, but then one overlooks that structures on the free surface appear deformed in the camera image since the latter is observing the free surface under an angle \(\theta\). For example, circles on the free surface appear like ellipses with their short axis in the y-direction in the camera image. Naturally, one will correct the camera images for these kind of deformations, but now one has two options, namely to perform the FD or PIV analysis either before or after this correction, i.e. one may determine the displacement field \(\mathbf {u}\) either before or after correcting the camera images. In general we have found it advantageous to first correct the grid in the camera images, such that the coordinates \(\mathbf {r} = (x,y)\) in the corrected camera images correspond to the coordinate system to the free surface (conveniently denoted by the same symbols and corresponding to the notation that has been used throughout the article).

For the case depicted in Fig. 3, transforming back to the coordinate system attached to the free surface amounts to dividing the y-coordinate of the camera image by \(\cos \theta\). Since the displacement field \((\Delta S_\text {x},\Delta S_\text {y})\) has been related to the vertical deformation field h(xyt), and \(\mathbf {u}(x,y,t)\) has been obtained in the coordinate system attached to the free surface, we need to make the same transformation for the y-component of \(\Delta \mathbf {S}\), i.e.

$$\begin{aligned} u_x= \, & {} \Delta S_\text {x} \approx - 2H \frac{\partial h}{\partial x}\,,\nonumber \\ u_y= \, & {} \frac{\Delta S_\text {y}}{\cos \theta } \approx - \frac{2H}{\cos ^2\theta }\frac{\partial h}{\partial y} -2 \tan \theta \,h\,. \end{aligned}$$
(13)

In the case that the field of interest of the free surface is small compared to the distance H (and subsequently also to L), it may well be sufficient to assume that \(\theta\) is constant and that no correction in the x-direction is necessary, as in Eq. 13. In general, however, \(\theta\) is not constant, but a function of x and y, and a similar correcting factor may also be necessary in the x-direction for those points that are far away from the centre.

In any case, one may rewrite Eq. 13 as

$$\begin{aligned} \mathbf {\nabla } h + \frac{T}{H} h \varvec{\hat{j}} = - \frac{{\tilde{\mathbf {u}}}}{2H}\,, \end{aligned}$$
(14)

where \(\varvec{\hat{j}}\) denotes the unit vector in the y-direction and \({\tilde{\mathbf {u}}} = (\tilde{u}_x,\tilde{u}_y)\) and T are defined as

$$\begin{aligned} (\tilde{u}_x,\tilde{u}_y)= \, & {} \left( u_x,u_y\,\cos ^2\!\theta \right) \,\,\,\,\text {and}\nonumber \\ T= \, & {} \cos ^2\!\theta \,\tan \!\theta = \tfrac{1}{2}\sin (2\theta )\,. \end{aligned}$$
(15)

This equation constitutes a partial differential equation for the vertical deformation field \(h(\mathbf {r},t)\) in terms of the experimentally known \((\tilde{u}_x,\tilde{u}_y)\) and will be the basis of our analysis in the coming sections. It is convenient to split Eq. 14 into components:

$$\begin{aligned} \frac{\partial h}{\partial x}= \, & {} -\frac{\tilde{u}_x}{2H}\,, \end{aligned}$$
(16)
$$\begin{aligned} \frac{\partial h}{\partial y} + \frac{T}{H}h= \, & {} -\frac{\tilde{u}_y}{2H}\,, \end{aligned}$$
(17)

On careful observation of Fig. 3, one may notice that drawing a light ray from the displaced image point \(P''\) towards the camera also causes a shift of the point where it reflects from the free surface. That is, one is not exactly measuring the vertical shift and angular tilt of the free surface in the point (xy) but in a slightly shifted point. In principle one could correct for such an image shift, but if h and especially \(\mathbf {\nabla }h\) are not varying too quickly on the free surface one can neglect this effect. Since ray crossing limits the second derivatives of h with respect to x and y, as will be discussed in detail in Sect. 6.1, this condition is generally fulfilled.

5 Spatial integration of gradient fields

5.1 Recasting the integrand using an integrating factor

Note that Eq. (14) cannot be directly integrated due to the additional dependence on h. Thus, we recast the expression using an integrating factor, under the assumption that T is constant over the region of interest, i.e. independent of x and y. Equation (17) can be rewritten as

$$\begin{aligned} - \frac{\tilde{u}_y}{2H}&= \frac{\partial h}{\partial y} + \frac{T}{H}h \nonumber \\&= e^{- y T/H} \frac{\partial }{\partial y} \left( e^{y T/H} h \right) . \end{aligned}$$
(18)

Similarly, Eq. (16) can be rewritten using the same integrating factor

$$\begin{aligned} - \frac{\tilde{u}_x}{2H}&= \frac{\partial h}{\partial x} \nonumber \\&= e^{-y T / H} \frac{\partial }{\partial x} \left( e^{y T / H} h \right) . \end{aligned}$$
(19)

Equations (18) and (19) can be combined using vector notation as

$$\begin{aligned} - \frac{{\tilde{\mathbf {u}}}}{2H} = e^{- y T/H} \mathbf {\nabla } \left( e^{y T / H} h \right) , \end{aligned}$$
(20)

or,

$$\begin{aligned} \mathbf {\nabla } \left( e^{y T/H} h \right) = - \frac{e^{y T/H}}{2H} {\tilde{\mathbf {u}}}. \end{aligned}$$
(21)

The gradient fields in x- and y-directions that are to be integrated over, are expressed in the form shown on the right hand side of Eq. (21). The result obtained from surface integration is divided by the factor \(\exp (\frac{y T}{H})\) to obtain the final height field h(xy).

With Eq. 21, we have now recast our original problem in a conservative form

$$\begin{aligned} \mathbf {\nabla } f = \mathbf {\xi }, \end{aligned}$$
(22)

where \(\mathbf {\xi }\) is the known vector field and f is to be determined. Mathematically such an expression can be directly integrated since \(\mathbf {\nabla } \times \mathbf {\xi } = \mathbf {\nabla } \times \mathbf {\nabla } f \equiv 0\). However, since \(\xi\) is only approximately known due to unavoidable noise in the experiments, some additional care is needed during the integration.

5.2 Inverse gradient operation

The inverse gradient operation is performed on Eq. (21) to obtain the final result

$$\begin{aligned} f(x,y) = e^{y T/H} h(x,y) = \mathbf {\nabla }^{-1} \left( - \frac{e^{y T/H}}{2H} {\tilde{\mathbf {u}}} \right) + f_0, \end{aligned}$$
(23)

where \(f_0\) is an integration constant, connected to the absolute height of the free surface. In the following discussion, \(f_0\) is set to zero for convenience. One way to integrate over the gradient information \(\mathbf {\xi }\) is to start at a reference point \((x_{r},y_{r})\) and integrate along a path such that

$$\begin{aligned} f(x,y) = \int _{x_{r}}^{x} \xi _x (x',y_r) \mathrm {d}x' + \int _{y_{r}}^{y} \xi _y (x,y') \mathrm {d}y'. \end{aligned}$$
(24)

However, using this approach, any noise in the local gradient information may get added over the path of integration (Moisy et al. 2009). Moreover, in a discretised implementation of this method, it is not clear how the final result would be modified if the order of integration along the paths in x- and y-directions were switched. Both drawbacks can be avoided by using a ‘global’ approach. This is done by building a linear system of equations, replacing the gradient by a second-order centred finite difference operator. If the (xy) space is discretised by \(M \times N\) elements, there are MN variables to be determined (corresponding to the discretised height field f(xyt)), while there are 2MN knowns (the gradient information stored in \(\mathbf {u}\)) in the system, leading to as many equations. Thus, we are dealing with an over-determined matrix system, which cannot be simply inverted. The inversion is therefore performed while minimising a residual cost function. More details can be found in Moisy et al. (2009) and Harker and O’Leary (2008).

The least-squares solution thus found has the effect of smoothening out local outliers present in the gradient fields. An efficient MATLAB implementation was written and made public by D’Errico (2013). More details on global least-squares reconstruction and further advanced methods can be found in the works by Harker and O’Leary (2008), Harker and O’Leary (2011) and Harker and O’Leary (2015). We use the implementation by D’Errico which is now commonly used in reconstruction problems that involve an inverse gradient operation to be performed on a mesh of spatial gradients (Moisy et al. 2009; Simonini et al. 2021; Kolaas et al. 2018; Kaufmann et al. 2020). An example of the reconstructed surface profile, based on the typical displacement field shown in Fig. 2d, is shown in Fig. 4. A more systematic experiment, along with comparisons with simulations is discussed in Sect. 7.

Fig. 4
figure 4

Reconstructed surface profile of water from the displacement field shown in Fig. 2d. The arbitrary disturbances on the water surface were recorded and measured over a small section of the total water surface in the bath that is shown above

Now, finally, one may ask what can be done when T is not constant, that is, when the region of interest at the free surface is not small compared to H. In principle, one may use an integration factor where the exponent is an integral over T/H, which would, however, add additional complexity to the analysis. One may, however, also ask how large of an error one makes by approximating T/H by a constant. It turns out that this error is relatively small, since the relative sensitivity of the method to a vertical shift is small, as will be discussed in detail in the next section.

6 Sensitivity, limitations and error estimation

6.1 Sensitivity

Starting from Eq. (14) which relates the surface profile height h(xyt) to the measured displacement field \({\tilde{\mathbf {u}}}(x,y,t)\), one immediately realises that there are two manners in which the surface profile height may influence the displacement field, namely by a tilting of the interface (corresponding to the first term on the right hand side, \(\sim \mathbf { {\nabla } h}\)) or by a vertical shift (the second term which is proportional to h). We will now address the sensitivity of the set-up, where we will start with assessing the relative sensitivity of a tilt versus a vertical shift.

Since tilt and shift are usually correlated, we start by performing a modal decomposition of the surface height profile, where it suffices for our purposes to concentrate on the y-direction only

$$\begin{aligned} h(y) = \sum \limits _{k} {A}_k \sin (k y) \text { with } k=\frac{2 \pi }{\lambda }. \end{aligned}$$
(25)

Rewriting the y-component (17) of Eq. (14) as

$$\begin{aligned} -2 H \frac{\partial h}{\partial y} - 2 T h = \tilde{u}_y \equiv \tilde{u}_{y,\text {tilt}} + \tilde{u}_{y,\text {shift}}, \end{aligned}$$
(26)

and inserting Eq. (25) yields, for each of the modes separately

$$\begin{aligned} - 2 H k {A}_k \cos (k y) - 2 T {A}_k \sin (k y) = \tilde{u}_{y,\text {tilt}} + \tilde{u}_{y,\text {shift}}. \end{aligned}$$
(27)

Clearly, the two terms of these equation do not attain their maxima in the same points, as a result of the fact that \(\sin (k y)\) is zero where its derivative is maximal and vice versa, but one may easily compute the respective maxima and determine the relative sensitivity as the ratio of these

$$\begin{aligned} \frac{\tilde{u}_{y,\text {shift}}}{\tilde{u}_{y,\text {tilt}}} = \frac{2 T {A}_k}{2 H k {A}_k} = \frac{T}{H k } = \frac{T}{2 \pi } \frac{\lambda }{H}. \end{aligned}$$
(28)

Note that this ratio is independent of the amplitude \({A}_k\). Since the wavelength of even the largest structures that are to be observed is usually much smaller as the distance of the liquid surface and the pattern, i.e. \(\lambda \ll H\), the above ratio is typically much smaller than one, which implies that the set-up is much more sensitive for a tilting of the surface than for a vertical shift \(u_{y,\text {tilt}} \gg u_{y,\text {shift}}\).

To put this difference in absolute terms, we note that the detection of the displacement field \(\mathbf {u}\) is bounded by the sensitivity of the method used to obtain it which provides a minimum detectable displacement \(\delta v_{y,\text {min}}\) which is some fraction of the pixel size of the measured image. Using \(\tilde{u}_{y,\text {tilt}} > \delta \tilde{u}_{y,\text {min}}\), we find that

$$\begin{aligned} 2 H k {A}_k \gtrapprox \delta \tilde{u} _{y,\text {min}}, \end{aligned}$$
(29)

yielding

$$\begin{aligned} \frac{{A}_k}{\delta \tilde{u}_{y,\text {min}}} \gtrapprox \frac{\lambda }{4 \pi H}. \end{aligned}$$
(30)

From the above, we can immediately conclude that the deformations that are visible with our method are much smaller than the spatial resolution of the displacement pattern. For the example of Fig. 4, where \(H = 30\) cm, and the typical wavelength of the structure is \(\lambda \approx 2\) cm, we find that \(\lambda /(4 \pi H) \approx 0.005\). Using a spatial resolution \(\delta u_{y,\text {min}} = 100\) \(\mu\)m, we obtain that the minimal displacement \(\delta h_{\text {min,tilt}}\) that is discernible through the detection of the tilted interface equals \(\delta h_{\text {min,tilt}} = 0.5\) \(\mu\)m and that this sensitivity may (at least theoretically) be increased by increasing the distance H between camera/pattern to the liquid surface. Similarly, we obtain for the sensitivity for a vertical shift that

$$\begin{aligned} 2 \tan \theta {A}_k \gtrapprox \delta \tilde{u}_{y,\text {min}}, \end{aligned}$$
(31)

or,

$$\begin{aligned} \frac{{A}_k}{\delta \tilde{u}_{y,\text {min}}} \gtrapprox \frac{1}{2 \tan \theta }. \end{aligned}$$
(32)

As expected, the result is independent of the wavelength and much larger than it is in the case of a tilted interface. In fact, using the same spatial resolution in the case of the example of Fig. 4 (\(\theta \approx 55^\circ\)) we have \(\delta h_{\text {min,shift}} = 50\) \(\mu\)m, i.e. the set-up is two orders of magnitude less sensitive for a vertical shift than for a tilt.

Conversely, this means that if two patterns differ by a vertical shift, i.e. \(h_1(x,y,t) = h_2(x,y,t) + \Delta h(t)\), the difference between \(h_1(x,y,t)\) and \(h_2(x,y,t)\) would be very difficult to detect, especially if \(\Delta h\) is of the same order as \(h_{1,2}\), which would usually be the case in experiment. Here, the contribution of \(\Delta h\) to the signal would be typically two orders of magnitude smaller than that of the surface deformation features. This implies that, even in a time series, there may be a shift between the profiles determined at different moments in time that is extremely hard to detect, if at all. This makes the method most suitable in the case that there exists a reference point on the interface where no deformation is expected.

6.2 Limitations

The set-up has several limitations originating from the fact that it makes use of the liquid surface as a deformed mirror, which we will discuss in sequence in this subsection.

6.2.1 Mirroring condition

Total internal reflection will only happen if the angle of incidence \(\phi _i\) on the deformed liquid surface is larger than the minimal angle \(\phi _{i,\text {min}}\) for which total internal reflection will take place, i.e.

$$\begin{aligned} \phi _i > \phi _{i,\text {min}} = \arcsin \left( \frac{n_a}{n_l} \right) . \end{aligned}$$
(33)

Now the angle of incidence is determined by the angle \(\theta\) at which we look at the pattern and the slope of the liquid surface in the y-direction \(\partial h / \partial y\), namely \(\phi _i = \theta -\arctan (\partial h /\partial y)\) which limits the slope to

$$\begin{aligned} \left| \frac{\partial h}{\partial y} \right| \lessapprox \tan \left( \theta -\arcsin \left( \frac{n_a}{n_l} \right) \right) , \end{aligned}$$
(34)

or,

$$\begin{aligned} {A}_k \lessapprox \frac{\lambda }{2 \pi } \tan \left( \theta -\arcsin \left( \frac{n_a}{n_l} \right) \right) . \end{aligned}$$
(35)

As long as the typical length scale on which the pattern changes (\(\lambda\)) is sufficiently larger than the amplitude (\({A}_k\)) we seek to measure, satisfying the above condition will not be a serious problem, provided \(\theta\) is not chosen too close to \(\arcsin (n_a/n_l)\).

6.2.2 Ray crossing

Two incident, parallel rays will cross before reaching the camera if the local radius of curvature \(\mathcal {R}\) of the liquid surface is smaller than the distance of the camera \(H / \cos \theta\). Since for small deformations the radius of curvature can be approximated as \(1/\mathcal {R} \approx \partial ^2 h / \partial y ^2\), we obtain, using modal decomposition (25)

$$\begin{aligned} {A}_k \lessapprox \frac{\lambda ^2}{4 \pi ^2 H} \cos \theta . \end{aligned}$$
(36)

For the example of Fig. 4 (\(H=30\) cm, \(\lambda \approx 2\) cm, \(\theta \approx 55^\circ\)), this will lead to \({A}_k \lessapprox 19.5\) \(\mu\)m. This is quite a stringent requirement, which can be improved by moving the camera closer to the liquid surface, or decreasing H. As discussed above, doing so will, however, lead to a loss of sensitivity.

From another perspective, the necessary condition to prevent ray crossing, \(1/\mathcal {R} \ll \cos \theta /H\), sets an upper limit to the second-order spatial derivatives of h, which implies that h should vary little on the length scale set by h itself. This implies that a shift of the result in the order of the measured amplitude, as discussed at the end of Sect. 4, will negligibly impact the reconstructed free surface deflection h.

6.3 Error estimation

The method is prone to some systematic and random errors that in the end will propagate into the measurement result, the deformation of the interface h(xyt). Some of those are quite generic for systems making use of high-speed optical image acquisition and find their origin in the specifications of the camera (spatial and temporal resolution, motion blur, pixel sensitivity) and have to be addressed by using a camera that is suitable for the particular problem at hand (Versluis 2013). Others are related to the quite elaborate image data processing to first detect the displacement field \(\mathbf {u}(x,y,t)\) in the image plane (using PIV or FD) and to secondly compute h(xyt) with the spatial integration method and are difficult to assess or control. Here it is crucial to employ a scheme that integrate the displacement field in a global least-squares sense (as discussed in Sect. 5.2), as otherwise especially systematic errors may be cumulatively integrated and lead to substantial errors in h.

Relevant from the perspective of the current set-up is how errors in the main parameters H and \(\theta\) propagate in the final interface profile h. Based upon the sensitivity results of Sect. 6.1, one may expect that the influence of errors in H are more significant than those in \(\theta\). More quantitatively, we may use the modal decomposition (25) in Eq. (13) to determine how a variation \(\Delta H\) in H propagates into a variation \(\Delta {A}_k\) of the amplitude \({A}_k\) of mode k, leading to

$$\begin{aligned} \frac{\Delta {A}_k}{{A}_k} \approx - \frac{\Delta H}{H} \frac{1}{1 + T \tan (k y) (\lambda /(2 \pi H))} \approx - \frac{\Delta H}{H}, \end{aligned}$$
(37)

where we have used that the wavelength of the observable structures are usually much smaller than H (i.e. \(\lambda /(2 \pi H) \ll 1\), such that the second term in the denominator is small everywhere except close to where the slope of the interface is zero. Similarly, we can write for the propagation of a variation \(\Delta \theta\) in \(\theta\) that

$$\begin{aligned} \frac{\Delta {A}_k}{{A}_k}&\approx - \frac{\cos (2\theta )\,\Delta \theta }{((2 \pi H / \lambda ) \cot (k y) + T)} \nonumber \\&\approx - \frac{\lambda }{2 \pi H} \frac{\theta \,\cos (2\theta )}{\cot (k y)} \frac{\Delta \theta }{\theta }, \end{aligned}$$
(38)

where the dominant term (for \(\cot (k y)\) not too small) has been kept in the second approximation. The first term is much smaller than one, whereas the second is typically of order unity, such that the relative error in \(\theta\) is multiplied by a small number. This is good to realise when setting up the experiment: it is more crucial to assure that the pattern is positioned such that H can be considered constant over the region of interest, and some compromise in the constancy of the value of \(\theta\) can be made in order to reach that goal.

7 Example and validation: water surface deflection due to air cushioning under an approaching plate

Fig. 5
figure 5

a Schematic of an experiment where a flat disc of diameter D is impacted on a stationary water bath at controlled velocity V. The flow of air due to being squeezed out creates a stagnation point flow under the disc centre, locally pushing the water surface down. b Measured water surface profiles (azimuthally averaged about the disc centre) from the experiment shown in panel a in an experiment at \(V = 1\) m/s are shown at different time instants \(\tau\) before impact. c The amount of water surface deflection at \(r=0\) from panel b, non-dimensionalised using inertial scales D and V, and compared with the boundary integral simulation from Peters et al. (2013) and Jain et al. (2021a)

Validation of the experimental method is difficult due to the sensitivity of the method. When one tries to use known or macroscopically observable menisci around immersed objects, the problem is that the interface disturbance close to the object is not observable due to the large local deflection and curvature. This implies that one may only observe the far-field exponential decay which is hard to relate to a physical length scale. This leaves the observation of water waves (as has been done qualitatively in earlier Sections) or the deformation of the interface due to the impact of an object. We will now turn to the latter and, for the purpose of validation reproduce some results from Jain et al. (2021a) in Fig. 5. The experimental set-up is described in Fig. 6a: a flat disc is slammed onto a stationary water bath with a controlled velocity. The approaching disc pushes out the ambient air from the gap in between itself and the water surface. The stagnation pressure set-up under the disc centre deflects the water surface away. The (azimuthally averaged) measured profiles are shown in panel (b) at various times before impact (\(\tau\)). The measurements at \(r=0\) are compared with two-fluid boundary integral simulations described in Peters et al. (2013), Bergmann et al. (2009), Gekle and Gordillo (2011), Gekle and Gordillo (2010) and Peters et al. (2013). The favourable comparison indicates that the measurement technique is successful at resolving deflections of the order of micrometres up to several tenths of millimetres. For additional information, we refer to Jain et al. (2021a).

8 Conclusions

We described a TIR-based method to measure small-scale deformations of a water surface, consisting of two steps: first, the movement of the water surface is measured by recording the deformation of a reference pattern that is reflected in the water surface. The displacement of the reference pattern is then quantified using an image correlation method such as PIV or FD.

Secondly, these displacements are interpreted as projections in the two-dimensional image plane and related to the instantaneously deforming water surface and its spatial gradients. By decoupling the light paths when the reflecting surface either undergoes an angular deflection, or a vertical translation, we build a system of equations that relate the pattern deformation to the local surface deflection. This second step thus involves recasting the measured displacement fields to a suitable integrable form and calculating the final height field.

Since the image manipulation and subsequent solution may become quite complex, it is wise to test the set-up using an axisymmetric deformation of the free surface, before turning to the measurement and analysis of less symmetric situations. Some images, the displacement fields obtained from them and an example code for reconstruction are provided in supplementary material.

A relative drawback of TIR deflectometry arises from the high sensitivity it offers: it requires the water surface to be very well isolated from external sources of noise. This high degree of isolation from mechanical disturbances limits the method’s application to well-controlled environments. Another consequence of the sensitivity is that using menisci of a stationary object for calibration purposes is difficult, since deflections easily become too large to be measurable.

An application of this method was discussed by measuring the water surface deflections due to air cushioning under a plate that is about to slam on it. Good comparison of the measurements with boundary integral simulations validate the technique for measurements up to tens of micrometres. Some more examples of the use of this method are described in Ref. Jain (2020) [chapter 6] by measuring micron-scale waves on a water surface and showing successful comparisons with a theoretical model, thus showing its effectiveness in resolving precise micron-scale deformations.

The method’s greatest merit lies in it using total internal reflection at the water surface. This implies that whatever moves above the water surface remains invisible to the camera. Additionally, sub-micron resolution of the interface deflections is readily achieved.