Quasi-geostrophic Model
- class otp.quasigeostrophic.QuasiGeostrophicProblem
Bases:
otp.ProblemA chaotic PDE modeling the flow of a fluid on the earth.
The governing partial differential equation that is discretized is,
\[ Δψ_t = -J(ψ,ω) - {Ro}^{-1} \partial_x ψ -{Re}^{-1} Δω - {Ro}^{-1} F, \]where the Jacobian term is a quadratic function,\[ J(ψ,ω) \equiv \partial_x ψ \partial_x ω - \partial_x ψ \partial_x ω, \]the relationship between the vorticity \(ω\) and the stream function \(ψ\) is\[ ω = -Δψ, \]the term \(Δ\) is the two dimensional Laplacian over the discretization, the terms \(\partial_x\) and \(\partial_y\) are the first derivatives in the \(x\) and \(y\) directions respectively, \(Ro\) is the Rossby number, \(Re\) is the Reynolds number, and \(F\) is a forcing term. The spatial domain is fixed to \(x ∈ [0, 1]\) and \(y ∈ [0, 2]\), and the boundary conditions of the PDE are assumed to be zero dirichlet everywhere.A second order finite difference approximation is performed on the grid to create the first derivative operators and the Laplacian operator.
The Laplacian is defined using the 5-point stencil
\[\begin{split} Δ = \begin{bmatrix} & 1 & \\ 1 & -4 & 1\\ & 1 & \end{bmatrix}, \end{split}\]which is scaled with respect to the square of the step size in each respective direction. The first derivatives,\[\begin{split} \partial_x &= \begin{bmatrix} & 0 & \\ 1/2 & 0 & 1/2\\ & 0 & \end{bmatrix},\\ \partial_y &= \begin{bmatrix} & 1/2 & \\ 0 & 0 & 0\\ & 1/2 & \end{bmatrix}, \end{split}\]are the standard second order central finite difference operators in the \(x\) and \(y\) directions.The Jacobian is discretized using the Arakawa approximation,
\[ J(ψ,ω) = \frac{1}{3}[ψ_x ω_y - ψ_y ω_x + (ψ ω_y)_x - (ψ ω_x)_y + (ψ_x ω)_y - (ψ_y ω)_x], \]in order for the system to not become unstable.
The Poisson equation is solved by the eigenvalue sylvester method for computational efficiency.
An Approximate deconvolution large eddy simulation closure model from [SSWI11] is also implemented to have the same level of accuracy with a coarser grid size.
Notes
Type
ODE
Number of Variables
\(Nx \times Ny\)
Stiff
not typically, depending on \(Re\), \(Ro\), \(Nx\), and \(Ny\)
Example
>>> problem = otp.quasigeostrophic.presets.PopovMouSanduIliescu; >>> sol = problem.solve(); >>> problem.movie(sol);
- Method Summary
- static resize(psi, newsize)
Resizes the state onto a new grid by performing interpolation
- Parameters:
psi (
numeric(nx, ny)) – the old state on the \(x \times y\) grid.newsize (
numeric(1, 2)) – the new size as a two-tuple \([nx, ny]\) indicating the new state of the system.
Parameters
- class otp.quasigeostrophic.QuasiGeostrophicParameters
Bases:
otp.ParametersParameters for the Quasi-geostrophic problem.
- Constructor Summary
- QuasiGeostrophicParameters(varargin)
Create a quasi-geostrophic parameters object.
- Parameters:
varargin – A variable number of name-value pairs. A name can be any property of this class, and the subsequent value initializes that property.
- Property Summary
- Nx
Nx is the number of grid points in the x direction
- Ny
Ny is the number of grid points in the y direction
- ReynoldsNumber
ReynoldsNumber is the Reynolds number
- RossbyNumber
RossbyNumber is the Rossby number
- ADLambda
ADlambda is the approximate deconvolution parameter
- ADPasses
ADPasses defines how many passes of the filter to do
Presets
- class otp.quasigeostrophic.presets.Canonical
Bases:
otp.quasigeostrophic.QuasiGeostrophicProblemA preset of the Quasi-geostrophic equations starting at the unstable state \(ψ_0 = 0\).
The value of the Reynolds number is \(Re= 450\), the Rossby number is \(Ro=0.0036\), and the spatial discretization is \(255\) interior units in the \(x\) direction and \(511\) interior units in the \(y\) direction.
The timespan starts at \(t=0\) and ends at \(t=100\), which is roughly equivalent to \(25.13\) years.
- Constructor Summary
- Canonical(varargin)
Create the Canonical Quasi-geostrophic problem object.
- Parameters:
varargin –
A variable number of name-value pairs. The accepted names are
ReynoldsNumber– Value of \(Re\).RossbyNumber– Value of \(Ro\).Nx– Spatial discretization in \(x\).Ny– Spatial discretization in \(y\).ADLambda– Scaling factor for approximate deconvolution RHSADPasses– Number of AD passes
- class otp.quasigeostrophic.presets.PopovMouSanduIliescu
Bases:
otp.quasigeostrophic.QuasiGeostrophicProblemA preset for the Quasi-geostrophic equations created for [PMSI21].
The initial condition is given by an internal file and was created by integrating the canonical preset until time \(t=100\).
The value of the Reynolds number is \(Re= 450\), the Rossby number is \(Ro=0.0036\), and the spatial discretization is \(63\) interior units in the \(x\) direction and \(127\) interior units in the \(y\) direction.
The timespan starts at \(t=100\) and ends at \(t=100.0109\), which is roughly equivalent to one day in model time.
- Constructor Summary
- PopovMouSanduIliescu(varargin)
Create the PopovMouSanduIliescu Quasi-geostrophic problem object.
- Parameters:
varargin –
A variable number of name-value pairs. The accepted names are
ReynoldsNumber– Value of \(Re\).RossbyNumber– Value of \(Ro\).Nx– Spatial discretization in \(x\).Ny– Spatial discretization in \(y\).ADLambda– Scaling factor for approximate deconvolution RHSADPasses– Number of AD passes