shallowwater#
Module: fridom.shallowwater
Submodules
exceptions.py - Custom exceptions for the framework. |
|
Projection. |
|
Time Steppers. |
|
Utility functions and classes for the FRIDOM framework. |
|
Grids for the shallow water model. |
|
A collection of modules for the shallow water model. |
|
Initial Conditions for the shallow water model. |
Classes, Functions, and Variables
Configuration class for the fridom framework. |
Instances of the Logger class represent a single logging channel. |
|
Model settings for the 2D shallow water model. |
|
State vector of the 2D shallow water model. |
|
Metadata for the ScalarField. |
|
A scalar mapping from grid space to real / complex numbers. |
|
A vector mapping from grid space to the vector space. |
|
|
Stores the model state variables and the time information. |
|
The main model class. |
|
A clock to keep track of the model time. |
|
The timing format for the model clock. |
|
Emits signals based on the state of a clock. |
A 2D scaled rotating shallow water model.
System of equations#
with:
\(\boldsymbol{u} = (u,v)\) the horizontal velocity vector, the hook operator rotates the vector by 90 degrees: \(\underset{\neg}{\boldsymbol u} = (-v,u)\)
\(p=g \eta\) is the pressure perturbation. (\(\eta\) is the free surface displacement, \(g\) is the acceleration due to gravity)
\(\boldsymbol{F}\) are source and sink terms
\(f\) is the Coriolis parameter
\(c^2\) is the phase speed of the gravity waves (\(c^2 = g H\)) in the unscaled system (with \(H\) the depth of the fluid). In the scaled system \(c^2\) corresponds to the Burger number
\(Ro = \frac{U}{f L}\) is the Rossby number (only for the scaled system, in unscaled system it is \(Ro=1\))
Derivation#
Start with the hydrostatic Navier Stokes equations with constant density and neglect the source terms:
where \(D_t = \partial_t + \boldsymbol{u} \cdot \nabla\) is the material derivative and \(p'\) is the pressure. Let the free surface displacement be given by \(\eta(x,y,t)\). By integrating the hydrostatic equation from some depth level \(z\) to the surface, we obtain the pressure:
Define new pressure variable \(p = g \eta\) and assume constant atmospheric pressure, i.e. \(\nabla p'(\boldsymbol{x}, \eta) = 0\). Then the horizontal pressure gradient is:
Inserting the new pressure variable into the momentum equation yields the momentum equation in the form given above (with \(Ro=1\)). To derive an equation for the new pressure variable, we first need to derive an equation for the free surface displacement. For that, we need the differential of the free surface displacement:
The total time derivative of the surface displacement should be equal to the vertical velocity at the surface, while the vertical velocity at the bottom (\(z=-H\)) should be zero:
Now we relate the vertical velocity at the top to the horziontal velocity field. For this, we integrate the continuity equation from the bottom to the surface and assume barotropic conditions (i.e. \(\partial_z \boldsymbol{u} = 0\)):
multiply with the gravitational acceleration \(g\) yields
with \(p = g \eta\) and \(c^2 = g H\).
Scaling#
We start with the unscaled shallow water equations from above:
and introduce the following scaling:
where the variables with a prime are the nondimensional variables. we further introduce the Rossby number \(Ro\), the Froude number \(Fr\), and assume geostrophic balance on first order:
Inserting the nondimensional variables into the shallow water equations yields:
Drop the primes, and use the Burger number \(Bu = \frac{{Ro}^2}{{Fr}^2}\) yields the scaled shallow water equations.