Skip to main content

fers_calculations

The engine of FERS: structural finite-element analysis (3D frames, trusses, plates, Eurocode 3 checks) for engineers and AI agents. It takes a model as JSON and returns the solved document: displacements, reactions, member forces, buckling and modal results, and unity checks. It is compiled Rust and runs on your machine.

Most people want pip install FERS, the Python SDK and fers command, which installs this engine and writes the model JSON for you. Install this package alone to drive the engine with JSON you produce some other way.

The SDK is open source (BSD-3-Clause) at github.com/Jeroen124/FERS_core, with its examples and the agent skill. This engine is free for non-commercial use (Licence); it computes linear and second-order (P-Delta) statics, natural frequencies, elastic buckling load factors (α_cr), response-spectrum seismic analysis, and EN 1993-1-1 member checks, flexural and lateral-torsional buckling included.

pip install fers_calculations      # wheels for Windows, macOS and Linux (x86_64, aarch64)

Usage

import json

import fers_calculations
from fers_core import create_beam  # pip install FERS: the SDK that writes the model

model = create_beam(5.0, "IPE180", udl=5000.0)  # 5 m span, 5 kN/m; SI units: m, N
document = json.loads(fers_calculations.calculate_from_json(json.dumps(model.to_dict(include_results=False))))

case = document["results"]["loadcases"]["Load"]
assert case["solver_diagnostics"]["converged"] and not case["errors_and_warnings"]["errors"]
print(f"mid-span deflection {case['displacement_nodes']['5']['dy'] * 1000:.2f} mm")
print(f"reaction {case['reaction_nodes']['1']['nodal_forces']['fy'] / 1000:.2f} kN")
mid-span deflection -14.92 mm
reaction 12.50 kN

The document is the input plus results: loadcases and loadcombinations by name, each with displacement_nodes, reaction_nodes and member_results keyed by id, plus unity_check_results, solve_failures and load_case_failures. Before using a number, check that its result set has no errors_and_warnings.errors and that solver_diagnostics.converged is true: a mechanism, for instance, is reported as a singular_model error. The engine raises RuntimeError when it refuses a model outright.

calculate_to_file(json_data, path) writes the document to a file instead of returning it, for results too large to hold as one string.

Premium licensing and timeouts

Without a key or token the engine runs at Free-tier limits (100 members) and makes no network call. Two ways unlock Premium limits:

  • solve_token=...: a short-lived token signed by FERS Cloud and checked offline, for a machine that cannot reach ferscloud.com. An expired or invalid token raises RuntimeError.
  • api_key=...: checked online with ferscloud.com once per solve. A key of a Free account solves at Free-tier limits and says so in a UserWarning.

Premium allows 10,000 members per model. An Enterprise account, granted by agreement, allows 1,000,000 through either way.

Because a licence check is a network call, it is bounded. If ferscloud.com does not answer within license_timeout seconds (default 30) the call raises fers_calculations.FersTimeoutError before the solve starts, so retrying is always safe:

import fers_calculations

try:
    fers_calculations.calculate_to_file(
        json_data, "results.json", api_key=KEY, license_timeout=60
    )
except fers_calculations.FersTimeoutError:
    ...  # transient — retry or skip this model

FersTimeoutError subclasses the built-in TimeoutError, so except TimeoutError catches it too. A definitive failure — an invalid key, an unreachable host — raises RuntimeError instead, since retrying those is pointless.

license_timeout bounds the licence handshake only, not the solve. To put a hard ceiling on a whole solve, run it in a killable subprocess.

Two environment variables are read (real process environment only — .env files are loaded by the CLI binary, never by this extension module):

Variable Purpose Default
FERS_LICENSE_TIMEOUT Default license_timeout, in seconds 30
FERS_CLOUD_URL Base URL of the licence API https://ferscloud.com

Licence

From 0.2.70 the engine is licensed under the PolyForm Strict License 1.0.0 (see LICENSE). It is free for any noncommercial purpose: study, teaching, research, hobby projects, and use by schools, charities and public bodies. Models of more than 100 members need Premium limits.

Commercial use, at any model size, needs a paid FERS Cloud plan, which includes the commercial licence. The licence does not allow modifying or redistributing the package.

Metadata

Release files for fers-calculations 0.2.118

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

Built distributions (wheels)

Table of built distributions (wheels) for fers-calculations 0.2.118
File Actions
fers_calculations-0.2.118-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for fers_calculations-0.2.118-cp39-abi3-win_amd64.whl
fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_x86_64.whl
fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_aarch64.whl
fers_calculations-0.2.118-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for fers_calculations-0.2.118-cp39-abi3-manylinux_2_28_aarch64.whl
fers_calculations-0.2.118-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for fers_calculations-0.2.118-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
fers_calculations-0.2.118-cp39-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.12+ x86-64 Details for fers_calculations-0.2.118-cp39-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Total release size: 25.8 MB

Release files / fers_calculations-0.2.118-cp39-abi3-win_amd64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-win_amd64.whl
Size 3.8 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ff0364f92587bc445f56e0e6b542cc7f82714c6ff9a8c39b63f74f354cefed89
BLAKE2b-256 checksum
How to use checksums
7aec201313555a1d1176ae6fef91bf8dd4bb372b7ec00e4f05494caa5dbbdd34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_x86_64.whl
Size 4.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
69b76856a69fdcea89c56e552a5157be426106f3e874307f2b15b70679b3656c
BLAKE2b-256 checksum
How to use checksums
42b8dbadee3f515d94ad1ce7ee8c49c0af69f760b9bd21dc15a67597f4e1cd82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-musllinux_1_2_aarch64.whl
Size 3.6 MB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
2ff790a8dfcebc7fd65dd1187f0448d56df8900dfa36c3dc1f65d314dcc82174
BLAKE2b-256 checksum
How to use checksums
cc774ac66b815fa4f9533e3f87db726df1e09c0a2cd5165ae6d1d83f3d2f37d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / fers_calculations-0.2.118-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-manylinux_2_28_aarch64.whl
Size 3.4 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f45ad26fb69d247ecb96ce270ba7deba92450bd22443371adcfc7fd812ad9ff9
BLAKE2b-256 checksum
How to use checksums
518ccde72285f38e23f9a882f53d98a56b7e0e768c0c77c78dd4753f9cb8417a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / fers_calculations-0.2.118-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.8 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4d2b22d5bdbcee2c0483b0042440a3536b9f385dba87afc1e96115d593a2fed6
BLAKE2b-256 checksum
How to use checksums
ad66d95e065b739d7320c9ca40aa461b4b3bdc125ddd0d0c6933f802b56b92e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / fers_calculations-0.2.118-cp39-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl

Download URL fers_calculations-0.2.118-cp39-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
Size 7.1 MB
Tags CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01641ada45ed0d9a029ba3a06f25f18aa29bf235c03163ec5b7c7b446f7a912e
BLAKE2b-256 checksum
How to use checksums
6b0e4a72140799bc730c4ca54bc77717fb85e7ba15cd0eb6ffec2b218cb470d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for fers-calculations 0.2.118

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.2.118 This release

6 release files No provenance

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