OpenSees Cloud

OpenSees AMI

Torsional and Warping Constants from Fiber Sections

29 Nov 2026 - Michael H. Scott


All analyses in this post were performed using my publicly available torsion-warping branch of OpenSees, with functionality that has not yet been incorporated into the main OpenSees branch.

If you would like to try the analyses shown in this post, clone the torsion-warping branch:

git clone --branch torsion-warping https://github.com/mhscott/OpenSees.git

Then follow the OpenSees build instructions to compile.

The command syntax and analysis results shown in this post are subject to change before the torsion-warping branch is merged into the main OpenSees.


Although OpenSees has constitutive models that account for the interaction of axial and shear stresses over a beam cross-section, calculating fiber strains associated with warping and torsion requires the section warping function and its derivatives.

I have no desire to implement section warping calculations in OpenSees, particularly when the sectionproperties package already does an excellent job of computing the warping function and its derivatives for a variety of section types.

Further bolstering this stance, the sectionproperties package can also export section fiber information (coordinates, area, warping function, and warping derivatives) to a file format that is compatible with suanPan.

Parsing the suanPan file format gets the fiber data into OpenSees. A new SuanPan subclass of SectionIntegration, an interface for storing fiber section information, handles the parsing and import. Modifications to NDFiberSection3d account for the warping function and its derivatives in the section compatibility and equilibrium relationships, allowing bimoment and torque to be related to axial and shear stresses.

To perform sectional analysis, we can modify the zeroLengthSection element to handle an additional warping DOF at each node. Then, for a thin-walled, open section like a W10x49, we can confirm the NDFiber section correctly computes the torsional constant, J, and warping constant, Cw.

import sys
sys.path.append('/path/to/compiled/opensees/')
import opensees as ops

from sectionproperties.analysis import Section
from sectionproperties.pre.library import i_section
from sectionproperties.post.fibre import to_fibre_section

inch = 1.0
kip = 1.0

ksi = kip/inch**2

E = 29000*ksi
v = 0.3
G = 0.5*E/(1+v)

#
# W10x49
#
d = 10*inch
bf = 10*inch
tw = 0.34*inch 
tf = 0.56*inch
kdes = 1.06*inch

geom = i_section(d=d, b=bf, t_f=tf, t_w=tw, r=kdes-tf, n_r=4)

mesh_size = 0.05*inch**2
geom.create_mesh(mesh_sizes=mesh_size)

sec = Section(geometry=geom)
sec.calculate_geometric_properties()
sec.calculate_warping_properties()
x, y = sec.get_sc() # Shear center
geom = geom.shift_section(-x, -y)

# Mesh again after shifting to shear center
geom.create_mesh(mesh_sizes=mesh_size)

fiberfile = 'W10x49.txt'
to_fibre_section(geom, analysis_type="3DOS", save_to=fiberfile)

ndf = 7
ops.wipe()
ops.model('basic','-ndm',3,'-ndf',ndf)

fixities = [1]*ndf
ops.node(1,0,0,0); ops.fix(1, *fixities)
ops.node(2,0,0,0)

ops.nDMaterial('ElasticIsotropic',1,E,v)
matTag = 1

ops.section('SuanPan',1,fiberfile,matTag)

ops.element('zeroLengthSection',1,1,2,1)

dof = 4 # torsion, or 7 for warping
load = [0]*ndf
Pref = 1
load[dof-1] = Pref

ops.timeSeries('Constant',1)
ops.pattern('Plain',1,1)
ops.load(2, *load)

ops.analysis('Static','-noWarnings')
ops.analyze(1)

u = ops.nodeDisp(2,dof)
if dof == 4:
   print('Torsional constant','OpenSees:',Pref/(u*G),'sectionproperties:',sec.get_j())
if dof == 7:
   print('Warping constant','OpenSees:',Pref/(u*E),'sectionproperties:',sec.get_gamma())

The mesh generated by sectionproperties for the W10x49 using a maximum element (fiber) area of 0.05 in2 is shown below.

The section discretization results in 421 fibers. While this number of fibers is rather high for typical earthquake engineering applications, the discretization is reasonable for torsion and warping analyses when pitted against discretizing frame members into many shell elements.

The following table compares the torsional and warping constants computed by sectionproperties and OpenSees to the values listed for a W10x49 in the AISC Steel Manual.

Method Torsional Constant, J (in4) Warping Constant, Cw (in6)
AISC Steel Manual 1.39 2070
sectionproperties 1.41 2060
OpenSees NDFiber section 1.20 2059

The discrepancy between the J value reported by sectionproperties and the value computed in OpenSees can be attributed to loss of information when exporting fiber data. The sectionproperties package uses six-noded triangular elements to calculate the warping function and its derivatives, but the exported data only contains values evaluated at the centroid of each fiber. As a result, the original finite element interpolation of the warping function and its derivatives within each fiber is reduced to piecewise-constant approximations when the warping information is exported to suanPan format and subsequently read into OpenSees.

To explore the loss of accuracy, if we reduce the maximum fiber area from 0.05 in2 to 0.025 in2 (888 fibers), the OpenSees NDFiber section computes J=1.31 in4 from the fiber data exported by sectionproperties. With the finer mesh, the J value computed by sectionproperties remains essentially unchanged at 1.41 in4.

Also, if we use the NDFiber section in the main OpenSees repo, the reported J value is 368 in4, which is the polar moment of inertia for the W10x49, two orders of magnitude larger than the torsional constant!

This post should give you an idea of how I’m using sectionproperties to improve the NDFiber section implementation in OpenSees.