Skip to main content

hekatan-struct (paquete de PyPI; antes «hekatan-struct-py»)

Motor Python de Hekatan Struct. Implementa el mismo solver que el motor TypeScript/C++ (hekatan-fem): frames 3D, shells Q4, análisis modal, muelles Winkler, diafragma rígido, offsets rígidos estilo CSI — sin un Model builder: trabaja directo sobre nodes/elements/NodeInputs/ElementInputs (raw), igual que el motor JS.

Qué trae (0.1)

Elemento Función Estado de validación
DKE placa delgada (Wilson) k_dke Kirchhoff −0.02 % (16×16); = SAP2000, ETABS y el libro
DSE placa gruesa (Wilson) k_dse Mindlin +0.33 % (16×16); = libro. No = SAP2000/ETABS (CSI usa otra placa gruesa)
Membrana k_membrana_csi, k_membrana_itw = ETABS (2e-15 rel.) y SAP2000 (1e-10 %)
Drilling DOF (giro en el plano) kwargs_drilling tipos 3, 4, 7, 8, 9, 13 portados

⚠️ Del drilling no están portados el tipo 5 (burbuja de Taylor) ni el 6 (reloj de arena): lanzan error. Los casos clásicos de membrana/drilling (voladizo, Cook) aún no tienen test propio en este paquete.

Validar contra SAP2000/ETABS sin abrirlos: hekatan-csi validar (código de salida 0/1).

Instalación

pip install -e .                 # core (numpy + scipy)
pip install -e ".[viewer]"       # + PyVista 3D
pip install -e ".[sliders]"      # + ipywidgets / trame web app
pip install -e ".[dev]"          # + pytest

Uso mínimo

Leer un modelo .heks (el mismo formato que usa el resto de Hekatan Struct) y resolverlo:

from hekatan_struct.heks import leer_heks, resolver_heks

m = leer_heks("mi_modelo.heks")
res = resolver_heks(m)            # DeformOutputs: .deformations, .reactions

# Desplazamiento del nudo 1 (Ux, Uy, Uz, Rx, Ry, Rz)
print(res.deformations[1])

También se puede armar el modelo a mano, sin .heks, con la misma firma que el motor JS:

from hekatan_struct import deform, analyze, NodeInputs, ElementInputs

nodes = [(0.0, 0.0, 0.0), (0.0, 0.0, 4.0)]
elements = [[0, 1]]
ni = NodeInputs(supports={0: (True,) * 6})
ei = ElementInputs(
    elasticities={0: 2.486e7}, shear_moduli={0: 1.0e7},
    areas={0: 0.16}, moments_of_inertia_y={0: 2.13e-3},
    moments_of_inertia_z={0: 2.13e-3}, torsional_constants={0: 3.6e-3},
)
res = deform(nodes, elements, ni, ei)
out = analyze(nodes, elements, ei, res)

Extensiones (no están en el motor JS)

apply_selfweight, apply_rigid_diaphragm, apply_cardinal_point_8, apply_stiffness_modifiers, compute_picks, compare_picks — ver src/hekatan_struct/extensions.py.

Tests

Los tests importan hekatan_struct desde src/, así que hay que exponer esa ruta (o instalar el paquete en modo editable):

PYTHONPATH=src python -m pytest tests -q
PYTHONPATH=src python -m pytest tests -m "not slow" -q      # sin los lentos
PYTHONPATH=src python -m pytest tests -m validation -q      # solo cruce vs ETABS/SAP/OpenSees

En Windows PowerShell:

$env:PYTHONPATH = "src"; python -m pytest tests -q

Estado

v0.1.0 — Alpha. El oráculo de referencia es el motor TypeScript/C++ (hekatan-fem), no un motor externo: tests/test_oraculo_ts.py compara ambos nudo a nudo.

Licencia

MIT

Placas de Batoz y triángulo grueso de CSI (hekatan_struct_py.placas)

DKT (Batoz, Bathe y Ho 1980), DKQ (Batoz y Ben Tahar 1982) y el triángulo Shell-Thick de CSI (medido del binario), con K, momentos nodales (signo CSI, kN·m/m) y cortante V13/V23, en kN y m. Mismo álgebra que las hojas de Hekatan LISP 152-154.

pip install hekatan-struct                    # desde PyPI (numpy, scipy)
pip install -e hekatan-struct-py          # desde el repo
python -m hekatan_struct_py placa --tipo dkt   --nodos 0 0 2 0.5 0.5 1.5 --png dkt.png
python -m hekatan_struct_py placa --tipo thick --nodos 0 0 2 0.5 0.5 1.5 --json
python -m hekatan_struct_py placa --tipo dkq   --nodos 0 0 2 0.2 2.2 1.8 0.1 1.6 --png dkq.png --comp 1
from hekatan_struct_py.placas import k_dkt, momentos, campo_patch
P = [(0, 0), (2, 0.5), (0.5, 1.5)]
M = momentos("thick", P, 24850000, 0.2, 0.1, campo_patch(P))     # M (3×3) y V = (V13, V23)

pytest tests/test_placas_batoz.py — 17 pruebas contra SAP2000/ETABS (hojas) y contra el WASM de Struct.

Modelo multi-elemento de placas (Placa)

Malla de triángulos (DKT, thick) o cuadriláteros (DKQ), apoyos simple/empotrado, cargas nodales y de área (consistente), solve() → w, θ, reacciones, momentos nodales (signo CSI) y PNG. Usa los K validados de placas.py.

from hekatan_struct_py import Placa
p = Placa.rectangular(4, 4, 16, 16, "dkq", E=2.1e8, nu=0.3, t=0.1)     # a, b, nx, ny, tipo
p.apoyar_borde("simple")                                               # o "empotrado"
p.carga_area(-10)                                                      # kN/m2 (+w)
r = p.solve()                                                          # r["w"], r["R"], r["sumRz"]
M = p.momentos_nodales()                                               # (n×3) M11 M22 M12
p.png("w.png", "w"); p.png("m11.png", "M11")

pytest tests/test_placa_modelo.py — Navier/Timoshenko (simple 0.00406 y 0.0479; empotrada 0.00126 y 0.0231), convergencia y ΣR. Ejemplo: examples/06_placa_navier.py.

Metadata

Release files for hekatan-struct 0.1.0

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

Source distribution (sdist)

Source distribution for hekatan-struct 0.1.0
File Size Uploaded Provenance Actions
hekatan_struct-0.1.0.tar.gz 305.6 kB Without provenance Details for hekatan_struct-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hekatan-struct 0.1.0
File Interpreter ABI Platform Actions
hekatan_struct-0.1.0-py3-none-any.whl Python 3 none any Details for hekatan_struct-0.1.0-py3-none-any.whl

Total release size: 543.7 kB

Release files / hekatan_struct-0.1.0.tar.gz

Download URL hekatan_struct-0.1.0.tar.gz
Size 305.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cbc6f8ad278200bb1eed697687660bdff8816821906231fd43fd515162c8428a
BLAKE2b-256 checksum
How to use checksums
1b6f222e428f37a97b4acfd32845bfc5ae6acd4e8f6a6e83cc741c1babbed29f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / hekatan_struct-0.1.0-py3-none-any.whl

Download URL hekatan_struct-0.1.0-py3-none-any.whl
Size 238.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57ddc6c208c77d458ced04acfb7ebd94116cc5e55fe6903ea85a8fe3d0702f42
BLAKE2b-256 checksum
How to use checksums
0673352a3709612d89776068aca52333702a0f6eeb3329b19c45fe92c6227218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Security for hekatan-struct 0.1.0

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.1.0 This release

2 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