23
DL_MESO Exercises November 15, 2016 These exercises involve the use of the CCP5 mesoscopic simulation code DL_MESO. It has two codes – one for Lattice Boltzmann Equation (LBE) and one for Dissipative Particle Dynamics (DPD) – and a broad range of applications, which you now have the opportunity to try out for yourself! You will be using the publicly available version of the code, currently DL_MESO 2.6. The DL_MESO codes are available from the DL_MESO website and are supplied as source code. Those of you who need to develop advanced algorithms based on LBE or DPD, or explore complex systems, but can’t afford the time to develop code from scratch yourself, may find it a useful starting point. The full software comes with its own graphical user interface (GUI) which is written in Java. It is fair to say it is a rather basic GUI, but it does help a great deal when working with DL_MESO, as we hope these exercises will show. This session will begin by (optionally) compiling the GUI and briefly showing how it works. The user manual for DL_MESO includes a chapter on how to use the GUI. Please glance through this to get a feel for how the GUI works: it will pay off in the end! You should pay particular attention to the sections on the system and space settings for LBE and the system and interaction settings for DPD, as these construct the main input files for each code in DL_MESO. Installation Instructions System requirements As DL_MESO is supplied as source code, any machine and/or operating system that can compile the programs should also be able to run them, although plenty of physical memory is recommended to avoid excessive use of hard disk swap space. To compile the DPD and LBE codes, you will need a Fortran90 compiler and a C++ compiler respectively, e.g. gfortran and g++ from the GNU Compiler Collection (GCC). Various utilities also make use of the same compilers, while decryption of the package after download (see below) requires a C compiler for Unix/Linux or Mac OS X. If you wish to compile the DPD code natively in Windows, you will also need to install GNU Make to be able to use makefiles: this is normally pre-installed for Unix and Linux distributions as well as for Mac OS X. If you wish to compile parallel versions of the codes for multicore machines, a version of MPI, e.g. OpenMPI, needs to be installed to provide ‘compiler wrappers’, i.e. commands to compile the codes with MPI. If you are using a centralised computer cluster or supercomputer, MPI-wrapped compilers should already be provided, e.g. CC and ftn on ARCHER: please consult the available documentation for the system or the administrator for information. The Java GUI requires a Java Runtime Environment (JRE), which is normally already installed on most desktop and laptop computers. If you need to compile the GUI’s Java source code, you will also need a Java Development Kit (JDK) for the relevant version of Java, which includes the compiler javac. Download and extract DL_MESO You must first obtain a copy of the DL_MESO source code from the DL_MESO website. Two options are available: (1) if you are intending to use DL_MESO for purely academic purposes, you can register for a free academic licence; (2) if you are intending to use DL_MESO for commercially-funded research, you will need to obtain a commercial licence for an annual fee. To obtain an academic licence: 1

DL MESO Exercises

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DL MESO Exercises

DL_MESO Exercises

November 15, 2016

These exercises involve the use of the CCP5 mesoscopic simulation code DL_MESO. It has two codes – one for LatticeBoltzmann Equation (LBE) and one for Dissipative Particle Dynamics (DPD) – and a broad range of applications,which you now have the opportunity to try out for yourself! You will be using the publicly available version of thecode, currently DL_MESO 2.6.The DL_MESO codes are available from the DL_MESO website and are supplied as source code. Those of you whoneed to develop advanced algorithms based on LBE or DPD, or explore complex systems, but can’t afford the timeto develop code from scratch yourself, may find it a useful starting point.The full software comes with its own graphical user interface (GUI) which is written in Java. It is fair to say it is arather basic GUI, but it does help a great deal when working with DL_MESO, as we hope these exercises will show.This session will begin by (optionally) compiling the GUI and briefly showing how it works. The user manual forDL_MESO includes a chapter on how to use the GUI. Please glance through this to get a feel for how the GUI works:it will pay off in the end! You should pay particular attention to the sections on the system and space settingsfor LBE and the system and interaction settings for DPD, as these construct the main input files for each code inDL_MESO.

Installation Instructions

System requirements

As DL_MESO is supplied as source code, any machine and/or operating system that can compile the programs shouldalso be able to run them, although plenty of physical memory is recommended to avoid excessive use of hard diskswap space.To compile the DPD and LBE codes, you will need a Fortran90 compiler and a C++ compiler respectively, e.g.gfortran and g++ from the GNU Compiler Collection (GCC). Various utilities also make use of the same compilers,while decryption of the package after download (see below) requires a C compiler for Unix/Linux or Mac OS X. Ifyou wish to compile the DPD code natively in Windows, you will also need to install GNU Make to be able to usemakefiles: this is normally pre-installed for Unix and Linux distributions as well as for Mac OS X.If you wish to compile parallel versions of the codes for multicore machines, a version of MPI, e.g. OpenMPI, needsto be installed to provide ‘compiler wrappers’, i.e. commands to compile the codes with MPI. If you are using acentralised computer cluster or supercomputer, MPI-wrapped compilers should already be provided, e.g. CC andftn on ARCHER: please consult the available documentation for the system or the administrator for information.The Java GUI requires a Java Runtime Environment (JRE), which is normally already installed on most desktopand laptop computers. If you need to compile the GUI’s Java source code, you will also need a Java DevelopmentKit (JDK) for the relevant version of Java, which includes the compiler javac.

Download and extract DL_MESO

You must first obtain a copy of the DL_MESO source code from the DL_MESO website. Two options are available:(1) if you are intending to use DL_MESO for purely academic purposes, you can register for a free academic licence;(2) if you are intending to use DL_MESO for commercially-funded research, you will need to obtain a commerciallicence for an annual fee.To obtain an academic licence:

1

Page 2: DL MESO Exercises

1. Access the DL_MESO website with your browser.

2. Scroll down until you find the link Registering for the DL_MESO Package and click to select it.

3. Read the page and, if you so wish, glance through the Licence Agreement; when you are ready, click on theREGISTER NOW link.

4. Fill out the Registration Form with a valid email address and click REGISTER.

5. Check your email: you should receive confirmation that you have joined the DL_MESO Mailing List and,more importantly, receive Download Instructions.

To obtain a commercial licence, you will need to email the author of DL_MESO, Michael Seaton, who will grant accessto the software in exchange for an annual fee.In either case, you will receive Download Instructions in an email: follow these to download the encrypted softwareand decrypt it to produce the dl_meso_2.6.tar.gz file. You now have a copy of the DL_MESO software. You nowneed to unpack the software and compile the executable program. Copy the dl_meso_2.6.tar.gz to the locationyou want to use the software and unpack it as follows:

tar zxvf dl_meso_2.6.tar.gz

This will create the dl_meso directory, after which you may delete the dl_meso_2.6.tar.gz file to save disc space.The dl_meso directory contains several sub-directories:

• the DEMO directory (which contains the input files and snapshot images for test cases);

• the DPD directory (which contains the source for the DPD code, makefiles and utilities for creating input filesand processing output files);

• the JAVA directory (which contains the source for the DL_MESO Java GUI);

• the LBE directory (which contains the source for the LBE code and utilities for creating input files andprocessing output files);

• the MAN directory, which contains a PDF copy of the User Manual;

• and the WORK directory, which is the suggested working directory for calculations and contains a Unix/Linuxscript for running the DL_MESO GUI and a makefile for compiling utilities.

Compile and run DL_MESO GUI

A pre-compiled Java archive (JAR) file containing the DL_MESO GUI is available in the dl_meso/JAVA directory,but depending on the system and version of Java in use you may need to compile it yourself. To compile the GUI,go to the dl_meso/JAVA directory and invoke the following commands:

javac *.java jar -cfm GUI.jar

manifest.mf *.class

To run the DL_MESO GUI, go to the dl_meso/WORK directory and start up the GUI as follows:

java -jar ../java/GUI.jar

or use the script rungui in the same directory to invoke that command. In a short while the GUI main windowwill appear. Chapter 2 in the DL_MESO User Manual explains what the buttons and menus do. The DL_MESOexercises listed below can be run through the medium of the Java GUI. It is important to adhere to the DL_MESOdirectory structure, otherwise the GUI will not operate correctly.

2

Page 3: DL MESO Exercises

Compile DL_MESO codes

The LBE and DPD codes can be compiled either by using command-line operations or by using the DL_MESO GUI.If you do not intend to change either of the codes, this only needs to be carried out once on the machine you wishto run DL_MESO.To compile either code using the GUI, select the method using the top button and then either the ‘Compile LBECode’ or ‘Compile DPD Code’ button in the side panel. For the LBE code, use the pull-down boxes to select theC++ compiler and version of the code (serial or parallel) you wish to use, then click ‘COMPILE’ to start compilation.The DPD code requires the construction of a makefile prior to compilation: select the Fortran90 compiler and codeversion you wish to use, click ‘Create Makefile’ to construct the makefile and then click ‘COMPILE’. In both cases,an executable file will be created in the dl_meso/WORK directory.Alternatively, it is possible to compile both codes manually. To compile the LBE code proceed as follows:

• Go to the dl_meso/WORK directory

cd dl_meso/WORK

• To compile the serial version, type

c++ -O3 -o lbe.exe ../LBE/slbe.cpp

and to compile the parallel version, type

c++ -O3 -o lbe.exe ../LBE/plbe.cpp

where c++ should be substituted with the available C++ compiler (wrapped with MPI for the parallelversion).

• To compile versions of the code with OpenMP multithreading, you need to add a compiler flag to invoke theOpenMP libraries, e.g.

c++ -O3 -fopenmp -o lbe.exe ../LBE/slbe.cpp

will compile the serial version of the code with OpenMP.

• The code will be compiled. i.e. an executable called lbe.exe will be created in the WORK directory.

To manually compile the DPD code proceed as follows:

• Copy an appropriate makefile (Makefile-serial, Makefile-MPI, Makefile-OMP or Makefile-MPIOMP) fromthe dl_meso/DPD/makefiles directory into dl_meso/WORK and rename as Makefile, e.g.:

cp dl_meso/DPD/makefiles/Makefile-serial dl_meso/WORK/Makefile

• Go to the dl_meso/WORK directory

cd dl_meso/WORK

• Open Makefile in your favourite text editor and check that the Fortran90 compiler (FC=) and flags (FFLAGS)are correct for your system.

• To compile, type

make

• The code will be compiled. i.e. an executable called dpd.exe will be created in the WORK directory.

You will also need to compile the supplied utilities to create some input files and process outputs. While in thedl_meso/WORK directory, type

3

Page 4: DL MESO Exercises

make -f Makefile-utils

to compile the utilities for both LBE and DPD codes. You may wish to check the makefile prior to use to ensure ituses the correct Fortran90 (FC=) and C++ (CC=) compilers. Most of the utilities can be invoked via the GUI, butall of them can be launched from the command line. Full details of the utilities available and how to use them canbe found in Appendix B of the user manual.

Running DL_MESO codes

Once they have been compiled, the LBE and DPD codes in DL_MESO can be launched using the GUI by selecting‘Run LBE Program’ or ‘Run DPD Program’ and following the instructions. Alternatively, to run the serial versionof one of the codes at the command line (for example, the LBE code), type:

./lbe.exe

if running in Unix, Linux or Mac OS X, or type:

lbe.exe

if running in Windows. To launch the parallel version of a code, you must use either mpirun or mpiexec to specifythe number of processors as well as the name of the executable, e.g.

mpirun -np 4 ./dpd.exe

to run the parallel DPD code on 4 processors. (The exact command will depend upon the available MPI implemen-tation.) A runscript may be required for centralised clusters or supercomputers with job queuing systems: consultthe system documentation or ask the system administrator for more details.If you want to run the OpenMP versions of the code, you will need to set the environment variable OMP_NUM_THREADS,e.g.

export OMP_NUM_THREADS=4

before running the code as above.

Visualisation software

DL_MESO and its utilities can make use of two visualisation software packages: VMD (www.ks.uiuc.edu/Research/vmd/)for displaying trajectory data from DPD simulations, and Paraview (www.paraview.org) for visualising grid-baseddata mainly from LBE simulations. Both are open-source and free to use for non-commercial purposes.

Exercises

You may now start on the exercises.The following 10 exercises have been constructed for the tutorial and are intended to give experience of usingDL_MESO in ‘typical’ applications: the first five use the LBE code, while the last five use the DPD code. Mostexercises make use of the test cases that can be found in the dl_meso/DEMO directory. The exercises are not of equaldifficulty or computing requirements. Exercises 3, 7 and 9, in particular, may require not yield useful results in ashort time frame without some imaginative intervention by the student or access to multiple processor cores.

