Stochastic boundary conditions to the convection-diffusion equation including chemical reactions at solid surfaces.

Similar documents
Where as discussed previously we interpret solutions to this partial differential equation in the weak sense: b

Wave Propagation through Random Media

Mass Transfer 2. Diffusion in Dilute Solutions

Analysis of discretization in the direct simulation Monte Carlo

Millennium Relativity Acceleration Composition. The Relativistic Relationship between Acceleration and Uniform Motion

Development of the Numerical Schemes and Iteration Procedures Nielsen, Peter Vilhelm

Homework Set 4. gas B open end

General Equilibrium. What happens to cause a reaction to come to equilibrium?

A simple expression for radial distribution functions of pure fluids and mixtures

Chapter 2 Linear Elastic Fracture Mechanics

Cavity flow with surface tension past a flat plate

Advances in Radio Science

NUMERICAL SIMULATION OF ATOMIZATION WITH ADAPTIVE JET REFINEMENT

The gravitational phenomena without the curved spacetime

Improvements in the Modeling of the Self-ignition of Tetrafluoroethylene

Advanced Computational Fluid Dynamics AA215A Lecture 4

Control Theory association of mathematics and engineering

Singular Event Detection

Process engineers are often faced with the task of

Modeling of Threading Dislocation Density Reduction in Heteroepitaxial Layers

3 Tidal systems modelling: ASMITA model

UPPER-TRUNCATED POWER LAW DISTRIBUTIONS

DIGITAL DISTANCE RELAYING SCHEME FOR PARALLEL TRANSMISSION LINES DURING INTER-CIRCUIT FAULTS

Four-dimensional equation of motion for viscous compressible substance with regard to the acceleration field, pressure field and dissipation field

Is classical energy equation adequate for convective heat transfer in nanofluids? Citation Advances In Mechanical Engineering, 2010, v.

A model for measurement of the states in a coupled-dot qubit

Determination of the reaction order

Relativistic Dynamics

Frequency Domain Analysis of Concrete Gravity Dam-Reservoir Systems by Wavenumber Approach

Normative and descriptive approaches to multiattribute decision making

Hankel Optimal Model Order Reduction 1

A Differential Equation for Specific Catchment Area

Heat exchangers: Heat exchanger types:

Chapter 14. The Concept of Equilibrium and the Equilibrium Constant. We have for the most part depicted reactions as going one way.

RESEARCH ON RANDOM FOURIER WAVE-NUMBER SPECTRUM OF FLUCTUATING WIND SPEED

Supplementary Materials

Beams on Elastic Foundation

COMBINED PROBE FOR MACH NUMBER, TEMPERATURE AND INCIDENCE INDICATION

Evaluation of effect of blade internal modes on sensitivity of Advanced LIGO

CALCULATION OF NONLINEAR TUNE SHIFT USING BEAM POSITION MEASUREMENT RESULTS

Chapter 13, Chemical Equilibrium

CRITICAL EXPONENTS TAKING INTO ACCOUNT DYNAMIC SCALING FOR ADSORPTION ON SMALL-SIZE ONE-DIMENSIONAL CLUSTERS

10.2 The Occurrence of Critical Flow; Controls

Duct Acoustics. Chap.4 Duct Acoustics. Plane wave

Calculation of Desorption Parameters for Mg/Si(111) System

Temperature Control of Batch Suspension Polyvinyl Chloride Reactors

A NETWORK SIMPLEX ALGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM

UTC. Engineering 329. Proportional Controller Design. Speed System. John Beverly. Green Team. John Beverly Keith Skiles John Barker.

Geometry of Transformations of Random Variables

MODELLING THE POSTPEAK STRESS DISPLACEMENT RELATIONSHIP OF CONCRETE IN UNIAXIAL COMPRESSION

div v(x) = 0, n terr = 0, v terr = v t,

Development of a user element in ABAQUS for modelling of cohesive laws in composite structures

SURFACE WAVES OF NON-RAYLEIGH TYPE

Proceedings of Meetings on Acoustics

An Integrated Architecture of Adaptive Neural Network Control for Dynamic Systems

A Spatiotemporal Approach to Passive Sound Source Localization

Time Domain Method of Moments

In this case it might be instructive to present all three components of the current density:

Robust Flight Control Design for a Turn Coordination System with Parameter Uncertainties

Q2. [40 points] Bishop-Hill Model: Calculation of Taylor Factors for Multiple Slip

Mechanistic Model for Reactive Transport of Radionuclides on Iron-(Oxy)Hydroxide Colloids at the Yucca Mountain Repository

Complexity of Regularization RBF Networks

Temperature-Gradient-Driven Tearing Modes

Relativistic effects in earth-orbiting Doppler lidar return signals

LATTICE BOLTZMANN METHOD FOR MICRO CHANNEL AND MICRO ORIFICE FLOWS TAIHO YEOM. Bachelor of Science in Mechanical Engineering.

Chapter 2 Lecture 5 Longitudinal stick fixed static stability and control 2 Topics

The Effectiveness of the Linear Hull Effect

EXACT TRAVELLING WAVE SOLUTIONS FOR THE GENERALIZED KURAMOTO-SIVASHINSKY EQUATION

