11. Beam Elements and Beam Sections - BeamElem, BeamSect

The BeamElem and BeamSect modules together provide a comprehensive set of features for computing and visualizing beam element geometry and results. Designed primarily for applications in solid mechanics, these modules may also have use in other fields of engineering analysis such as thermodynamics in which “beam” assumptions may be made. In general, a beam element is a specialization of a three dimensional volume in which a given plane, the beam cross section, may be assumed to be small with respect to the beam length.

The BeamSect module is designed to manage the cross sectional properties of the beam. The BeamElem module models the complete beam element by managing the axial properties of the beam explicitly and the cross sectional properties using a BeamSect object as an attribute object.

11.1. Beam Elements - BeamElem

Use the BeamElem module to draw complete beam elements. Two basic representations may be selected when drawing beam elements. The simplest representation draws the beam reference axis and one or more icons along the beam axis which represent the section properties of the beam. The icons are drawn by the BeamSect attribute object and show the orientation of the beam section and section geometry. The second representation reconstructs the three dimensional nature of the beam to some degree by drawing the surfaces of the beam along the beam axis and the sections at the beam end points. The sense of the normals of the polygons used for drawing the beam axial surfaces and cross sections are oriented outward so that back face culling may be used to eliminate hidden surface artifacts. If just the reference axis of the beam element is to be drawn, it is preferable to use the Edge module which will draw this simple representation of a beam more efficiently.

The BeamElem module does not directly draw results quantities on beam surfaces, however it provides functions to compute coordinates and results on beam surfaces in a form which can be directed to an isovalue, marker or value object for drawing the results quantities in some way.

The functions associated with a BeamElem object are the following.

Instance a BeamElem object using vis_BeamElemBegin(). Set attribute objects using vis_BeamElemSetObject(). BeamSect and VisContext attribute objects must be set for any computational and drawing methods. The BeamSect object defines the cross section properties of the beam element.

Tapered beams may be modelled by specifying separate scale factors to be applied to the beam section geometry at each beam end point. These scale factors are set using vis_BeamElemSetEndFactors(). Intermediate nodes on the beam, if they exist, are given scale factors which linearly vary between the end points.

The orientation of the sections of the beam relative to the beam axis are specified using two optional orientation vectors at each node. If orientation vectors are not supplied the convention used for constructing the local coordinate system of the beam sections at each node is specified using vis_BeamElemSetLocalSystem(). Use vis_BeamElemDirCos() to compute the local coordinate system direction cosine matrix at the beam centroid or beam nodes. Use vis_BeamElemCoords() to compute the coordinates of the beam nodes at a beam section point.

A complete beam element is drawn using vis_BeamElemCurv(). If the beam topology has been set to VIS_SHAPEPOINT by vis_BeamElemSetTopology(), then only a single cross section is drawn. If the beam shape is VIS_SHAPELINE then a specified number of cross sections and the beam reference axis or external surfaces along the beam axis are drawn. Beams may be drawn with up to 13 nodes along the length of the beam. Pipe bends and axisymmetric ring stiffeners may be drawn by computing a series of “nodes” (less than or equal to 13) which approximate the curved beam in space.

A contour diagram, such as a shear or bending moment diagram, may be drawn using vis_BeamElemDiagram(). The argument list is identical to vis_BeamElemCurv() with the addition of a vector of scalar data at the nodes and an axis identifier to have the diagram oriented along the beam y’ or z’ axis.

11.2. Attribute Objects

A BeamElem object uses BeamSect, DrawFun, VisContext, Levels, ColorMap and TransMap objects to define attributes to generate a beam element visualization entity. The VisContext object is required for any drawing or computation methods. The DrawFun object is required for any drawing methods. The TransMap object is optional. The ColorMap object is optional for vis_BeamElemCurv() and is required for vis_BeamElemDiagram(). The BeamSect object is required for vis_BeamElemCurv() or computation methods. The Levels object is required for vis_BeamElemDiagram(). A BeamElem object uses the following VisContext components.

Color

Color of axial surfaces which are drawn along the length of the beam.
If the BEAMELEM_SECT parameter is set then the color of the
filled axial surface associated with each beam section loop is
determined by the color settings of the BeamSect attribute object.

Edge

Edge flag, the beam reference axis is drawn and the beam section
loops are drawn. The diagram is outlined.

ElemAxes

Element local coordinate system axes flags

ElemLoc

Element locations at which element coordinate systems and beam
section icons are drawn.

ElemRep

Element representation. VIS_ELEMREP_SOLID draws the axial
surfaces along the length of the beam and the beam section at the
ends of the beam using the BeamSect
attribute object. The coloring of the axial surfaces depends upon the
BEAMELEM_SECT parameter set using vis_BeamElemSetParami().
If enabled, the hollow nature of a beam section may be represented.
In this case the color settings of the BeamSect attribute object are used to determine coloring of the beam axial
surfaces and edges . if disabled, the beam axial surfaces and edges
are drawn using the specified Color and MinorColor. The element
coordinate system axes are drawn. Any other element representation,
such as VIS_ELEMREP_SEMI draws the beam reference axis as well as
element coordinate system axes and beam section icons at the
specified element locations. The representation of the beam section
icons is determined by the BeamSect attribute object.

Fill

Fill flag, the axial surfaces of the beam are drawn and the beam
section is filled.

IsoValType

One of the contour types for drawing diagrams.

LineWidth

Line width of edges

MapSize

Flag to map diagram width to the magnitude of the scalar field value.
Size is the diagram width at the maximum magnitude of the scalar
field value.

MinorColor

Color of edges drawn along the length of the beam. If the
BEAMELEM_SECT parameter is set then the color of the axial edges
associated with each beam section loop is determined by the color
settings of the BeamSect attribute object. Color of diagram outline.

MinorLineWidth

Line width of element axes.

Refinement

Level of refinement

Shade

Flag to apply light source shading

Shrink

Shrink factor for beam axis directions.

Size

Length of coordinate system axes. Width of diagram in world coordinates.

Trans

Surface transparency

XColor

Color of coordinate system x axes

YColor

Color of coordinate system y axes

ZColor

Color of coordinate system z axes

The result of drawing a curved beam element with a Tee section is illustrated in Figure 10-1a. The ElemRep is set to VIS_ELEMREP_SEMI and the and the ElemLoc is set to VIS_ELEMLOC_NODES. The shear center and centroid of the sections are drawn. Figure 10-1b illustrates drawing a tapered Box beam element. The ElemRep is set to VIS_ELEMREP_SOLID and the BEAMELEM_SECT parameter has been enabled using vis_BeamElemSetParami(). The surfaces along the axis of the beam have been color coded to the beam section loop id.

../../_images/vistools-beam1a.gif

Figure 10-1a, Draw Sections and Reference Axis of Beam Element

../../_images/vistools-beam1b.gif

Figure 10-1b, Draw Tapered Box Beam Element

../../_images/vistools-beam1c.gif

Figure 10-1b, Draw Bending Moment Diagram

11.3. Function Descriptions

The currently available BeamElem functions are described in detail in this section.

vis_BeamElem *vis_BeamElemBegin(void)

create an instance of an BeamElem object

Create an instance of an BeamElem object. Memory is allocated for the object private data and the pointer to the data is returned. By default all attribute object pointers are NULL.

Destroy an instance of a BeamElem object using

void vis_BeamElemEnd (vis_BeamElem *beamelem)

Return the current value of a BeamElem object error flag using

Vint vis_BeamElemError (vis_BeamElem *beamelem)

Returns

The function returns a pointer to the newly created BeamElem object. If the object creation fails, NULL is returned.

void vis_BeamElemEnd(vis_BeamElem *p)

destroy an instance of a BeamElem object

See vis_BeamElemBegin()

Vint vis_BeamElemError(vis_BeamElem *p)

return the current value of a BeamElem object error flag

See vis_BeamElemBegin()

void vis_BeamElemSetObject(vis_BeamElem *p, Vint objecttype, Vobject *object)

set pointers to attribute objects

Set a pointer to an attribute object. The attribute BeamSect object must be set before any beam drawing or computation functions are called.

Errors

VIS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

Parameters
  • p – Pointer to BeamElem object.

  • objecttype – The name of the object type to be set.

  • object – Pointer to the object to be set.

