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)