# arb multiphysics finite volume solver

New version 0.58 uploaded (5/7/18) that includes a timesteprewind capability.

## 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 originally created by Dalton Harvie, but is now a collaborative project.

## 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_EQUATION <T transport>

"-celldiv(<D>*facegrad(<T>))" ON <domain>

FACE_EQUATION <T hole>

"-<D>*facegrad(<T>)-<hole flux>" ON <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.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.

### Manual:

An online manual is under development 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:

- A fortran compiler; the Intel compiler ifort or GNU compiler gfortran;
- The computer algebra system maxima;
- A sparse matrix linear solver: UMFPACK, pardiso (both the native and ifort versions) or a Harwell Subroutine Library routine; and
- The mesh generation and post-processing package gmsh.

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. There is also an install script for red hat in the same directory (although not as well tested).

Installation on OsX is usually 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 then run the following install_globally.sh script to place the executables in your path, restart your terminal, and you should be ready to start simulating.

## Download

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. Unfortunately this first screencast was produced using v0.56 which required a separate arb working directory for each simulation. From v0.57 and onwards arb is installed globally, so there will be slight differences in the arb directory structure and installation method (refer to the above scripts for installation).

This next monster screencast covers the basics of arb use, including the arb directory structure, altering mesh files and basic arb coding. Again note that this screencast was produced using v0.56, in which simulations were conducted in separate arb working directories. Most of the content is still relevant however.

## 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

2018 | |

[28] | CFD study of buoyancy driven droplet coalescence ( ), 2018. |

[27] | Lift forces on a sphere in bounded and wall-bounded flows ( ), 2018. |

2017 | |

[26] | Mechanical and Fluid Dynamical Characterization of 3d Porous Ceramic Material – Application to Baghdadite Scaffolds for Large Segmental Bone Defects ( ), 2017. |

[25] | Viscoelectric Effects in Nanochannel Electrokinetics ( ), In The Journal of Physical Chemistry C, volume 121, 2017. |

2016 | |

[24] | Estimation of anisotropic permeability in trabecular bone based on microCT imaging and pore-scale fluid dynamics simulations ( ), In Bone Reports, 2016. |

[23] | Trabecular bone anisotropic permeability based on micro-ct imaging and upscaling of porescale fluid flow ( ), 2016. |

[22] | Steady-state corneal oxygen consumption profiles during contact lens wear ( ), 2016. |

[21] | Electrokinetics of the silica and aqueous electrolyte solution interface: Viscoelectric effects ( ), In Advances in Colloid and Interface Science, 2016. |

2014 | |

[20] | Electroviscous resistance of nanofluidic bends ( ), In Phys. Rev. E, American Physical Society, volume 90, 2014. |

[19] | Electroviscous flow through nanofluidic junctions ( ), 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 ( ), In Particle and Particle Systems Characterization, volume 31, 2014. |

[17] | Multi-Physics Lab-on-a-Chip Simulations ( ), (Zhu, Dr Jonggang; Gu, Prof. Min, eds.), 2014. |

[16] | Subgrid CFD film-drainage modelling: Application to buoyancy-driven droplet-wall collisions in emulsions ( ), In 19th Australasian Fluid Mechanics Conference, 2014. |

[15] | Isoelectric focusing in a silica nanofluidic channel: Effects of electromigration and electroosmosis ( ), In Analytical Chemistry, volume 86, 2014. |

[14] | Concentration gradient focusing and separation in a silica nanofluidic channel with a non-uniform electroosmotic flow ( ), 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 ( ), In Langmuir, volume 30, 2014. |

[12] | Extraction kinetics of Fe (III) by di-(2-ethylhexyl) phosphoric acid using a Y-Y shaped microfluidic device ( ), In Chemical Engineering Research and Design, Elsevier, volume 92, 2014. |

[11] | Electrokinetic flow in parallel channels: Circuit modelling for microfluidics and membranes ( ), In Colloids and Surfaces A: Physicochemical and Engineering Aspects, volume 440, 2014. |

2013 | |

[10] | Ink-jetting combined with phase separation to produce highly porous microspheres for bioactive molecule delivery ( ), 2013. |

[9] | DNA focusing in nanofluidic channels ( ), 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. |

[8] | Modelling of interfacial mass transfer in microfluidic solvent extraction: Part I Heterogenous transport ( ), 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 ( ), In Microfluidics and Nanofluidics, Springer, volume 14, 2013. |

2012 | |

[6] | An implicit finite volume method for arbitrary transport equations ( ), In ANZIAM J. (CTAC2010) (McLean, W.; Roberts, A. J., eds.), volume 52, 2012. |

[5] | Electroviscous flow through a microfluidic T-junction ( ), In Ninth International Conference on CFD in the Minerals and Process Industries, 2012. |

[4] | Steady-state oxygen consumption profiles in the cornea ( ), 2012. |

[3] | Electroviscous flow through microfluidic contractions, bends and junctions ( ), 2012. |

[2] | Multi-scale volume of fluid modelling of droplet coalescence ( ), In Ninth International Conference on CFD in the Minerals and Process Industries, 2012. |

2011 | |

[1] | Electrokinetic development length of electroviscous flow through a contraction ( ), In ANZIAM J. (CTAC2010) (McLean, W.; Roberts, A. J., eds.), volume 52, 2011. |