1 Introduction

Stommel [7] considered a model of thermal convection for the fluid in the long horizontal layer \( \, \Omega \, = \, \{ \, 0 \,< z \,< \, h \, \pi \ , \ 0 \,< \, x \, < \, \pi /l \ \} , \, \) where the Oberbeck-Boussinesq equation is used for the fluid under the gravity. The upper surface \( \, z \, = \, h \, \pi \, \) is maintained at the temperature \( \, \theta _0 \, = \, t \, \cos ( \, l \, x ) , \ x \in (0,\pi /l) . \,\)

In a gravity field, if uniformly heating boundary condition is posed on the top surface, no rolls appear and stability of the stationary thermal conduction solution is proved. Layer of fluid uniformly heated from below has been intensively investigated both experimentally and theoretically, and so-called Bénard convection occurs (see [1, 2, 8] and references therein); more precisely, the system has bifurcation from the stationary thermal conduction solution to convective solutions where a large number of rolls are arranged uniformly.

In the present study, on the other hand, we consider non-uniform heat supply on the top surface to understand and cope with thermal convection. Stommel obtained approximate stationary solutions by asymptotic expansion of the equations with respect to a dimension-less parameter and showed its picture of contour lines of the stream function and isothermal lines. It may be considered as a simplest model of thermal effect to the ocean current.

The Stommel model can be formulated by the stream function \( \, \psi \, \) and temperature \( \, \theta _0 + \theta \, \) in the following system:

$$\begin{aligned} \ {\nu } \, \Delta ^{\, 2} \, \psi \, - \, \frac{\partial \, \psi }{\partial z} \, \frac{\partial \Delta \psi }{\partial x} \, + \, \frac{\partial \, \psi }{\partial x} \, \frac{\partial \Delta \psi }{\partial z} \ = \ g \, \alpha \, \frac{\partial \, \theta }{\partial x} \, + \, g \, \alpha \, \frac{\partial \, \theta _0}{\partial \, x} \ \equiv \ G(x,z) \ , \end{aligned}$$
(1)
$$\begin{aligned} \ \kappa \, \Delta \, \theta \, - \, \frac{\partial \, \psi }{\partial z} \, \frac{\partial \, \theta }{\partial x} \, + \, \frac{\partial \, \psi }{\partial x} \, \frac{\partial \, \theta }{\partial z} \ = \ - \, \kappa \, \Delta \, \theta _0 \, + \, \frac{\partial \, \psi }{\partial z} \, \frac{\partial \, \theta _0}{\partial \, x} \ \equiv \ F(x,z) \ , \end{aligned}$$
(2)

where \( \, \nu \, \) is the dynamic viscosity, \( \, \kappa \, \) is the thermal diffusivity, \( \, g \, \) is the acceleration due to gravity, \( \, \alpha \, \) is the thermal expansion in the Oberbeck approximation, and the velocities are given by

$$ \, u \, = \, \frac{\partial \, \psi }{\partial z} \ , \hspace{1cm} \, w \, = \, - \, \frac{\partial \, \psi }{\partial x} \ .$$

We here consider the case that \(\theta _0(x,z)\) is independent of z and satisfies

$$ \dfrac{\partial \theta _0}{\partial x}\biggm |_{x=0} = \dfrac{\partial \theta _0}{\partial x}\biggm |_{x=\pi /l} = 0. $$

We pose the stress free boundary conditions (3) for the stream function and Dirichlet or Neumann boundary conditions (4) for the temperature:

$$\begin{aligned} \psi \, |_{\partial \, \Omega } \ = \ 0 \ , \quad \Delta \, \psi \, |_{\partial \, \Omega } \ = \ 0 \ , \end{aligned}$$
(3)
$$\begin{aligned} \theta \ = \ 0 \ \ \text{ on } \ \ \{ \ z \, = \, h \, \pi \, , \ 0 \,< \, x \,< \, \pi /l \ \} \nonumber \\ \ \frac{\partial \theta }{\partial x} \ = \ 0 \ \text{ on } \ \{ \, x \, = \, 0 \, , \, \pi /l \ , \ 0 \,< \, z \,< \, h \, \pi \, \} \ , \nonumber \\ \ \frac{\partial \theta }{\partial z} \ = \ 0 \ \text{ on } \ \{ \, z \, = \, 0 \, \, , \ 0 \,< \, x \, < \, \pi /l \ \} \ . \end{aligned}$$
(4)

Note that the boundary conditions of \(\theta _0\) and \(\theta \) are implied from the adiabatic condition of the temperature \(\theta _0+\theta \) on \(x=0\), \(\pi /l\) and \(z=0\).

Remark 1

Stommel [7] considered the fixed boundary condition on the bottom for the velocity. Instead here we use the stress free boundary condition also on the bottom, because of easy treatment for the estimates and the assumptions in the theorem which do not depend on \(l \le 1\). We hope the qualitative behavior of the solution is similar. We will treat the fixed boundary condition in a coming paper.

2 Existence of stationary solution

Proposition 1

Let the right hand side of system (1) and (2) be given functions as \( \ G \, , \ F \, \in \, L^2(\Omega ) \ \). Then the system (1) and (2) with (3) and (4) has generalized solutions \( \ \psi \, , \ \theta \ \) with \( \ \psi \, \in \, H^4(\Omega ) \cap H^1_0(\Omega ) \ , \ \theta \, \in \, H^2(\Omega ) \ ,\) such that they satisfy the following estimates in \( \ L^2 \, \) norm :

