Dissipative Systems

Hamilton’s least action principle always gives us conservative forces.

This works for conservative systems, but what happens when we want to simulate a block sliding to a halt due to friction? The standard action functional doesn’t work, because the friction force is non-conservative.

Traditionally, D’Alembert’s Principle is a generalization of the least action that allows any force, including non-conservative forces like friction. The idea is to add “virtual work” done from any additional force. So,

Definition (Rayleigh Dissipation Function)

Can’t dissipative forces be written as a derivative of some function? In 1873 Rayleigh observed the following: Suppose we have some “linear viscous”1 force.

This linear damping is actually the variation of some (quadratic) function:

where

is called the Rayleigh Dissipation Function. here is a constant number (or matrix). The thicker the fluid, the “larger” . Indeed, the force depends on the velocity . Here we defined via the power rule.

Rayleigh’s Euler-Lagrange Equation

We can derive the equations of motion for a system with Rayleigh dissipation by modifying the least action principle. Given kinetic energy , potential energy , and a dissipation function , we have

with respect to velocity. This construction accurately reflects reality if the mapping satsifies the following properties:

  1. The mapping must be convex (second derivative is nonnegative). As velocity increases, the dissipative force must reliably increase or remain constant.
  2. It must be zero at . The dissipative force only acts when there is some velocity.
  3. It must be nonnegative otherwise. This ensures adherence to the second law of thermodynamics. The dissipative force should always be doing negative work, so the system should be losing energy.
  • Helmholtz’s minimal dissipation principle
  • Originally, Rayleigh only considered quadratic .
  • After 1970’s (Moreau) discovered that other non-quadratic can recover nonlinear forces like Coulomb friction and plasticity.
  • There is a natural time discretization (Kane, Marsden, Ortiz, West 1999).

Remarks

We can apply Noether’s theorem for time independence

If and are quadratic (highest order of the variable in exactly ) in , then

such that

To design dissipation, just model the rate of energy dissipation.

Interlude (Equations of Motion for Discrete Time Dissipation)

Let’s try dropping the continuous time derivative and model the discrete time energy loss. For simplicity, assume . The equation of motion is

Suppose the space of positions is given by where each point has coordinate . Suppose the inertia is independent of position and

and the potential energy is . Then the equation of motion is

Symplectic & Backward Euler with Dissipation

We can discretize time . Denote the state at the th step as . We can approximate the second time derivative as

Given , solve for . We use the Euler method.

Symplectic (explicit):

Backward (implicit):

Example 1: Damped Harmonic Oscillator

We can try to simulate a damped spring. Recall the equations of motion for a spring and its solved form:

From interlude, . The symplectic form is

We can express this as a matrix multiplication:

The determinant of the square matrix is , so the symplectic form is volume-preserving (area). Both eigenvalue norms are when (conditional stability).

The backward form is

and likewise,

The determinant of the square matrix is and so the area shrinks. All eigenvalue norms are for all (unconditional stability).

Minimal Incremental Potential Principle

We can exploit the unconditional stability of the backward Euler method to design a variational principle for discrete time dissipation. Recall the backward Euler method:

Let’s rearrange with .

This is actually an optimality condition for the following optimization problem:

Sneakily, stands for “predicted position”.

