# FISH fcns on pile elements: struct.pile.stress.confining

**URL:** <https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418>\
**Category:** FLAC2D\
**Tags:** fish\
**Created:** [April 23, 2024, 10:03pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418 "2024-04-23T22:03:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![katerinaziot](https://avatars.discourse-cdn.com/v4/letter/k/e0b2c6/32.png) [@katerinaziot](https://forum.itascainternational.com/u/katerinaziot)\
**Post date:** [April 23, 2024, 10:03pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/1 "2024-04-23T22:03:00Z")

</div>

Greetings community - I’m playing around with pile elements in FLAC2D. Building on an example provided in the documentation but not in the prjs of the installed software.  
I want to be able to fetch the confining stress in the soil adjacent to the pile (such that I can assign spring properties that are a function of it) so I figured that struct.pile.stress.confining would do the trick. Alas, it seems to be getting zero values. struct.pile.shear.stress does the same.

But struct.pile.prop works (for ‘young’ for example) so I think I am doing something right with my syntax. What is it that I am doing wrong though with confining stress?!

Code below:

;=======================================================  
model new  
model large-strain off  
zone create2d quad size 5 5  
zone cmodel elastic  
zone property density 1000 bulk 1e8 shear 3e7  
[No\_seg = 5]  
[option = 1] ; if 1 create by-line / if 2 create by-nodeids  
structure pile create by-line (2.5,5.0) (2.5 2.5) segments [No\_seg] group = ‘pile’  
zone face skin  
zone face apply velocity-normal 0.0 range group ‘East’ or ‘West’  
zone face apply velocity (0.0,0.0) range group ‘Bottom’  
model history name “mRat” mechanical ratio  
model history name “mechTime” mechanical time  
;–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–_–\*  
[e = 5e9] ; half of 10 GPa = 1e10 Pa  
[ks = 5e8] ; half of 1 GN/m = 1e9 N/m

structure pile property young [e] cross-sectional-area 1.0 moi 0.0 …  
coupling-stiffness-shear [ks] …  
coupling-cohesion-shear 1e20 …  
slide on …  
coupling-stiffness-normal 0.0 range group = ‘pile’  
;For both cases, the applied vertical load is scaled (original 2 MN downwards)  
structure node apply force (0.0,-1e6) range component-id 1

fish define pile\_trial\_conf  
loop foreach local spnt struct.list  
str.extra(spnt,1) = struct.pile.stress.confining(spnt,1)  
str.extra(spnt,2) = struct.pile.shear.stress(spnt,1)  
str.extra(spnt,3) = struct.pile.prop(spnt,‘young’)  
endloop  
end  
[pile\_trial\_conf]

structure pile history name ‘head-pile’ force position (2.5,5.0)  
structure pile history name ‘toe-pile’ force position (2.5,2.5)  
structure pile history name ‘head-x-pile’ force-x position (2.5,5.0)  
structure pile history name ‘toe-x-pile’ force-x position (2.5,2.5)  
structure node history name ‘head-F-node’ force-y position (2.5,5.0)  
structure node history name ‘toe-F-node’ force-y position (2.5,2.5)  
structure node history name ‘head-disp-node’ displacement-y position (2.5,5.0)  
structure node history name ‘toe-disp-node’ displacement-y position (2.5,2.5)

model solve convergence 1.0  
model save ‘Pile-No Spacing’  
;=======================================================

---

<div class="post-metadata">

**Author:** ![jwang](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jwang](https://forum.itascainternational.com/u/jwang)\
**Post date:** [April 24, 2024, 2:41pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/2 "2024-04-24T14:41:35Z")

</div>

Have you tried executing that fish [pile\_trial\_conf] after the model solve?

---

<div class="post-metadata">

**Author:** ![katerinaziot](https://avatars.discourse-cdn.com/v4/letter/k/e0b2c6/32.png) [@katerinaziot](https://forum.itascainternational.com/u/katerinaziot)\
**Post date:** [April 24, 2024, 6:09pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/3 "2024-04-24T18:09:10Z")

</div>

Aha! I did this now and it works. Thank you!

So if I want the pile springs to be updated based, say, on a changing confinement, I’d be best served by calling this function via a fishcall (-100 location?) before cycling?

---

<div class="post-metadata">

**Author:** ![dblanksma](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@dblanksma](https://forum.itascainternational.com/u/dblanksma)\
**Post date:** [April 24, 2024, 6:52pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/4 "2024-04-24T18:52:37Z")

</div>

Hello @katerinaziot,  
If what you mean by “pile springs” are links and you wish to change the link properties manually - then you will need to call your FISH callback function between cycle points -10 and 0;

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/2X/0/06b70b2da1749a5cdb022234ed10e5ab38f83e1d.png)

[Here](https://docs.itascacg.com/itasca900/common/sel/doc/manual/sel_manual/links/links.html?node1847#manually-setting-link-properties) is some more information about setting links manually. Note in this section of the documentation there is a mistake saying to choose your callback between cycle points -2 and -1, that is not correct. It should be between -10 and 0.

---

<div class="post-metadata">

**Author:** ![katerinaziot](https://avatars.discourse-cdn.com/v4/letter/k/e0b2c6/32.png) [@katerinaziot](https://forum.itascainternational.com/u/katerinaziot)\
**Post date:** [April 24, 2024, 7:17pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/5 "2024-04-24T19:17:57Z")

</div>

Thank you so much 😍 🙏

---

<div class="post-metadata">

**Author:** ![katerinaziot](https://avatars.discourse-cdn.com/v4/letter/k/e0b2c6/32.png) [@katerinaziot](https://forum.itascainternational.com/u/katerinaziot)\
**Post date:** [April 25, 2024, 4:52am UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/6 "2024-04-25T04:52:40Z")

</div>

Ok I think I got some more questions.

1. The way that I read the documentation, the links connect the nodes of a pile element to the soil zones. When a user assigns link properties (e.g. coupling-stiffness-shear) are those assigned to both nodes? This doesn’t make sense to me because then a node would be receiving two different properties… how does this work?
2. in FLAC 8 we used to have imem/fmem to find the zone attached to a pile segment. From that I would have been able to get the vertical effective stress for example of that zone (I want to calculate the ultimate skin friction on the pile segment as : tult = Ko_sigma\_v_pi_Diameter_tan\_delta\*segment\_length). Now the struct.pile.stress.confining won’t do this… what other options do I have so that I can have a pointer to the attached soil zone and get its properties? I am going over the struct. or struct.beam. or struct.pile. fish functions but I am not sure I identify something that does this.

Apologies if any of this should have been obvious 🫠

---

<div class="post-metadata">

**Author:** ![dblanksma](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@dblanksma](https://forum.itascainternational.com/u/dblanksma)\
**Post date:** [April 30, 2024, 5:26pm UTC](https://forum.itascainternational.com/t/fish-fcns-on-pile-elements-struct-pile-stress-confining/1418/7 "2024-04-30T17:26:18Z")

</div>

Hello @katerinaziot,

1. The stiffness link properties (i.e. `coupling-stiffness-shear` and `coupling-stiffness-normal`) are distributed to both _ends_ of the link. In the case where one end is a structural element node and the other end is a zone and the link is **deformable** - some of the stiffness is distributed to the node and also to the zone gridpoints. The distribution of stiffness going to each zone gridpoint is weighted according to the location of the link end in the zone.  
For **rigid** links the distribution of stiffness follows a scheme that is outlined in the [Computation of Stable Timestep](https://docs.itascacg.com/itasca900/common/sel/doc/manual/sel_manual/formulation/formulation.html?node1916#computation-of-stable-timestep) documentation.
2. You can use the `struct.link.target()` FISH function to get the id of the object that link targets. From the id you can get the pointer. [Here](https://docs.itascacg.com/itasca900/common/sel/doc/manual/sel_manual/links/fish/sel.link_intrinsics/fish_sel.link.target.html?node1897) is information on this FISH function.
