Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
coriolis.h File Reference

Go to the source code of this file.

Macros

#define K0()   0.
 
#define F0()   0.
 
#define alpha_H   1.
 

Functions

void event_acceleration (void)
 Event: acceleration (i++)
 
coord geostrophic_velocity (Point point)
 

Macro Definition Documentation

◆ alpha_H

#define alpha_H   1.

Definition at line 46 of file coriolis.h.

◆ F0

#define F0 ( )    0.

Definition at line 43 of file coriolis.h.

◆ K0

#define K0 ( )    0.

Coriolis/friction terms for the multilayer solver

This approximates

\[ \partial_t\mathbf{u} = \mathbf{B}\mathbf{u} + \mathbf{a} \]

with

\[ \mathbf{B} = \left( \begin{array}{cc} - K_0 & F_0\\ - F_0 & - K_0 \end{array} \right), \]

and \(K_0\) and \(F_0\) the linear friction and Coriolis parameters respectively. The time-implicit discretisation of these terms can be written

\[ \frac{\mathbf{u}^{n + 1} -\mathbf{u}^n}{\Delta t} = \mathbf{B} [(1 - \alpha_H) \mathbf{u}^n + \alpha_H \mathbf{u}^{n + 1}] + \mathbf{a}^n \]

This then gives

\[ \mathbf{u}^{n + 1} (\mathbf{I}- \alpha_H \Delta t\mathbf{B}) = \mathbf{u}^n + (1 - \alpha_H) \Delta t\mathbf{B}\mathbf{u}^n + \Delta t\mathbf{a}^n \]

The local \(2 \times 2\) linear system is easily inverted analytically. The final value is obtained by substracting the acceleration i.e.

\[ \mathbf{u}^{\star} = \mathbf{u}^{n + 1} - \Delta t\mathbf{a}^n \]

The K0() and/or F0() macros should be defined before including the file.

Definition at line 40 of file coriolis.h.

Function Documentation

◆ event_acceleration()

void event_acceleration ( void  )

Event: acceleration (i++)

Definition at line 50 of file coriolis.h.

References _i, a, alpha_H, b1, dimension, dry, dt, F0, foreach_layer, h, ha, hf, K0, u, vector::x, x, coord::x, and coord::y.

◆ geostrophic_velocity()

coord geostrophic_velocity ( Point  point)

Geostrophic velocity

Definition at line 74 of file coriolis.h.

References a, dimension, dry, eta, F0, G, gmetric, h, x, and vector::y.