# arb multiphysics finite volume solver

## What is arb?

arb is a software package designed to solve arbitrary partial differential equations on unstructured meshes using an implicit finite volume method. The primary strengths of arb are:

• All equations and variables are defined using 'maths-type' expressions written by the user, and hence can be easily tailored to each application;
• All equations are solved simultaneously using a Newton-Raphson method, so implicitly discretised equations can be solved efficiently; and
• The unstructured mesh over which the equations are solved can be componsed of all sorts of convex polygons/polyhedrons. One, two and three dimensional domains can be used (simultaneously).

arb is open-source software that is released under the GNU General Public Licence (GPL). arb was created by Dalton Harvie, but is now a collaborative project.

Above: Diffusion within a rectangle that contains an elliptical hole.

## Some examples

### A diffusion problem:

The image (right) shows the solution to the following diffusion problem solved over a 2D domain:

This set of equations is represented by the following in arb:

CELL_UNKNOWN <T> [K] "1.d0" ON <allcells>
CELL_EQUATION <T transport>
FACE_EQUATION <T hole>
FACE_EQUATION <T walls> "<T>-1.0d0" ON <walls>

Four main variables are defined in this example: the unknown temperature field (with optional units Kelvin), and three equation variables. Each variable is associated with a region. The temperature (<T>) is defined over all cells (<allcells>), while the equations are specific to either all of the domain cells (<domain>) or as boundary conditions on particular boundary (face) regions (<hole> and <walls>). The equations are satisfied when the equation variable values are zero: Within arb the Newton-Raphson method is used to change the unknown variable values until this is achieved. Hence the core constraint in an arb simulation is that the total number of unknown variable values equals the total number of equation values. In this particular example this is satisfied as the number of elements within the <allcells> region equals the sum of elements within the <domain>, <hole> and <walls> regions.

Other variable types include DERIVED, CONSTANT, TRANSIENT, NEWTIENT, LOCAL, OUTPUT and CONDITION. Other variable centrings are NODE and NONE. Variables can also be identified as a component of a vector (eg <u[l=1]>) or tensor (eg <tau[l=2,3]>). They can also associated with a particular relative timestep for transient simulations (eg <t[r=1]> representing the time at the previous timestep).

Operators are used to express equations using the finite volume method: For example, celldiv performs a divergence around a cell element while facegrad calculates the gradient of a quantity relative to a face element. Other operators allow sums to be performed over regions (eg cellsum), linking between different regions and computational domains (eg facetocelllink) and conditional statements (eg nodeif). Some elementary vector algebra is also implemented (eg dot and double dot products).

This problem is included with the arb distribution as tutorial 1. You can browse the arb input file here. Note that anything following a '#' symbol is a comment.

### Steady-state flow around a cylinder:

The two-dimensional flow around a cylinder is a CFD benchmark test problem. Here the Reynolds number based on the cylinder diameter and maximum velocity is 20, producing steady-state results.
Above: The steady-state flow around a cylinder at Re=20. The cell-centred pressure field, cell-centred velocity vectors (superimposed on the pressure field) and face-centred stress (Von-Mises) are shown.

This problem is also included with the arb distribution as tutorial 3. You can browse the arb input file here.

### Other problems:

Many more example problems are included as input and geometry files with the arb distribution. Browsing these is at present the best way to learn the syntax and understand the capabilities of arb. Examples include transient problems, multi-dimensional (0D-3D) problems, systems of ODEs (eg, multi-component chemical equations) and multiphase (eg, Volume of Fluid) flows. You can find these files here.

## What is needed to run arb?

In terms of coding content arb consists mainly of fortran (2003), perl and shell scripts. arb requires a UNIX type environment to run, and is maintained on both the Apple OsX and ubuntu linux platforms (although we also run it under Red Hat linux).

arb depends on certain third party programs and libraries, including:

By combining gfortran with the UMFPACK sparse linear solver, arb can be run using freely available GPL licensed software.

## Try it out

Getting up and running is relatively straightforward, and primarily consists of installing the software and packages on which arb depends.

