A 3pc Python library used to define a composite laminate and compute its properties based on classical lamination theory.
Project description
3pc-laminate
3pc-laminate is a Python library used to define a composite laminate and compute its properties based on classical lamination theory. It provides a Laminate class to define the stacking sequence of plies and compute its overall behavior, built upon the Ply class (provided by the 3pc-ply package).
Installation
Use the package manager pip to install 3pc-laminate. Since 3pc-laminate, 3pc-ply and 3pc-material are publicly available on PyPI, you can install them directly:
pip install 3pc-laminate 3pc-ply 3pc-material
API Reference
Laminate Class
The primary component of this package is the Laminate class, which holds a stacking sequence of plies and dynamically calculates transformed stiffness matrices and engineering constants.
from laminate.laminate import Laminate
Required Parameters
When initializing Laminate directly, the following parameters are required:
lamID(str): Laminate identifier.stacking_sequence(list): List ofPlyobjects starting from the bottom of the laminate (at-thickness/2.0) and ending at the top of the laminate (at+thickness/2.0), i.e., full stacking sequence.offset(str or float): Reference plane offset from midplane. Can be"top","bottom","mid", or a float value.
Calculated Properties
The class automatically calculates the following properties lazily:
thickness: Total laminate thickness.rho: Average laminate density using rule of mixtures.z: List of z-coordinates for each ply interface relative to the reference plane.A: Extensional stiffness matrix of the laminate.B: Coupling stiffness matrix of the laminate.D: Bending stiffness matrix of the laminate.ABD: Full stiffness matrix in the form of[[A, B], [B, D]].A44,A45,A55: Transverse shear stiffnesses.gamma,delta: Laminate properties measuring the effects of D16 and D26 respectively.Ex,Ey,Gxy,vxy,vyx: In-plane engineering constants.Efx,Efy,Gfxy,vfxy,vfyx: Flexural engineering constants.alphax,alphay,alphaxy: Thermal expansion coefficients.betax,betay,betaxy: Hygral (moisture) expansion coefficients.
Methods
Laminate.fromDict(**kwargs)
Initializes a Laminate instance using a dictionary of keyword arguments. This is ideal for loading configurations from JSON files or dictionaries.
Usage Examples
Basic Initialization
Below is an example of defining a laminate using plies and materials.
from material.orthotropic import Orthotropic
from ply.ply import Ply
from laminate.laminate import Laminate
# Define the material first
zg_material = Orthotropic(
matID="zg",
E1=181.0,
E2=10.3,
G12=7.17,
G13=7.17,
G23=7.17,
v12=0.28,
rho=1.5
)
# Define plies
ply_0 = Ply(plyID="1", angle=0.0, material=zg_material, thickness=0.125)
ply_90 = Ply(plyID="2", angle=90.0, material=zg_material, thickness=0.125)
# Define laminate (0/90)s
lam = Laminate(
lamID="lam_01",
stacking_sequence=[ply_0, ply_90, ply_90, ply_0],
offset="mid"
)
# Access Computed Properties
print("A Matrix:\\n", lam.A)
print("Effective Ex:", lam.Ex)
print("Effective Ey:", lam.Ey)
Initializing from a Dictionary
You can load your laminate directly from a dictionary.
lam_dict = {
"lamID": "lam_02",
"stacking_sequence": [ply_0, ply_90],
"offset": "bottom"
}
lam_2 = Laminate.fromDict(**lam_dict)
print("Total thickness:", lam_2.thickness)
Commands
The package provides a command-line interface entry point. After installing, you can run the main application using:
laminate
(Currently, this serves as an entry point defined in laminate.main:main)
Project details
Release history Release notifications | RSS feed
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 3pc_laminate-1.0.0.tar.gz.
File metadata
- Download URL: 3pc_laminate-1.0.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8600633d148786b8ea8fec3c479b9eac16a079b845b60f4e2bb076ed8af2100f
|
|
| MD5 |
d2a40cc3edd5ebf98be82cebe741b6f2
|
|
| BLAKE2b-256 |
3baaacd6b78445895c37ab1b02a69187dda9e624971fbd4c8bef2d03d6a92bd6
|
File details
Details for the file 3pc_laminate-1.0.0-py3-none-any.whl.
File metadata
- Download URL: 3pc_laminate-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf0a260da306ff96c65592661997de72601f77c6d1abda99f2ce24ee2272cf7e
|
|
| MD5 |
c96e0a3bf60b8c12b1d0a6bdceb27bf3
|
|
| BLAKE2b-256 |
c09e0fe16fb941e00b15bd7b781846697a7dc82437f5f32143659edcd7d7a62e
|