^{1}

^{*}

^{1}

^{1}

In this paper, we propose a combination of discrete elements for the soil and finite elements for the fluid flow field inside the pore space to simulate the triggering of landslides. We give the details for the implementation of third order finite elements (“P
_{2} with bubble”) together with polygonal discrete elements, which allows the formulation with a minimal number of degrees of freedom to save computer time and memory. We verify the implementation with several standard problems from computational fluid dynamics, as well as the decay of a granular step in a fluid as test case for complex flow.

Landslides due to strong rain occur in rather confined areas, while the regions with the same soil and rain conditions are much larger. This means there must be additional triggers. But on the micromechanical level, the mechanisms on the grain scale, the flow inside the pore space and its restructuring are not yet understood. Sano [

As far as the choice between Eulerian (grid-based) and Lagrangian (particle-based) representations is concerned, for the micromechanical understanding of landslides, we chose a particle-based formulation for the soil, and finite elements for the fluid. A list of all symbols with explanations is given in

For the discrete element method (DEM), often round particles are used, which cannot form heaps (see

We refrain from simulating the fluid with a particles-based method, because there are problems with the spatial resolution and shot noise would be introduced even in equilibrium flow. For the complicated pore space between polygonal particles, exact discretization is possible via a trigonal grid, so finite elements are the natural

Variable | Description | Variable | Description |
---|---|---|---|

A | centroid of DEM particle contact overlap area | r e s i ( … ) | residual at mesh node i, (p) for pressure, (u), (v) for respective velocities |

A , ⋯ , J | nodes of a finite element (index) | ||

A e | area of a finite element | S | centroid of DEM particle contact overlap area A |

a g | gravitational acceleration | T | transpose operator |

b | distance from circle center to wall | t | time |

C 1 , C 2 | DEM particle center of mass | t ^ | tangential direction unit vector |

d | diameter | U | velocity vector |

dl | line integral | U 0 | maximum inflow velocity |

e | finite element (index) | u | horizontal velocity |

e n t r y … | entries for the Jacobian J | u B C , v B C , u B C T O P , v B C T O P | velocity boundary conditions |

F d a | DEM damping force | ||

F d r a g | fluid force acting on DEM particles | v | vertical velocity |

x | horizontal position | ||

F e l | DEM elastic force | Y | Young’s modulus |

g A ( … ) , ⋯ , g J ( … ) | coefficients for the element functions, (p) for pressure, (u), (v) for respective velocities | y | vertical position |

Γ | DEM particle boundary | ||

g i ( … ) , g j ( … ) | coefficient for the element function at node i or j, (p) for pressure, (u), (v) for respective velocities | Δ g | step vector for one Newton-Raphson iteration |

Δ A | change of A over τ | ||

g , g ι , g ι − 1 | solution vector (entirety of all g i ( … ) , g j ( … ) ), for current ι or next ι + 1 Newton-Raphson iteration | δ ε ζ | Kronecker delta |

ε , ζ | Cartesian direction (index) | ||

i , j | mesh node (index), indexing variables | η | dynamic viscosity |

θ A , ⋯ , θ J | third order FEM shape functions | ||

J | Jacobian of the Newton-Raphson, method | ι | Newton-Raphson iteration step (index) |

k | aspect ratio r/b | λ | wall correction factor |

L … | coefficients of the barycentric coordinate functions | μ | friction coefficient |

l c h a r | characteristic length for DEM particle contact | ν | kinematic viscosity |

l 1 , l 2 | vector S C … | ρ | density |

m 1 , m 2 | DEM particle mass | ρ F , η F | fluid properties (density. dynamic viscosity) |

m r e d | DEM particle contact reduced mass | ρ P , d P | particle properties (density, diameter) |

n ^ | normal direction unit vector | τ | timestep length |

n − X | value from X timesteps before (index) | ϕ A , ⋯ , ϕ F | second order FEM shape functions |

P … | polynomial order of a finite element | ϕ i , ϕ j | second order (or bubble) FEM shape function at node i or j |

p | normalized pressure | ϕ P 2 + | second order finite element function with third order bubble |

p a c t u a l | pressure | ψ A , ⋯ , ψ C | first order FEM shape functions |

q | quadrature point (index) | ψ i , ψ j | first order FEM shape function at node i or j |

r | radius | ψ P 1 | first order finite element function |

r e s | residual vector for the Newton-Raphson method | ω q | quadrature weight of q |

ω T | trial function |

choice for modeling the fluid (Quadrilateral elements would have to be distorted so they offer no advantages in this case). The arbitrary connections of the pore space also require the use of unstructured grids (arbitrary connectivity between elements), though in practice we will generate the grid in the pore space with a constrained Delaunay triangulation, so the connections are limited. Desirable is a formulation with the minimum necessary degrees of freedom, as it is not possible to multiply lattice points near particle boundaries, which would also multiply the computational effort and the memory requirements. Other aspects of the simulation can also be determined as an optimal choice of minimal computational cost, geometrical convenience and the implementation of the actual physical situation.

The particles in the discrete element method (DEM) interact via a “hard-particle, soft-contact” interaction (see

F e l = Y ⋅ A l c h a r , (1)

with the characteristic length l c h a r = 4 | l 1 | | l 2 | / ( | l 1 | + | l 2 | ) from the vectors l 1 , l 2 connecting the particles’ centers of mass C 1 , C 2 with S. This choice of the characteristic length l c h a r normalizes the sound velocity of a space-filling rectangular packing to the continuum sound velocity with the same Young’s modulus

and density. The damping force is chosen in analogy to the linear oscillator

F d a = m r e d ⋅ Y ⋅ Δ A τ ⋅ 1 l c h a r (2)

proportional to Δ A , the area change for an integration timestep τ , with the reduced mass of the colliding particles m r e d = m 1 m 2 / ( m 1 + m 2 ) . Additionally, there is a cutoff so that | F d a | < | F e l | . The solid friction is computed according to Krengel and Matuttis [

An unstructured triangular grid for the fluid simulation still leaves choices for the actual finite elements used. Gresho and Sani [_{2}P_{1}) with second order shape functions P_{2} for the velocities and first order shape functions P_{1} for the pressures had been used in previous simulations [

in two dimensions by a factor of 16 (or 25), which means an increase of the computational effort by over one order of magnitude, which is prohibitive. For all of these reasons, in this work, we will be exploring the possibilities of the P_{2}^{+}P_{1} element, which adds a third order bubble to the second order shape functions (_{3} element, while still being LBB stable [_{3} looks attractive in theory, for our purposes it has no advantages over the P 2 + element, as we are mostly concerned adapting to the curvature of the flow field. On the contrary, having to deal with 10 instead of 7 nodes per element would increase the computational effort and memory consumption by over 40 percent without leading to foreseeable advantages.

The shape functions are handled in a barycentric coordinate system (local to each element) and must be derived from the Cartesian coordinates of the elements in the grid. Treating every single element separately, we apply a coordinate transformation to the Cartesian coordinates [ x 1 , y 1 ] [ x 2 , y 2 ] [ x 3 , y 3 ] of the corners of the triangular element to get the coefficients of its barycentric coordinate functions. This works easiest via left division (MATLAB’s backslash-operator)

[ L A 0 L B 0 L C 0 L A x L B x L C x L A y L B y L C y ] = [ 1 x 1 y 1 1 x 2 y 2 1 x 3 y 3 ] \ [ 1 0 0 0 1 0 0 0 1 ] , (3)

with the resulting coordinate functions also acting as the first order (affine) shape functions ψ … so that we have

ψ A = L A 0 + L A x ⋅ x + L A y ⋅ y ψ B = L B 0 + L B x ⋅ x + L B y ⋅ y ψ C = L C 0 + L C x ⋅ x + L C y ⋅ y (4)

forming the basis of the first order (P_{1}) finite element. Combined with scaling coefficients g A ( p ) , ⋯ , g C ( p ) , they act as the element function

ψ P 1 = g A ( p ) ψ A + g B ( p ) ψ B + g C ( p ) ψ C , (5)

which represents the pressure p field over our element. Combinations of the affine shape functions ψ … from Equation (4) form the second order (quadratic) shape functions ϕ … . There are six in total with

ϕ A = 2 ⋅ ψ A 2 − ψ A , (6)

ϕ D = 4 ⋅ ψ B ⋅ ψ C

and their respective permutations, forming the basis of the P_{2} finite element. To obtain the P 2 + element, we expand the P_{2} basis with the product of all ψ … from Equation (4)

θ J = 27 ⋅ ψ A ⋅ ψ B ⋅ ψ C , (7)

the third order (cubic) bubble shape function θ J . θ J in combination with all the ϕ … functions from Equation(6) and the coefficients g A ( u ) , ⋯ , g F ( u ) , g J ( u ) , acts as the element function

ϕ P 2 + ( u ) = g A ( u ) ϕ A + g B ( u ) ϕ B + g C ( u ) ϕ C + g D ( u ) ϕ D + g E ( u ) ϕ E + g F ( u ) ϕ F + g J ( u ) θ J . (8)

To treat velocity, a vector quantity, as scalar values, we are splitting it into its Cartesian components, horizontal velocity u and vertical velocity v. Accordingly, Equation (8) represents only the horizontal velocity field and an analogous equation ϕ P 2 + ( v ) for the vertical velocity field exists as well. In other words, a shape function can be seen as some sort of unit vector for the field amplitude at its associated node on a single finite element.

The coefficients g … ( u , v , p ) from Equations (5) and (8) scale the individual shape functions of an element in a way that allows the full element function ϕ P 2 + ( u ) , ϕ P 2 + ( v ) or ψ P 1 respectively to approximate the actual flow behaviour as closely as possible. The entirety of all g … ( u , v , p ) is the unknown (solution vector) we need to solve our flow equations for. To calculate the flow velocities u and v we use the incompressible stationary Navier-Stokes equation for x and y directions

u d u d x + v d u d y = − d p d x + ν ( d 2 u d x 2 + d 2 u d y 2 ) (9)

and

u d v d x + v d v d y = − d p d y + ν ( d 2 v d x 2 + d 2 v d y 2 ) + a g . (10)

With the kinematic viscosity ν = η / ρ and the normalised pressure p = p a c t u a l / ρ obtained by normalizing the dynamic viscosity η and the actual pressure p a c t u a l with the density ρ . While rock has a sound velocity which is a multiple of that of water, the sound has to travel through the contacts between sand grains so there is much less material than in bulk rock. Thus, the sound velocity of the granular phase is considerably below that of the fluid and the fluid can therefore be treated as incompressible. The gravitational acceleration a g is also an essential term in the vertical (y direction) Navier-Stokes equation, as the fluid simulation will later run with suspended particles, it is a g which actually leads to the buoyancy force of the fluid acting on the particles. The pressure is calculated from the continuity equation

d u d x + d v d y = 0 . (11)

Equations (9)-(11) can now be adapted into their weak form by introducing the arbitrary trial function ω T [

∬ [ d u d x d ω T d x + d u d y d ω T d y + 1 ν ( u d u d x + v d u d y + d p d x ) ω T ] = 0 (12)

for the horizontal velocity,

∬ [ d v d x d ω T d x + d v d y d ω T d y + 1 ν ( u d v d x + v d v d y + d p d y ) ω T + 1 ν a g ⋅ ω T ] = 0 (13)

for the vertical velocity and

∬ [ ( d u d x + d v d y ) ω T ] = 0 (14)

for the pressure. Instead of enforcing a spurious “=0” in the Equations (12)-(14), it is much more meaningful in a numerical implementation (i.e. with rounding and discretization errors) to demand that the right-hand side (the “residual” res) may be finite, but should be as small as possible. This transforms the problem from an equality problem (which may be unsolvable) to a much more manageable optimization problem. Then we rewrite the continuum field equations into systems of coupled discrete equations at each node i and expand the trial function ω T in terms of test functions with unknown prefactors. Moreover, in the Galerkin-FEM method, as test functions the shape functions ϕ i from Equations (6) and (7) are used for velocity. This means ϕ i can take the form of any of the six second order shape functions ϕ A , ⋯ , ϕ F or of the third order bubble function θ J depending on the position of node i in the triangle. In the same way the shape functions ψ i from Equation (4) are used as test functions for the pressure.

As a rule, a shape function only exists on a single element and is associated to only one node of that element. As a node is usually connected to multiple elements, the combination of all associated shape functions (one for each connected element) is the basis function (in the one-dimensional case this would e.g. be the infamous hat-function) [

For the Galerkin method, the same family of functions is used for the basis functions as well as for the test functions. As our further calculations are performed element wise, we can instead use the single shape functions ϕ i and ψ i and obtain the identical results for the summation of the residuals on each node.

Finally, to approximate the flow field and minimize the residual, an unknown prefactor precedes each test function. When discretizing Equations (12)-(14) for all nodes i, these coefficients must be determined, as they hold the information about the flow state at each individual node. In fact, these are the coefficients g i ( … ) from Equations (5) and (8), where (…) stands for the flow variables (u), (v) and (p) at every node i. This results in ω T = g i ( u ) ⋅ ϕ i respectively ω T = g i ( v ) ⋅ ϕ i in Equations (12) and (13) and ω T = g i ( p ) ⋅ ψ i in Equation (14) [

As the computational effort for the exact spatial quadrature of Equations (12 - 14) is prohibitive, we resort to approximation via Gauss quadrature. From the many possible approaches, we opted for the six-point quadrature formula by Gockenbach [

r e s i ( u ) = ∑ e , q A e ⋅ ω q [ d u d x | q ( e ) d ( g i ( u ) ⋅ ϕ i ( q ( e ) ) ) d x + d u d y | q ( e ) d ( g i ( u ) ⋅ ϕ i ( q ( e ) ) ) d y + 1 ν ( u ( q ( e ) ) d u d x | q ( e ) + v ( q ( e ) ) d u d y | q ( e ) + d p d x | q ( e ) ) ( g i ( u ) ⋅ ϕ i ( q ( e ) ) ) ] (15)

for the horizontal velocity on that node. The notation | q ( e ) indicates that a given derivative is to be evaluated on the position of the current quadrature point q on the current element e. Time evolution is performed via the backward-difference formula of second order (BDF2) formulation provided by Gear [

+ 1 ν ( ( 1 + 2 τ τ n − 1 1 + τ τ n − 1 ) u ( q ( e ) ) − ( 1 + τ τ n − 1 ) u n − 1 ( q ( e ) ) + ( τ τ n − 1 ) 2 1 + τ τ n − 1 u n − 2 ( q ( e ) ) ) ⋅ τ n − 1 τ ( g i ( u ) ⋅ ϕ i ( q ( e ) ) ) (16)

is added in the sum of Equation(15). The length of the current timestep is denoted by τ , the index n − X indicates values from previous timesteps. There are certain considerations for the use of the BDF2-solver: While it is A-stable (stiffly stable), so that it can ignore spurious fluctuations from timestep to timestep (which is an advantage with permanently changing grid geometries), it is also L-stable, which means that it will not damp out instabilities in the flow. This means that BDF2 is not expected to (and, in our experience, does indeed not) delay or suppress the development of vortices in e.g. the flow behind fixed bluff bodies when the flow speed is increased from Stokes flow to Reynolds numbers beyond 10.

The residual of the vertical velocity is calculated analogously to Equations (15) and (16), however the gravity term

+ 1 ν ⋅ a g ⋅ g i ( v ) ⋅ ϕ i ( q ( e ) ) (17)

must be added inside the summation. The pressure residual obtained from Equation (14) is accordingly

r e s i ( p ) = ∑ e , q A e ⋅ ω q [ ( d u d x | q ( e ) + d v d y | q ( e ) ) ( g i ( p ) ⋅ ψ i ( q ( e ) ) ) ] . (18)

In our incompressible Navier-Stokes equation, the pressures act as constraint forces for the constraint of incompressibility. In our choice of FEM, the pressures are realized as Lagrange parameters for the BDF2 formulation [

Within a single timestep, Newton-Raphson iteration is used to minimize the residuals. Deriving the residual Equations (15)-(18) for each flow variable gives us the entries for the Jacobian of the Newton-Raphson method [

Using the Jacobian and the residual vector r e s containing the residuals of all flow states at all nodes, the Newton-Raphson step vector Δ g for all of these flow states can be calculated as

Δ g = J \ r e s . (19)

By applying the Newton-Raphson step to the solution vector g

g ι + 1 = g ι − Δ g , (20)

we complete a full Newton-Raphson iteration ι . Depending on the size of the residual, we now continue with another iteration or advance to the next timestep.

As our simulations feature moving granular particles, the geometry will also vary over time. The mesh has to change slightly with every timestep to accommodate the position change of the particles and requires interpolation of the old flow values onto the nodes of the new mesh. Details regarding interpolation of a finite element containing a bubble function are described by Mueller et al. [

The simplifying step from three-dimensional to two-dimensional particles means that the DEM-particles are effectively rods in three dimensions. When we assume that these rods would have a rough surface as shown in

To compute the particle-flow interactions based on hydrodynamic principles, we have to apply no-slip boundary conditions at the particle surfaces. Other approaches, such as immersed boundary conditions [

F d r a g = ∫ Γ { − p δ ε ζ + η ( ( ∇ U ) + ( ∇ U ) T ) } ⋅ n ^ d l , (21)

where the values for the normalized pressure p and velocity vector U are evaluated on the particle boundary Γ from the values computed with the FEM. Further δ ε ζ is the Kronecker delta function dependent on the Cartesian directions ε and ζ , n ^ is the normal to Γ and T is the transpose operator.

The time evolution via the BDF2 predictor-corrector during a single timestep is the following: At the beginning of a new timestep, the new positions (which determine the new particle outlines and therefore the boundaries of the fluid) are computed in the predictor. The grid is then deformed according to the new particle positions and the flow velocities are interpolated onto the new grid. The possibility of interpolating from one timestep to the next with slightly changing meshes is owed to the stability of the (implicit) BDF integrator: For explicit integrators, the size of the timestep would probably have to be reduced considerably. The reaction forces from the fluid are computed from the configuration obtained from the predictor and the velocities (of the particles and the fluid) at the end of the timestep are determined with the corrector.

To verify the physical accuracy of our simulation code, especially in regard to fluid-solid interaction, we selected three test scenarios. These allow us to confirm that our code is not only providing the accuracy which is expected in the field of computational fluid dynamics, but also that it is capable of handling the specific demands posed by the simulation of granular media and that the continuous change of the mesh does not affect the stability or accuracy.

We recreated the simulation geometry from Richou et al. [

R e = ρ F ⋅ r ⋅ U 0 η F (22)

with fluid density ρ F , dynamic viscosity η F and maximum inflow velocity U 0 and the aspect ratio

k = r / b (23)

between cylinder size and wall distance b, which both depend heavily on the cylinder radius r. As can be seen in

We have simulated all cases at two different mesh resolutions, first with a thin layer ( 0.1 ⋅ r max ) of mesh elements around the particle and second with mesh elements of roughly the particle edge length (see

λ | Orientation | r | b [mm] | U_{0} [mm/s] | Mesh | Rel. Error [%] |
---|---|---|---|---|---|---|

10.094 10.114 10.660 10.694 10.474 10.505 10.168 10.218 10.693 10.782 10.557 10.593 | corner on side on corner on side on corner on side on corner on side on corner on side on corner on side on | r_{max} r_{max} r_{min} r_{min} r_{equi} r_{equi} r_{max} r_{max} r_{min} r_{min} r_{equi} r_{equi} | 120.000 120.000 115.911 115.911 117.265 117.265 120.000 120.000 115.911 115.911 117.265 117.265 | 6.667 6.667 6.902 6.902 6.822 6.822 6.667 6.667 6.902 6.902 6.822 6.822 | fine fine fine fine fine fine coarse coarse coarse coarse coarse coarse | 5.22 5.03 0.09 0.41 1.66 1.36 4.53 4.06 0.40 0.73 0.87 0.53 |

often is ≥100 elements [

For further verification, we recreated the simulation geometry from Kawahara [

Our results for flow field and pressure distribution shown in _{2}b-P_{1} (different notation to P 2 + P 1 ) to the point, where they are virtually indistinguishable. This is an indicator that our simulation code is not only qualitatively correct, but also quantitatively reliable and able produce results which are expected in the field of computational fluid dynamics.

To prove the capabilities of our simulation code concerning the challenges posed by granular media immersed in fluids, we created a simulation of a collapsing granular step inspired by the experiments performed by Rondon et al. [

As seen in

issue, while the mesh size in the vicinity of the particles is for the most part roughly the same as the particle edge size (≈1.5 mm). To avoid additional computational effort and unnecessary degrees of freedom, the mesh is coarsened in the region without particles as seen in

The particles in our current simulation are still about one order of magnitude bigger than the ones used by Rondon et al., which means we are dealing with a simpler geometry. However this is ideal as a test scenario without sacrificing realism. Now that our simulation code has proven its capabilities the next step is to gradually reduce the particle size (thereby increasing the particle count) to create create a physically meaningful two-dimensional equivalent of the experiments by Rondon et al. and investigate the effect of the packing density on the decay process and the geometry of the end configuration (similar to the simulations by Ng [

We have presented a simulation of DEM-particles in Fluids where the particles are coupled to the fluid with the full physical interaction (no slip) from computational fluid dynamics. The accuracy of the time evolution was verified via the wall correction factor. For the parameter range under investigation, no instabilities develop, even when mesh elements bordering the particles are about 1/7^{th} of the particle size. This is a result of the added third order bubble, which stabilizes the simulation for coarser meshes while at the same time guaranteeing a smoother velocity field even with large elements. As a result, less degrees of freedom

are needed than those necessary for lower order elements, and the stability is improved compared do P_{2}P_{1}-elements [

Neither the accuracy nor the stability is negatively affected by the movement of the particles or the resulting subtle distortions of the mesh in every timestep; the particles come to a physical rest with a physical angle of repose and without any residual noise amplitude. With the current code, we can now move towards larger system sizes.

There remain some “do’s and don’ts” concerning the combination of remeshing, graded mesh and finite elements with bubble functions but a discussion of this would lead too far here and will be addressed in a further publication.

The authors declare no conflicts of interest regarding the publication of this paper.

Mueller, J., Kyotani, A. and Matuttis, H.-G. (2020) Towards a Micromechanical Understanding of Landslides—Aiming at a Combination of Finite and Discrete Elements with Minimal Number of Degrees of Freedom. Journal of Applied Mathematics and Physics, 8, 1779-1798. https://doi.org/10.4236/jamp.2020.89134

On each node i of every P 2 + P 1 finite element e, the flow Equations (15)-(18) are derived by every flow state u j , v j = g j ( u , v ) ⋅ ϕ j or p j = g j ( p ) ⋅ ψ j at every node j of the same element [

Horizontal velocity (Equation (15)) derived by horizontal velocity u

e n t r y u ( j ) , u ( i ) = ∑ q A e ⋅ ω q [ d ( g j ( u ) ⋅ ϕ j ( q ) ) d x ⋅ d ( g i ( u ) ⋅ ϕ i ( q ) ) d x + d ( g j ( u ) ⋅ ϕ j ( q ) ) d y d ( g i ( u ) ⋅ ϕ i ( q ) ) d y + 1 ν ( g j ( u ) ⋅ ϕ j ( q ) ⋅ d u d x | q + u ( q ) d ( g j ( u ) ⋅ ϕ j ( q ) ) d x + v ( q ) d ( g j ( u ) ⋅ ϕ j ( q ) ) d y ) ( g i ( u ) ⋅ ϕ i ( q ) ) ] (A1)

derived by vertical velocity v

e n t r y v ( j ) , u ( i ) = ∑ q A e ⋅ ω q ( 1 ν ⋅ g j ( v ) ⋅ ϕ j ( q ) ⋅ d u d y | q ⋅ g i ( u ) ⋅ ϕ i ( q ) ) (A2)

and derived by pressure p

e n t r y p ( j ) , u ( i ) = ∑ q A e ⋅ ω q ( 1 ν d ( g j ( p ) ⋅ ψ j ( q ) ) d x ⋅ g i ( u ) ⋅ ϕ i ( q ) ) . (A3)

Vertical velocity (vertical analogous to Equation (15)) derived by horizontal velocity u

e n t r y u ( j ) , v ( i ) = ∑ q A e ⋅ ω q ( 1 ν ⋅ g j ( u ) ⋅ ϕ j ( q ) ⋅ d u d x | q ⋅ g i ( v ) ⋅ ϕ i ( q ) ) , (A4)

derived by vertical velocity v

e n t r y v ( j ) , v ( i ) = ∑ q A e ⋅ ω q [ d ( g j ( v ) ⋅ ϕ j ( q ) ) d x ⋅ d ( g i ( v ) ⋅ ϕ i ( q ) ) d x + d ( g j ( v ) ⋅ ϕ j ( q ) ) d y ⋅ d ( g i ( v ) ⋅ ϕ i ( q ) ) d y + 1 ν ( g j ( v ) ⋅ ϕ j ( q ) ⋅ d v d y | q + u ( q ) d ( g j ( v ) ⋅ ϕ j ( q ) ) d x + v ( q ) d ( g j ( v ) ⋅ ϕ j ( q ) ) d y ) ( g i ( v ) ⋅ ϕ i ( q ) ) ] (A5)

and derived by pressure p

e n t r y p ( j ) , v ( i ) = ∑ q A e ⋅ ω q ( 1 ν d ( g j ( p ) ⋅ ψ j ( q ) ) d y ⋅ g i ( v ) ⋅ ϕ i ( q ) ) . (A6)

Note that the gravity term of Equation (17) vanishes as it is not dependent on any flow state. Pressure (Equation (18)) derived by horizontal velocity u

e n t r y u ( j ) , p ( i ) = ∑ q A e ⋅ ω q ( d ( g j ( u ) ⋅ ϕ j ( q ) ) d x ⋅ g i ( p ) ⋅ ψ i ( q ) ) (A7)

and derived by vertical velocity v

e n t r y v ( j ) , p ( i ) = ∑ q A e ⋅ ω q ( d ( g j ( v ) ⋅ ϕ j ( q ) ) d y ⋅ g i ( p ) ⋅ ψ i ( q ) ) . (A8)

Equation (18) does not have any pressure dependencies of its own, so it vanishes when derived by pressure p. Note that any of the above equations involving pressure is only evaluated for nodes i , j which are part of the P_{1} element.

Time evolution via BDF2 again requires an additional term which is Equation (16) derived by u for Equation (A1) or the vertical analogous of Equation (16) derived by v for Equation (A5)

+ 1 ν ( ( 1 + 2 τ τ n − 1 τ ⋅ ( 1 + τ τ n − 1 ) ) g j ⋅ ϕ j ( q ) ) g i ⋅ ϕ j ( q ) . (A9)

As the BDF2 formulation is only dependent on u or v respectively, the component vanishes for all other derivatives.