On recent versions of ubuntu (tested on LTS 10.04, 12.04, 14.04 and 16.04) you can run the following ubuntu install script which will use apt-get to install the required packages. This doesn't take long.

Installation on OsX is similarly straightforward, being based on macports (which needs to be installed first). However, macports generally compiles software, so it will take some time to install all the dependencies from scratch (maybe an hour?). The install script for OsX is the macports install script.

Once these dependencies are installed the following commands will download an arb working directory, run a test simulation and visualise the results:

tar -xf latest.tar
cd arb_*
./unpack
./arb
gmsh output/output.msh

Further details for both platforms can be found in the manual (although these instructions are currently a little out of date). If you run into problems during install, please let me know.

A tar file containing the latest master arb source is here. Older versions can be found in this directory.

## Screencasts

The following screencast deals with installing arb and running a trial simulation.

This next monster screencast covers the basics of arb use, including the working directory structure, altering mesh files and basic arb coding.

## Contribute

To actively contribute to this project, email Dalton for a username on our gitlab development server. Feel like writing some documentation? Don't hold back.

## Citing

If you use arb to conduct research, please cite it using the publication (Dalton J.E. Harvie, ANZIAM J. 52, 2012) given below. I am keen to hear of your experiences using arb and also of any feature requests that you have and bugs that you find - drop me an email with 'arb' in the subject line.

## Where is arb going?

arb is under active development, although updates to this website have sometimes not occurred regularly. Previously the major focus was on developing the language feature set - application of arb to different types of problems (in particular multiphase and non-Newtonian flows) is now the development focus, as well as improving installation ease and overall documentation. At some stage I will be organising a few hour familiarisation session - drop me an email if you are interested in attending this.

### Publications

