Using FLAC v.8, I am trying to write a fish function to associate zero cohesion and tensile values to all the zones “currently at yield in shear and/or volume” (i.e., state = 1) or “currently at yield in tension” (i.e., state = 3). This is the function:
define failure
loop i (1, izones)
loop j (1, jzones)
if z_state(i, j) = 1 then
cohesion(i, j) = 0
tension(i, j) = 0
endif
if z_state(i, j) = 3 then
cohesion(i, j) = 0
tension(i, j) = 0
endif
end_loop
end_loop
end
The function is read by my script but does not seem to make any changes in terms of cohesion and tensile values for the zones with state = 1 or 3.
There is no ‘z_state()’ fish intrinsic function, you either use state(i,j) or z_prop(i,j,‘state) for CPP constitutive models to access the ‘state’ value. And use z_prop(i,j, ‘cohesion’) and z_prop(i,j,’ tension’) to assign new values.
Check this topic: Use z_model(),z_prop() and z_group(). to access model and properties
Even by modifying the function following your advice (both using state(i, j) and z_prop(i, j, ‘state’)), nothing seems to change. I also tried the function on another project with a different geometry and problem. I’m using a simple Mohr-Coulomb model.
define failure
loop i (1, izones)
loop j (1, jzones)
if model(i,j)#1
if state(i, j) = 1 then
z_prop(i, j, 'cohesion') = 0
z_prop(i, j, 'tension') = 0
endif
if state(i, j) = 3 then
z_prop(i, j, 'cohesion') = 0
z_prop(i, j, 'tension') = 0
endif
endif
end_loop
end_loop
end
Do you may have any other suggestions?
Here you can find a demo of the project on which I’m working:
Thank you jwang!
Seems that the function is starting to work…
However, while for cohesion values I have no problems (i.e., cohesion = 0 is assigned to all zones currently at yield in shear and/or vol)(Figure 1), for tension values the function seems to associate null values even to the zones currently not at yield but has been in the past (Figure 2). How is it possible?
For tension, you may check if the tension is already set to zero prior to the fish function. For MC model, once the zone has tension failure, the tension strength will be set to zero automatically by the code.