Skip to main content

A lightweight Python library to estimate preconsolidation pressure using volumetric strain energy method with knee detection in the e-log(P) space.

Project description

PyelogP

"Py e-log(P)" is a lightweight Python library for estimating the preconsolidation pressure (P'c) of oedometer test data using the strain-energy method with knee-point detection and thresholding in the e-log(P) space.

San Francisco Bay Mud (Bonaparte & Mitchell, 1976)
Wallaceburg clay (Becker et al., 1987)
Louiseville clay (TPM, 1996)

Features

  • Manual data input or import from a .csv file.
  • Automatic removal of unload–reload cycles from input data.
  • (Beta) Threshold-based fitting range selection for S-shaped curves.

Installation

pip install pyelogp

Clone from GitHub

git clone https://github.com/liangchow/pyelogp.git
cd pyelogp
python -m venv .venv           # Recommended to use venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate
pip install -e .

Quick start

See run.py for a full example, including loading data from a CSV file via Data.from_csv.

from pyelogp import Data

# Louiseville clay
pressure = [59, 90, 120, 150, 165, 172, 184, 222, 300, 400]
void_ratio = [2.115, 2.113, 2.098, 2.083, 2.055, 2, 1.8, 1.5, 1.3, 1.193]
e0 = 1.21 (Optional)

d = Data(pressure=pressure, void_ratio=void_ratio, e0=e0)

# Run analysis
result = d.find_pc()
print(f"Pc  = {result.pc:.1f}")
print(f"e @ Pc = {result.e_pc:.4f}")
print(f"R²(seg1) = {result.r2_seg1:.4f}")
print(f"R²(seg2) = {result.r2_seg2:.4f}")

# Return
Preconsolidation pressure (Pc): 164.49
Void ratio at pc (e_pc): 2.0573
R² segment 1: 0.893768
R² segment 2: 0.96937

Contributing

Contributions are welcome, please refer to CONTRIBUTING to learn more about how to contribute.

References

Becker, D. E., Crooks, J. H. A., Been, K., & Jefferies, M. G. (1987). Work as a Criterion for Determining in situ and Yield Stresses in Clays. Canadian Geotechnical Journal, 24(4), 549–564.

Bonaparte, R. and Mitchell, J.K. (1979). The Properties of San Francisco Bay Mud at Hamilton Air Force Base, California. Geotechnical Engineering Report, University of California, Berkeley, April 1979.

Satopa, V., Albrecht, J., Irwin, D., and Raghavan, B. (2011). Finding a 'Kneedle' in a Haystack: Detecting Knee Points in System Behavior. 31st International Conference on Distributed Computing Systems Workshops, 166-171.

Terzaghi, K., Peck, R.B., & Mesri, G. (1996). Soil Mechanics in Engineering Practice (3rd ed.). John Wiley & Sons, Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyelogp-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyelogp-0.1.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pyelogp-0.1.1.tar.gz.

File metadata

  • Download URL: pyelogp-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyelogp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2b00bcdc6bfead1a327256eaff12105f6a5198855c1af3b57f8c9e8343fb2a23
MD5 31c6df07ef69bcfc4d1be54a1625162a
BLAKE2b-256 807cd41961a6077aeda3ffc15783fba042fc47e8e649e356ad29dcbb429b4556

See more details on using hashes here.

File details

Details for the file pyelogp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyelogp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyelogp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5426eb7a4c3e9bf102c9e16a0a8b8a220048adb469635389001d5085904a20cc
MD5 2459dc5d9707fb67a706123f94e0eb77
BLAKE2b-256 0c2867f652a4ad67f325295453745e483c914136e18161bb3cbdea8835a619f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page