• Exercise 1: Pressure-driven Flows and Kármán Vortex Streets

• Exercise 2: Fluid Heat Conduction and Convection

• Exercise 3: Immiscible Fluid Separation

• Exercise 4: Phase Separation and Equations of State

4

Page 5: DL MESO Exercises

• Exercise 5: Drop Flows

• Exercise 6: Connecting DPD to Flory-Huggins solution theory

• Exercise 7: Molecule Aggregation and Vesicle Formation

• Exercise 8: Transport Properties of DPD Fluids

• Exercise 9: Mesophase Behaviour

• Exercise 10: Vapour-Liquid Behaviour

All of these exercises require you to perform actual simulations with DL_MESO. As these may take some time, whileyou wait you are encouraged to take a look at the theories behind LBE and DPD and how some of the other featuresof the DL_MESO GUI work.If you want more information about the DL_MESO code, please see the DL_MESO User Manual.Do not worry if you do not have time to complete any of the exercises during the workshop. You can always continuewith them after you leave. If you want to, once you feel confident in using the package, you can try out the othertest cases not covered in these exercises.

5

Page 6: DL MESO Exercises

Exercise 1: Pressure-driven Flows and KármánVortex Streets

Summary

This exercise studies flows in channels using the Lattice Boltzmann Equation (LBE) code in DL_MESO, both steady-state flows and those obstructed by solid obstacles and causing unsteady flow separation, the latter creating whatare known as Kármán Vortex Streets. The objective is to demonstrate how well LBE can model flow-based systemsand show that the method can model more complex systems accurately.

Background

Pressure-driven flows are frequently found in all sorts of situations, most commonly in the form of pumping fluidsthrough pipes. These flows can be analysed using any method that models the Navier-Stokes equations for flow,in which category LBE qualifies. While most industrial applications use turbulent flows to promote fluid mixingand heat/mass transfer, flows in the laminar regime (i.e. with Reynolds numbers1 below about 2100) are easier toanalyse as they are dominated by fluid viscosity and typically produce parabolic velocity profiles: they are thus agood way to verify the accuracy of a numerical modelling method.If an object is placed in the path of a flowing fluid, this disrupts the flow field. Above a particular fluid velocity,eddies get shed from each side of the object in turn, forming rows of vortices in its wake: this is known as a(von) Kármán Vortex Street and produces a distinctive regular pattern. The shedding of an eddy changes thepressure distribution and creates periodic sideways forces on the object: if the frequency corresponds to the naturalresonating frequency of the object, this causes an even more intense vibration. This effect caused by vortex sheddinghas been known to cause damage to structures, such as the collapse of three cooling towers at Ferrybridge PowerStation in 1965 during high winds.In this exercise the student will have the opportunity to study both unobstructed pressure-driven flows and Kármánvortex streets using the LBE code in DL_MESO. Starting with a simple two-dimensional system with two wallsrepresenting a channel, it is possible to see how the flow changes with different pressure drops and fluid viscosities.Afterwards, objects can be added to the system and the conditions for producing Kármán vortex streets can bedetermined.

Instructions

Run the DL_MESO Java GUI in the WORK directory and select LBE in the top menu, then click on the Define LBESystem button at the side. Use the fields available to create a system using the D2Q9 lattice of size 250 by 50 gridpoints running over 60000 timesteps (no equilibration is required) and a save span of 500 timesteps. Set the numberof fluids to 1 and click on the set fluid parameters button to set both the initial density and relaxation time of thefluid to 1.0, as well as specify a constant body force on the fluid (suggested value of 2.0E-7 for the x-component):this latter property will act in the same manner as a constant pressure drop across the length of the channel. Allother properties for the system and fluid can be left at their default values.After saving the system properties, click on Set LBE Space and select mid-grid bounce back for the top and bottomboundaries. Leave the others as periodic and click Create. You will now have the input files (lbin.sys andlbin.spa) for the basic pressure-driven channel flow system.

1The Reynolds number is a dimensionless number used to describe the type of flow in a system. Its definition is the ratio of inertialto viscous forces, given by the formula

Re =uL

νwhere u and L are the mean velocity and characteristic length for the flow and ν the kinematic viscosity of the fluid. (For instance,u can be specified as the volumentric-average velocity and L as the pipe diameter.) For Newtonian fluids (i.e. those with constantviscosities), laminar flows have Reynolds numbers up to 2100 and turbulent flows have Reynolds numbers above 10000; a transitionalregime exists between these two limits.

6

Page 7: DL MESO Exercises

When studying the effect of obstacles on the flow, you can reload the system file in Define LBE System by clickingon Open: this is needed as the GUI uses the grid size set in this section to determine the extents of boundarypoints. The file defining boundaries cannot be reloaded, so it will have to be recreated if changes are required.To add obstacles to the system, you can select the bounce-back (preferably mid-grid) and obstacle types, beforetyping in the positions and sizes and clicking on add obstacle: you will need to do this before clicking on Create.Run the executable for the LBE code, lbe.exe, in the working directory: this can either be launched at thecommand line or via the GUI.

Tasks

1. Perform simulations using the basic input files as described above. Use Paraview to visualise the results andtry plotting the x-component of velocity over a line parallel to the y-axis: you should get a parabolic profile.

2. Modify the value of the body force in the lbin.sys file and repeat the simulations: see how the maximumvelocity changes with body force (i.e. pressure drop). Repeat this experiment by keeping the body forceconstant but changing the relaxation time for the fluid - this is the analogue for kinematic viscosity - and seehow the velocity profile changes. (Be warned: relaxation times very close to 0.5 may produce calculationalinstabilities.)

3. Try adding a circular object of radius 8 along the flow centreline near to the ‘entrance’ of the flow (suggestedposition: at x = 49, y = 24). See how the flow field changes with the obstacle in place and try varying thebody force and/or relaxation time: under what conditions does vortex shedding occur? (Hint: check the inputfiles in DEMO/LBE/2D_KarmanVortex for conditions that do produce vortex shedding.)

4. Repeat the above but change the circular object to a vertical baffle (i.e. a rectangle of width 1 and height16). See if you can still obtain a Kármán vortex street with this object.

5. One way to reduce the negative effects of vortex shedding is to add a fin to reduce the area size in whicheddies can interact. Try adding an additional rectangle of height 1 and width 16 to the right of the circularobject and repeat the simulation with conditions that originally produced vortex shedding: does the bafflesuppress the Kármán vortex street?