Improving the worthiness of the Elder problem as a benchmark for buoyancy driven convection models

Three-dimensional Meso-scopic Analyses of Mortar and Concrete Model by Rigid Body Spring Model

9 Geophysics and Radio-Astronomy: VLBI VeryLongBaseInterferometry

The Concept of Mass as Interfering Photons, and the Originating Mechanism of Gravitation D.T. Froedge

Part G-4: Sample Exams

The transition between quasi-static and fully dynamic for interfaces

Aharonov-Bohm effect. Dan Solomon.

QCLAS Sensor for Purity Monitoring in Medical Gas Supply Lines

REMARKS TO A NOVEL NONLINEAR BWR STABILITY ANALYSIS APPROACH (RAM-ROM METHODOLOGY)

FIBER/MATRIX DEBONDING CRITERIONS IN SIC/TI COMPOSITE. NUMERICAL AND EXPERIMENTAL ANALYSIS

Shrinking core model for the reaction-diffusion problem in thermo-chemical heat storage Lan, S.; Zondag, H.A.; Rindt, C.C.M.

2. Mass transfer takes place in the two contacting phases as in extraction and absorption.

Chapter 3 Lecture 7. Drag polar 2. Topics. Chapter-3

Green s function for the wave equation

IMPEDANCE EFFECTS OF LEFT TURNERS FROM THE MAJOR STREET AT A TWSC INTERSECTION

Laplace-Transform Finite Element Solution of Nonlocal and Localized Stochastic Moment Equations of Transport

Planning with Uncertainty in Position: an Optimal Planner

Supplementary Information. Infrared Transparent Visible Opaque Fabrics (ITVOF) for Personal Cooling

Supplementary information for: All-optical signal processing using dynamic Brillouin gratings

What are the locations of excess energy in open channels?

An Adaptive Optimization Approach to Active Cancellation of Repeated Transient Vibration Disturbances

Effect of magnetization process on levitation force between a superconducting. disk and a permanent magnet

IN-PLANE VIBRATIONS OF CURVED BEAMS WITH VARIABLE CROSS-SECTIONS CARRYING ADDITIONAL MASS

EFFECTS OF COUPLE STRESSES ON PURE SQUEEZE EHL MOTION OF CIRCULAR CONTACTS

KINETICS OF IRON OXIDE DIRECT REDUCTION BY COAL E.R. ABRIL 1

Contact Block Reduction Method for Ballistic Quantum Transport with Semi-empirical sp3d5s* Tight Binding band models

FINITE WORD LENGTH EFFECTS IN DSP

Numerical Tests of Nucleation Theories for the Ising Models. Abstract

Physical Laws, Absolutes, Relative Absolutes and Relativistic Time Phenomena

A Queueing Model for Call Blending in Call Centers

Acoustic Waves in a Duct

Comparison of solution to FE. note: the distance from flange edge is x in these plots while it was y in the derivation!!!

Transcription:

Stohasti boundary onditions to the onvetion-diffusion equation inluding hemial reations at solid surfaes. P. Szymzak and A. J. C. Ladd Department of Chemial Engineering, University of Florida, Gainesville, Florida 32611-65 (Dated: Marh 3, 24) Simulations of heat and mass transport may require omple non-linear boundary onditions to desribe the flow of mass and energy aross an interfae. Although stohasti methods do not suffer from the numerial diffusion of grid-based methods, they typially lose auray in the viinity of interfaial boundaries. In this work we introdue new ideas and algorithms to aount for mass (or energy) transfer at reative interfaes, with auraies omparable to the bulk phase. We show how to introdue partiles into the system with the orret distribution near the interfae, as well as the orret flu through the interfae. The algorithms have been tested in a hannel flow, for whih aurate numerial solutions an be independently alulated. PACS numbers: 82.2.Wt, 2.7.Ns, 5.4.J, 66.1.Cb I. INTRODUCTION Surfae hemial reations, involving deposition and dissolution of moleular speies, are ontrolled by the transport of reatants and produts as well as by the intrinsi hemial kinetis. The two dominant transport mehanisms, onvetion and diffusion, frequently produe quite different dynamis and strutures within the system. We will onsider systems ontaining a reative solid surfae S, whih might for eample, be the surfae of a biologial ell, the porous matri of a speimen of limestone, or a orroding metal surfae. The transport of hemial speies in the surrounding fluid is desribed by the onvetion-diffusion equation; t i + u i = D i 2 i, (1) where i is the onentration of speies i, D i is its diffusion oeffiient, and u is the fluid veloity field. The essential assumption here is that the hemial onentrations are suffiiently small that they do not affet either the diffusion oeffiient or the fluid veloity, whih is then determined solely by the solid geometry and eternal boundary onditions on the flow. Stohasti methods have long been used to solve problems in heat transport [1 3] and neutron transport [4], beause of the ease with whih these methods an be adapted to omple interfaes. An etensive bibliography of appliations is ontained in Ref. [3]. Stohasti methods have also been applied to bulk-phase reation-diffusion systems [5, 6], and to the dispersion of passive traers in a porous medium [7 9]. Reently, a stohasti method was used to alulate the flu of reative traers between omple fratured surfaes [1]. Although stohasti methods an lead to aurate solutions of the onvetion-diffusion equation in bulk phases, they typially lose auray in the region of interfaial boundaries. For eample, the algorithms used in Ref. [7 1] introdue errors proportional to the square-root of the time step in the viinity of an interfae [11, 12]. However, in reent work [12] we developed seond-order implementations of the zero-flu and onstant onentration boundary onditions. Although we were not able to solve the boundary-ondition problem for a ompletely general flow field, we were able to obtain quadrati onvergene in two of the most important ases; a loal shear flow parallel to the surfae and a uniform flow aross the interfae. In this paper we propose generalizations of these ideas to situations where there are hemial reations at the interfae, whih an inlude spatially-varying non-linear rate laws. Although we only epliitly onsider mass transfer in this paper, the same algorithms an also be applied to stohasti simulations of heat transfer. The paper is organized as follows. In setion II we briefly summarize our previous work. In setion III we introdue the different types of boundary ondition that are enountered in systems with surfae mass transport, and a method to measure the onentration in the viinity of the interfae is desribed in setion III B. Stohasti implementations of these boundary onditions in the presene of a linear shear flow are onstruted in setion IV. The implementations are tested in setion V, and onlusions are given in setion VI. On leave from Institute of Theoretial Physis, Warsaw University, -681 Hoża 69, Poland email: ladd@he.ufl.edu

