Metadata-Version: 2.1
Name: cienpy
Version: 0.1.1
Summary: A CIvil ENgineering PYthon package
Author-email: Carmine Schipani <schipanicarmine96@gmail.com>
License: MIT License        
        Copyright (c) [year] [fullname]        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: Author, https://github.com/DonCammne
Project-URL: RESSLab, https://github.com/AlbanoCastroSousa/RESSPyLab
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bokeh (>=2.4.2)
Requires-Dist: numpy

# cienpy

The name cienpy stands for CIvil ENgineering PYthon and the package contains supporting tools for the computation of parameters and the management of interactive widgets and glyph from the library Bokeh.
At the moment, the package is focused on Structural Mechanics beacause it supports Jupyter Notebooks with interactive tools, but in the future it could be enriched with more Civil Engineering analysis and theories.

- [MIT License](https://choosealicense.com/licenses/mit/)
- [RESSLab](https://github.com/AlbanoCastroSousa/RESSPyLab)
- [Author Github Page](https://github.com/DonCammne)
- Author: Carmine Schipani


## Requirements

- [Bokeh>=2.4.2](https://pypi.org/project/bokeh/2.4.2/) (safer with version 2.4.2)
- [numpy](https://pypi.org/project/numpy/)

## Features

### Structural Mechanics
- Static system: simply supported beam
- Cross section: filled and hollow rectangular section
- Free-body diagram (FBD) with state machine
- NVM diagrams
- Deflection (only due to bending)
- Elastic and plastic analysis
- Stress and strain analysis
- Stress state element and stresses
- Torsion (uniform)
- Mohr Circle
- Buckling

### Interactive Tools (Bokeh)
- Nested-string structure and explicit function implementation for easy and quick management of Javascript codes in Python 
- Curved and double arrows
- Linspace and parabola Javascript functions
- Roller and pinned boundary condition (draws)
- Supporting tools for quick definition and modification of various glyph and widgets

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cienpy using the following prompt command.

```bash
pip install cienpy
```

## Usage

The package is normally imported with this lines:

```python
# import the desired static system
from cienpy import simplebeam as static_sys
# import the desired cross-section
from cienpy import rectangular_section as beam_section
# import supporting modules for the visualisation implementation
from cienpy import models
from cienpy import javascriptcodes as js
```

A dictionary should be created with a specific format of arrays with one entry each and keynames that depend on the functions needed. This dictionary will be used as the main source (ColumnDataSource) for the manipulation of variables bewtween widgets and glyphs in the Javascript codes.

The figures, widgets and glyphs should be initialised. 

The Javascript logics for different widgets and events should be declared.

Finally the layout is declared and executed.

Note that the functions have exhaustive description to help the user.


## Examples

Applications of the library are available in the NOTO EPFL server under the DRIL project for Structural Mechanics or in the [RESSLab](https://github.com/AlbanoCastroSousa/RESSPyLab) Github page.

## Library Status

The library is currently finished for its intended use (support for Structural Mechanics interactive tools). Future implementations are possible to extend the usage and the power of the package. 