23 results
 2016 [23] Trabecular bone anisotropic permeability based on micro-ct imaging and upscaling of porescale fluid flow (Daish, Christian; Blanchard, Romane; Gulati, Karan; Losic, Dusan; Findlay, David; Harvie, Dalton and Pivonka, Peter), 2016. [bibtex] [22] Steady-state corneal oxygen consumption profiles during contact lens wear (Brennan, Noel and Harvie, Dalton), 2016. [bibtex] [21] Electrokinetics of the silica and aqueous electrolyte solution interface: Viscoelectric effects (Hsu, Wei-Lun; Daiguji, Hirofumi; Dunstan, David E.; Davidson, Malcolm R. and Harvie, Dalton J.E.), In Advances in Colloid and Interface Science, 2016. 2014 [20] Electroviscous resistance of nanofluidic bends (Berry, J. D.; Foong, A. E.; Lade, C. E.; Biscombe, C. J. C.; Davidson, M. R. and Harvie, D. J. E.), In Phys. Rev. E, American Physical Society, volume 90, 2014. [19] Electroviscous flow through nanofluidic junctions (Berry, J.D.; Davidson, M.R. and Harvie, D.J.E.), In Applied Mathematical Modelling, volume 38, 2014. [18] A simple, scalable process for the production of porous polymer microspheres by ink-jetting combined with thermally induced phase separation (Go, Dewi P.; Harvie, Dalton J. E.; Tirtaatmadja, Nicolin; Gras, Sally L. and O'Connor, Andrea J.), In Particle and Particle Systems Characterization, volume 31, 2014. [17] Multi-Physics Lab-on-a-Chip Simulations (Harvie, Dalton J.E.), (Zhu, Dr Jonggang; Gu, Prof. Min, eds.), 2014. [bibtex] [16] Subgrid CFD film-drainage modelling: Application to buoyancy-driven droplet-wall collisions in emulsions (Mason, L. R.; Stevens, G. W. and Harvie, D. J. E.), In 19th Australasian Fluid Mechanics Conference, 2014. [15] Isoelectric focusing in a silica nanofluidic channel: Effects of electromigration and electroosmosis (Hsu, Wei-Lun; Inglis, David W.; Startsev, Michael A.; Goldys, Ewa M.; Davidson, Malcolm R. and Harvie, Dalton J.E.), In Analytical Chemistry, volume 86, 2014. [14] Concentration gradient focusing and separation in a silica nanofluidic channel with a non-uniform electroosmotic flow (Hsu, Wei-Lun; Harvie, Dalton J.E.; Davidson, Malcolm R.; Jeong, Helen; Goldys, Ewa M. and Inglis, David), In Lab Chip, The Royal Society of Chemistry, volume 14, 2014. [13] Stationary chemical gradients for concentration gradient-based separation and focusing in nanofluidic channels (Hsu, Wei-Lun; Inglis, David W.; Jeong, Helen; Dunstan, David E.; Davidson, Malcolm R.; Goldys, Ewa M. and Harvie, Dalton J. E.), In Langmuir, volume 30, 2014. [12] Extraction kinetics of Fe (III) by di-(2-ethylhexyl) phosphoric acid using a Y-Y shaped microfluidic device (Ciceri, Davide; Mason, Lachlan R; Harvie, Dalton JE; Perera, Jilska M and Stevens, Geoffrey W), In Chemical Engineering Research and Design, Elsevier, volume 92, 2014. [11] Electrokinetic flow in parallel channels: Circuit modelling for microfluidics and membranes (Biscombe, Christian J.C.; Davidson, Malcolm R. and Harvie, Dalton J.E.), In Colloids and Surfaces A: Physicochemical and Engineering Aspects, volume 440, 2014. 2013 [10] DNA focusing in nanofluidic channels (Hsu, W.L.; Startsev, M. A.; Inglis, D. W.; Goldys, E. M.; Davidson, M. R. and Harvie, D. J. E.), In The 17th International Conference on Miniaturized Systems for Chemistry and Life Sciences The 17th International Conference on The 17th International Conference on Miniaturized Systems for Chemistry and Life Sciences (MicroTAS 2013), 2013. [bibtex] [9] Ink-jetting combined with phase separation to produce highly porous microspheres for bioactive molecule delivery (Go, D.P.; Harvie, D.J.E.; Gras, S.L. and O'Connor, A.J.), 2013. [bibtex] [8] Modelling of interfacial mass transfer in microfluidic solvent extraction: Part I Heterogenous transport (Mason, Lachlan R; Ciceri, Davide; Harvie, Dalton JE; Perera, Jilska M and Stevens, Geoffrey W), In Microfluidics and Nanofluidics, Springer, volume 14, 2013. [7] Modelling of interfacial mass transfer in microfluidic solvent extraction: Part II Heterogeneous transport with chemical reaction (Ciceri, Davide; Mason, Lachlan R; Harvie, Dalton JE; Perera, Jilska M and Stevens, Geoffrey W), In Microfluidics and Nanofluidics, Springer, volume 14, 2013. 2012 [6] An implicit finite volume method for arbitrary transport equations (Harvie, Dalton J. E.), In ANZIAM J. (CTAC2010) (McLean, W.; Roberts, A. J., eds.), volume 52, 2012. [5] Electroviscous flow through microfluidic contractions, bends and junctions (Berry, Joseph D.; Foong, Andrew E.; Lade, Cathy; Ross, Edward; Faisal, Elina E.; Biscombe, Christian; Davidson, Malcolm R. and Harvie, Dalton J.E.), 2012. [bibtex] [4] Multi-scale volume of fluid modelling of droplet coalescence (Mason, Lachlan R.; Stevens, Geoffrey W. and Harvie, Dalton J.E.), In Ninth International Conference on CFD in the Minerals and Process Industries, 2012. [3] Steady-state oxygen consumption profiles in the cornea (Brennan, Noel A. and Harvie, Dalton J.E.), 2012. [bibtex] [2] Electroviscous flow through a microfluidic T-junction (Berry, Joseph D.; Davidson, Malcolm R. and Harvie, Dalton J.E.), In Ninth International Conference on CFD in the Minerals and Process Industries, 2012. 2011 [1] Electrokinetic development length of electroviscous flow through a contraction (Berry, Joseph D.; Davidson, Malcolm R. and Harvie, Dalton J. E.), In ANZIAM J. (CTAC2010) (McLean, W.; Roberts, A. J., eds.), volume 52, 2011.