PyCBA 0.7.0__tar.gz → 0.8.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 (32) hide show
  1. {pycba-0.7.0/src/PyCBA.egg-info → pycba-0.8.0}/PKG-INFO +1 -1
  2. {pycba-0.7.0 → pycba-0.8.0/src/PyCBA.egg-info}/PKG-INFO +1 -1
  3. {pycba-0.7.0 → pycba-0.8.0}/src/PyCBA.egg-info/SOURCES.txt +5 -0
  4. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/__init__.py +3 -1
  5. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/analysis.py +33 -3
  6. pycba-0.8.0/src/pycba/beam.py +856 -0
  7. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/load.py +233 -10
  8. pycba-0.8.0/src/pycba/nonlinear.py +913 -0
  9. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/results.py +33 -9
  10. pycba-0.8.0/src/pycba/section.py +525 -0
  11. pycba-0.8.0/tests/test_moving_load.py +82 -0
  12. pycba-0.8.0/tests/test_nonlinear.py +302 -0
  13. pycba-0.8.0/tests/test_nonprismatic.py +619 -0
  14. pycba-0.7.0/src/pycba/beam.py +0 -498
  15. {pycba-0.7.0 → pycba-0.8.0}/LICENSE +0 -0
  16. {pycba-0.7.0 → pycba-0.8.0}/README.md +0 -0
  17. {pycba-0.7.0 → pycba-0.8.0}/pyproject.toml +0 -0
  18. {pycba-0.7.0 → pycba-0.8.0}/setup.cfg +0 -0
  19. {pycba-0.7.0 → pycba-0.8.0}/setup.py +0 -0
  20. {pycba-0.7.0 → pycba-0.8.0}/src/PyCBA.egg-info/dependency_links.txt +0 -0
  21. {pycba-0.7.0 → pycba-0.8.0}/src/PyCBA.egg-info/requires.txt +0 -0
  22. {pycba-0.7.0 → pycba-0.8.0}/src/PyCBA.egg-info/top_level.txt +0 -0
  23. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/bridge.py +0 -0
  24. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/inf_lines.py +0 -0
  25. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/pattern.py +0 -0
  26. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/types.py +0 -0
  27. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/utils.py +0 -0
  28. {pycba-0.7.0 → pycba-0.8.0}/src/pycba/vehicle.py +0 -0
  29. {pycba-0.7.0 → pycba-0.8.0}/tests/test_basic.py +0 -0
  30. {pycba-0.7.0 → pycba-0.8.0}/tests/test_bridge.py +0 -0
  31. {pycba-0.7.0 → pycba-0.8.0}/tests/test_inf_lines.py +0 -0
  32. {pycba-0.7.0 → pycba-0.8.0}/tests/test_results.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyCBA
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Python Continuous Beam Analysis
5
5
  Author-email: Colin Caprani <colin.caprani@monash.edu>
6
6
  License: Apache 2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyCBA
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Python Continuous Beam Analysis
5
5
  Author-email: Colin Caprani <colin.caprani@monash.edu>
6
6
  License: Apache 2.0
@@ -13,12 +13,17 @@ src/pycba/beam.py
13
13
  src/pycba/bridge.py
14
14
  src/pycba/inf_lines.py
15
15
  src/pycba/load.py
16
+ src/pycba/nonlinear.py
16
17
  src/pycba/pattern.py
17
18
  src/pycba/results.py
19
+ src/pycba/section.py
18
20
  src/pycba/types.py
19
21
  src/pycba/utils.py
20
22
  src/pycba/vehicle.py
21
23
  tests/test_basic.py
22
24
  tests/test_bridge.py
23
25
  tests/test_inf_lines.py
26
+ tests/test_moving_load.py
27
+ tests/test_nonlinear.py
28
+ tests/test_nonprismatic.py
24
29
  tests/test_results.py
@@ -2,10 +2,11 @@
2
2
  PyCBA - Continuous Beam Analysis in Python
3
3
  """
4
4
 
5
- __version__ = "0.7.0"
5
+ __version__ = "0.8.0"
6
6
 
7
7
  from .analysis import BeamAnalysis
8
8
  from .beam import Beam
9
+ from .section import SectionEI
9
10
  from .load import (
10
11
  LoadCNL,
11
12
  MemberResults,
@@ -21,3 +22,4 @@ from .utils import parse_beam_string
21
22
  from .bridge import BridgeAnalysis
22
23
  from .vehicle import Vehicle, make_train, VehicleLibrary
23
24
  from .pattern import LoadPattern
25
+ from .nonlinear import NonlinearBeamAnalysis, NonlinearResult, HingeEvent
@@ -78,9 +78,13 @@ class BeamAnalysis:
78
78
  ----------
79
79
  L : array_like of float
80
80
  Span lengths. Length ``N`` for an ``N``-span beam.
81
- EI : float or array_like of float
82
- Flexural rigidity of each span. A scalar value is applied to all
83
- spans; otherwise one value per span is required.
81
+ EI : float, pycba.section.SectionEI, or array_like
82
+ Flexural rigidity of each span. A single scalar (or a single
83
+ :class:`~pycba.section.SectionEI`) is applied to all spans;
84
+ otherwise one entry per span is required. A span whose rigidity is
85
+ given as a :class:`~pycba.section.SectionEI` is treated as
86
+ **non-prismatic** (variable ``EI``) and analysed by flexibility
87
+ integration; scalar entries use the closed-form prismatic element.
84
88
  R : array_like of int or float
85
89
  Nodal restraint vector, length ``2(N+1)``. Two entries per node
86
90
  (vertical DOF then rotational DOF), ordered left to right:
@@ -100,6 +104,9 @@ class BeamAnalysis:
100
104
  4. Moment load — ``[span, 4, M, a]``.
101
105
  5. Trapezoidal — ``[span, 5, w1, w2]`` (full span) or
102
106
  ``[span, 5, w1, w2, a, c]`` (partial).
107
+ 6. Imposed curvature — ``[span, 6, k0, k1, ...]`` where the free
108
+ curvature field is ``κ(x) = k0 + k1·x + …`` (e.g. creep,
109
+ shrinkage or thermal curvature).
103
110
 
104
111
  eletype : array_like of int, optional
105
112
  Element type for each span, controlling which end(s) carry moment:
@@ -243,6 +250,29 @@ class BeamAnalysis:
243
250
  load = [i_span, 4, m, a]
244
251
  self._beam.add_load(load)
245
252
 
253
+ def add_ic(self, i_span: int, kappa):
254
+ r"""
255
+ Append an imposed-curvature (initial-strain) member load.
256
+
257
+ The free curvature field ``κ(x) = k0 + k1·x + k2·x² + …`` is imposed
258
+ over the member. On a simply-supported span it produces no internal
259
+ forces (only a free deflected shape); on a restrained or continuous
260
+ structure its restraint generates real moments and reactions. This is
261
+ the mechanism for applying creep, shrinkage and thermal curvatures to a
262
+ continuous beam (see :class:`pycba.load.LoadIC`).
263
+
264
+ Parameters
265
+ ----------
266
+ i_span : int
267
+ 1-based span index.
268
+ kappa : float or array_like of float
269
+ Imposed-curvature polynomial coefficients in increasing powers of
270
+ ``x``: ``[k0, k1, k2, ...]``. A scalar is a uniform curvature.
271
+ """
272
+ coeffs = np.atleast_1d(np.asarray(kappa, dtype=float)).tolist()
273
+ load = [i_span, 6] + coeffs
274
+ self._beam.add_load(load)
275
+
246
276
  def add_trap(
247
277
  self,
248
278
  i_span: int,