opensection - Professional Concrete Section Analysis
✨ Features
- Eurocode-compliant: Full support for EN 1992 (Eurocode 2) for concrete structures
- Fiber-based analysis: Advanced section analysis using fiber discretization
- Material models: Comprehensive constitutive laws for concrete and reinforcing steel
- Interaction diagrams: Generate N-M interaction diagrams for sections
- Flexible geometry: Support for rectangular, circular, T-sections, and custom polygons
- Visualization: Built-in tools for plotting sections and results
- Fast: Optimized NumPy-based computations
- Extensible: Clean API for advanced users and researchers
📦 Installation
From PyPI (recommended)
pip install opensection
From source
git clone https://github.com/Pavlishenku/opensection.git
cd opensection
pip install -e .
Development installation
git clone https://github.com/Pavlishenku/opensection.git
cd opensection
pip install -e ".[dev]"
🚀 Quick Start
import opensection as ops
# Define a rectangular concrete section
section = ops.RectangularSection(width=0.3, height=0.5)
# Define materials (Eurocode 2)
concrete = ops.ConcreteEC2(fck=30) # C30/37
steel = ops.SteelEC2(fyk=500) # B500B
# Add reinforcement
rebars = ops.RebarGroup()
rebars.add_rebar(y=0.0, z=-0.20, diameter=0.020, n=3) # 3Ø20 bottom
rebars.add_rebar(y=0.0, z=0.20, diameter=0.016, n=2) # 2Ø16 top
# Create solver and analyze
solver = ops.SectionSolver(section, concrete, steel, rebars)
result = solver.solve(N=500, My=0, Mz=100) # N in kN, M in kN·m
# Check results
print(f"Converged: {result.converged}")
print(f"Max concrete stress: {result.sigma_c_max:.2f} MPa")
print(f"Max steel stress: {result.sigma_s_max:.2f} MPa")
# Verify according to EC2
checks = ops.EC2Verification.check_ULS(result, concrete.fcd, steel.fyd)
print(f"Concrete check: {'OK' if checks['concrete_stress']['ok'] else 'FAIL'}")
print(f"Steel check: {'OK' if checks['steel_stress']['ok'] else 'FAIL'}")
📚 Documentation
Full documentation is available at opensection.readthedocs.io
💡 Examples
Check out the examples directory for more detailed use cases:
- Basic section analysis
- Interaction diagrams
- Custom sections
- Biaxial bending
- Circular columns
- T-beam design
🛠️ Development
Setting up development environment
# Clone the repository
git clone https://github.com/Pavlishenku/opensection.git
cd opensection
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
Running tests
# Run all tests
pytest
# Run with coverage
pytest --cov=opensection --cov-report=html
# Run specific test file
pytest tests/test_geometry.py
Code quality
# Format code
black src/ tests/
# Sort imports
isort src/ tests/
# Lint
flake8 src/ tests/
# Type checking
mypy src/
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on:
- Code of conduct
- Development process
- Submitting pull requests
- Coding standards
- Testing requirements
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Inspired by the need for open-source structural design tools
- Based on Eurocode 2 (EN 1992-1-1) specifications
- Built with NumPy and Matplotlib
📞 Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
🗺️ Roadmap
- Basic section analysis (EC2)
- Interaction diagrams
- Support for ACI 318 (US code)
- Support for GB 50010 (Chinese code)
- Time-dependent effects (creep, shrinkage)
- Crack width calculations
- Deflection analysis
- Web interface
- CAD integration (DXF import/export)
📖 Citation
If you use opensection in academic work, please cite:
@software{opensection2025,
author = {opensection Contributors},
title = {opensection: Professional Concrete Section Analysis},
year = {2025},
url = {https://github.com/Pavlishenku/opensection},
version = {1.0.0}
}
Made with ❤️ by the opensection community
⭐ Star us on GitHub | 📖 Read the docs | 💬 Join the discussion
Release files for opensection 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opensection-1.0.0.tar.gz | 61.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opensection-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 103.4 kB
Release files / opensection-1.0.0.tar.gz
| Download URL | opensection-1.0.0.tar.gz |
|---|---|
| Size | 61.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a167d260de5c39ccd5430e48b31d574e000654aaa069e286c73696a80e93e3a0
|
|
BLAKE2b-256 checksum How to use checksums |
5fa854d639b4e9b7284eac193d88b056d84ff30c6dbe98be9ba74fb547398645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / opensection-1.0.0-py3-none-any.whl
| Download URL | opensection-1.0.0-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c878ac3846d5ba546e6b8a5fbe59b81dd50bc5b418c1b2c63d9c41577b92867
|
|
BLAKE2b-256 checksum How to use checksums |
5d5515eb8a7ff0878d2c0e8c6a2e68ffeb27cf57d2b3b5de376a61927aa7c4f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|