Metadata-Version: 2.1
Name: horloadist
Version: 1.0.2
Summary: Calculates the horizontal load distribution on supports in the plane
Author-email: "L.Maul" <saculluam@hotmail.com>
Maintainer-email: "L.Maul" <saculluam@hotmail.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: Bug Reports, https://github.com/LuMaul/horloadist.git
Project-URL: Source, https://github.com/LuMaul/horloadist.git
Keywords: load distribution, horloadist, development, civil engineering
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: pandas

# Calculate Load Distribution In The Plane

> Caution! Do not blindly trust this calculation, but always check the plausibility of the results.

This project provides a tool for structural analysis using the `horloadist` library. You can define a 2D polygon in the x-y plane representing a plate, along with supports that represent walls and their bending stiffnesses around the x and y axes. Currently, it only works with constant stiffness values.

## Example Output

```
polyg. area           : 375.0000
polyg. centre [xm,ym] : 0.0000, 0.0000 
stiff. centre [xs,ys] : 2.4672, -4.7664
EIx total             : 9.4
EIy total             : 34.4
EIw total             : 1,937.0

   node nr     x    y  x-xm  y-ym     xm-xs       ym-ys      EIx       EIy     % EIx     % EIy    % EIwx        % EIwy
0        1 -10.0  2.5 -10.0   2.5  12.467197  -7.266411  0.01125   3.12500  0.090820  0.001193 -0.011723 -7.240963e-05
1        2 -12.5  0.0 -12.5   0.0  14.967197  -4.766411  3.12500   0.01125  0.000327  0.331345 -0.000028 -2.414713e-02
2        3 -10.0 -2.5 -10.0  -2.5  12.467197  -2.266411  0.01125   3.12500  0.090820  0.001193 -0.003656 -7.240963e-05
3        4   0.0  7.5   0.0   7.5   2.467197 -12.266411  0.01125   3.12500  0.090820  0.001193 -0.019790 -1.432951e-05
4        5   2.5 -7.5   2.5  -7.5  -0.032803   2.733589  0.02250  25.00000  0.726559  0.002386  0.035282  3.810425e-07
5        6   7.5  0.0   7.5   0.0  -5.032803  -4.766411  3.12500   0.01125  0.000327  0.331345 -0.000028  8.119605e-03
6        7  12.5  5.0  12.5   5.0 -10.032803  -9.766411  3.12500   0.01125  0.000327  0.331345 -0.000057  1.618629e-02


Fx, Fy    : 0, -1
tor. Ts,x : 0.0000
tor. Ts,y : 2.4672
tor. Ts   : 2.4672

   node nr  Vx ~ EIx  Vy ~ EIy  Vx ~ EIwx     Vy ~ EIwy        Vx        Vy
0        1       0.0 -0.001193   0.028923 -1.786488e-04 -0.028923 -0.001371
1        2       0.0 -0.331345   0.000068 -5.957571e-02 -0.000068 -0.390921
2        3       0.0 -0.001193   0.009021 -1.786488e-04 -0.009021 -0.001371
3        4       0.0 -0.001193   0.048825 -3.535372e-05 -0.048825 -0.001228
4        5       0.0 -0.002386  -0.087047  9.401069e-07  0.087047 -0.002385
5        6       0.0 -0.331345   0.000068  2.003266e-02 -0.000068 -0.311313
6        7       0.0 -0.331345   0.000140  3.993476e-02 -0.000140 -0.291411
```


## Prerequisites

- Python 3.x
- pandas
- numpy
- `horloadist` library

## Installation

install via pip:
```
pip install horloadist==1.0.2
```


## Usage

The main script demonstrates how to use the `horloadist` library to create a structural model and solve it. Here's a brief overview of the process:

1. Import necessary classes from `horloadist`:
   ```python
   from horloadist import SupportNode, Polygon, Stucture, LinSolve
   ```

2. Define helper functions for moment of inertia calculations:
   ```python
   def globalIy(dx, dy):
       # ...
    
   def globalIx(dx, dy):
       # ...
   ```

3. Create support nodes using the `SupportNode` class.
4. Define the structure's shape using the `Polygon` class.
5. Create a `Stucture` object with the defined polygon and support nodes.
6. Solve the structure using `LinSolve`.
7. Print the results.

## Example

The provided example creates a plate structure with seven support nodes and solves it for a specific load case.

```python
# Create support nodes
w1 = SupportNode(1, -10.0,  2.5, globalIx(5, 0.3), globalIy(5, 0.3))
# ... (other nodes)

# Define the plate
plate = Polygon([[-12.5,-7.5], [12.5, -7.5], [12.5, 7.5], [-12.5, 7.5]])

# Create and solve the structure
struc = Stucture(plate, [w1, w2, w3, w4, w5, w6, w7])
sol = LinSolve(struc, 0, -1)

# Print results
struc.printTable()
sol.printTable()
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