$$ \Vert \, \nabla \Delta \psi \, \Vert \ \le \ \frac{ \, \pi \, h \,}{ \, 2 \, \nu \, } \, \Vert \, G \, \Vert \ , \quad \Vert \, \nabla \, \theta \, \Vert \ \le \ \frac{ \, \pi \, h \,}{ \, \kappa \,} \Vert \, F \, \Vert \ . $$

The proof of Proposition 1 can be proceeded by the standard Galerkin method in the suitable function spaces for the existence theorem of stationary solution of Navier-Stokes equations such as Fujita [4] and Vorovich-Yudovich [9].

Theorem 2

Let \( \, c_0 \, \) be the positive number in the inequality (9). If

$$ \frac{ \, \pi ^2 \, g \, \alpha \, c_0 \, h^3 \, }{\, \nu ^2 \, } \, \left\Vert \, \frac{\partial \, \, \theta _0}{\partial \, x} \, \right\Vert \ \le \ 1 \quad \text{ and } \quad \frac{ \, \pi ^2 \, \, g \, \alpha \, c_0 \, h^3 \, }{ \, \kappa \, \nu \, } \, \left\Vert \, \frac{\partial \, \, \theta _0}{\partial \, x} \, \right\Vert \, \ \le \ \frac{1}{8} \ , \quad $$

then the system (1)–(4) has a solution \( \psi \, \in \, H^4(\Omega ) \cap H^1_0(\Omega ) \ , \ \theta \, \in \, H^2(\Omega )\).

Remark 2

If the given function is \( \, \theta _0(x,z) \, = \, t \, \cos ( \, l \, x) \, \), then \( \, \left\Vert \, \dfrac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, = \, \pi \, t \, \sqrt{\frac{l \, h}{2}} \, .\) We notice that the length of the horizontal layer ( \( \, \pi /l \, \) ) is free from the smallness condition in the Theorem.

A proof is given by an iteration for \( \, n = 1 \, \) and \( \, n+1 = 2, 3, \cdots \, \) respectively.

$$\begin{aligned} \ \Delta ^{\, 2} \, \psi _{1} \, - \ \frac{1}{ \, \nu \, } \left\{ \, \frac{\partial \psi _{1}}{\partial z} \, \frac{\partial \Delta \psi _{1}}{\partial x} \ - \ \frac{\partial \psi _{1}}{\partial x} \, \frac{\partial \Delta \psi _{1}}{\partial z} \, \right\} \ {}&= \ {}&\frac{g \, \alpha }{\nu } \, \frac{\partial \, \theta _0}{\partial \, x} \ , \end{aligned}$$
(5)
$$\begin{aligned} \ \Delta \, \theta _{1} \ - \ \frac{1}{\, \kappa \, } \, \left\{ \, \frac{\partial \psi _{1}}{\partial z} \, \frac{\partial \theta _{1}}{\partial x} \ - \ \frac{\partial \psi _{1}}{\partial x} \, \frac{\partial \theta _{1} }{\partial z} \, \right\} \&= \ {}&- \ \Delta \, \theta _0 \ + \ \frac{1}{\, \kappa \, } \, \frac{\partial \psi _{1}}{\partial z} \, \frac{\partial \, \theta _0}{\partial \, x} \ . \end{aligned}$$
(6)
$$\begin{aligned} \ \Delta ^{\, 2} \, \psi _{n+1} \ {}- & {} \ \frac{1}{ \, \nu \, } \left\{ \, \frac{\partial \psi _{n+1}}{\partial z} \, \frac{\partial \Delta \psi _{n+1}}{\partial x} \ - \ \frac{\partial \psi _{n+1}}{\partial x} \, \frac{\partial \Delta \psi _{n+1}}{\partial z} \, \right\} \ \nonumber \\= & {} \ \ \frac{g \, \alpha }{\nu } \, \left\{ \, \frac{\partial \, \theta _n}{\partial x} \ + \ \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\} \ , \end{aligned}$$
(7)
$$\begin{aligned} \ \Delta \, \theta _{n+1} \ {}- & {} \ \frac{1}{\, \kappa \, } \, \left\{ \, \frac{\partial \psi _{n+1}}{\partial z} \, \frac{\partial \theta _{n+1}}{\partial x} \ - \ \frac{\partial \psi _{n+1}}{\partial x} \, \frac{\partial \theta _{n+1} }{\partial z} \, \right\} \ \nonumber \\= & {} \ - \ \, \Delta \, \theta _0 \ + \ \frac{1}{\, \kappa \, } \, \frac{\partial \psi _{n+1}}{\partial z} \, \frac{\partial \, \theta _0}{\partial \, x} \ . \end{aligned}$$
(8)

The successive approximations \( \, \psi _{n+1}, \, \theta _{n+1}, \, \ n \, = \, 0, \, 1, \, 2, \cdots \, \) are obtained by Proposition 1. The convergence of this iteration is proved by the following lemmas under the assumptions of the theorem.

Lemma 3

Let \( \, ( \psi _1, \, \theta _1) \, \) be the solution of Eqs. 5 and 6 with the boundary condition (3) and (4). Then we have

