Data Files for “Attributes and Properties” Tutorial
- attributes_and_properties.p3dat (3D example)
- properties_in_contacts.p3dat (3D example)
- attributes_and_properties.p2dat (2D example)
attributes_and_properties.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 | ; fname: attributes_and_properties.p3dat
;
; Demonstrate the distinction between ball attributes and ball properties
;==============================================================================
model new
model title 'Attributes and Properties'
; generate a loose assembly of balls
model domain extent -10.0 10.0
model random 10001
ball generate number 10 radius 0.5 box -0.5 0.5 -0.5 0.5 -9.0 9.0
; set a nonzero x-velocity to part of the balls
ball attribute velocity-x 1.0 range position-z -10.0 0.0
; create a property with name 'xvelocity' to the other balls
ball property 'velocity-x' 1.0 range position-z 0.0 10.0
; set density and cycle - note that only part of the balls actually moved
ball attribute density 1.0
model mechanical timestep fix 1e-2
model solve time 2
return
;==============================================================================
; eof: attributes_and_properties.p3dat
|
properties_in_contacts.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 | ; fname: properties_in_contacts.p3dat
;
; Demonstrate ball properties being used to set contact model properties
;==============================================================================
model new
model title 'Properties in Contacts'
; create the domain
model domain extent -10.0 10.0 -5.0 5.0 -10.0 10.0 condition reflect
; use the linear contact model
contact cmat default model linear
; generate an assembly
model random 10001
ball generate number 140 radius 1.0 box -10 0 -5 5 -10 10 tries 300000
ball generate number 140 radius 1.0 box 0 10 -5 5 -10 10 tries 300000
; assign the density and local damping
ball attribute density 1000 damp 0.7
;set gravity
model gravity 10
; assign properties balls for the linear contact model to use
ball property 'kn' 1e8 range position-x -10 0
ball property 'kn' 5e5 range position-x 0 10
ball property 'fric' 0.7
; put a partition between the two sides
wall generate plane dip 90 dip-direction 90
wall property 'kn' 1e7
; let them drop
model solve time 10
return
;==============================================================================
; eof: properties_in_contacts.p3dat
|
attributes_and_properties.p2dat
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 | ; fname: attributes_and_properties.p2dat
;
; Demonstrate the distinction between ball attributes and ball properties
;==============================================================================
model new
model title 'Attributes and Properties'
; generate a loose assembly of balls
model domain extent -10.0 10.0
model random 10001
ball generate id 1 10 box -1.0 1.0 -10.0 10.0
; set a non-zero velocity-x to part of the balls
ball attribute velocity-x 1.0 range position-y -10.0 0.0
; create a property with name 'xvelocity' to the other balls
ball property 'velocity-x' 1.0 range position-y 0.0 10.0
; set density and cycle - note that only part of the balls actually moved
ball attribute density 1.0
model mechanical timestep fix 1e-5
model cycle 10
return
;==============================================================================
; eof: attributes_and_properties.p2dat
|
Was this helpful? ... | PFC © 2019, Itasca | Updated: Apr 26, 2019 |