{"title":"Optimal finite-differences discretization for the diffusion equation from the perspective of large-deviation theory","authors":"Naftali R Smith","doi":"10.1088/1742-5468/ad363f","DOIUrl":null,"url":null,"abstract":"When applying the finite-differences method to numerically solve the one-dimensional diffusion equation, one must choose discretization steps Δ<italic toggle=\"yes\">x</italic>, Δ<italic toggle=\"yes\">t</italic> in space and time, respectively. By applying large-deviation theory on the discretized dynamics, we analyze the numerical errors due to the discretization, and find that the (relative) errors are especially large in regions of space where the concentration of particles is very small. We find that the choice <inline-formula>\n<tex-math><?CDATA $\\Delta t = {\\Delta x}^2 / (6D)$?></tex-math>\n<mml:math overflow=\"scroll\"><mml:mrow><mml:mi mathvariant=\"normal\">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant=\"normal\">Δ</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mo stretchy=\"false\">(</mml:mo><mml:mn>6</mml:mn><mml:mi>D</mml:mi><mml:mo stretchy=\"false\">)</mml:mo></mml:mrow></mml:math>\n<inline-graphic xlink:href=\"jstatad363fieqn1.gif\" xlink:type=\"simple\"></inline-graphic>\n</inline-formula>, where <italic toggle=\"yes\">D</italic> is the diffusion coefficient, gives optimal accuracy compared to any other choice (including, in particular, the limit <inline-formula>\n<tex-math><?CDATA $\\Delta t \\to 0$?></tex-math>\n<mml:math overflow=\"scroll\"><mml:mrow><mml:mi mathvariant=\"normal\">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo accent=\"false\" stretchy=\"false\">→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:math>\n<inline-graphic xlink:href=\"jstatad363fieqn2.gif\" xlink:type=\"simple\"></inline-graphic>\n</inline-formula>), thus reproducing the known result that may be obtained using truncation error analysis. In addition, we give quantitative estimates for the dynamical lengthscale that describes the size of the spatial region in which the numerical solution is accurate, and study its dependence on the discretization parameters. We then turn to study the advection–diffusion equation, and obtain explicit expressions for the optimal Δ<italic toggle=\"yes\">t</italic> and other parameters of the finite-differences scheme, in terms of Δ<italic toggle=\"yes\">x</italic>, <italic toggle=\"yes\">D</italic> and the advection velocity. We apply these results to study large deviations of the area swept by a diffusing particle in one dimension, trapped by an external potential <inline-formula>\n<tex-math><?CDATA ${\\sim}|x|$?></tex-math>\n<mml:math overflow=\"scroll\"><mml:mrow><mml:mrow><mml:mo>∼</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy=\"false\">|</mml:mo></mml:mrow><mml:mi>x</mml:mi><mml:mo stretchy=\"false\">|</mml:mo></mml:mrow></mml:math>\n<inline-graphic xlink:href=\"jstatad363fieqn3.gif\" xlink:type=\"simple\"></inline-graphic>\n</inline-formula>. We extend our analysis to higher dimensions by combining our results from the one dimensional case with the locally one-dimension method.","PeriodicalId":17207,"journal":{"name":"Journal of Statistical Mechanics: Theory and Experiment","volume":"176 1","pages":""},"PeriodicalIF":2.2000,"publicationDate":"2024-04-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Statistical Mechanics: Theory and Experiment","FirstCategoryId":"101","ListUrlMain":"https://doi.org/10.1088/1742-5468/ad363f","RegionNum":3,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"MECHANICS","Score":null,"Total":0}
引用次数: 0
Abstract
When applying the finite-differences method to numerically solve the one-dimensional diffusion equation, one must choose discretization steps Δx, Δt in space and time, respectively. By applying large-deviation theory on the discretized dynamics, we analyze the numerical errors due to the discretization, and find that the (relative) errors are especially large in regions of space where the concentration of particles is very small. We find that the choice Δt=Δx2/(6D), where D is the diffusion coefficient, gives optimal accuracy compared to any other choice (including, in particular, the limit Δt→0), thus reproducing the known result that may be obtained using truncation error analysis. In addition, we give quantitative estimates for the dynamical lengthscale that describes the size of the spatial region in which the numerical solution is accurate, and study its dependence on the discretization parameters. We then turn to study the advection–diffusion equation, and obtain explicit expressions for the optimal Δt and other parameters of the finite-differences scheme, in terms of Δx, D and the advection velocity. We apply these results to study large deviations of the area swept by a diffusing particle in one dimension, trapped by an external potential ∼|x|. We extend our analysis to higher dimensions by combining our results from the one dimensional case with the locally one-dimension method.
期刊介绍:
JSTAT is targeted to a broad community interested in different aspects of statistical physics, which are roughly defined by the fields represented in the conferences called ''Statistical Physics''. Submissions from experimentalists working on all the topics which have some ''connection to statistical physics are also strongly encouraged.
The journal covers different topics which correspond to the following keyword sections.
1. Quantum statistical physics, condensed matter, integrable systems
Scientific Directors: Eduardo Fradkin and Giuseppe Mussardo
2. Classical statistical mechanics, equilibrium and non-equilibrium
Scientific Directors: David Mukamel, Matteo Marsili and Giuseppe Mussardo
3. Disordered systems, classical and quantum
Scientific Directors: Eduardo Fradkin and Riccardo Zecchina
4. Interdisciplinary statistical mechanics
Scientific Directors: Matteo Marsili and Riccardo Zecchina
5. Biological modelling and information
Scientific Directors: Matteo Marsili, William Bialek and Riccardo Zecchina