# opensection - Professional Concrete Section Analysis
<div align="center">
**A Python library for structural concrete section analysis according to Eurocodes**
[](https://pypi.org/project/opensection/)
[](https://pypi.org/project/opensection/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/Pavlishenku/opensection/actions)
[](https://codecov.io/gh/Pavlishenku/opensection)
[](https://opensection.readthedocs.io/en/latest/?badge=latest)
[English](README.md) | [FranΓ§ais](README_FR.md)
</div>
---
## β¨ 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)
```bash
pip install opensection
```
### From source
```bash
git clone https://github.com/Pavlishenku/opensection.git
cd opensection
pip install -e .
```
### Development installation
```bash
git clone https://github.com/Pavlishenku/opensection.git
cd opensection
pip install -e ".[dev]"
```
## π Quick Start
```python
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](https://opensection.readthedocs.io)
- [User Guide](https://opensection.readthedocs.io/en/latest/user_guide/index.html)
- [API Reference](https://opensection.readthedocs.io/en/latest/api/index.html)
- [Examples](https://opensection.readthedocs.io/en/latest/examples/index.html)
- [Theory](https://opensection.readthedocs.io/en/latest/theory/index.html)
## π‘ Examples
Check out the [examples](examples/) directory for more detailed use cases:
- [Basic section analysis](examples/example_basic.py)
- [Interaction diagrams](examples/example_interaction_diagram.py)
- [Custom sections](examples/example_custom_sections.py)
- [Biaxial bending](examples/example_biaxial_bending.py)
- [Circular columns](examples/example_circular_column.py)
- [T-beam design](examples/example_t_beam_design.py)
## π οΈ Development
### Setting up development environment
```bash
# 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
```bash
# Run all tests
pytest
# Run with coverage
pytest --cov=opensection --cov-report=html
# Run specific test file
pytest tests/test_geometry.py
```
### Code quality
```bash
# 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](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](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](https://github.com/Pavlishenku/opensection/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Pavlishenku/opensection/discussions)
## πΊοΈ Roadmap
- [x] Basic section analysis (EC2)
- [x] 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:
```bibtex
@software{opensection2025,
  author = {opensection Contributors},
  title = {opensection: Professional Concrete Section Analysis},
  year = {2025},
  url = {https://github.com/Pavlishenku/opensection},
  version = {1.0.0}
}
```
---
<div align="center">
**Made with β€οΈ by the opensection community**
[β Star us on GitHub](https://github.com/Pavlishenku/opensection) | [π Read the docs](https://opensection.readthedocs.io) | [π¬ Join the discussion](https://github.com/Pavlishenku/opensection/discussions)
</div>
            
         
        Raw data
        
            {
    "_id": null,
    "home_page": null,
    "name": "opensection",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "opensection Contributors <pavlishenku@gmail.com>",
    "keywords": "structural-engineering, concrete-design, eurocode, civil-engineering, finite-element, building-design, scientific-computing",
    "author": null,
    "author_email": "opensection Contributors <pavlishenku@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/5f/a8/54d639b4e9b7284eac193d88b056d84ff30c6dbe98be9ba74fb547398645/opensection-1.0.0.tar.gz",
    "platform": null,
    "description": "# opensection - Professional Concrete Section Analysis\r\n\r\n<div align=\"center\">\r\n\r\n**A Python library for structural concrete section analysis according to Eurocodes**\r\n\r\n[](https://pypi.org/project/opensection/)\r\n[](https://pypi.org/project/opensection/)\r\n[](https://opensource.org/licenses/MIT)\r\n[](https://github.com/Pavlishenku/opensection/actions)\r\n[](https://codecov.io/gh/Pavlishenku/opensection)\r\n[](https://opensection.readthedocs.io/en/latest/?badge=latest)\r\n\r\n[English](README.md) | [Fran\u00e7ais](README_FR.md)\r\n\r\n</div>\r\n\r\n---\r\n\r\n## \u2728 Features\r\n\r\n- **Eurocode-compliant**: Full support for EN 1992 (Eurocode 2) for concrete structures\r\n- **Fiber-based analysis**: Advanced section analysis using fiber discretization\r\n- **Material models**: Comprehensive constitutive laws for concrete and reinforcing steel\r\n- **Interaction diagrams**: Generate N-M interaction diagrams for sections\r\n- **Flexible geometry**: Support for rectangular, circular, T-sections, and custom polygons\r\n- **Visualization**: Built-in tools for plotting sections and results\r\n- **Fast**: Optimized NumPy-based computations\r\n- **Extensible**: Clean API for advanced users and researchers\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n### From PyPI (recommended)\r\n\r\n```bash\r\npip install opensection\r\n```\r\n\r\n### From source\r\n\r\n```bash\r\ngit clone https://github.com/Pavlishenku/opensection.git\r\ncd opensection\r\npip install -e .\r\n```\r\n\r\n### Development installation\r\n\r\n```bash\r\ngit clone https://github.com/Pavlishenku/opensection.git\r\ncd opensection\r\npip install -e \".[dev]\"\r\n```\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n```python\r\nimport opensection as ops\r\n\r\n# Define a rectangular concrete section\r\nsection = ops.RectangularSection(width=0.3, height=0.5)\r\n\r\n# Define materials (Eurocode 2)\r\nconcrete = ops.ConcreteEC2(fck=30)  # C30/37\r\nsteel = ops.SteelEC2(fyk=500)       # B500B\r\n\r\n# Add reinforcement\r\nrebars = ops.RebarGroup()\r\nrebars.add_rebar(y=0.0, z=-0.20, diameter=0.020, n=3)  # 3\u00d820 bottom\r\nrebars.add_rebar(y=0.0, z=0.20, diameter=0.016, n=2)   # 2\u00d816 top\r\n\r\n# Create solver and analyze\r\nsolver = ops.SectionSolver(section, concrete, steel, rebars)\r\nresult = solver.solve(N=500, My=0, Mz=100)  # N in kN, M in kN\u00b7m\r\n\r\n# Check results\r\nprint(f\"Converged: {result.converged}\")\r\nprint(f\"Max concrete stress: {result.sigma_c_max:.2f} MPa\")\r\nprint(f\"Max steel stress: {result.sigma_s_max:.2f} MPa\")\r\n\r\n# Verify according to EC2\r\nchecks = ops.EC2Verification.check_ULS(result, concrete.fcd, steel.fyd)\r\nprint(f\"Concrete check: {'OK' if checks['concrete_stress']['ok'] else 'FAIL'}\")\r\nprint(f\"Steel check: {'OK' if checks['steel_stress']['ok'] else 'FAIL'}\")\r\n```\r\n\r\n## \ud83d\udcda Documentation\r\n\r\nFull documentation is available at [opensection.readthedocs.io](https://opensection.readthedocs.io)\r\n\r\n- [User Guide](https://opensection.readthedocs.io/en/latest/user_guide/index.html)\r\n- [API Reference](https://opensection.readthedocs.io/en/latest/api/index.html)\r\n- [Examples](https://opensection.readthedocs.io/en/latest/examples/index.html)\r\n- [Theory](https://opensection.readthedocs.io/en/latest/theory/index.html)\r\n\r\n## \ud83d\udca1 Examples\r\n\r\nCheck out the [examples](examples/) directory for more detailed use cases:\r\n\r\n- [Basic section analysis](examples/example_basic.py)\r\n- [Interaction diagrams](examples/example_interaction_diagram.py)\r\n- [Custom sections](examples/example_custom_sections.py)\r\n- [Biaxial bending](examples/example_biaxial_bending.py)\r\n- [Circular columns](examples/example_circular_column.py)\r\n- [T-beam design](examples/example_t_beam_design.py)\r\n\r\n## \ud83d\udee0\ufe0f Development\r\n\r\n### Setting up development environment\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/Pavlishenku/opensection.git\r\ncd opensection\r\n\r\n# Create virtual environment\r\npython -m venv venv\r\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\r\n\r\n# Install development dependencies\r\npip install -e \".[dev]\"\r\n```\r\n\r\n### Running tests\r\n\r\n```bash\r\n# Run all tests\r\npytest\r\n\r\n# Run with coverage\r\npytest --cov=opensection --cov-report=html\r\n\r\n# Run specific test file\r\npytest tests/test_geometry.py\r\n```\r\n\r\n### Code quality\r\n\r\n```bash\r\n# Format code\r\nblack src/ tests/\r\n\r\n# Sort imports\r\nisort src/ tests/\r\n\r\n# Lint\r\nflake8 src/ tests/\r\n\r\n# Type checking\r\nmypy src/\r\n```\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on:\r\n\r\n- Code of conduct\r\n- Development process\r\n- Submitting pull requests\r\n- Coding standards\r\n- Testing requirements\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n- Inspired by the need for open-source structural design tools\r\n- Based on Eurocode 2 (EN 1992-1-1) specifications\r\n- Built with NumPy and Matplotlib\r\n\r\n## \ud83d\udcde Contact & Support\r\n\r\n- **Issues**: [GitHub Issues](https://github.com/Pavlishenku/opensection/issues)\r\n- **Discussions**: [GitHub Discussions](https://github.com/Pavlishenku/opensection/discussions)\r\n\r\n## \ud83d\uddfa\ufe0f Roadmap\r\n\r\n- [x] Basic section analysis (EC2)\r\n- [x] Interaction diagrams\r\n- [ ] Support for ACI 318 (US code)\r\n- [ ] Support for GB 50010 (Chinese code)\r\n- [ ] Time-dependent effects (creep, shrinkage)\r\n- [ ] Crack width calculations\r\n- [ ] Deflection analysis\r\n- [ ] Web interface\r\n- [ ] CAD integration (DXF import/export)\r\n\r\n## \ud83d\udcd6 Citation\r\n\r\nIf you use opensection in academic work, please cite:\r\n\r\n```bibtex\r\n@software{opensection2025,\r\n  author = {opensection Contributors},\r\n  title = {opensection: Professional Concrete Section Analysis},\r\n  year = {2025},\r\n  url = {https://github.com/Pavlishenku/opensection},\r\n  version = {1.0.0}\r\n}\r\n```\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n\r\n**Made with \u2764\ufe0f by the opensection community**\r\n\r\n[\u2b50 Star us on GitHub](https://github.com/Pavlishenku/opensection) | [\ud83d\udcd6 Read the docs](https://opensection.readthedocs.io) | [\ud83d\udcac Join the discussion](https://github.com/Pavlishenku/opensection/discussions)\r\n\r\n</div>\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Professional concrete section analysis - Structural concrete design according to Eurocodes",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Pavlishenku/opensection/issues",
        "Changelog": "https://github.com/Pavlishenku/opensection/blob/main/CHANGELOG.md",
        "Documentation": "https://opensection.readthedocs.io",
        "Homepage": "https://github.com/Pavlishenku/opensection",
        "Repository": "https://github.com/Pavlishenku/opensection"
    },
    "split_keywords": [
        "structural-engineering",
        " concrete-design",
        " eurocode",
        " civil-engineering",
        " finite-element",
        " building-design",
        " scientific-computing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5d5515eb8a7ff0878d2c0e8c6a2e68ffeb27cf57d2b3b5de376a61927aa7c4f1",
                "md5": "b2604d34ae4153a47d09a8bbe5ba03b4",
                "sha256": "1c878ac3846d5ba546e6b8a5fbe59b81dd50bc5b418c1b2c63d9c41577b92867"
            },
            "downloads": -1,
            "filename": "opensection-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2604d34ae4153a47d09a8bbe5ba03b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 41782,
            "upload_time": "2025-10-24T20:01:43",
            "upload_time_iso_8601": "2025-10-24T20:01:43.399726Z",
            "url": "https://files.pythonhosted.org/packages/5d/55/15eb8a7ff0878d2c0e8c6a2e68ffeb27cf57d2b3b5de376a61927aa7c4f1/opensection-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5fa854d639b4e9b7284eac193d88b056d84ff30c6dbe98be9ba74fb547398645",
                "md5": "43c1fddcd46a18e0c38117476d41c220",
                "sha256": "a167d260de5c39ccd5430e48b31d574e000654aaa069e286c73696a80e93e3a0"
            },
            "downloads": -1,
            "filename": "opensection-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "43c1fddcd46a18e0c38117476d41c220",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 61589,
            "upload_time": "2025-10-24T20:01:48",
            "upload_time_iso_8601": "2025-10-24T20:01:48.875228Z",
            "url": "https://files.pythonhosted.org/packages/5f/a8/54d639b4e9b7284eac193d88b056d84ff30c6dbe98be9ba74fb547398645/opensection-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-24 20:01:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Pavlishenku",
    "github_project": "opensection",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.20.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.3.0"
                ]
            ]
        }
    ],
    "lcname": "opensection"
}