3pc-sandfreq
توضیحات
Python library for free vibration analysis of shear deformable anisotropic sandwich plates.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | 3pc-sandfreq-1.0.1 |
| نام | 3pc-sandfreq |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Omprakash Seresta |
| ایمیل نویسنده | oseresta@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/3pc-sandfreq/ |
| مجوز | MIT |
# 3pc-sandfreq
`3pc-sandfreq` is a Python library for free vibration analysis of shear deformable anisotropic sandwich plates. It provides a `Sandfreq` class to calculate natural frequencies and mode shapes, considering shear deformation effects in composite sandwich construction.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `3pc-sandfreq`. Since the package and its dependencies are available on PyPI, you can install them directly:
```bash
pip install 3pc-sandfreq
```
Alternatively, you can install it from the local source directory:
```bash
pip install .
```
## API Reference
### `Sandfreq` Class
The primary component of this package is the `Sandfreq` class, which takes a panel, a load case, and analysis grid settings to compute natural frequencies and mode shapes.
```python
from sandfreq.sandfreq import Sandfreq
```
#### Required Parameters
When initializing `Sandfreq`, the following parameters are required:
* **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) representing the sandwich plate panel.
* **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the applied in-plane loads ($N_{xx}$, $N_{yy}$, $N_{xy}$).
* **`number_of_terms`** *(int)*: The number of terms to use in the Ritz/analytical solver.
* **`number_of_points_x`** *(int)*: Number of reporting points along the length (x-axis).
* **`number_of_points_y`** *(int)*: Number of reporting points along the width (y-axis).
#### Calculated Properties
The class calculates the following properties:
* **`pairs`**: List of $(m, n)$ pairs for all $i, j = 1, 2, \dots, M$, where $M$ is the number of terms in the analysis.
* **`K33`**: Loads dependent part of the stiffness matrix $K_{33}$ for all pairs.
* **`lambdaEV`**: Right eigenvalues of the generalized eigenvalue problem: $K = \lambda_{EV} \cdot M$.
* **`vr`**: Right eigenvectors of the generalized eigenvalue problem.
* **`lambda_cr`**: Critical eigenvalue.
* **`vr_cr`**: Critical right eigenvector.
* **`mn_cr`**: Critical $(m, n)$ pair.
* **`lambdaP`**: Sorted list of positive eigenvalues.
* **`lambda1` to `lambda5`**: First to fifth critical (lowest positive) eigenvalues (natural frequencies in Hz).
* **`mn1` to `mn5`**: Dominant $(m, n)$ mode shapes corresponding to natural frequencies `lambda1` to `lambda5`.
### Methods
#### `Sandfreq.fromDict(**kwargs)`
Initializes a `Sandfreq` instance using a dictionary of keyword arguments.
---
## Usage Examples
### Basic Initialization
Below is an example of performing a sandwich free vibration analysis.
```python
from panel.panel import Panel
from loads.loads import Loads
from sandfreq.sandfreq import Sandfreq
# Assuming pnl (Panel) and ld (Loads) are already defined
sf = Sandfreq(
panel=pnl,
loads=ld,
number_of_terms=4,
number_of_points_x=11,
number_of_points_y=11
)
# Access natural frequencies and their dominant mode shapes
print("First Natural Frequency (Hz):", sf.lambda1)
print("Dominant (m, n) for lambda1:", sf.mn1)
```
## Commands
The package provides a command-line interface entry point. After installing, you can run the application using:
```bash
sandfreq input.cfg
```
*(This entry point is defined in `sandfreq.__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 (`sandfreq.cfg`)
The `sandfreq` command requires a configuration file (typically named `sandfreq.cfg`). Below is an example based on `sandfreq/examples/example001/sandfreq.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 = 4
number_of_points_x = 11
number_of_points_y = 11
```
#### `[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 free vibration analysis results will be written.
#### `[analysis]` Section
This section specifies the analysis settings:
* **`number_of_terms`**: The number of terms to use in the Ritz/analytical solver.
* **`number_of_points_x`**: Number of reporting points along the length (x-axis).
* **`number_of_points_y`**: Number of reporting points along the width (y-axis).
## Citation
If you use this library in your research or work, please cite it as follows:
**APA Format:**
> Rastogi, N., & Seresta, O. (2026). *3pc-sandfreq: Python library for free vibration analysis of shear deformable anisotropic sandwich plates*. PyPI. https://pypi.org/project/3pc-sandfreq/
**BibTeX:**
```bibtex
@software{3pc_sandfreq,
author = {Rastogi, Naveen and Seresta, Omprakash},
title = {3pc-sandfreq: Python library for free vibration analysis of shear deformable anisotropic sandwich plates},
year = {2026},
url = {https://pypi.org/project/3pc-sandfreq/}
}
```
نیازمندی
| مقدار | نام |
|---|---|
| - | 3pc-material |
| - | 3pc-ply |
| - | 3pc-laminate |
| - | 3pc-panel |
| - | 3pc-sandwich |
| - | 3pc-loads |
| - | 3pc-utils |
| - | numpy |
| - | scipy |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl 3pc-sandfreq-1.0.1:
pip install 3pc-sandfreq.whl
نصب پکیج tar.gz 3pc-sandfreq-1.0.1:
pip install 3pc-sandfreq.tar.gz