create_beam_element
Create a single beam, truss, or cable element by connecting start and end nodes with given material and section IDs. Set element type, beta angle, and initial strain or force as needed.
Instructions
Create a single frame element (beam/truss/cable) with named parameters
(创建单个梁/杆/索单元,参数具名).
This is the preferred way to create individual elements — all parameters
have explicit names and inline documentation.
Args:
node_i: Start node ID (I端节点编号)
node_j: End node ID (J端节点编号)
mat_id: Material ID — use get_materials to find valid IDs (材料编号)
sec_id: Section ID — use get_section_list to find valid IDs (截面编号)
element_id: Element ID, -1 = auto-assign next available ID (单元编号,-1表示自动分配)
beta_angle: Beta angle in degrees, controls local axis orientation (贝塔角,度)
ele_type: Element type (单元类型): 1=Beam(梁), 2=Truss(杆), 3=Cable(索)
initial_type: Initial strain/force type (初始应变类型): 0=None, 1=Strain, 2=Force
initial_value: Initial strain or force value (初始应变或内力值)
Example:
create_beam_element(node_i=1, node_j=2, mat_id=1, sec_id=1)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mat_id | Yes | ||
| node_i | Yes | ||
| node_j | Yes | ||
| sec_id | Yes | ||
| ele_type | No | ||
| beta_angle | No | ||
| element_id | No | ||
| initial_type | No | ||
| initial_value | No |