Stand With Ukraine

Thursday, June 18, 2026

Zero-flow ocean boundary condition at the land-ocean interface

Recently, I was reading NEMO (Nucleus for European Modelling of the Ocean) manual, trying to fill in some blanks, as part of my professional development time. In the early pages, as it often happens to me, I got curious about the ocean-land boundary condition imposed on the ocean near its bottom, where water is limited by the land. In the manual it was given without derivation as:

$$ w = -(\vec{U}_h, \nabla_h H(x, y)) $$

where $\vec{U}_h$ - is the horizontal component of the ocean velocity, and $w$ - is the vertical component of the ocean velocity, $H(x, y)$ - is the ocean depth (aka bathymetry) at a point with coordinates $(x, y)$.

Below is the derivation, I've managed to come up with for this formula.

For each point on the surface $z=-H(x, y)$ we have a radius vector pointing from the origin of the coordinate system to any given point on $H(x, y)$ let's denote the radius vector as $\vec{r} = \vec{r}\left(x, y, z\right)$.

Let's also note that the total (3D) velocity of the ocean is $\vec{v} = \vec{U}_h + w \vec{k}$.

Where $\vec{k}$ is the unit vector (i.e $\left(\vec{k}, \vec{k}\right) = \left|\vec{k}\right|^2 = 1$) parallel to the vertical $z$-axis. Note that here our vertical axis is pointing upward, to be consistent with the NEMO documentation.

Now the zero-flow condition through the ocean-land interface means that the projection of the total ocean velocity on the normal to the interface surface is 0:

$$ (\vec{v}, \vec{n}) = 0 $$

To find the expression for $\vec{n}$ we can use a vector product of $\partial_x \vec{r}$ and $\partial_y \vec{r}$, as these are tangent to $H(x,y)$ along the $x$ and $y$ axis respectively. Therefore,

$$ \vec{n}=[\partial_x \vec{r}, \partial_y \vec{r}] $$

we can expand the vector product as follows, using a determinant of the matrix below:

\begin{split} & \vec{n} & \; = \;&\begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ 1 & 0 & -\partial_x H(x, y) \\ 0 & 1 & -\partial_y H(x, y) \end{vmatrix} = \vec{i}\, \partial_x H(x, y) + \vec{j}\,\partial_y H(x, y) + \vec{k} =\\ \\ & & \; = \; & \nabla H (x, y) + \vec{k}\\ \end{split}

Now when we plug the expressions above for $\vec{v}$ and $\vec{n}$ into the scalar product $(\vec{v}, \vec{n})$ we get:

\begin{align*} (\vec{v}, \vec{n}) & = \left(\vec{U}_h + w \vec{k}, \nabla H (x, y) + \vec{k} \right) \\ & = \left(\vec{U}_h, \nabla H (x, y)\right) + \left(\vec{U}_h, \vec{k}\right) + \left(w \vec{k}, \nabla H (x, y)\right) + w \\ & = \left(\vec{U}_h, \nabla H (x, y)\right) + w = 0 \\ \end{align*}

Above we used $\left(\vec{U}_h, \vec{k}\right)=0$ and $\left(w \vec{k}, \nabla H (x, y)\right) = 0$, since the scalar products of perpendicular vectors is 0.

Therefore, finally we can write the desired boundary condition as follows:

$$ \boxed{ w = -\left(\vec{U}_h, \nabla H (x, y)\right) }. $$

Saturday, September 6, 2025

Physics problem: viscous flow in a cylindrical pipe

This problem is related to the previous one, where we discussed a setup with a fluid flow between two horizontal plates. The solution method is very similar, with a difference that here we select a cylindrical element and consider forces acting on it.

Problem statement

A liquid is pumped from one container to another through a long pipe of radius $R$ and length $l$. Determine the flow velocity in the pipe as a function of distance to its axis (i.e. to the center of the pipe). Given that the pressure drop between the two ends of the pipe is $\Delta P$ and the dynamic viscosity of the liquid is $\eta$.

Problem statement is taken from Savchenko et al (1981) book and translated by the post author.

Exploiting the symmetry around the axis of the pipe we select a coaxial cylinder of radius $r$ in the flow and investigate forces acting on it.

No description has been provided for this image
Figure 1: Flow in pipe of length $l$ and radius $R$.


If we denote the viscosity stress along the cylinder's sides and parallel to its axis as $\tau_x(r)$, then we can write the balance of the viscous and pressure gradient forces acting on it, along the $x$-axis, as:

\begin{align*} & \tau_x(r) \cdot 2\pi r l + \Delta P \cdot \pi r^2 = 0 & \Rightarrow \\ & \tau_x(r) = -\frac{\Delta P r}{2 l} & \end{align*}

Now we can use the expression linking viscous stress and flow velocity gradient through the dynamic viscosity to determine the flow velocity as follows:

\begin{align*} & \tau_x(r) = -\frac{\Delta P r}{2 l} = \eta \frac{dv}{dr} & \Rightarrow \\ & \frac{dv}{dr} = -\frac{\Delta P r}{2 l \eta} & \Rightarrow \\ & \int\limits_{R}^{r} \frac{dv}{dr}\,dr = -\int\limits_{R}^{r}\frac{\Delta P r}{2 l \eta}\,dr & \Rightarrow \\ & v(r) - v(R) = -\frac{\Delta P \left( r^{2} - R^{2} \right) }{4 l \eta} \\ \end{align*}

Now using the non-slip condition at the pipe walls (i.e. $v(R) = 0$), we get the final expression for the flow velocity at a distance $r$ from the pipe axis: \begin{align*} \boxed{ v(r) = -\frac{\Delta P \left( r^{2} - R^{2} \right) }{4 l \eta} }. \end{align*}