Fibers: Automatic Layouts#

This example demonstrates the generation of fibers for use with OpenSees. Begin by creating a standard AISC shape:

import veux
from xsection.library import from_aisc

shape = from_aisc("W14x211", fillet=False, mesh_scale=2)

veux.draw_shape(shape)

../_images/d9d415c3acce8a8a914791669ec20ad7dc201d2feacb11b887586ce4d9dd5f07.png

Next, the create_fibers() method is used to generate fibers. The method generates dictionaries with the following fields:

  • "y", "z" the coordinates of the fiber

  • "area" the area of the fiber

  • "warp" warping shapes and gradients

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
for fiber in shape.create_fibers():
    ax.scatter([fiber["y"]], [fiber["z"]], fiber["area"]*10, marker="s", color='gray')

ax.plot(*shape.exterior().T, color='black')
ax.set_aspect('equal')
ax.axis('off');
../_images/ca5ffa32769138639365f7396784947fae9bb1eb3cbe226412bc172525c5a044.png
artist = veux.ShapeArtist(shape)
artist.draw_surfaces()
artist.draw_exterior()
artist.draw_fibers(color='black')
../_images/6802de6f07273f3a5e8eb41b368236ef28630387da6c7d6eb481cb46a55e0122.png