Node

class compas_fea2.model.Node(*args, **kwargs)[source]

Initialises base Node object.

Note

Nodes are registered to a compas_fea2.model.DeformablePart object and can belong to only one DeformablePart.vEvery time a node is added to a part, it gets registered to that part.

Parameters:
  • name (str, optional) – Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.

  • mass (float or tuple, optional) – Lumped nodal mass, by default None. If float, the same value is used in all 3 directions. if you want to specify a different mass for each direction, provide a tuple as (mass_x, mass_y, mass_z) in global coordinates.

  • xyz (list[float, float, float] | compas.geometry.Point) – The location of the node in the global coordinate system.

  • part (compas_fea2.model.DeformablePart, optional) – DeformablePart object where the node will be registered, by default None

Attributes:
  • name (str) – Uniqe identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.

  • mass (tuple) – Lumped nodal mass in the 3 global directions (mass_x, mass_y, mass_z).

  • key (str, read-only) – The identifier of the node.

  • xyz (list[float]) – The location of the node in the global coordinate system.

  • x (float) – The X coordinate.

  • y (float) – The Y coordinate.

  • z (float) – The Z coordinate.

  • gkey (str, read-only) – The geometric key.

  • dof (dict) – Dictionary with the active degrees of freedom

  • on_boundary (bool | None) – True it the node is on the boundary mesh of the part, False otherwise, by default None.

Examples

>>> node = Node(1.0, 2.0, 3.0)

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

data

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

from_name

Create an instance of a class of the registered plugin from its name.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.