# Not-perpendicular prescribed velocity conditions

**URL:** <https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026>\
**Category:** ASPECT\
**Created:** [January 17, 2020, 2:28pm UTC](https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026 "2020-01-17T14:28:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nora](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/nora/32/1999_2.png) [@Nora](https://community.geodynamics.org/u/Nora)\
**Post date:** [January 17, 2020, 2:28pm UTC](https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026/1 "2020-01-17T14:28:14Z")

</div>

Dear all,  
I am currently stuck in a problem related to ASPECT prescribed velocity conditions:  
I am working on a 3d box crustal model, in which I would like to assign  
different velocity components at different areas of the top surface.  
In particular, I would like to assign velocities which are not perpendicular to the outline boundaries.  
Is there a way to accomplish this?

Thanks for your attention.  
Regards,  
Nora

---

<div class="post-metadata">

**Author:** ![tjhei](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/tjhei/32/1163_2.png) [@tjhei](https://community.geodynamics.org/u/tjhei)\
**Post date:** [January 17, 2020, 3:51pm UTC](https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026/2 "2020-01-17T15:51:38Z")

</div>

hi Nora,

if by “different components at different areas” you mean that on part of the surface you want to prescribe [x,y,z] and on a different part you want to prescribe [y,z] (for example), then you will need to create a new geometry that assigns different boundary names/ids to the respective regions. See “box with lithosphere boundary indicators” for an example.  
If you just want to have more freedom in assigning velocities (perpendicular or not), you can write your own plugin (see source/boundary\_velocity/) if the existing (functions, ascii data, etc.) are not flexible enough. In your plugin you can define for every point x,y,z what your velocities should be.

---

<div class="post-metadata">

**Author:** ![Nora](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/nora/32/1999_2.png) [@Nora](https://community.geodynamics.org/u/Nora)\
**Post date:** [January 20, 2020, 10:30am UTC](https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026/3 "2020-01-20T10:30:34Z")

</div>

Thanks Timo for your answer!  
We would like to apply a traction at the base of the model domain.  
Our first try was to write this Function:

set Function expression = if (x\>=74e3 && y\>=58e3 , 0.47_cm/year, 0_cm/year) ; if (x\<=54e3 && y\>=38e3 , 0.49_cm/year, 0_cm/year) ; 0

Next step would be to add a component to the y axes, so that the bottom-left part of the domain goes toward the NW, whereas the top-right part should go towards the NE.

We tried with:

set Function expression = if (x\>=64e3 && y\>=48e3 , 0.17_cm/year, 0_cm/year) | if (x\<64e3 && y\<=58e3 , -0.348_cm/year, 0_cm/year) ; if (x\>=64e3 && y\>=48e3 , 0.44_cm/year, 0_cm/year) | if (x\<64e3 && y\<=58e3 , 0.338_cm/year, 0_cm/year) ; 0

Which could be the best way to achieve this?

Thanks again!  
Nora

---

<div class="post-metadata">

**Author:** ![tjhei](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/tjhei/32/1163_2.png) [@tjhei](https://community.geodynamics.org/u/tjhei)\
**Post date:** [January 20, 2020, 2:11pm UTC](https://community.geodynamics.org/t/not-perpendicular-prescribed-velocity-conditions/1026/4 "2020-01-20T14:11:52Z")

</div>

> [@Nora](#):
>
> We tried with:

Well, what happens if you use it this way?

> [@Nora](#):
>
> Which could be the best way to achieve this?

There is more than one way to do this. If you are able to write an expression as a function like you do above, then that is a reasonable way to do it.
