Page 311 - The Combined Finite-Discrete Element Method
P. 311
294 ALGORITHM IMPLEMENTATION
in which it is passed to a function, as shown in Listing 10.4. Access of a single element
of the array p2 involves first the reading of pointer p1 stored at address (p2+5).Thisis
followed by reading the array element from address (p1+7). Thus, any element of a two-
dimensional array is accessed by two subsequent dereferencing of a pointer. Subsequent
dereferencing of a pointer to a pointer can also be written as shown in the line before
the last line of Listing 10.4. FunctionUsingDynamicArray will obviously return zero,
because both variables x and y are assigned the same element of the dynamic array p2.
10.3 DATA COMPRESSION
Combined finite-discrete element simulations usually require repeated outputs. During a
single combined finite-discrete element simulation, it is not unusual to produce over 1000
output instances. Each output instance requires that almost the entire in-core database be
written on the hard disk. To minimise the disk space required, these data are compressed
before any output is created. The following requirements are met in this process:
• To facilitate portability of the output files, all output files are created in ASCII format.
• Data is compressed just before being written on the hard disk, thus there is no need to
have an uncompressed file on the hard disk at any time.
• When the output data is read from the hard disk, say by a postprocessor, it is read in a
compressed format and uncompressed by the postprocessor itself. In this way, a need
for an uncompressed file sitting on the hard disk waiting to be postprocessed is avoided.
The reason for this is because, for instance for animation purpose, the postprocessor
needs quick access to all output files at the same time. Uncompressing them all and
leaving them on the hard disk would often make postprocessing impossible because of
the large storage requirements, which may not be met by the available space on the
hard disk.
Thus, in the C implementation of the combined finite-discrete element method, all output
data is written onto the hard disk in a special compressed ASCII format. Output is written
in an object-oriented format, with each line of output comprising all data about a single
object, say a single finite element or a single discrete element.
10.4 POTENTIAL CONTACT FORCE IN 3D
10.4.1 Interaction between two tetrahedrons
The theoretical details of the potential contact force algorithm in 3D are explained in
Chapter 2. The easiest way to implement the potential contact force is to use the discretised
contact solution approach, i.e. to discretise the domain of each discrete element into
finite elements, and process potential-contact-force-based interaction between contacting
finite elements.
It is most likely that the simpler finite element geometries would result in a more
efficient contact solution than the alternative, more complex finite element geometries.