3pc-lamfail 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 3pc_lamfail-1.0.0.dist-info/METADATA +132 -0
- 3pc_lamfail-1.0.0.dist-info/RECORD +15 -0
- 3pc_lamfail-1.0.0.dist-info/WHEEL +5 -0
- 3pc_lamfail-1.0.0.dist-info/entry_points.txt +2 -0
- 3pc_lamfail-1.0.0.dist-info/licenses/LICENSE +21 -0
- 3pc_lamfail-1.0.0.dist-info/top_level.txt +1 -0
- lamfail/CONSTANTS.py +3 -0
- lamfail/__init__.py +0 -0
- lamfail/__main__.py +6 -0
- lamfail/expiry_wrapper.py +8 -0
- lamfail/lamfail.py +1479 -0
- lamfail/lamfailIO.py +1170 -0
- lamfail/main.py +57 -0
- lamfail/tests/__init__.py +0 -0
- lamfail/tests/test_lamfail.py +113 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: 3pc-lamfail
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: 3pc Python Package for Anisotropic Laminate Failure Analysis
|
|
5
|
+
Author: Omprakash Seresta
|
|
6
|
+
Author-email: oseresta@gmail.com
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: 3pc-material
|
|
15
|
+
Requires-Dist: 3pc-ply
|
|
16
|
+
Requires-Dist: 3pc-laminate
|
|
17
|
+
Requires-Dist: 3pc-panel
|
|
18
|
+
Requires-Dist: 3pc-loads
|
|
19
|
+
Requires-Dist: 3pc-utils
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: requires-dist
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
Dynamic: summary
|
|
31
|
+
|
|
32
|
+
# 3pc-lamfail
|
|
33
|
+
|
|
34
|
+
`3pc-lamfail` is a Python library used for ply-wise stress and strain analysis of shear deformable anisotropic laminates under hygrothermal and mechanical loads. It provides a `Lamfail` class to calculate stresses, strains, and various margins of safety (MS) based on classical and first-order shear deformation theories.
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `3pc-lamfail`. Since the package and its dependencies are available on PyPI, you can install them directly:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install 3pc-lamfail
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## API Reference
|
|
45
|
+
|
|
46
|
+
### `Lamfail` Class
|
|
47
|
+
|
|
48
|
+
The primary component of this package is the `Lamfail` class, which takes a panel and a load case to compute detailed failure metrics.
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from lamfail.lamfail import Lamfail
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Required Parameters
|
|
55
|
+
|
|
56
|
+
When initializing `Lamfail`, the following parameters are required:
|
|
57
|
+
|
|
58
|
+
* **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) containing the laminate definition and geometry.
|
|
59
|
+
* **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the load case and environmental conditions.
|
|
60
|
+
|
|
61
|
+
#### Calculated Properties
|
|
62
|
+
|
|
63
|
+
The class automatically calculates the following properties lazily:
|
|
64
|
+
|
|
65
|
+
* **`NT`, `MT`**: Thermal in-plane loads and moments.
|
|
66
|
+
* **`NC`, `MC`**: Hygral in-plane loads and moments.
|
|
67
|
+
* **`ek0`**: Mid-plane strains and curvatures `[ex0, ey0, gxy0, kx0, ky0, kxy0]`.
|
|
68
|
+
* **`gT0`**: Mid-plane transverse strains `[gyz0, gxz0]`.
|
|
69
|
+
* **`tauyz`, `tauxz`**: Transverse shear stresses for each ply.
|
|
70
|
+
* **`stress`**: Total stress in reference coordinate axes (x-y-z) for each ply (bottom, mid, top).
|
|
71
|
+
* **`stressM`, `stressT`, `stressH`**: Mechanical, thermal, and hygral components of stress in reference axes.
|
|
72
|
+
* **`stress1`, `stressM1`, `stressT1`, `stressH1`**: Stresses transformed to material coordinate axes (1-2-3).
|
|
73
|
+
* **`strain`, `strainM`, `strainT`, `strainH`**: Strains in reference coordinate axes.
|
|
74
|
+
* **`strain1`, `strainM1`, `strainT1`, `strainH1`**: Strains in material coordinate axes.
|
|
75
|
+
|
|
76
|
+
#### Margins of Safety (MS)
|
|
77
|
+
|
|
78
|
+
The following failure theories are implemented:
|
|
79
|
+
|
|
80
|
+
* **`stress1MS`**: Max Stress theory using total stress.
|
|
81
|
+
* **`stressM1MS`**: Max Stress theory using mechanical stress.
|
|
82
|
+
* **`strain1MS`**: Max Strain theory using total strain.
|
|
83
|
+
* **`strainM1MS`**: Max Strain theory using mechanical strain.
|
|
84
|
+
* **`tsaiHill1MS`, `tsaiHillM1MS`**: Tsai-Hill failure theory (Total/Mechanical).
|
|
85
|
+
* **`tsaiWu1MS`, `tsaiWuM1MS`**: Tsai-Wu failure theory (Total/Mechanical).
|
|
86
|
+
|
|
87
|
+
### Methods
|
|
88
|
+
|
|
89
|
+
#### `Lamfail.fromDict(**kwargs)`
|
|
90
|
+
|
|
91
|
+
Initializes a `Lamfail` instance using a dictionary of keyword arguments.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Usage Examples
|
|
96
|
+
|
|
97
|
+
### Basic Initialization
|
|
98
|
+
|
|
99
|
+
Below is an example of performing a failure analysis on a panel under a specific load case.
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from panel.panel import Panel
|
|
103
|
+
from loads.loads import Loads
|
|
104
|
+
from lamfail.lamfail import Lamfail
|
|
105
|
+
|
|
106
|
+
# Assuming pnl (Panel) and ld (Loads) are already defined
|
|
107
|
+
lf = Lamfail(panel=pnl, loads=ld)
|
|
108
|
+
|
|
109
|
+
# Access Margins of Safety for Ply 1 (bottom ply)
|
|
110
|
+
print("Max Stress MS (Material Axes):", lf.stress1MS["1"]["mid"])
|
|
111
|
+
print("Tsai-Wu MS:", lf.tsaiWu1MS["1"]["mid"])
|
|
112
|
+
|
|
113
|
+
# Access stresses
|
|
114
|
+
print("Total Stress (x-y-z):", lf.stress["1"]["top"])
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Commands
|
|
118
|
+
|
|
119
|
+
The package provides a command-line interface entry point. After installing, you can run the application using:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
lamfail input.cfg
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
*(This entry point is defined in `lamfail.__main__:main`)*
|
|
126
|
+
|
|
127
|
+
### Options
|
|
128
|
+
|
|
129
|
+
* **`config`** *(positional)*: Specify the configuration file (`.cfg`) to run the analysis.
|
|
130
|
+
* **`-h, --help`**: Show the help message and exit.
|
|
131
|
+
* **`-v, --version`**: Show the version number.
|
|
132
|
+
* **`-s, --sample`**: Copy example files (materials, plies, laminates, etc.) to the current directory.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
3pc_lamfail-1.0.0.dist-info/licenses/LICENSE,sha256=2KMUaPkoYr_QP6rwqzCgBScHF4slPuma2kWSD24cDQo,1074
|
|
2
|
+
lamfail/CONSTANTS.py,sha256=mbfFDvfqjNZkieA1BCmqhgi14k-0BSiLZwnRooM-M8s,45
|
|
3
|
+
lamfail/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
lamfail/__main__.py,sha256=xOKdSbE-dQbAnX5OyquQdEo_yTthZnF0AK9kQcIRr7o,138
|
|
5
|
+
lamfail/expiry_wrapper.py,sha256=ljlztXSesfeCjIgrBcHdqpijIAHAKCqJstVd5Pr98hI,206
|
|
6
|
+
lamfail/lamfail.py,sha256=SuaocQa99Oe_qSkbJncN18dSwU4fLyVysQlSYgLt-Ww,49489
|
|
7
|
+
lamfail/lamfailIO.py,sha256=U19RbkPk2sjZIA_0BLuf4n27SrehzEKEXNFSR5A6pVY,60031
|
|
8
|
+
lamfail/main.py,sha256=vwBb0lrykL4HMFxS3ym4pQbNmLw-9EDojDNcN5RheF4,2134
|
|
9
|
+
lamfail/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
lamfail/tests/test_lamfail.py,sha256=7_JKEmlAuPbFciFzx5IssFIW85ngZSpDAGatDoNcadg,4474
|
|
11
|
+
3pc_lamfail-1.0.0.dist-info/METADATA,sha256=uZqLyqudSB7qC_2MAQivLY0NkXuIaxxvN9IjOYCvGFU,4635
|
|
12
|
+
3pc_lamfail-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
13
|
+
3pc_lamfail-1.0.0.dist-info/entry_points.txt,sha256=ySe516FFlDU8lU7jONooLiLDx9jQCoFHi0fT5Loa0YM,46
|
|
14
|
+
3pc_lamfail-1.0.0.dist-info/top_level.txt,sha256=-ikqJrClQ5v6AmHJkqTsaSS3P5q_-u7PIr0myjrB66s,8
|
|
15
|
+
3pc_lamfail-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Omprakash Seresta
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lamfail
|
lamfail/CONSTANTS.py
ADDED
lamfail/__init__.py
ADDED
|
File without changes
|
lamfail/__main__.py
ADDED