Skip to main content

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 to install 3pc-sandfreq. Since the package and its dependencies are available on PyPI, you can install them directly:

pip install 3pc-sandfreq

Alternatively, you can install it from the local source directory:

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.

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.

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:

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:

[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.
  • plies: Path to the plies JSON file. Follows the format expected by 3pc-ply.
  • cores: Path to the cores JSON file.
  • laminates: Path to the laminates JSON file. Follows the format expected by 3pc-laminate.
  • panels: Path to the panels JSON file. Follows the format expected by 3pc-panel.
  • loads: Path to the loads JSON file. Follows the format expected by 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:

@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/}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

3pc_sandfreq-1.0.1.tar.gz (24.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_sandfreq-1.0.1-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file 3pc_sandfreq-1.0.1.tar.gz.

File metadata

  • Download URL: 3pc_sandfreq-1.0.1.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.3

File hashes

Hashes for 3pc_sandfreq-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3be30d89824a97eac0401b15122f8d288ed4271220e098fc63ec8872129fa79e
MD5 0988918ef93417550ce4e4882ce6885b
BLAKE2b-256 d096bc2710ddbd7f14ca21e17a19ee18c5f6dd348f3865817a9d9a2c5491fae7

See more details on using hashes here.

File details

Details for the file 3pc_sandfreq-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: 3pc_sandfreq-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.3

File hashes

Hashes for 3pc_sandfreq-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad749754de0eccc359ade147e54f1c0ff9718b9ddb0aa896374122e1ae1e3146
MD5 1b3501328ad14ecf96b34412b2961d58
BLAKE2b-256 f1d8681d55049d4dcf5a1b709efcb519fb335a2ade379c350c4e8fda028042c7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page