Toolkit for stress analysis and failure prediction of composite laminates with holes and joints.
Project description
lamkit
lamkit is a Python toolkit for composite laminate analysis, focused on:
- Laminate stress/strain response based on Classical Lamination Theory (CLT)
- LaRC05 failure index evaluation
- Lekhnitskii analytical solutions for infinite anisotropic plates with a hole:
- Unloaded hole (bypass far-field stresses)
- Loaded hole (cosine bearing-load distribution)
- Combined loading (
CombinedLoadHole): superposition of bypass and bearing
- Open-hole plate's effective (homogenisation) properties
- Linear buckling analysis of laminates
- Objective/constraint evaluation for laminate optimization tasks
- Layup engineering-requirement checks and feasibility rating against a layup attribute database
Installation
Requirements
- Python
>=3.9 - Core dependencies:
numpy,pandas,matplotlib - Optional:
scipy(linear buckling and layup feasibility rating)
Install from PyPI
pip install lamkit
Install for local development
pip install -e .[dev,docs]
Quick Start
The following example creates a laminate and evaluates ply-surface fields under membrane loading:
import numpy as np
from lamkit import Laminate, Ply
from lamkit.analysis.material import IM7_8551_7
ply = Ply(IM7_8551_7, thickness=0.125) # mm
stacking = [45, -45, 0, 90, 90, 0, -45, 45]
laminate = Laminate(stacking=stacking, plies=ply)
# N = [Nxx, Nyy, Nxy, Mxx, Myy, Mxy]
N = np.array([80.0, 0.0, 0.0, 0.0, 0.0, 0.0])
field = laminate.evaluate_laminate(N)
print(field[["index_ply", "index_surface", "z", "sigma_1", "sigma_2", "tau_12", "FI_max"]].head())
Examples
The example/ directory contains runnable scripts:
-
Laminate response (CLT + LaRC05)
example/1-laminate/example_laminate.py
Computes through-thickness stress/strain and LaRC05 index distributions with plots. -
Lekhnitskii unloaded-hole solution
example/2-lekhnitskii-solution/example_unloaded_hole.py
Solves and visualizes open-hole stress fields. -
Laminate open-hole field analysis
example/3-open-hole/example_open_hole.py
Couples laminate equivalent compliance with open-hole fields and generates failure envelopes/boundary maps. -
Effective stiffness with hole homogenization
example/4-effective-stiffness/example_effective_stiffness.py
Compares laminate stiffnessA(without hole) and homogenized stiffnessA_eff(with hole). -
Laminate linear buckling
example/5-laminate-buckling/example_buckling.py
Computes buckling eigenvalues and saves buckling mode plots. -
Optimization objective/constraint evaluation
example/6-laminate-optimization-task/example_laminate_opt_function.py
Demonstrates combined displacement, failure, and buckling constraint evaluation for design tasks. -
Layup feasibility rating
example/7-layup-feasibility/example_layup_feasibility.py
Scores a candidate stacking (ply counts, bending lamination parameters) by distance to the nearest layups in a CSV database. -
Loaded-hole (bearing) field analysis
example/8-loaded-hole/example_loaded_hole.py
Computes ply-level stress/strain and LaRC05 failure indices around a bearing-loaded hole usingCombinedLoadHolewith zero bypass stresses. Plots mid-plane strains, ply-enveloped failure index fields, and hole-boundary FI maps. -
Combined bearing and bypass loading
example/9-combined-loading/example_combined_loading.py
Superimposes anUnloadedHole(far-field bypass) and aLoadedHole(cosine bearing distribution) viaCombinedLoadHole. Generates mid-plane stress contour plots, ply-enveloped LaRC05 failure index maps, and a hole-boundary FI distribution across angle and thickness.
Common Development Commands
Run tests
pytest
Build distribution package
python -m build
Build documentation
cd docs
sphinx-build -b html . _build/html
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamkit-0.1.4.tar.gz.
File metadata
- Download URL: lamkit-0.1.4.tar.gz
- Upload date:
- Size: 8.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc4f893cc6a2971e62912b6029ac85fc4a663076d37a60678a24030b203890fe
|
|
| MD5 |
47a36053663889143c32175a35bf2bb1
|
|
| BLAKE2b-256 |
d52a9aa0913f7c3bc36eb6cab3670c208838c4c8b0e5e223ab624d2643a5c15a
|
File details
Details for the file lamkit-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lamkit-0.1.4-py3-none-any.whl
- Upload date:
- Size: 317.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a66dc6fe64be05706ddaa4c777038b6d54e6cdb39fa96ffc347f3b4f0191cd
|
|
| MD5 |
fd7eacfd131a8aa01a71c1ff38c0d348
|
|
| BLAKE2b-256 |
5de170e6f514ad95b9af4b5996511247e50608e7e27ed159ac41391af9c5b497
|