Keeping the books on energy
The question. In a run of the arm, energy is put in by the muscles and the bones, stored in stretched tissue, carried as motion, and lost to viscosity and to the stepping rule. How can you tell that every joule came from something the model contains and went somewhere the model says?
The model’s claim is that the arm moves because its muscles pull. A stepping rule that adds energy makes motion no muscle caused; one that removes it hides physics that is missing, as backward Euler supplied a decay the tissue did not have in When tissue’s own inertia matters. Neither shows in a single number such as an elbow angle. Both show in an account of energy kept step by step.
By the end you will be able to write the energy ledger of a step, split one backward Euler step’s loss by hand into the damper’s share and the rule’s, read a ledger to find which line is wrong, and say what each way of treating contact in time promises about energy.
The identity
Energy and work showed that work done on a body becomes its energy. For the tissue over one step the books read:
In words: the work put in equals the gain in kinetic energy , plus the gain in stored energy , plus the energy the viscosity dissipated, plus the energy the stepping rule lost, plus whatever is left over, the residual . All are in joules. An energy ledger is this identity written down line by line, for every step.
- Work in. The active fibres’ work on the tissue; the bones’ work through the nodes bound to them and through the obstacles they move; and the energy put in by changes of the contact’s state, described below.
- Stored. Elastic energy in the ground substance and the passive fibres, energy in the contact’s springs, and the tissue’s gravitational energy.
- Viscous. The work of the viscous stress of Tissue that loses energy.
- Relaxing branches. The energy lost by the relaxing branches of the same chapter, with the energy they hold counted among the stored.
- Numerical. For each term of the step’s potential, what the step’s force did over the step’s displacement beyond the change of the term itself. It is the stepping rule’s own gain or loss.
- Residual. What remains. It is the work of the small force each search leaves unbalanced when it stops at its tolerance.
Each force in the ledger is the average of its value at the start and at the end of the step: the trapezoid rule of Adding up small pieces. With that choice, for a body on linear springs, the trapezoidal stepping rule’s numerical line is exactly zero.
Where the rule’s loss hides
For one coordinate the split can be done exactly. A mass on a spring with a damper , stepped by backward Euler with step :
The energy is . Use and the same for :
The second line puts in the two equations of the step. In words: one step loses the damper’s work at the end speed, , and on top of it the bracket, which is never negative and has nothing to do with the damper. The ledger books the first as viscous and the bracket as numerical. Both this and the trapezoidal rule’s counterpart, which loses exactly the damper’s mean work and nothing else, are proved.
A worked example
Take kg, N/m, N·s/m and s, starting at m with m/s.
- Put into the second equation: , so m/s and m.
- Energy before: J. After: J. Lost: 0.0884 J.
- Viscous: J.
- Numerical: J.
The two add to 0.0884 J. Four-fifths of the loss in this step is the rule’s, not the damper’s.
Why the rule should neither make nor lose energy
A wobble’s decay then belongs to the tissue, its period to the tissue’s stiffness and mass, and the work the muscles do is what moves the arm. So the rule adopted is: numerical loss is allowed only in vibrations the step cannot follow, such as the penalty’s fast compressions, and it is booked as its own line and kept small beside the physical loss where the step can follow. With the viscosity on, on the 32 mm block of relaxed muscle let go and left to ring for 0.4 s, Bossak with at 2.5 ms lost 2 % as much to the rule as to the viscosity, at 5 ms 10 %; backward Euler at 5 ms lost more to itself than to the tissue. The 10 % is the ledger’s division of the loss, not 10 % too much damping: in total the simulated wobble at 5 ms dies about as fast as an exact damped oscillator’s, because at 16 steps a period the stepped viscous force itself dissipates a little less than the true one.
Contact that changes during a step
The arm’s muscles press on one another and on the bones. That contact is held by springs whose settings change: the pressure each point is expected to carry is corrected after each balance and the balance solved again, and the planes some pairs are held against are taken afresh. Each correction changes the potential that the step is minimising. No muscle and no bone does that work; the ledger books it on its own line, “contact updates”.
Without inertia such a change only moves the balance. With inertia, the jump between one balance and the next becomes velocity. A rule that loses energy at high frequency removes it within a few steps. The trapezoidal rule keeps it: in a fast curl of 1 kg through 90° in 0.3 s, with the tissue’s mass and no damping, the tissue’s kinetic energy reached 1.18 J by 0.135 s, where about 0.04 J is expected at the movement’s fastest, and the run was stopped.
With the viscosity on and Bossak with the same curl ran to its end. Its books over 301 steps:
| In | J | Changes and losses | J |
|---|---|---|---|
| muscles | +13.202 | kinetic | +0.007 |
| bones, through bound nodes | −11.133 | elastic | +2.544 |
| bones, through contact | +0.184 | contact springs | −0.585 |
| contact updates | +1.740 | gravitational | +0.142 |
| viscous | 0.429 | ||
| numerical | +1.454 | ||
| residual | +0.0002 |
The muscles’ line agrees with the arm’s own account of the fibres’ work, 13.246 J, computed from each point’s stress and change of stretch. The contact updates put in 1.74 J, 13 % of the muscles’ work, from no modelled agent, most of it in the rebound after the stop. The numerical line is mostly the contact’s, 1.33 J, and 0.95 J of that falls in the steps with the largest corrections, where the average of the contact forces mixes two different potentials. The books close; the finding is where the large lines are.
This curl was run with the Voigt law in the muscles. With the simulator’s arm as it now runs, the muscles’ relaxing ground substance and the tendons’ relaxing fibres in place of it, a fast curl of 1 kg books, over 281 steps: 12.86 J from the muscles, −10.88 J through the bound nodes, 4.65 J of contact updates; 0.002 J kinetic, 1.28 J elastic, 0.14 J gravitational; 0.126 J to the Voigt law in the tendons, 1.10 J to the relaxing branches, and 3.95 J numerical, 3.81 J of it the contact’s. What is left over is J, the unbalanced force’s work. The branches’ own line passes the ledger’s test: the energy they hold is a true stored energy, never negative and at most 0.87 J, and the energy they lose is positive in 281 of the 282 steps, the one exception 5.2 mJ below zero, about 1 % of the largest step’s work in the branches, within the error of averaging forces over a step. The contact updates are again the largest line that no muscle or bone pays for.
Three ways to treat contact in time
Most of those pairs are muscles that never part, and a sliding interface that is always joined can replace them. Real contact remains where surfaces do part: skin against things outside the body, the fluid-filled bursae, the joint’s cartilage. For those there are three choices:
- Frozen within the step. Pressures and planes are fixed while the step is solved and corrected once after it, the correction’s energy booked. Each step then minimises one fixed potential, so the stepping rule’s own energy property holds within it, at no extra cost. But a correction of the pressures never lowers the stored energy. With the contact’s energy written as , where is the pressure a point is expected to carry, the penalty and the pressure it carries at the gap , setting to with the shape held still raises the energy of a point that has sunk in by by , and that of a point that has left contact by . A frozen contact that may never create energy can therefore never correct its pressures at all. On the fast curl the frozen corrections put 3.2 times as much energy into the tissue by 0.22 s as the corrections made during each solve, 0.151 J against 0.047 J.
- A barrier. Each pair of surface pieces carries a cushion that grows without limit as they approach, and every trial move is checked along its path for crossings (Li et al. 2020). The cushion is one fixed law, so it never adds energy by itself; but the surfaces stay a small gap apart, every trial move costs a collision check, and the barrier’s stiffness, adapted during a solve, must itself be frozen within the step and booked.
- Exact contact by semismooth Newton. Each Newton iteration settles which points touch and how hard. It gives contact with no overlap, but its rules change at every iteration, it took 2.0 times the iterations and 2.9 times the time on the curl’s first steps, and on its own it did not stop the trapezoidal rule’s gain: 0.67 J by 0.14 s.
None of them can promise to keep energy through an impact. No time-stepping scheme meets a contact at both the level of position and the level of velocity while also conserving energy (Acary 2014, reviewing earlier work). What can be promised is that a barrier never creates energy through its own law, and that a frozen contact books every joule it creates. Of these, the simulator’s arm uses the in-solve corrections; semismooth Newton and the frozen contact are settings of the solver, and the barrier is not built.
Try it: where the carriage’s work goes
The lab is the 32 mm block of relaxed muscle on a carriage that moves 20 mm in 60 ms, smoothly from rest to rest, and then stops. The block lags behind and rings. There is no contact, so every line but the contact’s can be watched.
- The rule that keeps energy. With the trapezoidal rule at 2.5 ms and no viscosity, press Play. The carriage does 11.95 mJ of work. At the end the block holds 10.53 mJ as motion and 1.38 mJ as stored energy; the rule lost 0.03 mJ and the residual is zero to the shown digits.
- Predict, then check. Choose backward Euler. Where will the energy go? Into the integrator’s line: 11.40 of 11.71 mJ. The block is nearly still at the end, and no physics stopped it.
- A tissue that loses energy. Back to the trapezoidal rule, with Pa·s. The carriage’s 9.59 mJ goes almost all to the viscosity, 9.54 mJ; the rule’s line is 0.003 mJ.
- Forgetting the fast. With no viscosity, choose Bossak with : the rule’s line is 0.80 mJ at 2.5 ms and 4.0 mJ at 5 ms. With , 0.26 and 1.57 mJ. The block’s ringing after the stop is slow enough to be followed, so this is loss the tissue did not cause.
- The books close. In every run, work in less kinetic, stored, viscous and numerical leaves the residual, the unbalanced force’s work, below a millionth of the work.
What this model leaves out
- A rule that keeps energy exactly for any law. The averaged-vector-field step averages the force along the straight path from start to end; it can be written as a minimisation and keeps the total energy whenever the potential does not change during the step. It is not built.
- The barrier. It is not built; the arm’s contact is corrected during each solve, and the frozen contact is a setting, not the default.
- Starting the laboratory’s Newmark rules from the true acceleration. The laboratory starts at zero acceleration, out of balance, which makes the first step’s numerical line larger than the rest; the simulator’s arm starts from the true acceleration.
- The skeleton’s own books. The ledger here is the tissue’s; the skeleton’s account of work and energy is that of Tissue and skeleton together.
Summary
- The ledger is , step by step, with forces averaged over each step.
- One backward Euler step with a damper loses to the damper and to itself; the trapezoidal rule loses only the damper’s work.
- A rule may lose energy only where the step cannot follow the motion, and must book it.
- Changing the contact’s settings during a step changes the potential: on the fast curl it put in 1.74 J, 13 % of the muscles’ work. Freezing contact within the step books it; a barrier never creates it; no scheme conserves energy through an impact.
Next: with the solving methods in hand, how can anyone believe the simulator’s numbers? How the simulator is checked.