fibred rc sections tool
Project description
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. - PySide6 GUI (
pyfiberc-gui) to build and edit the section input model (geometry, rebar, concrete, steel, FRC material, loads) and save it as JSON. - 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
3. Launch the GUI
uv run pyfiberc-gui
This opens the editor for the section input model (FrcRecSectionInput). On Linux,
the entry point automatically prepends PySide6's bundled Qt libraries to
LD_LIBRARY_PATH to avoid conflicts with a system-installed Qt6.
Usage example
Running the solver on a section model
The typical workflow is: build the input model in the GUI (or 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, e.g. one saved from the GUI
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
└── gui/ # PySide6 GUI (app.py is the `pyfiberc-gui` entry point)
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
Running the GUI from source
uv run pyfiberc-gui
Linux note: if the system
libQt6*is newer than PySide6's bundled libraries (common on recent Ubuntu/Fedora), launching Qt directly viapython -m ...can crash with symbol errors. Thepyfiberc-guientry point handles this. If you launch by another path, prepend${VIRTUAL_ENV}/lib/python*/site-packages/PySide6/Qt/libtoLD_LIBRARY_PATH.
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, the fibered ULS/SLE solvers, and the GUI on top of that foundation.
Authors
- Marco Melcarne (SYSTRA)
- Luigi Luis Paone
- Claudia Orrico (SYSTRA)
Release notes
See CHANGELOG.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfiberc-0.0.12.tar.gz.
File metadata
- Download URL: pyfiberc-0.0.12.tar.gz
- Upload date:
- Size: 157.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ab27da0bf8ac4cb127a894ed594f8a71440d799ca2cb230d5b2d9f3bca9bc88
|
|
| MD5 |
b9326a10055bfc83b646eb6abf464ecd
|
|
| BLAKE2b-256 |
f7598bb5159bed5595271f673a0aeb5a11ad02705208c0ff6ce3291a52454086
|
File details
Details for the file pyfiberc-0.0.12-py3-none-any.whl.
File metadata
- Download URL: pyfiberc-0.0.12-py3-none-any.whl
- Upload date:
- Size: 61.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed64e73a86e6a190a0e18fc89b908646ea39be2861a683f315b7345df0c39aa9
|
|
| MD5 |
72bc46772b12a134cff344b9bef745d9
|
|
| BLAKE2b-256 |
412f3250a539e5932e28e78d85bf2b02f22e0a1e3d79f480d82783faf0392719
|