$$\begin{aligned} \left\Vert \, \nabla \, \Delta \, \psi _1 \, \right\Vert \ \le \ \frac{ \, \pi \, g \, \alpha \, h \, }{ \, 2 \, \nu \, } \ \left\Vert \, \frac{\partial \, \, \theta _0}{\partial \, x} \, \right\Vert \ , \hspace{1cm} \\ \left\Vert \, \nabla \, \theta _1 \, \right\Vert \ \le \ \left( \, 1 \, + \, \frac{\pi \, h }{\kappa } \, \left\Vert \, \frac{\partial \, \psi _1}{\partial \, z} \, \right\Vert _{L^{\infty }} \, \right) \, \left\Vert \, \frac{\partial \, \, \theta _0}{\partial \, x} \, \right\Vert \ . \end{aligned}$$

Here we use the estimates in Proposition, integration by parts and such inequalities as

$$ \left\Vert \psi \right\Vert \le \frac{\pi h}{2\sqrt{2}} \left\Vert \frac{\partial \psi }{\partial z}\right\Vert , \qquad \left\Vert \theta \right\Vert \le \dfrac{\pi h}{\sqrt{2}} \left\Vert \frac{\partial \theta }{\partial z}\right\Vert $$

derived from the boundary conditions (3) and (4) respectively.

Lemma 4

$$\begin{aligned} \left\Vert \nabla \psi \right\Vert _{L^{\infty }} \ \le \ c_0 h \left\Vert \Delta \nabla \psi \right\Vert , \quad \text {where}\quad c_0^2 \, =\, \dfrac{1}{\pi }\sum _{n=1}^\infty \dfrac{1}{n^3}. \end{aligned}$$
(9)

Proof

Suppose that \(f \in L^2\) has an expansion

$$ f \ = \sum _{m,n=1}^{\infty } f_{m,n} \sin (mlx) \sin (nz/h). $$

Noting that Parseval’s theorem is given by

$$ \left\Vert f\right\Vert ^2 \, = \, \dfrac{\pi ^2 h}{4l}\sum _{m,n=1}^{\infty } f_{m,n}^2, $$

it holds that

$$\begin{aligned} \left\Vert f\right\Vert _{L^{\infty }}&\le \, \left\{ \sum _{m,n=1}^{\infty } f_{m,n}^2 \left\{ (ml)^2 + \left( \dfrac{n}{h}\right) ^2\right\} ^2\right\} ^{1/2} \left\{ \sum _{m,n=1}^{\infty } \dfrac{1}{\left( (ml)^2+\left( \tfrac{n}{h}\right) ^2\right) ^2}\right\} ^{1/2} \\&= \, \sqrt{\dfrac{4lh^3}{\pi ^2}}\left\Vert \Delta f\right\Vert \left\{ \sum _{m,n=1}^{\infty } \dfrac{1}{\left( (mlh)^2+n^2\right) ^2}\right\} ^{1/2}. \end{aligned}$$

The result is concluded by

$$ \sum _{n=1}^{\infty }\sum _{m=1}^\infty \dfrac{1}{\left( (mlh)^2+n^2\right) ^2} \ \le \ \sum _{n=1}^{\infty } \int _0^\infty \dfrac{dx}{\left( (xlh)^2+n^2\right) ^2} = \dfrac{\pi }{4lh}\sum _{n=1}^{\infty }\dfrac{1}{n^3}. $$

\(\square \)

Lemma 5

Let \( \, c_0 \, > \, 0 \) be given in Eq. 9. If

$$\begin{aligned} \frac{ \, \pi \, c_0 \, h^2 }{\nu } \, \left\Vert \nabla \, \Delta \, \psi _n \, \right\Vert \ \le \ 1 \ \end{aligned}$$
(10)

and

$$\begin{aligned} \frac{\, \pi ^2 \, g \, \alpha \, c_0 \, h^3 \, }{ \, \kappa \, \nu \, } \, \left( \, \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, + \, \left\Vert \, \nabla \, \theta _n \, \right\Vert \, \right) \, \ \le \ \frac{1}{2} \ , \end{aligned}$$
(11)

then we have

$$\begin{aligned} \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert \ \le \ \frac{ \, 1 \,}{ \, 2 \, } \, \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n} \, - \, \psi _{n-1} \, ) \, \right\Vert \ , \\ \left\Vert \, \nabla \, ( \, \theta _{n+1} \, - \, \theta _n \, ) \, \right\Vert \ \le \ \frac{\, 1 \, }{ \, 2 \, } \, \left\Vert \, \nabla \, ( \, \theta _{n} \, - \, \theta _{n-1} \, ) \, \right\Vert \ . \end{aligned}$$

Proof

They follow from the estimates of Proposition and the inequality (9).

