3pc-ply
3pc-ply is a Python library used to define and compute the properties of a composite ply based on classical lamination theory. It provides a Ply class to define ply properties like angle and thickness, built upon an Orthotropic material (provided by the 3pc-material package).
Installation
Use the package manager pip to install 3pc-ply. Since both 3pc-ply and 3pc-material are publicly available on PyPI, you can install them directly:
pip install 3pc-ply 3pc-material
API Reference
Ply Class
The primary component of this package is the Ply class, which holds geometric properties of the ply and dynamically calculates transformed stiffness matrices and expansion vectors.
from ply.ply import Ply
Required Parameters
When initializing Ply directly, the following parameters are required:
plyID(str): Ply identifier.angle(float): Ply angle in degrees.material(Orthotropic): An instance ofmaterial.Orthotropicrepresenting the material properties of the ply (Note:Orthotropicis defined in the3pc-materialpackage).thickness(float): Ply thickness.
Calculated Properties
The class automatically calculates the following properties lazily:
Q: Reduced stiffness matrix of the ply in material orthotropy (1-2 axes).T: Transformation matrix to convert tensorial stress/strain between reference axes (x-y) and material orthotropy (1-2).R: Conversion matrix to convert tensorial strain matrix into engineering strain matrix.Qbar: Transformed reduced stiffness matrix in reference coordinate axes (x-y).Q44,Q55: Transverse stiffness in material direction.Q44bar,Q45bar,Q55bar: Transformed transverse stiffness in reference coordinate axes (x-y).alpha: Thermal expansion vector in material coordinate axes (1-2).beta: Hygral (moisture) expansion vector in material coordinate axes (1-2).alphabar: Transformed thermal expansion vector in reference coordinate axes (x-y).betabar: Transformed hygral expansion vector in reference coordinate axes (x-y).
Methods
Ply.fromDict(**kwargs)
Initializes a Ply 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 an orthotropic material and creating plies at different angles.
from material.orthotropic import Orthotropic
from ply.ply import Ply
# 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
)
# 0-degree ply
ply_0_deg = Ply(
plyID="1",
angle=0.0,
material=zg_material,
thickness=0.125
)
# 90-degree ply
ply_90_deg = Ply(
plyID="2",
angle=90.0,
material=zg_material,
thickness=0.125
)
# Access Computed Properties
print("Q Matrix (0-deg ply):\\n", ply_0_deg.Q)
print("Qbar Matrix (90-deg ply):\\n", ply_90_deg.Qbar)
print("Transformation Matrix T (90-deg ply):\\n", ply_90_deg.T)
Initializing from a Dictionary
You can load your plies directly from a JSON source.
ply_dict = {
"plyID": "3",
"angle": 45.0,
"material": zg_material,
"thickness": 0.125
}
ply_45_deg = Ply.fromDict(**ply_dict)
print("Qbar Matrix (45-deg ply):\\n", ply_45_deg.Qbar)
Commands
The package provides a command-line interface entry point. After installing, you can run the main application using:
ply
(Currently, this serves as an entry point defined in ply.main:main)
Metadata
Release files for 3pc-ply 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| 3pc_ply-1.0.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 3pc_ply-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / 3pc_ply-1.0.0.tar.gz
| Download URL | 3pc_ply-1.0.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ece1679b9ec9afd05fbfbfbd2786c4fd8d99493dfba2ea0252250edfee72ed4
|
|
BLAKE2b-256 checksum How to use checksums |
516a9adf51091f0399d9207aa54a5630d2ae0ffd7c6c4c4f80674c9d05065ec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / 3pc_ply-1.0.0-py3-none-any.whl
| Download URL | 3pc_ply-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
524658bb1ae3ef5c3807df271efe1c8983ea4f554311b0426b3fe664c1fdbc07
|
|
BLAKE2b-256 checksum How to use checksums |
cd5294ac170c425a866e11a0459a9bdea2223ac7786d628f00f365238ff62c96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for 3pc-ply 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.