Hello Itasca team,
I’ve created two short FISH scripts aimed at capturing strains during loading to plot shear strain against time. However, neither of these codes is functioning as intended. I’ve verified that the variables gp1, bi1, and z1 (in the code) are correctly extracted, except for the ssi value which seems to be problematic. The values are zeros always. I would greatly appreciate your assistance in resolving this issue.
;-------------------------; Code: 1 ;---------------------------------------------------
def _ssi
gp1 = gp_near(x, y, z)
bi1 = gp_block(gp1)
z1 = b_zone(bi1)
ssi1 = z_ssi(z1)
end @_ssi
Hi @msepu
Thanks for your response.
I made the suggested changes, but no luck.
Should there be any misunderstanding, please correct.
–Modified-code–
def zi
z1 = z_near(x, y, z) ; Identifying the zone element 1 at location (x, y, z)
ss1 = z_ssi(z1) ; Renamed the variable (z1) to match the function.
end @zi
Certainly. @Huy has recommended a few adjustments for my code, which I’ll outline below.
His suggestion involves changing the function name to match the name of the initial history. By giving both the function and the historical fish variable the same name, the function can be executed during the simulation, thereby enabling the process to function correctly.
Additionally, he suggested that since the script only necessitates identifying the zones (z1, z2, etc.) once, it’s advisable to enhance the process by splitting the function into two distinct functions:
;-------------------|| Old Code ||---------------------