12.07.2015 Views

Heavy metal adsorption on iron oxide and iron oxide-coated silica ...

Heavy metal adsorption on iron oxide and iron oxide-coated silica ...

Heavy metal adsorption on iron oxide and iron oxide-coated silica ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

APPENDIX GINTRAPARTICLE DIFFUSION MODELINGVBA code in Excel for estimating experimental surface diffusivity is listed below.Opti<strong>on</strong> ExplicitOpti<strong>on</strong> Base 1Functi<strong>on</strong> IntraDiff(mg1 As Range, rng2 As Range) As IntegerC<strong>on</strong>st fPi As Double = 3.14159265358979C<strong>on</strong>st fDay2Hour As Double = 24#C<strong>on</strong>st fMum2Cm As Double = 0.0001C<strong>on</strong>st fTol As Double = 0.0001IntraDiff = 0If mgl.Columns.Count 2 Or rngl.Rows.Count < 2 ThenMsgBox "Wr<strong>on</strong>g Pore size distributi<strong>on</strong> data!"IntraDiff = 1Exit Functi<strong>on</strong>End IfIf rng2.Columns.Count 2 Or rng2.Rows.Count < 2 ThenMsgBox "Wr<strong>on</strong>g CBC data!"IntraDiff = 2Exit Functi<strong>on</strong>End IfDim i As Integer, j As Integer, iCs As IntegerDim nPSD As Integer, nCBC As IntegerDim fRad() As Double, fVol() As Double, fMass() As DoubleDim fTime() As Double, fSorbExp() As DoubleDim fSorbPred() As DoublenPSD = rngl.Rows.CountnCBC = mg2.Rows.CountReDim fRad(nPSD), fVol(nPSD), fMass(nPSD)ReDim fTime(nCBC), fSorbExp(nCBC)ReDim fSorbPred(nCBC)For i = 1 To nPSDfRad(i) = mgl.Cells(i, 1) * 0.5 * fMum2CmfVol(i) = mg1 .Cells(i, 2) / 100#178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!