Element
‎ ‎ ‎ 1D Elements

1D Elements

MIDAS PYTHON

Creation Methods

There are three methods available to create 1D elements:

  • Single Element (Main Class) : eg. Truss , Beam
    Creates one element connecting two nodes by their IDs:i and j.
    Use this when we know the specific node IDs to connect.

  • Start and End location (SEmethod) : eg. Truss.SE , Beam.SE
    Creates multiple equally spaced elements between a given start and end location. http://localhost:8000/Element/1D/

  • Start, Direction and Length (SDL method) : eg. Truss.SDL , Beam.SDL
    It creates equally divided elements at Start location along the the direction with given total length.

SS

TRUSS

A nested class within Element used to create truss elements.

Attributes

ID: Element ID
TYPE: Element type = 'TRUSS'
MATL: Material ID of the truss element
SECT: Section ID of the truss element
NODE: Nodes of element in list. eg: [1,2]
ANGLE: Beta angle of the truss element

To create truss element we have total 3 methods :

1. Truss

Element.Truss(i:int, j:int, mat = 1, sect = 1, angle = 0, id = 0)
Creates a truss between nodes i and j.

Parameters

  • i: Node ID of i-th end
  • j: Node ID of j-th end
  • mat (default=1: Material ID of the truss element
  • sect (default=1): Section ID of the truss element
  • angle (default=0): Beta angle of the truss element
  • id (default=0): Manually assign an ID. If 0, ID will be auto-assigned.

Examples

Node(0,0,0)    # Create Node at 0,0,0 with ID = 1(default)
Node(1,1,1)    # Create Node at 1,1,1 with ID = 2(default)

beam1 = Element.Truss(1,2)  # Create Truss connecting Node 1 and Node 2 (default ID = 1)

Node.create()
Element.create()

2. Truss.SE

Element.Truss.SE(s_loc: list, e_loc: list, n: int = 1, mat, sect, angle, id)
Creates n truss elements between start and end location.

Parameters

  • s_loc: Start location. [x,y,z]
  • e_loc: End location. [x,y,z]
  • n (default=1): Number of elements
  • mat,sect,angle,id : Same as Element.Truss() method

Examples

Element.Truss.SE([0,0,0],[10,0,0],10) # Create 10 truss between (0,0,0) and (10,0,0) 

Node.create()
Element.create()

3. Truss.SDL

Element.Truss.SDL(s_loc: list, dir: list, l: float, n: int = 1, mat, sect, angle, id)
Creates n truss elements along a straight line defined by direction dir and length l starting at s_loc.

Parameters

  • s_loc: Starting location [x, y, z]
  • dir: Direction vector [dx, dy, dz]
  • l: Total length of element
  • n (default=1): Number of elements
  • mat,sect,angle,id : Same as Element.Truss() method

Examples

Element.Truss.SDL([0,0,0],[0,0,1],10) # Create a vertical truss of length 10 at (0,0,0)

Node.create()
Element.create()

BEAM

A nested class within Element used to create Beam elements.

Attributes

ID: Element ID
TYPE: Element type = 'BEAM'
MATL: Material ID of the beam element
SECT: Section ID of the beam element
NODE: Nodes of element in list. eg: [1,2]
ANGLE: Beta angle of the beam element

To create Beam element we have total 3 methods :

1. Beam

Element.Beam(i:int, j:int, mat = 1, sect = 1, angle = 0, id = 0)
Creates a Beam between nodes i and j.

Parameters

  • i: Node ID of i-th end
  • j: Node ID of j-th end
  • mat (default=1: Material ID of the Beam element
  • sect (default=1): Section ID of the Beam element
  • angle (default=0): Beta angle of the Beam element
  • id (default=0): Manually assign an ID. If 0, ID will be auto-assigned.

Examples

Node(0,0,0)    # Create Node at 0,0,0 with ID = 1(default)
Node(1,1,1)    # Create Node at 1,1,1 with ID = 2(default)

beam1 = Element.Beam(1,2)  # Create Beam connecting Node 1 and Node 2 (default ID = 1)

Node.create()
Element.create()

2. Beam.SE

Element.Beam.SE(s_loc: list, e_loc: list, n: int = 1, mat, sect, angle, id)
Creates n Beam elements between start and end location.

Parameters

  • s_loc: Start location. [x,y,z]
  • e_loc: End location. [x,y,z]
  • n (default=1): Number of elements
  • mat,sect,angle,id : Same as Element.Beam() method

Examples

Element.Beam.SE([0,0,0],[10,0,0],10) # Create 10 Beam between (0,0,0) and (10,0,0) 

Node.create()
Element.create()

3. Beam.SDL

Element.Beam.SDL(s_loc: list, dir: list, l: float, n: int = 1, mat, sect, angle, id)
Creates n Beam elements along a straight line defined by direction dir and length l starting at s_loc.

Parameters

  • s_loc: Starting location [x, y, z]
  • dir: Direction vector [dx, dy, dz]
  • l: Total length of element
  • n (default=1): Number of elements
  • mat,sect,angle,id : Same as Element.Beam() method

Examples

Element.Beam.SDL([0,0,0],[0,0,1],10) # Create a vertical beam of length 10 at (0,0,0)

Node.create()
Element.create()

Examples

1. Portal Frame

h = 3.5        # Height of each storey
w = 4.0       # Width of each Bay

n_storey = 10 # Total no. of storey
n_bay = 5      # Total no. of bay

for i in range(n_bay+1):
    for j in range(n_storey):
        if i!=n_bay:
            Element.Beam.SDL([i*w,0,j*h],[0,0,1],h,sect=1)  # Column -> Sect ID = 1
            Element.Beam.SDL([i*w,0,(j+1)*h],[1,0,0],w,sect=5) # Beam -> Sect ID = 5
        else:
            Element.Beam.SDL([i*w,0,j*h],[0,0,1],h,sect=1) # Column -> Sect ID = 1

Node.create()
Element.create()

NODE GRID


2. Warren Truss

span = 20.5  # Span of truss
n_div = 8    # No. of bottom divisions
h = 2.5      # Height of truss

dx = 0.5*span/n_div

Element.Truss.SDL([0,0,0],[1,0,0],span,n_div)

Element.Truss.SDL([dx,0,h],[1,0,0],span-2*dx,n_div-1)

for i in range(n_div):
    Element.Truss(i+1,i+2+n_div)
    Element.Truss(i+2,i+2+n_div)

Node.create()
Element.create()

NODE GRID