Ground Freezing Example
FISH functions can be called during cycling/solving to solution. FISH can be invoked at any point during each calculation cycle, to override or to add additional physics to the model. Each cycle is one iteration of the steps in the explicit solution scheme; placement of FISH within that sequence can be specified by command.
The following is a simple illustration of using FISH to model ground freezing during a couple thermo-mechanical analysis:
This is an example of a special class of FISH function called an operator that, with restrictions enforced when the function is parsed, allows the function to be called on all threads available. If a normal function is used during cycling, and that function operates on all the zones or grid points in the model – on modern many-core computers this could dominate the overall solution time.
The groundFreezing operator calls another FISH operator freezeZone (definition below) that actually changes the stress and stiffness of the zone and marks it as frozen:
Freezing could be added to the solution processing with a command like the following:
This inserts a call to the groundFreezing FISH operator at the start of every 10th solution step (to further limit the effect on solution time), and tells it to operate on the list of all zones in the model. The :: prefix indicates the list of zones should be split into separate calls for each zone in the list, which will be done on all threads available.
The same thing can be done as part of the solve command, as in the example (see lines 34-36 in the fragment below) . A command such as the following would solve to 1 year of thermal time with a ground freezing check every 10 cycles:
The distinction between the two formulations shown above is that the former is global and will take effect with any subsequent model solve command; the latter specifies execution of FISH only for that particular issuance of model solve.
Between the use of operators to enable multithreading and the interval keyword so the function is only run once every 10 steps the addition of ground freezing physics will have nearly negligible direct effect on the solution time.
The following image displays the results when run on a modified version of the “Infinite Line Heat Source in an Infinite Medium” example problem (See FLAC3D/Index: FLAC3D Examples) in the Help.
This example is very simple but still potentially useful. More accuracy can be added, depending on the needs of the model. For example, more properties can be modified, the constitutive model can be changed to one that supports creep, and the heat of fusion required to change water to ice can be taken into account.