Oasys.D3PLOT.Node class

Properties

property Node.data: float | array

Component data for a node passed as an argument to GetMultipleData. Note that data will only exist for the instance of the node passed to GetMultipleData. i.e. it is a local property stored on the specific instance. It is not stored in the D3PLOT database

property Node.include: integer

The include file number in the model that the node is in

property Node.index: integer

The internal index for the node in D3PLOT

property Node.label: integer

The LS-DYNA label for the node

property Node.model: Model

The Model that the node is in

property Node.type: constant

The type for the node (will be Type.NODE)

Static methods

classmethod Node.BlankAll(window, model)

Blanks all of the nodes in the model

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to blank the nodes in

  • model (Model) – Model that all the nodes will be blanked in

Returns:

No return value

Return type:

None

Example

To blank all of the nodes in model m, in graphics window gw:

Oasys.D3PLOT.Node.BlankAll(gw, m)
classmethod Node.BlankFlagged(window, model, flag)

Blanks all of the nodes in the model flagged with a defined flag

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to blank the nodes in

  • model (Model) – Model that the flagged nodes will be blanked in

  • flag (Flag) – Flag (see AllocateFlag) set on the nodes to blank

Returns:

No return value

Return type:

None

Example

To blank all of the nodes flagged with flag f in model m, in graphics window gw:

Oasys.D3PLOT.Node.BlankFlagged(gw, m, f)
classmethod Node.First(model)

Returns the first node in the model (or None if there are no nodes in the model)

Parameters:

model (Model) – Model to get first node in

Returns:

Node object

Return type:

Node

Example

To get the first node in model m:

n = Oasys.D3PLOT.Node.First(m)
classmethod Node.FlagAll(model, flag)

Flags all of the nodes in the model with a defined flag

Parameters:
  • model (Model) – Model that all the nodes will be flagged in

  • flag (Flag) – Flag (see AllocateFlag) to set on the nodes

Returns:

No return value

Return type:

None

Example

To flag all of the nodes with flag f in model m:

Oasys.D3PLOT.Node.FlagAll(m, f)
classmethod Node.GetAll(model)

Gets all of the nodes in the model

Parameters:

model (Model) – Model that all the nodes are in

Returns:

List of Node objects

Return type:

list

Example

To get all of the nodes in model m:

n = Oasys.D3PLOT.Node.GetAll(m)
classmethod Node.GetFlagged(model, flag)

Gets all of the nodes in the model flagged with a defined flag

Parameters:
  • model (Model) – Model that the flagged nodes are in

  • flag (Flag) – Flag (see AllocateFlag) set on the nodes to get

Returns:

List of Node objects

Return type:

list

Example

To get all of the nodes flagged with flag f in model m:

Oasys.D3PLOT.Node.GetFlagged(m, f)
classmethod Node.GetFromID(model, label)

Returns the Node object for node in model with label (or None if it does not exist)

Parameters:
  • model (Model) – Model to get node in

  • label (integer) – The LS-DYNA label for the node in the model

Returns:

Node object

Return type:

Node

Example

To get the node in model m with label 1000:

n = Oasys.D3PLOT.Node.GetFromID(m, 1000)
classmethod Node.GetFromIndex(model, index)

Returns the Node object for node in model with index (or None if it does not exist)

Parameters:
  • model (Model) – Model to get node in

  • index (integer) – The D3PLOT internal index in the model for node

Returns:

Node object

Return type:

Node

Example

To get the node in model m at index 50:

n = Oasys.D3PLOT.Node.GetFromIndex(m, 50)
classmethod Node.GetMultipleData(component, items, options=Oasys.gRPC.defaultArg)

Returns the value for a data component for multiple nodes. For each node a local property called data will be created containing a number if a scalar component, or a list if a vector or tensor component (or None if the value cannot be calculated). The data is also returned as an object.
Also see GetData

Parameters:
Returns:

Dictionary containing the data. A property is created in the dictionary for each node with the label. The value of the property is a number if a scalar component or an array if a vector or tensor component (or None if the value cannot be calculated)

Return type:

dictionary

Example