"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{amsfonts}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[>=stealth, scale=1]\n\n% Define custom colors to match the image\n\\definecolor{darkblue}{RGB}{45, 90, 160}\n\\definecolor{lightblue}{RGB}{150, 190, 240}\n\\definecolor{turquoise}{RGB}{50, 160, 150}\n\n% Coordinates of the points\n\\coordinate (N1) at (0, 0);\n\\coordinate (N2) at (1.3, 0.9);\n\\coordinate (N3) at (2.6, 1.8);\n\\coordinate (N4) at (2.8, 1.2);\n\n% --- Draw Connecting Lines and Arrow ---\n% Dark blue straight line\n\\draw[darkblue, ultra thick] (N1) -- (N2);\n% Dark blue arrow pointing up and right\n\\draw[darkblue, ultra thick, ->] (N2) -- (N3);\n% Thin dashed black line\n\\draw[black, dashed, thin] (N3) -- (N4);\n\n% --- Draw Nodes (circles) ---\n% Dark blue nodes\n\\fill[darkblue] (N1) circle (3pt);\n\\fill[darkblue] (N2) circle (3pt);\n% Light blue node\n\\fill[lightblue] (N3) circle (3pt);\n% Turquoise node\n\\fill[turquoise] (N4) circle (3pt);\n\n% --- Place Labels with Correct Colors and LaTeX Math ---\n% q^{(n-1)} in dark blue, to the upper-left of N1\n\\node[anchor=south east, color=darkblue, xshift=-1pt, yshift=1pt] at (N1) {\\Large $\\mathbf{q}^{(n-1)}$};\n% q^{(n)} in dark blue, to the upper-left of N2\n\\node[anchor=south east, color=darkblue, xshift=-1pt, yshift=1pt] at (N2) {\\Large $\\mathbf{q}^{(n)}$};\n% q_{pred} in light blue, to the upper-left of N3\n\\node[anchor=south east, color=lightblue, xshift=-1pt, yshift=1pt] at (N3) {\\Large $\\mathbf{q}_{\\text{pred}}$};\n% q^{(n+1)} in turquoise, to the lower-right of N4\n\\node[anchor=north west, color=turquoise, xshift=1pt, yshift=-1pt] at (N4) {\\Large $\\mathbf{q}^{(n+1)}$};\n\n\\end{tikzpicture}\n\\end{document}"q(n¡1)q(n)qpredq(n+1)
source code

In terms of velocity, we can write

with the following visualization:

"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{amsfonts}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[>=stealth, scale=1]\n\n% Define custom colors to match the image\n\\definecolor{darkblue}{RGB}{45, 90, 160}\n\\definecolor{lightblue}{RGB}{150, 190, 240}\n\\definecolor{turquoise}{RGB}{50, 160, 150}\n\n% Coordinates of the points\n\\coordinate (N1) at (0, 0);\n\\coordinate (N2) at (1.5, 0.8);\n\\coordinate (N3) at (3.0, 1.8);\n\\coordinate (N4) at (3.2, 1.0);\n\n% --- Draw Connecting Lines and Arrows ---\n% Dark blue straight line\n\\draw[darkblue, ultra thick] (N1) -- (N2);\n\n% Dark blue arrow pointing up and right (with label inline)\n\\draw[darkblue, ultra thick, ->] (N2) -- (N3) node[midway, above left, xshift=4pt] {\\Large $\\mathbf{v}_{\\text{old}}$};\n\n% Turquoise arrow pointing right (with label inline)\n\\draw[turquoise, ultra thick, ->] (N2) -- (N4) node[midway, below right, xshift=-4pt, yshift=0pt] {\\Large $\\mathbf{v}_{\\text{new}}$};\n\n% Dotted black connecting line\n\\draw[black, dashed, thin] (N3) -- (N4);\n\n% --- Draw Nodes (circles) ---\n% Dark blue nodes\n\\fill[darkblue] (N1) circle (3pt);\n\\fill[darkblue] (N2) circle (3pt);\n% Light blue node\n\\fill[lightblue] (N3) circle (3pt);\n% Turquoise node\n\\fill[turquoise] (N4) circle (3pt);\n\n% --- Place Labels ---\n% q^{(n-1)} in dark blue, to the upper-left of N1\n\\node[anchor=south east, color=darkblue, xshift=-1pt, yshift=1pt] at (N1) {\\Large $\\mathbf{q}^{(n-1)}$};\n% q^{(n)} in dark blue, to the upper-left of N2\n\\node[anchor=south east, color=darkblue, xshift=-2pt, yshift=1pt] at (N2) {\\Large $\\mathbf{q}^{(n)}$};\n% q_{pred} in light blue, to the upper-left of N3\n\\node[anchor=south east, color=lightblue, xshift=-1pt, yshift=1pt] at (N3) {\\Large $\\mathbf{q}_{\\text{pred}}$};\n% q^{(n+1)} in turquoise, to the lower-right of N4\n\\node[anchor=north west, color=turquoise, xshift=1pt, yshift=-1pt] at (N4) {\\Large $\\mathbf{q}^{(n+1)}$};\n\n\\end{tikzpicture}\n\\end{document}"voldvnewq(n¡1)q(n)qpredq(n+1)
source code