2 II. REFLECTION AND ABSORPTION A stohasti proess X(t), assoiated with the onvetion-diffusion equation (Eq. 1) obeys the stohasti differential equation dx + v(x)dt = 2DdW, (2) where dw is the differential of a Wiener proess with unit variane. We use a Heun preditor-orretor method to solve Eq. (2); X p (t + t) = X(t) + v[x(t)] t + 2D W(t), X(t + t) = X(t) + 1 2 {v[x(t)] + v[xp (t + t)]} t + 2D W(t), (3) where the inrement W(t) = W(t+ t) W(t) is a Gaussian random variable with variane t, and is the same for both preditor and orretor steps. The Heun method an be shown to be weakly seond-order onvergent [13, 14], meaning that, if X e is an eat trajetory, then the error in any polynomial funtion of X is bounded by g[x e (t)] g[x(t)] δ( t) 2, (4) where δ is a positive onstant. In a previous paper [12] we developed and tested stohasti algorithms to solve the onvetion-diffusion equation in the viinity of refleting and absorbing boundaries: ˆn(r) (r) = r S, (5) (r, t) = r S, (6) where ˆn(r) is a unit vetor normal to the surfae. Although we were not able to solve the problem for a general flow field, we onstruted seond-order approimations to the stohasti proesses near refleting and absorbing walls for two physially relevant flow fields: a linear shear flow, whih is harateristi of the flow near a solid interfae, and a loally uniform flow, whih ours near an inflow or outflow boundary. In the latter ase we also generalized Eq (6) to inlude a onstant non-zero onentration. Near a solid boundary, an inompressible flow an be approimated by a linear shear flow, v y = γ (7) with a veloity gradient, γ, normal to the surfae =. In order to determine the onvetive ontribution to the tangential (y) displaement, we must integrate over all possible trajetories between the initial and final positions. The average tangential displaement an then be omputed by introduing a weighting funtion p(,, t) [12] p(,, t) = t G(,, t t)g(,, t)dt G(,, (8), t) t where G(,, t) is the one-dimensional diffusion propagator. The quantity p(,, t) t is the mean time the partile spends at a position during its move from to in the time step t. The weight funtion turns out to be uniform in the region between to, but with tails that aount for indiret paths from to. A typial distribution of p(,, t) is shown in Fig. 5 of Ref. [12]; the unit of length in this paper is hosen to be the root-mean-square displaement in unit time, 2D, as before. In the viinity of the wall, a refletion must be applied to the negative ( < ) part of the funtion so that in this ase the proper weight funtion p r is (see Fig. 1) p r (,, t) = p(,, t) + p(,, t), (9) and is limited to the region ( > ). The average onvetive veloity, v y, during the timestep t an be alulated by integrating the flow field v y = γ at eah, using p r (,, t) as the weight funtion, v y = γ p r (,, t)d, (1) although the final epression is quite lengthy. If the soure and reeiver positions are not too lose to the wall the average veloity redues to the mean of the soure and reeiver veloities, as in Eq. (3). The details of the implementation an be found in Ref. [12].

