```{raw} latex \clearpage ``` (sec-item-markerbodycable2dshape)= # MarkerBodyCable2DShape A special Marker attached to a 2D ANCF beam finite element with cubic interpolation and 8 coordinates. ## Interface - Provides: `Coordinate` - Connectors, constraints and loads that can use it: [](#sec-item-objectconnectorcoordinatespringdamper), [](#sec-item-objectconnectorcoordinatespringdamperext), [](#sec-item-objectconnectorcoordinate), [](#sec-item-objectcontactcoordinate), [](#sec-item-loadcoordinate) ## Parameters The parameters of the item; in a dictionary, its type is 'BodyCable2DShape': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | marker's unique name | | **bodyNumber** | ObjectIndex | | invalid (-1) | body number to which marker is attached to | | **numberOfSegments** | PInt | | 3 | number of number of segments; each segment is a line and is associated to a data (history) variable; must be same as in according contact element | | **verticalOffset** | Real | | 0. | vertical offset from beam axis in positive (local) Y-direction; this offset accounts for consistent computation of positions and velocities at the surface of the beam | | **visualization** | VMarkerBodyCable2DShape | | | parameters for visualization of item | ## Visualization parameters The parameters of `VMarkerBodyCable2DShape`, given as `visualization`: | name | type | size | default | description | |---|---|---|---|---| | **show** | Bool | | True | set true, if item is shown in visualization and false if it is not shown | ## Drawing Drawn as [all markers](#sec-drawing-markers); circles at the points of the cable it acts on. (description-markerbodycable2dshape)= ## Detailed description ### Attached to A planar ANCF cable element, `ObjectANCFCable2D` or `ObjectALEANCFCable2D`; the marker is made for the contact of a circle with the cable (`ObjectContactCircleCable2D`, `ObjectContactFrictionCircleCable2D`), which divides the element into `numberOfSegments` segments. `Assemble()` refuses it on any other body. ### Marker quantities The positions and velocities of the `numberOfSegments`+1 equidistant points of the element, at the distance `verticalOffset` from the axis in the local $y$-direction, as pairs $(x,\,y)$; and the length of the element and, for the ALE element, its axial coordinate, which the contact needs. ### Jacobians For each point, the two rows of the shape functions of the element, $\partial \LU{0}{\pv}_j / \partial \qv$: a force at a segment point acts on the element's coordinates through them. (miniexample-markerbodycable2dshape)= ## Mini example ```python from exudyn.beams import GenerateBeamElementsAlongLine #the shape of an ANCF cable element as line segments, for contact: a cantilever falls onto a circle cable = ObjectANCFCable2D(massPerLength=1, bendingStiffness=10, axialStiffness=1e4, bendingDamping=0.1) beamInfo = GenerateBeamElementsAlongLine(mbs, positionStart=[0,0,0], positionEnd=[1,0,0], numberOfElements=4, beamTemplate=cable, gravity=[0,-9.81,0], groundConstraintsStart=[1,1,0,1]) nodes, elements = beamInfo['nodes'], beamInfo['elements'] mCircle = mbs.AddMarker(MarkerBodyPosition(bodyNumber=oGround, localPosition=[0.8,-0.2,0])) nSegments = 4 for e in elements: mShape = mbs.AddMarker(MarkerBodyCable2DShape(bodyNumber=e, numberOfSegments=nSegments)) nData = mbs.AddNode(NodeGenericData(numberOfDataCoordinates=nSegments, initialCoordinates=[0.1]*nSegments)) mbs.AddObject(ObjectContactCircleCable2D(markerNumbers=[mCircle, mShape], nodeNumber=nData, numberOfContactSegments=nSegments, circleRadius=0.1, contactStiffness=1e4)) mbs.Assemble() mbs.SolveDynamic() #the tip rests beyond the circle, whose top is at y=-0.1 exu.sys['testResult'] = mbs.GetNodeOutput(nodes[-1], exu.OutputVariableType.Position)[1] ``` Relevant Examples (Ex) and TestModels (TM) with weblink to github: [`ANCFcontactCircle.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFcontactCircle.py) (Ex), [`ANCFcontactCircle2.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFcontactCircle2.py) (Ex), [`ANCFmovingRigidbody.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFmovingRigidbody.py) (Ex), [`ANCFslidingJoint2D.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/ANCFslidingJoint2D.py) (Ex), [`beltDriveALE.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/beltDriveALE.py) (Ex), [`beltDriveReevingSystem.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/beltDriveReevingSystem.py) (Ex), [`beltDrivesComparison.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/beltDrivesComparison.py) (Ex), [`sliderCrank3DwithANCFbeltDrive.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/sliderCrank3DwithANCFbeltDrive.py) (Ex), [`sliderCrank3DwithANCFbeltDrive2.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/sliderCrank3DwithANCFbeltDrive2.py) (Ex), [`ANCFcontactCircleTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFcontactCircleTest.py) (TM), [`ANCFcontactFrictionTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFcontactFrictionTest.py) (TM), [`ANCFmovingRigidBodyTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFmovingRigidBodyTest.py) (TM), [`ANCFslidingAndALEjointTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFslidingAndALEjointTest.py) (TM), [`connectorOutputVariablesTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/connectorOutputVariablesTest.py) (TM), [`contactFrictionCircleCable2DnoFrictionTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/contactFrictionCircleCable2DnoFrictionTest.py) (TM)