$$\begin{aligned}&\left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert \\&\qquad \le \ \frac{ \, \pi \, h \,}{ \, 2 \, \nu \, } \, \left( \, \left\Vert \, \frac{\partial \, ( \, \psi _{n+1} - \psi _{n} \, )}{\partial \, z } \, \frac{\partial \, \Delta \psi _n}{\partial \, x} \, - \, \frac{\partial \, ( \, \psi _{n+1} - \psi _{n} \, )}{\partial \, x } \, \frac{\partial \, \Delta \, \psi _n }{\partial \, z} \, \right\Vert \, + \, g \, \alpha \, \left\Vert \, \frac{\partial \, ( \, \theta _n \, - \, \theta _{n-1} \, ) }{\partial \, x} \, \right\Vert \right) \\&\qquad \qquad \le \ \frac{ \, \pi \, c_0 \, h^2 \, }{ \, 2 \, \nu \, } \, \left\Vert \, \nabla \, \Delta \, \psi _n \, \right\Vert \, \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert \ + \ \frac{ \, \pi \, g \, \alpha \, h \,}{ \, 2 \, \nu \, } \, \left\Vert \, \nabla \, ( \, \theta _n \, - \, \theta _{n-1} \, ) \, \right\Vert \ , \end{aligned}$$
$$\begin{aligned}&\qquad \quad \left\Vert \, \nabla \, ( \, \theta _{n+1} \, - \, \theta _n \, ) \, \right\Vert \\&\le \ \frac{\, \pi \, h \, }{ \, \kappa \, } \, \left( \, \left\Vert \, \frac{\partial \, ( \, \psi _{n+1} - \psi _{n} \, )}{\partial \, z } \, \frac{\partial \, \theta _n}{\partial \, x} - \, \frac{\partial \, ( \, \psi _{n+1} - \psi _{n} \, )}{\partial \, x } \, \frac{\partial \, \theta _n }{\partial \, z} \, \right\Vert \ + \ \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, \left\Vert \, \frac{\partial \, ( \, \psi _{n+1} \, - \, \psi _{n} \, )}{\partial \, z} \, \right\Vert _{L^{\infty }} \right) \\&\qquad \qquad \qquad \qquad \qquad \le \ \frac{ \, \pi \, c_0 \, h^2}{ \, \kappa \, } \, \left( \, \left\Vert \, \nabla \, \theta _n \, \right\Vert \, + \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, \right) \, \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert \ . \end{aligned}$$

Then we have by the assumption (10) on \( \, \nabla \, \Delta \, \psi _n \, \)

$$\begin{aligned} \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert \le \ \ \frac{ \, \pi \, g \, \alpha \, h \,}{ \, \nu \, } \, \left\Vert \, \nabla \, ( \, \theta _n \, - \, \theta _{n-1} \, ) \, \right\Vert \ , \end{aligned}$$

Thus we have by the assumption (11)

$$\begin{aligned} \left\Vert \, \nabla \, ( \, \theta _{n+1} \, \!-\! \, \theta _n \, ) \, \right\Vert&\le \ \ \frac{ \, \pi \, c_0 \, h^2}{ \, \kappa \, } \, \frac{ \, \pi \, g \, \alpha \, h \,}{ \, \nu \, } \, \left( \, \left\Vert \, \nabla \, \theta _n \, \right\Vert \, \!+\! \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, \right) \, \left\Vert \, \nabla \, ( \, \theta _{n} \, - \, \theta _{n - 1} \, ) \, \right\Vert \\&\le \ \ \frac{1}{2} \, \left\Vert \, \nabla \, ( \, \theta _{n} \, \!-\! \, \theta _{n - 1} \, ) \, \right\Vert \ . \end{aligned}$$

Therefore we have

$$\begin{aligned} \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n+1} \, - \, \psi _n \, ) \, \right\Vert&\le \ \ \frac{ \, \pi \, g \, \alpha \, h \,}{ \, \nu \, } \, \frac{ \, \pi \, c_0 \, h^2}{ \, \kappa \, } \, \left( \, \left\Vert \, \nabla \, \theta _n \, \right\Vert \, + \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \, \right) \, \left\Vert \, \nabla \, \Delta \, ( \, \psi _{n} \, - \, \psi _{n - 1} \, ) \, \right\Vert \ \\&\le \ \ \frac{1}{2} \, \left\Vert \, \nabla \, \Delta \,( \, \psi _{n} \, - \, \psi _{n - 1} \, ) \, \right\Vert \ . \end{aligned}$$

\(\square \)

We can proceed the proof of Theorem inductively for \( \, n = 1, 2, \cdots \, \). The conditions (10) and (11) hold for \( \, n = 1 \, .\) Assume (10) and (11) hold for \( \, n=1, 2, \cdots , k \, .\)

Then we have by Lemma 5

$$\begin{aligned} \left\Vert \, \nabla \, \theta _{k+1} \, \right\Vert \ {}&\le \ \left\Vert \, \nabla \, ( \, \theta _{k+1} \, - \, \theta _{k} \, ) \, \right\Vert \ + \, \left\Vert \, \nabla \, ( \, \theta _{k} \, - \, \theta _{k-1} \, ) \, \right\Vert \, + \, \cdots \, + \, \left\Vert \, \nabla \, \theta _{1} \, \right\Vert \hspace{2cm} \\&\le \ 2 \, \left\Vert \, \nabla \, \theta _{1} \, \right\Vert \ \le \ 3 \, \left\Vert \, \frac{\partial \, \theta _0 }{\partial \, x } \, \right\Vert \ ,\\ \Vert \, \nabla \, \Delta \, \psi _{k+1} \, \Vert \ {}&\le \ \left\Vert \, \nabla \, \Delta \, ( \, \psi _{k+1} \, - \, \psi _{k} \, ) \, \right\Vert \, + \, \left\Vert \, \nabla \, \Delta \, ( \, \psi _{k} \, - \, \psi _{k-1} \, ) \, \right\Vert \, + \, \cdots \, + \, \left\Vert \, \nabla \, \Delta \, \psi _{1} \, \right\Vert \\ \ {}&\le \ 2 \, \left\Vert \, \nabla \, \Delta \, \psi _{1} \, \right\Vert \ \le \ \frac{ \, \pi \, g \, \alpha \, h \, }{\nu } \, \left\Vert \, \frac{\partial \, \theta _0}{\partial \, x} \, \right\Vert \ . \end{aligned}$$

