Attributes and Properties

  Tutorial Resources
Data Files Project: Open {“AttributesAndProperties.p2prj” in PFC2D; “AttributesAndProperties” in PFC3D} [1]

Introduction

The distinction between an attribute and a property is central to command processing and plotting.

  • Attributes are intrinsic characteristics of model components such as position, velocity, size, etc. The list of attributes is unchanging. Bodies (balls, clumps, and walls), pieces (balls, pebbles, and facets) and contacts have attributes. See the ball attribute, clump attribute, and wall attribute documentation for lists of modifiable attributes. Attributes can also be listed in PFC with the ball list attribute, clump list attribute, and wall list attribute commands.
  • Properties apply exclusively to pieces and are lists of string/value pairs specified by the user. By default, pieces are devoid of properties. These string/value pairs are meant to represent the surface conditions of the pieces and may be used by contact models to determine how pieces interact.

Mistaken Property Assignment

The proper assignment of attributes and properties is very important. The following example demonstrates a common pitfall: a select range of balls is assigned a nonzero velocity in the x-direction using the ball attribute command, while a new property with name “velocity-x” and a value of 1.0 is assigned to the remaining balls via the ball property command. Since “velocity-x” can refer to a keyword of the ball attribute command, a warning occurs.

; 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

Ten balls are created in a column. The top five balls are assigned the “velocity-x” property, while the velocity attribute of the bottom five balls is modified. A fixed timestep is set, and the model is solved for a specified time interval. Figure 1 shows the final state of the system with balls and ball velocity arrows plotted (see the Ball Plot Item for plotting details). Balls are colored by their “velocity-x” property. The bottom five balls are not rendered since they have no “velocity-x” property. On the other hand, no arrows are rendered for the top five balls, since no velocity has been assigned to these balls. As a result, the balls with the property assignment do not move once cycling begins.

../../../../../../../_images/p3d-attsandprops.png

Figure 1: Final state of the system.

Property Assignment for Contact Inheritance

The following example illustrates the intended use of the property concept, namely for contact model property assignment.

; 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

In this case, equal numbers of balls are generated on either side of a wall partition. The linear contact model is assigned as the default contact model for all contact types (see the contact cmat default command), but no properties are specified in the CMAT. Instead, the ball property command is used to assign the surface property kn to balls on either side of the partition. Note that balls on the left have 200 times higher kn values than balls on the right. The linear contact model supports inheritance where contact model properties are determined from piece properties. The linear contact model documentation discusses the details of inheritance for this contact model. As the final configuration reveals, there is significantly more compaction on the right side under the force of gravity as a result of less-stiff interactions between the balls.

../../../../../../../_images/p3d-attsandprops2.png

Figure 2: System where contact model properties are assigned from ball properties.

Discussion

This tutorial demonstrates the differences between attributes and properties. These differences are central to command processing and plotting in PFC.

Endnote

[1]These may be found in PFC3D under the “tutorials/attributes_and_properties” folder in the Examples dialog (Help —> Examples on the menu). If this entry does not appear, please copy the application data to a new directory. (Use the menu commands Tools —> Copy App Data …. See the “Copy Application Data” section for details.)