void vis_BeamElemSetParami(vis_BeamElem *p, Vint ptype, Vint iparam)

set display parameters

The integer parameter BEAMELEM_HOLE toggles the drawing of beam element surfaces which represent holes in the beam element section. Use this to reduce the polygon count for beam elements for which the section holes are not visible. By default BEAMELEM_HOLE is set to on.

The parameter BEAMELEM_SECT toggles the coloring of beam axial surfaces and edges depending upon the color settings in the BeamSect attribute object. This flag is used only if an ElemRep of VIS_ELEMREP_SOLID is specified. By default BEAMELEM_SECT is set to VIS_ON.

Errors

VIS_ERROR_ENUM is generated if an improper ptype is specified.

Parameters
  • p – Pointer to BeamElem object.

  • ptype – Type of display parameter to set

    x=BEAMELEM_HOLE          Toggle drawing of holes surfaces.
     =BEAMELEM_SECT          Draw
    

  • iparam – Specifies the integer value that ptype will be set to.

    x=VIS_OFF                Turn parameter off
     =VIS_ON                 Turn parameter on
    

void vis_BeamElemSetTopology(vis_BeamElem *p, Vint shape, Vint maxi)

set beam element topology

Set beam element topology. All subsequent draw and compute methods such as vis_BeamElemCurv() assume elements of this topology. Refinement is only applied to Lagrange element topologies. If maxi > 4, then piecewise linear interpolation is assumed within each element. See section Computational Cells for a description of element topology conventions.

Errors

  • VIS_ERROR_VALUE is generated if a maxi less than zero is input.

  • VIS_ERROR_ENUM is generated if an improper shape is input.

Parameters
  • p – Pointer to BeamElem object.

  • shape – Element shape parameter

    x=VIS_SHAPEPOINT         Point
     =VIS_SHAPELINE          Line
    

  • maxi – The number of points defining subsequent beam elements. If maxi = 0 then the linear element form of the element is assumed (defined by 2 endpoints). If 2 <= maxi <= 4 then a Lagrange finite element is assumed. If shape is VIS_SHAPEPOINT, then maxi is ignored.

void vis_BeamElemSetLocalSystem(vis_BeamElem *p, Vint type, Vfloat vec[], Vfloat angle)

set local coordinate system convention

Specify the convention to be used to construct the orientation of the beam cross section y’,z’ coordinate system with respect to the beam axis. This convention is ignored if nodal orientation vectors are specified directly (eg. v1flag, v1, v2flag, v2 in vis_BeamElemCurv()). Each local system type specifies a convention for defining an x’y’ plane in which the beam axis, x’ axis, and the beam section y’ axis lie. The beam section z’ axis is constructed to be normal to this plane. The y’ axis is recomputed to be orthogonal to the z’ and x’ axes. The vec array is only used if the specified type requires position or direction vectors. An additional rotation of the y’,z’ axes about the x’ axis can be specified with angle. By default the local system convention is SYS_ELEMSYS_STANDARD with angle set to 0.

If the beam element shape is VIS_SHAPEPOINT, then the axis of the beam is assumed to be the global x axis. In order to orient a point beam element arbitrarily in space, the orientation vectors v1 and v2 must be specified directly in the call to vis_BeamElemCurv().

For a description of element coordinate systems, type, and associated orientation vector data, please see Element Coordinate Systems

Errors

VIS_ERROR_ENUM is generated if an improper type is input.

Parameters
  • p – Pointer to BeamElem object.

  • type – Local system convention

    x=SYS_ELEMSYS_STANDARD         Standard orientation
     =SYS_ELEMSYS_POSITION         Orient to position vector
     =SYS_ELEMSYS_GLOBALPROJECT    Orient to global axis
     =SYS_ELEMSYS_VECTOR           Orient to direction vector
     =SYS_ELEMSYS_VECTORELEMNODE   Orient to nodal direction vectors
     =SYS_ELEMSYS_BISECTOR         Orient to element bisector
     =SYS_ELEMSYS_FIRSTEDGE        Orient to element first edge
     =SYS_ELEMSYS_CYLINDRICAL_ALT  Orient to alternate cylindrical
    

  • vec – Orientation position or direction vector(s)

  • angle – Angle to rotate beam y’,z’ axes about the beam x’ axis in degrees.

void vis_BeamElemSetEndFlag(vis_BeamElem *p, Vint flag)

set ends to be drawn

Set beam element end flag. The flag argument contains bit flags indicating which beam element ends are to be drawn. For example, to draw both ends of the beam set flag = 3; to draw the first end only set flag = 1.

This flag is used only if a ElemRep of VIS_ELEMREP_SOLID is specified in the visualization context. The default end flag is 3.

Parameters
  • p – Pointer to BeamElem object.

  • flag – Element end bit flags to indicate which beam ends are to have cross sections drawn.

void vis_BeamElemSetEndFactors(vis_BeamElem *p, Vfloat factors[])

set beam endpoint section factors

Set beam element end factors. By default, the end factors are unity. In this case the beam element is prismatic with constant section. It is possible to model tapered beams by setting different scale factors at the ends of the beam where factors[0] and factors[1] are applied to the section at the first and last nodes of the beam element respectively. The beam section factors are assumed to vary linearly between the two end points.

Parameters
  • p – Pointer to BeamElem object.

  • factors – Scale factors to be applied to the beam endpoint sections.

void vis_BeamElemCurv(vis_BeamElem *p, Vfloat x[][3], Vint v1flag, Vfloat v1[][3], Vint v2flag, Vfloat v2[][3])

draw beam element

Draw a beam element with reference points, x, and optional user supplied vectors v1 and v2. If only the v1 vector is specified, then the x’ axis is tangent to the beam reference axis and the z’ axis is formed perpendicular to the x’ axis and the v1 vector. The y’ axis is then constructed perpendicular to the z’ and x’ axes. If both the v1 and v2 vectors are specified, then the y’ axis lies in the direction of the v1 vector and x’ is constructed perpendicular to the v1 and v2 vectors. The z’ axis is then constructed perpendicular to the x’ and y’ axes. Note that in this case the x’ axis is not necessarily tangent to the beam reference axis. If vertex normals are not provided, normals are calculated from the input reference geometry using the current element local system convention specified with the function vis_BeamElemSetLocalSystem().

If the beam section shear center and/or centroid are to be properly drawn be sure that the section properties have been computed or set in the BeamSect attribute object.

Errors

VIS_ERROR_NULLOBJECT is generated if BeamSect and VisContext attribute objects have not been set using vis_BeamElemSetObject().

Parameters
  • p – Pointer to BeamElem object.

  • x – Array of point locations defining beam axis.

  • v1flag – User supplied beam y’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v1 – Array of user supplied normals

  • v2flag – User supplied beam z’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v2 – Array of user supplied normals

void vis_BeamElemDiagram(vis_BeamElem *p, Vfloat s[], Vint iaxis, Vfloat x[][3], Vint v1flag, Vfloat v1[][3], Vint v2flag, Vfloat v2[][3])

draw beam element diagram

Draw a beam diagram with scalar values, s, along beam local axis, iaxis with reference points, x, and optional user supplied vectors v1 and v2. See vis_BeamElemCurv() for a description of the orientation vectors v1 and v2.

Errors

VIS_ERROR_NULLOBJECT is generated if BeamSect and VisContext attribute objects have not been set using vis_BeamElemSetObject().

Parameters
  • p – Pointer to BeamElem object.

  • s – Array of scalar field values.

  • iaxis – Axis indicator

    x=SYS_YAXIS              Diagram along y' axis
     =SYS_ZAXIS              Diagram along z' axis
    

  • x – Array of point locations defining beam axis.

  • v1flag – User supplied beam y’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v1 – Array of user supplied normals

  • v2flag – User supplied beam z’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v2 – Array of user supplied normals

void vis_BeamElemCoords(vis_BeamElem *p, Vint id, Vint reflectflag, Vfloat x[][3], Vint v1flag, Vfloat v1[][3], Vint v2flag, Vfloat v2[][3], Vfloat xp[][3])

compute beam coordinates

Compute the coordinates of a beam axis passing through the beam section point specified by id. See vis_BeamElemCurv() for a description of the user supplied vectors, v1 and v2.

Errors

