This example tests the effect of rigid joint offsets in a diamond-shaped frame. The analytical solution is known, and the test is used to verify the correct treatment of offset geometry in a 3D frame element.
This test case consists of a simple two-node frame element arranged in a diamond pattern. Rigid offsets at both ends rotate the element relative to the applied force direction. This configuration is highly sensitive to geometric assumptions, making it ideal for verifying the implementation of joint offsets in 3D frame elements.
We begin by importing necessary libraries and defining a function that computes the analytical solution using a transformation approach:
Next, the model is built using the xara
API, which mirrors OpenSeesRT’s structured syntax:
The rigid offsets are defined by passing an offset
dictionary to the geomTransf
command:
A vertical unit load is applied at the free end, and a single analysis step is performed:
Recall the stiffness of a linear 2D Euler-Bernoulli beam:
This is transformed into the angled configuration using the transformation:
and joint offsets are similarly applied with:
import numpy as np
def diamond_solution(EI, EA, L, off=0):
Le = L - 2*off
dX = dY = Le/np.sqrt(2)
Ag = np.array([[-dX/Le , dY/Le , 0, dX/Le ],
[-dY/Le**2, -dX/Le**2, 0, dY/Le**2],
[-dY/Le**2, -dX/Le**2, 1, dY/Le**2]])
Ao = np.array([[0, 1, 0],
[1, 0,-off/np.sqrt(2)],
[0, 0, 1],
[0, 0, off/np.sqrt(2)]])
A = Ag @ Ao
Ke = np.array([[EA/Le, 0, 0],
[ 0, 4*EI/Le, 2*EI/Le],
[ 0, 2*EI/Le, 4*EI/Le]])
K = A.T @ Ke @ A
return 1 / np.linalg.solve(K, [1, 0, 0])
The resulting deformed shape is plotted using veux
, with the displacement field applied: