fluidsim.solvers.sphere.sw1l.solver

SW1L equations over a sphere (fluidsim.solvers.sphere.sw1l)

class fluidsim.solvers.sphere.sw1l.solver.InfoSolverSphereSW1L(only_root=False, **kargs)[source]

Bases: InfoSolverSphericalHarmo

Contain the information on the sphere.sw1l solver.

_init_root()[source]

Init. self by writting the information on the solver.

class fluidsim.solvers.sphere.sw1l.solver.SimulSphereSW1L(params)[source]

Bases: SimulSphericalHarmo

Spherical-harmonics solver for shallow water equation.

InfoSolver

alias of InfoSolverSphereSW1L

static _complete_params_with_default(params)[source]

Complete the params container (static method).

tendencies_nonlin(state_spect=None, old=None)[source]

Compute the nonlinear tendencies.

Parameters:
state_spectfluidsim.base.setofvariables.SetOfVariables

optional

Array containing the state, i.e. the vorticity, the divergence and displacement in the spectral space. If state_spect is provided, the variables in the physical space are computed from it, otherwise, they are taken from the global state of the simulation, self.state.state_phys.

These two possibilities are used during the time-stepping.

oldfluidsim.base.setofvariables.SetOfVariables

optional

Array containing the previous tendencies_sh. This array is reused to save memory and improve performance.

Returns:
tendencies_shfluidsim.base.setofvariables.SetOfVariables

An array containing the tendencies for the vorticity.

Notes

The 1-layer shallow water equations are solved in the vector-invariant form (see section 2.2.6 Vallis 2nd edition).

\[\partial_t \hat\zeta = \hat N_\zeta - \sigma(k) \hat \zeta, \partial_t \hat\delta = \hat N_\delta - \sigma(k) \hat \delta, \partial_t \hat\eta = \hat N_\eta - \sigma(k) \hat \eta,\]

This function computes the nonlinear term (“tendencies”). The algorithm is as follows,

  • Compute \(N_u\) and \(N_v\), the tendencies for the velocities.

  • Take divergence and curl of the above to obtain \(N_\zeta, N_\delta\).

  • Subtract laplacian of total energy K.E. + hydrostatic pressure from \(N_\delta\).

  • Compute \(N_\eta = -\nabla.((\eta + 1)\mathbf{u})\)

Functions

compute_Frot(rot, ux, uy, f_radial)

Compute cross-product of absolute potential vorticity with velocity.

Classes

InfoSolverSphereSW1L([only_root])

Contain the information on the sphere.sw1l solver.

Simul

alias of SimulSphereSW1L

SimulSphereSW1L(params)

Spherical-harmonics solver for shallow water equation.