Node class

class femedu.domain.Node.Node(x0, y0=None, z0=None)

class: representing a single Node

addLoad(loads, dofs)

Nodes are applied as components energetically linked to any degree of freedom provided at this node.

For example, in a 2D-problem with the x-axis to the right and the y-axis pointing up, applying a vertical downward force, P, and a counter-clockwise moment, M, at a node, xn:

xn.addLoad([-P, M],['uy','rz'])
Parameters:
  • loads (list of floats) –

  • dofs (list of dof-codes) –

addTransformation(T)

Attach a transformation object to this node. The transformation defines a local coordinate system. If a transformation is given, all loads and prescribed displacements are assumed in that local coordinate system. Furthermore, all nodal displacements, velocity, or acceleration will be reported in that local coordinate system.

areFixed()

To be used by the assembly routines.

return a list of indices pointing to fixed dofs in this node. Indices are local to this node: 0..num_dofs

distanceTo(x)
Parameters:

xnd.array

Returns:

scalar distance from x

fixDOF(*dofs)

provide a list of dof codes that shall be restrained

Parameters:

dofs – fix the dof defined by key(s)

See also:
getDeformedPos(caller=None, factor=1.0, **kwargs)

Return deformed position \({\bf x} = {\bf X} + f \: {\bf u}\)

If a caller is specified, the node will adjust the output to the d.o.f.s specified by the element’s request() call. (called during initialization.)

Parameters:
  • caller – pointer to the calling element.

  • factor – deformation magnification factor, \(f\).

Returns:

deformed position vector, \({\bf x}\).

getDeltaU(previous_step=False)
Returns:

delta u = (current u) - (last converged u)

getDisp(dofs=None, caller=None, **kwargs)

return a vector (nd.array) of (generalized) displacements.

If a caller is given, the element-specific d.o.f.s will be returned as a sequence in the same order as given by the element’s request() call.

If a dof_list is given, d.o.f.s will be returned as the sequence given by that list. A zero value will be returned for all d.o.f.s that do not exist at this node.

Note

A single d.o.f., e.g., “ux”, can be requested using getDisp(dofs=('ux',)). Do not forget the , to indicate the definition of a single-element tuple.

Parameters:
  • caller – pointer to element

  • dofs – tuple or list of d.o.f. keys

Returns:

nodal displacement vector

getFixedDofs()
Returns:

a list of fixed dofs by dof-code strings.

getID()
Returns:

the node ID (str)

getIdx4DOFs(dofs=[])
Returns:

an index list to this node’s dofs in the global list of dofs

getIdx4Element(elem)
Returns:

an index list to nodal dofs associated with the attached elem within the global dof list

getLead()
Returns:

pointer to the lead node (Node)

getLeadID()
Returns:

the node ID of the lead node (str)

getLoad(dof_list=None, apply_load_factor=False)
Parameters:
  • dof_list – list (or tuple) if dof-keys for which nodal loads are requested. Fill missing dofs by 0.0.

  • apply_load_factor – defaults to False -> no factors applied.

Returns:

nodal load vector (ndarray)

getNormDeltaU2(previous_step=False)
Returns:

norm of delta u = (current u) - (last converged u)

Returns:

0.0 if node is a “follower”

getPos(caller=None, **kwargs)
Parameters:

caller – pointer to calling element

Returns:

initial position vector

hasLoad()
Returns:

True if this node has any loads (bool)

isClose(x, TOL=1e-05)
Parameters:

xnd.array

Returns:

True if x is within TOL from this node.

isFixed(dof)
Parameters:

dof – dof code as defined in request()

make_follower(lead)

this command tells the current node (self) to “follow” whatever the lead node is doing.

Parameters:

lead (Node) – pointer to the lead node

on_converged()

This method is called every time a solver signals a converged solution.

popU()

Restore a previously pushed displacement vector (using pushU()).

pushU()

Store the current displacement vector for later restore using popU().

recordThisStep(load_level)

record current state of the system

request(dof_list, caller)

send list or individual dof code. Common codes:

code

description

ux

displacement in x-direction

uy

displacement in y-direction

uz

displacement in z-direction

rx

rotation about x-axis

ry

rotation about y-axis

rz

rotation about z-axis

Parameters:
  • dof_list – list of dof-codes required by calling element

  • caller – pointer to calling element (usually sent as self)

resetAll()
resetDisp()
resetLoad()
setDOF(dofs=[], values=[])

alternative to the fixDOF() method that allows to set a prescribed value other than 0.0 for each degree of freedom.

Parameters:
  • dofs – list of dofs, defined by key(s), for which displacement values shall be prescribed.

  • values

    list of prescribed values for the given list of dofs. Values may be given as a float or as a list of two values.

    • If only a single value is given, the respective dof will be set to that value.

    • If a list is given, the dof will be set to value[0] + loadfactor*value[1]

See also:
setDisp(U, dof_list=None, modeshape=False)

use for prescribed displacements

Parameters:
  • U – list or tuple of prescribed values

  • dof_list – list or tuple of dof-codes associated with values in U

  • modeshape – set to True if U represents a mode shape (BOOL)

setLoad(loads, dofs)
Parameters:
  • loads – list of force components

  • dofs – associated list of DOFs to which respective loads are to be applied

setLoadFactor(lam)

Set the target load factor to lam

Warning

This method should not be called by the user. USE System.setLoadFactor(lam) instead!

The entered load pattern is considered a reference load, to be multiplied by a scalar load factor, \(\lambda\).

If no load factor is set explicitly, a factor of 1.0 is assumed, i.e., the entire entered load is applied in full.

setTrialState()

This will set a suitable trial position for the arc-length method to

\[{\bf u}^{(0)}_{n+1} = 2{\bf u}^{(\infty)}_{n} - {\bf u}^{(\infty)}_{n-1}\]

This should be used by a solution algorithm but not by regular user input.