# How to add perturbation to a base state in physical grid space?

For study 3D instabilities problem i.e a base state (velocity field and temperature field) and an additional perturbation.

The method must be independent of the type of instabilities considered but as an example, let's take the well known Kelvin-Helmholtz instability. The dynamical equation for the system can be defined as the Boussinesq equation $$\nabla\cdot\mathbf{u}=0$$ $$\frac{d\mathbf{u}}{dt}=-\frac{1}{\rho}\nabla p + b \mathbf{n} + \nu_\mathbf{u} \Delta \mathbf{u}$$ $$\frac{d b}{dt}= \nu_{b} \Delta b$$

Where $\mathbf{u}=(u,v,w)$ is the velocity vector, $b$ is the buoyancy proportional to the temperature, $p$ is the pressure, $\frac{d~}{dt}$ is the lagrangian derivative, $\nu_\mathbf{u}$ is the kinematic viscosity, $\nu_{b}$ is the diffusion coefficient of buoyancy, $\Delta$ is the Laplacien operator and $\nabla$ is the gradient operator. The problem is define on $[0,Lx]\times[0,Ly]\times[0,Lz]$. The problem is $Lx$ periodic. $\mathbf{u}$ and $b$ are the computational variables. We initialize the field with $$\mathbf{u}(\mathbf{x},t=0)=\mathbf{u}_B(\mathbf{x})+\mathbf{u}_P(\mathbf{x})$$ $$b(\mathbf{x},t=0)=b_B(\mathbf{x})+b_P(\mathbf{x})$$ where $\mathbf{x}=(x,y,z)$ is the spacial coordonate, $t$ is the time coordinate, the sub-script $B$ is for the base state and the sub-script $P$ is for the perturbed field.

if $z>Lz/2$ then $u_B(\mathbf{x})=\alpha_1$ else $u_B(\mathbf{x})=\alpha_2$. if $z>Lz/2$ then $u_B(\mathbf{x})=\beta_1$ else $u_B(\mathbf{x})=\beta_2$. $v_B=0$ and $w_B=0$.

Numerically we add a perturbation $(\mathbf{u}_P,b_P)$ for accelerate the developmental of the instability. We expect the perturbed field to be Gaussian and negligible in front of the base state. By negligeable let's said $||(\mathbf{u}_P,b_P)||\approx 10^{-3}||(\mathbf{u}_B,b_B)||$. The flow is discretized on a regular structured grid.

How to implement properly the perturbed field $(\mathbf{u}_P,b_P)$ in the physical grid space ?

• Can you specify the 3D instability problem that you're trying to solve (including equations)? – Paul Sep 18 '12 at 18:35
• Also, please try to be a little more clear with your language (feel free to fall back to mathematics, which is universal :) – Aron Ahmadia Sep 18 '12 at 18:58
• @Paul I'm pretty sure that the specificity of the instability have nothing to do with the answer but it's the Kelvin-Helmholtz instability. I also recall the equation for this type of instability. – ucsky Sep 18 '12 at 20:33
• @AronAhmadia I add the mathematical background for the problem considered. If my grammar and my spelling is not good please feel free to edit the question. – ucsky Sep 18 '12 at 20:35
• aberration, that's much easier to understand, thanks... – Aron Ahmadia Sep 18 '12 at 21:08

My experience in these types of problems is that almost any perturbation will do. I suggest you do not try to perturb $u$ or $p$, because generating a divergence-free $u$ with a perturbed component is more complicated than necessary. You can easily perturb $b$ with lots of different things including a small random field or a randomly-distributed set of Gaussian bubbles or small sinusoids with randomly-chosen frequencies.
Update: Here's some math that might be used as initial conditions on $u$ and $b$: $$u_P(\mathbf{x})=0 \\ b_P(\mathbf{x})=\epsilon{\rm random}(\mathbf{x})$$ where ${\rm random}(\mathbf{x})$ gives you a random number between 0 and 1 at each point in space, and $\epsilon$ is a small parameter.