From 98b498e5962bdd67cd35d8820d6c45a2ebd126c5 Mon Sep 17 00:00:00 2001 From: TchilDill Date: Tue, 21 Nov 2023 22:55:50 +0100 Subject: [PATCH 1/2] fix bug with api Pmax --- CHANGELOG.md | 7 +++++++ src/openpile/globals.py | 2 +- src/openpile/utils/py_curves.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ec38a..b0037ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/), and [PEP 440](https://www.python.org/dev/peps/pep-0440/). +## [0.7.1] - 2023-11-21 + +### Fixed + +- maximum resistance in API_clay where Pmax was wrongly calculated based on depth instead of diameter, credits to Zhenghui Qiu for spotting this. + + ## [0.7.0] - 2023-11-12 ### Added diff --git a/src/openpile/globals.py b/src/openpile/globals.py index 48ec9b2..de8af4a 100644 --- a/src/openpile/globals.py +++ b/src/openpile/globals.py @@ -1,2 +1,2 @@ # version of the package -VERSION = "0.7.0" +VERSION = "0.7.1" diff --git a/src/openpile/utils/py_curves.py b/src/openpile/utils/py_curves.py index a3c0073..c22748a 100644 --- a/src/openpile/utils/py_curves.py +++ b/src/openpile/utils/py_curves.py @@ -349,7 +349,7 @@ def api_clay( # Calculate Pmax (regular API) ## Pmax for shallow and deep zones (regular API) Pmax_shallow = (3 * Su + sig) * D + J * Su * X - Pmax_deep = 9 * Su * X + Pmax_deep = 9 * Su * D Pmax = min(Pmax_deep, Pmax_shallow) ylist_in = [0.0, 0.1 * y50, 0.21 * y50, 1 * y50, 3 * y50, 8 * y50, 15 * y50, ymax] From 450de12afa4c69b2a9c20ed18586d7a0c21c4cac Mon Sep 17 00:00:00 2001 From: TchilDill Date: Tue, 21 Nov 2023 22:58:52 +0100 Subject: [PATCH 2/2] fix test --- test/test_pycurves.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_pycurves.py b/test/test_pycurves.py index fb2f30c..64c74b1 100644 --- a/test/test_pycurves.py +++ b/test/test_pycurves.py @@ -49,7 +49,7 @@ def make( J: float, ): - return min(9 * Su * X, (3 * Su + sig) * D + J * Su * X) + return min(9 * Su * D, (3 * Su + sig) * D + J * Su * X) return make