Skip to main content

3pc-lamfreq

3pc-lamfreq is a Python library used for free vibration analysis of shear deformable anisotropic laminates. It provides a Lamfreq class to calculate natural frequencies and mode shapes based on first-order shear deformation theory (FSDT) and classical laminate theory (CLT).

Installation

Use the package manager pip to install 3pc-lamfreq. Since the package and its dependencies are available on PyPI, you can install them directly:

pip install 3pc-lamfreq

API Reference

Lamfreq Class

The primary component of this package is the Lamfreq class, which takes a panel, a load case, and configuration parameters to perform natural frequency and vibration analysis.

from lamfreq.lamfreq import Lamfreq

Required Parameters

When initializing Lamfreq, the following parameters are required:

  • panel (Panel): An instance of the Panel class (from 3pc-panel) containing the laminate definition and geometry.
  • loads (Loads): An instance of the Loads class (from 3pc-loads) containing the load case and environmental conditions.
  • number_of_terms (int): The number of terms to be used in the Ritz/analytical analysis.
  • number_of_points_x (int): The number of grid points in the x-direction where the mode shapes are reported.
  • number_of_points_y (int): The number of grid points in the y-direction where the mode shapes are reported.

Calculated Properties

The class calculates the following properties:

  • NT: Thermal in-plane loads.
  • NC: Hygral in-plane loads.
  • pairs: List of term index pairs (i, j) for analysis.
  • K33: The loads-dependent part of the stiffness matrix.
  • lambdaEV: Eigenvalues of the vibration system (natural frequencies in rad/s).
  • vr: Right eigenvectors (mode shapes).
  • 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 five natural frequencies in Hz.
  • mn1 to mn5: Dominant (m, n) mode shapes corresponding to the first five frequencies.
  • loc: Grid coordinates where mode shapes are computed.
  • w1 to w5: First five right eigenvectors.

Methods

Lamfreq.fromDict(**kwargs)

Initializes a Lamfreq instance using a dictionary of keyword arguments.


Usage Examples

Basic Initialization

Below is an example of performing a vibration analysis on a panel.

from panel.panel import Panel
from loads.loads import Loads
from lamfreq.lamfreq import Lamfreq

# Assuming pnl (Panel) and ld (Loads) are already defined
lmf = Lamfreq(panel=pnl, loads=ld, number_of_terms=8, number_of_points_x=5, number_of_points_y=5)

# Access natural frequencies (in Hz)
print("First Natural Frequency (Hz):", lmf.lambda1)
print("Second Natural Frequency (Hz):", lmf.lambda2)

# Access dominant modes
print("First Dominant Mode (m, n):", lmf.mn1)

Commands

The package provides a command-line interface entry point. After installing, you can run the application using:

lamfreq input.cfg

(This entry point is defined in lamfreq.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, laminates, panels, loads, etc.) to the current directory.

Configuration File (input.cfg)

The lamfreq command requires a configuration file (typically named input.cfg or lamfreq.cfg). Below is an example based on lamfreq/examples/composite001/lamfreq.cfg:

[files]
materials = materials.json
plies = plies.json
laminates = laminates.json
panels = panels.json
loads = loads.json
output = output.txt

[analysis]
number_of_terms = 8
number_of_points_x = 5
number_of_points_y = 5
output_K = no
output_M = no

[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.
  • 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 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).
  • output_K: Option to output the stiffness matrix (yes or no).
  • output_M: Option to output the mass matrix (yes or no).

Citation

If you use this library in your research or work, please cite it as follows:

APA Format:

Rastogi, N., & Seresta, O. (2026). 3pc-lamfreq: Python library for free vibration analysis of shear deformable anisotropic laminates. PyPI. https://pypi.org/project/3pc-lamfreq/

BibTeX:

@software{3pc_lamfreq,
  author = {Rastogi, Naveen and Seresta, Omprakash},
  title = {3pc-lamfreq: Python library for free vibration analysis of shear deformable anisotropic laminates},
  year = {2026},
  url = {https://pypi.org/project/3pc-lamfreq/}
}

Metadata

Release files for 3pc-lamfreq 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 3pc-lamfreq 1.0.2
File Size Uploaded Provenance
3pc_lamfreq-1.0.2.tar.gz 372.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for 3pc-lamfreq 1.0.2
File Interpreter ABI Platform
3pc_lamfreq-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 774.5 kB

Release files / 3pc_lamfreq-1.0.2.tar.gz

Download URL 3pc_lamfreq-1.0.2.tar.gz
Size 372.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9049a32a8fb63f91a9100c9367f2dd6fc1ed8b5a7cbc0fa5602587f7fc816616
BLAKE2b-256 checksum
How to use checksums
db59e827b83268408cc356b21a81ae1413b2792f7a716be212dcb1b16c1c5a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / 3pc_lamfreq-1.0.2-py3-none-any.whl

Download URL 3pc_lamfreq-1.0.2-py3-none-any.whl
Size 401.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10f12f5c9ca6c60276706c4add0db3a60daf4097cd7e1bf36e2eabcceef0c3c0
BLAKE2b-256 checksum
How to use checksums
950679bff3f57d00a28000efaaf0b0ae747e4d6500063e8b45170ff745b83f75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for 3pc-lamfreq 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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