José Abell's research blog

Finite Elements for Shallow Water Equations

The linear shallow water equations (SWE) are used extensively to model propagation of waves in situations where lateral domain dimensions are much greater than fluid height and, at the same time, wave perturbation height are much smaller than the fluid height. This finds useful applications in the case of tsunami-wave propagation modeling in deep-sea. The equations, after heavy linearization, are given by:

$$\begin{aligned} \pardiff{u}{t} - f v = -g \pardiff{h}{x} \\ \pardiff{v}{t} + f v = -g \pardiff{h}{y} \\ \pardiff{h}{t} = -H \pare{ \pardiff{u}{x} + \pardiff{v}{y} }\end{aligned}$$


  • \(u\) is the speed …

Visualizing ESSI output with VisIt-ESSI

VisIt-ESSI is a plugin for the VisIt post-processor created my CompGeoMech. It allows for remote (soon parallel also) visualization of outputs produced by ESSI in the HDF5 format (*.h5.feioutput).

VisIt can be obtained here, and the plugin here.

NTS-02. On Rayleigh damping coefficients for FE analysis

Note to self. How to compute Rayleigh damping coefficients for given damping ratios $\xi_1$ and $\xi_2$ at frequencies $f_1$ and $f_2$.

This is textbook content, I just need to remind myself too often how this is done and end up re-deriving the equations.

Given the second-order system of differential equations representing the FE model

$$ M \ddot{u} + C \dot{u} + K u = F(t) $$

The damping matrix $C$ can be written as a Rayleigh damping matrix:

$$ C = a_0 M + a_1 K $$

$a_0$ and $a_1$ are Rayleigh damping coefficients found by solving

$$ \left[ \begin{array}{cc} \dfrac{1}{2\pi f_1} & 2 \pi f_1 \ \dfrac{1}{2\pi f_2} & 2 \pi f_2 \end{array} \right] \left[ \begin{array}{c} a_0 \ a_1 \end{array}

NTS (Note-To-Self): Creating dynamically linked libraries

A nice extensive tutorial can be found here.

In a nutshell:

gcc -Wall -fPIC -c \*.c  
gcc -shared -Wl,-soname, -o \*.o  
mv /opt/lib  
ln -sf /opt/lib/ /opt/lib/  
ln -sf /opt/lib/ /opt/lib/
  • -Wall: include warnings. See man page for warnings specified.
  • -fPIC: Compiler directive to output position independent code, a characteristic required by shared libraries. Also see “-fpic”.
  • -shared: Produce a shared object which can then be linked with other objects …