Heterogeneity in the properties of material of particles

I am working on slope modelling using the Voronoi block approach in 3DEC to represent a heterogeneous rock mass/overburden dump. I would like to assign different material properties to individual Voronoi blocks in order to simulate realistic heterogeneity as shown in fig

But i am unable to solve the problem as my code attached below is providing the material property to some block not to whole geometery.

Also, I will be doing for the contacts also.

model new
model random 10000
block tol 1e-6
model large-strain off
; make parallelepiped to fill with voronois
geometry import ‘40degree1bench.stl’
block generate voronoi max-edge 3.5 min-edge 0.5 ;set 12;random-seed 100 iterations 100 round 1.0e-5
block generate voronoi max-edge 4 min-edge 0.5

block zone generate edgelength 5
block delete range deformable not
;global z111 = block.list()
;global x_ = list.size((z111))
;program call ‘property’

block zone cmodel assign mohr-coulomb
block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1 range index-list 1 1011
block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1 range id 1012 2010
block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 kratio 1 range id 2011 4000
block zone property density 2.714E3 young 11.68e6 friction 44.5 cohesion 150E3 kratio 1 range id 4001 6000
block zone property density 2.621E3 young 11.87e6 friction 44.5 cohesion 150E3 kratio 1 range id 6001 7014
block zone property density 2.641E3 young 11.87e6 friction 44.5 cohesion 150E3 kratio 1 range id 7015 8014

block contact jmodel mohr
block contact prop stiffness-normal 7.6e7 stiffness-shear 7.6e7 cohesion 40 tension 14.4 friction 10 range id 1 2011

block contact prop stiffness-normal 10.6e7 stiffness-shear 10.6e7 friction 10 range id 2012 8014
program return

I have tried using fish programing with multiple codes but not able to do it. Can anyone please look into it.

;fish auto-create off
fish auto-create on
;fish def propert
; global z111 = block.list()
; global x
= list.size((z111))
; global xa = list.max(x_)
; global xb = list.min(x_)
; command
; block zone cmodel assign mohr-coulomb
; endcommand
; loop foreach bb x_
;
;
; loop foreach x1 z111
; if x1%2 == 0
; command
; block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; else
; command
; block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; x1= x1 + 1
; end_if
; end_loop
; end_loop
;end

fish define install
pnt = block.zone.list()
global x_ = list.size((pnt))
loop for (i=1, i<=x_+1, i +=1)
pnt = block.zone.list()
if i%2 == 0
block.zone.prop(pnt,‘young’) = 4.79e6
block.zone.prop(pnt,‘density’) = 2.598e3
block.zone.prop(pnt,‘friction’) = 44.5
block.zone.prop(pnt,‘cohesion’) = 150e3
else
block.zone.prop(pnt,‘young’) = 10.05e6
block.zone.prop(pnt,‘density’) = 2.651e3
block.zone.prop(pnt,‘friction’) = 44.5
block.zone.prop(pnt,‘cohesion’) = 150e3

    end_if
    i +=1
end_loop

end

;fish def propert
; global z111 = block.list()
; global x
= list.size((z111))
;; global xa = list.max(x_)
;; global xb = list.min(x_)
; command
; block zone cmodel assign mohr-coulomb
; endcommand
; local p =1
; loop for (i=1, i<=x_+1, i +=1)
;
; if i%2 == 0
; command
; block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; else
; command
; block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
;
; end_if
;
; end_loop
;end
;fish def propert
; command
; block zone cmodel assign mohr-coulomb
; endcommand
; loop foreach block block.list
; global x
= list.size(block.id(block))
; loop foreach x1 x_
; if x1%2 == 0
; command
; block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; else
; command
; block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; x1= x1 + 1
; end_if
; end_loop
; end_loop
;end
;fish def propert
; command
; block zone cmodel assign mohr-coulomb
; endcommand
; block = block.list()
; global x
= list.seq(block)
; loop foreach x1 x_
;
;
; if x1%2 == 0
; command
; block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; else
; command
; block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 kratio 1
; end_command
; x1= x1 + 1
;
; end_if
; end_loop
;end
[install]
;[_propert]

There are a couple of issues here:

  1. You can’t make a voronoi mesh of a concave shape
  2. You have two sets of blocks on top of each other
  3. You want to assign properties by block, rather than by zone

See example file below of how this could be done. Joints will be a bit trickier. It’s not clear what you want to do with them, but you could loop through blocks and check the list of contacts for each block, similar to what we did with zones below.

model new
model random 10000
block tol 1e-6
model large-strain off

; make parallelepiped to fill with voronois
; voronoi meshing doesn't work for concave shapes 
;geometry import '40degree1bench.stl'

; make box instead
geometry generate box 0 150 0 20 0 60

; you only need one block generate command here
; if you want different sizes in different parts, you need to use ranges
block generate voronoi max-edge 3.5 min-edge 0.5 ;set 12;random-seed 100 iterations 100 round 1.0e-5
;block generate voronoi max-edge 4 min-edge 0.5

; now cut out slope

block cut joint-set dip 40 dip-dir 90 origin 101.5,0,60 join
block hide range plane dip 40 dip-dir 90 origin 101.5,0,60 below
block cut joint-set dip 0 origin 0,0,30
block delete range pos-z 30 60
block hide off

; put a ! in front of command and it will continue executing even if the command fails!
! block zone generate edgelength 5
! block zone gen edge 2
! block zone gen edge 1

block delete range deformable not

block zone cmodel assign mohr-coulomb

; here properties are being assigned to zones, so it is looking for zone IDs.
; by you can make it look for block IDs instead as shown
; but it looks like this doesn't work!!!
block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 range id 1 1011 by block
block zone property density 2.598E3 young 4.79e6 friction 44.5 cohesion 150E3 range id 1012 2010 by block
block zone property density 2.651E3 young 10.05e6 friction 44.5 cohesion 150E3 range id 2011 4000 by block
block zone property density 2.714E3 young 11.68e6 friction 44.5 cohesion 150E3 range id 4001 6000 by block
block zone property density 2.621E3 young 11.87e6 friction 44.5 cohesion 150E3 range id 6001 7014 by block
block zone property density 2.641E3 young 11.87e6 friction 44.5 cohesion 150E3 range id 7015 8014 by block

; try this instead
fish def assign_props
  ; loop blocks
  count = 0
  loop foreach block block.list
    count += 1
    ; loop zones in this block
    loop foreach pnt block.zonelist(block)
      if count %2 == 0
        block.zone.prop(pnt,'young') = 4.79e6
        block.zone.prop(pnt,'density') = 2.598e3
        block.zone.prop(pnt,'friction') = 44.5
        block.zone.prop(pnt,'cohesion') = 150e3
      else
        block.zone.prop(pnt,'young') = 10.05e6
        block.zone.prop(pnt,'density') = 2.651e3
        block.zone.prop(pnt,'friction') = 44.5
        block.zone.prop(pnt,'cohesion') = 150e3
      endif
    endloop
  endloop
end
[assign_props]

Thankyou sir,
I am very happy to get the response. Also, the same technique can be utilized in UDEC.
Also, i want to know if we have contact strength value got from PFC modelling can be used here or not.
Consider it like cemented material between the particles.
Thankyou,
Shivam pandey