Skip to main content

A Python library for section-based moment-curvature analysis

Project description

๐Ÿ“ AnySection โ€“ Reinforced Concrete Section Analysis

License: MIT Python Version Build


๐Ÿ“Š Overview

AnySection is a Python library for reinforced concrete section analysis. It provides tools for modeling, analyzing, and visualizing the structural behavior of reinforced concrete sections using material nonlinearities and fiber-based analysis methods.

Key features include:

  • โœ… Support for Concrete_NonlinearEC2 and Steel_Bilinear material models.
  • โœ… Fiber-based moment-curvature analysis.
  • โœ… Calculation of axial forces, bending moments, and neutral axis positions.
  • โœ… Generate moment-curvature diagrams and plot section views.
  • โœ… Extensible architecture for adding custom materials and solvers.

๐Ÿ“ Project Structure

AnySection/
โ”‚
โ”œโ”€โ”€ anysection/              # Main package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ geometry/            # Geometrical objects (Area, Fiber, Points)
โ”‚   โ”‚   โ””โ”€โ”€ area.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ materials/           # Material models
โ”‚   โ”‚   โ””โ”€โ”€ material.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ sections/            # Section definitions and properties
โ”‚   โ”‚   โ””โ”€โ”€ section.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ solvers/             # Section analysis solvers
โ”‚   โ”‚   โ””โ”€โ”€ section_solver.py
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ utils/               # Utility classes (constants, helpers)
โ”‚       โ””โ”€โ”€ globals.py
โ”‚
โ”œโ”€โ”€ examples/                # Example usage
โ”‚   โ””โ”€โ”€ example1.py
โ”‚
โ”œโ”€โ”€ setup.py                 # Build configuration
โ”œโ”€โ”€ requirements.txt         # Dependencies
โ”œโ”€โ”€ README.md                 # ๐Ÿ“– You are here
โ””โ”€โ”€ LICENSE                   # MIT License

โš™๏ธ Installation

๐Ÿ”น 1. Clone the Repository

git clone https://github.com/yourusername/anysection.git
cd anysection

๐Ÿ”น 2. Install Dependencies

pip install -r requirements.txt

๐Ÿ”น 3. Install the Library Locally

pip install -e .

This installs the package in editable mode for local development.

๐Ÿงฎ Quick Start Example

import matplotlib.pyplot as plt
import numpy as np
from anysection.materials import Concrete_NonlinearEC2, Steel_Bilinear
from anysection.sections import Section
from anysection.solvers import SectionSolver

# Define Materials
concrete = Concrete_NonlinearEC2(fcm=20e6, ec1=0.002, ecu1=0.0035)  # C20/25 Concrete
steel = Steel_Bilinear(Es=200e9, fy=500e6)  # Reinforcement Steel

# Create a Section
section = Section("Rectangular Beam")
section.add_fiber(area=0.01, x=0.0, y=0.0, material=concrete)
section.add_fiber(area=0.01, x=0.1, y=0.0, material=concrete)
section.add_fiber(area=0.01, x=0.0, y=0.1, material=concrete)
section.add_fiber(area=0.01, x=0.1, y=0.1, material=concrete)

# Initialize Solver
solver = SectionSolver(section)

# Analyze Moment-Curvature
curvatures = np.linspace(0, 0.02, 100)
moments = [solver.calculate_moment_capacity(c) for c in curvatures]

# Plot Moment-Curvature Diagram
plt.plot(curvatures, moments)
plt.xlabel('Curvature (1/m)')
plt.ylabel('Moment (Nm)')
plt.title('Moment-Curvature Diagram')
plt.grid(True)
plt.show()

๐Ÿ“ Features

๐Ÿ—๏ธ Section Modeling: Fiber-based section modeling for reinforced concrete.

๐Ÿ“Š Moment-Curvature Analysis: Plot moment-curvature behavior for reinforced sections.

๐Ÿ“ Material Models:

  • Concrete_NonlinearEC2 (Nonlinear EC2 behavior for concrete)

  • Steel_Bilinear (Bilinear elastic-plastic model for reinforcement)

๐Ÿ“ˆ Customizable Solvers: Easily extend the library with new solvers and materials.

๐Ÿ› ๏ธ Contributing

Contributions are welcome! ๐Ÿš€ Feel free to fork the repository, submit issues, and create pull requests.

๐Ÿ“ข To contribute:

Fork the repository.
Create a new branch: git checkout -b feature/my-feature
Commit your changes: git commit -m 'Add new feature'
Push to the branch: git push origin feature/my-feature
Open a Pull Request โœ…

๐Ÿ“„ License

This project is licensed under the MIT License.

๐ŸŒ Links

๐Ÿ“š Documentation: Coming Soon

๐Ÿ› Issue Tracker: GitHub Issues

๐Ÿ—๏ธ PyPI: Coming Soon

Citation: If you use AnySection in your research, please cite the following paper:

Papanikolaou, Vassilis. (2019). AnySection : Software for the analysis of arbitrary composite sections in biaxial bending and axial load. 

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

anysection-1.0.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

anysection-1.0.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file anysection-1.0.0.tar.gz.

File metadata

  • Download URL: anysection-1.0.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for anysection-1.0.0.tar.gz
Algorithm Hash digest
SHA256 93bdd5c49c69dacec26b16d84b30f797f5d76df3098d3eda58a69c049eaad42a
MD5 4455f410ec8a39b93910668e6354ce42
BLAKE2b-256 f67b51add4d6100b8911e639a18367adeb4f0181b7e53e0e3a4f02d77d455c82

See more details on using hashes here.

File details

Details for the file anysection-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: anysection-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for anysection-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a62a79fc18a5b827b752493d27822bdab26f117067da6842e0c53604b5712a3d
MD5 4136354c57d6f034393e64ace0837d58
BLAKE2b-256 b5d194725281216d7f2c87596fe2f46b335e24d681cf710067d10920d5255ff8

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