Parameters
  • p – Pointer to BeamElem object.

  • id – Beam section point id.

  • reflectflag – Reverse sense of output coordinates in array xp.

    =VIS_OFF      Do no reverse sense.
    =VIS_ON       Reverse sense.
    

  • x – Array of point locations defining beam axis.

  • v1flag – User supplied beam y’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v1 – Array of user supplied normals

  • v2flag – User supplied beam z’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v2 – Array of user supplied normals

  • xp[out] Array of point locations of beam at beam section point id.

void vis_BeamElemDirCos(vis_BeamElem *p, Vint centroidflag, Vfloat x[][3], Vint v1flag, Vfloat v1[][3], Vint v2flag, Vfloat v2[][3], Vfloat tm[][3][3])

compute beam local direction cosines

Compute the direction cosine matrices of the beam element local coordinate system. See vis_BeamElemCurv() for a description of the user supplied vectors, v1 and v2. If the vectors v1 and v2 are not supplied, the local coordinate system is determined by the local system convention set using vis_BeamElemSetLocalSystem().

Parameters
  • p – Pointer to BeamElem object.

  • centroidflag – Compute direction cosine matrix at beam centroid flag.

    =VIS_OFF      Return direction cosine matrices at beam nodes
    =VIS_ON       Return direction cosine matrix at beam centroid
    

  • x – Array of point locations defining beam axis.

  • v1flag – User supplied beam y’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v1 – Array of user supplied normals

  • v2flag – User supplied beam z’ axis normal flag

    x=VIS_NODATA             No normals provided
     =VIS_VERTEXDATA         Vertex normals are provided
    

  • v2 – Array of user supplied normals

  • tm[out] Array of direction cosine matrices at the beam nodes or a single direction cosine matrix at the beam centroid.

11.4. Beam Section Properties - BeamSect

Use the BeamSect module to manage, compute and draw the section properties of beam elements. The BeamSect module can represent either a homogeneous isotropic beam of arbitrary cross section or a composite isotropic or orthotropic beam cross section with any number of holes. Functions are provided to draw either a line or surface representation of the beam section. Overall geometric and material stiffness properties of the defined section may be computed. The BeamSect module uses the finite element method internally to compute certain section properties such as the torsional constant, effective shear factors and warping coefficient.

The BeamSect module may also be used as an attribute object for a BeamElem object. In this case, beam section geometry is drawn indirectly by calling the drawing methods of the BeamElem object.

The functions associated with a BeamSect object are the following.

Instance a BeamSect object using vis_BeamSectBegin(). Once a BeamSect is instanced, define the beam section type using vis_BeamSectDef(). The BeamSect module allows four basic types of beam sections to be defined; 1) built-in parameterized geometries, 2) user defined connected line segment geometry, 3) user defined general geometries using points and line loops and 4) general beam section properties such as overall area, moments of inertia and material stiffness. If a built-in parameterized geometry such as BEAMSECT_IBEAM is defined, the geometry parameters or dimensions are input using vis_BeamSectSetDimensions(). User defined sections using connected segments, type BEAMSECT_SEGMENTS, are input using vis_BeamSectSetSegments(). User defined sections using points and line loops, type BEAMSECT_GEOMETRY, are input using vis_BeamSectSetPoint() and vis_BeamSectSetLoop(). Each point may be assigned a “round” flag by the user using vis_BeamSectSetRound(). The round flag is used by rendering methods to smoothly shade across the straight input segments of the geometry. This flag may be also assigned automatically internally by built-in sections which contain fillets and other rounds in their geometry. A simplified “polyline” representation of the beam section may be defined for visualization purposes only using vis_BeamSectSetPolyLine().

All built-in sections and sections defined by BEAMSECT_SEGMENTS and BEAMSECT_GEOMETRY are subject to optional, user defined, rotation and/or coordinate reflections. The rotation is specified using vis_BeamSectSetRotate(), the coordinate reflections are specified using vis_BeamSectSetReflect(). These functions must be called before dimensions, segment geometry or point locations are defined. The rotations are applied first followed by the y and z coordinate reflections.

The elastic material properties for the beam section may be specified using vis_BeamSectSetElasProp(). General beam section properties, type BEAMSECT_PROPS, are input using vis_BeamSectSetProps(). Use vis_BeamSectSetParami() to set display options to draw the section centroid, shear center, etc. A generic diagram of a beam cross section appears below illustrating the beam section yz axis system and the y’z’ centroidal principal axis system.

By default, BeamSect assumes a homogeneous isotropic beam. If a composite beam is to be analyzed, then the user must use vis_BeamSectSetParami() with parameter BEAMSECT_VABS enabled. Composite beams can only be defined using type BEAMSECT_GEOMETRY. This involves defining one or more loops with possibly several materials. All other geometry types assume homogeneous isotropic beams. In this case a single material with identifer 1 is assumed. Any material properties defined using vis_BeamSectSetElasProp() must use material identifier 1 and be of type SYS_MAT_ISOTROPIC. Any material loops defined using vis_BeamSectSetLoop() must reference material identifier 1.

../../_images/vistools-beam2.gif

Figure 10-2, Diagram of Beam Section Coordinate Systems and Entities

The beam section geometry may be drawn using vis_BeamSectDraw(). General beam section properties and material stiffnesses may be computed using vis_BeamSectProps(). The user may access computed or previously defined beam section properties using vis_BeamSectGetProps(). All section properties managed by BeamSect are oriented with respect to the beam section yz axis system. For example, moments of inertia are about the centroid, parallel to the beam section yz system. The following section properties are maintained and computed by BeamSect:

A   , Area
Iyy , Moment of inertia about y axis through centroid
Izz , Moment of inertia about z axis through centroid
Iyz , Product of inertia with respect to centroidal axis
Ang , Angle of principal moments of inertia
J   , Torsional constant about the shear center
Ksy , Shear factor along y axis
Ksz , Shear factor along z axis
Ksyz, Coupled shear factor
Ey  , Eccentricity of centroid from origin along y axis
Ez  , Eccentricity of centroid from origin along z axis
Dsy , Shear center offset from centroid along y axis
Dsz , Shear center offset from centroid along z axis
Cw  , Warping coefficient for torsion about the shear center
Ny  , Neutral axis offset from centroid along y axis
Nz  , Neutral axis offset from centroid along z axis

For composite or orthotropic beams the shear factors Ksy, Ksz, and Ksyz, as well as the warping coefficient Cw are undefined and are set to zero. For homogeneous isotropic beams Ny = Nz = 0.

As mentioned above, the geometry of a beam section may be defined either as a parameterized built-in section or as a series of user defined points and loops. In any case the geometry is represented internally as points and loops, each parameterized section generates a set of points and loops which are dependent upon the section. The BeamSect module also performs two types of triangularization of the section, a minimum triangularization and a quality triangularization. As the term implies, the minimum triangularization generates just enough triangles to represent the section for simple drawing purposes. The quality triangularization is generated when beam section properties are computed using vis_BeamSectProps(). The triangles used are quadratic with Serendipity interpolation. The quality triangles are those triangles in the internal finite element mesh used to solve for the section properties. This triangularization may be useful if results data is to be contoured over a beam section. The quality triangularization will generate additional points within the beam section. These points will be added to the points already defined.

When specifying user defined sections, each defined point will be included in the minimum and quality triangulations. This includes internal points which are not connected to a boundary loop. All defined point id’s are preserved in the minimum and quality triangulations.

The number of points, loops, polylines, and minimum and quality triangles defined at any time may be returned using vis_BeamSectGetNum(). Use vis_BeamSectGetPoint() and vis_BeamSectGetLoop() to access the current point coordinates and loop connectivity. Use vis_BeamSectGetPolyLine() to access the current polyline connectivity. Use vis_BeamSectGetTri() and vis_BeamSectGetQualTri() to access triangle connectivity.

Functions are also available to compute the world coordinates and results quantities of a point on a beam section positioned in space. Use vis_BeamSectCoords() to perform these computations. The function vis_BeamSectStrsStrn() computes the tensor stress and strain at a point with a given id on a point on the cross section given the centroidal strains, curvatures and twist. This function is not valid in a composite beam because a point may be shared by several materials and the resulting stress is ambiguous. Instead, use vis_BeamSectElemStrsStrn(). Likewise, vis_BeamSectStrsStrnCoord() computes the same quantities given a coordinate value. If the coordinate is located on the boundary of two materials in a composite beam then the value returned is that of the first element where the point is found. For a more precise evaluation use vis_BeamSectElemStrsStrn().

