3pc-sandwich


توضیحات

A 3pc Python library used to define a composite sandwich panel and compute its properties.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل 3pc-sandwich-1.0.0
نام 3pc-sandwich
نسخه کتابخانه 1.0.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Omprakash Seresta
ایمیل نویسنده oseresta@gmail.com
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/3pc-sandwich/
مجوز MIT
# 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](https://pip.pypa.io/en/stable/) to install `3pc-sandwich`. Since `3pc-sandwich` and its dependencies are publicly available on PyPI, you can install them directly: ```bash 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. ```python 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. ```python 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: ```bash sandwich ``` *(Currently, this serves as an entry point defined in `sandwich.main:main`)*


نیازمندی

مقدار نام
- 3pc-laminate
- 3pc-panel
- numpy


زبان مورد نیاز

مقدار نام
>=3.6 Python


نحوه نصب


نصب پکیج whl 3pc-sandwich-1.0.0:

    pip install 3pc-sandwich.whl


نصب پکیج tar.gz 3pc-sandwich-1.0.0:

    pip install 3pc-sandwich.tar.gz