File:Smoluchowski equation.gif

Summary

Description
English: The Smoluchowski equation generalizes the diffusion equation to the presence of an external potential.

β is the thermodynamic beta D is the diffusion coefficient U is the external potential

(Notice that there is more than one equation known as "Smoluchowski equation")
Date
Source https://twitter.com/j_bertolotti/status/1279010141254410243
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929
GIF development
InfoField

Mathematica 12.1 code

d = 1; \[Beta] = 10;
U[x_] := 0;
sol1 = NDSolve[{D[p[x, t], t] == D[d E^(-\[Beta] U[x]) D[E^(\[Beta] U[x]) p[x, t], x], x], p[x, 0] == E^(-(x^2/(2 0.1^2))), p[50, t] == 0, p[-50, t] == 0}, p, {t, 0, 10}, {x, -50, 50}]
U[x_] := 0.1 x;
sol2 = NDSolve[{D[p[x, t], t] == D[d E^(-\[Beta] U[x]) D[E^(\[Beta] U[x]) p[x, t], x], x], p[x, 0] == E^(-(x^2/(2 0.1^2))), p[50, t] == 0, p[-50, t] == 0}, p, {t, 0, 10}, {x, -50, 50}]
U[x_] := 0.5 x^2;
sol3 = NDSolve[{D[p[x, t], t] == D[d E^(-\[Beta] U[x]) D[E^(\[Beta] U[x]) p[x, t], x], x], p[x, 0] == E^(-(x^2/(2 0.1^2))), p[50, t] == 0, p[-50, t] == 0}, p, {t, 0, 10}, {x, -50, 50}]
U[x_] := 0.3 x^4 + 0.2 Cos[5 \[Pi] x] + 0.2;
sol4 = NDSolve[{D[p[x, t], t] == D[d E^(-\[Beta] U[x]) D[E^(\[Beta] U[x]) p[x, t], x], x], p[x, 0] == E^(-(x^2/(2 0.1^2))), p[50, t] == 0, p[-50, t] == 0}, p, {t, 0, 5}, {x, -50, 50}]
p0 = Table[
   Grid[{
     {Text[Style["\!\(\*FractionBox[\(d\\\ p\), \(d\\\ t\)]\)= \[Del].(D \!\(\*SuperscriptBox[\(e\), \(\(-\[Beta]\)\\\ U\)]\) \[Del] \!\(\*SuperscriptBox[\(e\), \(\[Beta]\\\ U\)]\) p)", Bold]], SpanFromLeft, SpanFromLeft, ""},{
      Plot[{0, Evaluate[p[x, t] /. sol1] /. {t -> \[Tau]}}, {x, -1.5, 1.5}, PlotRange -> {-0.1, 1.2}, Axes -> False, Filling -> Axis, PlotStyle -> {Orange, Purple}]
      ,
      Plot[{0.1 x + 0.2, Evaluate[p[x, t] /. sol2] /. {t -> \[Tau]}}, {x, -1.5, 1.5}, PlotRange -> {-0.1, 1.2}, Axes -> False, Filling -> Axis, PlotStyle -> {Orange, Purple}]
      ,
      LineLegend[{Purple, Orange}, {"Concentration p(x,t)", "Potential U(x)"}]
      }, {
      Plot[{0.5 x^2, Evaluate[p[x, t] /. sol3] /. {t -> \[Tau]}}, {x, -1.5, 1.5}, PlotRange -> {-0.1, 1.2}, Axes -> False, Filling -> Axis, PlotStyle -> {Orange, Purple}]
      ,
      Plot[{0.3 x^4 + 0.2 Cos[5 \[Pi] x] + 0.2, Evaluate[p[x, t] /. sol4] /. {t -> \[Tau]}}, {x, -1.5, 1.5}, PlotRange -> {-0.1, 1.2}, Axes -> False, Filling -> Axis, PlotStyle -> {Orange, Purple}]
      , SpanFromAbove
      }}]
   , {\[Tau], 0, 0.5, 0.002}];
ListAnimate[p0]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Smoluchowski%20equation.gifCategory:Self-published work
Category:Animations of diffusion Category:Animations of statistical mechanics Category:Images with Mathematica source code Category:Animated GIF files between 50 MP and 100 MP Category:Animated GIF files
Category:Animated GIF files Category:Animated GIF files between 50 MP and 100 MP Category:Animations of diffusion Category:Animations of statistical mechanics Category:CC-Zero Category:Images with Mathematica source code Category:PNG created with Mathematica Category:Self-published work