So, the physical system will decide its new velocity by

This equation is called the minimal incremental potential principle. In particular, the terms compete with one another:

  1. The intertia term. It encourages the new velocity to be close to the old velocity. So any deviation from is penalized, scaled by the mass matrix .
  2. The potential term. The object is drawn toward lower energy states like falling under gravity or a spring returning to its rest position.

The true physical path is simply the exact velocity vector that minimizes the sum of these two penalties. Indeed, this means calculating the velocity for every time step requires a good numerical optimizer.

For collision and contact, we can add “smooth barrier” functions in potential and perform optimization properly.

"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[x=4.5cm, y=1.6cm, >=stealth]\n\n% --- Safe Color Definitions ---\n\\definecolor{cdisc}{HTML}{1F78B4} \n\\definecolor{cd1}{HTML}{D95F02} \n\\definecolor{cd08}{HTML}{E6AB02} \n\\definecolor{cd05}{HTML}{7570B3} \n\n% --- Grid and Axes ---\n\\draw[gray!70] (0,0) -- (1.6,0);\n\\draw[gray!70] (0,0) -- (0,3.6);\n\n% X-ticks\n\\foreach \\x in {0, 0.5, 1, 1.5} {\n \\draw[gray!70] (\\x, 0) -- (\\x, -0.05);\n \\node[below] at (\\x, -0.05) {\\x};\n}\n\n% Y-ticks\n\\foreach \\y in {0, 1, 2, 3} {\n \\draw[gray!70] (0, \\y) -- (-0.02, \\y);\n \\node[left] at (-0.02, \\y) {\\y};\n}\n\n% Axis Labels\n\\node[below, yshift=-5pt] at (0.75, -0.2) {Distance};\n\\node[rotate=90, above, yshift=5pt] at (-0.1, 1.75) {Barrier energy};\n\n% --- Function Plots ---\n\\begin{scope}\n % Clip the plotting area so asymptotic curves don't bleed out the top\n \\clip (0, 0) rectangle (1.6, 3.6);\n\n % 1. Discontinuous (Blue L-shape)\n \\draw[line width=1.2pt, cdisc] (0, 3.6) -- (0, 0.03) -- (1.6, 0.03); \n\n % 2. C2, d = 1 (Orange)\n \\draw[line width=1.2pt, cd1, domain=0.03:1, samples=100] plot (\\x, {-(\\x-1)*(\\x-1)*ln(\\x)});\n \\draw[line width=1.2pt, cd1] (1, 0.02) -- (1.6, 0.02);\n\n % 3. C2, d = 0.8 (Yellow)\n \\draw[line width=1.2pt, cd08, domain=0.03:0.8, samples=100] plot (\\x, {-(\\x-0.8)*(\\x-0.8)*ln(\\x/0.8)});\n \\draw[line width=1.2pt, cd08] (0.8, 0.01) -- (1.6, 0.01);\n\n % 4. C2, d = 0.5 (Purple)\n \\draw[line width=1.2pt, cd05, domain=0.03:0.5, samples=100] plot (\\x, {-(\\x-0.5)*(\\x-0.5)*ln(\\x/0.5)});\n \\draw[line width=1.2pt, cd05] (0.5, 0) -- (1.6, 0);\n\\end{scope}\n\n% --- Vertical Dashed Markers ---\n\\draw[dashed, cd1, thick] (1, 0) -- (1, 1);\n\\draw[dashed, cd08, thick] (0.8, 0) -- (0.8, 1);\n\\draw[dashed, cd05, thick] (0.5, 0) -- (0.5, 1);\n\n% --- Legend ---\n\\begin{scope}[shift={(0.8, 3.3)}]\n \\draw[line width=1.2pt, cdisc] (0, 0) -- (0.15, 0) node[right, text=black] {discontinuous};\n \\draw[line width=1.2pt, cd1] (0, -0.35) -- (0.15, -0.35) node[right, text=black] {C2, $\\hat{d}=1$};\n \\draw[line width=1.2pt, cd08] (0, -0.7) -- (0.15, -0.7) node[right, text=black] {C2, $\\hat{d}=0.8$};\n \\draw[line width=1.2pt, cd05] (0, -1.05) -- (0.15, -1.05) node[right, text=black] {C2, $\\hat{d}=0.5$};\n\\end{scope}\n\n\\end{tikzpicture}\n\\end{document}"00.511.50123DistanceBarrierenergydiscontinuousC2,^d=1C2,^d=0:8C2,^d=0:5
source code

