3pc-sandwich
3pc-sandwich is a Python library used to define a composite sandwich panel and compute its properties. It provides a Sandwich class to define the structural characteristics of sandwich panels (incorporating a core, top facesheet, bottom facesheet, geometry, and boundary conditions). It leverages the Panel class from 3pc-panel and the Laminate class from 3pc-laminate.
Installation
Use the package manager pip to install 3pc-sandwich. Since 3pc-sandwich and its dependencies are publicly available on PyPI, you can install them directly:
pip install 3pc-sandwich 3pc-panel 3pc-laminate 3pc-ply 3pc-material
API Reference
Sandwich Class
The primary component of this package is the Sandwich class, which holds geometric, material, laminate stack, and boundary condition info for a sandwich panel, and computes its overall characteristics.
from sandwich.sandwich import Sandwich
Required Parameters
When initializing Sandwich directly, the following parameters are required:
panelID(str): Sandwich panel identifier.length(float): Sandwich panel length along the x-direction.width(float): Sandwich panel width along the y-direction.bottom_laminate(Laminate): TheLaminateobject representing the bottom facesheet of the sandwich panel.core(Ply): APlyobject representing the sandwich panel core.top_laminate(Laminate): TheLaminateobject representing the top facesheet of the sandwich panel.boundary_condition(str): Boundary condition of the panel. For example,"SSSS"represents simply supported on all four sides.
Calculated Properties
The class automatically calculates the following properties:
lamID: Laminate ID of the full laminate of the sandwich, structured asbottom_laminateID_coreID_top_laminateID.laminate: ALaminateobject of the combined sandwich panel (bottom laminate + core + top laminate), with offset set to"middle".panel: APanelobject representing the sandwich panel structural system.core_index: The index of the core layer in the combined laminate's stacking sequence.
Usage Examples
Basic Initialization
Below is an example of defining a sandwich panel using materials, plies, laminates, and the Sandwich class.
from material.orthotropic import Orthotropic
from ply.ply import Ply
from laminate.laminate import Laminate
from sandwich.sandwich import Sandwich
# Define material properties
face_material = Orthotropic(
matID="face_mat", E1=181.0, E2=10.3, G12=7.17, G13=7.17, G23=7.17, v12=0.28, rho=1.5
)
core_material = Orthotropic(
matID="core_mat", E1=0.23, E2=0.23, G12=0.08, G13=0.08, G23=0.08, v12=0.25, rho=0.1
)
# Define plies for facesheets and the core
ply_face = Ply(plyID="face_ply", angle=0.0, material=face_material, thickness=0.125)
ply_core = Ply(plyID="core_ply", angle=0.0, material=core_material, thickness=1.0)
# Define face laminates
bottom_lam = Laminate(
lamID="bottom_lam", stacking_sequence=[ply_face, ply_face], offset="mid"
)
top_lam = Laminate(
lamID="top_lam", stacking_sequence=[ply_face, ply_face], offset="mid"
)
# Define sandwich panel
sandwich_panel = Sandwich(
panelID="sandwich_01",
length=6.0,
width=6.0,
bottom_laminate=bottom_lam,
core=ply_core,
top_laminate=top_lam,
boundary_condition="SSSS"
)
# Access computed properties
print("Full Stacking Sequence:", sandwich_panel.laminate.stacking_sequence)
print("Combined Laminate ID:", sandwich_panel.lamID)
print("Core Ply Index:", sandwich_panel.core_index)
print("Panel Length:", sandwich_panel.panel.length)
Commands
The package provides a command-line interface entry point. After installing, you can run the main application using:
sandwich
(Currently, this serves as an entry point defined in sandwich.main:main)
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_sandwich-1.0.0.tar.gz.
File metadata
- Download URL: 3pc_sandwich-1.0.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250c7e241c81a2c539bea1f18e260f3a83d9f576bf5dc973f95f9feb53236a5a
|
|
| MD5 |
7c9c6012139135f9109fbfaa1935460f
|
|
| BLAKE2b-256 |
4144afe3cf3e1846e6c1c30d9fd5a2e367fb2ccf5fdaa7fcbdb9d63165865944
|
File details
Details for the file 3pc_sandwich-1.0.0-py3-none-any.whl.
File metadata
- Download URL: 3pc_sandwich-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ccd5606348ba52f528b1fddc442909bef91b0e380b98731aed6e438dea2bd43
|
|
| MD5 |
fb7858724a793828f7b55566bc5a50d7
|
|
| BLAKE2b-256 |
641350a06bdf1a26c8f97faaf9680bcc86a85bc2c364a19bb386fdc6b8b5da83
|