Skip to main content

Graph-based integration for structural mechanics using the Vereshchagin method

Project description

VereshchaginPy

VereshchaginPy is a Python library for performing graph multiplication — particularly useful in structural mechanics when applying the flexibility method.

The integration is based on the principle that the integral from two graphs can be expressed as:

∫ Mi(x) * Mj(x) dx = A * y

Where:

  • A is the area under the first moment diagram Mi(x)
  • y is the corresponding ordinate (value) from the second moment diagram Mj(x) evaluated at the centroid of area A
  • Mi, Mj are continuous functions (e.g., moments) over a shared length L

This library helps formalize that process by abstracting common shape-based moment diagrams (rectangles, triangles, trapezoids, parabolas) and automating their integration and visualization.


Installation

Install the package via pip:

pip install vereshchaginpy

Example Usage

from vereshchaginpy import Rectangle, TriangleLeft, VereshchaginVisualiser

# Define two figures
r = Rectangle(5, 3)
t = TriangleLeft(5, 2)

# Visualize the interaction
viz = VereshchaginVisualiser()
viz.draw_situation(r, t)

# Compute the integral using the + operator
result = r + t

print(f"Result: {result}")

Features

  • Support for standard structural figure types:
    • Rectangle
    • TriangleLeft, TriangleRight
    • Trapezoid
    • Parabola
    • ParabolicTrapezoid (combining a parabola and trapezoid)
  • Clean and extendable figure model
  • Visualizer to plot and label diagrams
  • Operator overloading for quick integration via +
  • Strict input validation for type safety

Project Links


License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vereshchaginpy-0.1.4.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vereshchaginpy-0.1.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file vereshchaginpy-0.1.4.tar.gz.

File metadata

  • Download URL: vereshchaginpy-0.1.4.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for vereshchaginpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 937ad8a1b8eab11bcc71670d7562d1e9326508a9dc73ad7cc0014958333630bb
MD5 3a0eb682b94504741505de7d67dfdc35
BLAKE2b-256 c621b2013c7c19921ac1c2aca07d862259a9d6c0ab7a2c3cf8740ff41f58660f

See more details on using hashes here.

File details

Details for the file vereshchaginpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: vereshchaginpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for vereshchaginpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e56224d161973aa5d9422caf7c8f91b7bd2622a5b3bb77d9a20fffe072496bc2
MD5 acfca33db1cb42746c1d4a4f9ac1b4f1
BLAKE2b-256 eacec5bd0e2e8882d813b402309dc99f7efc393234d9c1bebb28894bd2effb7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page