If only the beam resultants r about the centroid are available, the centroidal strains, curvatures, and twist, e, can be obtained by inverting the relationship

r = dmat * e

where dmat can be obtained with vis_BeamSectGetProps(). Note that r are the resultants relative to the centroid. If the torque about the shear center, Ts, is available, it can be transformed to the centroid, Tc, using the expression

Tc = Ts + Dsy*Nz - Dsz*Ny

where Dsy and Dsz are the shear center offsets, and Ny and Nz are the shear resultant forces. Dsy and Dsz can also be obtained with vis_BeamSectGetProps():

Dsy = props[11]
Dsz = props[12]

Together with other VisTools modules such as Contour and using the beam section geometry access routines the user may generate customized displays of results quantities such as contours of stress on the 3D surfaces of a beam element cross section.

The BeamSect module features a wide selection of parameterized built-in sections. These sections are diagrammed below. The y axis of the section yz system extends horizontally right, the z axis extends vertically up. The origin of the section yz system is indicated by a heavy black dot. The specific location of the origin for each section is as follows:

IBEAM    , midpoint of w1 and h dimensions
CIRCLE   , center
TUBE     , center
PANEL    , center
RECTANGLE, midpoint of w and h dimensions
TRAPEZOID, midpoint of w1 and h dimensions
HEXAGON  , center
TEE      , midpoint of w and h dimensions
ZEE      , midpoint of d3 and h dimensions
CHANNEL  , midpoint of w1 and h dimensions
SECTOR   , center
ELLIPSE  , center
HAT      , midpoint of w1 and h dimensions
CROSS    , midpoint of w and h dimensions
HAT1     , midpoint of w1 and h1 dimensions
ANGLE    , midpoint of w and h dimensions
HATG     , midpoint of w3 and h dimensions
QUAD     , centroid
SOLIDHEXA, centroid
BOX      , midpoint of w and h dimensions
DBOX     , midpoint of w1+w2 and h dimensions
RECTTUBE , midpoint of w and h dimensions
HATT     , midpoint of w1 and h dimensions
../../_images/vistools-beam3a.gif

Figure 10-3a, Diagram of Built-in Parameterized Sections

../../_images/vistools-beam3b.gif

Figure 10-3b, Diagram of Built-in Parameterized Sections

../../_images/vistools-beam3c.gif

Figure 10-3c, Diagram of Built-in Parameterized Sections

../../_images/vistools-beam3d.gif

Figure 10-3d, Diagram of Built-in Parameterized Sections

../../_images/vistools-beam3e.gif

Figure 10-3e, Diagram of Built-in Parameterized Sections

../../_images/vistools-beam3f.gif
../../_images/vistools-beam3h.gif
../../_images/vistools-beam3i.gif

Figure 10-3f, Diagram of Built-in Parameterized Sections

User defined section type BEAMSECT_SEGMENTS is provided for thin-walled open or closed sections. The section is defined using the function vis_BeamSectSetSegments(). The section is defined by a series of points which define a connected series of straight line segments. A thickness is assigned to each segment which is constant over the length of the segment. If the first and last input points are identical, the section is assumed to be closed.

../../_images/vistools-beam3g.gif

Figure 10-3g, Diagram of BEAMSECT_SEGMENTS for 3 segments

11.5. Attribute Objects

A BeamSect object uses DrawFun, VisContext, Levels, ColorMap and TransMap objects to define attributes to generate a beam section visualization entity. The DrawFun and VisContext objects are required for any drawing operations. The ColorMap and TransMap objects are optional. The Levels object is required for drawing beam section loops with color mapping active. A BeamSect object uses the following VisContext components.

AColor

Color of even quadrants or octants of centroid glyph

BColor

Color of odd quadrants or octants of centroid glyph

CColor

Color of shear center marker

Color

Color of filled section surface

Fill

Fill flag, the beam section surface is drawn.

Edge

Edge flag, the beam section loops are drawn.

Spot

Spot flag, the beam section points are drawn.

PointSize

Point size of beam section points.

LineWidth

Line width of beam section edges

MapColor

Map beam section loop id to color for drawing beam sections.

MarkerType

Marker type used for drawing shear center

MinorColor

Color of loops if not mapped to color. Color of points and shear
center.

MinorSize

Size of centroid and shear center markers

Scale

Scale factor for beam section point coordinates.

Shade

Flag to apply light source shading

Size

Length of beam section basic coordinate system axes and principal
axes. The principal axes are .7071 * Size

Trans

Section surface transparency

XColor

Color of coordinate system x axes

YColor

Color of coordinate system y axes

The result of drawing a built-in IBEAM and user defined section in the shape of the letter “A” is illustrated below. The quality triangles have been plotted on the user defined section.

../../_images/vistools-beam4a.gif

Figure 10-4a, Built-in IBEAM Section

../../_images/vistools-beam4b.gif

Figure 10-4b, User Defined Section

11.6. Function Descriptions

The currently available BeamSect functions are described in detail in this section.

vis_BeamSect *vis_BeamSectBegin(void)

create an instance of a BeamSect object

Create an instance of an BeamSect object. Memory is allocated for the object private data and the pointer to the data is returned. By default all attribute object pointers are NULL.

Destroy an instance of a BeamSect object using

void vis_BeamSectEnd (vis_BeamSect *beamsect)

Return the current value of a BeamSect object error flag using

Vint vis_BeamSectError (vis_BeamSect *beamsect)

Returns

The function returns a pointer to the newly created BeamSect object. If the object creation fails, NULL is returned.

void vis_BeamSectEnd(vis_BeamSect *p)

destroy an instance of a BeamSect object

See vis_BeamSectBegin()

Vint vis_BeamSectError(vis_BeamSect *p)

return the current value of a BeamSect object error flag

See vis_BeamSectBegin()

void vis_BeamSectSetObject(vis_BeamSect *p, Vint objecttype, Vobject *object)

set pointers to attribute objects

Set a pointer to an attribute object.

Errors

VIS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

Parameters
  • p – Pointer to BeamSect object.

  • objecttype – The name of the object type to be set.

    x=VIS_COLORMAP           ColorMap object
     =VGL_DRAWFUN            DrawFun object
     =VIS_LEVELS             Levels object
     =VIS_TRANSMAP           TransMap object
     =VIS_VISCONTEXT         VisContext object
    

  • object – Pointer to the object to be set.

void vis_BeamSectSetParami(vis_BeamSect *p, Vint ptype, Vint iparam)

set beam section display parameters

Set beam section display parameters. The parameter BEAMSECT_AXESBASIC draws the beam section basic coordinate system y and z axes. By default BEAMSECT_AXESBASIC is set to VIS_OFF.

The parameter BEAMSECT_AXESPRINCIPAL draws the beam section principal axes at the section centroid. By default BEAMSECT_AXESPRINCIPAL is set to VIS_OFF.

The parameter BEAMSECT_CENTROID draws a circle or sphere glyph at the beam section centroid. By default BEAMSECT_CENTROID is set to BEAMSECT_CENTROID_NONE.

The parameter BEAMSECT_SHEARCENTER draws a marker at the beam section shear center location. By default BEAMSECT_SHEARCENTER is set to VIS_OFF.

The parameter BEAMSECT_QUALITYGRID draws the edges of the internal finite element mesh. This mesh is the quality triangulation. By default BEAMSECT_QUALITYGRID is set to VIS_OFF.

The parameter BEAMSECT_POLYLINE draws the beam section using the polyline representation rather than the loop representation. By default BEAMSECT_POLYLINE is set to VIS_OFF.

The parameter BEAMSECT_MESHREFCORN toggles the refinement of the quality grid near reentrant corners. By default BEAMSECT_MESHREFCORN is set to VIS_OFF.

The parameter BEAMSECT_MESHSMOOTH toggles the smoothing of the quality grid. By default BEAMSECT_MESHSMOOTH is set to VIS_OFF.

The parameter BEAMSECT_MAXELEMENTS sets the maximum number of elements to be performed during adaptive error refinement. A value of zero means the number of elements is unlimited. By default BEAMSECT_MAXELEMENTS is set to 0.

