0% found this document useful (0 votes)
21 views

models.particle.brownian_motion

Uploaded by

carlos t
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

models.particle.brownian_motion

Uploaded by

carlos t
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Created in COMSOL Multiphysics 5.

Brownian Motion

This model is licensed under the COMSOL Software License Agreement 5.4.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
Particle tracing offers an attractive alternative to continuum-based numerical methods,
such as the finite element method, for modeling species transport in strongly convecting
flows because the particle tracing method is insensitive to the magnitude of the Péclet
number. In most real systems, species transport has both a convective and diffusive
component. Particle tracing can be used to solve purely convective motion, purely
diffusive motion and anything in-between. Thus using a particle-based approach the entire
spectrum of Péclet numbers can be handled without encountering the numerical
instabilities associated with the continuum approach.

In this example the agreement between the continuum and particle-based numerical
methods is verified in the case of purely diffusive motion.

Model Definition
The diffusion equation is solved in two different ways. First, the species concentration is
computed using the Transport of Diluted Species interface, which uses a continuum model
in which the concentration is discretized using a finite element mesh in the modeling
domain. The equation governing the evolution of the concentration c (SI unit: mol/m3)
in a stagnant background fluid (u = 0) is:

∂c
+ ∇ ⋅ ( – D ∇c ) = 0
∂t

where the diffusion coefficient D (SI unit: m2/s) is defined as

kB T
D = ----------------
6πμr p

where

• kB = 1.3806488 × 10-23 J/K is Boltzmann’s constant,


• T (SI unit: K) is the absolute fluid temperature,
• μ (SI unit: Pa s) is the fluid viscosity, and
• rp (SI unit: m) is the particle radius.

The initial concentration is given by a Dirac delta function at the origin,

c 0 = δ ( 0, 0 )

2 | BROWNIAN MOTION
That is, the initial concentration is infinitely large at the origin and zero everywhere else,
such that the surface integral over any region containing the origin is unity. Because an
initial condition that is infinitely large at a point is impractical to model, the initial
concentration is instead given a very large finite value in a small area surrounding the
origin.

The model geometry consists of two concentric circles as shown in Figure 1. The initial
concentration diffuses from the origin radially outward in all directions. After 100 seconds,
some of the initial concentration has diffused from the inner circular domain to the outer
domain. The transmission probability for diffusion from the inner domain to the outer
domain is defined as:

 c dS
O
----------------------------------
-
α =
 c dS +  c dS
I O

where I denotes the inner domain and O the outer domain.

Outer domain

Inner domain

Figure 1: Model geometry. The concentration is initially a delta function at (0,0) and the
particles are all released at (0,0) with an initial velocity of zero.

3 | BROWNIAN MOTION
Diffusion can also be modeled using a particle-based approach. The combination of the
Brownian Force and the Drag Force results in diffusion of particles from regions of high to
low number density. The equations of motion are:

d m
( v ) = FD + Fb
dt p

F D =  ----- m p ( u – v )
1
 τ p

2
ρp dp
τ p = -------------
18μ

This is the Stokes drag law, which is appropriate when the relative Reynolds number of the
particles in the fluid is small. Because the fluid is stagnant and the particle speeds are low,
the Stokes drag law is applicable in this example. The Brownian force is given by

12πk B μTr p
F b = ζ -------------------------------
Δt

• mp (SI unit: kg) is the particle mass,


• dp (SI unit: m) is the particle diameter,
• τp (SI unit: s) is the particle velocity response time,
• v (SI unit: m/s) is the velocity of the particle,
• u (SI unit: m/s) is the fluid velocity, which in this example is set to zero representing a
stagnant background fluid,
• Δt (SI unit: s) is the size of the time step taken by the solver, and
• ζ (dimensionless) is a vector of independent, normally distributed random numbers
with zero mean and unit standard deviation.

As explained in Ref. 1, independent values are chosen for all components of ζ. A different
value of ζ is created for each particle, at each time step for each component of the
Brownian force. The Brownian force leads to spreading of particles from regions of high
particle density to low density.

Initially, 5000 particles are released from the origin with initial velocity components all
zero. The transmission probability from the inner to the outer domain is computed by
counting the number of particles in the outer domain and dividing it by the total number
of particles.

4 | BROWNIAN MOTION
Results and Discussion
The computed transmission probability for the two different methods is shown in Table 1.
Since the Brownian force uses pseudorandom number generators, the problem is solved
five times, each time with a different seed. In each case the transmission probability is
slightly different but all cases agree with the result from solving the diffusion equation.
TABLE 1: TABLE OF RESULTS FOR THE COMPUTED TRANSMISSION PROBABILITY

