ge.lab — API reference¶
Particle size¶
sieve_ana
¶
sieve_ana(opening: List[Union[str, float]], mass_retained: List[float], standard: str = 'ASTM', total_mass: Optional[float] = None) -> Dict[str, np.ndarray]
Perform sieve analysis and return percent finer.
Args: opening: List of sieve designations (e.g., "#4") or nominal openings (mm). mass_retained: Mass of soil retained on each sieve (g). standard: 'ASTM', 'BS', or 'IS'. total_mass: If None, calculated as sum(mass_retained).
Returns: Dict containing arrays for opening, mass_retained, percent_retained, cumulative_retained, and percent_finer.
Source code in geoeq/soil/sieve.py
hydro_ana
¶
hydro_ana(reading: List[float], time: List[float], T: Union[float, List[float]], Gs: float = 2.65, Ws: float = 50.0, Cz: float = 0.0, model: str = '152H', units: str = 'SI') -> Dict[str, np.ndarray]
Perform hydrometer analysis and return (diameter, percent_finer).
Args: reading: List of raw hydrometer readings (top of meniscus). time: Elapsed time from start (minutes). T: Temperature of suspension (Celsius). Gs: Specific gravity of soil solids. Ws: Initial dry mass of soil used (g). Cz: Zero correction (dispersant correction). model: '152H' is default.
Returns: Dict with 'diameter' (mm) and 'percent_finer' (%) arrays.
Source code in geoeq/soil/hydrometer.py
grain_d10
¶
grain_d30
¶
grain_d60
¶
grain_Cu
¶
Get Uniformity Coefficient Cu = D60/D10.
grain_Cc
¶
Get Coefficient of Curvature Cc = (D30^2)/(D60 * D10).
Source code in geoeq/soil/grain_size.py
Shear strength¶
direct_shear
¶
direct_shear(normal_stress: Union[List[float], ndarray], shear_stress: Union[List[float], ndarray]) -> Dict[str, float]
Process direct shear test results to obtain shear strength parameters.
Fits the Mohr–Coulomb failure criterion by least-squares linear regression through the (σ', τ_f) data:
.. math::
\tau_f = c' + \sigma' \tan\phi' \qquad \text{[Das Eq.\,8.3]}
| PARAMETER | DESCRIPTION |
|---|---|
normal_stress
|
Effective normal stress on the failure plane for each specimen (kPa). Minimum 3 values required.
TYPE:
|
shear_stress
|
Peak (or residual) shear stress at failure for each specimen (kPa).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.shear import direct_shear
>>> res = direct_shear([50, 100, 150], [38, 62, 86])
>>> round(res['phi'], 1)
25.6
>>> round(res['c'], 1)
13.3
Source code in geoeq/lab/shear.py
triaxial
¶
triaxial(sigma3: Union[List[float], ndarray], delta_sigma: Union[List[float], ndarray], kind: str = 'CD') -> Dict[str, float]
Process triaxial compression test data to obtain shear strength parameters.
From each specimen the major principal stress at failure is:
.. math::
\sigma_1 = \sigma_3 + \Delta\sigma_f
A Mohr–Coulomb envelope tangent to the circles yields c and φ.
For UU tests (kind = "UU"), undrained shear strength is returned
as :math:S_u = \Delta\sigma_f / 2.
| PARAMETER | DESCRIPTION |
|---|---|
sigma3
|
Cell (confining) pressure for each specimen (kPa). Minimum 2 for UU, 3 for CD/CU.
TYPE:
|
delta_sigma
|
Deviator stress at failure Δσ_f = σ₁ − σ₃ for each specimen (kPa).
TYPE:
|
kind
|
Test type:
-
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Ch. 8, Sections 8.5–8.9.
Examples:
>>> from geoeq.lab.shear import triaxial
>>> res = triaxial([100, 200, 300], [220, 380, 540], kind='CD')
>>> round(res['phi'], 1)
26.6
Source code in geoeq/lab/shear.py
| Python | |
|---|---|
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
unconfined
¶
Process unconfined compression test — compute undrained shear strength.
.. math::
S_u = \frac{q_u}{2} \qquad \text{[Das Eq.\,8.9]}
| PARAMETER | DESCRIPTION |
|---|---|
qu
|
Unconfined compressive strength (kPa).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Table 8.4; ASTM D2166.
Examples:
>>> from geoeq.lab.shear import unconfined
>>> res = unconfined(120)
>>> res['Su']
60.0
>>> res['consistency']
'Stiff'
Source code in geoeq/lab/shear.py
mohr_circle
¶
mohr_circle(sigma1: Union[float, List[float], ndarray], sigma3: Union[float, List[float], ndarray], ax=None, save_as: Optional[str] = None) -> Dict
Draw Mohr circles and compute the failure envelope.
For each pair (σ₁, σ₃), draws a Mohr circle centred at
:math:\bigl(\tfrac{\sigma_1+\sigma_3}{2},\;0\bigr) with radius
:math:\tfrac{\sigma_1-\sigma_3}{2}.
If ≥ 3 circles are given, a best-fit Mohr–Coulomb envelope is drawn.
| PARAMETER | DESCRIPTION |
|---|---|
sigma1
|
Major principal stress at failure (kPa).
TYPE:
|
sigma3
|
Minor principal stress (confining pressure) at failure (kPa).
TYPE:
|
ax
|
Existing axes to plot on.
TYPE:
|
save_as
|
File path to save figure (e.g.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Ch. 8, Fig. 8.8.
Examples:
>>> from geoeq.lab.shear import mohr_circle
>>> res = mohr_circle([320, 580, 840], [100, 200, 300])
>>> round(res['phi'], 1)
26.6
Source code in geoeq/lab/shear.py
| Python | |
|---|---|
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | |
Consolidation¶
oedometer
¶
oedometer(stress: Union[List[float], ndarray], void_ratio: Union[List[float], ndarray]) -> Dict
Process oedometer (1-D consolidation) test data.
Computes the compression index :math:C_c, recompression index
:math:C_r, and identifies the virgin compression line (VCL).
.. math::
C_c = \frac{e_1 - e_2}{\log_{10}(\sigma'_2 / \sigma'_1)}
\qquad \text{[Das Eq.\,7.9]}
| PARAMETER | DESCRIPTION |
|---|---|
stress
|
Effective vertical stress for each load step (kPa). Must be > 0.
TYPE:
|
void_ratio
|
Void ratio at end of each load step.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Ch. 7, Eq. 7.9.
Examples:
>>> from geoeq.lab.consolidation import oedometer
>>> stress = [25, 50, 100, 200, 400, 800]
>>> e = [0.88, 0.86, 0.82, 0.74, 0.62, 0.48]
>>> res = oedometer(stress, e)
>>> round(res['Cc'], 2)
0.46
Source code in geoeq/lab/consolidation.py
preconsolidation
¶
preconsolidation(stress: Union[List[float], ndarray], void_ratio: Union[List[float], ndarray], method: str = 'casagrande') -> Dict[str, float]
Determine preconsolidation pressure from e–log(p) data.
Casagrande method (default):
- Find the point of maximum curvature on the e–log p curve.
- Draw a horizontal line and a tangent at that point.
- Bisect the angle between them.
- The intersection of the bisector with the virgin compression
line (VCL) gives :math:
p_c.
| PARAMETER | DESCRIPTION |
|---|---|
stress
|
Effective vertical stress (kPa), > 0.
TYPE:
|
void_ratio
|
Void ratio at each load step.
TYPE:
|
method
|
Extraction method.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Casagrande (1936); Das (2021), Section 7.4.
Examples:
>>> from geoeq.lab.consolidation import preconsolidation
>>> stress = [25, 50, 100, 200, 400, 800]
>>> e = [0.88, 0.86, 0.82, 0.74, 0.62, 0.48]
>>> res = preconsolidation(stress, e)
>>> 50 < res['pc'] < 200
True
Source code in geoeq/lab/consolidation.py
| Python | |
|---|---|
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
compression_index
¶
compression_index(method: str = 'terzaghi', LL: Optional[float] = None, e0: Optional[float] = None, wn: Optional[float] = None, Gs: Optional[float] = None) -> float
Estimate compression index :math:C_c from empirical correlations.
| PARAMETER | DESCRIPTION |
|---|---|
method
|
Correlation to use:
TYPE:
|
LL
|
Liquid limit (%). Required for
TYPE:
|
e0
|
Initial void ratio. Required for
TYPE:
|
wn
|
Natural water content (%). Required for
TYPE:
|
Gs
|
Specific gravity. Required for
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Estimated compression index :math: |
References
Das (2021), Table 7.3.
Examples:
>>> from geoeq.lab.consolidation import compression_index
>>> round(compression_index(method='terzaghi', LL=50), 3)
0.36
Source code in geoeq/lab/consolidation.py
| Python | |
|---|---|
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
cv
¶
cv(time: Union[List[float], ndarray], deformation: Union[List[float], ndarray], method: str = 'log', H_dr: float = 1.0) -> Dict[str, float]
Compute the coefficient of consolidation :math:c_v from
time–deformation data.
Log-time method (Casagrande):
.. math::
c_v = \frac{T_{50} \cdot H_{dr}^2}{t_{50}}
\qquad T_{50} = 0.197
Root-time method (Taylor):
.. math::
c_v = \frac{T_{90} \cdot H_{dr}^2}{t_{90}}
\qquad T_{90} = 0.848
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Elapsed time (minutes).
TYPE:
|
deformation
|
Dial reading or settlement (mm). Increasing = more compression.
TYPE:
|
method
|
TYPE:
|
H_dr
|
Drainage path length (cm). Half the specimen height for double drainage.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Section 7.7, Eqs. 7.22, 7.23.
Examples:
>>> from geoeq.lab.consolidation import cv
>>> t = [0.1, 0.25, 0.5, 1, 2, 4, 8, 15, 30, 60, 120, 240, 480, 1440]
>>> d = [0.0, 0.05, 0.12, 0.22, 0.35, 0.50, 0.65, 0.78, 0.88, 0.95,
... 0.99, 1.02, 1.04, 1.06]
>>> res = cv(t, d, method='log', H_dr=1.0)
>>> res['cv'] > 0
True
Source code in geoeq/lab/consolidation.py
| Python | |
|---|---|
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
Compaction¶
proctor
¶
proctor(water_content: Union[List[float], ndarray], dry_density: Union[List[float], ndarray]) -> Dict[str, float]
Process Proctor compaction test data to find optimum moisture content and maximum dry unit weight.
Fits a second-degree polynomial to the (w, γ_d) data and locates the peak.
| PARAMETER | DESCRIPTION |
|---|---|
water_content
|
Water content for each compaction point (%).
TYPE:
|
dry_density
|
Dry unit weight for each compaction point (kN/m³).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Section 5.6; ASTM D698 / D1557.
Examples:
>>> from geoeq.lab.compaction import proctor
>>> w = [8, 10, 12, 14, 16, 18]
>>> gd = [17.5, 18.2, 18.8, 19.0, 18.7, 18.1]
>>> res = proctor(w, gd)
>>> 13 < res['w_opt'] < 15
True
>>> 18.5 < res['gamma_d_max'] < 19.5
True
Source code in geoeq/lab/compaction.py
zav_line
¶
zav_line(Gs: float, w_range: Union[List[float], ndarray, None] = None, gamma_w: float = GAMMA_WATER) -> Dict[str, np.ndarray]
Compute the Zero Air Voids (ZAV) line — the theoretical maximum dry unit weight at S = 100 %.
.. math::
\gamma_{d,\text{zav}} = \frac{G_s \, \gamma_w}{1 + w \, G_s}
\qquad \text{[Das Eq.\,5.12]}
| PARAMETER | DESCRIPTION |
|---|---|
Gs
|
Specific gravity of soil solids (typically 2.60–2.80).
TYPE:
|
w_range
|
Water content values (%) at which to compute γ_d. Default
TYPE:
|
gamma_w
|
Unit weight of water (kN/m³).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Eq. 5.12.
Examples:
>>> from geoeq.lab.compaction import zav_line
>>> res = zav_line(Gs=2.70)
>>> res['dry_density'][0] > res['dry_density'][-1]
True
Source code in geoeq/lab/compaction.py
saturation_line
¶
saturation_line(Gs: float, S: float, w_range: Union[List[float], ndarray, None] = None, gamma_w: float = GAMMA_WATER) -> Dict[str, np.ndarray]
Compute a constant-saturation line on the compaction curve.
.. math::
\gamma_d = \frac{G_s \, \gamma_w}{1 + \frac{w \, G_s}{S}}
where S is a fraction (0–1).
| PARAMETER | DESCRIPTION |
|---|---|
Gs
|
Specific gravity.
TYPE:
|
S
|
Degree of saturation as a fraction (e.g. 0.8 for 80 %).
TYPE:
|
w_range
|
Water content values (%). Default
TYPE:
|
gamma_w
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.compaction import saturation_line
>>> res = saturation_line(Gs=2.70, S=0.8)
>>> all(res['dry_density'] > 0)
True
Source code in geoeq/lab/compaction.py
relative_compaction
¶
relative_compaction(gamma_d: Union[float, ndarray], gamma_d_max: float) -> Union[float, np.ndarray]
Compute relative compaction.
.. math::
RC\,(\%) = \frac{\gamma_d}{\gamma_{d,\max}} \times 100
| PARAMETER | DESCRIPTION |
|---|---|
gamma_d
|
Field dry unit weight (kN/m³).
TYPE:
|
gamma_d_max
|
Maximum dry unit weight from Proctor test (kN/m³).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float or ndarray
|
Relative compaction (%). |
Examples:
>>> from geoeq.lab.compaction import relative_compaction
>>> relative_compaction(17.5, 19.0)
92.1...
Source code in geoeq/lab/compaction.py
Permeability¶
constant_head
¶
constant_head(Q: Union[float, ndarray], L: float, A: float, h: float, t: float = 1.0) -> Union[float, np.ndarray]
Compute hydraulic conductivity from a constant-head permeability test.
.. math::
k = \frac{Q \, L}{A \, h \, t}
\qquad \text{[Das Eq.\,5.11]}
| PARAMETER | DESCRIPTION |
|---|---|
Q
|
Volume of water collected (cm³).
TYPE:
|
L
|
Length of soil specimen (cm).
TYPE:
|
A
|
Cross-sectional area of specimen (cm²).
TYPE:
|
h
|
Constant head difference (cm).
TYPE:
|
t
|
Duration of flow collection (s).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float or ndarray
|
Hydraulic conductivity k (cm/s). |
References
Das (2021), Eq. 5.11; ASTM D2434.
Examples:
>>> from geoeq.lab.permeability import constant_head
>>> round(constant_head(Q=500, L=15, A=30, h=50, t=120), 6)
0.041667
Source code in geoeq/lab/permeability.py
falling_head
¶
Compute hydraulic conductivity from a falling-head permeability test.
.. math::
k = \frac{a \, L}{A \, t} \ln\!\left(\frac{h_1}{h_2}\right)
\qquad \text{[Das Eq.\,5.13]}
| PARAMETER | DESCRIPTION |
|---|---|
a
|
Cross-sectional area of the standpipe (cm²).
TYPE:
|
L
|
Length of soil specimen (cm).
TYPE:
|
A
|
Cross-sectional area of specimen (cm²).
TYPE:
|
h1
|
Initial head in the standpipe (cm).
TYPE:
|
h2
|
Final head in the standpipe (cm), must be < h1.
TYPE:
|
t
|
Elapsed time (s).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Hydraulic conductivity k (cm/s). |
References
Das (2021), Eq. 5.13; ASTM D5084.
Examples:
>>> from geoeq.lab.permeability import falling_head
>>> k = falling_head(a=1.0, L=15, A=30, h1=100, h2=50, t=600)
>>> round(k, 7)
5.78e-04
Source code in geoeq/lab/permeability.py
Atterberg test procedure¶
liquid_limit_test
¶
liquid_limit_test(blow_count: Union[List[float], ndarray], water_content: Union[List[float], ndarray]) -> Dict[str, float]
Determine liquid limit from Casagrande cup test data.
The liquid limit is the water content at 25 blows on the semi-logarithmic flow curve:
.. math::
w = a \cdot N^b
where N is the blow count and a, b are fitted constants. LL is evaluated at N = 25.
| PARAMETER | DESCRIPTION |
|---|---|
blow_count
|
Number of blows for each trial (typically 3–5 trials spanning 15–35 blows).
TYPE:
|
water_content
|
Water content for each trial (%).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Section 4.4; ASTM D4318.
Examples:
>>> from geoeq.lab.atterberg_test import liquid_limit_test
>>> res = liquid_limit_test([15, 20, 28, 34], [42.1, 40.8, 38.5, 36.9])
>>> 38 < res['LL'] < 40
True
Source code in geoeq/lab/atterberg_test.py
CBR¶
cbr_test
¶
cbr_test(penetration: Union[List[float], ndarray], load: Union[List[float], ndarray], area: float = 19.35) -> Dict[str, float]
Process CBR test data — compute the California Bearing Ratio.
.. math::
CBR\,(\%) = \frac{P_{\text{test}}}{P_{\text{standard}}} \times 100
where :math:P_{\text{test}} is the load at 2.54 mm or 5.08 mm
penetration and :math:P_{\text{standard}} is the standard load
for crushed rock at the same penetration.
The CBR is reported as the larger of the values at 2.54 mm and 5.08 mm penetration.
| PARAMETER | DESCRIPTION |
|---|---|
penetration
|
Piston penetration values (mm).
TYPE:
|
load
|
Corresponding load values (kN).
TYPE:
|
area
|
Piston area (cm²). Standard CBR piston diameter = 49.63 mm.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
References
Das (2021), Section 5.9; ASTM D1883.
Examples:
>>> from geoeq.lab.cbr import cbr_test
>>> pen = [0, 0.64, 1.27, 2.54, 3.81, 5.08, 7.62, 10.16, 12.70]
>>> load = [0, 0.8, 1.9, 4.2, 6.1, 7.8, 10.5, 12.1, 13.2]
>>> res = cbr_test(pen, load)
>>> res['CBR'] > 0
True
Source code in geoeq/lab/cbr.py
Plot helpers¶
grain_size_plot
¶
grain_size_plot(data: Union[Dict[str, ndarray], Dict[str, Dict[str, ndarray]]], smooth: bool = False, annotation: bool = False, D_para: bool = True, Cu_para: bool = True, Cc_para: bool = True, param_pos: Union[str, Tuple[float, float]] = 'top right', save_as: Optional[str] = None, ax: Optional[Axes] = None, **kwargs) -> plt.Figure
Professional grain size distribution plot with advanced smoothing.
Args: data: Dict with 'diameter' and 'percent_finer', or Dict of Dicts for multi-source. smooth: If True, uses high-resolution PCHIP interpolation. annotation: If True, acknowledge Sieve and Hydrometer parts separately. D_para: Show markers/projection for D10, D30, D60. Cu_para: Display Cu on plot. Cc_para: Display Cc on plot. param_pos: Position of parameter box. E.g., 'top right', 'top left', or (x, y). save_as: Filename to save. ax: matplotlib axes. kwargs: matplotlib line properties.
Source code in geoeq/viz/grain_size.py
| Python | |
|---|---|
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
flow_curve_plot
¶
flow_curve_plot(blow_count: Union[List[float], ndarray], water_content: Union[List[float], ndarray], ax=None, save_as: Optional[str] = None) -> Dict
Plot the flow curve (water content vs blow count on semi-log scale).
| PARAMETER | DESCRIPTION |
|---|---|
blow_count
|
Number of blows.
TYPE:
|
water_content
|
Water content (%).
TYPE:
|
ax
|
TYPE:
|
save_as
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.atterberg_test import flow_curve_plot
>>> res = flow_curve_plot([15, 20, 28, 34], [42.1, 40.8, 38.5, 36.9])
Source code in geoeq/lab/atterberg_test.py
proctor_plot
¶
proctor_plot(water_content: Union[List[float], ndarray], dry_density: Union[List[float], ndarray], Gs: float = 2.65, show_zav: bool = True, show_sat_lines: bool = True, ax=None, save_as: Optional[str] = None) -> Dict
Plot Proctor compaction curve with ZAV line and saturation contours.
| PARAMETER | DESCRIPTION |
|---|---|
water_content
|
Water content (%).
TYPE:
|
dry_density
|
Dry unit weight (kN/m³).
TYPE:
|
Gs
|
Specific gravity for ZAV and saturation lines.
TYPE:
|
show_zav
|
Plot the zero air voids line.
TYPE:
|
show_sat_lines
|
Plot 60%, 80% saturation contours.
TYPE:
|
ax
|
TYPE:
|
save_as
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.compaction import proctor_plot
>>> w = [8, 10, 12, 14, 16, 18]
>>> gd = [17.5, 18.2, 18.8, 19.0, 18.7, 18.1]
>>> res = proctor_plot(w, gd, Gs=2.70)
Source code in geoeq/lab/compaction.py
| Python | |
|---|---|
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
oedometer_plot
¶
oedometer_plot(stress: Union[List[float], ndarray], void_ratio: Union[List[float], ndarray], show_pc: bool = True, ax=None, save_as: Optional[str] = None) -> Dict
Plot e–log(σ') curve from oedometer test data.
| PARAMETER | DESCRIPTION |
|---|---|
stress
|
Effective vertical stress (kPa).
TYPE:
|
void_ratio
|
Void ratio at each load step.
TYPE:
|
show_pc
|
If True, estimate and mark the preconsolidation pressure.
TYPE:
|
ax
|
Existing axes.
TYPE:
|
save_as
|
File path to save figure.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.consolidation import oedometer_plot
>>> res = oedometer_plot([25, 50, 100, 200, 400, 800],
... [0.88, 0.86, 0.82, 0.74, 0.62, 0.48])
Source code in geoeq/lab/consolidation.py
| Python | |
|---|---|
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | |
cv_plot
¶
cv_plot(time: Union[List[float], ndarray], deformation: Union[List[float], ndarray], method: str = 'log', H_dr: float = 1.0, ax=None, save_as: Optional[str] = None) -> Dict
Plot time–deformation data and determine :math:c_v.
For method='log', x-axis is log(time); for method='root',
x-axis is √time.
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Elapsed time (minutes).
TYPE:
|
deformation
|
Dial reading / settlement (mm).
TYPE:
|
method
|
TYPE:
|
H_dr
|
Drainage path (cm).
TYPE:
|
ax
|
TYPE:
|
save_as
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.consolidation import cv_plot
>>> t = [0.1, 0.25, 0.5, 1, 2, 4, 8, 15, 30, 60, 120, 240, 480, 1440]
>>> d = [0.0, 0.05, 0.12, 0.22, 0.35, 0.50, 0.65, 0.78, 0.88, 0.95,
... 0.99, 1.02, 1.04, 1.06]
>>> res = cv_plot(t, d, method='log', H_dr=1.0)
Source code in geoeq/lab/consolidation.py
| Python | |
|---|---|
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | |
direct_shear_plot
¶
direct_shear_plot(normal_stress: Union[List[float], ndarray], shear_stress: Union[List[float], ndarray], ax=None, save_as: Optional[str] = None) -> Dict
Plot direct shear test results with failure envelope.
Plots the (σ', τ_f) data and the best-fit Mohr–Coulomb line.
| PARAMETER | DESCRIPTION |
|---|---|
normal_stress
|
Effective normal stress on the failure plane (kPa).
TYPE:
|
shear_stress
|
Shear stress at failure (kPa).
TYPE:
|
ax
|
Existing axes.
TYPE:
|
save_as
|
File path to save.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.shear import direct_shear_plot
>>> res = direct_shear_plot([50, 100, 150], [38, 62, 86])
Source code in geoeq/lab/shear.py
permeability_plot
¶
permeability_plot(Q_values: Union[List[float], ndarray, None] = None, head_gradient: Union[List[float], ndarray, None] = None, time_values: Union[List[float], ndarray, None] = None, head_values: Union[List[float], ndarray, None] = None, test_type: str = 'constant', ax=None, save_as: Optional[str] = None) -> Dict
Plot permeability test data.
For constant-head: plots Q vs hydraulic gradient i. For falling-head: plots ln(h) vs time.
| PARAMETER | DESCRIPTION |
|---|---|
Q_values
|
Flow volumes (cm³) — for constant-head.
TYPE:
|
head_gradient
|
Hydraulic gradients — for constant-head.
TYPE:
|
time_values
|
Time readings (s) — for falling-head.
TYPE:
|
head_values
|
Head readings (cm) — for falling-head.
TYPE:
|
test_type
|
TYPE:
|
ax
|
TYPE:
|
save_as
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.permeability import permeability_plot
>>> res = permeability_plot(Q_values=[10, 20, 30],
... head_gradient=[1.0, 2.0, 3.0], test_type='constant')
Source code in geoeq/lab/permeability.py
| Python | |
|---|---|
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
cbr_plot
¶
cbr_plot(penetration: Union[List[float], ndarray], load: Union[List[float], ndarray], area: float = 19.35, ax=None, save_as: Optional[str] = None) -> Dict
Plot CBR load–penetration curve with standard reference points.
| PARAMETER | DESCRIPTION |
|---|---|
penetration
|
Penetration values (mm).
TYPE:
|
load
|
Load values (kN).
TYPE:
|
area
|
Piston area (cm²).
TYPE:
|
ax
|
TYPE:
|
save_as
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict
|
|
Examples:
>>> from geoeq.lab.cbr import cbr_plot
>>> pen = [0, 0.64, 1.27, 2.54, 3.81, 5.08, 7.62, 10.16, 12.70]
>>> load = [0, 0.8, 1.9, 4.2, 6.1, 7.8, 10.5, 12.1, 13.2]
>>> res = cbr_plot(pen, load)
Source code in geoeq/lab/cbr.py
| Python | |
|---|---|
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |