Assemblers(2
)
Core model building classes.
Classes
class MeshGroup (*args, ndm=2, ndf=1, mesh=None, **kwds)
-
Homogeneous 2D mesh group.
Parameters
ndm
:int
- number of model dimensions
ndf
:int
- number of degrees of freedom (dofs) at each node
Ancestors
- anabel.assemble.UniformAssembler
- anabel.assemble.Assembler
Static methods
def read(filename: str, *args, **kwds)
-
Create a class instance by reading in a mesh file.
This function should work with any mesh format that is supported in the external
meshio
Python library.Parameters
filetype
:str
- In addition to those supported in
meshio
, the following formats are supported:m228
: Simple text file; see docstrings in source code of_read_m228
.
Instance variables
var dofs
-
Plain DOF numbering scheme.
Returns
dofs
:Sequence (
nn,
ndf)
- A sequence with shape
nn
byndf
where: [ndf
] [nn
] 2021-05-07
var nr
-
Return number of fixed degrees of freedom
Methods
def assemble_integral(self, elem=None, verbose=False, **kwds) ‑> Callable
-
Parameters
elem
:f(u,xyz) -> R^[ndf*nen]
Returns
f
:f(U, (xi, dV)) -> R^[nf]
- quad(elem(U[el], X[el])*dV
def assemble_linear(self, elem=None, verbose=False, **kwds) ‑> Callable
-
elem(None,xyz) -> R^[ndf*nen]
Returns
f
:f(U, (xi, dV)) -> R^[nf]
- quad(elem(None, X[el])*dV
def compose(self, elem=None, verbose=False, solver=None)
-
Parameters
elem
:Callable
- local function to be integrated over.
solver
:str
- Either of the following. “sparse”: use
scipy.sparse.linalg.spsolve
“cg”: Conjugate gradient usingjax.scipy.sparse.linalg.cg
None
: default toanabel.backend.linalg.solve
2021-05-07
def compose_quad(self, f=None, jit=True, verbose=False, **kwds)
-
def norm(self, u, h, quad)
-
def plot(self, values=None, func=None, scale=1.0, interact=False, savefig: str = None, **kwds)
-
Parameters
u
:Union[ Callable, Sequence ]
- Values to plot over domain.
savefig
:str
- File path to save image to.
Plot mesh using
pyvista
interface to VTK.Pure numpy is used for generality.
Claudio Perez
def write(self, filename: str, **kwds)
-
Export mesh using
meshio
.
class Model (ndm: int, ndf: int)
-
Base class for assembler objects.
An assembler is typically characterized by collections of nodes, elements and parameters. The purpose of the assembler is to provide a convenient interface for interacting with and managing these entities.
Basic structural model class
Parameters
ndm
:int
- number of model dimensions
ndf
:int
- number of degrees of freedom (dofs) at each node
Ancestors
- anabel.assemble.Assembler
Subclasses
- anabel.assemble.Domain
- rModel
Instance variables
var NOS : int
-
Degree of static indeterminacy
var basic_forces : numpy.ndarray
-
var cforces : numpy.ndarray
-
var dofs
-
Plain DOF numbering scheme.
2021-05-07
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 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 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
orstr
- node object at element i-end
jNode
:emme.Node
orstr
- 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, verbose=False, **kwds)
-
def compose_displ(self, solver=None, solver_opts={}, elem=None, jit_force=True, **kwds)
-
dynamically creates functions
collect_loads
andcollect_coord
. def compose_force(self, jit=True, **kwds)
-
def compose_param(self, f=None, jit_force=True, verbose=False, **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
:anabel.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 pin(self, *nodes)
-
Create a pinned reaction by fixing all translational degrees of freedom at the specified nodes.
Parameters
node
:anabel.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)
-
Base class for assembler objects.
An assembler is typically characterized by collections of nodes, elements and parameters. The purpose of the assembler is to provide a convenient interface for interacting with and managing these entities.
Basic structural model class
Parameters
ndm
:int
- number of model dimensions
ndf
:int
- number of degrees of freedom (dofs) at each node
Ancestors
- anabel.assemble.Assembler
Subclasses
- anabel.assemble.Domain
- rModel
Instance variables
var NOS : int
-
Degree of static indeterminacy
var basic_forces : numpy.ndarray
-
var cforces : numpy.ndarray
-
var dofs
-
Plain DOF numbering scheme.
2021-05-07
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 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 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
orstr
- node object at element i-end
jNode
:emme.Node
orstr
- 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, verbose=False, **kwds)
-
def compose_displ(self, solver=None, solver_opts={}, elem=None, jit_force=True, **kwds)
-
dynamically creates functions
collect_loads
andcollect_coord
. def compose_force(self, jit=True, **kwds)
-
def compose_param(self, f=None, jit_force=True, verbose=False, **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
:anabel.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 pin(self, *nodes)
-
Create a pinned reaction by fixing all translational degrees of freedom at the specified nodes.
Parameters
node
:anabel.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 rModel (ndm, ndf)
-
Base class for assembler objects.
An assembler is typically characterized by collections of nodes, elements and parameters. The purpose of the assembler is to provide a convenient interface for interacting with and managing these entities.
Basic structural model class
Parameters
ndm
:int
- number of model dimensions
ndf
:int
- number of degrees of freedom (dofs) at each node
Ancestors
- Model
- anabel.assemble.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