METHOD TRANSMISSION PROBABILITY

Diffusion Equation 0.23697


Particle Tracing 1 0.2374
Particle Tracing 2 0.239
Particle Tracing 3 0.241
Particle Tracing 4 0.2422
Particle Tracing 5 0.2418

Figure 2 plots the location of the particles at the final solution time for 4 different runs.

Figure 2: Plot of the particle location after 100 seconds. For each run, different random
numbers were generated.

5 | BROWNIAN MOTION
It is clear from these results that diffusive processes can be modeled using a particle-based
approach. Furthermore, if a significant nonzero background fluid velocity were applied,
the particle based approach would remain numerically stable.

Reference
1. M. Kim and A.L. Zydney, “Effect of Electrostatic, Hydrodynamic, and Brownian Forces
on Particle Trajectories and Sieving in Normal Flow Filtration”, J. Colloid and Interface
Science, vol. 269, pp. 425–431, 2004.

Application Library path: Particle_Tracing_Module/Tutorials/


brownian_motion

Modeling Instructions
From the File menu, choose New.

NEW
In the New window, click Model Wizard.

MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select Physics tree, select Chemical Species Transport>
Transport of Diluted Species (tds).
3 Click Add.
4 Click Study.
5 In the Select Study tree, select General Studies>Time Dependent.
6 Click Done.

GEOMETRY 1
Start by adding some definitions for the geometry and physical properties of the
background fluid.

GLOBAL DEFINITIONS
1 In the Model Builder window, under Global Definitions click Parameters 1.
2 In the Settings window for Parameters, locate the Parameters section.

6 | BROWNIAN MOTION
3 In the table, enter the following settings:

Name Expression Value Description


router 0.0005 5E-4 Outer radius
rinner 0.00025 2.5E-4 Inner radius
rp 1E-7[m] 1E-7 m Particle radius
T 300[K] 300 K Temperature
eta 2E-5[Pa*s] 2E-5 Pa·s Fluid viscosity
D k_B_const*T/(6*pi*eta*rp) 1.0987E-10 m²/s Diffusivity
ds 1 1 Input to random
number generator

GEOMETRY 1

Circle 1 (c1)
1 In the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type router.

Circle 2 (c2)
1 In the Geometry toolbar, click Primitives and choose Circle.
2 In the Settings window for Circle, locate the Size and Shape section.
3 In the Radius text field, type rinner.

Point 1 (pt1)
1 In the Geometry toolbar, click Primitives and choose Point.
2 In the Settings window for Point, click Build All Objects.
3 Click the Zoom Extents button in the Graphics toolbar. The geometry should look like
Figure 1.

DEFINITIONS
Construct an expression for the initial concentration, which is a smoothed delta function.

Variables 1
1 In the Home toolbar, click Variables and choose Local Variables.
2 In the Settings window for Variables, locate the Variables section.

7 | BROWNIAN MOTION
3 In the table, enter the following settings:

Name Expression Unit Description


smooth 2E-7 Smoothing distance
xd x[1/m] x coordinate
yd y[1/m] y coordinate
c0 1 Peak initial concentration
c_init 2*c0*(1-flc2hs(xd^2+ Initial concentration
yd^2-smooth^2,5e-11))

Define a pair of Integration component couplings so that the fraction of the concentration
that diffuses from the inner domain to the outer domain can be computed.

Integration 1 (intop1)
1 In the Definitions toolbar, click Component Couplings and choose Integration.
2 Select Domain 1 only.

Integration 2 (intop2)
1 In the Definitions toolbar, click Component Couplings and choose Integration.
2 Select Domain 2 only.

TRANSPORT OF DILUTED SPECIES (TDS)


1 In the Model Builder window, under Component 1 (comp1) click
Transport of Diluted Species (tds).
2 In the Settings window for Transport of Diluted Species, locate the Transport Mechanisms
section.
3 Clear the Convection check box.

Concentration 1
1 In the Physics toolbar, click Boundaries and choose Concentration.
2 Select Boundaries 1, 2, 5, and 8 only.
3 In the Settings window for Concentration, locate the Concentration section.
4 Select the Species c check box.

Transport Properties 1
1 In the Model Builder window, under Component 1 (comp1)>
Transport of Diluted Species (tds) click Transport Properties 1.
2 In the Settings window for Transport Properties, locate the Diffusion section.

