# External loads on thrust network

**URL:** <https://forum.compas-framework.org/t/external-loads-on-thrust-network/177>\
**Category:** compas\_tna\
**Created:** [May 6, 2019, 3:05pm UTC](https://forum.compas-framework.org/t/external-loads-on-thrust-network/177 "2019-05-06T15:05:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiunana](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@kiunana](https://forum.compas-framework.org/u/kiunana)\
**Post date:** [May 6, 2019, 3:05pm UTC](https://forum.compas-framework.org/t/external-loads-on-thrust-network/177/1 "2019-05-06T15:05:41Z")

</div>

I am analyzing a structure with a given set of external loads on nodes. And those loads are assigned to pz as follows.

> form.set\_vertices\_attributes(‘pz’,volumes\*density)

1. Is Pz is positive in gravity direction or vice versa
2. When the self weight is being updated during solving for vertical equilibrium, does it replace Pz or get added on top of Pz. If so, to neglect the self weight I can set the density to a negligibly small value, correct?

> scale = vertical(form, zmax, kmax=100, density=0.00001)

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 6, 2019, 4:29pm UTC](https://forum.compas-framework.org/t/external-loads-on-thrust-network/177/2 "2019-05-06T16:29:03Z")

</div>

explicitly assigned loads (`pz` attributes) are added on top of the selfweight. if you want to exclude selfweight, set the density to `0.0`.

`pz` is in the direction of gravity. positive values point down. negative values up.

note that you can’t set the `pz` values of multiple nodes in the way you described in your post.

`set_vertex_attribute(key, name, value)`  
sets the attribute with the given name to the given value.

`set_vertex_attributes(key, names, values)`  
sets the attributes with the given names to the given values

`set_vertices_attribute(name, value)`  
sets the attribute with the given name to the given value for all vertices

`set_vertices_attributes(names, values)`  
sets the attributes with the given names to the given values for all vertices

---

<div class="post-metadata">

**Author:** ![kiunana](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@kiunana](https://forum.compas-framework.org/u/kiunana)\
**Post date:** [May 7, 2019, 8:22am UTC](https://forum.compas-framework.org/t/external-loads-on-thrust-network/177/3 "2019-05-07T08:22:48Z")

</div>

So, if I have the nodal loads in a list (or dict), the option would be to use ‘set\_vertex\_attribute’ in a loop?

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [May 7, 2019, 8:40am UTC](https://forum.compas-framework.org/t/external-loads-on-thrust-network/177/4 "2019-05-07T08:40:35Z")

</div>

yes. we are working on making these functions more flexible, but for now that is the way to do it…
