```{raw} latex \clearpage ``` (sec-item-objectcontactcirclecable2d)= # ObjectContactCircleCable2D A very specialized penalty-based contact condition between a 2D circle (=marker0, any Position-marker) on a body and an ANCFCable2DShape (=marker1, Marker: BodyCable2DShape), in xy-plane. A node NodeGenericData is required with the number of cordinates according to the number of contact segments; the contact gap $g$ is integrated (piecewise linear) along the cable and circle; the contact force $f_c$ is zero for $gap>0$ and otherwise computed from $f_c = g*contactStiffness$, without damping; during Newton iterations, the contact force is actived only, if $dataCoordinate[0] <= 0$; dataCoordinate is set equal to gap in nonlinear iterations, but not modified in Newton iterations. ## Interface - Nodes it takes: [](#sec-item-nodegenericdata) ## Parameters The parameters of the item; in a dictionary, its type is 'ContactCircleCable2D': | name | type | size | default | description | |---|---|---|---|---| | **name** | String | | '' | connector's unique name | | **markerNumbers** | ArrayMarkerIndex | | [ invalid (-1), invalid (-1) ] | markers define contact gap | | **nodeNumber** | NodeIndex | | invalid (-1) | node number of a NodeGenericData for nSegments dataCoordinates (used for active set strategy ==> hold the gap of the last discontinuous iteration and the friction state) | | **numberOfContactSegments** | Index | | 3 | number of linear contact segments to determine contact; each segment is a line and is associated to a data (history) variable; must be same as in according marker | | **contactStiffness** | UReal | | 0. | contact (penalty) stiffness [SI:N/m/(contact segment)]; the stiffness is per contact segment; specific contact forces (per length) $f_N$ act in contact normal direction only upon penetration | | **circleRadius** | UReal | | 0. | radius [SI:m] of contact circle | | **offset** | Real | | 0. | offset [SI:m] of contact, e.g. to include thickness of cable element | | **activeConnector** | Bool | | True | flag, which determines, if the connector is active; used to deactivate (temporarily) a connector or constraint | | **visualization** | VObjectContactCircleCable2D | | | parameters for visualization of item | ## Visualization parameters The parameters of `VObjectContactCircleCable2D`, 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 | | **showContactCircle** | Bool | | True | if True and show=True, the underlying contact circle is shown; uses circleTiling*4 for tiling (from VisualizationSettings.general) | | **drawSize** | float | | -1. | drawing size = diameter of spring; size == -1.f means that default connector size is used | | **color** | Float4 | 4 | [-1.,-1.,-1.,-1.] | RGBA connector color; if R==-1, use default color | ## Drawing Drawn as [all connectors](#sec-drawing-objectsconnector); with `connectors.showContact`, the circle (`showContactCircle`, 4 times `general.circleTiling` segments), the contact points of the cable, and lines where it penetrates. Settings beyond those of all connectors: [`connectors.showContact`](#sec-vsettingsconnectors), [`contact.contactPointsDefaultSize`](#sec-vsettingscontact), [`general.circleTiling`](#sec-vsettingsgeneral). (description-objectcontactcirclecable2d)= ## Detailed description ### Markers Marker 0 is the center of the circle, any marker with a position; marker 1 is a `MarkerBodyCable2DShape` on an ANCF cable element, with the same `numberOfContactSegments` as the connector. ### Geometric relations The cable is divided into `numberOfContactSegments` straight segments between the points of the shape marker; for each segment the gap is the distance of the circle center from the segment minus `circleRadius` and `offset`, and the penetration is integrated, piecewise linear, along the segment. ### Connector forces Per segment in contact, a force per length $f_N = k_c\, g$ in the normal direction of the contact, with `contactStiffness` per segment and without damping; the forces act on the cable through the shape functions of the marker and on the circle center. There is **no friction and no torque** on the circle: otherwise geometry and equations are those of `ObjectContactFrictionCircleCable2D`, see [](#sec-item-objectcontactfrictioncirclecable2d). The data coordinates, one per segment, hold the gap of the last post Newton step and decide on contact (active set). (miniexample-objectcontactcirclecable2d)= ## 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), [`ANCFcontactCircleTest.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/TestModels/ANCFcontactCircleTest.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)