Metadata-Version: 2.4
Name: panels
Version: 0.13.2
Summary: Semi-analytical models for plates, shells and stiffened panels
Home-page: https://github.com/saullocastro/panels
Author: Saullo G. P. Castro, Nathan D'Souza
Author-email: S.G.P.Castro@tudelft.nl
License: 3-Clause BSD
Keywords: Ritz method,semi-analyticalEnergy-based method,structural analysis,structural optimization,static analysis,buckling,vibration,panel flutter,structural dynamics,implicit time integration,explicit time integration
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Education
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: BSD
Classifier: Environment :: WebAssembly :: Emscripten
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: matplotlib
Requires-Dist: composites>=0.9.21
Requires-Dist: structsolve>=0.8.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: summary

Github Actions status:

[![Actions Status](https://github.com/saullocastro/panels/workflows/pytest/badge.svg)](https://github.com/saullocastro/panels/actions)

Coverage status:

[![Codecov Status](https://codecov.io/gh/saullocastro/panels/branch/main/graph/badge.svg?token=KD9D8G8D2P)](https://codecov.io/gh/saullocastro/panels)


Semi-analytical methods for plates, shells and stiffened panels
===============================================================

- Linear and non-linear static analyses, with field outputs of displacements, strains and
  stresses
- Linear buckling
- Vibration, with or without pre-stress
- Panel flutter using the piston theory
- Geometrically non-linear static analyses (postbuckling) using the Newton-Raphson method or the arc-length methods of Riks and Crisfield, with the product of the tangent stiffness matrix by a vector available without assembly
- Dead or follower (hydrostatic) pressure loads, with the unsymmetric load stiffness of the follower pressure
- Multi-domain assemblies of plates, cylindrical shells, cylinders, stiffened panels, with the domains connected exactly with the null-space method, the default, or by penalty stiffnesses. Debonding defects or cohesive zone can be simulated
- Prescribed displacements and rotations imposed exactly with the null-space method, `MultiDomain(..., pd_method='null-space')`, for displacement control in linear static, linear buckling and geometrically non-linear (Newton-Raphson, Riks, Crisfield) analyses, with the reaction forces; or by penalty stiffnesses, the default
- CLPT, FSDT and TSDT kinematics for plates and cylindrical shells
- Donnell and Sanders-Koiter kinematics for cylindrical shells

The structural matrices are solved with
[structsolve](https://github.com/saullocastro/structsolve).


Citing this library
===================

Saullo G. P. Castro, Nathan D'Souza. (2026). Semi-analytical methods for plates, shells and stiffened panels (Version 0.13.2). Zenodo. DOI: https://doi.org/10.5281/zenodo.2541522.


Documentation
=============

The documentation is available on: https://saullocastro.github.io/panels.


Installation
============

To get the latest version:

    python -m pip install panels


Running in the browser with Pyodide
===================================

A WebAssembly wheel is published on PyPI for [Pyodide](https://pyodide.org)
314 (CPython 3.14), such that `panels` runs in the browser, e.g. in
JupyterLite or in a web page with Pyodide. NumPy, SciPy and matplotlib come
with Pyodide, and `micropip` installs `composites` and `structsolve` from PyPI:

```python
import micropip
await micropip.install("panels")

import io
from structsolve import lb
from panels.shell import Shell, load

s = Shell(a=0.6, b=0.4, stack=[0, 45, -45, 90], plyt=0.125e-3,
          laminaprop=(142.5e9, 8.7e9, 0.28, 5.1e9, 5.1e9, 3.0e9), m=10, n=10)
s.Nxx = -1.
eigvals, eigvecs = lb(s.calc_kC(), s.calc_kG(), silent=True)
print('critical load: Nxx = %1.2f N/m' % -eigvals[0])
s.results['eigvals'] = eigvals
s.results['eigvecs'] = eigvecs

# saving to memory, since a web page has no file system
buf = io.BytesIO()
s.save(buf)
data = buf.getvalue()

# offering the file for download
from js import Blob, Object, URL, document
from pyodide.ffi import to_js
blob = Blob.new(to_js([data]), to_js({'type': 'application/zip'},
                                     dict_converter=Object.fromEntries))
link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = 'plate.shell.zip'
link.click()

# loading the bytes back, e.g. from a file uploaded by the user
s2 = load(io.BytesIO(data))
```

In Pyodide the field outputs run serially, without OpenMP.


Saving and loading
==================

`Shell`, `StiffPanelBay` and `MultiDomain` are saved with `save()` to a zip
file with the inputs in JSON and the arrays, such as the results, in NumPy's
`.npy` format, see `panels.json_io`. The files are independent of the Python
version, readable outside Python and safe to load from untrusted sources,
unlike pickle:

```python
from panels.shell import load
s.name = 'plate'
s.save()              # writes plate.shell.zip
s2 = load('plate')
```

The pickle files saved by older versions are no longer loaded, since a pickle
file can execute arbitrary code; one from a trusted source can be converted
by loading it with `pickle.load()` and saving the object again.


History
=======

See [CHANGELOG.md](CHANGELOG.md) for the details of each version.
* version 0.13.2 (2026-10-14)
    - Maintenance: `.gitignore` without the runs of `thesis_timing.py`
* version 0.13.1 (2026-10-14)
    - Cohesive zone `'SB_TSL'`: rules of the discretisation of the cohesive domain, `tsl_resolution()`, `tsl_margin()` and `tsl_discretization()`, and a warning when the cohesive domain is under-resolved
    - No upper limit for the number of Gauss-Legendre points of `MultiDomain.calc_results()` and `MultiDomain.force()`
    - `calc_kw_tsl()` requires `k_i`, `tau_o` and `G1c`
* version 0.13.0 (2026-10-14)
    - `Shell.calc_kTv()` and `MultiDomain.calc_kTv()`: product of the tangent stiffness matrix by a vector without assembling it, for all the models, at the cost of one evaluation of the internal forces; used for the displacement control with prescribed displacements imposed exactly
    - The numerically integrated kernels evaluate the approximation functions once per integration point instead of in their innermost loops, with identical results: the non-linear matrices, the connections, the cohesive zone and the stiffeners are assembled several times faster
    - Requires `structsolve>=0.8.0`
* version 0.12.0 (2026-10-14)
    - Prescribed displacements imposed exactly with the null-space method, `MultiDomain(..., pd_method='null-space')`, as inhomogeneous linear constraints `c = T c_r + c_p0 + lbd*c_p1`: linear static, linear buckling, Newton-Raphson and arc-length analyses under displacement control, reactions `MultiDomain.reaction_pd()` and `MultiDomain.reaction_resultant()`, also for a single `Shell`; prescribed rotations; the penalty method remains the default
    - BUG: `fkCld_xcte` and `fkCld_ycte` placed the penalty stiffnesses of `ku` and `kv` at the rows and columns of `w`
    - Requires `structsolve>=0.7.0`
* version 0.11.1 (2026-10-08)
    - Saving and loading in a zip file with JSON and NumPy arrays, replacing pickle: `Shell.save()`, `StiffPanelBay.save()`, `MultiDomain.save()`, also to `io.BytesIO`, and `panels.json_io`
    - Pyodide support: `await micropip.install("panels")` in the browser, and the whole test suite runs in Pyodide in GitHub Actions
    - Requires `composites>=0.9.21` and `structsolve>=0.6.1`
* version 0.11.0 (2026-10-07)
    - Follower (hydrostatic) pressure loads, `Shell.add_pressure_load(..., follower=True)`, with the unsymmetric load stiffness `kCfollower` in `Shell` and `MultiDomain`
    - Theory documentation, verification tests and validation notebooks of the follower pressure
    - Interactive 3D plots of multi-domain assemblies with plotly, `MultiDomain.plot3d()`
    - Improved Cython and compiler flags
    - TSDT uses `Laminate.Dts` and `Laminate.Fts`, requires `composites>=0.9.12` and `structsolve>=0.5.0`
* version 0.9.0 (2026-09-24)
    - Null-space connection, exact, new default, as alternative to penalty-based connection
* version 0.8.0 (2026-09-23)
    - FSDT and TSDT for plate and cylindrical shells
    - Sanders-Koiter for cylindrical shells
    - Shell and Multidomain connections supporting FSDT, TSDT and Sanders-Koiter kinematics
    - Many improvements in the documentation
    - New tests based on literature
    - BUG fixes on aerodynamic matrix of cylindrical shells and mass matrix of stiffener 1D
* version 0.7.1 (2026-09-21)
    - Fixed the cohesive zone of the `MultiDomain` connection `'SB_TSL'`,
      which could not capture the onset of failure of the DCB: tangential
      separation with the rotation of each panel, tractions with the
      uncorrected separation and separation correction as in the thesis of
      D'Souza (2024)
    - Consistent tangent of the cohesive zone, `MultiDomain.calc_kT_TSL()`,
      and faster assembly of the `'SB_TSL'` secant stiffness
    - The kernels `fkCSB11_dmg`, `fkCSB12_dmg` and `fkCSB22_dmg` take the
      distances `dt` and `db` from each mid-surface to the interface
    - Validation of the cohesive zone against mode I DCB results in the
      literature, in `notebooks/`, with a convergence study
    - Fixed `StiffPanelBay.save()` with `composites>=0.9.0`
* version 0.6.21 (2026-09-18)
    - Fixed the mass of the base of `BladeStiff2D`, which was missing, and the
      section forces of `MultiDomain.force()`, which lacked the Jacobian
    - `StiffPanelBay.calc_kA()` sums the contribution of every panel, and
      `calc_kA`, `calc_cA`, `calc_fext`, `save`, `get_size` and
      `uvw_stiffener` of `StiffPanelBay` and `Shell.calc_cA` no longer raise
    - `Shell.strain()` and `Shell.stress()` work for a plate with `r=None`
    - Line coverage of the tests raised from 67 % to 92 %
    - Fixed `StiffPanelBay.add_panel` and the partial-domain integration of
      `Shell.calc_kC`, `calc_kG` and `calc_kM`
    - The limits `Shell.x1, x2, y1, y2` of the integration domain default to
      `None` instead of the sentinels `-1` and `+1`, which silently integrated
      the full domain for a limit at `1.0` and ignored a limit given on one
      side only; the old `-1` now raises
    - Fixed the `MultiDomain` skin-base connections: the `'SB'` penalty was a
      hard-coded mm-unit value, the top and bottom panels depended on their
      order in the assembly, and the connection dictionaries were modified
    - Penalty constants of each `MultiDomain` connection can be given with
      `'kt'` and `'kr'`
    - Reproduction of Stamatelos and Labeas with plate domains only in
      `tests/multidomain/test_stamatelos_labeas_2023_multidomain.py`, using
      every `MultiDomain` connection
    - Fixed the argument handling of the stiffness API: an invalid `c` or
      `c_cte` no longer reaches the nogil kernels, and a model that needs a
      radius raises instead of computing with `r = 0`
    - Reproduction of Stamatelos and Labeas (Computation 2023, 11, 110) in
      `notebooks/stamatelos_labeas_2023.ipynb`
    - Tangent stiffness matrix that is the exact derivative of the internal
      force vector, giving quadratic convergence to the Newton-Raphson method
    - `Shell` and `MultiDomain` can be passed directly to
      `structsolve.Analysis`, including the arc-length methods
    - Gauss-Legendre points and weights from `scipy.special.roots_legendre`
    - Modules of the models renamed without the `_bardell` suffix, and the
      legacy `_bardell` model names removed from `panels.modelDB.db`
    - Sphinx documentation with usage examples
* versions 0.5.x
    - Damaged multidomain connections
* up to version 0.3.x
    - Multidomain methods for pristine structures


License
=======

Distributed under the 3-Clause BSD license
(https://raw.github.com/saullocastro/panels/main/LICENSE).

Contact: S.G.P.Castro@tudelft.nl
