stochastic simulation of reaction-diffusion systems: a ... · pdf fileadd reactions...

1
DOE ASCR Applied Mathematics Principal Investigators' (PI) Meeting, Rockville, MD, September 11-12, 2017 Approach Abstract Conclusions and Future Work Motivation Stochastic Simulation of Reaction-Diffusion Systems: A Fluctuating Hydrodynamics Approach J. B. Bell 1 , C. Kim 1 , A. Nonaka 1 , A. L. Garcia 2 , and A. Donev 3 1 Lawrence Berkeley National Laboratory Center for Computational Sciences and Engineering 2 San Jose State University, 3 Courant Institute Results Areas in which we can help References Areas in which we need help We develop numerical methods for stochastic reaction-diffusion systems based on approaches used for fluctuating hydrodynamics (FHD). Our formulation is similar to the reaction-diffusion master equation (RDME) description when the stochastic PDEs are spatially discretized and reactions are modeled as a source term having Poisson fluctuations. However, unlike the RDME, which becomes prohibitively expensive for a increasing number of molecules, our FHD-based description naturally extends from the regime where fluctuations are strong, i.e., each mesoscopic cell has few reactive molecules, to regimes with moderate or weak fluctuations, and ultimately to the deterministic limit. In addition, our approach can be readily generalized to more realistic diffusion models and naturally coupled with (fluctuating) hydrodynamic equations. C. Kim, A. Nonaka, J. B. Bell, A. L. Garcia, and A. Donev, “Stochastic simulation of reaction-diffusion systems: A fluctuating-hydrodynamics approach”, J. Chem. Phys. 146, 124110 (2017). A. K. Bhattacharjee, K. Balakrishnan, A. L. Garcia, J. B. Bell, and A. Donev, “Fluctuating hydrodynamics of multi-species reactive mixtures”, J. Chem. Phys. 142, 224107 (2015). A. Donev, A. Nonaka, A. K. Bhattacharjee, A. L. Garcia, and J. B. Bell, “Low Mach number fluctuating hydrodynamics of multispecies liquid mixtures”, Phys. Fluids 27, 037103 (2015). Modeling chemical reactions at different scales Macroscopic scales Ø Law of mass action → ODEs Ø Efficient ODE integration algorithms Microscopic scales Ø Chemical master equation Ø Model as Markov process (SSA) At intermediate scales, law of mass action is not correct but SSA is too expensive. New approach based on fluctuating hydrodynamics Ø Stochastic PDE for diffusion Ø Tau-leaping treatment of chemistry Ø Generalized to include effects of fluid flow Spatial Discretization (set of stochastic ODEs) Cartesian grid finite volume approach for number densities 1. Diffusion-only SPDEs Ø Validity beyond the Gaussian approximation, including non-negativity, depends on the form of the face average, , used in the stochastic mass flux. 2. Add reactions Ø Instead of using the chemical Langevin equation, which can give physically wrong results, we use the tau-leaping method. 2D Pattern formation We test our numerical methods on a time-dependent problem and compare them with a reference RDME-based method. 1D Schlögl model We first validate our formulation and numerical schemes using analytic results for steady- state properties of this simple model. 3D front propagation We demonstrate the scalability to large systems and computational efficiency of our FHD approach using this 3-dimensional example. The system is divided into 256 3 cells and involves the equivalent of 10 12 molecules. Chemo-hydrodynamic instabilities (ongoing work) We generalize our formulation so that reaction and diffusion are coupled with fluid flow. One interesting example is the formation of asymmetric convective fingers observed in the Rayleigh-Taylor instability when coupled to a neutralization reaction. We combine the efficiency of the fluctuating hydrodynamics approach (→diffusion) and the rigor of the master equation approach (→ reaction). Temporal integrator (implicit midpoint + tau-leaping scheme) Ø Deterministic diffusion part is treated implicitly → stability limit is bypassed. Ø Second-order weak accuracy for linearized equations Ø We implement the algorithm using the AMReX software framework. (available at https://github.com/BoxLib-Codes/FHD_ReactDiff.git) 1D We characterize the pattern formation using the decay pattern of the average concentration of U molecules. This statistical analysis shows that our FHD- based method reproduces the RDME results. However, our method is much faster. If there are many molecules per cell (→ large cross- section value A), the RDME-based algorithm is too slow. Thermodynamic equilibrium, strong fluctuations: For 10 molecules per cell, our method accurately reproduces the Poisson distribution. This is not trivial at all because we use continuous-range number density and Gaussian white noise. This also validates our choice for the face average, . Out of equilibrium, weak fluctuations: Linearized analysis on the structure factor shows that our implicit scheme (ImMidTau) gives very accurate structure factors even if time step size is much larger than the stability limit t max . The resulting structure factor is third-order accurate. ImMidTau t = 5 t max ExMidTau t = 0.5 t max Stochastic reaction-diffusion Corresponding deterministic simulation with the same noisy initial condition t = 8 s t = 16 s NaOH (aq) (denser) HCl (aq) HCl + NaOH NaCl + H 2 O Corresponding no-reaction case Based on our analytical and numerical investigation, we conclude that our algorithm (ImMidTau) is an efficient and robust alternative numerical method for stochastic reaction-diffusion simulations. 1. Computational cost does not increase for increasing number of molecules per cell. Hence, our method can efficiently simulate reaction-diffusion systems over a broad range of relative magnitude of the fluctuations. 2. The scheme allows a significantly larger time step size without degrading accuracy compared to existing RDME-based numerical methods. 3. Our FHD-based approach can take advantage of efficient parallel algorithms. 4. The method has been generalized to more complex problems that include fluid flow with realistic multi-component diffusion. Future work: ionic species will be included for the simulation of electro-chemical phenomena in electrolyte solutions. Mesoscopic modeling of reactions Stochastic simulation algorithms Hybrid algorithms Improved linear solvers for evolving architectures Programming models to support GPU

Upload: phamdat

Post on 18-Mar-2018

217 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Stochastic Simulation of Reaction-Diffusion Systems: A ... · PDF fileAdd reactions ØInstead of using the chemical Langevin equation, which can give physically wrong results ... bell2_poster_ascr_ampi2017

DOEASCRAppliedMathematicsPrincipalInvestigators'(PI)Meeting,Rockville,MD,September11-12,2017

Approach

Abstract

Conclusions and Future Work

Motivation

Stochastic Simulation of Reaction-Diffusion Systems:A Fluctuating Hydrodynamics Approach

J. B. Bell1, C. Kim1, A. Nonaka1, A. L. Garcia2, and A. Donev3

1Lawrence Berkeley National LaboratoryCenter for Computational Sciences and Engineering

2San Jose State University, 3Courant Institute

Results

Areas in which we can help

References

Areas in which we need help

Wedevelopnumericalmethodsforstochasticreaction-diffusionsystemsbasedonapproachesusedforfluctuatinghydrodynamics(FHD).Ourformulationissimilartothereaction-diffusionmasterequation(RDME)descriptionwhenthestochasticPDEsarespatiallydiscretizedandreactionsaremodeledasasourcetermhavingPoissonfluctuations.However,unliketheRDME,whichbecomesprohibitivelyexpensiveforaincreasingnumberofmolecules,ourFHD-baseddescriptionnaturallyextendsfromtheregimewherefluctuationsarestrong,i.e.,eachmesoscopiccellhasfewreactivemolecules,toregimeswithmoderateorweakfluctuations,andultimatelytothedeterministiclimit.Inaddition,ourapproachcanbereadilygeneralizedtomorerealisticdiffusionmodelsandnaturallycoupledwith(fluctuating)hydrodynamicequations.

• C. Kim, A. Nonaka, J. B. Bell, A. L. Garcia, and A. Donev, “Stochastic simulation ofreaction-diffusion systems: A fluctuating-hydrodynamics approach”, J. Chem. Phys.146, 124110 (2017).

• A. K. Bhattacharjee, K. Balakrishnan, A. L. Garcia, J. B. Bell, and A. Donev, “Fluctuatinghydrodynamics of multi-species reactive mixtures”, J. Chem. Phys. 142, 224107 (2015).

• A. Donev, A. Nonaka, A. K. Bhattacharjee, A. L. Garcia, and J. B. Bell, “Low Machnumber fluctuating hydrodynamics of multispecies liquid mixtures”, Phys. Fluids 27,037103 (2015).

Modelingchemicalreactionsatdifferentscales• MacroscopicscalesØ Lawofmassaction→ODEsØ EfficientODEintegrationalgorithms

• MicroscopicscalesØ ChemicalmasterequationØ ModelasMarkovprocess(SSA)

• Atintermediatescales,lawofmassactionisnotcorrectbutSSAistooexpensive.

• NewapproachbasedonfluctuatinghydrodynamicsØ StochasticPDEfordiffusionØ Tau-leapingtreatmentofchemistryØ Generalizedtoincludeeffectsoffluidflow

SpatialDiscretization(setofstochasticODEs)Cartesiangridfinitevolumeapproachfornumberdensities1.Diffusion-onlySPDEs

Ø ValiditybeyondtheGaussianapproximation,includingnon-negativity,dependsontheformofthefaceaverage,,usedinthestochasticmassflux.

2.Addreactions

Ø InsteadofusingthechemicalLangevinequation,whichcangivephysicallywrongresults,weusethetau-leapingmethod.

2DPatternformationWetestournumericalmethodsonatime-dependentproblemandcomparethemwithareferenceRDME-basedmethod.

1DSchlöglmodelWefirstvalidateourformulationandnumericalschemesusinganalyticresultsforsteady-statepropertiesofthissimplemodel.

3DfrontpropagationWedemonstratethescalabilitytolargesystemsandcomputationalefficiencyofourFHDapproachusingthis3-dimensionalexample.Thesystemisdividedinto2563 cellsandinvolvestheequivalentof1012 molecules.

Chemo-hydrodynamicinstabilities(ongoingwork)Wegeneralizeourformulationsothatreactionanddiffusionarecoupledwithfluidflow.OneinterestingexampleistheformationofasymmetricconvectivefingersobservedintheRayleigh-Taylorinstabilitywhencoupledtoaneutralizationreaction.

Wecombinetheefficiency ofthefluctuatinghydrodynamicsapproach(→diffusion)andtherigor ofthemasterequationapproach(→reaction).

Temporalintegrator(implicitmidpoint+tau-leapingscheme)

Ø Deterministicdiffusionpartistreatedimplicitly→stabilitylimitisbypassed.Ø Second-orderweakaccuracyforlinearizedequationsØ WeimplementthealgorithmusingtheAMReXsoftwareframework.

(availableathttps://github.com/BoxLib-Codes/FHD_ReactDiff.git)

1D

WecharacterizethepatternformationusingthedecaypatternoftheaverageconcentrationofUmolecules.

ThisstatisticalanalysisshowsthatourFHD-basedmethodreproducestheRDMEresults.However,ourmethodismuchfaster.Iftherearemanymoleculespercell(→largecross-sectionvalueA),theRDME-basedalgorithmistooslow.

Thermodynamicequilibrium,strongfluctuations:For10moleculespercell,ourmethodaccuratelyreproducesthePoissondistribution.Thisisnottrivialatallbecauseweusecontinuous-rangenumberdensityandGaussianwhitenoise.Thisalsovalidatesourchoiceforthefaceaverage,.

Outofequilibrium,weakfluctuations:Linearizedanalysisonthestructurefactorshowsthatourimplicitscheme(ImMidTau)givesveryaccuratestructurefactorseveniftimestepsizeismuchlargerthanthestabilitylimit∆tmax.Theresultingstructurefactoristhird-orderaccurate.

ImMidTau∆t = 5 ∆tmax

ExMidTau∆t = 0.5 ∆tmax

Stochasticreaction-diffusion

Correspondingdeterministicsimulationwiththesamenoisyinitialcondition

t = 8 s t = 16 s

NaOH (aq) (denser)

HCl (aq)

HCl + NaOH → NaCl + H2O Corresponding no-reaction case

Basedonouranalyticalandnumericalinvestigation,weconcludethatouralgorithm(ImMidTau)isanefficientandrobustalternativenumericalmethodforstochasticreaction-diffusionsimulations.

1. Computationalcostdoesnotincreaseforincreasingnumberofmoleculespercell.Hence,ourmethodcanefficientlysimulatereaction-diffusionsystemsoverabroadrangeofrelativemagnitudeofthefluctuations.

2. TheschemeallowsasignificantlylargertimestepsizewithoutdegradingaccuracycomparedtoexistingRDME-basednumericalmethods.

3. OurFHD-basedapproachcantakeadvantageofefficientparallelalgorithms.

4. Themethodhasbeengeneralizedtomorecomplexproblemsthatincludefluidflowwithrealisticmulti-componentdiffusion.

Futurework:ionicspecieswillbeincludedforthesimulationofelectro-chemicalphenomenainelectrolytesolutions.

• Mesoscopicmodelingofreactions• Stochasticsimulationalgorithms• Hybridalgorithms

• Improvedlinearsolversforevolvingarchitectures• ProgrammingmodelstosupportGPU