7

Page 8: DL MESO Exercises

Exercise 2: Fluid Heat Conduction and Convection

Summary

This exercise studies the coupling of fluid flows and heat transfers in Lattice Boltzmann Equation (LBE) simulations,using it to model heat conduction and natural convection.

Background

Heat transfers in fluids can be achieved by conduction, convection and radiation. The first two processes are bothbased on transfers of energy between neighbouring atoms or molecules of fluid, the difference being that convectionalso involves flow processes to transfer hot fluid to regions of cold fluid and vice versa. One commonly encounteredform of convective heat transfer is Rayleigh-Bénard (natural) convection, where an otherwise stationary fluid isheated at the bottom of a container, causing it to flow upwards and get cooler as it approaches the top.Due to the limited number of link velocities available in LBE, it is not normally possible to model both fluid flows andheat transfers in a single lattice. To get around this limitation, it is possible to model heat transfers on a separatelattice to fluid flows and couple the fluid flows to the thermal lattice[4]. An additional coupling is required to allowthe fluid temperature to drive any convective flows: this is frequently achieved using the Boussinesq approximationto give a temperature-dependent force on the fluid.

Instructions

Copy the lbin.sys, lbin.spa and lbin.init files from the directory DEMO/LBE/2D_RayleighBenard into theworking directory. Make sure the utility executable init.exe is available in the same directory.

Tasks

1. Run the simulation with the provided input files: this models a fluid between two solid plates, the bottom onemaintained at a high temperature and the top at a low temperature, with temperature-dependent buoyancy(Boussinesq) forces. The Prandtl number2 is set to 1 and the Rayleigh number3 to about 20000. The resultshould be a circulating velocity field with distinctive temperature cells.

2. The Rayleigh number controls the shape of the temperature cells and the magnitude of convective fluid speeds.Try repeating the simulation after changing the fluid relaxation time, thermal relaxation time or Boussinesqforce magnitude (but not direction) in the lbin.sys file: changing any of these should modify the Rayleighnumber.

3. Try setting the Boussinesq force equal to zero: do you observe any fluid flow, and thus convection, with thissetting? How does the heat transfer occur in this system?

2The Prandtl number is a dimensionless number used to describe the tendency of a fluid to transfer heat by convection. Its definitionis the ratio of momentum diffusivity (kinematic viscosity) to thermal diffusivity, given by the formula

Pr =ν

α

where ν and α are the momentum and thermal diffusivities of the fluid. Heat transfer for fluids with lower Prandtl numbers (e.g.liquid metals) tends to be dominated by conduction, while for fluids with higher Prandtl numbers (e.g. water, oil) their heat transferis predominately convective.

3The Rayleigh number is a dimensionless number used to describe the tendency of a fluid to transfer heat by convection. Itsdefinition is the ratio of buoyancy to viscous forces (also known as the Grashof number) multiplied by the ratio of momentum tothermal diffusivities (Prandtl number), given by the formula

Ra =gβ

να(Ts − T∞)L3

where g is acceleration due to gravity, β is the thermal expansion coefficient for the fluid, Ts and T∞ are the temperatures at the surfaceand in the bulk fluid respectively, and L is a characteristic length. This number is used to describe buoyancy-dominated flows, such asnatural convection, and is frequently of the order 106 to 108.

8

Page 9: DL MESO Exercises

4. The lbin.init file introduces a thermal disturbance to the system, which causes the convection rolls to form.Try running the simulation without this file: does convection still occur? Try creating your own lbin.initfile using the init.exe utility to specify the temperature profile at the start of the simulation.

9

Page 10: DL MESO Exercises

Exercise 3: Immiscible Fluid Separation

Summary

This exercise explores the ability of the Lattice Boltzmann Equation (LBE) code in DL_MESO to model systemsinvolving multiple fluids using one of its mesophase algorithms.

Background

LBE is a method well-suited to modelling complex fluid systems, including those involving multiple immisciblefluids. In general, these work by determining and then applying forces between fluids at each lattice point toseparate them. Several different algorithms exist for multiple fluid systems in LBE.The Shan/Chen pseudopotential method[11] implemented in DL_MESO is based upon defining a density-dependentproperty (the effective mass or ‘pseudopotential’) for each fluid and calculating interaction forces based on itsgradients. This method is able to model separations between multiple fluids.

Instructions

For the first set of tasks, copy the lbin.sys and lbin.spa files from the directory DEMO/LBE/3D_PhaseSeparationinto the working directory. Make sure the utility executable vtk.exe is available in the same directory if you intendto carry out parallel calculations.

Tasks

The 3D_PhaseSeparation test case simulates a periodic cubic system with two immiscible fluids initially mixedrandomly: the two fluids separate over time using the Shan/Chen method. As it stands, this test case is largeand will need to be run in parallel to complete it quickly. To speed up this calculation, you can either reduce thenumber of dimensions from three to two by changing the lattice type from D3Q19 to D2Q9 (and set the number ofgrid points in the z dimension to 1), or reduce the size of the grid.

1. Run the simulation, transfer the *.vts results files to your local working directory (if necessary) and run thevtk.exe utility to create *.pvts files that link the pieces together. Plot the *.pvts files in Paraview (keepingthe *.vts files in the same directory) and observe the separation of the two fluid phases.

2. Try modifying the interfacial tension between the two fluids (the values for both interaction_1 and interaction_2should be changed to the same value) and see how quickly the two fluids separate from each other.

3. As a lead into Exercise 4, take a look at the other two interaction parameters (interaction_0 and interaction_3).What effect do these have on the individual fluids? Try varying these values: do they have any effect on thefluid separation?

10

Page 11: DL MESO Exercises

Exercise 4: Phase Separation and Equations ofState

Summary

This exercise explores the ability of the Lattice Boltzmann Equation (LBE) code in DL_MESO to model systemsinvolving multiple phases using one of its mesophase algorithms and examining its equation of state.

Background

As mentioned in Exercise 3, LBE is well-suited to modelling complex fluid systems: as well as multiple fluids, it isalso possible to model multiple phases within the same fluid, e.g. vapour and liquid at equilibrium. The Shan/Chenpseudopotential method[11] can be used to apply particular equations of state by specifying the pseudopotential inan appropriate manner[14].

Instructions

You will need to create input files for this exercise, which can be carried out either by using the GUI or by modifyingthe lbin.sys for the 3D_PhaseSeparation test case. Make sure the utility executable vtk.exe is available in thesame directory if you intend to carry out parallel calculations.

