# Local zone face apply value

**URL:** <https://forum.itascainternational.com/t/local-zone-face-apply-value/1767>\
**Category:** FLAC3D\
**Tags:** tips\
**Created:** [October 21, 2024, 6:41pm UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767 "2024-10-21T18:41:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyrille](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/cyrille/32/808_2.png) [@Cyrille](https://forum.itascainternational.com/u/Cyrille)\
**Post date:** [October 21, 2024, 6:41pm UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/1 "2024-10-21T18:41:50Z")

</div>

Hi all

I’m looking to apply velocity boundary conditions with the _face apply_ command. Unfortunately, the velocity field I want to apply is not exactly linear and it cannot be represented by a constant gradient value. In fact, each of the gradient components is a function of z.

I’ve identified so far two options:

1. Use the _fish-local_ keyword, where I could define a fish function which calculates the velocity components for a given gridpoint. But this fish function would be called at every step, which is slightly overkill as the velocity boundary condition doesn’t vary over time.
2. Another option would be to assign to each individual gridpoint a fixed velocity. But in that case, I would end up with quite a huge number of conditions (around 8000).

So I have now two questions:

1. Can you think of another way to assign a non-linear velocity boundary field ?
2. Is there a limit to the number of individual _zone gridpoint fix velocity_ commands ?

Thanks a lot for your inputs !  
Regards,

Cyrille

---

<div class="post-metadata">

**Author:** ![markus](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/markus/32/288_2.png) [@markus](https://forum.itascainternational.com/u/markus)\
**Post date:** [October 22, 2024, 10:59am UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/2 "2024-10-22T10:59:49Z")

</div>

I haven’t used it, but from my understanding of the documentation you should be able to use the FISH intrinsic **gp.force.load()** and set the appropriate force vector once for each gridpoint in a single function call according to your problem.  
Otherwise, while it might not be the most elegant way, but you should also be able to use as many “fix velocity” commands as you wish, since all they (probably) to is to set the same intrinsic force values.

---

<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:** [October 24, 2024, 6:05pm UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/3 "2024-10-24T18:05:44Z")

</div>

@Cyrille,

In this case I would write a FISH function to set all the gridpoint velocities according to whichever criteria you want. You can use the FISH function _gp.vel()_. Then be sure to issue the command **zone gridpoint fix velocity**.

---

<div class="post-metadata">

**Author:** ![JuDi](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@JuDi](https://forum.itascainternational.com/u/JuDi)\
**Post date:** [October 25, 2024, 7:02am UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/4 "2024-10-25T07:02:16Z")

</div>

Not 100% addressing the initial question. but similar challenge to assign a load to a set of grid points belonging to a named face (the top of the model in this case - which is not a flat surface). I use this loop to do so :

```auto
loop foreach gp gp.list
        ddepth = gp.pos.z(gp)
        ; TODO: remove dependency on constant -135.
        if ddepth > -135.
             gp.force.load.z(gp) = ddepth * waterdensity * 9.81
        endif
    endloop

```

As you can see I would like to get rid of the constant value of -135 and identify gridpoints whether they belong to a face or not.  
Any hints appreciated  
Julia

---

<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:** [October 25, 2024, 2:24pm UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/5 "2024-10-25T14:24:53Z")

</div>

@JuDi,  
If the zone faces are grouped, then the gridpoints of those faces will belong to the same group as well. So you can identify the gridpoints based on the zone face group. This is part of the [Data Hierarchies](https://docs.itascacg.com/itasca920/common/module/doc/manual/group_manual/groupkwd.html?node1193#data-hierarchies) structure where the grouping logic will automatically move from gridpoints → zone faces → zones when checking for group matches.

---

<div class="post-metadata">

**Author:** ![Cyrille](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/cyrille/32/808_2.png) [@Cyrille](https://forum.itascainternational.com/u/Cyrille)\
**Post date:** [October 25, 2024, 4:12pm UTC](https://forum.itascainternational.com/t/local-zone-face-apply-value/1767/6 "2024-10-25T16:12:15Z")

</div>

Thanks @markus and @dblanksma ,  
I will probably start by setting the individual gridpoint velocities.
