Element Self-Weight

A question posted the other day in the OpenSees Facebook group asked how to add self-weight to elements. I gave the easy I-can-answer-this-in-under-two-seconds answer of “use the eleLoad command”.

It turns out the complete answer is not so simple as it depends on the type of element to which you want to apply self-weight.

The OP did not specify the types of elements, so I assumed they meant beam-column elements, for which the 'beamUniform' option is the only approach for applying self-weight. However, gentle pre-processing is required to transform the global self-weight to local uniform loads, as shown below for a plane frame element.

First, calculate the self-weight per length of the element as the density times section area. Then get the local x, y, and z axes of the element and use inner products to resolve the global self-weight onto the local directions expected by the 'beamUniform' option.

import openseespy.opensees as ops
import numpy as np

rho = 0.284*lb/inch**3 # Steel

A = 20*inch**2 # Or whatever
ops.element('elasticBeamColumn',1,... ,A, ...) # Or whatever

b = [0,-rho*A,0] # Self-weight in global X,Y,Z

wx = np.dot(ops.eleResponse(1,'xaxis'),b) # x'*b
wy = np.dot(ops.eleResponse(1,'yaxis'),b) # y'*b
wz = np.dot(ops.eleResponse(1,'zaxis'),b) # z'*b

You can put these distributed load calculations in a loop over multiple elements if necessary–it’ll just take a little data management to make sure you use the correct cross-sectional areas.

Solid elements such as quads and bricks use the 'selfWeight' option for the eleLoad command in conjunction with body forces input with the element command. The element implementations of the addLoad() method handle the self-weight calculations–no script pre-processing necessary. Because there are different issues compared to beam-column elements, I will cover solid element self-weight in another post.

5 thoughts on “Element Self-Weight

  1. Element self-weight, combined with the low modulus of elasticity, is a major challenge in geotechnical FEM. It is necessary to deal with the fact that the soil has been prestressed by its self weight (effective stress.) Failure to do so can lead to model collapse when the self-weight has been applied.

    Liked by 2 people

  2. Thank you a lot for the hint. I was wondering if there is a way of doing it for solid elements, such as tetraedron solids. I would use something like (density * g * volume of the element) but since I work with complex geometries, the volume of each tetrahedron is different. Is there a way to get the volume of each element generated in open sees? I am using gmsh for meshing. I can offer a true Italian coffee 🙂


    1. If you specify density in the material and -g as a body force in the element (or something like that), the volume integral should take care of itself. Make a simple example to figure out what works.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.