Adding Viscous Dissipation

Recall the backward Euler update on conservative systems:

where . We can add dissipation by adding a Rayleigh dissipation funtion:

Equivalently,

The third term also competes with the first two terms. It is the dissipation penalty. The object wants to minimize the energy it bleeds out into the environment (i.e. heat from friction). Because is zero when velocity is zero, this term effectively pulls the optimal velocity closer to zero.

Writing the system in ,

Places to use a quadratic dissipation function

  1. Car’s shock absorber. It is a piston pushing through oil (or a viscous fluid). It restructs motion proportional to velocity.
  2. Lubricated sliding. Two metal plates separated by a thin layer of oil. It creates a smooth, linear drag force.

Quasi-Static System

To study a dissipative system, we often consdier a quasi-static regime, where inertia is negligible. In this case, the system is in balance with potential force and external force at all times. So,

For quadratic , this determines a “terminal velocity” that the system will eventually reach.

Intuition

We can think of dragging a heavy block through thick mud (or an extremely viscous fluid). The block never really accelerates nor does it carry momentum. It’s speed is dictated by how hard it is pulled against the mud’s resistance. When the block is no longer being pulled, it stops.

This is as if the mass approaches zero (because we basically have zero momentum). This is why it is “quasi-static”, because it’s kind of still (static) but not quite (quasi).

Importantly, the crossed out penalty term vanishes.

Traditionally, for solving a general force, we solve some kind of relation between . Here, is an ireversible force that is not a function of .

Dry Friction

"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[>=stealth, scale=1.3]\n\n% --- Define Colors ---\n\\definecolor{topblue}{RGB}{135, 206, 250}\n\\definecolor{bottomgray}{RGB}{128, 128, 128}\n\\definecolor{highlightorange}{RGB}{255, 165, 0}\n\\definecolor{forcepurple}{RGB}{60, 0, 90} \n\n% =========================================================\n% === Left Part: Macro View ===\n% =========================================================\n\n% Draw main blocks \n\\filldraw[fill=topblue, draw=black, thick] (-4.5, 0.5) rectangle (-1.5, 1.5);\n\\filldraw[fill=bottomgray, draw=black, thick] (-4.5, -0.5) rectangle (-1.5, 0.5);\n\n% Macro movement arrows\n\\draw[->, dashed, ultra thick] (-3.5, 1.7) -- (-1.8, 1.7);\n\\draw[->, dashed, ultra thick] (-2.5, -0.7) -- (-4.2, -0.7);\n\n% Macro zoom box (Orange, dashed)\n\\draw[draw=highlightorange, dashed, thick] (-1.95, 0.3) rectangle (-1.65, 0.7);\n\n% =========================================================\n% === Right Part: Micro View (Zoomed Interface) ===\n% =========================================================\n\n% Micro View Border\n\\draw[draw=highlightorange, dashed, thick] (0, -1) rectangle (4, 2.5);\n\n% Coordinates for the jagged interface\n% Gray block surface (bottom)\n\\coordinate (G1) at (0.5, 0.8);\n\\coordinate (GV1) at (1.0, 0.1);\n\\coordinate (G2) at (1.5, 0.9);\n\\coordinate (GV2) at (2.0, 0.3);\n\\coordinate (G3) at (2.5, 1.0);\n\\coordinate (GV3) at (3.0, 0.5);\n\\coordinate (G4) at (3.5, 0.9);\n\n% Blue block surface (top)\n\\coordinate (B1) at (0.5, 0.9);\n\\coordinate (BV1) at (0.8, 0.2);\n\\coordinate (B2) at (1.5, 1.0);\n\\coordinate (BV2) at (1.8, 0.4);\n\\coordinate (B3) at (2.5, 1.1);\n\\coordinate (BV3) at (2.8, 0.6);\n\\coordinate (B4) at (3.5, 1.0);\n\n% Fill Gray Area (bottom)\n\\filldraw[fill=bottomgray, draw=black, thick] (0,-1) -- (0, 0.4) -- (G1) -- (GV1) -- (G2) -- (GV2) -- (G3) -- (GV3) -- (G4) -- (4, 0.5) -- (4,-1) -- cycle;\n\n% Fill Blue Area (top)\n\\begin{scope}\n \\clip (0,-1) rectangle (4, 2.5);\n \\filldraw[fill=topblue, draw=black, thick] (0, 2.5) -- (0, 0.6) -- (B1) -- (BV1) -- (B2) -- (BV2) -- (B3) -- (BV3) -- (B4) -- (4, 0.6) -- (4, 2.5) -- cycle;\n\\end{scope}\n\n% =========================================================\n% === Details: Arrows, Points, Labels, Zoom Line ===\n% =========================================================\n\n% Connecting zoom arrow from macro to micro\n\\draw[->, highlightorange, thick] (-1.65, 0.5) to[out=45, in=150] (0, 1.8);\n\n% Labels A-F (Yellow text)\n\\node[text=yellow, font=\\bfseries] at (0.5, 0.55) {A};\n\\node[text=yellow, font=\\bfseries] at (1.5, 0.65) {B};\n\\node[text=yellow, font=\\bfseries] at (2.0, 0.5) {C};\n\\node[text=yellow, font=\\bfseries] at (2.5, 0.75) {D};\n\\node[text=yellow, font=\\bfseries] at (3.5, 0.65) {E};\n\\node[text=white, font=\\bfseries] at (3.85, 0.65) {F}; % White for visibility on gray\n\n% Force Arrows (Purple) and Contact points (Red circles)\n\\foreach \\x/\\y in {0.5/0.8, 1.5/0.9, 2.5/1.0, 3.5/0.9} {\n \\fill[red] (\\x, \\y) circle (2pt);\n \\draw[->, forcepurple, thick] (\\x - 0.3, \\y + 0.6) -- (\\x, \\y);\n \\draw[->, forcepurple, thick] (\\x + 0.3, \\y - 0.6) -- (\\x, \\y);\n}\n\n% Micro movement arrows (top and bottom)\n\\draw[->, dashed, ultra thick] (1.5, 2.7) -- (3.0, 2.7);\n\\draw[->, dashed, ultra thick] (2.5, -1.2) -- (1.0, -1.2);\n\n\\end{tikzpicture}\n\\end{document}"ABCDEF
source code

We have some laws of friction:

  • Amonton’s 1st law: friction force is proportional to the normal force
  • Amonton’s 2nd law: friction force is independent of the contact area
  • Coulomb’s law: Once the motion starts, the friction force is independent of velocity.