To calculate a component for nodes in list items and use the data property (note that in the example, the argument extra is optional):

Oasys.D3PLOT.Node.GetMultipleData(component, items, {"extra": 1})
for item in items:
    if item.data != None:
        do_something..

To calculate a component for nodes in list items and use the return value (note that in the example, the argument extra is optional):

data = Oasys.D3PLOT.Node.GetMultipleData(component, items, {"extra": 1})
for d in data:
    Oasys.D3PLOT.Message("Label is {}".format(d))
    if data[d] != None:
        do_something..
classmethod Node.Last(model)

Returns the last node in the model (or None if there are no nodes in the model)

Parameters:

model (Model) – Model to get last node in

Returns:

Node object

Return type:

Node

Example

To get the last node in model m:

n = Oasys.D3PLOT.Node.Last(m)
classmethod Node.Pick()

Allows the user to pick a node from the screen

Returns:

Node object or None if cancelled

Return type:

Node

Example

To pick a node:

n = Oasys.D3PLOT.Node.Pick()
classmethod Node.Select(flag)

Selects nodes using an object menu

Parameters:

flag (Flag) – Flag (see AllocateFlag) to use when selecting nodes

Returns:

The number of nodes selected or None if menu cancelled

Return type:

integer

Example

To select nodes, flagging those selected with flag f:

total = Oasys.D3PLOT.Node.Select(f)
classmethod Node.Total(model)

Returns the total number of nodes in the model

Parameters:

model (Model) – Model to get total in

Returns:

The number of nodes

Return type:

integer

Example

To get the number of nodes in model m:

total = Oasys.D3PLOT.Node.Total(m)
classmethod Node.UnblankAll(window, model)

Unblanks all of the nodes in the model

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to unblank the nodes in

  • model (Model) – Model that all the nodes will be unblanked in

Returns:

No return value

Return type:

None

Example

To unblank all of the nodes in model m, in graphics window gw:

Oasys.D3PLOT.Node.UnblankAll(gw, m)
classmethod Node.UnblankFlagged(window, model, flag)

Unblanks all of the nodes in the model flagged with a defined flag

Parameters:
  • window (GraphicsWindow) – GraphicsWindow) to unblank the nodes in

  • model (Model) – Model that the flagged nodes will be unblanked in

  • flag (Flag) – Flag (see AllocateFlag) set on the nodes to unblank

Returns:

No return value

Return type:

None

Example

To unblank all of the nodes flagged with flag f in model m, in graphics window gw:

Oasys.D3PLOT.Node.UnblankFlagged(gw, m, f)
classmethod Node.UnflagAll(model, flag)

Unsets a defined flag on all of the nodes in the model

Parameters:
  • model (Model) – Model that the defined flag for all nodes will be unset in

  • flag (Flag) – Flag (see AllocateFlag) to unset on the nodes

Returns:

No return value

Return type:

None

Example

To unset flag f on all of the nodes in model m:

Oasys.D3PLOT.Node.UnflagAll(m, f)

Instance methods

Node.Acceleration()

Returns the acceleration for the node

Returns:

Array containing the nodal acceleration [Ax, Ay, Az] (or None if the value cannot be calculated)

Return type:

array

Example

To return the acceleration of node n:

acc = n.Acceleration()
if acc != None:
    do_something..
Node.Blank(window)

Blanks the node in a graphics window

Parameters:

window (GraphicsWindow) – GraphicsWindow) to blank the node in

Returns:

No return value

Return type:

None

Example

To blank node n in graphics window g:

n.Blank(g)
Node.Blanked(window)

Checks if the node is blanked in a graphics window or not

Parameters:

window (GraphicsWindow) – GraphicsWindow) in which to check if the node is blanked

Returns:

True if blanked, False if not

Return type:

boolean

Example

To check if node n is blanked in graphics window g:

if n.Blanked(g):
    do_something..
Node.ClearFlag(flag)

Clears a flag on a node

Parameters:

flag (Flag) – Flag (see AllocateFlag) to clear on the node

Returns:

No return value

Return type:

None

Example

To clear flag f on node n:

n.ClearFlag()
Node.Coordinates()

