Skip to main content

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): The Laminate object representing the bottom facesheet of the sandwich panel.
  • core (Ply): A Ply object representing the sandwich panel core.
  • top_laminate (Laminate): The Laminate object 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 as bottom_laminateID_coreID_top_laminateID.
  • laminate: A Laminate object of the combined sandwich panel (bottom laminate + core + top laminate), with offset set to "middle".
  • panel: A Panel object 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

3pc_sandwich-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

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

Hashes for 3pc_sandwich-1.0.0.tar.gz
Algorithm Hash digest
SHA256 250c7e241c81a2c539bea1f18e260f3a83d9f576bf5dc973f95f9feb53236a5a
MD5 7c9c6012139135f9109fbfaa1935460f
BLAKE2b-256 4144afe3cf3e1846e6c1c30d9fd5a2e367fb2ccf5fdaa7fcbdb9d63165865944

See more details on using hashes here.

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

Hashes for 3pc_sandwich-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ccd5606348ba52f528b1fddc442909bef91b0e380b98731aed6e438dea2bd43
MD5 fb7858724a793828f7b55566bc5a50d7
BLAKE2b-256 641350a06bdf1a26c8f97faaf9680bcc86a85bc2c364a19bb386fdc6b8b5da83

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page