"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{amsfonts}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[x=1cm, y=1cm, scale=0.8, >=stealth]\n\n% Define dark red for the arrows to better match the image\n\\definecolor{darkred}{RGB}{160, 10, 10}\n\n% --- Ground Plane ---\n\\draw[ultra thick] (-3, -0.6) -- (3, -0.6);\n\n% --- Upward Pointing Cone Area (Drawn FIRST so it renders behind the block) ---\n% Fixed: Using absolute polar coordinates to ensure perfect symmetry\n\\fill[olive!20] (0, 0) -- (60:4.5) -- (120:4.5) -- cycle;\n\n% --- Dashed Cone Outline ---\n\\draw[dashed, thick] (0, 0) -- (60:4.5);\n\\draw[dashed, thick] (0, 0) -- (120:4.5);\n\n% --- Rectangular Block ---\n\\filldraw[fill=lightgray, draw=black, thick] (-1.0, -0.6) rectangle (1.0, 0.5);\n\n% --- Center Point ---\n\\fill[black] (0, 0) circle (3pt);\n\n% --- Vector Forces (all originating from center point) ---\n\n% External Force (f_ext, horizontal-left)\n\\draw[->, darkred, ultra thick] (0, 0) -- (-2.2, 0);\n\\node[anchor=south, scale=1.4, darkred] at (-2.0, 0.1) {$\\mathbf{f}_{ext}$};\n\n% Gravitational Force (mg, vertical-down)\n\\draw[->, darkred, ultra thick] (0, 0) -- (0, -2.5);\n\\node[anchor=west, scale=1.4, darkred] at (0.1, -1.8) {$m\\mathbf{g}$};\n\n% Contact Force (f_c, slanted upward-left, inside the cone)\n\\draw[->, darkred, ultra thick] (0, 0) -- (110:2.8);\n\\node[anchor=south east, scale=1.4, darkred] at (110:2.8) {$\\mathbf{f}_c$};\n\n% --- Cone Label ---\n% Placed along the right edge of the cone\n\\node[scale=2, black] at (60:3.5) [xshift=10pt, yshift=5pt] {$\\mathcal{C}$};\n\n\\end{tikzpicture}\n\\end{document}"fextmgfcC
source code

The force at contact lies in a friction cone (in the dual space at contact, or the tangent cone).

  • At each point of contact, we have an outward normal (covector) .
  • The relative velocity between contact should satisfy .
  • The normal () and tangent part () of the contact force, and tangent velocity () should satisfy the following relations: where is the coefficient of friction. In the image above, dictates the width of the friction cone.
  • When the tangent velocity is nonzero, the tangent force is in the same direction with it

From physics, these two relations are merely:

  1. Static Friction (stuck): If the required tangential force (the force pushing the object to the right) is strictly less than the boundary of the cone, the object is perfectly stuck and thus has zero tangential velocity.
  2. Kinetic Friction (sliding): If the external push exceeds the cone’s edge, the friction force maxes out at the cone boundary . The object begins to slide and the friction force points in the exact opposite direction of the motion.

Classical Approach for Contact

Suppose we want to model how a rigid body comes into contact with a wall or some other object. We first establish a set of points that will be in contact. Then

"\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{amsfonts}\n\\usepackage{xcolor}\n\n\\begin{document}\n\\begin{tikzpicture}[>=stealth, scale=1.0]\n\n% --- Color Palette ---\n\\definecolor{darkblue}{RGB}{34, 75, 139}\n\\definecolor{lightblue}{RGB}{128, 164, 214}\n\\definecolor{mypurple}{RGB}{121, 74, 154}\n\\definecolor{myteal}{RGB}{64, 160, 150}\n\\definecolor{blockblue}{RGB}{48, 101, 163}\n\n% ==========================================\n% Left Column (parameters for motion)\n% ==========================================\n\n% Header\n\\node[font=\\sffamily\\large, text=black] at (0, 4) {parameters for motion};\n\n% Equations\n\\node[darkblue, font=\\Large] at (0, 3.0) {$(\\mathbf{c}, \\mathbf{R}) \\in Q$};\n\\node[darkblue, font=\\Large] at (0, 1.8) {$(\\dot{\\mathbf{c}}, \\dot{\\mathbf{R}}) \\in T_{(\\mathbf{c}, \\mathbf{R})}Q$};\n\\node[darkblue, font=\\Large] at (0, 0.8) {$(\\ddot{\\mathbf{c}}, \\ddot{\\mathbf{R}}) \\in T_{(\\mathbf{c}, \\mathbf{R})}Q$};\n\n% Bottom Equation (T*)\n\\node[lightblue, font=\\Large] at (-0.5, -1.2) {$T^*_{(\\mathbf{c}, \\mathbf{R})}Q$};\n\n% Upward Arrow M^{-1}\n\\draw[->, ultra thick, black] (-0.5, -0.6) -- (-0.5, 0.4) node[midway, left=2pt, font=\\Large] {$\\mathbf{M}^{-1}$};\n\n\n% ==========================================\n% Middle Arrows (Mappings)\n% ==========================================\n\n% phi arrow\n\\draw[->, ultra thick, black] (1.8, 3.0) -- (2.8, 3.0) node[midway, above=2pt, font=\\Large] {$\\phi$};\n\n% d(phi) arrow\n\\draw[->, ultra thick, black] (1.8, 1.8) -- (2.8, 1.8);\n\\node[font=\\Large, black] at (2.5, 1.3) {$d\\phi$};\n\n% Dotted separator line\n\\draw[ultra thick, dotted, black] (4.5, 1.1) -- (4.5, -0.2);\n\n% d(phi)* arrow\n\\draw[<-, ultra thick, black] (1.8, -1.2) -- (2.8, -1.2);\n\\node[font=\\Large, black] at (2.5, -0.7) {$d\\phi^*$};\n\n\n% ==========================================\n% Right Column (space of contact)\n% ==========================================\n\n% Header\n\\node[font=\\sffamily\\large, text=black] at (5.5, 4) {space of contact};\n\n% Equations\n\\node[mypurple, font=\\Large, anchor=west] at (3.2, 3.0) {$(\\mathbf{p}_1, \\cdots, \\mathbf{p}_k) \\in \\mathbb{R}^3 \\times \\cdots \\times \\mathbb{R}^3$};\n\\node[mypurple, font=\\Large, anchor=west] at (3.2, 1.8) {$(\\dot{\\mathbf{p}}_1, \\cdots, \\dot{\\mathbf{p}}_k) \\in \\mathbb{R}^3 \\times \\cdots \\times \\mathbb{R}^3$};\n\n% Bottom Equations (Forces)\n\\node[myteal, font=\\Large, anchor=west] at (3.2, -1.2) {$(\\mathbf{f}_1, \\dots, \\mathbf{f}_k) \\in \\mathcal{C}_1 \\times \\cdots \\times \\mathcal{C}_k$};\n\\node[myteal, font=\\Large, anchor=west] at (5.0, -2.2) {$\\subset \\mathbb{R}^{3*} \\times \\cdots \\times \\mathbb{R}^{3*}$};\n\n\n% ==========================================\n% Graphic (Physics Diagram)\n% ==========================================\n\n\\begin{scope}[shift={(1.0, 0)}] % Shift graphic slightly right to balance visual space\n \n % Gray Wall (Drawn first so it stays in background)\n \\fill[lightgray] (8.0, -2.2) rectangle (13.2, -1.5); % Floor\n \\fill[lightgray] (12.5, -1.5) rectangle (13.2, 3.5); % Right Wall\n\n % Semi-transparent sweeps/trails (showing motion down the wall)\n \\fill[myteal, opacity=0.15] (11.0, -1.5) -- (10.0, -0.2) -- (11.5, 2.5) -- (12.5, 1.5) -- cycle;\n \\fill[myteal, opacity=0.15] (11.0, -1.5) -- (10.5, -0.8) -- (11.8, 2.0) -- (12.5, 1.5) -- cycle;\n\n % Solid Blue Rigid Body Block\n % Geometry calculated manually: length ~3.35, width ~0.8, angled perfectly between contact points\n \\fill[blockblue] (11.0, -1.5) -- (12.5, 1.5) -- (11.78, 1.86) -- (10.28, -1.14) -- cycle;\n\n % Contact Points (Purple Dots)\n \\fill[mypurple] (11.0, -1.5) circle (4.5pt); % Bottom Contact p1\n \\fill[mypurple] (12.5, 1.5) circle (4.5pt); % Top Contact p2\n\n % Contact Labels\n \\node[mypurple, below=6pt, font=\\huge] at (11.0, -1.5) {$\\mathbf{p}_1$};\n \\node[mypurple, above left=6pt, font=\\huge] at (12.5, 1.5) {$\\mathbf{p}_2$};\n\n\\end{scope}\n\n\\end{tikzpicture}\n\\end{document}"parametersformotion(c;R)2Q(_c;_R)2T(c;R)Q(Äc;ÄR)2T(c;R)QT¤(c;R)QM¡1Á¤spaceofcontact(p1;¢¢¢;pk)2R3£¢¢¢£R3(_p1;¢¢¢;_pk)2R3£¢¢¢£R3(f1;:::;fk)2C1£¢¢¢£Ck½R3¤£¢¢¢£R3¤p1p2
source code

