lamkit 0.1.2__tar.gz → 0.1.3__tar.gz
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.
- {lamkit-0.1.2 → lamkit-0.1.3}/.gitignore +36 -33
- {lamkit-0.1.2 → lamkit-0.1.3}/LICENSE +21 -21
- {lamkit-0.1.2 → lamkit-0.1.3}/MANIFEST.in +3 -3
- {lamkit-0.1.2 → lamkit-0.1.3}/PKG-INFO +8 -1
- {lamkit-0.1.2 → lamkit-0.1.3}/README.md +104 -98
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/Makefile +16 -16
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/_static/.gitkeep +1 -1
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/_templates/.gitkeep +1 -1
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/api.rst +77 -69
- lamkit-0.1.3/docs/conf.py +60 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/examples.rst +46 -40
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/index.rst +20 -19
- lamkit-0.1.3/docs/installation.rst +52 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/make.bat +20 -20
- {lamkit-0.1.2 → lamkit-0.1.3}/docs/quickstart.rst +84 -55
- lamkit-0.1.3/docs/requirements.txt +8 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/1-laminate/example_laminate.py +316 -316
- lamkit-0.1.3/example/2-lekhnitskii-solution/example_loaded_hole.py +295 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/example_unloaded_hole.py +283 -283
- lamkit-0.1.3/example/2-lekhnitskii-solution/images/loaded_hole_1.png +0 -0
- lamkit-0.1.3/example/2-lekhnitskii-solution/images/loaded_hole_2.png +0 -0
- lamkit-0.1.3/example/2-lekhnitskii-solution/images/loaded_hole_3.png +0 -0
- lamkit-0.1.3/example/2-lekhnitskii-solution/images/loaded_hole_4.png +0 -0
- lamkit-0.1.3/example/2-lekhnitskii-solution/images/loaded_hole_5.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/3-open-hole/example_open_hole.py +389 -395
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/example_effective_stiffness.py +318 -318
- {lamkit-0.1.2 → lamkit-0.1.3}/example/5-laminate-buckling/example_buckling.py +65 -65
- {lamkit-0.1.2 → lamkit-0.1.3}/example/6-laminate-optimization-task/example_laminate_opt_function.py +246 -246
- {lamkit-0.1.2 → lamkit-0.1.3}/example/6-laminate-optimization-task/output.txt +38 -38
- {lamkit-0.1.2 → lamkit-0.1.3}/example/7-layup-feasibility/example_layup_feasibility.py +47 -47
- {lamkit-0.1.2 → lamkit-0.1.3}/example/7-layup-feasibility/output.txt +12 -12
- lamkit-0.1.3/example/8-loaded-hole/example_loaded_hole.py +403 -0
- lamkit-0.1.3/example/8-loaded-hole/images/loaded_hole_face.png +0 -0
- lamkit-0.1.3/example/8-loaded-hole/images/loaded_hole_field.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/pyproject.toml +62 -61
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/__init__.py +20 -20
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/analysis/buckling.py +406 -406
- lamkit-0.1.3/src/lamkit/analysis/failure.py +34 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/analysis/laminate.py +15 -12
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/analysis/larc05.py +106 -188
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/analysis/material.py +333 -325
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/_S.py +2563 -2563
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/_ii_F.py +5429 -5429
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/build_k.py +192 -192
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/build_layup_database.py +336 -336
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/functions.py +68 -68
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/write_pre_integrated_terms.py +118 -118
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/write_shape_function.py +95 -95
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/layup/feasibility.py +161 -133
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/layup/requirements.py +1 -1
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/__init__.py +22 -22
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/hole.py +400 -400
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/homogenisation.py +237 -237
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/loaded_hole.py +405 -405
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/unloaded_hole.py +258 -258
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/lekhnitskii/utils.py +162 -162
- lamkit-0.1.3/src/lamkit/utils.py +365 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/conftest.py +5 -5
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_additional_coverage.py +197 -197
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_buckling.py +64 -64
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_laminate.py +147 -147
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_larc05.py +19 -19
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_lekhnitskii.py +73 -73
- {lamkit-0.1.2 → lamkit-0.1.3}/tests/test_material.py +39 -39
- lamkit-0.1.2/docs/conf.py +0 -31
- lamkit-0.1.2/docs/installation.rst +0 -39
- lamkit-0.1.2/docs/requirements.txt +0 -3
- lamkit-0.1.2/src/lamkit/utils.py +0 -207
- {lamkit-0.1.2 → lamkit-0.1.3}/example/1-laminate/images/laminate_bending_0-90-90-0.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/1-laminate/images/laminate_membrane_0-90-90-0.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/1-laminate/images/laminate_membrane_45-pm45-symmetric.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_1.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_2.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_3.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_4.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_5.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/2-lekhnitskii-solution/images/open_hole_6.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/3-open-hole/images/open_hole_face.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/3-open-hole/images/open_hole_field.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_displacements-1.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_displacements-2.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_displacements-3.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_displacements-4.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_homogenisation-1.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_homogenisation-2.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_homogenisation-3.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/4-effective-stiffness/images/open_hole_homogenisation-4.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/example/5-laminate-buckling/images/buckling_modes.png +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/analysis/__init__.py +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/components/__init__.py +0 -0
- {lamkit-0.1.2 → lamkit-0.1.3}/src/lamkit/layup/__init__.py +0 -0
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
# Python cache and bytecode
|
|
2
|
-
__pycache__/
|
|
3
|
-
*.py[cod]
|
|
4
|
-
*.pyo
|
|
5
|
-
|
|
6
|
-
# Packaging artifacts
|
|
7
|
-
build/
|
|
8
|
-
dist/
|
|
9
|
-
*.egg-info/
|
|
10
|
-
.eggs/
|
|
11
|
-
|
|
12
|
-
# Virtual environments
|
|
13
|
-
.venv/
|
|
14
|
-
venv/
|
|
15
|
-
env/
|
|
16
|
-
|
|
17
|
-
# Test and tooling cache
|
|
18
|
-
.pytest_cache/
|
|
19
|
-
.mypy_cache/
|
|
20
|
-
.ruff_cache/
|
|
21
|
-
.coverage
|
|
22
|
-
htmlcov/
|
|
23
|
-
|
|
24
|
-
# Sphinx docs build output
|
|
25
|
-
docs/_build/
|
|
26
|
-
|
|
27
|
-
# IDE
|
|
28
|
-
.idea/
|
|
29
|
-
.vscode/
|
|
30
|
-
|
|
31
|
-
# Data
|
|
32
|
-
|
|
33
|
-
data/
|
|
1
|
+
# Python cache and bytecode
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
|
|
6
|
+
# Packaging artifacts
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# Test and tooling cache
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# Sphinx docs build output
|
|
25
|
+
docs/_build/
|
|
26
|
+
|
|
27
|
+
# IDE
|
|
28
|
+
.idea/
|
|
29
|
+
.vscode/
|
|
30
|
+
|
|
31
|
+
# Data
|
|
32
|
+
|
|
33
|
+
data/
|
|
34
|
+
|
|
35
|
+
# For coding/testing purposes
|
|
36
|
+
old/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Runze LI
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Runze LI
|
|
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.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
include README.md
|
|
2
|
-
include LICENSE
|
|
3
|
-
recursive-include docs *.rst *.md *.py *.txt
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
recursive-include docs *.rst *.md *.py *.txt
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lamkit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Toolkit for stress analysis and failure prediction of composite laminates with holes and joints.
|
|
5
5
|
Project-URL: Homepage, https://github.com/swayli94/lamkit
|
|
6
6
|
Project-URL: Documentation, https://swayli94.github.io/lamkit/
|
|
@@ -52,6 +52,7 @@ Requires-Dist: twine>=5.1; extra == 'dev'
|
|
|
52
52
|
Provides-Extra: docs
|
|
53
53
|
Requires-Dist: furo>=2024.8.6; extra == 'docs'
|
|
54
54
|
Requires-Dist: myst-parser>=4.0; extra == 'docs'
|
|
55
|
+
Requires-Dist: scipy>=1.10; extra == 'docs'
|
|
55
56
|
Requires-Dist: sphinx>=8.0; extra == 'docs'
|
|
56
57
|
Description-Content-Type: text/markdown
|
|
57
58
|
|
|
@@ -65,6 +66,7 @@ Description-Content-Type: text/markdown
|
|
|
65
66
|
- Open-hole plate's effective (homogenisation) properties
|
|
66
67
|
- Linear buckling analysis of laminates
|
|
67
68
|
- Objective/constraint evaluation for laminate optimization tasks
|
|
69
|
+
- Layup engineering-requirement checks and feasibility rating against a layup attribute database
|
|
68
70
|
|
|
69
71
|
## Installation
|
|
70
72
|
|
|
@@ -72,6 +74,7 @@ Description-Content-Type: text/markdown
|
|
|
72
74
|
|
|
73
75
|
- Python `>=3.9`
|
|
74
76
|
- Core dependencies: `numpy`, `pandas`, `matplotlib`
|
|
77
|
+
- Optional: `scipy` (linear buckling and layup feasibility rating)
|
|
75
78
|
|
|
76
79
|
### Install from PyPI
|
|
77
80
|
|
|
@@ -133,6 +136,10 @@ The `example/` directory contains runnable scripts:
|
|
|
133
136
|
`example/6-laminate-optimization-task/example_laminate_opt_function.py`
|
|
134
137
|
Demonstrates combined displacement, failure, and buckling constraint evaluation for design tasks.
|
|
135
138
|
|
|
139
|
+
7. **Layup feasibility rating**
|
|
140
|
+
`example/7-layup-feasibility/example_layup_feasibility.py`
|
|
141
|
+
Scores a candidate stacking (ply counts, bending lamination parameters) by distance to the nearest layups in a CSV database.
|
|
142
|
+
|
|
136
143
|
## Common Development Commands
|
|
137
144
|
|
|
138
145
|
### Run tests
|
|
@@ -1,98 +1,104 @@
|
|
|
1
|
-
# lamkit
|
|
2
|
-
|
|
3
|
-
`lamkit` is a Python toolkit for composite laminate analysis, focused on:
|
|
4
|
-
|
|
5
|
-
- Laminate stress/strain response based on Classical Lamination Theory (CLT)
|
|
6
|
-
- LaRC05 failure index evaluation
|
|
7
|
-
- Lekhnitskii open-hole infinite-plate analytical solution
|
|
8
|
-
- Open-hole plate's effective (homogenisation) properties
|
|
9
|
-
- Linear buckling analysis of laminates
|
|
10
|
-
- Objective/constraint evaluation for laminate optimization tasks
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
###
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Build
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
# lamkit
|
|
2
|
+
|
|
3
|
+
`lamkit` is a Python toolkit for composite laminate analysis, focused on:
|
|
4
|
+
|
|
5
|
+
- Laminate stress/strain response based on Classical Lamination Theory (CLT)
|
|
6
|
+
- LaRC05 failure index evaluation
|
|
7
|
+
- Lekhnitskii open-hole infinite-plate analytical solution
|
|
8
|
+
- Open-hole plate's effective (homogenisation) properties
|
|
9
|
+
- Linear buckling analysis of laminates
|
|
10
|
+
- Objective/constraint evaluation for laminate optimization tasks
|
|
11
|
+
- Layup engineering-requirement checks and feasibility rating against a layup attribute database
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Requirements
|
|
16
|
+
|
|
17
|
+
- Python `>=3.9`
|
|
18
|
+
- Core dependencies: `numpy`, `pandas`, `matplotlib`
|
|
19
|
+
- Optional: `scipy` (linear buckling and layup feasibility rating)
|
|
20
|
+
|
|
21
|
+
### Install from PyPI
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install lamkit
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Install for local development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install -e .[dev,docs]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
The following example creates a laminate and evaluates ply-surface fields under membrane loading:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import numpy as np
|
|
39
|
+
from lamkit import Laminate, Ply
|
|
40
|
+
from lamkit.analysis.material import IM7_8551_7
|
|
41
|
+
|
|
42
|
+
ply = Ply(IM7_8551_7, thickness=0.125) # mm
|
|
43
|
+
stacking = [45, -45, 0, 90, 90, 0, -45, 45]
|
|
44
|
+
laminate = Laminate(stacking=stacking, plies=ply)
|
|
45
|
+
|
|
46
|
+
# N = [Nxx, Nyy, Nxy, Mxx, Myy, Mxy]
|
|
47
|
+
N = np.array([80.0, 0.0, 0.0, 0.0, 0.0, 0.0])
|
|
48
|
+
field = laminate.evaluate_laminate(N)
|
|
49
|
+
|
|
50
|
+
print(field[["index_ply", "index_surface", "z", "sigma_1", "sigma_2", "tau_12", "FI_max"]].head())
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
The `example/` directory contains runnable scripts:
|
|
56
|
+
|
|
57
|
+
1. **Laminate response (CLT + LaRC05)**
|
|
58
|
+
`example/1-laminate/example_laminate.py`
|
|
59
|
+
Computes through-thickness stress/strain and LaRC05 index distributions with plots.
|
|
60
|
+
|
|
61
|
+
2. **Lekhnitskii unloaded-hole solution**
|
|
62
|
+
`example/2-lekhnitskii-solution/example_unloaded_hole.py`
|
|
63
|
+
Solves and visualizes open-hole stress fields.
|
|
64
|
+
|
|
65
|
+
3. **Laminate open-hole field analysis**
|
|
66
|
+
`example/3-open-hole/example_open_hole.py`
|
|
67
|
+
Couples laminate equivalent compliance with open-hole fields and generates failure envelopes/boundary maps.
|
|
68
|
+
|
|
69
|
+
4. **Effective stiffness with hole homogenization**
|
|
70
|
+
`example/4-effective-stiffness/example_effective_stiffness.py`
|
|
71
|
+
Compares laminate stiffness `A` (without hole) and homogenized stiffness `A_eff` (with hole).
|
|
72
|
+
|
|
73
|
+
5. **Laminate linear buckling**
|
|
74
|
+
`example/5-laminate-buckling/example_buckling.py`
|
|
75
|
+
Computes buckling eigenvalues and saves buckling mode plots.
|
|
76
|
+
|
|
77
|
+
6. **Optimization objective/constraint evaluation**
|
|
78
|
+
`example/6-laminate-optimization-task/example_laminate_opt_function.py`
|
|
79
|
+
Demonstrates combined displacement, failure, and buckling constraint evaluation for design tasks.
|
|
80
|
+
|
|
81
|
+
7. **Layup feasibility rating**
|
|
82
|
+
`example/7-layup-feasibility/example_layup_feasibility.py`
|
|
83
|
+
Scores a candidate stacking (ply counts, bending lamination parameters) by distance to the nearest layups in a CSV database.
|
|
84
|
+
|
|
85
|
+
## Common Development Commands
|
|
86
|
+
|
|
87
|
+
### Run tests
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pytest
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Build distribution package
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python -m build
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Build documentation
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cd docs
|
|
103
|
+
sphinx-build -b html . _build/html
|
|
104
|
+
```
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# Minimal makefile for Sphinx docs.
|
|
2
|
-
|
|
3
|
-
SPHINXBUILD ?= sphinx-build
|
|
4
|
-
SOURCEDIR = .
|
|
5
|
-
BUILDDIR = _build
|
|
6
|
-
|
|
7
|
-
.PHONY: help clean html
|
|
8
|
-
|
|
9
|
-
help:
|
|
10
|
-
$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)"
|
|
11
|
-
|
|
12
|
-
clean:
|
|
13
|
-
rm -rf "$(BUILDDIR)"
|
|
14
|
-
|
|
15
|
-
html:
|
|
16
|
-
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"
|
|
1
|
+
# Minimal makefile for Sphinx docs.
|
|
2
|
+
|
|
3
|
+
SPHINXBUILD ?= sphinx-build
|
|
4
|
+
SOURCEDIR = .
|
|
5
|
+
BUILDDIR = _build
|
|
6
|
+
|
|
7
|
+
.PHONY: help clean html
|
|
8
|
+
|
|
9
|
+
help:
|
|
10
|
+
$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)"
|
|
11
|
+
|
|
12
|
+
clean:
|
|
13
|
+
rm -rf "$(BUILDDIR)"
|
|
14
|
+
|
|
15
|
+
html:
|
|
16
|
+
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,69 +1,77 @@
|
|
|
1
|
-
API reference
|
|
2
|
-
=============
|
|
3
|
-
|
|
4
|
-
Top-level package
|
|
5
|
-
-----------------
|
|
6
|
-
|
|
7
|
-
.. automodule:: lamkit
|
|
8
|
-
:members:
|
|
9
|
-
:undoc-members:
|
|
10
|
-
:show-inheritance:
|
|
11
|
-
|
|
12
|
-
Analysis
|
|
13
|
-
--------
|
|
14
|
-
|
|
15
|
-
.. automodule:: lamkit.analysis.material
|
|
16
|
-
:members:
|
|
17
|
-
:undoc-members:
|
|
18
|
-
:show-inheritance:
|
|
19
|
-
|
|
20
|
-
.. automodule:: lamkit.analysis.laminate
|
|
21
|
-
:members:
|
|
22
|
-
:undoc-members:
|
|
23
|
-
:show-inheritance:
|
|
24
|
-
|
|
25
|
-
.. automodule:: lamkit.analysis.larc05
|
|
26
|
-
:members:
|
|
27
|
-
:undoc-members:
|
|
28
|
-
:show-inheritance:
|
|
29
|
-
|
|
30
|
-
.. automodule:: lamkit.analysis.buckling
|
|
31
|
-
:members:
|
|
32
|
-
:undoc-members:
|
|
33
|
-
:show-inheritance:
|
|
34
|
-
|
|
35
|
-
Lekhnitskii
|
|
36
|
-
-----------
|
|
37
|
-
|
|
38
|
-
.. automodule:: lamkit.lekhnitskii.hole
|
|
39
|
-
:members:
|
|
40
|
-
:undoc-members:
|
|
41
|
-
:show-inheritance:
|
|
42
|
-
|
|
43
|
-
.. automodule:: lamkit.lekhnitskii.unloaded_hole
|
|
44
|
-
:members:
|
|
45
|
-
:undoc-members:
|
|
46
|
-
:show-inheritance:
|
|
47
|
-
|
|
48
|
-
.. automodule:: lamkit.lekhnitskii.loaded_hole
|
|
49
|
-
:members:
|
|
50
|
-
:undoc-members:
|
|
51
|
-
:show-inheritance:
|
|
52
|
-
|
|
53
|
-
.. automodule:: lamkit.lekhnitskii.homogenisation
|
|
54
|
-
:members:
|
|
55
|
-
:undoc-members:
|
|
56
|
-
:show-inheritance:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.. automodule:: lamkit.
|
|
62
|
-
:members:
|
|
63
|
-
:undoc-members:
|
|
64
|
-
:show-inheritance:
|
|
65
|
-
|
|
66
|
-
.. automodule:: lamkit.
|
|
67
|
-
:members:
|
|
68
|
-
:undoc-members:
|
|
69
|
-
:show-inheritance:
|
|
1
|
+
API reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Top-level package
|
|
5
|
+
-----------------
|
|
6
|
+
|
|
7
|
+
.. automodule:: lamkit
|
|
8
|
+
:members:
|
|
9
|
+
:undoc-members:
|
|
10
|
+
:show-inheritance:
|
|
11
|
+
|
|
12
|
+
Analysis
|
|
13
|
+
--------
|
|
14
|
+
|
|
15
|
+
.. automodule:: lamkit.analysis.material
|
|
16
|
+
:members:
|
|
17
|
+
:undoc-members:
|
|
18
|
+
:show-inheritance:
|
|
19
|
+
|
|
20
|
+
.. automodule:: lamkit.analysis.laminate
|
|
21
|
+
:members:
|
|
22
|
+
:undoc-members:
|
|
23
|
+
:show-inheritance:
|
|
24
|
+
|
|
25
|
+
.. automodule:: lamkit.analysis.larc05
|
|
26
|
+
:members:
|
|
27
|
+
:undoc-members:
|
|
28
|
+
:show-inheritance:
|
|
29
|
+
|
|
30
|
+
.. automodule:: lamkit.analysis.buckling
|
|
31
|
+
:members:
|
|
32
|
+
:undoc-members:
|
|
33
|
+
:show-inheritance:
|
|
34
|
+
|
|
35
|
+
Lekhnitskii
|
|
36
|
+
-----------
|
|
37
|
+
|
|
38
|
+
.. automodule:: lamkit.lekhnitskii.hole
|
|
39
|
+
:members:
|
|
40
|
+
:undoc-members:
|
|
41
|
+
:show-inheritance:
|
|
42
|
+
|
|
43
|
+
.. automodule:: lamkit.lekhnitskii.unloaded_hole
|
|
44
|
+
:members:
|
|
45
|
+
:undoc-members:
|
|
46
|
+
:show-inheritance:
|
|
47
|
+
|
|
48
|
+
.. automodule:: lamkit.lekhnitskii.loaded_hole
|
|
49
|
+
:members:
|
|
50
|
+
:undoc-members:
|
|
51
|
+
:show-inheritance:
|
|
52
|
+
|
|
53
|
+
.. automodule:: lamkit.lekhnitskii.homogenisation
|
|
54
|
+
:members:
|
|
55
|
+
:undoc-members:
|
|
56
|
+
:show-inheritance:
|
|
57
|
+
|
|
58
|
+
Layup utilities
|
|
59
|
+
---------------
|
|
60
|
+
|
|
61
|
+
.. automodule:: lamkit.layup.requirements
|
|
62
|
+
:members:
|
|
63
|
+
:undoc-members:
|
|
64
|
+
:show-inheritance:
|
|
65
|
+
|
|
66
|
+
.. automodule:: lamkit.layup.feasibility
|
|
67
|
+
:members:
|
|
68
|
+
:undoc-members:
|
|
69
|
+
:show-inheritance:
|
|
70
|
+
|
|
71
|
+
Utilities
|
|
72
|
+
---------
|
|
73
|
+
|
|
74
|
+
.. automodule:: lamkit.utils
|
|
75
|
+
:members:
|
|
76
|
+
:undoc-members:
|
|
77
|
+
:show-inheritance:
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import re
|
|
5
|
+
import sys
|
|
6
|
+
import warnings
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
from importlib.util import find_spec
|
|
9
|
+
|
|
10
|
+
# Anchor paths to this file so builds work from any cwd (e.g. repo root:
|
|
11
|
+
# ``sphinx-build -b html docs docs/_build/html``).
|
|
12
|
+
_CONF_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
13
|
+
PROJECT_ROOT = os.path.dirname(_CONF_DIR)
|
|
14
|
+
SRC_ROOT = os.path.join(PROJECT_ROOT, "src")
|
|
15
|
+
sys.path.insert(0, SRC_ROOT)
|
|
16
|
+
|
|
17
|
+
_INIT_PY = os.path.join(SRC_ROOT, "lamkit", "__init__.py")
|
|
18
|
+
with open(_INIT_PY, encoding="utf-8") as _f:
|
|
19
|
+
_init_src = _f.read()
|
|
20
|
+
_match = re.search(
|
|
21
|
+
r'^__version__\s*=\s*[\'"]([^\'"]+)[\'"]',
|
|
22
|
+
_init_src,
|
|
23
|
+
re.MULTILINE,
|
|
24
|
+
)
|
|
25
|
+
release = _match.group(1) if _match else "0.0.0"
|
|
26
|
+
version = release.rpartition(".")[0] if release.count(".") >= 2 else release
|
|
27
|
+
|
|
28
|
+
project = "lamkit"
|
|
29
|
+
author = "Runze Li"
|
|
30
|
+
copyright = f"{datetime.now().year}, {author}"
|
|
31
|
+
|
|
32
|
+
extensions = [
|
|
33
|
+
"sphinx.ext.autodoc",
|
|
34
|
+
"sphinx.ext.napoleon",
|
|
35
|
+
"sphinx.ext.viewcode",
|
|
36
|
+
"myst_parser",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
templates_path = ["_templates"]
|
|
40
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
41
|
+
|
|
42
|
+
language = "en"
|
|
43
|
+
# Furo is optional at parse time: editors may analyze conf.py without docs extras installed.
|
|
44
|
+
if find_spec("furo") is not None:
|
|
45
|
+
html_theme = "furo"
|
|
46
|
+
else:
|
|
47
|
+
html_theme = "alabaster"
|
|
48
|
+
warnings.warn(
|
|
49
|
+
"Sphinx theme 'furo' is not installed; using bundled 'alabaster'. "
|
|
50
|
+
'Install docs extras: pip install -e ".[docs]" or pip install furo',
|
|
51
|
+
UserWarning,
|
|
52
|
+
stacklevel=1,
|
|
53
|
+
)
|
|
54
|
+
html_static_path = ["_static"]
|
|
55
|
+
|
|
56
|
+
autodoc_member_order = "bysource"
|
|
57
|
+
autodoc_typehints = "description"
|
|
58
|
+
|
|
59
|
+
# Autodoc imports lamkit modules, which require NumPy, pandas, Matplotlib, SciPy, etc.
|
|
60
|
+
# Install with: pip install -e ".[docs]" (see docs/installation.rst).
|