# Taylor-Green vortex sheet, reduced units

The Taylor-Green vortex sheet is a solution to the 2D Navier-Stokes equations for an incompressible Newtonian fluid:

$\frac{d \mathbf{u}}{d t}= \nu \nabla^2 \mathbf{u} - \nabla p/\rho ,$

where $\mathbf{u}$ is the velocity field, $p$ is the pressure, $\nu=\mu/\rho$ is the kinematic viscosity, and $\rho$ is the fixed density of the fluid. The time derivative is a total derivative:

$\frac{d \mathbf{u}}{d t} = \frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \cdot \nabla) \mathbf{u}$

It is common to choose parameters that simplify the equations, but that can obscure the role of the different parameters. In the following, I provide expressions with all relevant parameters included, with their physical dimensions. I later pass to dimensionless, or reduced, units, in terms of the Reynolds and Courant numbers.

# Taylor-Green vortex sheet in OpenFOAM

For the time being, this is just a stub to upload stuff for a discussion in CFD-online!

# Sound waves with attenuation

Just a simple derivation of the role of attenuation in the standard sound wave equation. Original work: Stokes, 1845.

Starting with the Navier-Stokes momentum equation

$\frac{\partial }{\partial t} \mathbf{u} + \mathbf{u} \nabla \mathbf{u} = - \frac{1}{\rho} \nabla p + \frac{\mu}{\rho} \nabla^2 \mathbf{u} + \left(\frac{\lambda+\mu}{\rho}\right)\nabla (\nabla\cdot\mathbf{u}) ,$

where $\lambda$ is a Lamé viscosity coefficient. The bulk viscosity coeficient  is defined as $\zeta = \lambda + (2/3) \mu$. The last term  is often neglected, even in compressible flow, but sound attenuation is one of the few cases where it may have some influence. All viscosities are assumed to be constant, but in this case this is a safe assumption, since we are going to assume small departures about equilibrium values.

# Sparse Poisson problem in eigen

Back to scientific computing. Lately, I have been using the Eigen libraries for linear algebra. They were recommended by the CGAL project, and they indeed share a common philosophy. Thanks to the rather high C++ level they can accomplish this sort of magic:


int n = 100;
VectorXd x(n), b(n);
SpMat A(n,n);

fill_A(A);

fill_b(b);

// solve Ax = b
Eigen::BiCGSTAB<SpMat> solver;