3.5 p.25 2 1 1 2 3 FIG. 1: The onditional probability distribution p r(,, t) for a trajetory beginning at = 2 and ending at = 1 behind the wall (whih is refleted to the point = 1). (Eq. (8)) A zero-onentration (absorbing) boundary ondition an be implemented by modifying this sheme so that refleted partiles are onverted into holes, arrying negative mass in the overall onentration balane. A virtual distribution of partiles an be onstruted to simulate a onstant-onentration reservoir at an inflow or outflow boundary. Again the details of the implementation, together with eamples, an be found in Ref. [12]. To save omputational time, boundary onditions are only applied to partiles lose to the interfae, the ritial distane, d, being of the order of the RMS displaement. We fully epet that these boundary onditions an be applied to urved surfaes by dividing them into loally flat regions, for eample by triangulation. If the distane from the soure point to the nearest fae is less than d, the partile is adveted aording to Eq. (1) with the distanes and measured with respet to that fae. Sine this algorithm ignores urvature of the interfae, it is neessary to ensure that d is smaller than the harateristi length sale of the surfae features. In the viinity of a orner a refleted trajetory may enounter more than one surfae in a single time step. In this ase we have found [12] that the algorithm appropriate to eah interfae an be applied sequentially, at eah suessive enounter with a bounding surfae. For eample a speular refletion at a refleting wall followed by refletion plus onversion to holes at an absorbing one. This is simple to implement in the absene of the flow or when the onvetion is inluded to the first order in t. Seond-order orretions for the flow are diffiult to implement near a sharp orner, where the flow field is no longer a simple shear. However in this ase the first non-vanishing ontribution to the flow field is quadrati in the distane from the surfae and a first-order method is suffiient. III. MASS-TRANSFER BOUNDARY CONDITIONS In this paper we will investigate more omple boundary onditions desribing mass transfer due to hemial reations at the interfae: J i = f i ( 1, 2,... )ˆn (11) where J i is the flu of speies i aross the boundary, 1, 2,... are the onentrations of the respetive speies at the boundary, and ˆn(r) denotes a unit normal pointing into the fluid. Conservation of mass leads to the boundary ondition D i i (r) ˆn(r) = f( 1 (r), 2 (r),... ) r S, (12) The onvetive ontribution to the flu vanishes at a solid surfae and is omitted from Eq. (12). There are two qualitatively different ases ontained in Eq. (12), depending on the sign of f i : 1. f i ( 1, 2,... ) >. Partiles are added to the fluid (dissolution) 2. f i ( 1, 2,... ) <. Partiles are removed from the fluid (deposition).

Although surfae reation rates may depend on several onentrations, from now on we onsider only a single omponent in desribing our implementation of the various boundary onditions; the generalization to multiomponent systems is straightforward. In this setion we will onsider purely diffusive transport, for whih the Green s funtions near a planar interfae are known analytially. In setion IV we will generalize these results to a linear shear flow. 4 A. Dissolution A mass transfer boundary ondition speifies the flu of partiles, f( )ˆn, entering or leaving the system; f is presribed by the hemial kinetis at the surfae and is the onentration at the surfae (r S). The mass flu an be generated by distributing an appropriate number of partiles along the interfae, but the numerial implementation must lead to the orret onentration profile near the interfae as well. We first onsider onedimensional diffusion with a dissolving interfae at =, and show that the orret boundary ondition orresponds to a ontinuous (in time) onentration soure of strength s() = f( )δ(). (13) In the absene of the flow, suh a soure produes the onentration profile t [ s (, t + t) = f( ) 2G(,, t )dt = f( ( ) ] ) 4D t t = D π e 2 4D t Erf (14) 4D t where it has been assumed that the onentration at the wall,, is essentially unhanged during the timestep t. At the same time the partiles already in the system are refleted at the = wall. The total onentration profile is then (, t + t) = s (, t + t) + [G(,, t) + G(,, t)] (, t)d, (15) whih is the solution of the diffusion equation with an initial onentration profile (, t) and boundary onditions () = f( )/D and ( ) =. The derivative of the onentration profile in Eq. 15, ( ) = f( ) D Erf, (16) 4D t mathes the required flu f( ) at =. It then follows that a linear profile f( )/D is stationary near the dissolving wall. In multi-dimensional systems, a ontinuous partile soure again generates a mathing partile flu and onentration gradient. For eample, in a two dimensional system bounded by a dissolving wall =, with a spatially varying flu aross the interfae f( (y)), lim (, y, t + t) = lim s (, y, t + t) t = lim dt = = t = dy f( (y )) 2πD dy f( (y )) (y y ) 2 D e 4D t dy 1 2 +(y y ) 2 4πDt e 4Dt f( (y )) lim Ei( 2 + (y y ) 2 ) 4D t 1 lim π 2 + (y y ) 2 = f( (y)) D. (17) In implementing a ontinuous dissolution proess, it is not suffiient to simply ensure that the orret number of partiles, f( ) tds, are introdued through the surfae element ds. For eample, introduing the partiles at the beginning of eah timestep, rather than ontinuously throughout the timestep, produes a onentration profile with vanishing normal derivative at the wall, as shown in Fig. 2. Moreover disrete dissolution of partiles even fails to maintain the orret stationary state, as shown in Fig 3. The above analysis suggests the following proedure for implementing mass transfer boundary onditions, whih inorporates ontinuous dissolution:

5 1.5 1.5.5 1 1.5 2 FIG. 2: Disrete (dashed) versus ontinuous (solid) dissolution. In the disrete ase, a partile onentration () = δ() is plaed on a refleting wall at t =. In the ontinuous ase, partiles are released uniformly over the timestep t = 1. The graphs show the onentration profiles (, 1)..9.8.7.6 1 2 3 FIG. 3: Conentration profiles near a solid wall. A linear onentration profile (solid line), (, ) = f( ), with D f( ) = r( s ) and parameters s = 1, =.9 and r =.1 is adveted for a single step ( t = 1). The onentration profile (, 1) is shown for ontinuous dissolution (solid line) and disrete dissolution (dashed line). In the latter ase the linear profile is unsteady. 1. Divide the interfae into a number of ells S i 2. Determine the onentrations of the individual speies at the enter of eah ell, r i, (see setion III B), and alulate the flues J(r i ) = f[(r i )]ˆn(r i ) aording to Eq. (11). 3. Distribute partiles in the surfae element S i around r i. The eat distribution of partiles depends on the order of the approimation sheme. It is usually suffiient to inlude only linear variations in onentration along the surfae, so that where indiates a derivative along the interfae. f [(r)] = f [(r i )] + (r r i ) f [(r i )], r, r i S i (18) 4. Advane the soure partiles with a timestep piked from a uniform random distribution in the range [, t], to simulate ontinuous dissolution. Advane the partiles in the bulk by t, using speular refletion at the solid surfaes.

6 B. Measuring the onentration profile at the interfae In order to determine the interfaial flues in Eq. (11), the onentration profile of eah speies is required along the system boundaries. We have investigated several possible methods of measuring onentration and the method presented below is the most aurate sheme we have disovered so far. It is also robust and relatively simple to implement. First we disretize the system boundaries: for eample, on the = interfae, mesh points are of the form (, y k ) with = y < y 1 < < y n 1 < y n = L y. This divides the wall into n ells, C 1, C 2,..., C n, with C i etending from y i 1 to y i. The loation of eah element is taken to be the enter of ell C i, y i = 1 2 (y i + y i 1 ). (19) In order to determine the onentration profile on =, we measure the onentration profile in the viinity of the boundary by taking moments: Wn i 1,n 2 = 1 n 1 (y yi ) n 2, (2) hw i i where w i = y i y i 1 is the width of the i-th ell and the sum is over all partiles in the region < < h, y i 1 < y < y i. The value of h is empirially hosen as a ompromise between statistial errors, whih are minimized by large values of h, and systemati errors, whih are minimized by small values of h. Given a set of moments W i n 1,n 2, with n 1, n 2 m, the onentration and onentration gradients an be determined. The onentration around a ell i, loated on the boundary =, is epanded in a Taylor series i (, y) = i + i + i y(y y i ) +..., (21) where the onentration i = (, yi ) and derivatives i = (, yi ) and i y = y (, yi ) are determined at the enter of the ell, (, yi ). In the -th approimation the onentration in ell i is assumed to be uniform in the y-diretion and given by W, i with errors of order h. Solving the moment equations to first order gives i = 4W i, 6h 1 W i 1, (22) i y = 12w 2 W i,1, (23) with errors of order h 2. More involved epressions an be derived at 2nd-order and beyond, and in general the error is of order h m+1. Higher order shemes give more preise results provided that enough partiles are used to alulate the moments (2). However, inreasing the number of traer partiles is omputationally epensive and so only firstand seond-order shemes are used in this work. To make a omparison of different order measurements, we have inserted 5 1 6 partiles, distributed in the region < < h near the = wall with probability P (, y) ye (+y). Figure 4 shows measurements of the onentration profile on a uniform mesh y n = n/1, n =, 1,..., 1. It an be seen that wherever the profile hanges suffiiently slowly both first- and seond-order methods give aurate results. However, as y, where the distribution has a singular derivative, it is diffiult to obtain an aurate profile from the first-order tehnique. C. Deposition In a hemially reating system, partiles an also be deposited at an adsorbing wall, often in ombination with the dissolution of other speies. The deposition boundary ondition, f( ) < in Eq. (12), an be implemented in an eatly analogous fashion to the dissolving interfae by introduing holes, or partiles of negative mass. The addition of holes has the same effet on the onentration field in the bulk region V as removal of partiles from the same loations, but it is simpler to onstrut the orret distribution near an interfae by the addition of holes than by the removal of partiles. It an be shown that this algorithm has the same properties as the dissolution algorithm desribed in setion III A. It produes the orret mass flu aross the interfae and a linear distribution with the appropriate slope is again stationary. The trajetories of partiles and holes are onstruted from the same inrement distributions and the onentration field is then determined by the differene between the partile and hole onentrations. Partiles and holes an be anelled in the bulk phase to redue statistial flutuations [12]. In setion IV we will show how the dissolution and deposition boundary onditions an be modified, along the lines developed in Ref. [12], to take aount of a linearly varying flow field. In the remainder of this setion we will disuss alternative approahes, whih have more limited appliability, but whih may be useful in some irumstanes.