This is computationally miserable. When a 3D object hits the floor, we have to keep track of the object’s state and the contact space where the objects touch . To know if an object is sliding or stuck, we need to view the object’s linear and angular velocity and map that to 3D velocities at every single contact point .

This translation is done via the Jacobian denoted by . Conversely, the floor pushes back on those chair legs by friction and normal forces . To know how those forces affect the chair’s motion, we need to map the net force and net torque back to the cneter of pass. This is done via the dual (tranpose, since ) of the Jacobian, denoted by .

We then need to solve for velocity and contact forces so that all conditions are satisfied. Because the body is rigid, all the particles are connected.

  1. The friction force at point depends on its velocity.
  2. But its velocity depends on the total rotation of the chair.
  3. The total rotation of the chair depends on the forces pushing up on points .

Obviously, we cannot calculate them all in closed form. This is called the Linear Complementarity Problem (LCP). The solver would have to guess if each point is stuck, sliding, or lifting off the ground.

Dissipation Function for Dry Friction

We can take a variational approach to dry friction.

Newmark Algorithm

We initally chose the Backward Euler method for its simplicity and unconditional stability. However, it is only “first order” accurate, meaning it introduces a lot of numerical error over time.

Recall the backward Euler update:

where . The assumes the object will continue moving at the same velocity as before, ignoring forces and acceleration.

Now, let the incremental potential be

The acceleration at current time can be read off from

Velocity can be kept track of by

is a parameter that controls how much we trust the current acceleration vs the previous acceleration . The prediction of the next time step

If we ignore the parameter for a moment, this prediction is actually the classic kinematic equation from basic physiscs, . We are basically predicting the next position using the current velocity and current acceleration.

We then solve an optimization problem like before,

This is the Newmark algorithm.

Numerical Optimization for Contact

Since we have a variational formulation for contact and have shown that is simply an optimization problem, we can solve for contact forces and velocities using numerical optimization. This is a more direct approach than the classical LCP formulation.

Using the smooth barrier and dissipation function, every time step is actually one unconstrained optimization problem

Here, may be velocity or position

Note that the initial guess (from the state of the previous time frame) for optimization is usually very close to the optimizer. We can use gradient descent using some metric .

Now, we just need to choose a good and a step size .

  • Classic gradient descent uses and a small step size . This is very stable but can be slow to converge.
  • Newton’s method uses .
  • Quasi-Newton methods use an approximation of the Hessian.
  • Use line search for choosing .

Footnotes

  1. Imagine running your hand through water. As you move faster, the force pushing back on your hand gets stronger. The same principle is true for air resistance and friction between surfaces.