Data File for “Replicating a Particle Size Distribution” Tutorial

granulometry.p3dat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
; fname: Granulometry.p3dat
;
;  Create a balls assembly from a Particle Size Distribution of a limestone 
;  sample
;==============================================================================
model new

;Input raw data of limestone granulometry
fish define granulometry
  global exptab = table.create('experimental')
  table(exptab,0.03) = 0.083
  table(exptab,0.04) = 0.166
  table(exptab,0.05) = 0.26
  table(exptab,0.06) = 0.345
  table(exptab,0.075) = 0.493
  table(exptab,0.1) = 0.693
  table(exptab,0.12) = 0.888
  table(exptab,0.15) = 0.976
  table(exptab,0.18) = 0.997
  table(exptab,0.25) = 1.0
end
@granulometry

fish define RosinRammler(Dp_rr,n_rr,dmin)
  global t = "RosinRammler"
  loop local i (1,1000)
    freq = math.random.uniform
    temp = Dp_rr*((-math.ln(1-freq))^(1/n_rr))
    table(t,temp)=freq
  endloop
end
@RosinRammler(0.0876,2.25,0.002)

; Generate the sample
[global domain_extent = 1.0]
model domain extent [-domain_extent] [domain_extent]
[global dmin = 0.001]

model random 10001
ball distribute box ([-domain_extent*0.7],[domain_extent*0.7])        ...
        porosity 0.36                                                 ...
        number-bins 10                                                ... 
        bin 1                                                         ...
            radius [0.5*dmin] [0.5*table.x(exptab,1)]                 ...
            volume-fraction [table.y(exptab,1)]                       ...
        bin 2                                                         ...
            radius [0.5*table.x(exptab,1)] [0.5*table.x(exptab,2)]    ...
            volume-fraction [table.y(exptab,2)-table.y(exptab,1)]     ...
        bin 3                                                         ...
            radius [0.5*table.x(exptab,2)] [0.5*table.x(exptab,3)]    ...
            volume-fraction [table.y(exptab,3)-table.y(exptab,2)]     ...
        bin 4                                                         ...
            radius [0.5*table.x(exptab,3)] [0.5*table.x(exptab,4)]    ...
            volume-fraction [table.y(exptab,4)-table.y(exptab,3)]     ...
        bin 5                                                         ...
            radius [0.5*table.x(exptab,4)] [0.5*table.x(exptab,5)]    ...
            volume-fraction [table.y(exptab,5)-table.y(exptab,4)]     ...
        bin 6                                                         ...
            radius [0.5*table.x(exptab,5)] [0.5*table.x(exptab,6)]    ...
            volume-fraction [table.y(exptab,6)-table.y(exptab,5)]     ...
        bin 7                                                         ...
            radius [0.5*table.x(exptab,6)] [0.5*table.x(exptab,7)]    ...
            volume-fraction [table.y(exptab,7)-table.y(exptab,6)]     ...
        bin 8                                                         ...
            radius [0.5*table.x(exptab,7)] [0.5*table.x(exptab,8)]    ...
            volume-fraction [table.y(exptab,8)-table.y(exptab,7)]     ...
        bin 9                                                         ...
            radius [0.5*table.x(exptab,8)] [0.5*table.x(exptab,9)]    ...
            volume-fraction [table.y(exptab,9)-table.y(exptab,8)]     ...
        bin 10                                                        ...
            radius [0.5*table.x(exptab,9)] [0.5*table.x(exptab,10)]   ...
            volume-fraction [table.y(exptab,10)-table.y(exptab,9)]

measure create id 1 radius [domain_extent*0.6] ...
                    bins 100 @dmin [table.x(exptab,10)] 
measure dump id 1 table 'numerical'

program return    
;==============================================================================
; eof: Granulometry.p3dat