• No results found

The release rate model/macro for the hydraulic convection of urea from a reactive layer polyurethane extracted in water used the data from the input parameters from “Sheet1” to calculate the cumulative amount of solute released for individual coated granules in a population of 500 granules with randomised volume change, granule radii and film thickness based on the measured means and standard deviations of these factors. The resulting array is then accumulated into daily totals which are divided by the total granule weight to give a daily proportion released printed to the output field “Proportion released”, Figure A1.

Figure A1 Layout of input parameters and output fields for the Hydraulic

165 Sub hydrolic_convection()

'Variables

DaltaV = Worksheets("Sheet1").Cells(4, 4) „Input γ sddaltaV = Worksheets("Sheet1").Cells(4, 5) „Input σγ

gradii = Worksheets("Sheet1").Cells(5, 4) „Input R sdradii = Worksheets("Sheet1").Cells(5, 5) „Input σR

film = Worksheets("Sheet1").Cells(6, 4) „Input lo

sdfilm = Worksheets("Sheet1").Cells(6, 5) „Input σlo

Temp = Worksheets("Sheet1").Cells(8, 4) „Input Temp densityS = Worksheets("Sheet1").Cells(7, 4) „Input ρs

numberdays = Worksheets("Sheet1").Cells(9, 4) „Input number of days Wmin = Worksheets("Sheet1").Cells(14, 4) „Input W‟min

'Calculated saturated concentration of urea solution g/cc Conc = 0.00696 * Temp + 0.45

' Calculation of saturated solution water activity molConc = Conc * 1000 / 60

be = 1 b = -0.0608 n = 0.283

a0 = 1 / (1 + 0.018 * (be - b * (molConc ^ n)) * molConc) ' Calculation Delta P in Pa

Pwvo = 133.32 * Exp(20.386 - (5132 / (273 + Temp))) DaltaP = (1 - a0) * Pwvo

Dim mass(501) Dim Sum(500)

ReDim Cs(1 + numberdays) ReDim Release(1 + numberdays)

ReDim amount(500 + 1, 1 + numberdays) ReDim Cumlative(1 + numberdays)

For j = 1 To 500

10 radii = Application.WorksheetFunction.NormInv(Rnd, gradii, sdradii) If radii < 0.1 Then GoTo 10

20 v = Application.WorksheetFunction.NormInv(Rnd, DaltaV, sddaltaV) If v < 0.02 Then GoTo 20

166 30 fi = Application.WorksheetFunction.NormInv(Rnd, film, sdfilm)

If fi < 0.0001 Then GoTo 30

mass(j) = 4 / 3 * Pi * (radii ^ 3) * densityS

' Modelled water vapour permeability as a function of mean coating thickness W = Wmin + 0.00000405 * Exp(-2800 * fi)

' proportion released per day of original mass equation 2.15 Constantrate = ((3 * W * DaltaP * Conc) / (radii * fi * densityS))

„Calculation of lag time T1 and the end of the constant rate period T2

T1 = 0

'T1 = Int((v * radii * fi) / (3 * W * DaltaP))

T2 = Int((1 - (v + 1) * Conc / densityS) / Constantrate) + T1 For t = 1 To numberdays 'Time delay Release(t) = 0 „Constant rate period

If t > T1 Then Release(t) = Constantrate * Int(t - T1) „Falling rate period

If t > T2 Then Cs(T2) = Conc 'd = t - 1

mol = Cs(t - 1) * 1000 / 60 If mol < 0 Then mol = 0 be = 1

b = -0.0608 n = 0.283

a = 1 / (1 + 0.018 * (be - b * (mol ^ n)) * mol) dC = 3 * W * Pwvo * (1 - a) * Cs(t - 1) / (radii * fi) Cs(t) = Cs(t - 1) - dC

Release(t) = 1 - ((v + 1) * Cs(t - 1) / densityS) End If

167 amount(j, t) = (Release(t) * mass(j))

Next Next

„Output summation of daily amounts released and conversion to proportion of total mass

r = 200 c = 500 For i = 1 To r For K = 1 To c

amount(K + 1, i) = amount(K + 1, i) + amount(K, i)

Next K

Next i

For m = 1 To 500

mass(m + 1) = mass(m + 1) + mass(m) Next

For s = 1 To 200

Worksheets("Sheet1").Cells(s + 2, 9) = amount(501, s) / mass(501)

Next

168 A1.1 Field conditions

Under field conditions, climatic and soil data was required in addition to the granule properties; these are the volumetric water content and daily mean temperature. This data is entered into the fields in the spread sheet and used by the macro to adjust the daily release rates for climactic variations.

As T1 and T2 can no longer be simply calculated the macro/model uses an

accumulative release criteria to determine when the granule soil core has dissolved. This was based on temperature and solubility of urea (mass(j) * (1 - ((v + 1) * Conc /

densityS).

Figure A1.1 Layout of input parameters and output fields for Hydraulic convection model with daily field data in Excel 2007

169 Sub hydraulic _convection()

'Variables

DaltaV = Worksheets("Sheet1").Cells(4, 4) „Input γ sddaltaV = Worksheets("Sheet1").Cells(4, 5) „Input σγ

gradii = Worksheets("Sheet1").Cells(5, 4) „Input R sdradii = Worksheets("Sheet1").Cells(5, 5) „Input σR

film = Worksheets("Sheet1").Cells(6, 4) „Input lo

sdfilm = Worksheets("Sheet1").Cells(6, 5) „Input σlo

Temp = Worksheets("Sheet1").Cells(8, 4) „Input Temp densityS = Worksheets("Sheet1").Cells(7, 4) „Input ρs

numberdays = Worksheets("Sheet1").Cells(9, 4) „Input number of days Wmin = Worksheets("Sheet1").Cells(14, 4) „Input W‟min

„ Define arrays Dim mass(501) Dim Sum(500)

ReDim Cs(1 + numberdays) ReDim Release(1 + numberdays)

ReDim Amount(500 + 1, 1 + numberdays) ReDim RateM(500 + 1, 1 + numberdays) ReDim Cumlative(1 + numberdays) ReDim DailyTemp(1 + numberdays) ReDim SW(1 + numberdays)

' Import daily temperature and soil water data from sheet For H = 1 To numberdays

DailyTemp(H) = Worksheets("Sheet1").Cells(H + 2, 7) SW(H) = Worksheets("Sheet1").Cells(H + 2, 6)

Next

„ Define random granule For j = 1 To 500

10 radii = Application.WorksheetFunction.NormInv(Rnd, gradii, sdradii) If radii < 0.1 Then GoTo 10

20 v = Application.WorksheetFunction.NormInv(Rnd, DaltaV, sddaltaV) If v < 0.02 Then GoTo 20

170 If fi < 0.0001 Then GoTo 30

mass(j) = 4 / 3 * Pi * (radii ^ 3) * densityS

' Modelled water vapour permeability as a function of mean coating thickness

„Begin time step

For t = 1 To numberdays lll = Amount(j, t - 1)

w = (Wmin + 0.00000405 * Exp(-2800 * fi)) If t = 1 Then g = 0

'Constant rate period

If lll < (mass(j) * (1 - ((v + 1) * Conc / densityS))) Then

'Calculated saturated concentration of urea solution g/cc Conc = 0.00696 * DailyTemp(t) + 0.45

' Calculation of saturated solution water activity molConc = Conc * 1000 / 60

be = 1 b = -0.0608 n = 0.283

a0 = 1 / (1 + 0.018 * (be - b * (molConc ^ n)) * molConc)

„Calculation Delta P in Pa

Pwvo = 133.32 * Exp(20.386 - (5132 / (273 + DailyTemp(t)))) DaltaP = (1 - a0) * Pwvo

RateM(j, t) = ((3 * w * SW(t) * DaltaP * Conc) / (radii * fi * densityS)) ' proportion released per day of original mass equation 2.15

End If

'Falling rate period

If lll > (mass(j) * (1 - ((v + 1) * Conc / densityS))) Then

g = g + 1 T2 = t - g

'Calculation Delta P in Pa

Pwvo = 133.32 * Exp(20.386 - (5132 / (273 + DailyTemp(t)))) Cs(T2) = Conc

171 mol = Cs(t - 1) * 1000 / 60

If mol < 0 Then mol = 0 be = 1

b = -0.0608 n = 0.283

a = 1 / (1 + 0.018 * (be - b * (mol ^ n)) * mol) DaltaP = (1 - a) * Pwvo

dC = 3 * w * SW(t) * Pwvo * (1 - a) * Cs(t - 1) / (radii * fi) Cs(t) = Cs(t - 1) - dC

RateM(j, t) = ((3 * w * SW(t) * (v + 1) * DaltaP * Cs(t - 1)) / (radii * fi * densityS))

Release(t) = RateM(j, t) + Release(t - 1) End If

Release(t) = RateM(j, t) + Release(t - 1) Amount(j, t) = (Release(t) * mass(j)) Next Next r = 200 c = 500 For i = 1 To r For K = 1 To c

Amount(K + 1, i) = Amount(K + 1, i) + Amount(K, i)

Next K

Next i

For m = 1 To 500

mass(m + 1) = mass(m + 1) + mass(m) Next

For s = 1 To 200

Worksheets("Sheet1").Cells(s + 2, 9) = Amount(501, s) / mass(501)

Next

172

Appendix 2

Model of diffusion, sorption and degradation of

Related documents