Skip to main content

A 3pc Python library used to define and compute the properties of a composite ply based on classical lamination theory.

Project description

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 of material.Orthotropic representing the material properties of the ply (Note: Orthotropic is defined in the 3pc-material package).
  • 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)

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

3pc_ply-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

3pc_ply-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file 3pc_ply-1.0.0.tar.gz.

File metadata

  • Download URL: 3pc_ply-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for 3pc_ply-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3ece1679b9ec9afd05fbfbfbd2786c4fd8d99493dfba2ea0252250edfee72ed4
MD5 ce95afcd1c1c72077e6212f6902c4893
BLAKE2b-256 516a9adf51091f0399d9207aa54a5630d2ae0ffd7c6c4c4f80674c9d05065ec7

See more details on using hashes here.

File details

Details for the file 3pc_ply-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: 3pc_ply-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for 3pc_ply-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 524658bb1ae3ef5c3807df271efe1c8983ea4f554311b0426b3fe664c1fdbc07
MD5 b8aeef8a41df1c8949a6a67498bd8f9e
BLAKE2b-256 cd5294ac170c425a866e11a0459a9bdea2223ac7786d628f00f365238ff62c96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page