Skip to main content

loadtracer

Documentation: loadtracer.structuralpython.com

loadtracer takes a papermodels GeometryGraph and traces the loads through it. Each element is analysed in turn, from the top of the graph down, and its reactions are applied to the elements that support it. Beams are analysed with PyniteFEA, walls with loadbearing_wall.LinearWallModel, and columns as concentric columns. Beams can be analysed with pycba instead (frame_backend="pycba", see Options).

loadtracer is an analysis step only. It needs the graph and the occupancy loads, not design data such as element heights or floor elevations.

Usage

from decimal import Decimal
from papermodels.datatypes.geometry_graph import GeometryGraph
from papermodels.datatypes.joist_models import JoistArrayModel
from loadtracer.load_tracer import LoadTracer

graph = GeometryGraph.from_pdf_file("plan.pdf", scale=Decimal(1 / 72 * 4))
graph.assign_collector_behaviour(JoistArrayModel, spacing=1.0)

lt = LoadTracer(
    geometry_graph=graph,
    occupancies={"residential": {"D": 0.5, "L": 1.9}, "roof": {"D": 0.4, "S": 1.2}},
)
lt.execute_analyses(artifacts_dir="artifacts")  # writes models.json, reaction_forces.json

After a rundown:

Attribute Contents
lt.expanded_pm[tag] The papermodel of each member with every load expanded into load-case components ("expanded")
lt.models[tag] The serialized analysis model of each member
lt.reactions[tag] {support_index: {dir: {case: value}}}: the forces on each support. Walls give lists of distributed loads
lt.issues[tag] Input that was corrected so the rundown could continue (e.g. loads past a member end). Review these
lt.errors[tag] Members that could not be analysed (with on_error="collect")
lt.ignored_reactions[tag] Transfer loads whose source reactions were missing (with missing_reactions="ignore")

Joist loads as distributed loads

A joist array from papermodels (e.g. J1.0) is analysed one joist at a time (J1.0-0, J1.0-1, ...), so the members under it receive one point load per joist. By default (joist_loads="distributed"), loadtracer replaces each run of joist point loads on a member with one distributed load over the run, in both expanded_pm and the analysis model. For each load case it is a uniform load when that moves no more than joist_load_shift_limit (default 1%) of the load along the member, and otherwise a chain of trapezoids (a polyline) fitted to the joist reactions to within joist_polyline_tol (default 2%). The total load is unchanged, and a polyline also keeps its resultant location. A polyline that still moves more load than the limit raises a JoistLoadVariabilityWarning. See the joist loads guide for the arithmetic.

lt.converted_joist_loads() returns one row per trapezoid of each converted load and load case, giving the load as a line load and as an occupancy pressure over a trib width, for comparing against hand calculations (e.g. as a table with pandas):

import pandas as pd
pd.DataFrame(lt.converted_joist_loads("FB2.0"))
#   member array  joists case  profile  segment  start_loc  end_loc  w_start  w_end  ...  load_shift  occupancy  pressure  trib_width_start  trib_width_end  approximate

The trib width is the line load divided by the pressure of the joists' occupancy. It is flagged approximate (with a JoistTribWidthWarning) when the joists carry more than one occupancy or other transferred loads. Use joist_loads="point" to apply each joist reaction as a point load.

Options

  • on_error="raise" | "collect": stop at the first member that fails, or record it in lt.errors and continue.
  • missing_reactions="raise" | "ignore": what to do when a member receives load from a member without reactions (e.g. one that failed or was excluded).
  • frame_backend="pynite" | "pycba": analyse beams with PyniteFEA (default) or with pycba via pycba-tools (pip install loadtracer[pycba]). Reactions have the same format and signs. pycba handles in-plane bending only (Fy loads, Mz moments): a member with loads in other directions fails with an AnalysisError.
  • execute_analyses(exclude_members=[...]): skip members. Excluding a joist array (e.g. "J1.0") excludes all of its joists.
  • execute_analyses(linear_wall_spread_angle=...): spread loads down walls at this angle (degrees). A non-zero angle needs a height on each wall's annotation.

Errors are subclasses of loadtracer.LoadTracerError and name the member they concern. See the robustness audit for the input that loadtracer corrects, reports or rejects, and why.

Examples

Examples/ follows the papermodels examples through to the reactions at the foundation.

Development

uv sync
uv run pytest

To build the documentation locally (into docs/_build/html):

uv run --group docs sphinx-build -b html docs docs/_build/html

The integration tests run the papermodels test drawings end to end. They are not in the papermodels package, so they are read from a papermodels checkout next to this repository (../papermodels) when there is one, and otherwise downloaded from GitHub at the installed papermodels version and cached in ~/.cache/loadtracer. The tests are skipped when neither is available.

Metadata

Release files for loadtracer 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loadtracer 0.9.2
File Size Uploaded Provenance Actions
loadtracer-0.9.2.tar.gz 34.4 kB With provenance Details for loadtracer-0.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loadtracer 0.9.2
File Interpreter ABI Platform Actions
loadtracer-0.9.2-py3-none-any.whl Python 3 none any Details for loadtracer-0.9.2-py3-none-any.whl

Total release size: 73.6 kB

Release files / loadtracer-0.9.2.tar.gz

Download URL loadtracer-0.9.2.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b639f7205df83c7be0cc296b101807501b2caec0e927f804c629e71444726ef6
BLAKE2b-256 checksum
How to use checksums
032610d35d969752e82422d4294b10add8790ebe532fa57a8ea740b2e98b47d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Release files / loadtracer-0.9.2-py3-none-any.whl

Download URL loadtracer-0.9.2-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80d202004f52e31b514e0679ff449a4560ac2cebee5942363a04b65715387fe9
BLAKE2b-256 checksum
How to use checksums
df72d8b66040f950af85bc3f535c088ee1a4667a0b3019cf0baf00c3fb16a9da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Security for loadtracer 0.9.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for loadtracer-0.9.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page