Skip to content

Commit 13af421

Browse files
authored
Merge pull request #23 from TchilDill/extras-doc-unit-testing-and-more
0.4.0
2 parents eb77b8d + e139863 commit 13af421

40 files changed

+2650
-1066
lines changed

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/),
88
and [PEP 440](https://www.python.org/dev/peps/pep-0440/).
99

1010

11-
## [0.4.0] - 2023-XX-XX (not released yet)
12-
- *blank*
11+
## [0.4.0] - 2023-07-30 (not released yet)
12+
- Updates in documentation
13+
- new methods available for `openpile.analyze.Result` class:
14+
- new method `winkler()` replacing `simple_winkler_analysis()`, the use of the latter triggers a deprecation warning when used.
15+
- new method `beam()` replacing `simple_beam_analysis()`, the use of the latter triggers a deprecation warning when used.
16+
- new method `openpile.analyze.details()` that provides summary of an `AnalyzeResult` object.
17+
- new methods available for `openpile.construct.Model` class:
18+
- `openpile.construct.Model.get_py_springs()`
19+
- `openpile.construct.Model.get_mt_springs()`
20+
- `openpile.construct.Model.get_Hb_spring()`
21+
- `openpile.construct.Model.get_Mb_spring()`
22+
- new feature which allow user to enter a function in place of a float for springs multipliers when creating `SoilModel` objects. the function must take as input a PositiveFloat representing the depth below ground level, and as output the multiplier that shall be used by the soil spring for this depth.
23+
- new `openpile.utils.multipliers` module that stores validated functions for use in multipliers in SoilModels objects.
1324

1425
## [0.3.3] - 2023-05-19
1526
- fix error in Dunkirk_sand rotational springs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Geotechnical super-toolbox for pile-related calculations.
55
<!-- [![Python Support](https://img.shields.io/pypi/pyversions/openpile.svg)](https://pypi.org/project/openpile/) -->
66
[![License: LGPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
77
[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/)
8-
[![Downloads](https://static.pepy.tech/badge/openpile)](https://pepy.tech/project/openpile)
8+
[![Downloads](https://static.pepy.tech/badge/openpile/month)](https://pepy.tech/project/openpile)
99

1010
![Tests](https://github.com/TchilDill/openpile/actions/workflows/Test.yml/badge.svg)
1111
[![Documentation Status](https://readthedocs.org/projects/openpile/badge/?version=latest)](https://openpile.readthedocs.io/en/latest/?badge=latest)

docs/source/API.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
.. _ApplicationProgrammingInterface:
3+
14
---
25
API
36
---
@@ -12,9 +15,9 @@ API
1215
LateralModel, AxialModel, py_spring_fct, mt_spring_fct, Hb_spring_fct,
1316
Mb_spring_fct, spring_signature
1417

15-
.. automodule:: openpile.analyses
18+
.. automodule:: openpile.analyze
1619
:members:
17-
:exclude-members: PydanticConfig, structural_forces_to_df, disp_to_df, Result
20+
:exclude-members: simple_winkler_analysis, simple_beam_analysis, PydanticConfig, structural_forces_to_df, springs_mob_to_df, reaction_forces_to_df, disp_to_df, AnalyzeResult
1821

1922

2023
`utils` module
@@ -32,7 +35,7 @@ API
3235

3336
.. automodule:: openpile.utils.tz_curves
3437
:members:
35-
:exclude-members: random
38+
:exclude-members: random, kraft_modification
3639

3740

3841
.. automodule:: openpile.utils.qz_curves
@@ -43,13 +46,7 @@ API
4346
The `Result` class
4447
==================
4548

46-
.. autoclass:: openpile.analyses.Result
49+
.. autoclass:: openpile.analyze.AnalyzeResult
4750
:members:
48-
:exclude-members: name, displacements, forces, Config, __init__
49-
50-
Usage
51-
-----
52-
53-
The `Result` class is created by any analyses from the :py:mod:`openpile.analyses` module.
51+
:exclude-members: Config, __init__
5452

55-
As such the user can use the following properties and/or methods for any return values of an analysis.
67.5 KB
Loading
Loading
Loading
Loading
36.1 KB
Loading
Loading

docs/source/axialsoilmodels.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Axial soil models
2+
=================
3+
4+
The following axial models are included in openpile.
5+
6+
* API sand
7+
* API Clay
8+
9+
10+
API model
11+
---------
12+
13+
The axial model calculates skin friction along the pile and end-bearing at pile tip.
14+
15+
OpenPile's use of this model is done by calling the following class in a layer:
16+
17+
* in coarse-grained materials, :py:class:`openpile.soilmodels.API_ax_sand`
18+
* in fine-grained materials, :py:class:`openpile.soilmodels.API_ax_clay`
19+
20+
This soil model then provides soil springs as given by the function(s) below and depending on the type of material:
21+
22+
* :py:func:`openpile.utils.tz_curves.api_sand`
23+
* :py:func:`openpile.utils.qz_curves.api_sand`
24+
* :py:func:`openpile.utils.tz_curves.api_clay`
25+
* :py:func:`openpile.utils.qz_curves.api_clay`
26+
27+
28+
Distributed springs - t-z curves
29+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
31+
The backbone curve is computed via the piecewise formulation
32+
by [API2000]_ or through
33+
Kraft's formulation that captures small-strain
34+
characteristics of the soil [KrRK81]_ in the backbone curve.
35+
36+
.. note::
37+
Kraft's formulation is accessed by the user by stipulating the small-strain shear
38+
stiffness of the soil, :math:`G_0`
39+
40+
**API Sand**
41+
42+
*pending..*
43+
44+
**API Clay**
45+
46+
*pending..*
47+
48+
Base spring - Q-z curve
49+
^^^^^^^^^^^^^^^^^^^^^^^
50+
51+
The maximum resistance is calculated as follows:
52+
53+
* API clay: :math:`Q_{max} = 9 S_u`
54+
where :math:`S_u` is the clay undrained shear strength.
55+
* API sand: :math:`Q_{max} = N_q \sigma^\prime_v`
56+
where :math:`\sigma^\prime_v` is the overburden effective stress and :math:`N_q` is
57+
the end-bearing factor depending on the interface friction angle :math:`\delta = \phi - 5` given in [API2000]_.
58+
59+
60+
The backbone curve is computed via the piecewise formulation
61+
by [API2000]_.

docs/source/background.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Background and Theory
33
---------------------
44

55
.. toctree::
6-
:maxdepth: 1
6+
:maxdepth: 2
77
:caption: Contents:
88

9-
PYmodels
9+
introsoilmodels
10+
lateralsoilmodels
11+
axialsoilmodels

docs/source/introsoilmodels.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
Usage
3+
=====
4+
5+
The function :py:func:`openpile.utils.py_curves.[<py spring>]` generates the lateral springs (or p-y curve/spring)
6+
for the relevant soil model. Similar modules exist for other types of springs:
7+
8+
* rotational springs (found in :py:mod:`openpile.utils.mt_curves`)
9+
* axial springs (found in :py:mod:`openpile.utils.tz_curves`)
10+
* base lateral spring (found in :py:mod:`openpile.utils.Hb_curves`)
11+
* base rotational spring (found in :py:mod:`openpile.utils.Mb_curves`)
12+
* base axial spring (found in :py:mod:`openpile.utils.qz_curves`)
13+
14+
15+
Furthermore, the user can include the those springs discussed in a soil profile's :py:class:`openpile.construct.Layer`
16+
by calling a soil mode, found in :py:class:`openpile.soilmodels.[<soil model>]`
17+
18+
The rest of the below documentation discusses the soil models available to the user,
19+
the theory behind and calculations.
20+
Please refer to the :ref:`ApplicationProgrammingInterface` for more details and :ref:`usage` for more practical information.
21+
22+
23+
.. rubric:: References
24+
25+
.. [MuOn83] Murchison, J.M., and O'Neill, M.,W., 1983. *An Evaluation of p-y Relationships
26+
in Sands.* Rserach Report No. GT.DF02-83, Department of Civil Engineering,
27+
University of Houston, Houston, Texas, May, 1983.
28+
.. [MuOn84] Murchison, J.M., and O'Neill, M.,W., 1984. *Evaluation of p-y relationships
29+
in cohesionless soils.* In Proceedings of Analysis and Design of Pile Foundations,
30+
San Francisco, October 1-5, pp. 174-191.
31+
.. [DNV-RP-C212] DNVGL RP-C212. *Recommended Practice, Geotechnical design*.
32+
Edition 2019-09 - Amended 2021-09.
33+
.. [API2000] API, December 2000. *Recommended Practice for Planning, Designing, and Constructing
34+
Fixed Offshore Platforms - Working Stress Design (RP 2A-WSD)*, Twenty-First Edition.
35+
.. [Matl70] Matlock, H. (1970). *Correlations for Design of Laterally Loaded Piles in Soft Clay*.
36+
Offshore Technology Conference Proceedings, Paper No. OTC 1204, Houston, Texas.
37+
.. [BaCA06] Battacharya, S., Carrington, T. M. and Aldridge, T. R. (2006),
38+
*Design of FPSO Piles against Storm Loading*. Proceedings Annual Offshore Technology
39+
Conference, OTC17861, Houston, Texas, May, 2006.
40+
.. [KrRK81] Kraft, L.M., Ray, R.P., and Kagawa, T. (1981). *Theoretical t-z curves*.
41+
Journal of the Geotechnical Engineering Division, ASCE, Vol. 107, No. GT11, pp. 1543-1561.
42+
.. [BHBG20] Byrne, B. W., Houlsby, G. T., Burd, H. J., Gavin, K. G., Igoe, D. J. P.,
43+
Jardine, R. J., Martin, C. M., McAdam, R. A., Potts, D. M., Taborda, D. M. G. & Zdravkovic ́, L. (2020).
44+
PISA design model for monopiles for offshore wind turbines: application
45+
to a stiff glacial clay till. Géotechnique, https://doi.org/10.1680/ jgeot.18.P.255.
46+
.. [BTZA20] Burd, H. J., Taborda, D. M. G., Zdravkovic ́, L., Abadie, C. N., Byrne, B. W.,
47+
Houlsby, G. T., Gavin, K. G., Igoe, D. J. P., Jardine, R. J., Martin, C. M., McAdam, R. A.,
48+
Pedro, A. M. G. & Potts, D. M. (2020). PISA design model for monopiles for offshore wind
49+
turbines: application to a marine sand. Géotechnique, https://doi.org/10.1680/jgeot.18.P.277.

docs/source/PYmodels.rst renamed to docs/source/lateralsoilmodels.rst

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,37 @@
1-
PY soil models
2-
==============
1+
Lateral soil models
2+
===================
33

4-
The following PY models are included in openpile.
5-
6-
* :ref:`API-sand`
7-
* :ref:`API-clay`
8-
9-
The function :py:func:`openpile.utils.py_curves.[<PY soil model>]` generates the p-y curve for
10-
the relevant PY soil model.
11-
12-
Furthermore, the user can include the PY soil models discussed here in a soil profile's :py:class:`openpile.construct.Layer`
13-
by calling the class :py:class:`openpile.soilmodels.[<PY soil model>]`
14-
15-
This part of the documentation discusses the theory and calculations.
16-
Please refer to the API or Usage sections for more practical information.
17-
18-
.. rubric:: References
19-
20-
.. [MuOn83] Murchison, J.M., and O'Neill, M.,W., 1983. *An Evaluation of p-y Relationships
21-
in Sands.* Rserach Report No. GT.DF02-83, Department of Civil Engineering,
22-
University of Houston, Houston, Texas, May, 1983.
23-
.. [MuOn84] Murchison, J.M., and O'Neill, M.,W., 1984. *Evaluation of p-y relationships
24-
in cohesionless soils.* In Proceedings of Analysis and Design of Pile Foundations,
25-
San Francisco, October 1-5, pp. 174-191.
26-
.. [DNV-RP-C212] DNVGL RP-C212. *Recommended Practice, Geotechnical design*.
27-
Edition 2019-09 - Amended 2021-09.
28-
.. [API2GEO-2011] API, April 2011. *Geotechnical and Foundation Design Considerations,
29-
ANSI/API Recommended Practice 2GEO*, First Edition, American Petroleum Institute, p. 103
30-
.. [Matl70] Matlock, H. (1970). *Correlations for Design of Laterally Loaded Piles in Soft Clay*.
31-
Offshore Technology Conference Proceedings, Paper No. OTC 1204, Houston, Texas.
32-
.. [BaCA06] Battacharya, S., Carrington, T. M. and Aldridge, T. R. (2006),
33-
*Design of FPSO Piles against Storm Loading*. Proceedings Annual Offshore Technology
34-
Conference, OTC17861, Houston, Texas, May, 2006.
4+
The following lateral models are included in openpile.
355

6+
* :ref:`API-lat-sand`
7+
* :ref:`API-lat-clay`
8+
* :ref:`Dunkirk-sand`
9+
* :ref:`Cowden-clay`
3610

3711
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38-
.. _API-sand:
12+
.. _API-lat-sand:
3913

4014
API sand
4115
--------
4216

43-
The p-y formulation called API sand is based on the publication by
17+
The API sand soil model is based on the publication by
4418
O'neill and Murchison, preceded by work from Reese, L.C. and others (
4519
see [MuOn83]_ and [MuOn84]_).
4620

21+
OpenPile's use of this model is done by calling the following class in a layer:
22+
23+
* :py:class:`openpile.soilmodels.API_sand`
24+
25+
This soil model provides soil springs as given by the function(s):
26+
27+
* :py:func:`openpile.utils.py_curves.api_sand`
28+
29+
4730
p-y formulation
4831
^^^^^^^^^^^^^^^
4932

5033
The API sand formulation is presented in both the API and DNVGL standards,
51-
see, [DNV-RP-C212]_ and [API2GEO-2011]_.
34+
see, [DNV-RP-C212]_ and [API2000]_.
5235

5336
Granular soils are modelled by the sand p-y model as described
5437
with the following backbone formula:
@@ -136,17 +119,24 @@ where:
136119
* :math:`\sigma^{\prime}` is the vertical effective stress
137120

138121
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139-
.. _API-clay:
122+
.. _API-lat-clay:
140123

141124
API clay
142125
--------
143126

144-
The p-y formulation called API clay is based on the work conducted by Matlock (1970) (see [Matl70]_).
127+
The lateral soil model called API clay is based on the work conducted by Matlock (1970) (see [Matl70]_).
128+
129+
OpenPile's use of this model is done by calling the following class in a layer:
130+
131+
* :py:class:`openpile.soilmodels.API_clay`
132+
133+
This soil model provides soil springs as given by the function(s):
134+
135+
* :py:func:`openpile.utils.py_curves.api_clay`
145136

146-
The API clay formulation is presented in both the API and DNVGL standards,
147-
see [DNV-RP-C212]_ and [API2GEO-2011]_.
137+
The p-y clay formulation is presented in both the API and DNVGL standards,
138+
see [DNV-RP-C212]_ and [API2000]_.
148139

149-
The below section describes how this model is formulated and computed by openpile.
150140

151141
.. note::
152142
From an undrained shear strength of 96 kPa (assumed as the threshold at which a clay is considered stiff),
@@ -277,3 +267,42 @@ the p-y curve can be generated according to:
277267
\end{cases}
278268
279269
270+
.. _Dunkirk-sand:
271+
272+
Dunkirk-sand (PISA model)
273+
-------------------------
274+
275+
This soil model was formulated as part of the Joint Industry Project PISA, that focused on formulating soil springs for large diameter monopiles as found in the offshore wind industry.
276+
This resulted in soil springs formulated in a normalized space based on a conic function backbone curve and the few following soil parameters,
277+
(i) undrained shear strength and (ii) small-strain shear stiffness.
278+
This standard model only account for monotonic reaction curves and as usual, it reflects the site conditions of the site the curves were calibrated from, a site in Dunkirk, France where dense sand is found.
279+
More details can be found in [BTZA20]_.
280+
281+
The model is validated in the below figure by performing a benchmark of OpenPile
282+
against the source material, [BTZA20]_. OpenPile shows some differences in result for high lateral load.
283+
This is due to the lack of clearer guidance in deriving `G0` in the source material.
284+
285+
.. figure:: _static/validation/GDSM_D2t.png
286+
:width: 80%
287+
288+
Validation against pile D2t documented in [BTZA20]_.
289+
290+
.. _Cowden-clay:
291+
292+
Cowden-clay (PISA model)
293+
------------------------
294+
295+
This soil model was formulated as part of the Joint Industry Project PISA, that focused on formulating soil springs for large diameter monopiles as found in the offshore wind industry.
296+
This resulted in soil springs formulated in a normalized space based on a conic function backbone curve and the few following soil parameters,
297+
(i) undrained shear strength and (ii) small-strain shear stiffness.
298+
This standard model only account for monotonic reaction curves and as usual, it reflects the site conditions of the site the curves were calibrated from, a site in Cowden, England where overconsolidated glacial till is found.
299+
More details can be found in [BHBG20]_.
300+
301+
The model is validated in the below figure by performing a benchmark of OpenPile
302+
against the source material, [BHBG20]_.
303+
304+
.. figure:: _static/validation/CowdenClay_D1_D2.png
305+
:width: 80%
306+
307+
Validation against piles D1 and D2 documented in [BHBG20]_.
308+

docs/source/usage.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
2+
.. _usage:
3+
14
-----
25
Usage
36
-----
47

58
The package allows a quick input by the user (given in this section) and quick calculation.
69

7-
Jupyter Notebooks/IPython are recommended platforms to learn how to use openpile as it provides
10+
Jupyter Notebooks/IPython are recommended platforms to use openpile as it provides
811
an interactive experience.
912

1013
.. _Ex1-create_a_pile:
@@ -118,7 +121,7 @@ API sand model looks like.
118121
# import p-y curve for api_sand from openpile.utils
119122
from openpile.utils.py_curves import api_sand
120123
121-
p, y = api_sand(sig=50, # vertical stress in kPa
124+
y, p = api_sand(sig=50, # vertical stress in kPa
122125
X = 5, # depth in meter
123126
phi = 35, # internal angle of friction
124127
D = 5, # the pile diameter
@@ -282,8 +285,8 @@ Example 5 - Create a Model and run an analysis
282285
M.set_pointload(elevation=0, Px=-20e3, Py=5e3)
283286
284287
# Run analysis
285-
from openpile.analyses import simple_winkler_analysis
286-
Result = simple_winkler_analysis(M)
288+
from openpile.analyze import winkler
289+
Result = winkler(M)
287290
288291
# plot the results
289292
Result.plot()

0 commit comments

Comments
 (0)