Tasks

Set up a two-dimensional system of grid size 100 by 100 points with periodic boundary conditions, with a singlefluid and Shan/Chen interactions (using the 1993 Shan/Chen pseudopotential) with initial and constant densitiesof 1.0, a noise intensity of 0.0002 and the interaction parameter (interaction_0 in the lbin.sys file) as a negativevalue, say -5.5.

1. Run this simulation for 25,000 time steps to ensure a final steady state and visualise using Paraview: youshould observe separation of the fluid into two phases. We can assume the high-density phase is liquid andthe low-density phase is vapour. Try varying the noise intensity and/or initial density (but not the constantdensity as this is used as the reference density for the pseudopotential): do these properties have any effecton the densities of the liquid and vapour phases?

2. The form of pseudopotential used for the Shan/Chen method sets the equation of state for a fluid: theexponential form used in DL_MESO essentially sets the temperature of the fluid equal to the negative reciprocalof the interaction parameter. Try varying the value of the interaction parameter and see what effect this valuehas on the liquid and vapour densities. Can you find the critical point?

• Hint: if you have time, you might like to derive the equation of state for the fluid - see equation 5.21 onpage 57 of the user manual - and then determine its first and second derivatives with respect to density.At the critical point these derivatives will be equal to zero, so you can obtain values for both the criticaldensity and the critical value of the interaction parameter.

3. There are three methods to apply forces on fluids in LBE. The standard forcing method (devised specificallyfor Shan/Chen interactions) adjusts the velocity used for local equilibrium distribution function calculationsof a particular fluid based on the force and its relaxation time. More accurate schemes have been devised:one by Kupershtokh and Medvedev[7] called the Equal Difference Method (EDM) calculates an additionalforcing term for the collision operator, while the scheme devised by Guo et al.[3] both adjusts the velocityfor equilibrium distribution function calculations and applies an additional forcing term. Try modifying thecollision/forcing type from BGK to BGK/EDM or BGK/Guo (BGKEDM or BGKGuo in lbin.sys respectively)and re-run the simulations: does this significantly change the liquid and vapour densities?

11

Page 12: DL MESO Exercises

4. If you have some time, determine the pressure for each fluid phase from the densities you calculated for eachvalue of the interaction parameter: this requires the equation of state (see above). The pressures should equalwhat is known as the saturated vapour pressure, which remains constant when the phase transition betweenliquid and vapour occurs at a particular temperature. Are the two pressures equal within the available numberof significant figures?

5. If you have even more time, try to determine the saturated pressure for each interaction parameter and thedensities of each phase by means of a Maxwell construction. (Hint: you might like to try creating a spreadsheetin e.g. Excel to use Solver to iterate the saturated pressure, liquid and vapour densities.) Do the saturatedpressures calculated by LBE match up with those from Maxwell constructions? Does the EDM Guo forcingterm improve the accuracy of the liquid and vapour densities compared with the standard forcing term?

12

Page 13: DL MESO Exercises

Exercise 5: Drop Flows

Summary

This exercise explores the ability of the Lattice Boltzmann Equation (LBE) code in DL_MESO to model the effect offlow on the motion and shape of a drop in a continuous fluid using one of its mesophase algorithms.

Background

LBE is a method well-suited to modelling complex fluid systems, including those involving multiple immisciblefluids and phases. In general, these work by determining and then applying forces between fluid phases at eachlattice point to separate them. Several different algorithms exist for multiple fluid and phase systems in LBE.The Lishchuk continuum-based interfacial stress model[8] implemented in DL_MESO is based on defining phaseindices between pairs of fluids (representing their relative amounts) and using gradients of these quantities to applyinterfacial forces. In terms of its application in LBE, all fluids are collided together at each lattice point using thesum of all forces between fluid pairs, before being segregated again using a numerical algorithm. This mesophasealgorithm does not deal with the kinetics of phase separation (unlike the Shan/Chen pseudopotential method usedfor Exercise 3), but it is well suited to modelling multiple-fluid systems dominated by hydrodynamics and can beused to apply specific interfacial tensions comparatively easily.

Instructions

Copy the lbin.sys, lbin.spa and lbin.init files from the directory DEMO/LBE/2D_DropShear into the workingdirectory. Make sure the utility executables vtk.exe and init.exe are available in the same directory.

Tasks

The 2D_DropShear test case simulates a rectangular system with a stationary boundary at the bottom and a shearingboundary at the top with a drop placed close to the bottom wall. The resulting linear shear in the continuous fluidmoves the drop both in the direction of the shear and upwards towards the vertical centreline as well as deforms itsshape. Since phase separation is not important in this system, the Lishchuk continuum-based algorithm is used forthis simulation to apply an interfacial tension between the two fluids. This test case is fairly long and may need tobe run in parallel to complete it in a reasonable time.

1. Run the simulation and, if required, use the vtk.exe utility to create *.pvts files that link the pieces together.Plot the *.vts (if the simulation was run in serial) or *.pvts files in Paraview and observe the motion of thedrop. (If the simulation was run in parallel, you need to keep the *.vts files in the same directory.) To plota boundary indicating the shape and size of the drop, calculate the phase index by finding the difference influid densities divided by their sum and determine the contour where the phase index is equal to zero. Youmay also wish to calculate the total fluid density for the system: where are the highest and lowest values?

2. The drop is initially placed near the bottom boundary. Try using the init.exe utility executable to create anew lbin.init with the drop (of radius 15 units) close to the shearing boundary (say, at y = 30) and repeatthe simulation: does the drop still settle midway between the two solid boundaries?

3. The shape of the drop is dependent upon its capillary number4, which depends upon both the surface tensionbetween the fluids and the shearing velocity of the top wall (note that the drop reaches vertical equilibrium

4The capillary number is a dimensionless number used to describe the relative effects of viscosity and surface tension on a fluid dropsurrounded by a continuous fluid. Its definition is the ratio of viscous to surface tension forces, given by the formula

Ca =ρνu

σ

where ρ is the density of the fluid drop and σ is the surface tension between the two fluids. For drops with low capillary numbers (lessthan 10−5), flows in porous materials will be dominated by surface tension.

13

Page 14: DL MESO Exercises

midway between the boundaries). Try modifying these parameters in the lbin.sys file, changing the valuesfor both interaction_1 and interaction_2 to the same number each time.

4. You may have noticed that the boundary between the drop and continuous fluid is not sharp: an aspect of theLishchuk mesophase algorithm is the use of a fluid separation process that generates diffuse phase boundaries.Fluid separation is controlled using a segregation parameter: try varying this value in lbin.sys file to seewhat effect this has. (Note that care is needed to ensure that the diffuse phase boundary does not interferewith the solid boundaries in the system.)

14

Page 15: DL MESO Exercises

Exercise 6: Connecting DPD to Flory-Hugginssolution theory

Summary

This exercise explores how to connect conservative forces in the ‘standard’ DPD model to Flory-Huggins solutiontheory.

Background

The connection between the Groot-Warren conservative force parameter between chemical species A and B, AABij ,and the corresponding Flory-Huggins χ-parameter (χAB) is a useful one to know for parameterising DPD simulations[2].Since the χ-parameter is related to the heat of mixing between two components, it can be determined using ex-perimental data or molecular dynamics simulations. The connection with conservative force parameters is validprovided the parameters for pairs of particles of the same species are equal.To determine the relationship between AABij and χAB , we can carry out DPD simulations of monomers (non-bondedparticles) to obtain separated regions. The volume fraction for particle species A φA in a region away from theinterface can be determined and used to calculate the χ-parameter with the relationship

χAB =ln

[1−φA

φA

]1 − 2φA

.

Instructions

Copy the CONTROL, FIELD and CONFIG files supplied with this document into the working directory. Make sure theutilities traject.exe and local.exe are also available in the same directory.

Tasks

1. Run the DPD simulation with the supplied input files: this will give a cuboidal box elongated in the x-dimension with the particles of each species (A and B) starting in one half of the box. Visualise the resultsusing the traject.exe utility to create a VTF file for VMD: what happens to the different species?

2. If the species are separated, use the local.exe utility to produce a time-averaged density profile along thex-direction: you will need to use Paraview to plot the file averages.vtk. Use the Calculator filter on the datato calculate the volume fraction for one of the two species and find a representative value for φA to calculateχAB .

3. Try varying the value of AABij in the FIELD file and repeat the simulation. What kind of relationship existsbetween AABij and χAB? Is there a minimum value of AABij that gives separation of the two species?

4. Try varying the value of AAAij and ABBij : note that these two values should be equal. Does this affect therelationship between AABij and χAB?

15

Page 16: DL MESO Exercises

Exercise 7: Molecule Aggregation and VesicleFormation

Summary

In this exercise the student will explore the use of Dissipative Particle Dynamics (DPD) for modelling systems withmolecules that spontaneously form clusters in solution. One system involves molecules that are hydrophobic, whilethe other involves molecules that are amphiphilic (i.e. both hydrophilic and hydrophobic).

Background

DPD offers the ability of modelling interactions between different particle types in a comparatively simple fashion.By setting values for the soft repulsive conservative force parameter Aij between species pairs, it is possible todetermine which species prefer to be closer to each other. If a solvent is formed from individual particles (or‘beads’) and an interaction parameter is set between particles of that species alone, values of interaction parameterless than or equal to the solvent bead value between the solvent and a particle type in e.g. a molecule will makethe particle hydrophilic: conversely, an interaction parameter higher than the solvent value between the two specieswould make the particle hydrophobic.It is possible to form molecules with different particle species within them and thus different interactions betweenthese species and the solvent. As such, amphiphilic molecules with hydrophilic head groups and hydrophobic tailscan be created. In systems containing such molecules, it is possible for structures such as micelles and vesicles toform due to the presence of solvent.

Instructions

For the first set of tasks, copy the CONTROL and FIELD files from the directory DEMO/DPD/Aggregate into the workingdirectory. For the second set of tasks, copy the CONTROL and FIELD files from the directory DEMO/DPD/VesicleFormationinto the working directory. Make sure the utility executables traject.exe and trajects.exe are available in thesame directory.

Tasks

Molecule Aggregation

1. Using the Aggregate test case without modification, run the DPD simulation and then use the traject.exeutility executable to create a plottable file (traject.vtf) for use with VMD. Observe that the hydrophobicmolecules form an aggregate to reduce contact with the solvent beads.

2. Repeat the simulation after changing the interaction parameter between the solvent and polymer species typein the FIELD file (first value in the lines after both species names). What happens if this parameter is set toa value equal to or less than the value for solvent-solvent interactions?

3. Try reducing the starting time step for writing trajectory data and number of equilibration time steps in theCONTROL file to zero, so you can observe the initial aggregation process from the originally random configura-tion.

Vesicle Formation

1. Using the Vesicle Formation system, run the DPD simulation: this is a large system and will require runningin parallel to complete it in a short enough time. (Hint: you may wish to reduce the number of simulationtimesteps in the CONTROL file to half of the value as the interesting processes should be complete by then.)

16

Page 17: DL MESO Exercises

Either use the traject.exe utility executable to create a plottable file of all particles, or use trajects.exeto select just the amphiphilic molecules. Observe the spontaneous formation of a vesicle with a volume ofwater contained inside it.

2. Repeat the simulation after changing the concentration of amphiphilic molecules in the system (but keepingthe total number of beads constant). Can you get molecular bilayers to form?

17

Page 18: DL MESO Exercises

Exercise 8: Transport Properties of DPD Fluids

Summary

Dissipative Particle Dynamics (DPD) can be used for systems involving flow processes. As such, it is important todetermine the viscosity of fluids, which is primarily set by the thermostat parameters used in simulations.

Background

The pairwise thermostat included in DPD means that the system momentum is conserved and thus hydrodynamicsare dealt with correctly. The dissipative parameter (γ) therefore controls the viscosity of the fluid, which is repre-sented by soft interacting particles. The other thermostats available in DL_MESO also work in a pairwise fashion andcan also be used to apply fluid viscosity: the Lowe-Andersen and Stoyanov-Groot thermostats in particular can beused for high viscosity systems.To determine the rheology of a fluid, a relationship between the shear stress and shear rate (velocity gradient)needs to be determined. One method of doing this which is available in the DPD code of DL_MESO is the use ofLees-Edwards shearing boundary conditions to produce a linear shear and the measurement of shear stress. Theviscosity of a fluid is equal to the gradient of shear stress with shear rate: simple fluids tend to exhibit Newtonianbehaviour, i.e. viscosity is constant for all shear rates, while other rheological behaviours such as shear-thickeningand shear-thinning can also be observed in more complex fluids such as suspensions.

