MATH564 Homework 4: Random motion and diffusion

Topics

Atomic motion

Some basic physical constants relevant to atomic physics. The Avogadro constant is the number of particles per mole

(Subscript[N, A])=N[Entity["PhysicalConstant","AvogadroConstant"]["Value"]]

The Boltzmann constant, a rescaling of temperature and energy units

(Subscript[k, B])=N[Entity["PhysicalConstant","BoltzmannConstant"]["Value"]]

The atomic mass unit, defined as 1/12 of the mass of a (C^12) isotope expressed in kilograms

(Subscript[m, u]) = UnitConvert[Quantity[1,"AtomicMassUnit"],"Kilograms"]

The mass of a carbon atom in atomic mass units and kilograms

(Subscript[m, C])=ElementData["Carbon","AtomicWeight"]

UnitConvert[(Subscript[m, C]),"Kilograms"]

One-dimensional, constant step random walk

Generate

Nrw=10000;
n=500;
ms=N[Table[Total[Table[2*RandomInteger[]-1,n]],Nrw]];
Histogram[ms]

Mean[ms]

FindDistributionParameters[ms,NormalDistribution[μ,σ]]

n=100;
DiscretePlot[PDF[BinomialDistribution[n,.5],x],{x,0,n},PlotRange->All]

Plot[PDF[NormalDistribution[0,1],x],{x,-10,10},PlotRange->All]

Stirling’s formula

nfact=Table[N[Log[n!]],{n,1000,10000,1000}]

nStir=Table[N[n Log[n]-n+0.5 Log[n]],{n,1000,10000,1000}]

Normal distribution

α=1;
Plot[Evaluate[Table[PDF[NormalDistribution[0,2 α t],x],{t,0.001,1.001,.1}]],{x,-5,5},PlotRange->All]

Diffusion equation

DiffEq= D[c[x,t],t] == α D[c[x,t],{x,2}]

deq[c_]:= D[c,t]- α D[c,{x,2}]

DiffEq /. c[x,t]->(1/(Sqrt[2π α t])) Exp[((-(x^2))/(4 α t))]

G[x_,t_,α_]=(1/(Sqrt[2π α t])) Exp[((-(x^2))/(4 α t))]

Simplify[deq[G[x,t,α]]]

Plot[Evaluate[Table[G[x,t,1],{t,0.01,0.1,0.01}]],{x,-5,5},PlotRange->All]

InitCond = c[x,1]==(1/(Sqrt[2π α ])) Exp[((-(x^2))/(4 α ))]

Simplify[DSolve[{DiffEq,InitCond},c[x,t],{x,t}][[1,1]]]

Placental oxygen transport model

Overview of mathematical model

Fetal oxygen is supplied from the mother through a complex transport mechanism involving two circulatory systems and diffusion across a placental membrane. The chemical basis of oxygen transport is affinity of binding to hemoglobin

The following diagram shows the main physical processes and proposed mathematical models:
1. Binding/unbinding of oxygen to fetal hemoglobin (ODE)
2. Diffusion across the placenta (PDE: diffusion equation)
3. Binding/unbinding of oxygen to maternal  hemoglobin (ODE)

The affinity of oxygen to hemoglobin is modulated by other blood factors: partial oxygen pressure and pH.
The mathematical quantities needed to model placental oxygen transport are:
 - cO2M[t,pH,pO2], cO2F[t,pH,pO2],cO2P[x,t]
 The following conditions hold:
 1)  cO2P[x=0,t] = cO2M[t,pHM,pO2M] (oxygen concentration on the mother side of placenta is imposed)
 1)  cO2P[x=h,t] = cO2F[t,pHF,pO2F] (oxygen concentration on the fetal  side of placenta is imposed)

Oxygen affinity model

The oxygen concentration dependence on pH-factor and partial oxygen pressure is empirically known

pO2=Table[10.k,{k,0,10}]

cO2FpH74 = {0.,3.5,10.5,15.2,17.4,18.6,19.2,19.5,19.7,19.8,19.9};
cO2FpH72 = {0.,2.2,7.3,12.0,15.2,16.9,18.0,18.6,19.1,19.5,19.8};
cO2MpH74 = {0.,1.3,4.6,8.7,11.5,13.2,14.2,14.7,14.9,15.0,15.1};
cO2MpH72 = {0.,1.0,4.0,7.8,10.6,12.5,13.7,14.4,14.7,14.9,15.1};tab641 = {pO2,cO2FpH74,cO2FpH72,cO2MpH74,cO2MpH72};
TableForm[tab641]

plt641data = Map[ Transpose[{pO2,#}]&,{cO2FpH74,cO2FpH72,cO2MpH74,cO2MpH72}];

ListPlot[plt641data,Joined->True,PlotMarkers->Automatic,PlotLegends->{"FpH74","FpH72","MpH74","MpH72"},Frame->True,FrameLabel->{"pO2","cO2"},PlotLabel->"O2 concentration for F/M partial O2 pressure at various pH",GridLines->Automatic]

Diagram of the model

Mass balance in Mother blood stream. Let QM, QF denote the volumetric flow rates in mother, fetus (measured in ml/min)

dcO2M = -J a dx dt = - αO2 (((cO2M - cO2F))/h) dx  (*per unit time, steady state*)

dcO2F = J a dx dt = αO2 (((cO2M - cO2F))/h) dx (*per unit time, steady state*)

O2DEM = QM D[cO2M[x],x] + αO2 (cO2M[x] - cO2F[x]) == 0;
O2DEF = QF D[cO2F[x],x] - αO2 (cO2M[x] - cO2F[x]) == 0;

InitCondCoFlow = { cO2M[0] == cO2M0, cO2F[0] == cO2F0 };
InitCondCounterFlow = { cO2M[0] == cO2M0, cO2F[0] == cO2F0 };

CoFlowingModel =Flatten[ { O2DEM, O2DEF, InitCondCoFlow }]

sol[cO2M0_,cO2F0_,QM_,QF_,αO2_]  = {cO2M[x],cO2F[x]} /. DSolve[CoFlowingModel ,{cO2M[x],cO2F[x]},x][[1]]

Plot[Evaluate[sol[2.,1.,10.,1.,1.]],{x,0,1},Frame->True,FrameLabel->{"x","cO2"},GridLines->Automatic,PlotRange->All,PlotLegends->{"M","F"}]

Integrate[sol[2.,1.,10.,1.,1.][[1]]-sol[2.,1.,10.,1.,1.][[2]],{x,0,1}]

Plot[Evaluate[sol[2.,1.6,10.,-1.,1.]],{x,0,1},Frame->True,FrameLabel->{"x","cO2"},GridLines->Automatic,PlotRange->All,PlotLegends->{"M","F"}]

Integrate[sol[2.,1.6,10.,-1.,1.][[1]] - sol[2.,1.6,10.,-1.,1.][[2]] ,{x,0,1}]

Oxygen-hemoglobin fetal model

Derive a model for fetal oxygen

DEqO2F = D[cO2F[t, pH, pO2], t] == (supply) - (consumption)

(supply)  = (flux from placenta) (area) = S J[h,t]
(consumption) = rFO2

Define the fetal O2 consumption rate

rFO2 = 22.5; (* ml O2/min = cm3 O2 / min *)

Placenta model

Define the geometry of the placental membrane

wP = 3.5 (10^(-4)); (* thickness, cm *)
SP = 12 (10^4); (* area, cm2 *)

Define the O2 diffusive flux, driven by the difference in O2 concentration on the M/F sides of the placenta, and apply Henry’s law: concentration is proportional to partial pressure

αO2 = 2.4 (10^(-5)); (* cm2/min *)
JO2 = αO2 (cO2M - cO2F);

Blood flow model

Let QM, QF denote the blood volume flow rates in mother/fetus. Write mass balance equations

Problems

Problem 1: Effect of placental oxygen partial pressure

Exercise 2, p. 197

Problem 2: Effect of pH

Exercise 3, p. 197

Problem 3: Counterbalancing (Subscript[pO, 2]) and pH

Exercise 4, p. 197

Problem 4: Intermediate membrane diffusion

Exercise 5, p. 197