Returns the coordinates for the node

Returns:

Array containing the nodal coordinates [Cx, Cy, Cz] (or None if the value cannot be calculated)

Return type:

array

Example

To return the coordinates of node n:

coords = n.Coordinates()
if coords != None:
    do_something..
Node.Displacement()

Returns the displacement for the node

Returns:

Array containing the nodal displacement [Dx, Dy, Dz] (or None if the value cannot be calculated)

Return type:

array

Example

To return the displacement of node n:

disp = n.Displacement()
if disp != None:
    do_something..
Node.Elements(type)

Returns the elements using this node

Parameters:

type (constant) – The type of elements. Either Type.BEAM, Type.SHELL, Type.SOLID or Type.TSHELL

Returns:

Array containing the elements or None if there are no elements

Return type:

array

Example

To return the shell elements using node n:

shells = n.Elements(Oasys.D3PLOT.Type.SHELL)
Node.Flagged(flag)

Checks if the node is flagged or not

Parameters:

flag (Flag) – Flag (see AllocateFlag) to test on the node

Returns:

True if flagged, False if not

Return type:

boolean

Example

To check if node n has flag f set on it:

if n.Flagged(f):
    do_something..
Node.GetData(component, options=Oasys.gRPC.defaultArg)

Returns the value for a data component.
Also see GetMultipleData

Parameters:
  • component (constant) – Component constant to get data for

  • options (dict) –

    Optional. Dictionary containing options for getting data. Can be any of:

    extra:

    (integer) The extra data component number if component Component.SOX for solids, Component.BMX for beams or Component.SHX for shells and thick shells

    ip:

    (integer) Integration point number to get the data at (ip >= 1 or one of the constants Constant.TOP, Constant.MIDDLE or Constant.BOTTOM). If the integration point is not defined it will use the integration point defined on the current GUI “data” panel, which defaults to the middle surface for shells, thick shells, and solids, and Mag All for beams, but may vary if changed by an interactive user. If consistent output from a script is required, independent of any prior interactive activity, an explicit integration point or surface should be defined

    op:

    (integer) On plane integration point number for shells and thick shells (op >= 1 [default])

    referenceFrame:

    (constant) The frame of reference to return values in. Either Constant.GLOBAL (default), Constant.LOCAL, Constant.CYLINDRICAL, Constant.USER_DEFINED or Constant.MATERIAL. This is only necessary for directional components (eg X stress) and then only when something other than the default Constant.GLOBAL coordinate system is to be used

    user:

    (integer) The user-defined component number if component Component.UNOS, Component.UNOV, Component.USSS, Component.USST, Component.UBMS or Component.UBMV

Returns:

Number if a scalar component, array if a vector or tensor component (or None if the value cannot be calculated because it’s not available in the model).<br> If requesting an invalid component it will throw an error (e.g. Component.AREA of a node).

Return type:

float|array

Example

To calculate a component and check it has been calculated (note that in the example, the argument extra is optional):

value = n.GetData(component, {"extra": 1})
if value != None:
    do_something..
Node.Next()

Returns the next node in the model (or None if there is not one)

Returns:

Node object

Return type:

Node

Example

To get the next node after node n:

n = n.Next()
Node.Previous()

Returns the previous node in the model (or None if there is not one)

Returns:

Node object

Return type:

Node

Example

To get the previous node before node n:

n = n.Previous()
Node.SetFlag(flag)

Sets a flag on a node

Parameters:

flag (Flag) – Flag (see AllocateFlag) to set on the node

Returns:

No return value

Return type:

None

Example

To set flag f on node n:

n.SetFlag(f)
Node.Unblank(window)

Unblanks the node in a graphics window

Parameters:

window (GraphicsWindow) – GraphicsWindow) to unblank the node in

Returns:

No return value

Return type:

None

Example

To unblank node n in graphics window g:

n.Unblank(g)
Node.Velocity()

Returns the velocity for the node

Returns:

Array containing the nodal velocity [Vx, Vy, Vz] (or None if the value cannot be calculated)

Return type:

array

Example

To return the velocity of node n:

vel = n.Velocity()
if vel != None:
    do_something..