--- title: anabel.assemble summary: Core model building classes. template: pdoc.html ...

# Assemblers

Core model building classes.

## Classes

`class Assembler (ndm: int, ndf: int)`

  Basic assembler class

  An assembler is typically characterized by collections of nodes, elements and parameters.

  ## Parameters

  `ndm` :`int`
    number of model dimensions
  `ndf` :`int`
    number of degrees of freedom (dofs) at each node

  ### Subclasses

  - Model
`class Model (ndm: int, ndf: int)`

  Basic structural model class

  ## Parameters

  `ndm` :`int`
    number of model dimensions
  `ndf` :`int`
    number of degrees of freedom (dofs) at each node

  ### Ancestors

  - Assembler

  ### Subclasses

  - anabel.assemble.Domain
  - SkeletalModel
  - rModel

  ### Instance variables

  `var NOS : int`

    Degree of static indeterminacy

  `var basic_forces : numpy.ndarray`
  `var cforces : numpy.ndarray`
  `var eforces`

    Array of elastic element forces

  `var idx_c`
  `var idx_e`

    Indices of elastic basic (not plastic) forces

  `var idx_f`
  `var idx_i`
  `var idx_x`
  `var nQ`
  `var ne : int`

    number of elements in model

  `var nf : int`

    Number of free model degrees of freedom

  `var nn : int`

    Number of nodes in model

  `var nq`

    Number of basic element forces

  `var nr : int`

    number of constrained dofs in model

  `var nt : int`

    Total number of model degrees of freedom.

  `var nv`

    Number of basic deformation variables

  `var rdnt_forces : numpy.ndarray`
  `var rdofs`

    Sequence of restrained dofs in model

  `var rel`

  ### Methods

  `def add_element(self, element)`

    Add a general element to model

    ## Parameters

    `element` :`emme.elements.Element`
  `def add_elements(self, elements)`

    Add a general element to model

    ## Parameters

    `element` :`emme.elements.Element`
  `def assemble_force(self, elem=None, **kwds) ‑> Callable`

    A simple force composer for skeletal truss structures.

  `def beam(self, tag: str, iNode, jNode, mat=None, sec=None, Qpl=None, **kwds)`

    Create and add a beam object to model

    ## Parameters

    `tag` :`str`
      string used for identifying object
    `iNode` :`emme.Node` or `str`
      node object at element i-end
    `jNode` :`emme.Node` or `str`
      node object at element j-end
    `mat` :`emme.Material`
    `sec` :`emme.Section`
  `def boun(self, node, ones)`
  `def clean(self, keep=None)`
  `def compose(self, resp='d', jit=True, **kwds)`
  `def compose_displ(self, solver=None, solver_opts={}, elem=None, jit_force=True, **kwds)`

    dynamically creates functions `collect_loads` and `collect_coord`.

  `def compose_force(self, jit=True, **kwds)`
  `def compose_param(self, jit_force=True, **kwds)`
  `def displ(self, val)`
  `def elem(self, elem, nodes, tag)`
  `def fix(self, node, dirn=['x', 'y', 'rz'])`

    Define a fixed boundary condition at specified degrees of freedom of the supplied node

    ## Parameters

    `node` :`emme.Node`
    `dirn` :`Sequence[String]`
  `def frame(self, bays, stories, column_mat=None, column_sec=None, girder_mat=None, girder_sec=None)`

    Macro for generating rectangular building frames

    ## Parameters

    `bays` :`tuple`
      tuple containing bay width, and number of bays
    `stories` :`tuple`
      tuple

    column_mat:

  `def girder(self, nodes, mats=None, xsecs=None, story=None)`
  `def hinge(self, elem, node)`
  `def load(self, obj, *args, pattern=None, **kwds)`

    Apply a load to a model object

    Claudio Perez 2021-04-01

  `def load_node(self, node, load, **kwds)`

    Claudio Perez 2021-04-01

  `def load_state(self, state)`
  `def material(self, tag: str, E: float)`
  `def node(self, tag: str, x: float, y=None, z=None, mass: float = None)`

    Add a new emme.Node object to the model

    ## Parameters

    `x`, `y`, `z` :`float`
      Node coordinates.
  `def numDOF(self)`
  `def param(self, *param_names, shape=0, dtype=builtins.float, default=None)`

    Add a parameter to a model. created 2021-03-31

  `def pin(self, *nodes)`

    Create a pinned reaction by fixing all translational degrees of freedom at the specified nodes.

    ## Parameters

    `node` :`emme.Node`
  `def redundant(self, elem: object, nature)`

    nature:

  `def roller(self, node)`

    Create a roller reaction at specified node

  `def state(self, method='Linear')`
  `def taprod(self, tag: str, iNode, jNode, mat=None, xsec=None, Qpl=None, A=None, E=None)`

    Construct a tapered rod element with variable E and A values.

  `def truss(self, tag: str, iNode, jNode, elem=None, mat=None, xsec=None, Qpl=None, A=None, E=None)`
  `def truss3d(self, tag: str, iNode, jNode, mat=None, xsec=None)`

    Add an emme.Truss3d object to model

    ## Parameters

  `def update(self, U)`
  `def xsection(self, tag: str, A: float, I: float)`
`class SkeletalModel (ndm: int, ndf: int)`

  Basic structural model class

  ## Parameters

  `ndm` :`int`
    number of model dimensions
  `ndf` :`int`
    number of degrees of freedom (dofs) at each node

  ### Ancestors

  - Model
  - Assembler

  ### Inherited members

  - `Model`:
    - `NOS`
    - `add_element`
    - `add_elements`
    - `assemble_force`
    - `beam`
    - `compose_displ`
    - `eforces`
    - `fix`
    - `frame`
    - `idx_e`
    - `load`
    - `load_node`
    - `ne`
    - `nf`
    - `nn`
    - `node`
    - `nq`
    - `nr`
    - `nt`
    - `nv`
    - `param`
    - `pin`
    - `rdofs`
    - `redundant`
    - `roller`
    - `taprod`
    - `truss3d`
`class rModel (ndm, ndf)`

  Basic structural model class

  ## Parameters

  `ndm` :`int`
    number of model dimensions
  `ndf` :`int`
    number of degrees of freedom (dofs) at each node

  ### Ancestors

  - Model
  - Assembler

  ### Instance variables

  `var cforces`
  `var nv`

    Returns number of element deformations in model

  `var triv_forces`

    list of trivial axial forces

  ### Methods

  `def isortho(self, elem)`
  `def numDOF(self)`
  `def numdofs(self)`

  ### Inherited members

  - `Model`:
    - `NOS`
    - `add_element`
    - `add_elements`
    - `assemble_force`
    - `beam`
    - `compose_displ`
    - `eforces`
    - `fix`
    - `frame`
    - `idx_e`
    - `load`
    - `load_node`
    - `ne`
    - `nf`
    - `nn`
    - `node`
    - `nq`
    - `nr`
    - `nt`
    - `param`
    - `pin`
    - `rdofs`
    - `redundant`
    - `roller`
    - `taprod`
    - `truss3d`