7.8.6.4.2.2.4.6.8 y FIG. 4: Conentration profile from 1st-order (irles) and 2nd-order (squares) moment methods. The solid symbols indiate the normalized differene between the measured onentration at the enter of the i-th ell, i, and the analyti solution i e: = ( i i e)/ i e. There is a substantial inrease in the error near y = where the derivative is singular. D. Linear kineti laws The simplest model for the dissolution of a solid speies has a linear kineti law, f( ) = r( s ), where s is the saturation onentration and r is a positive rate onstant. Material dissolves or deposits depending on whether the onentration in the solution net to the interfae is less than or greater than the saturation onentration. Heat transfer at an interfae an also be desribed by a similar rate law. If the surfae kinetis are linear, then it is possible to onstrut an algorithm that does not require a measurement of the surfae onentration,. The Green s funtion for the one dimensional diffusion equation with boundary ondition ( ) D = r (24) has the form G d (,, t) = = ( ) 1 e ( ) 2 4D t + e (+ ) 2 4D t r )/D 4πD t D er(r t++ Erf( + + 2r t ), (25) 4D t where Erf is the omplementary error funtion. The boundary ondition in Eq. (24) implies that the total mass of traer partiles dereases, so that M (, t) = G d (,, t)d < 1. (26) The mass of eah refleted partile must therefore be resaled by the fator M (, t), to aount for deposition of material at the boundary. The new loation of a partile already at is sampled from the probability distribution G d (,, t)/m (, t). A onstant flu of partiles, r s is added to the interfae to aount for the dissolution flu. The key advantage is that no onentration measurements are required, and this algorithm is therefore as aurate as the other refletion algorithms (for zero flu and zero onentration). However, it an only be implemented with a linear funtional form for f( ) and annot aount for more general surfae kinetis. E. Finite-range inrements It is not essential that W be a Gaussian inrement in order to obtain weak onvergene. For eample, any random variable with the orret seond moment guarantees weak first-order onvergene of the approimation sheme [13]. Finite-range inrements are frequently used [1, 7, 9] beause they are simpler and faster than Gaussian-sampled inrements. However, near an interfae any non-gaussian inrement redues the order of loal onvergene to 1/2 [11, 12], and does not guarantee global onvergene even in the t limit. As a result, the dissolution algorithm

with non-gaussian inrements does not lead to the orret steady state, as an be seen in Fig. 5. This ontrasts with the ase of refleting and absorbing boundaries, where non-gaussian inrements immediately impose the orret boundary ondition [12]..9 8.8.7.6 1 2 3 FIG. 5: Conentration profiles near a solid wall. A linear onentration profile (solid line), (, ) = f( ), with D f( ) = r( s ) and parameters s = 1, =.9 and r =.1 is adveted for a single step ( t = 1). The onentration profile (, 1) is shown for ontinuous dissolution with Gaussian inrements (solid line) and with inrements distributed uniformly in [ 3, 3] (dashed line). In the latter ase the linear profile turns out to be unsteady. Nevertheless, it is possible to onstrut an algorithm that leads to the orret stationary distribution, even with non-gaussian inrements. Let us again onsider one-dimensional diffusion with a reating interfae at =. Instead of a ontinuous soure plaed on the interfae, we onstrut a virtual distribution of instantaneous soures v () in a region behind the wall, <. The gradient in v is hosen to generate the desired partile flu aross the interfae. When these virtual partiles are propagated using an infinite spae Green s funtion G(, t), their onentration profile at t + t is v (, t + t) = d G(, t) v (, t). (27) After propagation, partiles moving into the region V ( > ) are retained whereas those outside V ( < ) are removed from further onsideration. Note that virtual partiles need only be plaed in a small region [ ma, ] behind the wall, where ma is the maimum inrement. The distribution v () is onstruted so that, on average, f( ) t virtual partiles ross the wall into the region V in one timestep, v (, t) = 2 f( ), <. (28) D A linear onentration profile f( )/D is then stationary; after one timestep, (, t + t) = [G(,, t) + G(,, t)] [ f( ) D ]d G(,, t)2 f( ) D d = G(,, t) f( ) D = f( ), (29) D where it has only been assumed that the propagator is translationally invariant and satisfies the first moment ondition G(,, t)( )d =. For Gaussian inrements, the distribution of virtual partiles v (, t + t) (Eq. 27) is eatly the same as the inremental onentration profile for ontinuous dissolution (setion III A). The key advantage of the virtual partile method is that the orret stationary state an be obtained by any translationally invariant propagator. The method an be generalized to more than one spatial dimension by inluding gradients along the interfae into the virtual partile distribution (28) (.f. Eq. (18)). However, we have not been able to generalize this method to inlude a fluid flow field, at least at this point in time. Therefore, in the remainder of the paper we will onsider ontinuous dissolution only, with partiles plaed on the interfae itself and Gaussian inrements used to move them.

9 IV. MASS TRANSFER IN THE PRESENCE OF FLOW The implementation of mass-transfer boundary onditions presented in setion III an be generalized to the ase of a loal shear flow by using the preditor-orretor sheme developed in Ref. [12], whih is summarized in setion II. The dissolution and deposition flues are set up by plaing an additional distribution of partiles on the interfae, as desribed in setion III. The onvetive ontribution to the tangential displaement of the soure partiles is determined by their normal displaements from the wall at the end of the timestep, and by the loal shear rate (Eq. 1). Figure 6 shows a onentration profile (,, t = 1) produed by a point soure loated on the wall ( = ) in presene of a shear flow (Eq. 7). The method is quadratially onvergent in t, and reasonable results an be obtained even for t =.5 while for the timestep t =.1 the onentration profile is indistinguishable from the eat one on the sale of the figure..1.5.25.5.75 1 FIG. 6: Continuous dissolution from a point soure in a linear shear flow (Eq. 7) with a Pelet number Pe=1. The soure is loated at = y = on a refleting wall, =. The onentration profiles (,, t = 1) for t = 1 (dash-dotted), t =.5 (dotted) and t =.1 (dashed) are ompared with the eat solution (solid). Simpler algorithms are muh less aurate and onverge only linearly with the timestep. Figures 7 and 8 show onentration profiles for the same system, using a simplified preditor orretor method and a first-order Euler sheme respetively. The preditor-orretor method uses the mean veloity at the beginning and end of the time step to estimate the onvetive displaement. The methods are both linearly onvergent in t, but the errors in the Euler sheme are muh larger and etend deeper into the bulk. To avoid ompliations assoiated with the infinite range of Gaussian propagators, it may prove advantageous to sample diffusive inrements of the partiles from trunated Gaussian distributions instead. The trunated Gaussian distribution is multiplied by a polynomial in 2 so as to reover the first two non-zero moments [12]. Figure 9 shows the onentration profile for different trunation distanes; for trunations larger than 3 t, the dynamis of the random walk are not notieably affeted. V. CONVECTION-DIFFUSION IN A RECTANGULAR CHANNEL In this paper we have onstruted a onsistent set of algorithms that impose a wide range of mass transfer boundary onditions. Here the algorithms are tested on two-dimensional onvetion-diffusion problems whose solution an be found independently. We take a hannel of width L y = 1 and length L = nl y, with a zero onentration inlet and outlet, (, y, t) = (L, y, t) =. The solid wall at y = is dissolving with kinetis desribed by the funtion f( ) = r( s ), while the wall at y = L y is absorbing with kinetis desribed by f( ) = r. Here r is the reation rate while s is the saturation onentration ( < s ). We note that dissolution and deposition kinetis possess the important property of negative feedbak. An inrease in onentration near a dissolving wall leads to a derease in the dissolution rate and vie versa, while on an adsorbing wall, an inrease in onentration inreases the deposition rate. Negative feedbak at reative boundaries is an important stabilizing feature, whih improves the auray of the numerial solutions beause the errors in onentration measurement do not grow with time.

1.15.1.5.25.5.75 1 FIG. 7: Continuous dissolution from a point soure in a linear shear flow (Eq. 7) with a Pelet number Pe=1. The soure is loated at = y = on a refleting wall, =. The onentration profiles (,, t = 1) obtained with use of a simplified preditor-orretor sheme for t = 1 (dash-dotted), t =.5 (dotted) and t =.1 (dashed) are ompared with the eat solution (solid)..15.1.5.25.5.75 1 FIG. 8: Continuous dissolution from a point soure in a linear shear flow (Eq. 7) with a Pelet number Pe=1. The soure is loated at = y = on a refleting wall, =. The onentration profiles (,, t = 1) obtained with use of a 1st order Euler method for t = 1 (dash-dotted), t =.5 (dotted) and t =.1 (dashed) are ompared with the eat solution (solid). The tests were run from the diffusion-dominated limit P e =.1, to the onvetion dominated limit P e = 1. The hannel length was inreased at higher Pelet numbers, so that the timestep an remain large without partiles entering and leaving within a single step. The Pelet number P e = V L y /D is defined in terms of the veloity at the enter of the hannel. The rate onstant r was taken to be r =.1, whih gives a Damköhler number Da = rl y /D = 2. For the Pelet number P e = 1, the simulations were run at additional Damköhler numbers Da =.2 (Fig. 14) and Da = 2 (Fig. 15). We have ompared the onentration flu at the absorbing wall with a multi-grid finite-differene ode from the NAG library [15]. The results in Figs. 1-15 show that the stohasti simulations are in essentially eat agreement with the finitedifferene results over most of the hannel, regardless of the Pelet or Damköhler numbers. However, there is a singularity in the onentration field in the orner ( =, y = ), where the boundary onditions = 1 (along = ) and = (along y = ) meet. The errors are largest at the highest Pelet number, as shown in Fig. 13. Here the time step must be redued by a fator of 3 to obtain aurate results in the viinity of the orner. The timestep must also be redued at high Damköhler number (Da > 1, Fig 15), but this is for stability rather than auray. If the system is far from equilibrium then there are rapid hanges in surfae onentration at the beginning of the alulation, while our dissolution-deposition algorithms assume that the hange in onentration over a single timestep is small.

11.15.1.5.25.5.75 1 FIG. 9: Continuous dissolution from a point soure in a linear shear flow (Eq. 7) with a Pelet number Pe=1. The soure is loated at = y = on a refleting wall, =. The onentration profiles (,, t = 1) were alulated using Gaussian propagators trunated at 2 t (dot-dashed), 2.5 t (dotted) and 3 t (dashed). The preditor-orretor method with speular refletion is used to integrate the stohasti differential equations. The onentration profiles (,, 1) are ompared with the eat solution (solid). The results for trunation distanes larger than 3 t are indistinguishable on the sale of the figure from those obtained with a Gaussian distribution. At Da = 2 we had to redue the timestep by an order of magnitude to obtain a stable solution, but it should be possible to use adaptive methods to inrease the timestep as the onentration at the interfae builds up toward its steady-state value. We note that Da > 1 is lose to a onstant onentration boundary ondition, eept near the inlet and outlet. 6 4 2 1 2 3 4 FIG. 1: The onentration profile on a dissolving wall at Pelet number P e =.1, as a funtion of the position along the hannel. Random walk simulations (open irles) with a time step t = 1 are ompared with finite-differene results (solid line). VI. CONCLUSIONS In this paper we have developed and tested stohasti algorithms to simulate boundary onditions involving mass transfer. Our aim was to develop algorithms that are robust, simple to implement, and fleible with regard to possible hemial kinetis. The key ideas are the introdution of partiles with negative mass (holes) to aount for deposition kinetis and the sampling of the timestep to model ontinuous dissolution. Combinations of these ideas enable the

12 6 4 2 1 2 3 4 FIG. 11: The onentration profile on a dissolving wall at Pelet number P e = 1, as a funtion of the position along the hannel. Random walk simulations (open irles) with a time step t = 1 are ompared with finite-differene results (solid line). 3 2 1 5 1 15 2 FIG. 12: The onentration profile on a dissolving wall at Pelet number P e = 1, as a funtion of the position along the hannel. Random walk simulations (open irles) with a time step t =.1 are ompared with finite-differene results (solid line). inlusion of surfae hemistry with omparable auray to the bulk. Convetive transfer near the interfae an be inluded up to seond order in t, using a sampling of partile paths to alulate the mean onvetive veloity. We have shown that these algorithms are muh more aurate than those generally in use today. We have tested a multi-dimensional implementation of the method, using a reative flow in a retangular hannel, for whih preise numerial solutions an be independently alulated. The stohasti simulations are in general indistinguishable from the finite-differene results, eept in the viinity of orners where the onentration gradient is very high. Even under the most etreme onditions, good agreement ould be obtained by reduing the time step by a fator of 3-1.

13 1 5 1 FIG. 13: The onentration profile on a dissolving wall at Pelet number P e = 1 at the inlet of the hannel for time steps t = 1 (irles), t = 1/3 (triangles) and t = 1/1 (squares). 1 5 1 2 3 4 FIG. 14: The onentration profile on a dissolving wall at Pelet number P e = 1 and Damköhler number Da =.2, as a funtion of the position along the hannel. Random walk simulations (open irles) with a time step t = 1 are ompared with finite-differene results (solid line). Aknowledgments This work was supported by the US Department of Energy, Chemial Sienes, Geosienes and Biosienes Division, Offie of Basi Energy Sienes, Offie of Siene (DE-FG2-98ER14853). [1] A. Haji-Sheikh and Sparrow E. M. The solution of heat ondution problems by probability methods. J. Heat Transfer, 122:121 131, 1967. [2] S. K. Fraley, T. J. Hoffman, and P. N. Stevens. A Monte Carlo method of solving heat ondution problems. J. Heat Transfer, 12:121 125, 198. [3] A. F. Ghoniem and F. S. Sherman. Grid-free simulation of diffusion using random walk methods. J. Comput. Phys., 61:1 37, 1985. [4] Yu. A. Shreider. The Monte Carlo Method. Pergamon Press, 1966. [5] A. J. Chorin. Numerial methods for use in ombustion modelling. In R. Glowinski and J. L. Lions, editors, Computing Methods in Applied Siene and Engineering, pages 229 235. North-Holland, Amsterdam, 198. [6] A. S. Sherman and Peskin C. S. Solving the Hodking-Huley equations by a random walk method. SIAM J. Si. Stat.

14 75 5 25 1 2 3 4 FIG. 15: The onentration profile on a dissolving wall at Pelet number P e = 1 and Damköhler number Da = 2, as a funtion of the position along the hannel. Random walk simulations (open irles) with a time step t =.1 are ompared with finite-differene results (solid line). Comput., 9:17 189, 1988. [7] J. Salles, J. F. Thovert, R. Delannay, L. Prevors, J. L. Auriault, and P. M. Adler. Taylor dispersion in porous media. Determination of the dispersion tensor. Phys. Fluids A, 5:2348 76, 1993. [8] T. Rage. Studies of Traer Dispersion and Fluid Flow in Porous Media. PhD thesis, University of Oslo, 1996. [9] R. S. Maier, D. M. Kroll, R. S. Bernard, S. E. Howington, J. F. Peters, and H. T. Davis. Pore-sale simulation of dispersion. Phys. Fluids, 12:265 279, 2. [1] R. Verberg and A. J. C. Ladd. Simulations of erosion in narrow fratures. Phys. Rev. E, 65:1671, 22. [11] J. Honerkamp. Stohasti Dynamial Systems. VCH Publishers In., New York, 1993. [12] P. Szymzak and A. J. C. Ladd. Boundary onditions for stohasti solutions of the onvetion-diffusion equation. Phys. Rev. E, 23. In Press. [13] H. C. Öttinger. Stohasti Proesses in Polymeri Fluids. Springer-Verlag, Berlin, 1996. [14] P. E. Kloeden and E. Platen. Numerial solution of stohasti differential equations. In Appliations of Mathematis 23. Springer, 1993. [15] The Numerial Algorithms Group Limited, Oford. NAG Fortran Library Manual, Mark 18, 1997.