Then the assumptions of Theorem give (10) and (11) for \( \, n \, = k+1 \, .\)

Therefore under strong assumptions in Theorem the successive approximation has a uniform bound in \( \, H^3 \, \times \, H^1 \, \) and the iteration converges to a generalized solution for our system (1)–(4).

3 Numerical scheme

This section describes an iterative scheme to find a solution to the system of non-linear (1)–(4).

We denote by k an iteration index starting from 0, and by \(N_x\), \(N_z\) division numbers for intervals \(x\in [0,\pi /\ell ]\) and \(z\in [0,h\pi ]\), respectively. We will also use \(X = \pi /\ell \), \(Z = h\pi \), \(\Delta x = X/N_x\) and \(\Delta z = Z/N_z\). For a function f, its numerical solution \(f_{i,j}\) represents the value \(f(x_i,z_j)\) on a lattice point \((x_i,z_j) = (i\Delta x, j\Delta z)\).

Step 1

Set \(k=0\) and initial guess \(\psi ^{0}_{i,j} = \theta ^{0}_{i,j} = 0\) for \(0 \le i \le N_x\), \(0 \le j \le N_z\). Also set \(\varphi ^{0}_{i,j} = u^{0}_{i,j} = w^{0}_{i,j} = 0\).

Step 2

Update \(\varphi ^{k+1}_{i,j}\), \(1 \le i \le N_x-1\), \(1 \le j \le N_z-1\) by

$$\begin{aligned}&\nu \left( \dfrac{\varphi ^k_{i+1,j} - 2\varphi ^{k+1}_{i,j} + \varphi ^k_{i-1,j}}{\Delta x^2} + \dfrac{\varphi ^k_{i,j+1} - 2\varphi ^{k+1}_{i,j} + \varphi ^k_{i,j-1}}{\Delta z^2}\right) \\&\qquad \qquad \qquad = \dfrac{u^k_{i+1,j}\varphi ^k_{i+1,j} - u^k_{i-1,j}\varphi ^k_{i-1,j}}{2\Delta x} + \dfrac{w^k_{i,j+1}\varphi ^k_{i,j+1} - w^k_{i,j-1}\varphi ^k_{i,j-1}}{2\Delta z} \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad + g\alpha \dfrac{\theta ^k_{i+1,j} - \theta ^k_{i-1,j}}{2\Delta x} + g\alpha \dfrac{\partial \theta _0}{\partial x}(x_i, z_j). \end{aligned}$$

Step 3

Set \(\varphi ^{k+1}_{0,j} = \varphi ^{k+1}_{N_x,j} = \varphi ^{k+1}_{i,0} = \varphi ^{k+1}_{i,N_z} = 0\).

Step 4

For \(1 \le m \le N_x-1, 1 \le n \le N_z-1\), find

$$ \Phi ^{k+1}_{m,n} = \dfrac{4}{N_x N_z}\sum _{i=1}^{N_x-1}\sum _{j=1}^{N_z-1} \varphi ^{k+1}_{i,j}\sin \dfrac{im\pi }{N_x}\sin \dfrac{jn\pi }{N_z}. $$

Then, compute \(\psi ^{k+1}_{i,j}\), \( 1 \le i \le N_x-1, 1 \le j \le N_z-1\), by the discrete inverse Fourier sine transform

$$ \psi ^{k+1}_{i,j} = -\sum _{m=1}^{N_x}\sum _{n=1}^{N_z} \dfrac{\Phi ^{k+1}_{m,n}}{A_m^2+B_n^2}\sin \dfrac{im\pi }{N_x}\sin \dfrac{jn\pi }{N_z}, $$

where \(A_m =\dfrac{m\pi }{X}\) and \(B_m = \dfrac{n\pi }{Z}\).

Step 5

Calculate \(u^{k+1}_{i,j}\) and \(w^{k+1}_{i,j}\) by

