Getting BEARCLAW

The gentlest way to access BEARCLAW is to use the The BEARCLAW appliance. Log in with User/Password = bearclaw/bearclaw.

Your first application

Suppose you wish to solve the two-dimensional viscid Burgers equation:

 $$q = \left[ {\begin{array}{*{20}c} u & v \end{array}} \right]^T $$

 $$\vec{q}_{t}+(\vec{q} \cdot \vec{\nabla}) \vec{q}=\alpha \nabla^2 q$$

on the unit square  $$(x,y) \in [0,1] \times [0,1]$$, with periodic boundary conditions and the initial condition

 $$q = \left[ {\begin{array}{*{20}c} 1 & 2  \end{array}} \right]^T \sin \left( {4\pi (x - y)} \right) $$

1. Create an application directory

mkdir ~/bearclaw/myapps/my1stapp
cd ~/bearclaw/myapps/my1stapp
mkdir out

2. Copy application skeleton

cp $BEARCLAW/lib/AppSkeleton/* .

3. Edit application files

You will typically edit 3 files to define an application.

problem.f90

In problem.90 you read input data, initialize your fields, define the equations you wish to solve.

bear.data

setprob.data

4. Choose your solver

5. Compile

6. Run your application with 1 level of refinement

7. Run your application with AMR

8. Generate a parallel application

9. Run the parallel application

Further steps

In the above we used the Lax-Wendroff scheme for the hyperbolic part of the equation. Since sharp fronts can form, dispersive errors (overshoots near the sharp fronts) appear if the grid resolution is not fine enough to resolve the front (the difficulty is even more pronounced for the inviscid Burgers equation where shocks form and dispersive errors appear irrespective of the grid resolution).

Let's switch to a scheme better suited to shock-capturing, LeVeque's wave propagation scheme.

BEARCLAW: A gentle tutorial (last edited 2007-10-14 21:11:20 by cpe-069-134-124-228)