8 | BROWNIAN MOTION
3 In the Dc text field, type D.

Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>
Transport of Diluted Species (tds) click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the c text field, type c_init.

MESH 1
Use a very fine mesh at the point (0, 0).

1 In the Model Builder window, under Component 1 (comp1) click Mesh 1.


2 In the Settings window for Mesh, locate the Physics-Controlled Mesh section.
3 From the Element size list, choose Extra fine.

Scale 1
1 Right-click Component 1 (comp1)>Mesh 1 and choose Scale.
2 In the Settings window for Scale, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Point.
4 Select Point 5 only.
5 Locate the Scale section. In the Element size scale text field, type 0.05.

Free Triangular 1
1 In the Model Builder window, right-click Mesh 1 and choose Free Triangular.
2 Click Build All.

STUDY 1

Step 1: Time Dependent


1 In the Model Builder window, under Study 1 click Step 1: Time Dependent.
2 In the Settings window for Time Dependent, locate the Study Settings section.
3 In the Times text field, type 0 100.
4 From the Tolerance list, choose User controlled.
5 In the Relative tolerance text field, type 1E-4.
6 In the Home toolbar, click Compute.

9 | BROWNIAN MOTION
RESULTS

Derived Values
Use the Global Evaluation feature to compute the fraction of the total concentration that
diffused from the inner domain to the outer domain.

Global Evaluation 1
1 In the Results toolbar, click Global Evaluation.
2 In the Settings window for Global Evaluation, locate the Data section.
3 From the Time selection list, choose Last.
4 Locate the Expressions section. In the table, enter the following settings:

Expression Unit Description


intop1(c)/(intop1(c)+intop2(c)) 1

5 Click New Table.

COMPONENT 1 (COMP1)
Now solve the same problem using a particle-based approach.

ADD PHYSICS
1 In the Home toolbar, click Add Physics to open the Add Physics window.
2 Go to the Add Physics window.
3 In the tree, select Fluid Flow>Particle Tracing>Particle Tracing for Fluid Flow (fpt).
4 Find the Physics interfaces in study subsection. In the table, clear the Solve check box for
Study 1.
5 Click Add to Component in the window toolbar.
6 In the Home toolbar, click Add Physics to close the Add Physics window.

ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Physics interfaces in study subsection. In the table, clear the Solve check box for
the Transport of Diluted Species (tds) interface.
4 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
5 Click Add Study in the window toolbar.

10 | BROWNIAN MOTION
6 In the Home toolbar, click Add Study to close the Add Study window.

ROOT
In the Model Builder window’s toolbar, click the Show button and select
Advanced Physics Options in the menu.

PARTICLE TRACING FOR FLUID FLOW (FPT)


1 In the Model Builder window, under Component 1 (comp1) click
Particle Tracing for Fluid Flow (fpt).
2 In the Settings window for Particle Tracing for Fluid Flow, click to expand the
Advanced Settings section.
3 From the Wall accuracy order list, choose 1.
4 From the Arguments for random number generation list, choose User defined.

Particle Properties 1
1 In the Model Builder window, under Component 1 (comp1)>
Particle Tracing for Fluid Flow (fpt) click Particle Properties 1.
2 In the Settings window for Particle Properties, locate the Particle Properties section.
3 In the dp text field, type 2*rp.

Drag Force 1
1 In the Physics toolbar, click Domains and choose Drag Force.
2 In the Settings window for Drag Force, locate the Domain Selection section.
3 From the Selection list, choose All domains.
4 Locate the Drag Force section. From the μ list, choose User defined. In the associated text
field, type eta.

Brownian Force 1
1 In the Physics toolbar, click Domains and choose Brownian Force.
2 In the Settings window for Brownian Force, locate the Domain Selection section.
3 From the Selection list, choose All domains.
4 Locate the Model Inputs section. In the T text field, type T.
5 Locate the Brownian Force section. From the μ list, choose User defined. In the associated
text field, type eta.
6 Locate the Advanced Settings section. In the i text field, type ds.

11 | BROWNIAN MOTION
Release from Grid 1
Release 5000 particles at the origin with an initial velocity of zero.

1 In the Physics toolbar, click Global and choose Release from Grid.
2 In the Settings window for Release from Grid, locate the Initial Velocity section.
3 From the Initial velocity list, choose Constant speed, spherical.
4 In the v0 text field, type 0.
5 In the Nvel text field, type 5000.