The parameter BEAMSECT_MAXERRITER sets the maximum number of iterations to be performed during adaptive error refinement. By default BEAMSECT_MAXERRITER is set to 10.

The parameter BEAMSECT_REFINE toggles adaptive error refinement. By default BEAMSECT_REFINE is set to VIS_OFF.

The parameter BEAMSECT_VABS toggles the VABS technology. This is required for either multi-material or orthotropic material models. By default BEAMSECT_VABS is set to VIS_OFF.

Errors

VIS_ERROR_ENUM is generated if an improper ptype is specified.

Parameters
  • p – Pointer to BeamSect object.

  • ptype – Type of display parameter to set

    x=BEAMSECT_AXESBASIC      Draw basic local coordinate system
     =BEAMSECT_AXESPRINCIPAL  Draw principal axes
     =BEAMSECT_CENTROID       Draw centroid glyph
     =BEAMSECT_SHEARCENTER    Draw shear center marker
     =BEAMSECT_QUALITYGRID    Draw edges of internal finite
                              element mesh flag.
     =BEAMSECT_POLYLINE       Draw section using polylines flag
     =BEAMSECT_MESHREFCORN    Refine quality grid near corners
     =BEAMSECT_MESHSMOOTH     Smooth quality grid
     =BEAMSECT_MAXELEMENTS    Maximum number of elements
     =BEAMSECT_MAXERRITER     Maximum number of adaptive iterations
     =BEAMSECT_REFINE         Toggle adaptive error refinement
     =BEAMSECT_VABS           Toggle VABS technology
    

  • iparam – Specifies the integer value that ptype will be set to.

    x=VIS_OFF                Turn parameter off
     =VIS_ON                 Turn parameter on
     =BEAMSECT_CENTROID_NONE Centroid not drawn
     =BEAMSECT_CENTROID_CIRCLE Centroid drawn as circle
     =BEAMSECT_CENTROID_SPHERE Centroid drawn as sphere
    

void vis_BeamSectSetParamd(vis_BeamSect *p, Vint ptype, Vdouble dparam)

set beam section compute parameters

Set beam section compute parameters. The parameter BEAMSECT_EDGELENGTH sets the target edge length of the quality triangulation used to compute section properties. A value of zero for BEAMSECT_EDGELENGTH means that the internally computed edge length will be used. By default BEAMSECT_EDGELENGTH is set to zero.

The parameter BEAMSECT_ERRORTOL sets the error tolerance to be achieved when adaptive refinement is enabled. Use vis_BeamSectSetParami() with parameter BEAMSECT_REFINE to enable adaptive error refinement. By default BEAMSECT_ERRORTOL is set to .01 (one percent).

Errors

VIS_ERROR_ENUM is generated if an improper ptype is specified.

Parameters
  • p – Pointer to BeamSect object.

  • ptype – Type of compute parameter to set

    x=BEAMSECT_EDGELENGTH     Target quality edge length
     =BEAMSECT_ERROROL        Error tolerance
    

  • dparam – Specifies the value that ptype will be set to.

void vis_BeamSectDef(vis_BeamSect *p, Vint type)

define beam section type

Define the type of beam section to be represented. If type is BEAMSECT_PROPS, the user must enter the overall section properties and material stiffness matrices explicitly using vis_BeamSectSetProps(). If type is input as BEAMSECT_GEOMETRY, then the user specifies an arbitrary beam section by defining point locations and planar loops using vis_BeamSectSetPoint() and vis_BeamSectSetLoop() respectively. If type is input as BEAMSECT_SEGMENTS, then the user specifies a connected segments section by defining point locations and segment thicknesses using vis_BeamSectSetSegments(). If type is input as a built-in parameterized section such as BEAMSECT_IBEAM, then the user specifies the section dimensions using vis_BeamSectSetDimensions()

Inquire of defined type as an output argument using

void vis_BeamSectInq (vis_BeamSect *beamsect,
                      Vint *type)

Errors

VIS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to BeamSect object.

  • type – Beam section type

    x=BEAMSECT_PROPS            Generalized section properties
     =BEAMSECT_BOX              Hollow Box
     =BEAMSECT_DBOX             Hollow double Box
     =BEAMSECT_ANGLE            Angle
     =BEAMSECT_IBEAM            I beam
     =BEAMSECT_CIRCLE           Solid circle
     =BEAMSECT_TUBE             Hollow tube
     =BEAMSECT_PANEL            Panel
     =BEAMSECT_RECTANGLE        Rectangle
     =BEAMSECT_TRAPEZOID        Trapezoid
     =BEAMSECT_HEXAGON          Hollow hexagon
     =BEAMSECT_SOLIDHEXA        Solid hexagon
     =BEAMSECT_TEE              Tee
     =BEAMSECT_ZEE              Zee
     =BEAMSECT_CHANNEL          Channel
     =BEAMSECT_SECTOR           Solid sector
     =BEAMSECT_ELLIPSE          Solid ellipse
     =BEAMSECT_HAT              Hat
     =BEAMSECT_HATG             Hat general
     =BEAMSECT_HAT1             Hat with base
     =BEAMSECT_HATT             Hat angled with base
     =BEAMSECT_CROSS            Cross
     =BEAMSECT_RECTTUBE         Rectangular tube
     =BEAMSECT_GEOMETRY         Arbitrary section
     =BEAMSECT_SEGMENTS         Connected segments section
    

void vis_BeamSectInq(vis_BeamSect *p, Vint *type)

inquire of defined type as an output argument

See vis_BeamSectDef()

void vis_BeamSectSetRotate(vis_BeamSect *p, Vfloat angle)

set beam section rotation

Set the rotation angle in degrees for built-in sections. A positive angle is a counter clockwise rotation in the y-z plane. By default angle is zero.

Parameters
  • p – Pointer to BeamSect object.

  • angle – Angle of rotation in degrees

void vis_BeamSectSetRotatedv(vis_BeamSect *p, Vdouble angle)

set beam section rotation

See vis_BeamSectSetRotate()

void vis_BeamSectSetReflect(vis_BeamSect *p, Vint reflecty, Vint reflectz)

set beam section reflection

Set the axis reflection flags for built-in sections. A non-zero value for reflecty and/or reflectz indicates that the built-in section coordinates are to be reflected. By default reflecty and reflectz are zero.

Parameters
  • p – Pointer to BeamSect object.

  • reflecty – Flag to reflect y-coordinate

  • reflectz – Flag to reflect z-coordinate

void vis_BeamSectSetDimensions(vis_BeamSect *p, Vfloat dimes[])

set dimensions of built-in geometries

Set dimensions for a built-in beam section type. The number and type of dimensions required are section dependent as defined by vis_BeamSectDef().

            BOX  ANGLE  IBEAM  CIRCLE  TUBE  PANEL  RECTANGLE
dimes[0] =  w    w      w1     r       r     r      w
dimes[1] =  h    h      w2             t     t      h
dimes[2] =  d1   d1     h                    a
dimes[3] =  d2   d2     d1
dimes[4] =  d3   r      d2
dimes[5] =  d4          d3
dimes[6] =  r1          r1
dimes[7] =  r2          r2

            TRAPEZOID  HEXAGON  SOLIDHEXA  TEE  ZEE  CHANNEL  SECTOR  ELLIPSE
dimes[0] =  w1         r        w          w    w1   w1       r       r1
dimes[1] =  w2         t        h          h    w2   w2       a       r2
dimes[2] =  h                   d1         d1   h    h
dimes[3] =                                 d2   d1   d1
dimes[4] =                                 r    d2   d2
dimes[5] =                                      d3   d3
dimes[6] =                                      r1   r1
dimes[7] =                                      r2   r2

             HAT  CROSS  HAT1  DBOX  HATG  QUAD  HATT  RECTTUBE
dimes[0]  =  w1   w      w1    w1    w1    y1    w1    w
dimes[1]  =  w2   h      w2    w2    w2    z1    w2    h
dimes[2]  =  h    d1     h1    h     w3    y2    w3    t
dimes[3]  =  d1   d2     h2    d1    h     z2    h     r
dimes[4]  =  d2   r1     d1    d2    d1    y3    d1
dimes[5]  =  d3   r2     d2    d3    d2    z3    d2
dimes[6]  =  r1          d3    d4    d3    y4    d3
dimes[7]  =  r2          r1    d5    d4    z4
dimes[8]  =              r2    d6    d5
dimes[9]  =                    d7    r1
dimes[10] =                    r1    r2
dimes[11] =                    r2
dimes[12] =                    r3
dimes[13] =                    r4

