Skip to main content

3pc-sandfail

3pc-sandfail is a Python library for stress / strain analysis of shear deformable anisotropic sandwich plates under hygrothermal and mechanical loads. It provides a Sandfail class to perform ply-by-ply stress, strain, and margin of safety calculations, evaluating sandwich-specific failure modes such as intracellular buckling (dimpling), wrinkling, core shear crimping, core shear, core crush, and facesheet disbond.

Installation

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

pip install 3pc-sandfail

API Reference

Sandfail Class

The primary component of this package is the Sandfail class, which takes a panel, a load case, and core properties to compute stress, strain, and margins of safety against various failure modes.

from sandfail.sandfail import Sandfail

Required Parameters

When initializing Sandfail, 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.
  • core_properties (dict): Dictionary of core-specific configuration properties (e.g., type - "isotropic" or "orthotropic", Ec, Gc, k1, delta0, FwT).

Calculated Properties

The class calculates the following properties:

  • NT, NC: Thermal and hygral in-plane load vectors.
  • MT, MC: Thermal and hygral in-plane moment vectors.
  • ek0: Reference/midplane strain and curvatures.
  • stress, strain: Stresses and strains for the face sheets and core.
  • msCoreShear: Margin of safety for core shear.
  • msICBTopLaminate, msICBBottomLaminate: Margin of safety for intracellular buckling (dimpling) on the top/bottom laminates.
  • msWrinklingTopLaminate, msWrinklingBottomLaminate: Margin of safety for wrinkling on the top/bottom laminates.

Methods

Sandfail.fromDict(**kwargs)

Initializes a Sandfail instance using a dictionary of keyword arguments.


Usage Examples

Basic Initialization

Below is an example of performing a sandwich failure analysis.

from panel.panel import Panel
from loads.loads import Loads
from sandfail.sandfail import Sandfail

# Assuming pnl (Panel) and ld (Loads) are already defined
core_props = {
    "type": "isotropic",
    "Ec": 1000.0,
    "k1": 0.5,
    "Gc": 400.0
}

sf = Sandfail(
    panel=pnl,
    loads=ld,
    core_properties=core_props
)

# Access calculations and margins of safety
print("Mid-plane strains/curvatures:", sf.ek0)
print("Core Shear Margin of Safety:", sf.msCoreShear)

Commands

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

sandfail input.cfg

(This entry point is defined in sandfail.__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 (sandfail.cfg)

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

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

[analysis]
analysis_type = MECHANICAL
failure_theory = MAX STRAIN
sandwich_failure = yes

[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 failure analysis results will be written.

[analysis] Section

This section specifies the analysis settings:

  • analysis_type: Type of analysis (e.g. MECHANICAL, HYGROTHERMAL, HYGROTHERMOMECHANICAL).
  • failure_theory: Theory used for laminate strength evaluation (e.g. MAX STRAIN, TSAI-WU, TSAI-HILL, MAX STRESS).
  • sandwich_failure: Flag to enable/disable sandwich failure analysis (e.g., yes, 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-sandfail: Python library for stress / strain analysis of shear deformable anisotropic sandwich plates under hygrothermal and mechanical loads. PyPI. https://pypi.org/project/3pc-sandfail/

BibTeX:

@software{3pc_sandfail,
  author = {Rastogi, Naveen and Seresta, Omprakash},
  title = {3pc-sandfail: Python library for stress / strain analysis of shear deformable anisotropic sandwich plates under hygrothermal and mechanical loads},
  year = {2026},
  url = {https://pypi.org/project/3pc-sandfail/}
}

Download files

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

Source Distribution

3pc_sandfail-1.0.1.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

3pc_sandfail-1.0.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for 3pc_sandfail-1.0.1.tar.gz
Algorithm Hash digest
SHA256 725cd8840b32f943ad41e9a2a919d6fe46b7a5cd27eecdf214b68932f8d54a6a
MD5 cc561560d134004b3d1375d17025ca1e
BLAKE2b-256 5e07eea31e0e686fc1b1b8dfa3a4fba91f1f0536f5aa3fc7fa0076e0e709853e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for 3pc_sandfail-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a150c81052347d30097b999a0cb6f05982d2d476f3244543b5661ca3a097ad87
MD5 7d98cb0070bb8f4a021ef167b1f4ee8b
BLAKE2b-256 2494ffe96e1c0b7927a8e2e7808f6be62e13f0b3d7db585e1f889c61fed9722f

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.3

2 files

1.0.2

2 files

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