Instructions

Copy the CONTROL and FIELD files from the directory DEMO/DPD/ShearFlow into the working directory. Make surethe utility executable local.exe is available in the same directory. (Optionally, you might also need the executablemolecule.exe.)

Task

1. Simulate the provided system, which uses the Stoyanov-Groot thermostat and Lees-Edwards shearing bound-ary conditions parallel to the y-axis. Use the utility executable local.exe to calculate time-averaged prop-erties in sub-divisions of the volume (hint: specify 1 division in the x- and z-directions and 100 divisions inthe y-direction), open averages.vtk in Paraview and plot the horizontal velocity component along the y-axisto determine the velocity gradient. Plot the stress tensor component σyx from the CORREL file and determinethe time-averaged value for the period when trajectory data was sampled.

2. Repeat the same simulation with different wall velocities and record the resulting time-averaged velocitygradient and shear stress. Plot the data and see if you can determine a viscosity for the fluid.

3. Repeat the same simulations with different values for the collision frequency (Γ). What is the relationshipbetween collision frequency and viscosity?

4. Repeat the above but replace the Stoyanov-Groot thermostat with the standard DPD thermostat (preferablywith DPD Velocity Verlet). Try and determine the relationship between the dissipative force parameter (γ)and fluid viscosity.

5. If you have time, try constructing a molecule using the molecule.exe utility (either at the command-line orvia the DL_MESO GUI) and create a system with the molecules in solution. Do the molecules have any effecton the viscosity?

18

Page 19: DL MESO Exercises

Exercise 9: Mesophase Behaviour

Summary

In this exercise the student will explore the use of Dissipative Particle Dynamics (DPD) to determine the mesophasebehaviour of amphiphilic molecules in solution.

Background

The soft potentials used in DPD allow the use of larger timesteps than those available in Molecular Dynamics. Assuch, it is possible for the equilibrium state of a system to be reached more quickly, including the formation ofmesophases between e.g. amphiphilic molecules and solvent. This makes DPD a viable tool for exploring phasespace and it is possible to construct phase diagrams based on DPD simulations, e.g. [10]

The example given in this exercise is for two-particle (dimer) amphiphilic molecules[6].

Instructions

Copy the CONTROL and FIELD-* files from the directory DEMO/DPD/AmphiphileMesophases into the working direc-tory. Make sure the utility executables traject.exe and export.exe are available in the same directory. You willneed to rename the FIELD-* files to FIELD before running the simulations.To speed up visualisation of isosurfaces and determination of mesophases, you can use the isosurfaces.exe utility.This should be run in the same directory as the HISTORY* trajectory files with optional command line argumentsindicating the number of processors used for the calculation and the species required for constructing isosurfaces,e.g.

./isosurfaces.exe 8 SPECIES

If the number of processors or species are not included in the command line argument, the user will be asked totype these in. For each recorded trajectory snapshot, the utility will generate a VTK file with Gaussian densitymaps for the selected species: these files can be plotted using Paraview and the surfaces rendered using the Contourfilter.The same density maps are used to determine the second moment of the isosurface normal distribution, and thethree eigenvalues of this symmetric tensor can be used as characteristics (order parameters) for mesophases[9]. The

19

Page 20: DL MESO Exercises

utility outputs the three eigenvalues in ascending numerical order (i.e. µ1 ≤ µ2 ≤ µ3) for each recorded timestepand normalised so they add up to 1, both to the screen and to a text file for later plotting. The relative valuesof the eigenvalues determine the mesophase: as a rough guide, isotropic phases correspond to three approximatelyequal eigenvalues, hexagonal phases are indicated by the first eigenvalue being significantly lower than the secondand third eigenvalues (e.g. µ1 < 0.1, µ2, µ3 > 0.3), while lamellar phases are indicated by the first and secondeigenvalues being significantly lower than the third eigenvalue (e.g. µ1, µ2 < 0.15).

Tasks

1. Run the simulation with each of the available FIELD files. Create the trajectories using traject.exe andvisualise the systems. You may wish to create isosurfaces of the hydrophobic species to see the phases(isotropic, hexagonal, lamellar, inverse isotropic) more clearly: either use the VolMap tool in VMD or theisosurfaces.exe utility. The latter will also give you typical values for the eigenvalues of the isosurfacenormal second moments for each phase and how they vary over time. Pay attention to how quickly themesophases form: you might want to make use of this later.

2. Repeat the simulations but vary the concentration of the molecules in solution, keeping the total number ofparticles constant. Either visualise the systems at the final timesteps using export.exe and VMD (againcreating isosurfaces if necessary), or use the isosurfaces.exe utility to calculate eigenvalues and determinemesophases. Can you determine at which concentrations phase transitions occur? If you are struggling fortime, try reducing the number of timesteps for each simulation down to the minimum number required formesophase formation.

3. Repeat the simulations but change the specified temperature. Do you observe a shift in the concentrationsfor phase transitions?

20

Page 21: DL MESO Exercises

Exercise 10: Vapour-Liquid Behaviour

Summary

In this exercise the student will explore the use of Dissipative Particle Dynamics (DPD) for studying systemsinvolving both vapour and liquid phases.

Background

The form of interaction potential used in DPD simulations gives rise to the equation of state for the fluid representedby the particles. The most frequently used potential is a quadratic function of distance between interacting particlepairs; application of the virial theorem shows it produces an equation of state with a quadratic density term. Whilethis is enough to exhibit non-ideal behaviour for systems involving a single state of matter, higher order equationsof state are required to model two-phase systems such as vapour-liquid coexistence.One method available to model vapour-liquid behaviour is the many-body DPD approach, which makes the con-servative force dependent on local particle densities as well as particle separation; this is similar to embedded atommodels for classical molecular dynamics simulations of metals. The local density of a particle is calculated as thesum of weight functions between itself and other particles within a cutoff. The use of a density-dependent potentialand conservative force changes the equation of state for the fluid from the quadratic form used by ‘standard’ DPD toinclude higher-order density terms. Warren’s choice of many-body DPD potential involves augmenting the standardDPD conservative force by adding a function consisting of a sum of localised densities multiplied by a constantand a screening function of particle separation (usually a linear function with a specified cutoff)[12]. This choice issufficient to model vapour-liquid behaviour, as it results in a cubic equation of state.The examples given in this exercise involve modelling water using Warren’s many-body DPD scheme, making useof parameters that give the correct liquid compressibility, surface tension and viscosity[1]. You will observe thespontaneous coalescence of water particles from uniformly distributions into bodies of liquid with surfaces. Similarinteractions can be applied between water and solid surfaces (represented by frozen particles) with changes inrepulsion to produce different surface hydrophobicities and interfacial tensions, represented by changes in contactangles between the liquid and solid surfaces[5].

