nonhydro#

Module: fridom.nonhydro

Submodules

grid

Module that stores all available grids for the non-hydrostatic model.

modules

A collection of modules for the nonhydrostatic model.

initial_conditions

Initial Conditions for the Nonhydrostatic Model

time_steppers

Time Steppers

utils

Utility functions and classes for the FRIDOM framework.

projection

Projection

Classes, Functions, and Variables

config

Configuration class for the fridom framework.

log

Instances of the Logger class represent a single logging channel.

ModelSettings(grid, **kwargs)

Model settings for the 3D non-hydrostatic model.

State(mset[, is_spectral, field_list])

DiagnosticState(mset[, is_spectral, field_list])

FieldVariable(mset, name[, position, arr, ...])

Class for field variables in the framework.

ModelState(mset[, clock])

Stores the model state variables and the time information.

Model(mset)

Base class for the model.

A 3D non-hydrostatic Boussinesq model.

Description#

The model is based on the ps3D model by Prof. Carsten Eden ( ceden/ps3D ).

System of Equations#

The model solves the scaled non-hydrostatic Boussinesq equations given by the momentum equations:

\[\partial_t u + Ro~\, \boldsymbol{u} \cdot \nabla u = f v - \partial_x p + \boldsymbol{F}_u\]
\[\partial_t v + Ro~\, \boldsymbol{u} \cdot \nabla v = -f u - \partial_y p + \boldsymbol{F}_v\]
\[\partial_t w + Ro~\, \boldsymbol{u} \cdot \nabla w = \delta^{-2} b - \delta^{-2} \partial_z p + \boldsymbol{F}_w\]

The buoyancy equation:

\[\partial_t b + Ro~, \boldsymbol{u} \cdot \nabla b = -w N^2 + \boldsymbol{F}_b\]

And the continuity equation:

\[\nabla \cdot \boldsymbol{u} = 0\]
with:
  • \(\boldsymbol{u} = (u, v, w)\) the velocity vector,

  • \(p\) the model pressure,

  • \(b\) the model buoyancy,

  • \(f\) the Coriolis parameter,

  • \(N\) the buoyancy frequency,

  • \(\boldsymbol{F}_i\) are sources and sinks,

  • \(Ro\) the Rossby number (1 for unscaled equations),

  • \(\delta\) the aspect ratio (1 for unscaled equations),

Meaning of Pressure and Buoyancy#

TL;DR:

The pressure \(p\), buoyancy \(b\), and buoyancy frequency \(N\) are related to the real pressure and density by the following equations:

