Structure

class compas_fea.structure.Structure(path, name='compas_fea-Structure')[source]

Bases: compas_fea.structure.mixins.objectmixins.ObjectMixins, compas_fea.structure.mixins.elementmixins.ElementMixins, compas_fea.structure.mixins.nodemixins.NodeMixins

Initialises Structure object for use in finite element analysis.

Parameters
  • path (str) – Path to save all compas_fea associated files.

  • name (str) – Name of the structure.

Attributes
  • constraints (dict) – Constraint objects.

  • displacements (dict) – Displacement objects.

  • elements (dict) – Element objects.

  • element_index (dict) – Index of elements (element centroid geometric keys).

  • element_properties (dict) – ElementProperties objects.

  • interactions (dict) – Interaction objects.

  • loads (dict) – Load objects.

  • materials (dict) – Material objects.

  • misc (dict) – Misc objects.

  • name (str) – Structure name.

  • nodes (dict) – Node objects.

  • node_index (dict) – Index of nodes (node geometric keys).

  • path (str) – Path to save files.

  • results (dict) – Dictionary containing analysis results.

  • sections (dict) – Section objects.

  • sets (dict) – Set objects.

  • steps (dict) – Step objects.

  • steps_order (list) – Sorted list of Step object names.

  • tol (str) – Geometric key tolerance.

  • virtual_nodes (dict) – Node objects for virtual nodes.

  • virtual_elements (dict) – Element objects for virtual elements.

  • virtual_element_index (dict) – Index of virtual elements (element centroid geometric keys).

Methods

add_nodes_elements_from_mesh

Adds the nodes and faces of a Mesh to the Structure object.

add_nodes_elements_from_network

Adds the nodes and edges of a Network to the Structure object.

add_nodes_elements_from_volmesh

Adds the nodes and cells of a VolMesh to the Structure object.

add_set

Adds a node, element or surface set to structure.sets.

analyse

Runs the analysis through the chosen FEA software / library.

analyse_and_extract

Runs the analysis through the chosen FEA software / library and extracts data.

extract_data

Extracts data from the analysis output files.

get_element_results

Extract element results from self.results.

get_nodal_results

Extract nodal results from self.results.

load_from_obj

Imports a Structure object from an .obj file through Pickle.

save_to_obj

Exports the Structure object to an .obj file through Pickle.

scale_displacements

Scales displacements by a given factor.

scale_loads

Scales loads by a given factor.

set_steps_order

Sets the order that the Steps will be analysed.

summary

Prints a summary of the Structure object.

view

Starts the PyQt app for visualisation.

write_input_file

Writes the FE software's input file.

Inherited Methods

add

Adds object(s) to their correct attribute dictionary in the structure.

add_constraint

Adds a Constraint object to structure.constraints.

add_displacement

Adds a Displacement object to structure.displacements.

add_displacements

Adds Displacement objects to structure.displacements.

add_element

Adds an element to structure.elements with centroid geometric key.

add_element_properties

Adds ElementProperties object(s) to structure.element_properties.

add_element_to_element_index

Adds the element to the element_index dictionary.

add_elements

Adds multiple elements of the same type to structure.elements.

add_interaction

Adds an Interaction object to structure.interactions.

add_load

Adds a Load object to structure.loads.

add_loads

Adds Load objects to structure.loads.

add_material

Adds a Material object to structure.materials.

add_materials

Adds Material objects to structure.materials.

add_misc

Adds a Misc object to structure.misc.

add_nodal_element

Adds a nodal element to structure.elements with the possibility of adding a coincident virtual node.

add_node

Adds a node to structure.nodes at co-ordinates xyz with local frame [ex, ey, ez].

add_node_to_node_index

Adds the node to the node_index dictionary.

add_nodes

Adds a list of nodes to structure.nodes at given co-ordinates all with local frame [ex, ey, ez].

add_section

Adds a Section object to structure.sections.

add_sections

Adds Section objects to structure.sections.

add_step

Adds a Step object to structure.steps.

add_steps

Adds Step objects to structure.steps.

add_virtual_element

Adds a virtual element to structure.elements and to element set 'virtual_elements'.

assign_element_property

Assign the ElementProperties object name to associated Elements.

check_element_exists

Check if an element already exists based on nodes or centroid.

check_node_exists

Check if a node already exists at given x, y, z co-ordinates.

edit_element

edit_node

Edit a node's data.

element_centroid

Return the centroid of an element.

element_count

Return the number of elements in the Structure.

node_bounds

Return the bounds formed by the Structure's nodal co-ordinates.

node_count

Return the number of nodes in the Structure.

node_xyz

Return the xyz co-ordinates of a node.

nodes_xyz

Return the xyz co-ordinates of given or all nodes.