$$\begin{aligned} u^{k+1}_{i,j}&= {\left\{ \begin{array}{ll} \dfrac{-3\psi ^{k+1}_{i,0} + 4\psi ^{k+1}_{i,1} - \psi ^{k+1}_{i,2}}{2\Delta z},\quad &{} j=0, 0 \le i \le N_x,\\ \dfrac{\psi ^{k+1}_{i,j+1} - \psi ^{k+1}_{i,j-1}}{2\Delta z}, \quad &{} 1 \le j \le N_z-1, 0 \le i \le N_x,\\ \dfrac{3\psi ^{k+1}_{i,N_z}-4\psi ^{k+1}_{i,N_z-1}+\psi ^{k+1}_{i,N_z-2}}{2\Delta z},\quad &{} j=N_z, 0 \le i \le N_x,\\ \end{array}\right. },\\ \text {and }\\ w^{k+1}_{i,j}&= {\left\{ \begin{array}{ll} -\dfrac{-3\psi ^{k+1}_{0,j} + 4\psi ^{k+1}_{1,j} - \psi ^{k+1}_{2,j}}{2\Delta x},\quad &{} i=0, 0 \le j \le N_z,\\ -\dfrac{\psi ^{k+1}_{i+1,j} - \psi ^{k+1}_{i-1,j}}{2\Delta x}, \quad &{} 1 \le i \le N_x-1, 0 \le j \le N_z,\\ -\dfrac{3\psi ^{k+1}_{N_x,j}-4\psi ^{k+1}_{N_x-1,j}+\psi ^{k+1}_{N_x-2,j}}{2\Delta x}, \quad &{} i=N_x, 0 \le j \le N_z. \end{array}\right. } \end{aligned}$$

Step 6

Update \(\theta ^{k+1}_{i,j}\), \(1 \le i\le N_x-1\), \(1 \le j \le N_z-1\) by

$$\begin{aligned}&\kappa \left( \dfrac{\theta ^k_{i+1,j} - 2\theta ^{k+1}_{i,j} + \theta ^k_{i-1,j}}{\Delta x^2} + \dfrac{\theta ^k_{i,j+1} - 2\theta ^{k+1}_{i,j} + \theta ^k_{i,j-1}}{\Delta z^2}\right) \\&\qquad \qquad \qquad = \dfrac{u^{k+1}_{i+1,j}\theta ^k_{i+1,j} - u^{k+1}_{i-1,j}\theta ^k_{i-1,j}}{2\Delta x} + \dfrac{w^{k+1}_{i,j+1}\theta ^k_{i,j+1} - w^{k+1}_{i,j-1}\theta ^k_{i,j-1}}{2\Delta z} \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad - \kappa \dfrac{\partial ^2\theta _0}{\partial x^2}(x_i,z_j) + u^{k+1}_{i,j}\dfrac{\partial \theta _0}{\partial x}(x_i,z_j). \end{aligned}$$

Step 7

Set

  • \(\theta ^{k+1}_{i,N_z} = 0\),

  • \(\theta ^{k+1}_{0,j} = -\dfrac{2}{3}\left( -2\theta ^{k+1}_{1,j} + \dfrac{1}{2}\theta ^{k+1}_{2,j}\right) \) for \(1 \le j \le N_z-1\),

  • \(\theta ^{k+1}_{N_x,j} = \dfrac{2}{3}\left( 2\theta ^{k+1}_{N_x-1,j} - \dfrac{1}{2}\theta ^{k+1}_{N_x-2,j}\right) \) for \(1 \le j \le N_z-1\),

  • \(\theta ^{k+1}_{i,0} = -\dfrac{2}{3}\left( -2\theta ^{k+1}_{i,1} + \dfrac{1}{2}\theta ^{k+1}_{i,2}\right) \) for \(0 \le i \le N_x\).

Step 8

Check a terminate criteria

$$ \max _{i,j} \Bigl \{ \bigl |\psi ^{k+1}_{i,j} - \psi ^k_{i,j}\bigr |, \bigl |\theta ^{k+1}_{i,j} - \theta ^{k}_{i,j}\bigr | \Bigr \} < \epsilon . $$

If so, the algorithm is finished with approximate solutions \( \bigl \{\psi ^{k+1}_{i,j} \,;\, i, j\bigr \} \) and \( \bigl \{\theta ^{k+1}_{i,j} \,;\, i, j\bigr \} \). Otherwise, increment k and go to Step 2.

Remark 3

Step 2 and Step 6 can be considered as Euler schemes for time evolution with \(\Delta t = \dfrac{{\Delta x}^2}{4\nu }\) and \(\Delta t = \dfrac{{\Delta x}^2}{4\kappa }\) respectively.

Remark 4

Step 4 corresponds to solving the boundary value problem of the Poisson equation

$$\begin{aligned} \Delta \psi ^{k+1}&= \varphi ^{k+1}, \quad \text {in } \Omega ,\\ \psi ^{k+1}&= 0, \qquad \quad \text {on } \partial \Omega \end{aligned}$$

in the Fourier sine series as

$$ \varphi ^{k+1}(x_i,z_j) = \sum _{m=1}^{\infty }\sum _{n=1}^{\infty } \Phi ^{k+1}_{m,n}\sin (A_{m}x_i)\sin (B_{n}z_j). $$

Therefore it has another schemes as follows.

(i):

The Poisson equation can be solved by Gauss elimination.

$$\begin{aligned}\begin{gathered} \dfrac{\psi ^{k+1}_{i+1,j} - 2\psi ^{k+1}_{i,j} + \psi ^{k+1}_{i-1,j}}{\Delta x^2} + \dfrac{\psi ^{k+1}_{i,j+1} - 2\psi ^{k+1}_{i,j} + \psi ^{k+1}_{i,j-1}}{\Delta z^2} \ = \ \varphi ^{k+1}_{i,j}, \\ \psi ^{k+1}_{0,j} = \psi ^{k+1}_{N_x,j} = \psi ^{k+1}_{i,0} = \psi ^{k+1}_{i,N_z} = 0. \end{gathered}\end{aligned}$$

The results are the same as Step 4 above, but it consumes much time except for those cases with \(N_x\) and \(N_z\) being small.

(ii):

The Poisson equation can be solved by similar iteration to Step 2. Update \(\psi ^{k+1}_{i,j}\), \(1 \le i \le N_x-1\), \(1 \le j \le N_z-1 \) by

$$\begin{aligned}\begin{gathered} \dfrac{\psi ^k_{i+1,j} - 2\psi ^{k+1}_{i,j} + \psi ^k_{i-1,j}}{\Delta x^2} + \dfrac{\psi ^k_{i,j+1} - 2\psi ^{k+1}_{i,j} + \psi ^k_{i,j-1}}{\Delta z^2} = \varphi ^{k+1}_{i,j},\\ \psi ^{k+1}_{0,j} = \psi ^{k+1}_{N_x,j} = \psi ^{k+1}_{i,0} = \psi ^{k+1}_{i,N_z} = 0. \end{gathered}\end{aligned}$$

It converges to the same solution as Step 4 only for \(l=0.001\pi \), \(0.01\pi \), and \(0.05\pi \), while it does not converge for \(l=0.5\pi \) and \(0.1\pi \).

4 Numerical examples

This section exhibits the contour lines and isothermal lines of the stationary solution obtained by numerical computations.

Throughout the section, the following constants are used:

$$ h=1/\pi , \quad g=980, \quad \alpha = 0.0001, \quad \nu = 0.01, \quad \kappa = 0.001, \quad \text {and} \quad t=10. $$

In computation, the following parameters are also adopted:

$$ \Delta x = \Delta z = \dfrac{1}{256},\quad \text {and} \quad \epsilon = 10^{-8}. $$

For the discrete sine transform (DST), fftw_plan_r2r_2d of FFTW3 [3] is used in Step 4. Numerical experiments are processed on Xeon Platinum 8480+ (56cores) with OpenMP parallel computation with double precision arithmetic.

Numerical experiments are performed for the following parameters:

Example 1

\(l=0.001\pi \), \(N_x = 256{,}000\) \(N_z = 256\).

Example 2

\(l=0.01\pi \), \(N_x = 25{,}600\), \(N_z = 256\).

Example 3

\(l=0.05\pi \), \(N_x = 5{,}120\), \(N_z = 256\).

Example 4

\(l=0.1\pi \), \(N_x =2{,}560\), \(N_z = 256\).

Example 5

\(l=0.5\pi \), \(N_x = 512\), \(N_z = 256\).

The average depth of the ocean and the distance between the equator and the pole are approximately 4 kilometers and 10, 000 kilometers, respectively, and their ratio corresponds to the scale of Example 1.

Contours of numerical solutions \(\psi \) and \(\theta +\theta _0\) are respectively shown in Figs. 1, 2345, and 6. Notice that \(\Omega = \{ 0< x< \pi /l, 0< z < h\pi \}\) and the scale of the x-axis and z-axis is different in each figure such as \(l h \ll 1\).

Fig. 1
figure 1

Contour lines of \(\psi \) (above) and \(\theta +\theta _0\) (below) with \(l=0.001\pi \) (Example 1). The former (\(\psi \)) is drawn from \(-0.0005\) to \(-0.004\) decreasing by 0.0005, while the latter is drawn from \(-9\) to 9 in increments of 1

Fig. 2
figure 2

Contour lines of \(\psi \) (above) and \(\theta +\theta _0\) (below) with \(l=0.01\pi \) (Example 2). The former is drawn from \(-0.005\) to \(-0.03\) decreasing by 0.005

In Examples 1 and 2 for \(l h \ll 1\), a single symmetric roll pattern appears regardless of the horizontal length of the layer. This is a significant characteristic of the present model which differs from cases of uniformly heating from the upper or bottom surfaces. From a geophysics viewpoint, it resembles the thermohaline circulation in the Atlantic ocean [6] which is formed by the warm surface ocean currents from the equator (\(x=0\)) to the pole (\(x=\pi /l\)), cool subsurface flow in the opposite direction, and upwelling around the equator and sinking flow near the pole. It is also found that the ocean currents are moving northward along with the sea surface temperature when comparing Quick Bulletin Ocean Conditions No. 17 of 2023 and 2024 released by the Japan Coast Guard regarding ocean current and sea surface temperature near the Japanese archipelago [5]. Causes of ocean currents from the equator to the pole are complicated and include factors such as surface winds, Coriolis force, salinity, and geographical features. Our numerical results indicate that non-uniform heat supply on the top surface is also one of the contributing factors.

Fig. 3
figure 3

Contour lines of \(\psi \) (above) and \(\theta +\theta _0\) (below) with \(l=0.05\pi \) (Example 3). The profile of \(\psi \) is drawn from \(-0.005\) to \(-0.035\) decreasing by 0.005

Fig. 4
figure 4

Enlargement of the stream lines and velocity field of Fig. 3 for \(l = 0.05\pi \). The contour are drawn from \(-0.040\) to \(-0.048\) decreasing by 0.001

Fig. 5
figure 5

Contour lines of \(\psi \) (above) and \(\theta +\theta _0\) (below) with \(l=0.1\pi \) (Example 4). The profile of \(\psi \) is drawn from \(-0.005\) to \(-0.045\) decreasing by 0.005

Fig. 6
figure 6

Contour lines of \(\psi \) (above) and \(\theta +\theta _0\) (below) with \(l=0.5\pi \) (Example 5). Contour lines of \(\theta +\theta _0\) are drawn in 0.2 increments from \(-6\) to \(-7\), in 1 increments from 9 to \(-6\), and \(-7\), \(-8\), and \(-9\) for the rest

In numerical solution for Example 3 (\(l=0.05\pi \)), a flow in the opposite direction is observed around \(x=19\), which is magnified in Fig. 4. A similar profile appears around \(\pi /35 \le l \le \pi /16\).

When the value of l becomes larger, the roll on the right side grows and eventually occupies the entire domain. Examples 4 and 5 display an asymmetric single roll, contrasting with the case \(lh \ll 1\).

It should be stressed that our numerical results imply the existence of a solution although parameters in these examples do not satisfy the condition of Theorem 2. In other words, it is strongly suggested that conditions for existence of solution in Theorem 2 can be relaxed.

Table 1 summarizes total computational time and that for DST in Examples 25. From the results, computational time for Example 1 is estimated to be extremely long. In order to save computational time, we propose a multigrid-like strategy to generate initial guess in Step 1. Specifically, the first step is to find a numerical solution with \((N_x, N_z) = (32{,}000,32)\). Next, the linear interpolations of the solution \(\psi \) and \(\theta \) on the lattice with \((N_x,N_z) = (64{,}000,64)\) are obtained, and corresponding u and w are computed by Step 5, and \(\varphi = \Delta \psi \) by the standard five-point finite difference is computed. Using them as the initial guess, the iteration in the previous section is processed for \((N_x,N_z) = (64{,}000,64)\). Numerical solutions for \((N_x,N_z)=(128{,}000,128)\) and (256, 000, 256) are found recursively. The computational times are listed in Table 2, and the total computational time is 2, 999 seconds, which is much less than that for \((N_x,N_z)=(64{,}000,64)\) starting from zero initial guess.

Table 1 Percentage of computation time accounted for by discrete sine transform. (unit: sec.)
Table 2 Comparison of computational time by the initial guess for \(l=0.001\pi \). (unit: sec.)

In order to verify that numerical solutions satisfy the system of differential equations quantitatively, the residuals are examined by substituting them into the finite difference equations.

$$\begin{aligned} \max _{i,j}&\Biggl |\nu \left( \dfrac{\varphi ^{*}_{i+1,j} - 2\varphi ^{*}_{i,j} + \varphi ^{*}_{i-1,j}}{\Delta x^2} + \dfrac{\varphi ^{*}_{i,j+1} - 2\varphi ^{*}_{i,j} + \varphi ^{*}_{i,j-1}}{\Delta z^2}\right) \nonumber \\&\qquad \quad - \Biggl \{\dfrac{u^{*}_{i+1,j}\varphi ^{*}_{i+1,j} - u^{*}_{i-1,j}\varphi ^{*}_{i-1,j}}{2\Delta x} + \dfrac{w^{*}_{i,j+1}\varphi ^{*}_{i,j+1} - w^{*}_{i,j-1}\varphi ^{*}_{i,j-1}}{2\Delta z } \nonumber \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad + g\alpha \dfrac{\theta ^{*}_{i+1,j} - \theta ^{*}_{i-1,j}}{2\Delta x} + g\alpha \dfrac{\partial \theta _0}{\partial x}(x_i, z_j)\Biggr \}\Biggr |, \end{aligned}$$
(12)
$$\begin{aligned} \max _{i,j}&\Biggl |\kappa \left( \dfrac{\theta ^{*}_{i+1,j} - 2\theta ^{*}_{i,j} + \theta ^{*}_{i-1,j}}{\Delta x^2} + \dfrac{\theta ^{*}_{i,j+1} - 2\theta ^{*}_{i,j} + \theta ^{*}_{i,j-1}}{\Delta z^2}\right) \nonumber \\&\qquad \quad -\Biggl \{ \dfrac{u^{*}_{i+1,j}\theta ^{*}_{i+1,j} - u^{*}_{i-1,j}\theta ^{*}_{i-1,j}}{2\Delta x} + \dfrac{w^{*}_{i,j+1}\theta ^{*}_{i,j+1} - w^{*}_{i,j-1}\theta ^{*}_{i,j-1}}{2\Delta z } \nonumber \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad - \kappa \dfrac{\partial ^2\theta _0}{\partial x^2}(x_i,z_j) + u^{*}_{i,j}\dfrac{\partial \theta _0}{\partial x}(x_i,z_j)\Biggr \}\Biggr |, \end{aligned}$$
(13)

and

$$\begin{aligned} \max _{i,j}\left| \dfrac{\psi ^{*}_{i+1,j} - 2\psi ^{*}_{i,j} + \psi ^{*}_{i-1,j}}{\Delta x^2} + \dfrac{\psi ^{*}_{i,j+1} - 2\psi ^{*}_{i,j} + \psi ^{*}_{i,j-1}}{\Delta z^2} - \varphi ^{*}_{i,j}\right| , \end{aligned}$$
(14)

where lattice functions with symbol \(*\) denote obtained numerical solutions. The residuals in Table 3 are sufficiently small, thus it is concluded that numerical solutions give reasonable approximations.

Table 3 Residuals (12), (13), and (14) of numerical solution found by the iterative scheme in Section 3

Remark 5

Configurations in Example 1 may be considered as a situation of a primitive equation with the assumption of static pressure because our numerical solution satisfies

$$ \frac{\partial p}{\partial z}(x,z) \approx q(x), $$

for some function \( \, q \, \) which is independent of z.