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.
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])