# createBeam

MDL FunctionCreates a beam element between I and J marker.

## Defintion

The I and J marker need to be created and passed to this function and a beam element is returned. All three types of beam in MotionView (Arbitrary, Circular and Rectangular) are supported by keyword arguments.

## Signature

beam = createBeam(id, i, j, type, **kwds)

## Input Arguments

id
ID of beam.
i
Marker I of beam.
j
Marker J of beam.
type
Type of beam. Can be ‘arbitrary’, ‘rectangular’ or ‘circular’.
label (optional)
Label of beam.
length
Length of beam.
E
Young's modulus of elasticity.
G
Shear modulus of elasticity.
CRatio
Damping ratio of beam.
AS2
Shear area ratio in the y direction.
AS3
Shear area ratio in the y direction.
OD
Outer diameter of circular beam.
ID
Inner diameter of circular beam.
AS
Shear area ratio of circular beam.
P2_DIM
Y dimension of rectangular beam.
P3_DIM
Z dimension of rectangular beam.
Area
Cross sectional area of arbitrary beam.
I11
Torsional stiffness shape factor for the cross section of arbitrary beam.
I22
The second moment of inertia about y axis of arbitrary beam.
I33
The second moment of inertia about z axis of arbitrary beam.
Fx
Translational preload force along x axis.
Fy
Translational preload force along y axis.
Fz
Translational preload force along z axis.
Tx
Rotational preload torque along x axis.
Ty
Rotational preload torque along y axis.
Tz
Rotational preload torque along z axis.

## Return Value

beam
The Beam entity created.

## Usage

# Create arbitrary beam
beam = createBeam (
id = 1,  label = "2",type = "Arbitrary",
length = 3, E = 4, G = 5, CRatio = 6,
AS2 = 7, AS3 = 8, Area = 9,
I11 = 10, I22 = 11, I33 = 12,
i = part1.cm, j = part2.cm,
Fx = 13, Fy = 14, Fz = 15,
Tx = 16, Ty = 17, Tz = 18,
)
# Create circular beam
beam = createBeam (
id = 1,  label = "3", type = "Circular",
E = 1,  G = 2,  length = 4,
OD = 6, ID = 5,	AS = 7, CRatio = 8,
i = part1.cm, j = part2.cm,
Fx = 13, Fy = 14, Fz = 15,
Tx = 16, Ty = 17, Tz = 18,
)
# Create rectangular beam
beam = createBeam (
id = 1, label = "1",
type = "Rectangular",
E = 1, G = 2, length = 3,
P2_DIM = 4, P3_DIM = 5,
AS2 = 6, AS3 = 7, CRatio = 8,
i = part1.cm, j = part2.cm,
Fx = 13, Fy = 14, Fz = 15,
Tx = 16, Ty = 17, Tz = 18,
)