diff --git a/docs/howto.rst b/docs/howto.rst index 377fbfec..a3d5609c 100644 --- a/docs/howto.rst +++ b/docs/howto.rst @@ -8,7 +8,6 @@ How-To Guides :caption: How-To: howto/meshgen - howto/rbe2 howto/mixed howto/axi howto/solvers diff --git a/docs/howto/rbe2.rst b/docs/howto/rbe2.rst deleted file mode 100644 index 43c495af..00000000 --- a/docs/howto/rbe2.rst +++ /dev/null @@ -1,47 +0,0 @@ -Multi-Point Constraints ------------------------ - -This How-To demonstrates the usage of multi-point constraints (also called MPC or RBE2 rigid-body-elements) with an independent centerpoint and one or more dependent points. First, a centerpoint has to be added to the mesh. MPC objects are supported as ``items`` of a :class:`~felupe.Step` and within the :func:`~felupe.newtonrhapson` procedure. - -.. pyvista-plot:: - :context: - - import numpy as np - import felupe as fem - - # mesh with one additional rbe2-control point - mesh = fem.Cube(n=11) - mesh.update(points=np.vstack((mesh.points, [2.0, 0.0, 0.0]))) - - # prevent the field-values at the center-point to be treated as dof0 - mesh.points_without_cells = mesh.points_without_cells[:0] - - region = fem.RegionHexahedron(mesh) - displacement = fem.Field(region, dim=3) - field = fem.FieldContainer([displacement]) - -An instance of :class:`~felupe.MultiPointConstraint` defines the multi-point constraint. This instance provides two methods, :meth:`MultiPointConstraint.assemble.vector() ` and :meth:`MultiPointConstraint.assemble.matrix() `. - -.. pyvista-plot:: - :context: - - mpc = fem.MultiPointConstraint( - field=field, - points=np.arange(mesh.npoints)[mesh.points[:, 0] == 1], - centerpoint=mesh.npoints - 1, - skip=(0,1,1), - ) - -Finally, add the results of these methods to the internal force vector or the stiffness matrix. - -.. pyvista-plot:: - :context: - :force_static: - - umat = fem.NeoHooke(mu=1.0, bulk=2.0) - body = fem.SolidBody(umat=umat, field=field) - - K = body.assemble.matrix() + mpc.assemble.matrix() - r = body.assemble.vector(field) + mpc.assemble.vector(field) - - mesh.plot(plotter=mpc.plot()).show() diff --git a/src/felupe/mechanics/_multipoint.py b/src/felupe/mechanics/_multipoint.py index c45559be..258abaca 100644 --- a/src/felupe/mechanics/_multipoint.py +++ b/src/felupe/mechanics/_multipoint.py @@ -43,18 +43,26 @@ class MultiPointConstraint: Notes ----- A :class:`~felupe.MultiPointConstraint` is supported as an item in a - :class:`~felupe.Step`. Rotational degrees-of-freedom of the center-point are - not connected to the points. + :class:`~felupe.Step`. It provides the assemble-methods + :meth:`MultiPointConstraint.assemble.vector() ` + and :meth:`MultiPointConstraint.assemble.matrix() `. + + .. note:: + + Rotational degrees-of-freedom of the center-point are not connected to the + points. Examples -------- This example shows how to use a :class:`~felupe.MultiPointConstraint`. An additional center-point is added to a mesh. By default, all *hanging* points are - collected in the mesh-attribute :attr:`~felupe.Mesh.points_without_cells`. The - degrees of freedom of these points are considered as fixed, i.e. they are ignored. - The center-point is not connected to any cell and is added to the points-without- - cells list. Hence, we have to remove the center-point. + collected in the mesh-attribute + :attr:`Mesh.points_without_cells `. The degrees of + freedom of these points are considered as fixed, i.e. they are ignored. The center- + point is not connected to any cell and is added to the points-without-cells array + on :meth:`Mesh.update `. Hence, center-point has to be removed + manually. .. pyvista-plot:: :context: @@ -106,7 +114,7 @@ class MultiPointConstraint: The mesh is fixed on the left end face and a ramped :class:`~felupe.PointLoad` is applied on the center-point of the :class:`~felupe.MultiPointConstraint`. All items - are added to a step and a job is evaluated. + are added to a :class:`~felupe.Step` and a :class:`~felupe.Job` is evaluated. .. pyvista-plot:: :context: