View
15
Download
0
Category
Preview:
Citation preview
Mathematical Validation of Biological Data
(Advance MATLAB Programming)
Dr. D. Datta
Head, Computational Radiation Physics Section
Health Physics Division
Bhabha Atomic Research Centre
Mumbai – 400085
ddatta@barc.gov.indbbrt_datta@yahoo.com
Mathematics ComputerAlgorithm
Process (Physics)
Computational Mathematics
Differential Equation
Large Scale Data Analysis
Integral Equation
Uncertainty & Reliability Analysis
Integro-Differential
Equation
An Architecture of Computational Mathematics
What is Data Mining?
Data mining is the process of searching large volumes of data for patterns, correlations and trends
Database
Data
MiningPatterns or
Knowledge
Decision
Support
Science
Business
Web
Government
etc.
Why is Data Mining Popular?
Data Flood
– Bank, telecom, other business transactions ...
– Scientific Data: astronomy, biology, etc
– Web, text, and e-commerce
Tasks Solved by Data Mining
• Learning association rules
• Learning sequential patterns
• Classification
• Numeric prediction
• Clustering
• etc.
Mathematical modeling of Biofilms
• Mathematical models of wastewater treatmentprocesses and biofilms in particular have been usedto understand the underlying mechanisms andstructures of these complex processes
• Biofilms
– Biofilms are most easily defined as layered aggregatesof microbial populations attached to each other or tosolid surfaces in aqueous environments or submergedin a liquid
What is biofilm?
• Extracellular carbohydrate matrix secreted by sessile (surface attached) bacteria– slimy, glue-like substance
• Protected growth mode– Exhibits high levels of antibiotic, host, pH and disinfecting
resistance. 1000x greater antibiotic resistance then planktonic cells.
Biofilm formation
• 3 stages:– Attachment
– Biofilm formation
– Persistence and detachment
What is the significance of biofilm?
– Implicated in a significant number of human bacterial infections
– Biofilms cost the nation billions of dollars yearly in damage
– Aid in bioremediation of hazardous waste sites, and protection of soil and groundwater from contamination
The Three Stages of Biofilm Development
Image used with permission, courtesy of Peg Dirckx, Montana State University
Typical Biofilm Mushroom-like structure with liquid channels
Photographs of various biofilms attached to white plastic surfaces in wastewater treatment
Physical Process for Mathematical Modeling
• Diffusion– In diffusion, particles move from areas with high concentration to
areas with low concentration down the concentration gradientwithout fluid motion
– a passive process (no input energy is required from particles)
• Advection
– Transport of solutes within a fluid by bits bulk flow
• Note: A porous biofilm with water channels allows advection evenwithin the aggregate. On the other hand, in a cell cluster where bacteriaare densely packed advection cannot take place due to physicalobstacles, wherefore substrates must be transported into and throughthe aggregate by diffusion. As a consequence, diffusion limitation arisesin biofilm systems as the diffusion distance increases substantially acrossa complex biofilm structure
Modeling Approaches
Small length and time scale. Computational models: MD simulations,
Monte Carlo Simulations, Ab Initio computations,
discrete mechanical models, etc.
These are microscopic models. (Computational intensive.)
Intermediate length and time scale. Kinetic theories, multi-scale kinetic theories, Coarse
grain models (Dissipative particle methods),
Bownian dynamics, Lattice Botzmann Method
These are mesoscale models (Hopefully, computational manageable)
Large length and time scale. Continuum models, multiscale continuum models,
reduced order models, etc.
These are macroscopic models (Computational less expensive)
(Phase space or configurational space) Kinetic theory for complex fluids (Doi & Edwards, 1986, Bird et al., 1987)
Mesoscopic description: dynamical distribution of “model” molecules. The transport equation is the Smoluchowski
equation or kinetic equation
Coupling via macroscopic velocity, velocity gradient, moments of the distribution
Macroscopic description: mass, momentum, and energy balance equations.
Conservation equations
Constitutive equations
Kinetic equations: mesoscopic transport equations
Coupling to the macroscopic transport equations
Smoluchowski equation for pdf at mesoscale
Balance equations for mass, momentum, energy at the macroscopic scale
• The coupling with the macroscopic mass, momentum, and energy transportis achieved via the stress constitutive equation. The viscous part of theextra stress and the elastic part of the extra stress is calculated separately.
• The viscous part of the extra stress is done semi-phenomenologically byfluid dynamics and/or ensemble averaging.
• The elastic part of the extra stress is done using the variational principle orthe virtual work principle for equilibrium dynamics. For nonequilibriumdynamics (like active systems), averaged forces per unit area have to becalculated using ensemble averages (Kirdwood, Briels & Dhont, etc.).
• Two examples of kinetic theories are given in the following to elucidate theformulation: biofilms and polymer particulate nanocomposites.
Example 1: Biofilms
Biofilm forms when bacteria adhere to surfaces in moist environments byexcreting a slimy, glue-like substance called the extracellular polymericsubstance (EPS).
Wherever you find acombination ofbacteria, moisture,nutrients and asurface, you are likelyto find biofilms
Biofilm expansion, growth and transport
process in flows
Biofilm Models
• Biofilms were roughly perceived as homogeneous layers ofbiomass that could grow by consuming a substrate deliveredwith the bulk liquid
• Biofilm models are changing with advances in microbiologyand with the increase in possible applications
• The most significant distinctions are made between one-dimensional (1D) and two- and three-dimensional models(2D/3D), dynamic and steady state models, and singlespecies/substrate and multi-species/-substrate models
1D Wanner-Gujer modelLet fi (t, z) denote the volume fraction of species i, i = 1, : : : ,nx , at the time t and the distance z from the substratum, atwhich z = 0, and set up the microbial mass balance as
with initial conditions fi(0, z), where 0,i(t, z) is the observed specific growthrate for species i and u(t, z) denotes the velocity at which the microbialmass moves perpendicular to the substratum
Using the assumption that the sum of the volume fractions of all species equals 1
Advection Reaction Eq.
The biofilm thickness (t) changes at the biofilm-liquidinterface at a velocity
dt
dtu
)(
Diffusion Reaction Eq.
Relationship between different models with respect tomass balance equations for the biomass compounds Xi
Microscopic
Why we do simulation
In some cases, experiment is
1. Impossible Inside of stars Weather forecast
2. too dangerous Flight simulationExplosion simulation
3. Expensive High pressure simulationWind channel simulation
4. Blind Some properties cannot beobserved on very short time-scalesand very small space-scales
Simulation is a useful complement, because it can
replace experiment provoke experiment explain experiment establish intellectual property
Systolic flow in the superior mesenteric artery
Artery Simulation of systolic flow in the superior mesenteric artery. Thearterial structure (a); a snapshot of the simulation (b); a comparison of thevelocity profiles between LBM (bullets) and FEM (solid lines) at the region andB at 0.04 second intervals throughout one systolic period, with velocitiespresented in m/s. (structure and FEM data from University of Sheffield, UK)
Carotid artery with stenosis
Example, in-Stent Restenosis
Simplified model
MultiPhysics MultiScale• We use Lattice Boltzmann Method (LBM) as a solver in
multiphysics multiscale applications
• Coupling LBM with solvers for
– Diffusion
– Reactions
– Biological processes
– Fluid-Structure interaction
• Multiscale modeling
– Fast systolic flows (LBM) to slowly proliferating cells
The Navier-Stokes Equations for an incompressible fluid
0. u
upuut
u 2).(
Fluid velocity
Pressure
Viscosity
The Boltzmann Equation -1
f(x,v): single particle distribution function(f) : Boltzmann collision term (highly non-linear in f)
Collision term must satisfy conservation of mass,momentum and energy
)(. fx
fv
t
f
Particle speed
The Boltzmann Equation -2
Macroscopic fields are obtained by taking velocity moments of f
dvvxfxuvxex
dvvxfvxux
dvvxfx
),()(2
1)()(
),()()(
),()(
2
In the limit of low Knudsen and low Mach numbers, it can beshown that these fields obey the Navier-Stokes equations
Macroscopic quantities• We live in a macroscopic world and macroscopic quantities are of
interest to us, whereas distribution functions are not as meaningful
• Macroscopic quantities (velocity u, pressure p, mass density ,momentum density u, . . . ) are directly obtained by solving the Navier-Stokes equation
• In the LBM, macroscopic quantities are obtained by evaluating thehydrodynamic moments of the distribution function f
• Connections of the distribution function to macroscopic quantities for the density and momentum flux are defined as follows
Macroscopic fluid density is defined asthe sum of the distribution functions.
Macroscopic velocity is an average ofthe microscopic velocities ek weightedby the directional densities fk.
Mass m of particles is set to 1.
Equilibrium Distribution Function• Equilibrium distribution function fEQ, which appears in the BGK collision
operator, is basically an expansion of the Maxwell’s distribution functionfor low Mach number M
• We start with normalized Maxwell’s distribution function
• Now we expand this equation for small velocities M = u/cs << 1,where cs
represents speed of sound
Equilibrium distribution function is of the form
where k runs from 0 to M and represents available directions in the lattice, and wk are weighting factors
uuueeeue
eeef..2
2
9.
2
92
2
9
3/23/2
2
.2
9
.2
9.
2
3.31
3/2ueuuueef
ee
Macroscopic Governing Equations
• Diffusion or heat equation
• Convection-Diffusion/Dispersion Equation (CDE)
2
2
x
CD
t
C
2
2
x
CD
x
Cv
t
C
The Lattice Gas Cellular AutomatonU. Frisch et al., Phys. Rev. Lett 56, 1505 (1986)
• Regular lattice with enough symmetry.
• Particles live on the lattice.
– Streaming over the links;
– Collisions at the nodes;
• conservation of mass, momentum, and energy.
• Very easy simulation, trivial for parallel computing
• One can prove that this LGA recovers the Navier-Stokesequations
The lattice Boltzmann method has its roots in thelattice gas automata (LGA), kinetic model with discretelattice and discrete time
The Hexagonal Lattice
The evolution equation of the LGA
where et are local particle velocities, is the collisionoperator, t is time step
Collision operator contains all possible collisions. Forexample, in case of a hexagonal lattice, two-, three- andfour-body collisions are possible.
There are scattering rules that bring proper dynamics to thesystem
Number -1 means that the particle was destroyed, 0 leavesthings unchanged and 1 means new particle is created
Boolean nature is preserved
Mitxntxnttexn iiii ,...,2,1,0,,,1,
The evolution equation of the LGA
where et are local particle velocities, is the collisionoperator, t is time step
Collision operator contains all possible collisions. Forexample, in case of a hexagonal lattice, two-, three- andfour-body collisions are possible.
There are scattering rules that bring proper dynamics to thesystem
Number -1 means that the particle was destroyed, 0 leavesthings unchanged and 1 means new particle is created
Boolean nature is preserved
Mitxntxnttexn iiii ,...,2,1,0,,,1,
Boolean nature is preserved It is important to stress that interaction is completely
local Neighbouring sites do not interact.
Configuration of particles at each time step evolves intwo sequential sub-steps:
streaming: each particle moves to the nearest node inthe direction of its velocity
collision: particles arrive at a node and interact bychanging their velocity directions accordingto scattering rules
If we set the collision operator to zero, then we obtain anequation for streaming alone
1. Assume molecular chaos
2. Ensemble averaging and Taylor expansion ofevolution equation
3. Apply mass and momentum conservation
4. Solve equations using Chapman-Enskog expansion
The Lattice Boltzmann Method
1. Discretize velocity space in a very small set ofvelocities;
2. Use a very simple collision operator, usually theBGK collision operator is applied;
3. Discretize space in a lattice with enough symmetry;
4. Use finite differencing for the differential operators
5. Choose the time step, lattice spacing, and discreteset of velocities, such that fit exactly, allowingstreaming over the links of the lattice and collisionson the nodes
BGK Model Equation
• Collision operator k as mentioned before is in general acomplex non-linear integral.
• The idea is to linearize the collision term around its localequilibrium solution. k is often replaced by the so-calledBGK (Bhatnagar, Gross, Krook, 1954) collision operator
where is the rate of relaxation towards local equilibrium,
fkEQ is equilibrium distribution function
Routes to the Lattice Boltzmann Equation (LBE)
The completely discretized equation with the time step t andspace step xk = ek t is
Heart of Lattice Boltzmann Method
After introducing the BGKapproximation, the Boltzmannequation (without external forces)can be written as
Collision step
Streaming step
Second order PDE
Need to treat the non linearconvective term u.u
Need to solve Poissonequation for the pressure p
First order PDE
Avoids convective term
Convection becomes simpleadvectionPressure p is obtained fromequation of state
From Lattice Gas Automata to Lattice Boltzmann Equation
• The main motivation for the transition from LGA to LBM wasthe desire to remove the statistical noise by replacing particleoccupation variables ni (Boolean variables) with singleparticle distribution functions
• These functions are an ensemble average of nk and realvariables nk can be 0 or 1 whereas fk can be any real numberbetween 0 and 1
• In order to obtain the macroscopic behavior of a system(streamlines) in the LGA, one has to average the state of eachcell over a rather large patch of cells (for example a 32 × 32square) and over several consecutive time steps
kk nf
Ensemble averaging of the evolution equation leads to
which becomes, using the definitions and the molecularchaos assumption
Let us deal with the distribution function f(x, e, t)
f(x, e, t) represents the number of particles with mass m at time tpositioned between x + dx which have velocities between e + de
we apply force F on these particlesAfter time dt, position and velocity obtain new values
If there is no collision, the number of particles before and after applying force stays the same
The rate of change between final and initial status of thedistribution function is called collision operator
Evolution equation with collisions now writes as
dxdetexfdxdedttdtm
Feedtxf ),,(),,(
dxdedtfdxdetexfdxdedttdtm
Feedtxf )(),,(),,(
)( fdt
Df dt
t
fde
e
fdx
x
fDf
t
f
dt
de
e
f
dt
dx
x
f
dt
Df
)( fe
f
m
Fe
x
f
t
f
Boltzmann equation for a case without external forces (F = 0)
Kinetic form stays the same as in LGA and we write it as
where t is a time increment, fk is the particle velocitydistribution along the kth direction, or in another words, fk
is the fraction of the particles having velocities in theinterval ek and ek + d ek
Two-dimensional lattice models
D2Q4 D2Q5D2Q7
D2Q9
In practical applications,the macroscopicquantity should beequal to the LBM(micro) quantity
Lattice Boltzmann method of Solute Transport
i
i
ii
i
x
CD
xx
Cu
t
C )(
To solve the above equation at pore scale by LatticeBoltzmann Method we treat the concentration of species asa distribution function which obeys the Boltzmann equationgiven below
Concentration C is defined as
eqfftxftttexf
1),(,
txftxC ,),(
To evaluate the equilibrium distribution function we use thefollowing constraints on equilibrium function
On the basis of these constraints, equilibrium distribution function can be written as
We apply Chapman-Enskog expansion for distribution function
)( 2)2(2)1()0( Offff
eqx fftxftttexf
1),(,LBE
Chapman-Enskogexpansion
Taylor’s Expansion of
LBE
t
ye
t
xet yx
,,
eq
j
j
j
j ffOfx
et
fx
et
1)(
2
1 3
2
2
Substitute f from Chapman-Enskog expansion and Equating order of on both sides
eqff )0()0( :
)1()0()1( 1:
ff
xe
t j
j
)2()0(
2
)1()2( 1
2
1:
ff
xe
tf
xe
t j
j
j
j
A
B
Continued from previous slide )2()1( 1
2
11
ff
xe
t j
j
)(1
2
11 )2()1()1()0(
fffx
et
fx
et j
j
j
j
t
fe
x
x
fee
xfe
xf
t
i
i
j
ji
i
i
i
)0(
)0()0()0(
2
1
2
1
C
Equation (A) + Equation(C) x
00 )1()2()1(
f
tff and We have these relations at our hand
02
11 )1()0()0(
fex
fex
ft
j
j
i
i
Using these relations and conservation condition
Using Equation (A) into
the Equation
(D)
D
t
fe
x
x
fee
xfe
xf
t
i
i
j
ji
i
i
i
)0(
)0()0()0(
2
1
2
1
The last term on the right hand side is small compared to thefist term and hence we can omit that and by doing so, wenow have
j
ji
i
i
i x
fee
xfe
xf
t
)0()0()0(
2
1
i
yxi
i
i
i x
Cee
xCu
xC
t 2
1)(
Flow field after 3701t
x
y
5 10 15 20 25 30
5
10
15
20
25
30
2D Lattice Boltzmann (BGK) model of a fluid with D2Q9 structure
% 2D Lattice Boltzmann (BGK) model of a fluid.% c4 c3 c2 D2Q9 model. At each timestep, particle densities propagate% \ | / outwards in the directions indicated in the figure. An% c5 -c9 - c1 equivalent 'equilibrium' density is found, and the densities% / | \ relax towards that state, in a proportion governed by omega.% c6 c7 c8%The bounceback boundary condition means that the actual boundary lies%mid-way between the open and closed nodes
-50 -40 -30 -20 -10 0 10 20 30 40 500
1
2
3
4
5
6
7
8x 10
-6 Comparison of analytical with LBM results
location in channel
speed
Diffusion Modeling with LB• Flekøy [PRE 1993]/Yoshino and Inamuro [Int. J. Num. Meth. 2003]
– Multicomponent LB
– Separate ‘passive’ distribution
• Shan and Doolen [PRE 1996]
– Multicomponent, multiphase LB (Phase separation possible)
– Separate ‘active’ distribution
– ‘Complementary’ densities
• Diffusion coefficient:
12 61.02
1
3
1
tsluD s
Relaxation time
0
200
400
600
800
1000
1200
-50 -30 -10 10 30 50
x (lu)
C (
mu
lu
-2)
Solvent
Solute
• Fick’s 2nd Law:
• Unbounded domain
– Plane instantaneous source
– Extended source
2
2
dx
CdD
dt
dC
Dt
x
Dt
MCC
4exp
2
2
00
Dt
xherf
Dt
xherf
CC
442
0
Initial Mass
0
10
20
30
40
50
60
70
80
90
-100 -50 0 50 100
x (lu)
C (
mu
lu
-2)
t = 100
t = 200
t = 1100
0
100
200
300
400
500
600
700
800
-500 -300 -100 100 300 500
x (lu)
C (
mu
lu
-2)
t = 1000
t = 2000
t =11000
Crank, J. 1975. The Mathematics of Diffusion, 2nd ed. Clarendon Press, Oxford. 414 pp.1-D Tests
Initial Concentration
Half-width of source
1-D Test with a wall• Finite system:
• Standard ‘Bounce-back’ from solids boundary works for diffusion
n
n Dt
xnlherf
Dt
xnlherf
CC
4
2
4
2
2
0
00
x
C
0
max
xx
C
Superposition of original process and reflections
0
50
100
150
200
250
300
350
400
450
500
-50 -30 -10 10 30 50
x (lu)
C (
mu
lu
-2)
t = 1000
t = 2000
t =11000
Bounce back alone is a suitable no flux BC
2-D Test
• Instantaneous point source:
Dt
r
Dt
MCC
4exp
4
2
00
9
10
11
12
13
14
15
16
-50 -30 -10 10 30 50
x (lu)
C (
mu
lu
-2)
t = 100
t = 200
t =1100
Solute Transport in Porous Media
‘Pre-asymptotic’ transport• Test LBM against classic analytical
solutions to the CDE, their boundary conditions, and concentration detection modes
• Work of van Genucthen et al [1981 –2001] and Kreft and Zuber [1978]
2
2
x
CD
x
Cv
t
C
D
vLBr
mD
vPe
4 Classical Analytical Solutions
at 3 Brenner Numbers:
Analytical Solutions Solution Reference
A-1
2/12/1
0 2exp
2
1
22
1
DRt
vtRxerfc
D
vx
DRt
vtRxerfc
C
C
Lapidus and Amundson, 1952. The mathematics of adsorption in beds. IV.
The effect of longitudinal diffusion in ion exchange chromatographic columns. J.
Phys Chem. 56:984-988.
A-2
2/1
2
22/12
2/1
0
2exp1
2
1
4exp
22
1
DRt
vtRxerfc
D
vx
DR
tv
D
vx
DRt
vtRx
DR
tv
DRt
vtRxerfc
C
C
Lindstrom, Hague, Freed, and Boersma, 1967. Theory on the movement
of some herbicides in soils: linear diffusion and convection of chemicals in soils.
Environ. Sci. Technol. 1:561:565
A-3
02
)cot(
22
42expsin2
11
2
2
2
22
0
D
vL
D
vL
D
vL
RL
Dt
DR
tv
D
vx
L
x
C
C
mm
m
m
mmm
Cleary and Adrian, 1973. Analytical solution of the convective dispersive
equation for cation adsorption in soils. Soil Sci. Am. Proc. 37:197-199.
A-4
04
)cot(
22
42expsin
2cos
2
1
2
12
2
2
2
2
22
0
D
vL
vL
D
D
vL
D
vL
D
vL
RL
Dt
DR
tv
D
vx
L
x
D
vL
L
x
D
vL
C
C
mmm
m
mm
mmmmm
Brenner, 1962. The diffusion model of longitudinal mixing in beds of finite
length. Numerical values. Chem. Eng. Sci. 17:229-243.
van Genuchten M Th and Wierenga PJ (1986) Solute dispersion coefficients and retardation factors. In: Klute A (ed.) Methods of Soil Analysis, 2nd edn, Part 1, pp 1025-1054. American Society of Agronomy, Madison, Wisconsin.
Convection-Diffusion (1D Open)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3
Pore Volumes
C/C
0
Cr
A-1 Analytical
Cr
A-3 Analytical
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.5 1 1.5 2 2.5 3
Pore Volumes
C/C
0
CrAnalytical A-2CfAnalytical (A-1 Cr)CrAnalytical A-4
• V = 0.0066 lu ts-1
• Dm = 0.166 lu2 ts-1
• L = 25 lu
• Br = vL/Dm = 1
z
x
Flow field at y=5, after 317t
2 4 6 8 10 12
2
4
6
8
10
12
76
Recommended