Line Mesh

The DiscretizeMember function, which dates back many years, was recently superseded by the line mesh command, written by Minjie. In addition to creating boundaries for solid meshes, as shown in this post, you can use line meshes to discretize a frame member (2D or 3D) into beam-column elements–just pass the optional element type and arguments to the mesh command.

Below is example code for a portal frame model. First, define nodes for the joints.

import openseespy.opensees as ops

H = 360
L = 144


ops.node(1,0,0); ops.fix(1,1,1,1)
ops.node(4,H,0); ops.fix(4,1,1,1)

Next, define line meshes with the element type and arguments that would come after the nodes in the regular element command–in this case, the transformation tag and beam integration tag for a dispBeamColumn element. The mesh type is 0 (not an FSI analysis) and there are 3 DOFs per node.

E = 29000

# W14x90
A = 26.5
Ic = 999

# W18x76
A = 22.3
Ig = 1330

# Corotational transformation

# Number of elements/member
Nele = 8

# Columns
c = L/Nele
# tag Npts nodes type dofs size eleType transfTag beamIntTag
# Beam
c = H/Nele
# tag Npts nodes type dofs size eleType transfTag beamIntTag

And that’s pretty much it.

Compared to DiscretizeMember, the line mesh is easier because it doesn’t require you to keep track of node and element tags to pass into the function–the numbering of nodes and elements is handled internally.

The meshes shown in this post were plotted using the opsvis package developed by Seweryn Kokot.

One thought on “Line Mesh

Leave a Reply

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

You are commenting using your 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.