sdynpy.core.sdynpy_geometry.from_excel_template
- from_excel_template(path_to_xlsx)
Create a geometry from Excel file template
- Parameters
path_to_xlsx (string) – Path to xlsx Excel file containing geometry information
- Returns
Geometry object created from the Excel file
- Return type
Notes
To use this function, first save out an excel template file using the write_excel_template function. This will construct an excel workbook with four worksheets on which the different portions of the Geometry are defined.
On the Coordinate Systems tab, users will define the various global and local coordinate systems in their geometry. Each geometry requires an ID number. A Name can optionally be given. The Color should be specified as an integer corresponding to the Ideas color map. The Type of the coordinate system should be an integer:
0 - Cartesian 1 - Polar 2 - Spherical
The origin of the coordinate system can be specified with the X Location, Y Location, Z Location columns. Then rotations of the coordinate system can be specified using rotations about axes. Up to three axes and angles can be specified to create arbitrary compound rotations. The rotation axes should be X, Y, or Z, and the rotation angles are in degrees.
On the Nodes tab, all tabs must be filled out. ID numbers must be unique. Colors should be an integer corresponding to the Ideas color map. The position of the node is specified using the X Location, Y Location, Z Location columns. Each node has a displacement coordinate system in which its position is defined, and a a definition coordinate system in which its displacements are defined. These columns should consist of integers corresponding to ID numbers from the Coordinate Systems tab.
On the Elements tab, elements connecting nodes are defined. The ID column must consist of unique integer identifiers. The Color tab should be specified as an integer corresponding to the Ideas color map. The type can be a string (hex, quad, tet, tri, beam, etc.) or an integer consisting of a universal file format element type. If the type column is empty, an element type based on the number of connections given will be used. Defult element types for connection length of 2 is “Type 21 - Linear Beam”, for a connection length of 3 is “Type 41 - Plane Stress Linear Triangle”, and for a connection length of 4 is “Type 44 - Plane Stress Linear Quadrilateral” The columns Node 1 through Node 20 contain the nodes in each element. Only the required number of nodes must be filled out (e.g. a tri element would only contain 3 nodes, so only columns Node 1, Node 2, and Node 3 would be filled).
On the Trace Lines tab, lines connecting the nodes are defined. The ID column must consist of unique integer identifiers. The Description column contains a string description of the line. The Color column should consist of an integer corresponding to the Ideas color map. The Node 1 through Node 20 columns should contain the nodes for each line. Only the number of nodes in the line must be filled out, so if a line only connects 5 nodes, only Node 1 though Node 5 must be filled.