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.NodeMixinsInitialises 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(objects)Adds object(s) to their correct attribute dictionary in the structure.
add_constraint(constraint)Adds a Constraint object to structure.constraints.
add_displacement(displacement)Adds a Displacement object to structure.displacements.
add_displacements(displacements)Adds Displacement objects to structure.displacements.
add_element(nodes, type[, thermal, axes, mass])Adds an element to structure.elements with centroid geometric key.
add_element_properties(element_properties)Adds ElementProperties object(s) to structure.element_properties.
add_element_to_element_index(key, nodes[, ...])Adds the element to the element_index dictionary.
add_elements(elements, type[, thermal, axes])Adds multiple elements of the same type to structure.elements.
add_interaction(interaction)Adds an Interaction object to structure.interactions.
add_load(load)Adds a Load object to structure.loads.
add_loads(loads)Adds Load objects to structure.loads.
add_material(material)Adds a Material object to structure.materials.
add_materials(materials)Adds Material objects to structure.materials.
add_misc(misc)Adds a Misc object to structure.misc.
add_nodal_element(node, type[, virtual_node])Adds a nodal element to structure.elements with the possibility of adding a coincident virtual node.
add_node(xyz[, ex, ey, ez, mass, virtual])Adds a node to structure.nodes at co-ordinates xyz with local frame [ex, ey, ez].
add_node_to_node_index(key, xyz[, virtual])Adds the node to the node_index dictionary.
add_nodes(nodes[, ex, ey, ez])Adds a list of nodes to structure.nodes at given co-ordinates all with local frame [ex, ey, ez].
add_nodes_elements_from_mesh(mesh, element_type)Adds the nodes and faces of a Mesh to the Structure object.
add_nodes_elements_from_network(network, ...)Adds the nodes and edges of a Network to the Structure object.
add_nodes_elements_from_volmesh(volmesh[, ...])Adds the nodes and cells of a VolMesh to the Structure object.
add_section(section)Adds a Section object to structure.sections.
add_sections(sections)Adds Section objects to structure.sections.
add_set(name, type, selection)Adds a node, element or surface set to structure.sets.
add_step(step)Adds a Step object to structure.steps.
add_steps(steps)Adds Step objects to structure.steps.
add_virtual_element(nodes, type[, thermal, axes])Adds a virtual element to structure.elements and to element set 'virtual_elements'.
analyse(software[, exe, cpus, license, ...])Runs the analysis through the chosen FEA software / library.
analyse_and_extract(software[, fields, exe, ...])Runs the analysis through the chosen FEA software / library and extracts data.
assign_element_property(element_property)Assign the ElementProperties object name to associated Elements.
check_element_exists([nodes, xyz, virtual])Check if an element already exists based on nodes or centroid.
check_node_exists(xyz)Check if a node already exists at given x, y, z co-ordinates.
edit_node(key, attr_dict)Edit a node's data.
element_centroid(element)Return the centroid of an element.
Return the number of elements in the Structure.
extract_data(software[, fields, steps, exe, ...])Extracts data from the analysis output files.
get_element_results(step, field[, elements])Extract element results from self.results.
get_nodal_results(step, field[, nodes])Extract nodal results from self.results.
load_from_obj(filename[, output])Imports a Structure object from an .obj file through Pickle.
Return the bounds formed by the Structure's nodal co-ordinates.
Return the number of nodes in the Structure.
node_xyz(node)Return the xyz co-ordinates of a node.
nodes_xyz([nodes])Return the xyz co-ordinates of given or all nodes.
save_to_obj([output])Exports the Structure object to an .obj file through Pickle.
scale_displacements(displacements, factor)Scales displacements by a given factor.
scale_loads(loads, factor)Scales loads by a given factor.
set_steps_order(order)Sets the order that the Steps will be analysed.
summary()Prints a summary of the Structure object.
view([mode])Starts the PyQt app for visualisation.
write_input_file(software[, fields, output, ...])Writes the FE software's input file.