Instructions

The tasks start with the VapourLiquid test case. Copy the CONTROL and FIELD files from the directory DEMO/DPD/VapourLiquidinto the working directory. Make sure the utility executable traject.exe is available in the same directory.Note that the many-body DPD interaction data for water in the FIELD file allows for up to five coefficients (plusinteraction length and dissipative coefficient/collision frequency) but only the first two coefficients are used for thecurrent many-body DPD model. The first value (Aij) is the equivalent of the standard DPD conservative forcecoefficient, although this value is generally given a negative value to provide an attractive part to the potential,while the second value (Bij) is the coefficient used for the density-dependent term and gives the repulsive part: topreserve the conservative nature of the forces, the same value of Bij should be used for all species pairs[13].

Tasks

Mesoscopic model for water

1. Run the simulation, create the trajectories using traject.exe and visualise the system using VMD: to showthe boundaries of the box, type pbc box in the terminal shell for VMD. You will find that the initial coalescenceof water particles cannot be observed as the trajectory snapshots are not taken very frequently: to observethis process, change the frequency of trajectory snapshots in the CONTROL file (and reduce the total numberof timesteps) and re-run the simulation. What fraction of the box is filled with water particles by the end ofthe simulation?

21

Page 22: DL MESO Exercises

2. The many-body DPD potential in use for this system encourages the water particles to form into a shape thatproduces the smallest surface area: if there are insufficient particles to stretch across a cross-section of thesimulation box, it will form a (near) spherical drop. Try modifying the size of the simulation box and/or thenumber of water beads in the system to get a single water drop to form. How steady is its shape once it hasformed?

Water drops on surfaces

1. Copy the CONTROL and FIELD files from the directory DEMO/DPD/SurfaceDrop into the working directory.These input files represent a system modelled in [5]: compared with the VapourLiquid test case, you maynotice that the size of the system and number of water particles have changed, walls of frozen particles havenow been added to the system with a different value of Aij for interactions between water and wall particles,and a constant force acting downwards is applied on the particles to represent gravity. Run this simulationand visualise the trajectories: you should observe the water particles coalescing and heading down towardsthe bottom wall, creating water drops on the surface that eventually join together to form a single large drop.

2. You may notice from the above simulation that the drop forms a contact angle with the wall: try modifyingthe value of Aij for water-wall interactions in the FIELD file and see what effect this has on the contact angle.What happens if you set Aij equal to the value for like-like interactions?

3. You may have also observed that some water particles go through the ‘solid’ wall(!): this is due to the softpotentials used for the frozen particles. One method that could make the wall less penetrable is to increaseits particle density (currently set at 3.0 in the FIELD file): does this affect the formation of water drops onthe surface?

22

Page 23: DL MESO Exercises

References

[1] A. Ghoufi and P. Malfreyt. Mesoscale modeling of the water liquid-vapor interface: A surface tension calcula-tion. Physical Review E, 83:051601, May 2011.

[2] Robert D. Groot and Patrick B. Warren. Dissipative particle dynamics: Bridging the gap between atomisticand mesoscopic simulation. Journal of Chemical Physics, 107(11):4423–4435, 1997.

[3] Zhaoli Guo, Chuguang Zheng, and Baochang Shi. Discrete lattice effects on the forcing term in the latticeBoltzmann method. Physical Review E, 65(4):046308, April 2002.

[4] Takaji Inamuro, Masato Yoshino, Hiroshi Inoue, Riki Mizuno, and Fumimaru Ogino. A lattice Boltzmannmethod for a binary miscible fluid mixture and its application to a heat-transfer problem. Journal of Compu-tational Physics, 179(1):201–215, 2002.

[5] Erik Johansson. Simulating fluid flow and heat transfer using dissipative particle dynamics. Project report,Department of Energy Sciences, Faculty of Engineering, Lund University, Department of Energy Sciences,Faculty of Engineering, Lund University, Box 118, 22100 Lund, Sweden, 2012.

[6] Simon Jury, Peter Bladon, Mike Cates, Sujata Krishna, Maarten Hagen, Noel Ruddock, and Patrick War-ren. Simulation of amphiphilic mesophases using dissipative particle dynamics. Physical Chemistry ChemicalPhysics, 1(9):2051–2056, 1999.

[7] A. L. Kupershtokh and D. A. Medvedev. Lattice boltzmann equation method in electrohydrodynamic problems.Journal of Electrostatics, 64(7–9):581–585, 2006. Fifth International Electrohydrodynamics (EHD) Workshopand Fourth Conference of the Société Française d’Electrostatique (SFE).

[8] S. V. Lishchuk, C. M. Care, and I. Halliday. Lattice Boltzmann algorithm for surface tension with greatlyreduced microcurrents. Physical Review E, 67(3):036701, March 2003.

[9] P. Prinsen, P. B. Warren, and M. A. J. Michels. Mesoscale simulations of surfactant dissolution and mesophaseformation. Physical Review Letters, 89(14):148302, September 2002.

[10] M. A. Seaton and J. A. Purton. New capabilities and software for materials modelling. In Science Highlights2010-2011, pages 20–23. Computational Science and Engineering Department, STFC Daresbury Laboratory,STFC Daresbury Laboratory, Keckwick Lane, Daresbury, Warrington, WA4 4AD, United Kingdom, 2011.

[11] Xiaowen Shan and Hudong Chen. Lattice Boltzmann model for simulating flows with multiple phases andcomponents. Physical Review E, 47(3):1815–1819, March 1993.

[12] P. B. Warren. Vapor-liquid coexistence in many-body dissipative particle dynamics. Physical Review E,68(6):066702, December 2003.

[13] Patrick B. Warren. No-go theorem in many-body dissipative particle dynamics. Physical Review E, 87:045303,April 2013.

[14] Peng Yuan and Laura Schaefer. Equations of state in a lattice Boltzmann model. Physics of Fluids,18(4):042101, 2006.

23