#!/usr/bin/env python
# coding: utf-8
# # Introduction
#
# There are several concepts that need to be introduced before we embark on a course in fluid mechanics. For example, what exactly is a fluid?
#
# Herein we will provide definitions of:
#
# - Solids, liquids and gases
# - Types of forces relevant to fluid mechanics
# - Methods of describing fluid behaviour
# - Fluid Properties
# - Flow Properties
#
# Concepts such as pressure will be covered in detail in a separate notebook.
#
# ## Learning Outcomes
#
#
# ## Solid Liquid and Gases
#
# Of the three states of matter — solid, liquid and gas — the latter two are classified as fluids. What defines a solid? How are fluids different?
#
# Unlike solids, fluids flow!
#
#
# ### Solids
#
# A solid is comprised of densely packed molecules, often in precise crystal structures such as found in metals or when water is frozen into ice. In Solid Mechancis you will have learned about stress, strain and elastic and plastic deformation. The video below illustrates how the densely packed atoms of a solid respond elastically to longidutional, torsion amd shear loads.
#
#
#
# Solids can also undergo plastic as well as elastic defromation. Here is a simulation of a three point bend. As you can see the beam only partially returns to its original shape due to plastic deformation.
#
#
# Brittle solids can fracture as cracks form and propagate resulting in component failures.
#
#
# ## Fluids
#
# Fluids on the other hand can be easily deformed from one shape into another. The intermolecular forces do not hold the molecules in a rigid structure but cohesion due to these forces means that molecules of the same species are attracted to each other and can slide over each other. A liquid fills the container it is poured into and a gas quickly spreads out in all directions to fill a container it is released into.
#
#
# ### Liquids
#
# The liquid state is a form of matter where molecules are attracted to each other and are packed densely (although less so than in a solid) and the molecules remain disordered and can be readily deformed. We are familiar with liquids such as water from $0$ to $100^\circ C$, but there are many different liquids such as liquid mercury at room temperature, oils that float on water and 'thick' liquids like honey and paint. The video below shows a simulation of pouring tea. The liquid exits the spout of the white teapot in a single curved stream and fills the volume of the glass teapot. The surface of the liquid in the glass teapot sloshes as the stream impacts it.
#
#
# As we've seen, liquids fill their container and easily flow through conduits such as teapot spouts and pipes. Here we see a liquid flow through a complex pipe geometry and into a secondary container. Notice how the leading front of the liquid is thrown outwards in the pipe due to centrifugal forces. As it fills the lower container it slowly spreads out to cover the bottom.
#
# This ability of fluids to pass through pipes and tubes of various shapes makes them very important in engineering. We can route liquids through machines and buildings to transfer heat, pressure and the fluid itself.
#
#
# ### Gases
#
# When a fluid changes phase from a liquid to a gas due to the application of heat (or a reduction in pressure) the thermal agitation of the molecules allows them to overcome the cohesion that keeps a liquid densely packed. The ensemble of these microscopic thermal fluctuations are what you know as temperature. The molecules in a substance are constantly jostling about. In a solid this movement is very small and the intermolecular forces keeps the material tightly packed. The addition of energy allows the material to change state to liquid as the balance of competition between the forces changes until finally with enough energy the molecules can breakaway as a gas.
#
# The gas molecules will spread out in all directions and so the density of the fluid will be reduced limited only by the volume of the container. The video below shows a group of particles representing molecules where the cohesion forces are reduced so that the particles are able to spread out. The motion you observe is called **Brownian motion**. It is a random motion of the molecules as they collide with each other and is due to the thermal agitation discussed above.
#
#
# As with liquids, gases are extremely important in engineering. The air around us is a gas and we build aircraft that can easily fly through it and use that air to generate a lift force keeping them aloft. We compress useful gases such as propane into containers so we can transport large quantities in a small volume which can be released as chemical energy when combusted.
# ## The zero-slip condition
#
# A fundamental assumption of fluid mechanics relates to the way in which a fluid interacts with a surface. While two rigid solids moving relative to each other can be considered to slip past each other with a certain degree of friction a *Newtonian* fluid obeys what is called the *zero-slip condition*. Here we assume that the infinitesimal layer of fluid in contact with a surface is perfectly adhered to that surface. It does not slip over that surface nor does it move through the surface, the velocity at the wall is zero. As one moves away from the wall the velocity can change. How it changes depends on a fluid property called viscosity. Understanding the ideas presented below is important for understanding concepts such as aerodynamic drag. In the case of the above video notice how particles bounce off the walls of the cube, never penetrate it and never travel along the surface parallel to it.
# # Forces acting on fluids
#
# Fluids, like all forms of matter exert and experience forces and are subject to Newton's laws. An oar is forced through water to propel a boat; pressurised gas stretches the material of a balloon; a swimmer experiences buoyancy in a body of water. Unlike solids fluids can respond differently to the rate at which a force is applied. Consider again the video of the three point bend above. How would this change if the bending force was applied over a period of one minute or one year? Rapid deformation of the beam may heat the beam and repeated deformations can result in fatigue failure but from a fundamental perspective the rate of the deformation is unimportant.
#
# The video below shows a fluid container being rocked back and forth much like you might do with a bottle of water. The fluid and the degree of rocking is identical for each container all that is changing is the rate of rocking which is increased by 25\% for each case. Notice how the fluid response changes.
#
# For the slowest cases the surface of the orange fluid remains mostly flat as the fluid volume is distributed due to gravitational forces. As the rocking motion increases the forces from the sidewalls pushing the fluid results in the generation of surface waves until the fluid surface becomes highly disturbed.
#
# It is clear that the rate which we deform a fluid can have dramatic effects!
#
#
# Now we will consider how a fluid exerts a force on a surface with a bit more rigour.
# Consider a force, $F$, acting on a surface as shown in the 3D model below. We can easily decompose that force into its tangential and normal components relative to that surface.
# In[20]:
from IPython.display import IFrame
IFrame('https://nolankucd.github.io/MEEN20010/media/1.1/forces.html', '100%', '600px')
# ### Normal Forces
#
# Normal forces simply act perpendicular to a surface. Therefore the normal force on a surface of area $A$ is $F_\text{normal} = pA$ which we can arrange in terms of the normal stress, $p$:
#
# \begin{equation*}
# p = F_\text{normal}/A
# \end{equation*}
#
# This is the pressure acting on the surface. Pressure is an extremely important concept so it will be discussed in a separate notebook.
#
# ### Shear Forces
#
# Shear is perhaps the next most important type of force in fluid mechanics so it is worth spending some time understanding it.
# Shear stress is a stress between laterally moving surfaces. Shear in fluids often occurs when a fluid is contained between two moving surfaces, such as the inside of a bearing or in the thin layer of melted ice between an ice skate blade and the surface of the ice. The video below illustrates linear and rotational shear between two parallel plates. Note that due to the zero-slip condition the fluid at each surface is perfectly attached and moves with that surface.
#
#
# The video above illustrates the result of a **finite** shear on an elastic solid, i.e. it is sheared by some small amount and when that force is released the solid then returns to the initial condition. If we were to continue shearing what would happen? The solid would eventually experience plastic deformations and then some form of failure such as tearing or fracture.
#
# If we look at the example on the left of the above video is is clear that there is a linear change in the shear strain $\gamma$ across the body undergoing shear; the shear stress $\tau \propto \gamma$. In solid mechanics we call the constant of proportionality the shear modulus, $G$ where $\tau = G \gamma$. The shear stress has units $N/m^2$ and the shear strain is dimensionless as it is simply the ratio of two angles (before and after being sheared). The shear modulus therefore has units $N/m^2$ or Pascals.
#
#
#
When $F_{shear}$ is applied to area $A$ the shear strain $\gamma$ is observed
#
# The solid will undergo a **finite** (elastic, and if the load is high enough plastic) deformation due to the applied shear stress. This is why we build structures out of strong materials such as steel and concrete.
#
# A liquid on the other hand can undergo **continuous deformation** due to shear. If we confine some fluid (such as oil) between two flat plates we can move the plates laterally easily shearing the oil sandwiched between. Such an arrangement is shown in the video below. I've checkered the plates and the fluid so it is easy to visualise the motion of the fluid. Notice how the fluid moves in layers. These layers are called **lamina** and this type of flow where we can consider the flow as shearing lamina is referred to as **laminar flow**. Observe that the laminar in contact with each wall is perfectly attached due to the zero-slip condition and therefore travels at the velocity of the respective wall. The velocity from top to bottom varies linearly. The deformation of particles of fluid is clearly apparent. A pair of fluid particles which were adjacent to each other vertically (each in its own lamina) are separated by some distance with time. Fluid particles which were adjacent to each other horizontally (sharing a lamina) remain adjacent with time.
#
#
#
#
# This type of laminar flow of a thin layer of fluid between shearing surfaces is known as **Couette flow** in honour of French physicist Maurice Couette who made important contributions to the study of friction in liquids. In Couette flow the **velocity gradient** ($\frac{du}{dy}$) from the bottom to the top plate is linear.
#
#
# A schematic of Couette flow between shearing parallel plates
#
# Lets take another look at this flow. Here the upper surface is fixed in place and the bottom surface is translated from left to right continuously. The fluid in the narrow gap between the solid surfaces is now coloured by its velocity (red for fast and blue for slow). If the gap is sufficiently small we can consider this as the shearing of the fluid between two concentric cylinders as is the case in several kinds of bearings used to reduce friction in rotating parts in many engineering applications.
#
#
# You might not believe that the velocity profile is simply a straight line.
# This behaviour is further evidenced by the Computational Fluid Dynamics (CFD) simulation shown below.
#
#
# A Computational Fluid Dynamics (CFD) simulation of Couette flow
#
# This simple simulation was performed using **OpenFOAM** — a powerful open source tool for CFD which is used extensively here in SMME. Here the **Navier-Stokes** equations which describe fluid motion are solved for the case of a thin fluid between two parallel plates and a linear velocity profile is observed. The zero-slip condition is simply imposed on each surface and the CFD solver computes the flow physics.
#
# Unlike a solid, to shear a fluid we need to apply a **continuous deformation** otherwise the fluid will stop moving once we stop moving the shearing surface and the fluid will return to rest. Therefore the shear stress is proportional to the **shear rate** $\dot{\gamma} = \frac{d\gamma}{dt}$.
#
# \begin{equation}
# \tau \propto \frac{d \gamma}{dt}
# \end{equation}
#
# In this case the constant of proportionality is the viscosity of the fluid which is typically given the symbol $\mu$ (or sometimes $\eta$ in other fields such as physics and chemistry).
#
# \begin{equation}
# \tau = \mu \dot{\gamma}
# \end{equation}
#
# In the case of shear flows such as Couette flow where the velocity gradient at the wall where the shear occurs is linear therefore:
#
# \begin{equation}
# \tau = \mu \frac{du}{dy}
# \end{equation}
#
# This is known as **Newton's Law of Viscosity**.
#
#
# ### Pressure driven flow
#
# Couette flow results from two shearing surfaces. Next we will consider laminar flow in a pipe driven by a pressure difference between the inlet and exit of the pipe. We will cover this in more detail later in the module but for now it is worthwhile thinking about how such a flow would look.
#
# For flow in a pipe the zero-slip condition must be satisfied on the internal wetted walls. Pressure is applied uniformly to the inlet cross section of the pipe however the fluid in the centre line is not bounded by any zero-slip wall and it can slip somewhat over adjacent fluid layers. Eventually we reach the wall where the infinitesimal fluid layer is not moving. This type of flow is called **Poiseuille flow** in honour of the $19^{th}$ century French physicist Jean Léonard Marie Poiseuille who described it mathematically. The internal fluid layers slip and shear over each other subject to their viscosity. We will consider the mathematical description of viscous Poiseuille flow later in the module.
#
# The video below shows a visualisation of segments of concentric lamina of fluid flow in a cutaway of a pipe section as described above. At the inlet the lamina are all located at the same streamwise location. Due to the applied inlet pressure the centre lamina are forced further along while the zero-slip condition fixes the lamina closes to the wall in place. The surface area between successive layers decreases as we move towards the centre line but at the same time the cross sectional area where the pressure is applied decreases reducing the force experienced by each lamina. The result is the parabolic shape of the flow velocity profile.
#
#
# # Fluid and Flow Properties
#
# We can make a distinction between properties of a fluid material and properties that result from the movement of the fluid. Fluid properties include mass and weight as well as colour. Many fluids are optically transparent for example.
#
# The following table lists many of the most common flow properties.
#
# | Property | symbol | SI units |
# |:-----------------|----------:|---------:|
# | Density | $\rho$ | $kg/m^3$ |
# | Pressure | $p$ | $N/m^2$ |
# | Temperature | $T$ | $K$ |
# | Refractive index | $n$ | - |
# | Velocity | $\vec{V}$ | $m/s$ |
# | Momentum | $P$ | $kg~m/s$ |
# | Energy | $E$ | $J$ |
#
#
# We will discuss density, temperature and pressure in a separate notebook.
# Similarly we will examine the role of momentum and energy in some detail in this course.
#
# Refractive index is particularly interesting because it affects how light passes through a fluid. As a result it can be used to visualise flow behaviour using a method known as **Schlieren Imaging**. Here is a video showing a bubble of air rising in a heated tank of water. The bubble disturbs the warm layer of fluid near the surface and the local change in refractive index is observed as region of light and dark.
#
#
# Here's how it works.
#
#
# ## Viscosity
#
# Viscosity is a measure of the resistance of a fluid to deformation. Throughout significant parts of this module we will consider *invisid* flows where we assume the fluid has zero viscosity. However as we will see viscosity is important when quantifying losses in real systems such as pipe flow as we must overcome the resistance due to viscosity to maintain fluid flow.
#
# The video below shows a comparison of four different fluids, subject to gravity, released from the same initial state with 10x increases in viscosity from left to right. (We will use arbitrary units for now.) In this simulation the fluid is being collected in an invisible box.
#
# For the low viscosity orange fluid on the left the fluid is rapidly deformed from its initial state as it conforms to the container. The fluid however sloshes about within the container several times before reaching its final resting shape.
#
# The blue fluid rapidly deforms to it's final shape while the green fluid does so too but on a slower time scale. Finally the pink fluid has barely moved as its viscosity is high enough to greater resist the pull of gravity.
#
#
# It is clear from this example that time scale plays a role in the characterisation of viscosity. In this case gravity is the force that viscosity resists so we would expect force or pressure (force per unit area) to also relevant.
#
# Let's look at another example. In this second simulation the same fluids are being poured into their invisible boxes.
# For the low viscosity fluid on the left the flow is rapidly deformed as it contacts the ground plane. On the other hand the most viscous fluid resist changes in their shape. The green and pink fluids exhibit a phenomenon known as *rope coiling* where by the stream of fluid is disturbed to one side by the initial buckling motion which results in a helical motion as the fluid is collected. Notice that at the base of these two high-viscosity fluid streams that the fluid slowly coalesces and begins to fill the invisible container losing all *memory* of the prior coiled state.
#
# ### Units of viscosity
#
# We've seen how timescale plays a role in viscous behaviour. The more viscous a fluid is the longer it resists deformation. We've also see how viscosity related the shear stress (a force per unit area) to the shear rate, i.e. it tells us the effort we need to apply to achieve a certain deformation.
#
# It should not be surprising then that the SI unit of viscosity is the Pascal second $Pa.s$ — or Newton seconds per metre squared ($Ns/m^2$). We can also write this as ${kg}/m/s$ (using the MKS convention). This is often written in terms of a units called the Poise ($10P = 1kg/m/s$) in honour of Poiseuille. The centipoise ($1P = 100cP$) is a convenient unit because the viscosity of water at room temperature is almost exactly $1 cP$.
#
# - $1~Pa.s = 1000~cP$
# - $1~P = 100~cP$
# - $1~Pa.s = 10~P$
# - $10~P = 1~Kg/m/s$
#
#
# ### Kinematic Viscosity
#
# Viscosity is also frequently described in terms of a *kinematic viscosity*. Kinematics is concerned with the description of motion without regard for forces responsible for such motion. The kinematic viscosity is defined as:
#
# \begin{equation*}
# \nu = \frac{\mu}{\rho}
# \end{equation*}
#
# where $\rho$ is the fluid density and $\mu$ is the viscosity we've been discussing thus far and is often referred to as the dynamic viscosity. By dividing by the density we can compare fluids based on molecular friction and cancel out forces, such as gravity, that depend on the the mass of the fluid. Density is just specific mass after all. The SI unit of kinematic viscosity is the Stokes (after Anglo Irish physicist George Stokes). $1~St = 10^{-4}m^2/s = 1 cm^2/s$.
#
# ### An example
# Korson et al (1969) performed a series of precise measurements of the viscosity of water at various temperatures. The data in Table II is reproduced below.
#
# In[22]:
# Python code example to curvefit viscosity data so show temperature dependence
import numpy as np
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
temperature = np.arange(0,105,5)
mu = [
1.7916,
1.5192,
1.3069,
1.1382,
1.0020,
0.8903,
0.7975,
0.7195,
0.6532,
0.5963,
0.5471,
0.5042,
0.4666,
0.4334,
0.4039,
0.3775,
0.3538,
0.3323,
0.3128,
0.2949,
0.2783
]
plt.subplots(figsize=(12,8))
plt.plot(temperature, mu,'ko', label = 'Korson et al. (1969)')
plt.xlabel('Temperature ($^\circ C$)')
plt.ylabel('Viscosity (cP)')
for n in range(5,6):
mu_coeff = np.polyfit(temperature, mu, n)
mu_fit = np.poly1d(mu_coeff)
plt.plot(temperature, mu_fit(temperature), label = f"polynomial degree: {n}")
plt.legend()
# It is clear that the quartic model (4th degree polynomial) fits the data better than the linear, quadratic and cubic polynomials. We can now use the coefficients from the `curve_fit` command to define a new function that allows us to interpolate between the measured data as a good estimate of the viscosity at any given temperature between $0$ and $100 ^\circ C$.
# In[23]:
# These are the coefficients that the numpy polyfit function converged on
# We will hard code them into a new function so we can use it to estimate
# the viscosity of water whenever we need it.
print('Cubic fit coefficients:')
for coeff in range(len(mu_coeff)):
print(f"coeff{coeff} = {mu_coeff[coeff]}")
# In[24]:
# copying the coefficients to into our new function:
def water_viscosity(x):
a = -3.978950129602846e-10
b = 1.3183272320625656e-07
c = -1.7778549210694025e-05
d = 0.001299285929409129
e = -0.059309985924498744
f = 1.7888845762932717
mu = a * x**5 + b * x**4 + c * x**3 + d * x**2 + e * x + f
return mu
# We can then estimate the viscosity of water for any temperature between 0 and 100 C
temp = 37
mu_water = water_viscosity(temp)
print(f"This viscosity of water at {temp}\u00b0C is {mu_water:.3f} cP")
# ## Non-Newtonian Fluids
#
#
# Not all fluids behave according to *Newton's Law of Viscosity*, i.e. have a constant viscosity (for a given temperature). These fluids are called non-Newtonian fluids and they exhibit many interesting behaviours. Many of them are actually complex mixtures and express the combined properties of their constituents.
#
# ### Shear thinning/thickening
#
# A Newtonian fluid under shear, as in the case of Couette flow exhibits constant viscosity; the shear stress increases linearly with the shear rate. If I want to rotate a bearing twice as fast I need to provide twice the power.
#
# Shear thinning fluids on the other hand have reduced viscosity with increased shear rate and shear thickening fluids have an increasing viscosity with increasing shear rate. Paint is a good example of a shear thinning fluid. It is thick and unlikely to drip when resting on a brush but flows easily when sheared against a surface. Your blood is also a shear thinning fluid.
#
# Cornstarch solutions are a good example of a shear thickening fluid. They are easily deformable when gently deformed but become almost like a solid when quickly deformed. There are numerous viral videos online of people running across the surface of cornstarch filled pools and subsequently sinking when they slow down.
#
# ### Viscoelasticity and memory
#
# The addition of small amounts of polymer to fluid solutions results in fluids that gain the elasticity of the polymer additives. These fluids exhibit memory like effects and can recoil from their deformed state and partially recover from strain.
# # Surface Tension
#
# Surface tension $\sigma$ is a phenomenon observed at the interface between a liquid and a gas or between two immiscible fluids [1]. The surface of the fluid appears as if taut like a stretched membrane or a balloon and the effect will attempt to pull a volume of fluid into a sphere.
#
# When describing the differences between solids, liquids and gases we discussed the idea of cohesion, how like molecules are attracted to each other. Water for example has one central negatively charge oxygen atom and two smaller positively charged hydrogen atoms with an angle of $104.45^\circ C$ between them. This means water is a **polar molecule** due to the changes in charge on different sides of the molecule. This makes water very sticky and particularly so when sticking to itself.
#
# Inside a volume of liquid the cohesion forces between molecules are at an equilibrium. Each molecule is surrounded on all sides by identical molecules and they have orientated themselves so that the positive and negative charges are aligned happily [2]. The molecules on the boundary only have contact with other identical molecules on one side and the molecules just inside continue to pull on these boundary molecules. The result is that there is a net tension force felt on the surface due to the non-equilibrium of the interface. This **surface tension** is manifest as the volume of fluid *wanting* to minimise its surface area as it attempts to reach equilibrium.
#
# The effects of surface tension are readily apparent in nature. Rain water will bead up on surfaces with low adhesion such as the leaves of certain plants. Soap bubbles and bubbles in air suspended in a liquid will from spherical shapes. The stream of water flowing slowly from a tap will begin to drip as surface tension breaks the stream up into droplets as seen in the video below.
#
# We can understand surface tension by considering the concept of **surface energy**. It takes energy to create a new surface in a material. If I fracture a crystalline solid such as silicon to make a new surface I have to expend energy to overcome the molecular cohesion and because we are expending energy creating a new surface the units of surface energy are $J/m^2$ (more typically $mJ/m^2$ owing to the magnitudes observed for many materials).
#
# With a liquid we can increase surface area by deforming it. I can shake a bottle of water aggressively as shown in the sloshing video above and the surface area of the fluid will increase. Individual droplets that break away from the surface will attempt to form spherical droplets and once I stop shaking the bottle the water will once again coalesce and minimise its surface area.
# Surface tension is measured in units of N/m. Since a Joule is one Newton metre we see that the units of surface energy and surface tension are equivalent.
#
# In the video below we observe the breakup of a stream of fluid due to surface tension. The orange fluid on the left has zero surface tension and we observe a splash with very large surface area occurring. Surface tension is increased from left to right and we observe that with larger values of $\sigma$ larger and larger droplets are supported by the surface tension.
#
# This effect is only apparent when a liquid is moving slowly. You can verify this yourself by experimenting with the kitchen tap. As the flow rate is increased the effect is overcome by the inertial forces of the fast moving flow. Much of fluid mechanics is about understanding the interaction of competing forces at various scales.
#
#
# ## Laplace pressure
#
# Consider a droplet of fluid floating in zero gravity in air, perhaps released by an astronaut as part of an experiment on board the International Space Station. Surface tension will result in the droplet taking a spherical shape but also causing an additional compressive force on the liquid within the droplet. We can consider this force due to surface tension over the surface area of the droplet as a pressure. This additional pressure due to surface tension is called the Laplace pressure in honour of the prolific French mathematician Pierre-Simon Laplace.
#
# We can calculate the magnitude of the Laplace pressure within the droplet by considering a 2D section of our spherical droplet. Since pressure is force per unit area the pressure across the cross section of the droplet is given by $\Delta P \pi r^2$ where $\Delta P$ is the difference between the internal and external pressures.
# The resulting force must be balanced by the surface tension around the circumference of the droplet:
#
# \begin{equation*}
# 2 \pi r \sigma = \Delta P \pi r^2
# \end{equation*}
#
# rearranging for the pressure we obtain:
#
# \begin{equation*}
# \Delta P = \frac{2\sigma}{r}
# \end{equation*}
#
# Here is becomes apparent that the Laplace pressure is inversely proportional to the radius of the droplet. This means that the smaller the droplet the greater the Laplace pressure. For very small droplets the Laplace pressure can be significant, in fact microbubbles forming due a process called cavitation can cause damage to the surfaces of propellers and pumps when the bubbles collapse.
#
# You can perform a simple experiment to verify the behaviour of Laplace pressure with two balloons and a short drinking straw. Inflate both balloons with one twice the size of the other. Carefully connect their openings via the straw and slowly release the pressure through the straw. Intuition would suggest the bigger balloon would deflate and both balloons would balance their sizes, however the opposite is true as the pressure is higher in the smaller balloon and so the pressures are balanced.
#
# The following video shows a number of droplet pairs suspected in a zero-gravity simulation. The equally sized droplets merge symmetrically and eventually from a new sphere. The oscillations you observe are called **capillary waves** as the inertia resulting from the merging of the droplet pair interacts with surface tension. In reality such an interaction happens extremely quickly so there can be a lot of inertia and significant deformation of the liquid volume. It is common to use high-speed cameras to observe such effects.
# Notice how the smaller droplets (which have higher Laplace pressures) are pulled into the larger lower pressure droplets as the pressure difference across each droplet pair is balanced. If you watch carefully you'll observe that the fluid appears to rebound on the opposite side of the larger droplet due to the strength of the coalescence.
#
#
# ## Capillary action
#
# A phenomenon strongly related to surface tension is capillary action or capillarity. This is the phenomenon by which a fluid is pulled upwards in a tubes. Liquids can exhibit adhesion to solid surfaces, water in particular strongly wets glass while mercury does not.
#
# Adhesion results in the liquid wetting the walls of the tube and so a **meniscus** is formed as surface tension curves the surface to reduce surface area. In the case of a preferentially wetting scenario the liquid climbs the wall and the surface becomes concave. As the diameter of the tube is reduced the ratio of tube surface area to the weight of liquid in the tube increases and the liquid is pulled higher.
#
# In the case of a non-wetting scenario (such as mercury in glass) the interface is convex. Since there is little or no adhesion between the tube wall and the liquid, the cohesion forces dominate and the entire surface of the liquid is subject to surface tension. The level of the liquid in the tube is depressed below the liquid level.
#
# Both scenarios are shown below. The red line on the right side indicated the surface contributing to the surface tension of the liquid, whereas the wetted regions on the left do not.
#
#
#
# Capillary action for a liquid with strong adhesion and a liquid with weak adhesion
#
#
# ## Surfactants
#
# Surfactants are chemical additives that reduce the surface tension of a liquid. A common surfactant is soap which when added to water allows us to massively increase its surface area via the formation of many bubbles.
#
# VIDEO WITH PEPPER AND WATER AND SOAP
# # References
#
# 1. Munson, B.R., Young, D.F., Okiishi, T.H. and Huebsch, W.W., 2010. *"Fundamentals of Fluid Mechanics"*. Singapore: Wiley.
# 2. Korson, L., Drost-Hansen, W. and Millero, F.J., 1969. Viscosity of water at various temperatures. The Journal of Physical Chemistry, 73(1), pp.34-39.
# 3. De Gennes, P.G., Brochard-Wyart, F. and Quéré, D., 2013. *'Capillarity and wetting phenomena: drops, bubbles, pearls, waves"*. Springer Science & Business Media.