Archi-Civilarchi-civil.com
Calculations You Can Defend · HES-03  |  Confidence: A

Home / Articles / Calculations You Can Defend HES-03

Sign and Direction Conventions: The Quietest Error in Calculations

Is an azimuth measured from south or from north? Does a positive shear stress rotate clockwise or counter-clockwise? These questions look simple; yet five of the errors found in this site's audit came from exactly these questions. None of them was a formula error.

Confidence: A Engine: engine/solar-geometry.js Test: tests/solar-geometry.test.js Reading: ~9 min Last verified: 2026-10-21 Türkçe: Türkçe oku
Open the calculator → All articles →

1. An error without a formula

Most errors in an engineering calculation do not come from a wrong formula. The formula is right; but two parts read the same quantity with different conventions. One measures an angle from north, the other from south. One counts counter-clockwise as positive, the other clockwise. Each part is correct on its own; where they meet, the result is wrong.

2. Five examples

Five such cases were found in the archi-civil.com audit:

WhereRule statedRule appliedConsequence
Sun azimuthMeasured from south, east negativeMeasured from north180° at noon (correct: 0°)
Kinetic facadeFacade direction: 0 = southSun measured from northSouth facade "sun behind" at summer noon
Mohr circleLabel: "positive τ = clockwise"Engine: positive τ rotates counter-clockwiseA user following the label gets the principal direction wrong
CantileverText: "Ma clockwise"Physics: fixed-end moment counter-clockwiseThe free-body diagram is drawn wrong
Reference solverEnd moments: counter-clockwise +Sign reversed in the reaction formulaA correct page looked 107% wrong

What the five share is that the error is neither inside the code nor in a formula. It is between two things: between a convention and the calculation that uses it, between an engine and the label that describes it.

3. Why so quiet?

Sign and direction errors usually produce plausible-looking results. A sun azimuth of 180° is a number, not an error message. A moment with the wrong sign looks right at first because its magnitude is right. These errors neither crash a program nor produce an "impossible" value; they only lead to a wrong decision.

The second reason is that tests are written with the same convention. The kinetic facade test represented the south facade with 180°, sharing the engine's wrong convention (see HES-01). A test that shares the convention cannot see a convention error.

4. Writing the convention at the boundary

The most effective safeguard is to state the convention at every boundary: at a function's input and output, on an interface label, in a table header. The field in the solar engine was named "azimuthFromSouth", so the convention was in the name. The error was the divergence between what the name said and what the calculation did. Because the convention was written down, the error could be found.

The fixes applied the same principle: the solar and kinetic facade engines now state "from south, east negative, west positive" in the same words in both the code comment and the interface label. In the Cross example, the sign convention of the results was written into the text: "end-moment convention, same as FEM (left end −, right end +)".

5. Testing with physical facts

The most reliable way to catch convention errors is to test against physical facts independent of the convention:

Each of these facts is now a check in the site's tests.

6. Checklist

  1. For every angle: measured from where? Which direction is positive?
  2. For every force and moment: which sign is tension, which compression? Which rotation is positive?
  3. Is the convention written on the label that shows the value?
  4. Does the test check the convention against a physical fact independent of the code?
  5. Where two parts meet (engine and interface, two engines, engine and test), do both use the same convention?
Try it on the site: set the time to 12:00 in the sun–shadow tool; the azimuth should read 0° (due south).

References

  1. archi-civil.com release notes (README), v565, v566, v569, v571: sign and direction convention errors and their fixes.
  2. Duffie, J. A. and Beckman, W. A. (2013). Solar Engineering of Thermal Processes, 4th ed., Chapter 1 (solar angles and sign conventions). Wiley.
  3. Beer, F. P., Johnston, E. R., DeWolf, J. T. and Mazurek, D. F. Mechanics of Materials, Chapter 7 (stress transformation and Mohr's circle). McGraw-Hill.

The numbers in this article were produced by the site's engines; code values are given with their clause numbers.

archi-civil.com — Sign and Direction Conventions: The Quietest Error in Calculations · HES-03 ·