Model
- class compas_fea2.model.Model[source]
Bases:
FEADataClass representing an FEA model.
- Parameters:
- descriptionstr, optional
Some description of the model, by default
None. This will be added to the input file and can be useful for future reference.- authorstr, optional
The name of the author of the model, by default
None. This will be added to the input file and can be useful for future reference.
- Attributes:
- descriptionstr
Some description of the model.
- authorstr
The name of the author of the model.
partsSet[compas_fea2.model.Part]Return all the parts registered to the Model.
bcsDict[compas_fea2.model._BoundaryCondition, Set[compas_fea2.model.Node]]Return the boundary conditions of the model.
- tbcsDict[
compas_fea2.model._ThermalBoundaryCondition, Set[compas_fea2.model.Node]] Dictionary with the thermal boundary conditions of the model and the nodes where these are applied.
icsDict[compas_fea2.model._InitialCondition, Set[Union[compas_fea2.model.Node,compas_fea2.model._Element]]]Return the initial conditions of the model.
constraintsSet[compas_fea2.model._Constraint]Return the constraints of the model.
- partgroupsSet[
compas_fea2.model.PartsGroup] The part groups of the model.
materialsSet[compas_fea2.model.Material]Return a set of all materials in the model.
sectionsSet[compas_fea2.model.Section]Return a set of all sections in the model.
problemsSet[compas_fea2.problem.Problem]Return all the problems registered to the Model.
pathpathlib.PathReturn the path of the model.
Notes
Quantities such as volume and gravity are exposed in the active unit system. See
compas_fea2.unitsfor configuration.Methods
Add a :class=`compas_fea2.model.BoundaryConditionsField` to the model.
Add a :class=`compas_fea2.model.bcs.ClampBCXX` to the given nodes.
Add a :class=`compas_fea2.model.bcs.ClampBCYY` to the given nodes.
Add a :class=`compas_fea2.model.bcs.ClampBCZZ` to the given nodes.
Add a connector to the model.
Add a constraint to the model.
Add multiple constraints to the model.
Add a :class=`compas_fea2.model.bcs.FixedBC` to the given nodes.
Add a group to the model.
Add multiple groups to the model.
Add a :class=`compas_fea2.model._InitialCondition` to the model.
Add an interaction to the model.
Add multiple interactions to the model.
compas_fea2.model.InterfaceAdd multiple
compas_fea2.model.Interfaceobjects to the model.Adds a Part to the Model.
Add multiple parts to the model.
Add a :class=`compas_fea2.model.bcs.PinnedBC` to the given nodes.
Add a problem to the model.
Add multiple problems to the model.
Add a
compas_fea2.model.bcs.RollerBCXYto the given nodes.Add a
compas_fea2.model.bcs.RollerBCXZto the given nodes.Add a :class=`compas_fea2.model.bcs.RollerBCX` to the given nodes.
Add a
compas_fea2.model.bcs.RollerBCYZto the given nodes.Add a :class=`compas_fea2.model.bcs.RollerBCY` to the given nodes.
Add a :class=`compas_fea2.model.bcs.RollerBCZ` to the given nodes.
Add a
compas_fea2.model.bcs.ThermalBCto the model.Create an array of parts by applying a transformation multiple times.
Assign keys to the model and its parts.
Clear the model.
Verify that the model contains a specific material.
Verify that the part contains a given node.
Verify that the model contains a specific part.
Verify that the model contains a specific section.
Copy a part and apply a transformation.
Find the n closest nodes around a given node (excluding the node itself).
Find the closest number_of_nodes nodes to a given point.
Retrieve an element in the model using its key.
Find all elements with a given name.
Find the faces of the elements that are contained within a planar polygon.
Find a material by key.
Find a material by name.
Find materials by attribute.
Retrieve a node in the model using its key.
Find a node with a given name.
Find the nodes of the part that are contained within a planar polygon.
Find all nodes on a given plane.
Find if there is a part with a given name in the model.
Find a section by key.
Find a section by name.
Find sections by attribute.
Create a Model instance from a template.
Create a group of parts with an attribute that satisfies a condition.
Release nodes that were previously restrained.
Remove nodes from a boundary condition field.
Reset the model.
Return a summary of the model.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Validate the data against the object's data schema.