\[p = \frac{\pi - \pi_s}{\rho_0} ~ , \quad b = -\frac{g}{\rho_0} \rho' ~ , \quad N^2 = -\frac{g}{\rho_0} \partial_z \rho_s = \partial_z b_s\]
with:
  • \(\pi\) the real pressure,

  • \(\pi_s\) the hydrostatic background pressure,

  • \(\rho'\) the density perturbation,

  • \(\rho_0\) the constant Boussinesq density,

  • \(\rho_s\) the background density profile.

Let \(\rho\) be the real density (the one that we would measure in a real fluid), and \(\pi\) be the real pressure. In this section, we link the model pressure \(p\), the model buoyancy \(b\), and the buoyancy frequency \(N\) to the real pressure and density. For that, we start with the full Boussinesq equations (neglect scaling and source terms):

\[\rho_0 (D_t u - fv) = - \partial_x \pi ~ , \quad \rho_0 (D_t v + fu) = - \partial_y \pi ~ , \quad \rho_0 D_t w = - \partial_z \pi - \rho g\]

where \(D_t = \partial_t + \boldsymbol{u} \cdot \nabla\) is the material derivative, \(\rho_0\) is the constant Boussinesq density. We further decompose the density into a part that only depends on the vertical coordinate \(\rho_s(z)\), and a perturbation \(\rho'\):

\[\rho(\boldsymbol{x}, t) = \rho_0 + \rho_s(z) + \rho'(\boldsymbol{x}, t)\]

We now solve the vertical momentum equation for \(w=0\), and \(\rho' = 0\):

\[\partial_z \pi_s = - g \rho_0 - g \rho_s(z)\]

where \(\pi_s\) is the hydrostatic background pressure. Defining the pressure \(p\), and buoyancy \(b\) as:

\[p = \frac{\pi - \pi_s}{\rho_0} ~ , \quad b = -\frac{\rho' g}{\rho_0}\]

the Boussinesq equations become:

\[D_t u - fv = - \partial_x p ~ , \quad D_t v + fu = - \partial_y p ~ , \quad D_t w = - \partial_z p + b\]

To obtain a tendency equation for the buoyancy, we compute its differential:

\[db = - \frac{g}{\rho_0} d\rho' = - \frac{g}{\rho_0} d\rho + \frac{g}{\rho_0} d\rho_s = - \frac{g}{\rho_0} d\rho - N^2 dz\]

where the buoyancy frequency \(N\) is defined as:

\[N^2 = - \frac{g}{\rho_0} \partial_z \rho_s = \partial_z b_s\]

Divide the differential by \(dt\) to obtain the tendency equation:

\[D_t b = - \frac{g}{\rho_0} D_t \rho - N^2 w\]

By further assuming that the density is conserved, we obtain the buoyancy equation:

\[D_t b = - w N^2\]

Scaling#

The system is nondimensionalized by introducing the following nondimensional coordinates:

\[x' = \frac{x}{L} ~ , \quad y' = \frac{y}{L} ~ , \quad z' = \frac{z}{H} ~ , \quad t' = \Omega t\]

where \(L\) is the horizontal length scale, \(H\) is the vertical length scale, and \(\Omega\) is the rotation rate. The nondimensional variables are alwqays denoted with the prime. The nondimensional model parameters are:

\[f' = \frac{f}{\Omega} ~ , \quad N' = \frac{N}{N^*}\]

where \(N^*\) is the order of magnitude of the buoyancy frequency. The nondimensional model variables are:

\[u' = \frac{u}{U} ~ , \quad v' = \frac{v}{U} ~ , \quad w' = \frac{w}{W} ~ , \quad p' = \frac{p}{P} ~ , \quad b' = \frac{b}{B}\]

where \(U\) is the order of magnitude of the horizontal velocity, \(W\) is the order of magnitude of the vertical velocity, \(P\) is the order of magnitude of the pressure, and \(B\) is the order of magnitude of the buoyancy. We define the scaling parameters as follows:

\[Ro = \frac{U}{\Omega L} ~ , \quad \delta = \frac{H}{L} ~ , \quad L_r = \frac{N^* H}{\Omega}\]

where \(Ro\) is the Rossby number, \(\delta\) is the aspect ratio, and \(L_r\) is the Rossby deformation radius. Inserting the nondimensional variables into the continuity equation, we obtain the following scaling relation for the aspect ratio:

\[\delta = \frac{H}{L} = \frac{W}{U}\]

We assume a small Rossby number and that the momentum equations are in balance (e.g. the time derivatives vanish). This leads to the following scaling relation:

\[B = \Omega U = \frac{P}{L}\]

We further assume that the length scale is of the same order of magnitude as the Rossby deformation radius. Or in other words, a Froude number of order one. From this assumption, we can relate the buoyancy frequency to the rotation rate and the aspect ratio:

\[L \approx L_r \Rightarrow N^* = \frac{\Omega}{\delta}\]

Inserting everything into the full Boussinesq equations, we obtain the scaled equations that are given at the beginning.

Time Stepping#

We recall that the full system of equations is given by (neglecting scaling):

\[\partial_t \boldsymbol{u} = \Delta_{\boldsymbol{u}} - \nabla p ~ , \quad \partial_t b = \Delta_b ~ , \quad \nabla \cdot \boldsymbol{u} = 0\]

where \(\Delta_{\boldsymbol{u}}\) includes all tendency terms on the right hand side of the momentum equations except the pressure gradient term. And the same for \(\Delta_b\). Taking the divergence of the momentum equations, we obtain the Poisson equation for the pressure:

\[\nabla^2 p = \nabla \cdot \Delta_{\boldsymbol{u}}\]

This means that the pressure is implicitly given by the velocity and buoyancy. Hence, the full system of equations can be written as:

\[\partial_t \boldsymbol{z} = \boldsymbol{f}(\boldsymbol{z}, t)\]

where \(\boldsymbol{z} = (\boldsymbol{u}, b)\) is the state vector, and \(\boldsymbol{f}\) is the right hand side of the equations. For the explicit time stepping schemes, we must evaluate the right hand side of the equations at a given time level. This is done by first computing the tendency terms \(\Delta_{\boldsymbol{u}}\) and \(\Delta_b\), and then solving the Poisson equation for the pressure. And finally, we remove the pressure gradient term from the tendency terms to obtain the right hand side of the equations. For more details on the pressure solver, see fridom.nonhydro.modules.pressure_solvers.