pyfiberc
pyfiberc is an analysis tool for Fiber-Reinforced Concrete (FRC) rectangular sections. It checks sections under axial force and bending at the Ultimate (ULS/SLU) and Serviceability (SLS/SLE) limit states, generates N‑M interaction domains, and produces a LaTeX/PDF calculation report.
It is built on top of pycivil, which provides the structural core: section and rebar modelling, loads and limit states, the solver framework, and the LaTeX report toolchain.
Features
- ULS (SLU) N‑M check — interaction domain for the fibered section, with optional shear-driven reduction of the residual tensile strength.
- SLS (SLE) N‑M check — domain checks for characteristic and quasi-permanent load combinations, with constitutive tension-law support.
- FRC material laws per CNR DT 204 / Linee Guida C.S.LL.PP. 2022,
fib Model Code 2010, and EN 1992‑1‑1:2023 — residual design strengths
(
fFtud,fFtld) and the piecewise tension constitutive law are computed automatically fromfR1k/fR3kand the selected code. - PDF report — section geometry plot, interaction domains, and check results rendered through pycivil's LaTeX engine.
Installation
The package targets Python 3.11–3.13 and is managed with
uv.
1. Install uv
Windows (Terminal on Win11, PowerShell on Win10):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
setx UV_NATIVE_TLS true
Restart the terminal so uv is on PATH and the TLS setting takes effect.
Linux / macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Install pyfiberc
From the directory where you want the environment to live:
uv init --python 3.12
uv add pyfiberc
SYSTRA users: to pull packages from the internal index, point
UV_INDEX_URLat the group endpoint with your personal access token:setx UV_INDEX_URL https://__token__:<YOUR_TOKEN_HERE>@gitlab.com/api/v4/groups/9596324/-/packages/pypi/simple
Usage example
Running the solver on a section model
The typical workflow is: build the input model (a FrcRecSectionInput) by hand,
save it as JSON, then run the solver from Python. The criteria field of the input selects
which checks run ("SLU-NM", "SLE-NM", ...). Sample inputs live in
tests/input_benchmarks/.
import json
from pathlib import Path
from pyfiberc.solver import FRCSolver
from pyfiberc.tools.models import FrcRecSectionInput, UUIDEncoder
# Load a section model from JSON
data = json.loads(Path("section.json").read_text())
model = FrcRecSectionInput(**data)
# Run the checks; plots and the report are written into the job path
job = Path("job-001")
job.mkdir(exist_ok=True)
solver = FRCSolver(model)
solver.setJobPath(job)
solver.run()
# Inspect or persist the results
output = solver.getModelOutput()
(job / "results.json").write_text(
json.dumps(output.model_dump(), indent=4, cls=UUIDEncoder)
)
# Build the LaTeX/PDF calculation report
solver.buildReport()
After run(), the job directory contains the section geometry plot and the
interaction-domain plots; buildReport() adds the compiled PDF.
Defining an FRC material
FiberConcrete is a pydantic model: pick a design code (normativa), give the
residual flexural strengths fR1k/fR3k and the code parameters, and the design
values come out as computed fields.
from pyfiberc.tools.models import FiberConcrete
from pyfiberc.materials import LawCode
frc = FiberConcrete(
description="C25/30 + steel fibers",
normativa=LawCode.CODE_ITA_LG2022, # Linee Guida C.S.LL.PP. 2022
fR1k=8.0, # residual strength at CMOD = 0.5 mm [MPa]
fR3k=8.8, # residual strength at CMOD = 2.5 mm [MPa]
k0=0.5, kg=1.0, # LG 2022 parameters
efu=0.01, # ultimate tensile strain [-]
lcs=300.0, # sectional characteristic length [mm]
d1=300.0, d2=300.0, d3=300.0, # FEM analysis parameters [mm]
)
print(frc.fFtud, frc.fFtld) # design residual tensile strengths [MPa]
print(frc.tensionConstLaw) # piecewise eps-sigma tension law
The input/output schemas live in pyfiberc.tools.models; the material law tables
and code mappings live in pyfiberc.materials.
Development
Set up
git clone https://gitlab.com/luigi_paone/pyfrc.git
cd pyfrc
uv sync
uv sync creates .venv/ from uv.lock, installs the package in editable mode,
and pulls in the dev dependency group.
Project layout
src/pyfiberc/
├── materials.py # LawCode, FiberConcrete material, ductility tables
├── solver.py # FRCSolver: run(), buildReport()
├── solver_lib.py # FRC_SLU_solver, FRC_SLE_solver, shear reduction
├── tools/models.py # Pydantic models: FrcRecSectionInput/Output, FiberConcrete
└── templates/latex/ # LaTeX fragments for the FRC material report
tests/
├── input_benchmarks/ # JSON input examples (SLU and SLE)
├── test_materials.py
└── test_solver.py
Tests and type checking
uv run pytest
uv run pytest --cov # coverage (configured under [tool.coverage.run])
uv run mypy src/pyfiberc
Releasing
- Bump
versioninpyproject.toml. uv lockto refresh the lockfile.- Add an entry to
CHANGELOG.md. - Commit (
chore: bump version to <version>) and tag.
Credits
pyfiberc stands on pycivil, which supplies the concrete section model, rebar disposers, loads and limit-state definitions, the N‑M checking solvers for RC rectangular sections, the plotting helpers, and the LaTeX report engine used for the PDF output. pyfiberc adds the FRC material laws and the fibered ULS/SLE solvers on top of that foundation.
Authors
- Marco Melcarne (SYSTRA)
- Luigi Luis Paone
- Claudia Orrico (SYSTRA)
Release notes
See CHANGELOG.md.
Metadata
Release files for pyfiberc 0.0.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfiberc-0.0.20.tar.gz | 153.9 kB | Without provenance | Details for pyfiberc-0.0.20.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfiberc-0.0.20-py3-none-any.whl | Python 3 | none | any | Details for pyfiberc-0.0.20-py3-none-any.whl |
Total release size: 207.1 kB
Release files / pyfiberc-0.0.20.tar.gz
| Download URL | pyfiberc-0.0.20.tar.gz |
|---|---|
| Size | 153.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c7b708233fcb2ae5dedbfa4d68bfa7afe05ad21a0ad536964b3482891a0bf0a
|
|
BLAKE2b-256 checksum How to use checksums |
1259074a4c2c1b4754a0cc1b4a450fd77820902b14f84fb1e8e7166c9183e641
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pyfiberc-0.0.20-py3-none-any.whl
| Download URL | pyfiberc-0.0.20-py3-none-any.whl |
|---|---|
| Size | 53.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23efa9dd4eb18bfdec22b2d69e49f0ec68900d0a39a8002082c66db9cae4e0c4
|
|
BLAKE2b-256 checksum How to use checksums |
1f8f5b3a4f941390627b3b916d850f25ff9f9dd28148e3300cbbf38dd30f94c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pyfiberc 0.0.20
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.