Rotated supports

Rotated supports#

Download notebook

A portal frame with an inclined support.

../../_images/constrain-frame-skewed-support-64da9a46.png

Begin by creating units and defining dimensions.

from xara.units.english import inch, foot, kip, ksi
import numpy as np


# Structural Geometry
H = 12.0 * foot
W = 12.0 * foot

# Section properties
width = 12.0 * inch
height = 12.0 * inch
Iz = (width * height**3) / 12.0
Iy = (height * width**3) / 12.0
A = width * height
J = (width * height**3) / 3.0

# Material
E = 29000 * ksi
G = 11500 * ksi


# Load
P = -10.0 * kip



Reference = {
    (1, 2): 5.811,
    (4, 2): 5.236
}

expected_Fz_jt1 = 5.811
expected_F3_jt4 = 5.236

Compute the rotation matrix corresponding to the support rotation

from shps.rotor import exp
from math import atan2

angle = atan2(0.6, 0.8) # 0.6435011088 # radians

R = exp([0.0, -angle, 0.0])

Model#

Create a xara.Model in 3D (ndm=3), with ndf=6 DOFs per node.

import xara
model = xara.Model(ndm=3, ndf=6)

Nodes#

Next, create the nodes

# Nodes
model.node(1, (0.0, 0.0, 0.0))      # Fixed support
model.node(2, (0.0, 0.0, H))        # Top-left
model.node(3, (W/2, 0.0, H))        # Load point
model.node(4, (W,   0.0, H))        # Top-right
model.node(5, (W,   0.0, 0.0))      # Skewed support

# Fixed support at node 1
model.fix(1, (1, 1, 1, 1, 1, 1))


R = exp([0.0, -angle, 0.0])
ground_node = 100
model.node(ground_node, (W, 0.0, 0.0))
model.fix(ground_node,  (0, 1, 1, 0, 0, 0))


model.constrain((ground_node, 5), rotate=[0, -angle, 0])
0

Sections#

Create a xara.FrameSection with the section properties of the Frame elements

# Frame section
section = xara.FrameSection("Elastic", E=E, G=G, A=A, Iy=Iy, Iz=Iz, J=J)
model.section(section)

Now create four ElasticFrame elements

model.geomTransf("Linear", 1, (0, 1, 0)) # Columns
model.geomTransf("Linear", 2, (0, 1, 0)) # Beams

model.element("ElasticFrame", 1, (1,2), section=section, transform=1)
model.element("ElasticFrame", 2, (2,3), section=section, transform=2)
model.element("ElasticFrame", 3, (3,4), section=section, transform=2)
model.element("ElasticFrame", 4, (4,5), section=section, transform=1)
4

Render the model using the veux library

import veux
veux.render(model, vertical=3)

Loading#

Create a load pattern (xara.StaticPattern) holding a nodal load (xara.NodalLoad) at node 3.

from xara.load import NodalLoad

loads = NodalLoad(model, {3: [0, 0, P, 0, 0, 0]})

pattern = xara.StaticPattern(loads)

model.pattern(pattern)

Analysis#

For the static analysis, create a xara.StaticAnalysis

analysis = xara.StaticAnalysis(model,
                               constraints="Transformation")
analysis.analyze()
0

Results#

# utility function for calculating error
def error(value, reference):
    return abs(value - reference) / reference * 100.0
print("\n" + "="*60)
print("Model E: Skewed Support - Example 1-005e")
print("="*60)

# Reactions
model.reactions()
Fz_jt1 = model.nodeReaction(1, 3)/kip
R4 = model.nodeReaction(5)[:3]
r4 = R.T @ R4 / kip
F3_jt4 = r4[2]
print(f"R4: {R4}, r4: {r4}")


# Verification
print("\n" + "-"*60)
print("Verification against Example 1-005e:")
print("-"*60)

error_Fz = error(Fz_jt1, expected_Fz_jt1)*100 
error_F3 = error(F3_jt4, expected_F3_jt4)*100 

print(f"  Fz (jt. 1):  {Fz_jt1:8.3f} kip  (expected {expected_Fz_jt1:.3f})  Error: {error_Fz:.2f}%")
print(f"  F3 (jt. 4):  {F3_jt4:8.3f} kip  (expected {expected_F3_jt4:.3f})  Error: {error_F3:.2f}%")

if error_Fz < 1.0 and error_F3 < 1.0:
    print("\nPASSED")
else:
    print("\nFAILED")

print("="*60)
============================================================
Model E: Skewed Support - Example 1-005e
============================================================
R4: [-3141.4789490937333, 0.0, 4188.638598805029], r4: [8.03038141e-12 0.00000000e+00 5.23579825e+00]

------------------------------------------------------------
Verification against Example 1-005e:
------------------------------------------------------------
  Fz (jt. 1):     5.811 kip  (expected 5.811)  Error: 0.62%
  F3 (jt. 4):     5.236 kip  (expected 5.236)  Error: 0.39%

PASSED
============================================================
artist = veux.ModelArtist(model, vertical=3)
artist.draw_edges()
artist.draw_edges(state=model.nodeDisp, scale=50.0)
artist