3pc-sandbuck 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/PKG-INFO +195 -0
  2. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/SOURCES.txt +37 -0
  3. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/dependency_links.txt +1 -0
  4. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/entry_points.txt +2 -0
  5. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/not-zip-safe +1 -0
  6. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/requires.txt +9 -0
  7. 3pc_sandbuck-1.0.0/3pc_sandbuck.egg-info/top_level.txt +1 -0
  8. 3pc_sandbuck-1.0.0/LICENSE +21 -0
  9. 3pc_sandbuck-1.0.0/MANIFEST.in +1 -0
  10. 3pc_sandbuck-1.0.0/PKG-INFO +195 -0
  11. 3pc_sandbuck-1.0.0/README.md +156 -0
  12. 3pc_sandbuck-1.0.0/sandbuck/CONSTANTS.py +4 -0
  13. 3pc_sandbuck-1.0.0/sandbuck/__init__.py +0 -0
  14. 3pc_sandbuck-1.0.0/sandbuck/__main__.py +6 -0
  15. 3pc_sandbuck-1.0.0/sandbuck/__version__.py +1 -0
  16. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/cores.json +1 -0
  17. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/laminates.json +1 -0
  18. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/loads.json +1 -0
  19. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/materials.json +1 -0
  20. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/output.txt +686 -0
  21. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/panels.json +1 -0
  22. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/plies.json +1 -0
  23. 3pc_sandbuck-1.0.0/sandbuck/examples/example001/sandbuck.cfg +13 -0
  24. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/cores.json +19 -0
  25. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/laminates.json +9 -0
  26. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/loads.json +75 -0
  27. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/materials.json +142 -0
  28. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/output.txt +1598 -0
  29. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/panels.json +13 -0
  30. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/plies.json +29 -0
  31. 3pc_sandbuck-1.0.0/sandbuck/examples/example002/sandbuck.cfg +13 -0
  32. 3pc_sandbuck-1.0.0/sandbuck/expiry_wrapper.py +8 -0
  33. 3pc_sandbuck-1.0.0/sandbuck/main.py +55 -0
  34. 3pc_sandbuck-1.0.0/sandbuck/sandbuck.py +1134 -0
  35. 3pc_sandbuck-1.0.0/sandbuck/sandbuckIO.py +745 -0
  36. 3pc_sandbuck-1.0.0/sandbuck/tests/__init__.py +0 -0
  37. 3pc_sandbuck-1.0.0/sandbuck/tests/test_sandbuck.py +119 -0
  38. 3pc_sandbuck-1.0.0/setup.cfg +4 -0
  39. 3pc_sandbuck-1.0.0/setup.py +52 -0
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: 3pc-sandbuck
3
+ Version: 1.0.0
4
+ Summary: Python library for buckling analysis of shear deformable anisotropic sandwich plates under combined in-plane loading.
5
+ Author: Omprakash Seresta
6
+ Author-email: oseresta@gmail.com
7
+ License: MIT
8
+ Project-URL: Blog, https://3pcomposites.com/blogs-1/f/3pcsolver007-global-buckling-analysis-of-sandwich-panels
9
+ Project-URL: Analysis Tools, https://3pcomposites.com/analysis-tools
10
+ Project-URL: Documentation, https://drive.google.com/drive/folders/1jDb-P5BOgJ-moVU20B7D8oVeHjHLAHTm
11
+ Keywords: sandwich-plates buckling-analysis composites anisotropic aerospace-engineering mechanics fsdt clt in-plane-loads
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: 3pc-material
19
+ Requires-Dist: 3pc-ply
20
+ Requires-Dist: 3pc-laminate
21
+ Requires-Dist: 3pc-panel
22
+ Requires-Dist: 3pc-sandwich
23
+ Requires-Dist: 3pc-loads
24
+ Requires-Dist: 3pc-utils
25
+ Requires-Dist: numpy
26
+ Requires-Dist: scipy
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: project-url
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
39
+
40
+ # 3pc-sandbuck
41
+
42
+ `3pc-sandbuck` is a Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading. It provides a `Sandbuck` class to solve the generalized eigenvalue problem for critical buckling loads, mode shapes, and displacement patterns.
43
+
44
+ ## Installation
45
+
46
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `sandbuck`. Since the package and its dependencies are available on PyPI, you can install them directly:
47
+
48
+ ```bash
49
+ pip install sandbuck
50
+ ```
51
+
52
+ ## API Reference
53
+
54
+ ### `Sandbuck` Class
55
+
56
+ The primary component of this package is the `Sandbuck` class, which takes a panel, a load case, and coordinates/Fourier-expansion parameters to solve the sandwich buckling governing equations.
57
+
58
+ ```python
59
+ from sandbuck.sandbuck import Sandbuck
60
+ ```
61
+
62
+ #### Required Parameters
63
+
64
+ When initializing `Sandbuck`, the following parameters are required:
65
+
66
+ * **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) containing the face sheet laminates and sandwich core definition.
67
+ * **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the in-plane load components.
68
+ * **`number_of_terms`** *(int)*: Number of terms in the double Fourier series expansion.
69
+ * **`number_of_points_x`** *(int)*: Number of points along x-direction to calculate values.
70
+ * **`number_of_points_y`** *(int)*: Number of points along y-direction to calculate values.
71
+
72
+ #### Calculated Properties
73
+
74
+ The class calculates the following properties:
75
+
76
+ * **`pairs`**: List of pairs `(i, j)` for all `i, j = 1, 2, ..., M`, where `M` is the number of terms.
77
+ * **`K33`**: Load-dependent part of the stiffness term K33 for all pairs.
78
+ * **`lambdaEV`**: Eigenvalues of the generalized eigenvalue problem.
79
+ * **`vr`**: Right eigenvectors of the generalized eigenvalue problem.
80
+ * **`lambda_cr`**: Critical eigenvalue (lowest positive eigenvalue).
81
+ * **`vr_cr`**: Critical right eigenvector.
82
+ * **`mn_cr`**: Critical `(m, n)` pair.
83
+ * **`lambdaP`**: Sorted list of positive eigenvalues.
84
+ * **`lambda1` to `lambda5`**: First to fifth critical (positive) eigenvalues.
85
+ * **`mn1` to `mn5`**: Dominant `(m, n)` pairs corresponding to eigenvalues `lambda1` to `lambda5`.
86
+ * **`Nxxcr1` to `Nxxcr5`**, **`Nyycr1` to `Nyycr5`**, **`Nxycr1` to `Nxycr5`**: Critical buckling load components for the first 5 modes.
87
+ * **`w1` to `w5`**: Out-of-plane displacement mode shapes for the first 5 modes.
88
+ * **`w1loc` to `w5loc`**: Out-of-plane displacement values at grid locations.
89
+
90
+ ### Methods
91
+
92
+ #### `Sandbuck.fromDict(**kwargs)`
93
+
94
+ Initializes a `Sandbuck` instance using a dictionary of keyword arguments.
95
+
96
+ ---
97
+
98
+ ## Usage Examples
99
+
100
+ ### Basic Initialization
101
+
102
+ Below is an example of performing a sandwich buckling analysis.
103
+
104
+ ```python
105
+ from panel.panel import Panel
106
+ from loads.loads import Loads
107
+ from sandbuck.sandbuck import Sandbuck
108
+
109
+ # Assuming pnl (Panel) and ld (Loads) are already defined
110
+ sb = Sandbuck(
111
+ panel=pnl,
112
+ loads=ld,
113
+ number_of_terms=4,
114
+ number_of_points_x=11,
115
+ number_of_points_y=11
116
+ )
117
+
118
+ # Access calculated results
119
+ print("Critical eigenvalue:", sb.lambda_cr)
120
+ print("Critical buckling load Nxxcr1:", sb.Nxxcr1)
121
+ ```
122
+
123
+ ## Commands
124
+
125
+ The package provides a command-line interface entry point. After installing, you can run the application using:
126
+
127
+ ```bash
128
+ sandbuck input.cfg
129
+ ```
130
+
131
+ *(This entry point is defined in `sandbuck.__main__:main`)*
132
+
133
+ ### Options
134
+
135
+ * **`config`** *(positional)*: Specify the configuration file (`.cfg`) to run the analysis.
136
+ * **`-h, --help`**: Show the help message and exit.
137
+ * **`-v, --version`**: Show the version number.
138
+ * **`-s, --sample`**: Copy example files (materials, plies, cores, laminates, panels, loads, config) to the current directory.
139
+
140
+ ### Configuration File (`sandbuck.cfg`)
141
+
142
+ The `sandbuck` command requires a configuration file (typically named `sandbuck.cfg`). Below is an example based on `sandbuck/examples/example001/sandbuck.cfg`:
143
+
144
+ ```ini
145
+ [files]
146
+ materials = materials.json
147
+ plies = plies.json
148
+ cores = cores.json
149
+ laminates = laminates.json
150
+ panels = panels.json
151
+ loads = loads.json
152
+ output = output.txt
153
+
154
+ [analysis]
155
+ number_of_terms = 4
156
+ number_of_points_x = 11
157
+ number_of_points_y = 11
158
+ ```
159
+
160
+ #### `[files]` Section
161
+
162
+ This section defines the paths to the required input JSON files and the desired output file:
163
+
164
+ * **`materials`**: Path to the materials JSON file. Follows the format expected by [`3pc-material`](https://pypi.org/project/3pc-material/).
165
+ * **`plies`**: Path to the plies JSON file. Follows the format expected by [`3pc-ply`](https://pypi.org/project/3pc-ply/).
166
+ * **`cores`**: Path to the cores JSON file.
167
+ * **`laminates`**: Path to the laminates JSON file. Follows the format expected by [`3pc-laminate`](https://pypi.org/project/3pc-laminate/).
168
+ * **`panels`**: Path to the panels JSON file. Follows the format expected by [`3pc-panel`](https://pypi.org/project/3pc-panel/).
169
+ * **`loads`**: Path to the loads JSON file. Follows the format expected by [`3pc-loads`](https://pypi.org/project/3pc-loads/).
170
+ * **`output`**: Path to the text file where the sandwich buckling analysis results will be written.
171
+
172
+ #### `[analysis]` Section
173
+
174
+ This section specifies the analysis settings:
175
+
176
+ * **`number_of_terms`**: Number of terms in the double Fourier series expansion.
177
+ * **`number_of_points_x`**: Number of grid points along the x-direction.
178
+ * **`number_of_points_y`**: Number of grid points along the y-direction.
179
+
180
+ ## Citation
181
+
182
+ If you use this library in your research or work, please cite it as follows:
183
+
184
+ **APA Format:**
185
+ > Seresta, O. (2026). *3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading*. PyPI. https://pypi.org/project/3pc-sandbuck/
186
+
187
+ **BibTeX:**
188
+ ```bibtex
189
+ @software{3pc_sandbuck,
190
+ author = {Seresta, Omprakash},
191
+ title = {3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading},
192
+ year = {2026},
193
+ url = {https://pypi.org/project/3pc-sandbuck/}
194
+ }
195
+ ```
@@ -0,0 +1,37 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ setup.py
5
+ 3pc_sandbuck.egg-info/PKG-INFO
6
+ 3pc_sandbuck.egg-info/SOURCES.txt
7
+ 3pc_sandbuck.egg-info/dependency_links.txt
8
+ 3pc_sandbuck.egg-info/entry_points.txt
9
+ 3pc_sandbuck.egg-info/not-zip-safe
10
+ 3pc_sandbuck.egg-info/requires.txt
11
+ 3pc_sandbuck.egg-info/top_level.txt
12
+ sandbuck/CONSTANTS.py
13
+ sandbuck/__init__.py
14
+ sandbuck/__main__.py
15
+ sandbuck/__version__.py
16
+ sandbuck/expiry_wrapper.py
17
+ sandbuck/main.py
18
+ sandbuck/sandbuck.py
19
+ sandbuck/sandbuckIO.py
20
+ sandbuck/examples/example001/cores.json
21
+ sandbuck/examples/example001/laminates.json
22
+ sandbuck/examples/example001/loads.json
23
+ sandbuck/examples/example001/materials.json
24
+ sandbuck/examples/example001/output.txt
25
+ sandbuck/examples/example001/panels.json
26
+ sandbuck/examples/example001/plies.json
27
+ sandbuck/examples/example001/sandbuck.cfg
28
+ sandbuck/examples/example002/cores.json
29
+ sandbuck/examples/example002/laminates.json
30
+ sandbuck/examples/example002/loads.json
31
+ sandbuck/examples/example002/materials.json
32
+ sandbuck/examples/example002/output.txt
33
+ sandbuck/examples/example002/panels.json
34
+ sandbuck/examples/example002/plies.json
35
+ sandbuck/examples/example002/sandbuck.cfg
36
+ sandbuck/tests/__init__.py
37
+ sandbuck/tests/test_sandbuck.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ sandbuck = sandbuck.__main__:main
@@ -0,0 +1,9 @@
1
+ 3pc-material
2
+ 3pc-ply
3
+ 3pc-laminate
4
+ 3pc-panel
5
+ 3pc-sandwich
6
+ 3pc-loads
7
+ 3pc-utils
8
+ numpy
9
+ scipy
@@ -0,0 +1 @@
1
+ sandbuck
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Omprakash Seresta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ recursive-include sandbuck/examples *
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: 3pc-sandbuck
3
+ Version: 1.0.0
4
+ Summary: Python library for buckling analysis of shear deformable anisotropic sandwich plates under combined in-plane loading.
5
+ Author: Omprakash Seresta
6
+ Author-email: oseresta@gmail.com
7
+ License: MIT
8
+ Project-URL: Blog, https://3pcomposites.com/blogs-1/f/3pcsolver007-global-buckling-analysis-of-sandwich-panels
9
+ Project-URL: Analysis Tools, https://3pcomposites.com/analysis-tools
10
+ Project-URL: Documentation, https://drive.google.com/drive/folders/1jDb-P5BOgJ-moVU20B7D8oVeHjHLAHTm
11
+ Keywords: sandwich-plates buckling-analysis composites anisotropic aerospace-engineering mechanics fsdt clt in-plane-loads
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: 3pc-material
19
+ Requires-Dist: 3pc-ply
20
+ Requires-Dist: 3pc-laminate
21
+ Requires-Dist: 3pc-panel
22
+ Requires-Dist: 3pc-sandwich
23
+ Requires-Dist: 3pc-loads
24
+ Requires-Dist: 3pc-utils
25
+ Requires-Dist: numpy
26
+ Requires-Dist: scipy
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: keywords
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: project-url
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
39
+
40
+ # 3pc-sandbuck
41
+
42
+ `3pc-sandbuck` is a Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading. It provides a `Sandbuck` class to solve the generalized eigenvalue problem for critical buckling loads, mode shapes, and displacement patterns.
43
+
44
+ ## Installation
45
+
46
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `sandbuck`. Since the package and its dependencies are available on PyPI, you can install them directly:
47
+
48
+ ```bash
49
+ pip install sandbuck
50
+ ```
51
+
52
+ ## API Reference
53
+
54
+ ### `Sandbuck` Class
55
+
56
+ The primary component of this package is the `Sandbuck` class, which takes a panel, a load case, and coordinates/Fourier-expansion parameters to solve the sandwich buckling governing equations.
57
+
58
+ ```python
59
+ from sandbuck.sandbuck import Sandbuck
60
+ ```
61
+
62
+ #### Required Parameters
63
+
64
+ When initializing `Sandbuck`, the following parameters are required:
65
+
66
+ * **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) containing the face sheet laminates and sandwich core definition.
67
+ * **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the in-plane load components.
68
+ * **`number_of_terms`** *(int)*: Number of terms in the double Fourier series expansion.
69
+ * **`number_of_points_x`** *(int)*: Number of points along x-direction to calculate values.
70
+ * **`number_of_points_y`** *(int)*: Number of points along y-direction to calculate values.
71
+
72
+ #### Calculated Properties
73
+
74
+ The class calculates the following properties:
75
+
76
+ * **`pairs`**: List of pairs `(i, j)` for all `i, j = 1, 2, ..., M`, where `M` is the number of terms.
77
+ * **`K33`**: Load-dependent part of the stiffness term K33 for all pairs.
78
+ * **`lambdaEV`**: Eigenvalues of the generalized eigenvalue problem.
79
+ * **`vr`**: Right eigenvectors of the generalized eigenvalue problem.
80
+ * **`lambda_cr`**: Critical eigenvalue (lowest positive eigenvalue).
81
+ * **`vr_cr`**: Critical right eigenvector.
82
+ * **`mn_cr`**: Critical `(m, n)` pair.
83
+ * **`lambdaP`**: Sorted list of positive eigenvalues.
84
+ * **`lambda1` to `lambda5`**: First to fifth critical (positive) eigenvalues.
85
+ * **`mn1` to `mn5`**: Dominant `(m, n)` pairs corresponding to eigenvalues `lambda1` to `lambda5`.
86
+ * **`Nxxcr1` to `Nxxcr5`**, **`Nyycr1` to `Nyycr5`**, **`Nxycr1` to `Nxycr5`**: Critical buckling load components for the first 5 modes.
87
+ * **`w1` to `w5`**: Out-of-plane displacement mode shapes for the first 5 modes.
88
+ * **`w1loc` to `w5loc`**: Out-of-plane displacement values at grid locations.
89
+
90
+ ### Methods
91
+
92
+ #### `Sandbuck.fromDict(**kwargs)`
93
+
94
+ Initializes a `Sandbuck` instance using a dictionary of keyword arguments.
95
+
96
+ ---
97
+
98
+ ## Usage Examples
99
+
100
+ ### Basic Initialization
101
+
102
+ Below is an example of performing a sandwich buckling analysis.
103
+
104
+ ```python
105
+ from panel.panel import Panel
106
+ from loads.loads import Loads
107
+ from sandbuck.sandbuck import Sandbuck
108
+
109
+ # Assuming pnl (Panel) and ld (Loads) are already defined
110
+ sb = Sandbuck(
111
+ panel=pnl,
112
+ loads=ld,
113
+ number_of_terms=4,
114
+ number_of_points_x=11,
115
+ number_of_points_y=11
116
+ )
117
+
118
+ # Access calculated results
119
+ print("Critical eigenvalue:", sb.lambda_cr)
120
+ print("Critical buckling load Nxxcr1:", sb.Nxxcr1)
121
+ ```
122
+
123
+ ## Commands
124
+
125
+ The package provides a command-line interface entry point. After installing, you can run the application using:
126
+
127
+ ```bash
128
+ sandbuck input.cfg
129
+ ```
130
+
131
+ *(This entry point is defined in `sandbuck.__main__:main`)*
132
+
133
+ ### Options
134
+
135
+ * **`config`** *(positional)*: Specify the configuration file (`.cfg`) to run the analysis.
136
+ * **`-h, --help`**: Show the help message and exit.
137
+ * **`-v, --version`**: Show the version number.
138
+ * **`-s, --sample`**: Copy example files (materials, plies, cores, laminates, panels, loads, config) to the current directory.
139
+
140
+ ### Configuration File (`sandbuck.cfg`)
141
+
142
+ The `sandbuck` command requires a configuration file (typically named `sandbuck.cfg`). Below is an example based on `sandbuck/examples/example001/sandbuck.cfg`:
143
+
144
+ ```ini
145
+ [files]
146
+ materials = materials.json
147
+ plies = plies.json
148
+ cores = cores.json
149
+ laminates = laminates.json
150
+ panels = panels.json
151
+ loads = loads.json
152
+ output = output.txt
153
+
154
+ [analysis]
155
+ number_of_terms = 4
156
+ number_of_points_x = 11
157
+ number_of_points_y = 11
158
+ ```
159
+
160
+ #### `[files]` Section
161
+
162
+ This section defines the paths to the required input JSON files and the desired output file:
163
+
164
+ * **`materials`**: Path to the materials JSON file. Follows the format expected by [`3pc-material`](https://pypi.org/project/3pc-material/).
165
+ * **`plies`**: Path to the plies JSON file. Follows the format expected by [`3pc-ply`](https://pypi.org/project/3pc-ply/).
166
+ * **`cores`**: Path to the cores JSON file.
167
+ * **`laminates`**: Path to the laminates JSON file. Follows the format expected by [`3pc-laminate`](https://pypi.org/project/3pc-laminate/).
168
+ * **`panels`**: Path to the panels JSON file. Follows the format expected by [`3pc-panel`](https://pypi.org/project/3pc-panel/).
169
+ * **`loads`**: Path to the loads JSON file. Follows the format expected by [`3pc-loads`](https://pypi.org/project/3pc-loads/).
170
+ * **`output`**: Path to the text file where the sandwich buckling analysis results will be written.
171
+
172
+ #### `[analysis]` Section
173
+
174
+ This section specifies the analysis settings:
175
+
176
+ * **`number_of_terms`**: Number of terms in the double Fourier series expansion.
177
+ * **`number_of_points_x`**: Number of grid points along the x-direction.
178
+ * **`number_of_points_y`**: Number of grid points along the y-direction.
179
+
180
+ ## Citation
181
+
182
+ If you use this library in your research or work, please cite it as follows:
183
+
184
+ **APA Format:**
185
+ > Seresta, O. (2026). *3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading*. PyPI. https://pypi.org/project/3pc-sandbuck/
186
+
187
+ **BibTeX:**
188
+ ```bibtex
189
+ @software{3pc_sandbuck,
190
+ author = {Seresta, Omprakash},
191
+ title = {3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading},
192
+ year = {2026},
193
+ url = {https://pypi.org/project/3pc-sandbuck/}
194
+ }
195
+ ```
@@ -0,0 +1,156 @@
1
+ # 3pc-sandbuck
2
+
3
+ `3pc-sandbuck` is a Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading. It provides a `Sandbuck` class to solve the generalized eigenvalue problem for critical buckling loads, mode shapes, and displacement patterns.
4
+
5
+ ## Installation
6
+
7
+ Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `sandbuck`. Since the package and its dependencies are available on PyPI, you can install them directly:
8
+
9
+ ```bash
10
+ pip install sandbuck
11
+ ```
12
+
13
+ ## API Reference
14
+
15
+ ### `Sandbuck` Class
16
+
17
+ The primary component of this package is the `Sandbuck` class, which takes a panel, a load case, and coordinates/Fourier-expansion parameters to solve the sandwich buckling governing equations.
18
+
19
+ ```python
20
+ from sandbuck.sandbuck import Sandbuck
21
+ ```
22
+
23
+ #### Required Parameters
24
+
25
+ When initializing `Sandbuck`, the following parameters are required:
26
+
27
+ * **`panel`** *(Panel)*: An instance of the `Panel` class (from `3pc-panel`) containing the face sheet laminates and sandwich core definition.
28
+ * **`loads`** *(Loads)*: An instance of the `Loads` class (from `3pc-loads`) containing the in-plane load components.
29
+ * **`number_of_terms`** *(int)*: Number of terms in the double Fourier series expansion.
30
+ * **`number_of_points_x`** *(int)*: Number of points along x-direction to calculate values.
31
+ * **`number_of_points_y`** *(int)*: Number of points along y-direction to calculate values.
32
+
33
+ #### Calculated Properties
34
+
35
+ The class calculates the following properties:
36
+
37
+ * **`pairs`**: List of pairs `(i, j)` for all `i, j = 1, 2, ..., M`, where `M` is the number of terms.
38
+ * **`K33`**: Load-dependent part of the stiffness term K33 for all pairs.
39
+ * **`lambdaEV`**: Eigenvalues of the generalized eigenvalue problem.
40
+ * **`vr`**: Right eigenvectors of the generalized eigenvalue problem.
41
+ * **`lambda_cr`**: Critical eigenvalue (lowest positive eigenvalue).
42
+ * **`vr_cr`**: Critical right eigenvector.
43
+ * **`mn_cr`**: Critical `(m, n)` pair.
44
+ * **`lambdaP`**: Sorted list of positive eigenvalues.
45
+ * **`lambda1` to `lambda5`**: First to fifth critical (positive) eigenvalues.
46
+ * **`mn1` to `mn5`**: Dominant `(m, n)` pairs corresponding to eigenvalues `lambda1` to `lambda5`.
47
+ * **`Nxxcr1` to `Nxxcr5`**, **`Nyycr1` to `Nyycr5`**, **`Nxycr1` to `Nxycr5`**: Critical buckling load components for the first 5 modes.
48
+ * **`w1` to `w5`**: Out-of-plane displacement mode shapes for the first 5 modes.
49
+ * **`w1loc` to `w5loc`**: Out-of-plane displacement values at grid locations.
50
+
51
+ ### Methods
52
+
53
+ #### `Sandbuck.fromDict(**kwargs)`
54
+
55
+ Initializes a `Sandbuck` instance using a dictionary of keyword arguments.
56
+
57
+ ---
58
+
59
+ ## Usage Examples
60
+
61
+ ### Basic Initialization
62
+
63
+ Below is an example of performing a sandwich buckling analysis.
64
+
65
+ ```python
66
+ from panel.panel import Panel
67
+ from loads.loads import Loads
68
+ from sandbuck.sandbuck import Sandbuck
69
+
70
+ # Assuming pnl (Panel) and ld (Loads) are already defined
71
+ sb = Sandbuck(
72
+ panel=pnl,
73
+ loads=ld,
74
+ number_of_terms=4,
75
+ number_of_points_x=11,
76
+ number_of_points_y=11
77
+ )
78
+
79
+ # Access calculated results
80
+ print("Critical eigenvalue:", sb.lambda_cr)
81
+ print("Critical buckling load Nxxcr1:", sb.Nxxcr1)
82
+ ```
83
+
84
+ ## Commands
85
+
86
+ The package provides a command-line interface entry point. After installing, you can run the application using:
87
+
88
+ ```bash
89
+ sandbuck input.cfg
90
+ ```
91
+
92
+ *(This entry point is defined in `sandbuck.__main__:main`)*
93
+
94
+ ### Options
95
+
96
+ * **`config`** *(positional)*: Specify the configuration file (`.cfg`) to run the analysis.
97
+ * **`-h, --help`**: Show the help message and exit.
98
+ * **`-v, --version`**: Show the version number.
99
+ * **`-s, --sample`**: Copy example files (materials, plies, cores, laminates, panels, loads, config) to the current directory.
100
+
101
+ ### Configuration File (`sandbuck.cfg`)
102
+
103
+ The `sandbuck` command requires a configuration file (typically named `sandbuck.cfg`). Below is an example based on `sandbuck/examples/example001/sandbuck.cfg`:
104
+
105
+ ```ini
106
+ [files]
107
+ materials = materials.json
108
+ plies = plies.json
109
+ cores = cores.json
110
+ laminates = laminates.json
111
+ panels = panels.json
112
+ loads = loads.json
113
+ output = output.txt
114
+
115
+ [analysis]
116
+ number_of_terms = 4
117
+ number_of_points_x = 11
118
+ number_of_points_y = 11
119
+ ```
120
+
121
+ #### `[files]` Section
122
+
123
+ This section defines the paths to the required input JSON files and the desired output file:
124
+
125
+ * **`materials`**: Path to the materials JSON file. Follows the format expected by [`3pc-material`](https://pypi.org/project/3pc-material/).
126
+ * **`plies`**: Path to the plies JSON file. Follows the format expected by [`3pc-ply`](https://pypi.org/project/3pc-ply/).
127
+ * **`cores`**: Path to the cores JSON file.
128
+ * **`laminates`**: Path to the laminates JSON file. Follows the format expected by [`3pc-laminate`](https://pypi.org/project/3pc-laminate/).
129
+ * **`panels`**: Path to the panels JSON file. Follows the format expected by [`3pc-panel`](https://pypi.org/project/3pc-panel/).
130
+ * **`loads`**: Path to the loads JSON file. Follows the format expected by [`3pc-loads`](https://pypi.org/project/3pc-loads/).
131
+ * **`output`**: Path to the text file where the sandwich buckling analysis results will be written.
132
+
133
+ #### `[analysis]` Section
134
+
135
+ This section specifies the analysis settings:
136
+
137
+ * **`number_of_terms`**: Number of terms in the double Fourier series expansion.
138
+ * **`number_of_points_x`**: Number of grid points along the x-direction.
139
+ * **`number_of_points_y`**: Number of grid points along the y-direction.
140
+
141
+ ## Citation
142
+
143
+ If you use this library in your research or work, please cite it as follows:
144
+
145
+ **APA Format:**
146
+ > Seresta, O. (2026). *3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading*. PyPI. https://pypi.org/project/3pc-sandbuck/
147
+
148
+ **BibTeX:**
149
+ ```bibtex
150
+ @software{3pc_sandbuck,
151
+ author = {Seresta, Omprakash},
152
+ title = {3pc-sandbuck: Python library for buckling analysis of shear deformable sandwich plates under combined in-plane loading},
153
+ year = {2026},
154
+ url = {https://pypi.org/project/3pc-sandbuck/}
155
+ }
156
+ ```
@@ -0,0 +1,4 @@
1
+ STRESSMIN = 0.01
2
+ STRAINMIN = 1e-6
3
+ TOL = 0.001
4
+ MINREAL = -9999999.9999
File without changes
@@ -0,0 +1,6 @@
1
+ from sandbuck.main import main
2
+
3
+ if __name__ == '__main__':
4
+ """Main entry point of the command line application - sandbuck"""
5
+
6
+ main()
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1 @@
1
+ {"cores":[{"coreID":"1","angle":0,"material":"2","thickness":0.5,"core_cell_size":0.125,"Ec":10000,"delta0":0,"FwT":350,"Syz":150,"Sxz":250,"type":"orthotropic","k1":0}]}
@@ -0,0 +1 @@
1
+ {"laminates":[{"lamID":"1","stacking_sequence":[1,2,3,4,1,2],"offset":"Middle"},{"lamID":"2","stacking_sequence":[2,1,4,3,2,1],"offset":"Middle"}]}
@@ -0,0 +1 @@
1
+ {"loads":[{"loadsID":"1","panelID":"1","Nxx":-100,"Nyy":0,"Nxy":0,"Mxx":0,"Myy":0,"Mxy":0,"Qyz":0,"Qxz":0,"p0":0,"P":0,"xCG":0,"yCG":0,"xLength":0,"yLength":0,"deltaT":0,"deltaC":0,"type":"inplane"},{"loadsID":"2","panelID":"1","Nxx":-100,"Nyy":50,"Nxy":0,"Mxx":0,"Myy":0,"Mxy":0,"Qyz":0,"Qxz":0,"p0":0,"P":0,"xCG":0,"yCG":0,"xLength":0,"yLength":0,"deltaT":0,"deltaC":0,"type":"inplane"},{"loadsID":"3","panelID":"1","Nxx":-100,"Nyy":0,"Nxy":25,"Mxx":0,"Myy":0,"Mxy":0,"Qyz":0,"Qxz":0,"p0":0,"P":0,"xCG":0,"yCG":0,"xLength":0,"yLength":0,"deltaT":0,"deltaC":0,"type":"inplane"}]}
@@ -0,0 +1 @@
1
+ {"materials":[{"matID":"1","E1":16800000,"E2":1160000,"G12":800000,"G13":10,"G23":10,"v12":0.35,"rho":0,"alpha1":0,"alpha2":0,"beta1":0,"beta2":0,"eps11_tension_allowable":0.005,"eps11_compression_allowable":-0.005,"eps22_tension_allowable":0.02,"eps22_compression_allowable":-0.02,"gamma12_allowable":0.02,"sig11_tension_allowable":0,"sig11_compression_allowable":0,"sig22_tension_allowable":0,"sig22_compression_allowable":0,"tau12_allowable":0},{"matID":"2","E1":1000,"E2":1000,"G12":10,"G13":13000,"G23":6000,"v12":0.1,"rho":0,"alpha1":0,"alpha2":0,"beta1":0,"beta2":0,"eps11_tension_allowable":0.1,"eps11_compression_allowable":-0.1,"eps22_tension_allowable":0.1,"eps22_compression_allowable":-0.1,"gamma12_allowable":0.1,"sig11_tension_allowable":0,"sig11_compression_allowable":0,"sig22_tension_allowable":0,"sig22_compression_allowable":0,"tau12_allowable":0}]}