Particle Counter 1
1 In the Physics toolbar, click Domains and choose Particle Counter.
2 Select Domain 1 only.
3 In the Settings window for Particle Counter, locate the Particle Counter section.
4 From the Release feature list, choose Release from Grid 1.

The Brownian force depends on the time step taken by the solver. The default tolerances
are very strict for the particle tracing interfaces. When including forces with random
components such as the Brownian force the tolerances need to be relaxed, otherwise the
solver will take very small time steps and the model will take a long time to solve.

STUDY 2

Step 1: Time Dependent


1 In the Model Builder window, under Study 2 click Step 1: Time Dependent.
2 In the Settings window for Time Dependent, locate the Study Settings section.
3 In the Times text field, type 0 100.
4 From the Tolerance list, choose User controlled.
5 In the Relative tolerance text field, type 1E-3.
6 In the Study toolbar, click Show Default Solver.

Solution 2 (sol2)
1 In the Model Builder window, expand the Solution 2 (sol2) node, then click Time-
Dependent Solver 1.
2 In the Settings window for Time-Dependent Solver, click to expand the Absolute Tolerance
section.
3 In the Absolute tolerance text field, type 1E-3.
4 Clear the Update scaled absolute tolerance check box.

12 | BROWNIAN MOTION
5 In the Study toolbar, click Compute.

RESULTS

Global Evaluation 2
1 In the Results toolbar, click Global Evaluation.
2 In the Settings window for Global Evaluation, locate the Data section.
3 From the Data set list, choose Study 2/Solution 2 (sol2).
4 From the Time selection list, choose Last.
5 Click Replace Expression in the upper-right corner of the Expressions section. From the
menu, choose Component 1>Particle Tracing for Fluid Flow>Particle Counter 1>
fpt.pcnt1.alpha - Transmission probability.
6 Click Evaluate.

ROOT
Finally, add another study and solve the same problem 4 times, with different random
numbers generated for each run. A Parametric Sweep over the parameter ds is used to
create unique random numbers for each run.

ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Physics interfaces in study subsection. In the table, clear the Solve check box for
the Transport of Diluted Species (tds) interface.
4 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
5 Click Add Study in the window toolbar.
6 In the Home toolbar, click Add Study to close the Add Study window.

STUDY 3

Step 1: Time Dependent


1 In the Settings window for Time Dependent, locate the Study Settings section.
2 In the Times text field, type 0 100.
3 From the Tolerance list, choose User controlled.
4 In the Relative tolerance text field, type 1E-3.

13 | BROWNIAN MOTION
Parametric Sweep
1 In the Study toolbar, click Parametric Sweep.
2 In the Settings window for Parametric Sweep, locate the Study Settings section.
3 Click Add.
4 In the table, enter the following settings:

Parameter name Parameter value list Parameter unit


ds (Input to random number 2 3 4 5
generator)

5 In the Study toolbar, click Show Default Solver.

Solution 3 (sol3)
1 In the Model Builder window, expand the Solution 3 (sol3) node, then click Time-
Dependent Solver 1.
2 In the Settings window for Time-Dependent Solver, locate the Absolute Tolerance section.
3 In the Absolute tolerance text field, type 1E-3.
4 Clear the Update scaled absolute tolerance check box.
5 In the Study toolbar, click Compute.

RESULTS

Global Evaluation 3
1 In the Results toolbar, click Global Evaluation.
2 In the Settings window for Global Evaluation, locate the Data section.
3 From the Data set list, choose Study 3/Parametric Solutions 1 (sol4).
4 From the Time selection list, choose Last.
5 From the Table columns list, choose Time.
6 Click Replace Expression in the upper-right corner of the Expressions section. From the
menu, choose Component 1>Particle Tracing for Fluid Flow>Particle Counter 1>
fpt.pcnt1.alpha - Transmission probability.
7 Click the arrow next to the Evaluate button and select New table.

Particle Trajectories (fpt) 1


1 In the Model Builder window, under Results click Particle Trajectories (fpt) 1.
2 In the Settings window for 2D Plot Group, locate the Data section.
3 From the Parameter value (ds) list, choose 2.

14 | BROWNIAN MOTION
4 In the Particle Trajectories (fpt) 1 toolbar, click Plot.
5 Click the Zoom Extents button in the Graphics toolbar.
View the particle trajectories for other parameter values by selecting different options
from the Parameter value (ds) list. Note that the distributions all look similar but that
the particle positions are distinct in each plot. Four such plots are shown in Figure 2.

15 | BROWNIAN MOTION
16 | BROWNIAN MOTION

You might also like