Inquire of beam dimensions as output arguments using

void vis_BeamSectGetDimensions (vis_BeamSect *beamsect,
                                Vfloat dimes[])

void vis_BeamSectGetDimensionsdv (vis_BeamSect *beamsect,
                                  Vdouble dimes[])

Errors

VIS_ERROR_OPERATION is generated if the beam type as defined by vis_BeamSectDef() is BEAMSECT_PROPS, BEAMSECT_SEGMENTS or BEAMSECT_GEOMETRY.

Parameters
  • p – Pointer to BeamSect object.

  • dimes – Dimensions of section.

void vis_BeamSectSetDimensionsdv(vis_BeamSect *p, Vdouble dimes[])

set dimensions of built-in geometries

See vis_BeamSectSetDimensions()

void vis_BeamSectGetDimensions(vis_BeamSect *p, Vfloat dimes[])

get dimensions of built-in geometries

See vis_BeamSectSetDimensions()

void vis_BeamSectGetDimensionsdv(vis_BeamSect *p, Vdouble dimes[])

get dimensions of built-in geometries

See vis_BeamSectSetDimensions()

void vis_BeamSectSetPoint(vis_BeamSect *p, Vint id, Vfloat yz[2])

set location of point on beam section

Set the y and z coordinates of a point, id, on the beam section. The round flag for the point is set to zero. Use the function vis_BeamSectSetRound() to set the round flag. Use vis_BeamSectSetLoop() to define section geometry using points.

Inquire of point coordinates for a given point id as an output argument using

void vis_BeamSectGetPoint (vis_BeamSect *beamsect,
                           Vint id,
                           Vfloat yz[2])

void vis_BeamSectGetPointdv (vis_BeamSect *beamsect,
                             Vint id,
                             Vdouble yz[2])

Errors

  • VIS_ERROR_OPERATION is generated if the beam type as defined by vis_BeamSectDef() is not BEAMSECT_GEOMETRY.

  • VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Point id, 0 < id

  • yz – Vector of y and z coordinates of point on beam section

void vis_BeamSectSetPointdv(vis_BeamSect *p, Vint id, Vdouble x[2])

set location of point on beam section

See vis_BeamSectSetPoint()

void vis_BeamSectGetPoint(vis_BeamSect *p, Vint id, Vfloat x[2])

get location of point on beam section

See vis_BeamSectSetPoint()

void vis_BeamSectGetPointdv(vis_BeamSect *p, Vint id, Vdouble x[2])

get location of point on beam section

See vis_BeamSectSetPoint()

void vis_BeamSectSetRound(vis_BeamSect *p, Vint id, Vint roundflag)

set round flag of point on beam section

Set the round flag of a previously defined point, id, on the beam section. The roundflag indicates that the point connects two line segments which approximate a curve or “round” at that point. This flag is used by rendering functions to smoothly shade across the point. The roundflag is automatically set at the proper points for built-in sections.

Inquire of the point roundflag for a given point id as an output argument using

void vis_BeamSectGetRound (vis_BeamSect *beamsect,
                           Vint id,
                           Vint *roundflag)

Errors

VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Point id, 0 < id

  • roundflag – “Round” flag at point

void vis_BeamSectGetRound(vis_BeamSect *p, Vint id, Vint *roundflag)

get round flag of point on beam section

See vis_BeamSectSetRound()

void vis_BeamSectSetLoop(vis_BeamSect *p, Vint id, Vint mid, Vint npts, Vint ix[])

set loop point connectivity, etc.

Set the point connectivity of a loop describing the geometry of the beam section. Each loop is assigned an identifier, id. The material assigned to the loop may be set using the mid parameter. A hole is defined with mid = 0. The material id mid must match the one used in vis_BeamSectSetElasProp().

The loop is assumed to be closed, therefore the last point identifier in the loop should not duplicate the first. All loops must be input with a counter clockwise connectivity in the beam section yz plane.

Inquire of loop geometry for a given loop i as output arguments using

void vis_BeamSectGetLoop (vis_BeamSect *beamsect,
                          Vint id,
                          Vint *mid,
                          Vint *npts,

Errors

  • VIS_ERROR_OPERATION is generated if the beam type as defined by vis_BeamSectDef is not BEAMSECT_GEOMETRY.

  • VIS_ERROR_VALUE is generated if an improper id is input.

  • VIS_ERROR_VALUE is generated if mid is less than zero.

Parameters
  • p – Pointer to BeamSect object.

  • id – Loop id

  • mid – Material id. A value of 0 indicates a hole.

  • npts – Number of points defining loop

  • ix – Point connectivity of loop

void vis_BeamSectSetPolyLine(vis_BeamSect *p, Vint id, Vint type, Vint npts, Vint ix[])

set polyline point connectivity, etc.

Set the point connectivity of a polyline describing a beam section. The polyline representation is meant to provide a simplified representation of a beam section to reduce the cost of drawing the beam section. The polyline representation of the beam section is drawn by enabling the BEAMSECT_POLYLINE using vis_BeamSectSetParami(). Each polyline is assigned an identifier, id. The polyline may be flagged as defining a closed loop by setting the type flag appropriately.

Any polyline forming a closed loop should be input with a counter clockwise connectivity in the beam section yz plane.

Inquire of polyline geometry for a given polyline id as output arguments using

void vis_BeamSectGetPolyLine (vis_BeamSect *beamsect,
                              Vint id,
                              Vint *type,
                              Vint *npts,
                              Vint ix[])

Errors

  • VIS_ERROR_OPERATION is generated if the beam type as defined by vis_BeamSectDef() is not BEAMSECT_GEOMETRY.

  • VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Polyline id, 0 < id < 8

  • type – Polyline closed loop flag

    =VIS_OFF      polyline is not a closed loop
    =VIS_ON       polyline is a closed loop
    

  • npts – Number of points defining polyline

  • ix – Point connectivity of polyline

void vis_BeamSectSetElasProp(vis_BeamSect *p, Vint mid, Vint type, Vfloat elas[])

set elastic material properties

Set material properties for the beam cross section. The default material properties are of type SYS_MAT_ISOTROPIC with Young’s modulus, E = 1. and Poisson’s ratio, nu = 0. The shear modulus, G, is set to E/(2.*(1+nu)). If type is set to SYS_MAT_ISOTROPIC then input 2 values, E and Nu. If type is set to SYS_MAT_ORTHOTROPIC then input 9 values, Ex, Ey, Ez, Nuxy, Nuyz, Nuxz, Gxy, Gyz, Gxz. The material id mid must match the id specified in vis_BeamSectSetLoop().

Errors

VIS_ERROR_VALUE is generated if an improper property is specified.

Parameters
  • p – Pointer to BeamSect object.

  • mid – Material property id

  • type – Material property type

    x=SYS_MAT_ISOTROPIC         Isotropic material
     =SYS_MAT_ORTHOTROPIC       Orthotropic material
    

  • elas – Array of elastic properties

void vis_BeamSectSetElasPropdv(vis_BeamSect *p, Vint mid, Vint type, Vdouble elas[])

set elastic material properties

See vis_BeamSectSetElasProp()

void vis_BeamSectWrite(vis_BeamSect *p, Vint type, const Vchar *path)

write input section geometry to file

Write a section geometry description to a file. The contents of the file is intended for internal use only. This function should be called immediately before vis_BeamSectProps(). This file can then be transmitted to Visual Kinematics for debugging purposes. It is suggested that a file extension of .bms be used for ASCII files and .bbms be used for BINARY files.

Errors

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • SYS_ERROR_FILE is generated if the file can not be opened.

  • SYS_ERROR_OPERATION is generated if the input surface has not been defined.

Parameters
  • p – Pointer to BeamSect object.

  • type – File type

    x=SYS_ASCII              ASCII format
     =SYS_BINARY             Binary format
    

  • path – File path

void vis_BeamSectRead(vis_BeamSect *p, const Vchar *path)

read input section geometry from file

Read a section geometry description from a file which has been previously written by vis_BeamSectWrite(). The format of the file is not published and is intended for internal use only.

Errors

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • SYS_ERROR_FILE is generated if the file can not be opened.

  • SYS_ERROR_FORMAT is generated if the file contents are not correctly formatted.

Parameters
  • p – Pointer to BeamSect object.

  • path – File path

void vis_BeamSectDraw(vis_BeamSect *p, Vfloat x[3], Vfloat tm[3][3], Vint reflectflag)

draw beam section

Draw a beam section at x with orientation tm. Normally the beam section surface is drawn with polygons with normals in the direction of the cross product of the section y and z axes. The reflectflag will reverse the sense of the polygons. The section may be drawn as a set of points and lines representing the outline of the section or as a filled surface. Optionally, the y and z axes of the section may be drawn, the principal axes and the shear center.

If beam section geometry has been defined then points are drawn at the points on loops defining the beam section. Lines are drawn to represent the defined loops. The loop lines may be color mapped to the loop id. The section surface may be filled.

In addition, if the appropriate flags have been set using vis_BeamSectSetParami(), axes are drawn to represent the beam section coordinate system, shear center, etc.

Errors

  • VIS_ERROR_COMPUTE is generated if a minimum triangularization can not be computed.

  • VIS_ERROR_NULLOBJECT is generated if a required attribute object has not been set using vis_BeamSectSetObject().

Parameters
  • p – Pointer to BeamSect object.

  • x – Location of beam section coordinate origin

  • tm – Orientation of beam section coordinate system.

  • reflectflag – Reverse sense of output polygons

    =VIS_OFF      Do no reverse sense.
    =VIS_ON       Reverse sense.
    

void vis_BeamSectGetNum(vis_BeamSect *p, Vint *npoints, Vint *nloops, Vint *npolylines, Vint *ntris, Vint *nqualpnts, Vint *nqualtris)

get number of points, loops and generated triangles

Return the number of beam section geometry points and loops defined or generated. The points, loops and polylines may have been explicitly specified using vis_BeamSectSetPoint(), vis_BeamSectSetLoop() and vis_BeamSectSetPolyLine() or implicitly defined as a built-in section geometry using vis_BeamSectSetDimensions(). Information about individual points, loops and polylines may be returned using vis_BeamSectGetPoint(), vis_BeamSectGetLoop() and vis_BeamSectGetPolyLine().

The number of minimum triangles required to fill the beam section may also be returned. Use vis_BeamSectGetTri() to return the minimum triangle point connectivity. The number of quality points and triangles is zero until vis_BeamSectProps() is called. The quality points and triangles are related to the finite element mesh generated for the beam section property analysis. Use vis_BeamSectGetQualTri() to return the quality triangle point connectivity. Quality points consist of the input boundary points and points generated in the interior of the beam section as a result of the internal finite element mesh generation. Use vis_BeamSectGetPoint() to return the quality points.

Parameters
  • p – Pointer to BeamSect object.

  • npoints[out] Number of points defined or generated

  • nloops[out] Number of loops defined or generated

  • npolylines[out] Number of polylines defined or generated

  • ntris[out] Number of minimum triangles generated

  • nqualpnts[out] Number of quality points generated

  • nqualtris[out] Number of quality triangles generated

void vis_BeamSectGetPolyLine(vis_BeamSect *p, Vint id, Vint *type, Vint *npts, Vint ix[])

get polyline point connectivity, etc.

See vis_BeamSectSetPolyLine()

void vis_BeamSectGetTri(vis_BeamSect *p, Vint id, Vint ix[])

get minimum triangle connectivity

Return the point connectivity of a triangle in the minimum triangularization. Use vis_BeamSectGetNum() to return the number of minimum triangles. Use vis_BeamSectGetPoint() to return the coordinates of a point. Minimum triangles are 3 node linear triangles.

Errors

VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Beam section minimum triangle id.

  • ix[out] Point connectivity of triangle

void vis_BeamSectGetQualTri(vis_BeamSect *p, Vint id, Vint ix[], Vint *mid)

get triangle connectivity

Return the point connectivity of a triangle in the quality triangularization. Use vis_BeamSectGetNum() to return the number of quality triangles. Use vis_BeamSectGetPoint() to return the coordinates of a point. Quality triangles are only generated by a call to vis_BeamSectProps(). Quality triangles are 6 node, quadratic Serendipity triangles.

Errors

VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Beam section quality triangle id.

  • ix[out] Point connectivity of triangle

  • mid[out] Material property id

void vis_BeamSectCoords(vis_BeamSect *p, Vint id, Vfloat x[3], Vfloat vy[3], Vfloat vz[3], Vfloat xp[3])

compute coordinates on beam section

Compute the coordinates of a beam section point, id, given a position, x, and orientation vectors, vy and vz of the beam section y and z axes in space. If the orientation vectors are not orthogonal or normalized to unity, the beam section will be correspondingly skewed or scaled in space.

Errors

VIS_ERROR_VALUE is generated if an improper id is input.

Parameters
  • p – Pointer to BeamSect object.

  • id – Beam section point id.

  • x – Location of origin of beam section yz axes

  • vy – Normal vector in direction of section y axis in space

  • vz – Normal vector in direction of section z axis in space

  • xp[out] Location of beam section point id.

void vis_BeamSectCoordsdv(vis_BeamSect *p, Vint id, Vdouble x[3], Vdouble vy[3], Vdouble vz[3], Vdouble xp[3])

compute coordinates on beam section

See vis_BeamSectCoords()

void vis_BeamSectStrsStrndv(vis_BeamSect *p, Vint id, Vdouble eks[6], Vdouble strs[6], Vdouble strn[6])

compute beam stress and strain

See vis_BeamSectStrsStrn()

void vis_BeamSectStrsStrn(vis_BeamSect *p, Vint id, Vfloat eks[6], Vfloat strs[6], Vfloat strn[6])

compute beam stress and strain

Compute the full stress, strs and strain, strn tensor at section point id given the strains, curvatures and twist, eks about the centroidal axis. The stress and strain components are ordered (xx,yy,zz,xy,yz,zx) The components of eks are ordered (exx,kyy,kzz,twist,exy,ezx).

Note that if the right-hand rotations about the x,y,z axes are denoted by rx,ry,rz, then the twist, twist and curvatures, kyy,kzz are given by:

twist =  rx,x
kyy   =  ry,x
kzz   = -rz,x
Errors

  • VIS_ERROR_VALUE is generated if an improper section point id is input.

  • VIS_ERROR_OPERATION is generated if either multiple materials or an orthotropic material are defined.

Parameters
  • p – Pointer to BeamSect object.

  • id – Beam section point id.

  • eks – Strains, curvatures and twist.

  • strs[out] Stress tensor

  • strn[out] Strain tensor

void vis_BeamSectElemStrsStrn(vis_BeamSect *p, Vint eid, Vfloat eks[6], Vfloat strs[], Vfloat strn[])

compute beam stress and strain at element nodes

Compute the full stress, strs and strain, strn tensor at all nodes in element eid given the strains, curvatures and twist, eks about the centroidal axis. The stress and strain components are ordered (xx1,yy1,zz1,xy1,yz1,zx1, xx2,yy2,zz2,xy2,yz2,zx2, etc.) where 1 and 2 stand for the element’s first and second nodes. The components of eks are ordered (exx,kyy,kzz,twist,exy,ezx).

Note that if the right-hand rotations about the x,y,z axes are denoted by rx,ry,rz, then the twist, twist and curvatures, kyy,kzz are given by:

twist =  rx,x
kyy   =  ry,x
kzz   = -rz,x
Errors

VIS_ERROR_VALUE is generated if an improper section element eid is input.

Parameters
  • p – Pointer to BeamSect object.

  • eid – Beam section quality element id.

  • eks – Strains, curvatures and twist.

  • strs[out] Stress tensor at element nodes

  • strn[out] Strain tensor at element nodes

void vis_BeamSectElemStrsStrndv(vis_BeamSect *p, Vint eid, Vdouble eks[6], Vdouble strs[], Vdouble strn[])

compute beam stress and strain at element nodes

See vis_BeamSectElemStrsStrn()

void vis_BeamSectStrsStrnCoorddv(vis_BeamSect *p, Vdouble x[2], Vdouble eks[], Vdouble strs[], Vdouble strn[], Vint *status)

compute beam stress and strain

See vis_BeamSectStrsStrnCoord()

void vis_BeamSectStrsStrnCoord(vis_BeamSect *p, Vfloat yx[2], Vfloat eks[], Vfloat strs[], Vfloat strn[], Vint *status)

compute beam stress and strain

Compute the full stress, strs and strain, strn tensor at section a point with given yz coordinates given the strains, curvatures and twist, eks about the centroidal axis. These deformations are explained in vis_BeamSectStrsStrn(). The coordinates given in yz must be in the transformed space. The space is transformed if either vis_BeamSectSetRotate() or vis_BeamSectSetReflect() have been set. If a point coordinate has not been transformed its resulting transformed coordinate can be obtained with vis_BeamSectTransformCoord().

If the function is unable to locate the given point in the cross section status is set to 1. Otherwise it is set to 0.

If the point is on a boundary between multiple material models then the material of the first element is chosen.

Parameters
  • p – Pointer to BeamSect object.

  • yx – Beam section point coordinates.

  • eks – Strains, curvatures and twist.

  • strs[out] Stress tensor

  • strn[out] Strain tensor

  • status[out] Result status

void vis_BeamSectTransformCoorddv(vis_BeamSect *p, Vdouble x[3], Vdouble xl[3])

transform coordinates

See vis_BeamSectTransformCoord()

void vis_BeamSectTransformCoord(vis_BeamSect *p, Vfloat x[3], Vfloat y[3])

transform coordinates

Transforms the coordinates given in x into y to account for the transformations given by vis_BeamSectSetRotate() and/or vis_BeamSectSetReflect(). Coordinates are rotated first and then reflected.

Parameters
  • p – Pointer to BeamSect object.

  • x – Untransformed coordinate

  • y[out] Transformed coordinate

void vis_BeamSectSetProps(vis_BeamSect *p, Vfloat props[], Vfloat dmat[21])

set general beam section properties

Set the general beam section properties. he overall area, moments of inertia, shear factors, etc. are set. The section properties must appear as follows in the input props vector.

 props[0]  - Area, A
 props[1]  - Moment of inertia about centroidal y axis, Iyy
 props[2]  - Moment of inertia about centroidal z axis, Izz
 props[3]  - Product of inertia with respect to centroidal axis, Iyz
 props[4]  - Angle of principal moments of inertia, Ang
 props[5]  - Torsional constant, J
 props[6]  - Shear factor along y axis, Ksy
 props[7]  - Shear factor along z axis, Ksz
 props[8]  - Coupled shear factor, Ksyz
 props[9]  - Eccentricity of centroid from origin along y axis, Ey
 props[10] - Eccentricity of centroid from origin along z axis, Ez
 props[11] - Shear center offset from centroid along y axis, Dsy
 props[12] - Shear center offset from centroid along z axis, Dsz
 props[13] - Warping coefficient, Cw
 props[14] - Neutral axis offset from centroid along y axis
 props[15] - Neutral axis offset from centroid along z axis
If only a single isotropic material is present and the shear center offsets are both zero, then the material stiffness is as follows, where E and G are the elastic modulus and shear modulus:
 dmat[ 0] = E * A
 dmat[ 2] = E * Iyy
 dmat[ 4] = E * Iyz
 dmat[ 5] = E * Izz
 dmat[ 9] = G * J
 dmat[14] = G * Ksy  * A
 dmat[19] = G * Ksyz * A
 dmat[20] = G * Ksz  * A
If the shear center offset is not zero, BeamSect can compute dmat using vis_BeamSectProps(). The material stiffness is computed about the beam centroid.

Inquire of beam section properties and material stiffness matrices as output arguments using

void vis_BeamSectGetProps (vis_BeamSect *beamsect,
                           Vfloat props[BEAMSECT_MAXPROPS],
                           Vfloat dmat[21])

void vis_BeamSectGetPropsdv (vis_BeamSect *beamsect,
                             Vdouble props[BEAMSECT_MAXPROPS],
                             Vdouble dmat[21])

Parameters
  • p – Pointer to BeamSect object.

  • props – Overall beam section properties

  • dmat – Beam material stiffness matrix

void vis_BeamSectSetPropsdv(vis_BeamSect *p, Vdouble props[], Vdouble dmat[21])

set general beam section properties

See vis_BeamSectSetProps()

void vis_BeamSectGetProps(vis_BeamSect *p, Vfloat props[], Vfloat d[21])

get general beam section properties

See vis_BeamSectSetProps()

void vis_BeamSectGetPropsdv(vis_BeamSect *p, Vdouble props[], Vdouble dmat[21])

get general beam section properties

See vis_BeamSectSetProps()

void vis_BeamSectProps(vis_BeamSect *p)

compute beam section properties

Compute the geometric and material stiffness properties of the beam section. The computed properties will replace any previously computed properties or properties set using vis_BeamSectSetProps(). The geometric properties consist of total area, moments of inertia including torsional moment of inertia, location of centroid, shear factors and location of shear center and warping coefficient. The calculation of the section properties is performed numerically using the finite element method and the exact beam section geometry as defined by the section points and loops. The finite element mesh generated constitutes the set of so-called quality triangles. The number of quality triangles generated depends upon the section geometry. An associated number of points are also generated on the section. A call to the function vis_BeamSectGetNum() will return the total number of points and quality triangles. The number of loops and minimum triangles are not changed by the generation of the quality triangles.

Material stiffness properties consist of the beam section extensional (including torsional), bending and transverse shear stiffness matrices. Material stiffness properties are only computed if material properties have been defined using vis_BeamSectSetElasProp(). Use vis_BeamSectGetProps() to return the computed beam section properties. The beam section properties may be explicitly set using vis_BeamSectSetProps().

Errors

  • VIS_ERROR_OPERATION is generated if no beamsect geometry has been defined.

  • VIS_ERROR_COMPUTE is generated if the beam section is unphysical.

Parameters

p – Pointer to BeamSect object.

void vis_BeamSectGetDouble(vis_BeamSect *p, Vint type, Vdouble *param)

get double precision solution information

Query for double precision information associated with the quality triangulation. If the value has not been computed it is returned as zero.

Errors

SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to BeamSect object.

  • type – Type of integer information to query

    x=BEAMSECT_EDGELEN       Target quality triangle edge length
     =BEAMSECT_ERROR         Achieved error measure
    

  • param[out] Returned double precision information

void vis_BeamSectSetSegments(vis_BeamSect *p, Vint nseg, Vfloat thick[], Vfloat yz[][2])

set segments section type

Set thicknesses and point coordinates of a connected set of line segments which define a beam section. The segment thicknesses should be small with respect to the segment lengths. If the yz[0] coordinates equal the yz[nseg] coordinates, the section is assumed to be closed.

Inquire of segment geometry using

void vis_BeamSectGetSegments (vis_BeamSect *beamsect,
                              Vint *nsegs,
                              Vfloat thick[],
                              Vfloat yz[][2])

void vis_BeamSectGetSegmentsdv (vis_BeamSect *beamsect,
                                Vint *nsegs,
                                Vdouble thick[],
                                Vdouble yz[][2])

Errors

  • VIS_ERROR_OPERATION is generated if the beam type as defined by vis_BeamSectDef() is not BEAMSECT_SEGMENTS.

  • VIS_ERROR_VALUE is generated if nseg is less than one.

Parameters
  • p – Pointer to BeamSect object.

  • nseg – Number of segments

  • thick – Vector of nseg segment thicknesses

  • yz – Vector of nseg+1 segment points

void vis_BeamSectSetSegmentsdv(vis_BeamSect *p, Vint nseg, Vdouble thk[], Vdouble yz[][2])

set segments section type

See vis_BeamSectSetSegments()

void vis_BeamSectGetSegmentsdv(vis_BeamSect *p, Vint *nseg, Vdouble thk[], Vdouble yz[][2])

get segments section type

See vis_BeamSectSetSegments()

void vis_BeamSectGetSegments(vis_BeamSect *p, Vint *nseg, Vfloat thk[], Vfloat yz[][2])

get segments section type

See vis_BeamSectSetSegments()

void vis_BeamSectNumSegments(vis_BeamSect *p, Vint *nseg)

get number of segments

Get number of segments in a segments section type.

Parameters
  • p – Pointer to BeamSect object.

  • nseg[out] Number of segments