FISH Scripting in 3DEC


FISH is a built-in scripting language that gives the 3DEC user powerful control over most every aspect of program operation. From among the numerous possibilities, this presentation gives brief examples of four areas in 3DEC commonly customized by use of FISH.

FISH is short for “FLAC-ISH” (or the language of FLAC), the Itasca software for which it was first developed. In addition to FLAC and 3DEC, FISH is also integrated into UDEC, FLAC3D, and PFC.

FISH is embedded deeply into 3DEC at nearly every level. It can be used to parameterize data files so that a number of varying cases can be built into the same basic model. Every data type that makes up a 3DEC model is also available for FISH to manipulate directly — before, after, and during a solution cycle. This means that in addition to creating custom models and customized results, FISH can be used to add custom physics to the solution process that are not part of the standard package.

FISH includes constructs to embed 3DEC commands within FISH functions.

FISH is a semi-compiled language that uses dynamic typing for variables — syntax and use is similar to (but not exactly the same as) Python. It has been created to be very simple for small needs, but it provides the structure and data types needed to support large and complex programs if necessary.

The following illustrations give just an idea of the power of FISH. For a complete tutorial, refer to the 3DEC documentation, Section 2 of FISH in 3DEC.

Parameterization: Varying Model Geometry

Using FISH you can specify aspects of the model geometry once and these values will propagate through your model setup. An example is shown below. This makes it easy to change the model dimensions without having to change values at multiple places in the data file.

Custom Visualization: Contouring Any Data

Perhaps the most common use of FISH is to customize model results. Providing this ability was the original motivation for its introduction into Itasca software. FISH allows the user to plot any quantity of interest in the model without requiring addition of a bewildering variety of rarely-used options on a menu tree somewhere.

The following is an example of this. Assume you performed a simulation in metric units with stress units of Pa. The client prefers to see psi and positive values of compressive stress (these are negative by default). Use the following script to store and plot this information in a zone extra variables.

FISH CALL: Run Functions During Cycling or Upon Events

Often it is useful to be able to execute some function when an event occurs. 3DEC allows for this through the FISHCALL mechanism. FISH functions can be created and called at different times during the calculation cycle, or when any of the following events occurs.

  • block created
  • block deleted
  • contact created
  • contact deleted
  • subcontact created
  • subcontact deleted
  • subcontact state changes (coming soon)
An example of using the “contact created” event to visualize the location and times of bounces as a block rolls down a slope.
The data file used to create the above example with the FISH function and the FISHCALL command highlighted.

Latest News
  • Griddle 2.0 Pre-release Now Available Griddle offers automatic, interactive, and easy-to-use surface meshing and volume grid generation capabilities for FLAC3D,...
    Read More
  • Paper Awarded Silver Medal by SAIMM The paper "A risk-based methodology to improve the definition of geotechnical sectors in slope design"...
    Read More
  • Learning FLAC3D 7.0 New FLAC3D introductory tutorials are now available on our website. See how easy it is...
    Read More

Upcoming Events
16 Aug
RockEng 2020 - CANCELED
The theme of RockEng2020 is Canadian Strengths and Future Directions in Rock Mechanics. This will be a two-day, single-stream symposium... Read More
21 Sep
71st Highway Geology Symposium
Better highways through applied geology... Read More
4 Oct
Eighth International Conference & Exhibition on Mass Mining
The MassMin Conferences has a history of over 30 years and has become the premier event for sharing mass mining information on research... Read More