3pc-sandbend
توضیحات
Python library for bending analysis of shear deformable anisotropic sandwich plates under transverse loads, hygrothermal, and mechanical loads.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | 3pc-sandbend-1.0.1 |
| نام | 3pc-sandbend |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Omprakash Seresta |
| ایمیل نویسنده | oseresta@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/3pc-sandbend/ |
| مجوز | MIT |
# 3pc-sandbend
`3pc-sandbend` is a Python library for bending analysis of shear deformable anisotropic sandwich plates under transverse loads, hygrothermal, and mechanical loads. It provides a `Sandbend` class to calculate reference surface displacements, rotations, strains, curvatures, and transverse shear strains across a user-specified coordinate grid.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `3pc-sandbend`. Since the package and its dependencies are available on PyPI, you can install them directly:
```bash
pip install 3pc-sandbend
```
## API Reference
### `Sandbend` Class
The primary component of this package is the `Sandbend` class, which takes a panel, a load case, and coordinates/Fourier-expansion parameters to solve the sandwich bending governing equations.
```python
from sandbend.sandbend import Sandbend
```
#### Required Parameters
When initializing `Sandbend`, the following parameters are required:
* **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) containing the face sheet laminates and sandwich core definition.
* **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the load case and environmental conditions.
* **`number_of_terms`** *(int)*: Number of terms in the double Fourier series expansion.
* **`number_of_points_x`** *(int)*: Number of points along x-direction to calculate values.
* **`number_of_points_y`** *(int)*: Number of points along y-direction to calculate values.
#### Calculated Properties
The class calculates the following properties:
* **`pairs`**: List of pairs `(i, j)` for all `i, j = 1, 2, ..., M`, where `M` is the number of terms.
* **`K33`**: Load-dependent part of the stiffness term K33 for all pairs.
* **`Pmn`**, **`PFull`**: Load coefficient arrays.
* **`u`**, **`v`**, **`w`**: Reference surface displacement components.
* **`phix`**, **`phiy`**: Reference surface rotations.
* **`uloc`**, **`vloc`**, **`wloc`**: Grid point displacements.
* **`phixloc`**, **`phiyloc`**: Grid point rotations.
* **`ex0Bloc`**, **`ey0Bloc`**, **`gxy0Bloc`**: Reference surface in-plane strains at grid locations.
* **`kx0Bloc`**, **`ky0Bloc`**, **`kxy0Bloc`**: Reference curvatures at grid locations.
* **`gxz0Bloc`**, **`gyz0Bloc`**: Transverse shear strains at grid locations.
* **`ek0Bloc`**, **`gT0Bloc`**, **`NMBloc`**, **`QBloc`**: Reference strain, thermal strain, force/moment resultants, and shear force resultants at each grid location.
* **`coeff`**: Calculated displacement and rotation coefficients.
### Methods
#### `Sandbend.fromDict(**kwargs)`
Initializes a `Sandbend` instance using a dictionary of keyword arguments.
---
## Usage Examples
### Basic Initialization
Below is an example of performing a sandwich bending analysis.
```python
from panel.panel import Panel
from loads.loads import Loads
from sandbend.sandbend import Sandbend
# Assuming pnl (Panel) and ld (Loads) are already defined
sb = Sandbend(
panel=pnl,
loads=ld,
number_of_terms=13,
number_of_points_x=5,
number_of_points_y=5
)
# Access calculated results
print("Grid displacements (wloc):", sb.wloc)
print("Strains & curvatures (ek0Bloc):", sb.ek0Bloc)
```
## Commands
The package provides a command-line interface entry point. After installing, you can run the application using:
```bash
sandbend input.cfg
```
*(This entry point is defined in `sandbend.__main__:main`)*
### Options
* **`config`** *(positional)*: Specify the configuration file (`.cfg`) to run the analysis.
* **`-h, --help`**: Show the help message and exit.
* **`-v, --version`**: Show the version number.
* **`-s, --sample`**: Copy example files (materials, plies, cores, laminates, panels, loads, config) to the current directory.
### Configuration File (`sandbend.cfg`)
The `sandbend` command requires a configuration file (typically named `sandbend.cfg`). Below is an example based on `sandbend/examples/example001/sandbend.cfg`:
```ini
[files]
materials = materials.json
plies = plies.json
cores = cores.json
laminates = laminates.json
panels = panels.json
loads = loads.json
output = output.txt
[analysis]
number_of_terms = 13
number_of_points_x = 5
number_of_points_y = 5
```
#### `[files]` Section
This section defines the paths to the required input JSON files and the desired output file:
* **`materials`**: Path to the materials JSON file. Follows the format expected by [`3pc-material`](https://pypi.org/project/3pc-material/).
* **`plies`**: Path to the plies JSON file. Follows the format expected by [`3pc-ply`](https://pypi.org/project/3pc-ply/).
* **`cores`**: Path to the cores JSON file.
* **`laminates`**: Path to the laminates JSON file. Follows the format expected by [`3pc-laminate`](https://pypi.org/project/3pc-laminate/).
* **`panels`**: Path to the panels JSON file. Follows the format expected by [`3pc-panel`](https://pypi.org/project/3pc-panel/).
* **`loads`**: Path to the loads JSON file. Follows the format expected by [`3pc-loads`](https://pypi.org/project/3pc-loads/).
* **`output`**: Path to the text file where the sandwich bending analysis results will be written.
#### `[analysis]` Section
This section specifies the analysis settings:
* **`number_of_terms`**: Number of terms in the double Fourier series expansion.
* **`number_of_points_x`**: Number of grid points along the x-direction.
* **`number_of_points_y`**: Number of grid points along the y-direction.
## Citation
If you use this library in your research or work, please cite it as follows:
**APA Format:**
> Seresta, O. (2026). *3pc-sandbend: Python library for bending analysis of shear deformable anisotropic sandwich plates under transverse loads, hygrothermal, and mechanical loads*. PyPI. https://pypi.org/project/3pc-sandbend/
**BibTeX:**
```bibtex
@software{3pc_sandbend,
author = {Seresta, Omprakash},
title = {3pc-sandbend: Python library for bending analysis of shear deformable anisotropic sandwich plates under transverse loads, hygrothermal, and mechanical loads},
year = {2026},
url = {https://pypi.org/project/3pc-sandbend/}
}
```
نیازمندی
| مقدار | نام |
|---|---|
| - | 3pc-material |
| - | 3pc-ply |
| - | 3pc-laminate |
| - | 3pc-panel |
| - | 3pc-sandwich |
| - | 3pc-loads |
| - | 3pc-utils |
| - | numpy |
| - | scipy |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl 3pc-sandbend-1.0.1:
pip install 3pc-sandbend.whl
نصب پکیج tar.gz 3pc-sandbend-1.0.1:
pip install 3pc-sandbend.tar.gz