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.3.tar.gz (11.2 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.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vereshchaginpy-0.1.3.tar.gz
  • Upload date:
  • Size: 11.2 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.3.tar.gz
Algorithm Hash digest
SHA256 562d64cd3519b339050da0973207e669d16dac6c507fc5e28d607a0ec1f9fbf1
MD5 2d581021ee0f7ca4254a637032756812
BLAKE2b-256 ea9d60435b15de04da737c87468d9f45137d9df283b1f62e0f43ba349377c8f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vereshchaginpy-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9573b4a817036300958af670618f37b50ec70b709251c40a8a008f20392538f3
MD5 68b127a80fa4106dfc955719eb2c04b4
BLAKE2b-256 b28900d2af57a4dc23d3e75a0a0bda1ffa11efe22b2b718f5645184acae96d4b

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