py-pilecore 0.4.2__py3-none-any.whl → 0.5.1__py3-none-any.whl

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.
@@ -1,891 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import math
4
- from abc import ABC, abstractmethod
5
- from typing import Dict, Set, Union
6
-
7
- import numpy as np
8
- from numpy.typing import NDArray
9
-
10
- """
11
- Defines the pile property geometry classes.
12
-
13
- Notes:
14
- - The type of abstract-method property decorators are ignored as a workaround
15
- to a known mypy issue. (https://github.com/python/mypy/issues/4165)
16
- """
17
-
18
-
19
- def _get_depth_keys(d: Union[str, dict], depth: int) -> Set[str]:
20
- if isinstance(d, str):
21
- return set([])
22
- if depth == 0:
23
- return set(d.keys())
24
- else:
25
- # recurse and flatten
26
- return set(
27
- [a for diction in d.values() for a in _get_depth_keys(diction, depth - 1)]
28
- )
29
-
30
-
31
- # PileProperties inheritance structure:
32
- # -------------------------------------
33
- #
34
- # - PileProperties
35
- # - RoundPileProperties
36
- # - RectPileProperties
37
- # - TaperedPileProperties
38
-
39
-
40
- class PileProperties(ABC):
41
- """
42
- abstract base class for geometrical pile properties
43
- """
44
-
45
- _shape: str
46
-
47
- def __init__(
48
- self,
49
- pile_type_specification: Dict[str, str],
50
- alpha_s_sand: float,
51
- alpha_s_clay: float | str,
52
- alpha_p: float,
53
- beta_p: float,
54
- pile_tip_factor_s: float | int,
55
- settlement_curve: int,
56
- elastic_modulus: float | int,
57
- negative_fr_delta_factor: float | int,
58
- adhesion: float | int,
59
- is_low_vibrating: bool,
60
- is_auger: bool,
61
- height_base: float,
62
- name: str | None = None,
63
- ):
64
- """
65
- Parameters
66
- ----------
67
- pile_type_specification
68
- Keys
69
- pile_type: str
70
- One of ["concrete", "steel", "micro", "wood"]
71
- specification: str
72
- One of ["1", "2", "3", "4", "5", "6", "7"]
73
- installation: str
74
- One of ["A", "B", "C", "D", "E", "F", "G"]
75
- See Also:
76
- pilecore/lib/pile_types.json
77
- height_base : float, int
78
- height of pile base [m].
79
- alpha_s_sand
80
- Alpha s factor for coarse layers used in the positive friction calculation [-].
81
- alpha_s_clay
82
- Alpha s factor for soft layers used in the positive friction calculation [-].
83
- alpha_p
84
- Alpha p factor used in pile tip resistance calculation [-].
85
- beta_p
86
- The beta-factor 𝛽_𝑝 to account for the shape of the pile tip according to NEN9997-1 Fig 7.i.
87
- pile_tip_factor_s
88
- Factor s [-] used in pile tip resistance calculation as per NEN 9997-1 7.6.2.3 (h).
89
- settlement_curve
90
- Settlement lines for figures 7.n and 7.o of NEN-9997-1
91
- elastic_modulus : float
92
- Modulus of elasticity of the pile [MPa].
93
- negative_fr_delta_factor : float
94
- factor * φ = δ. This parameter is multiplied with phi to get the delta
95
- parameter used in negative friction calculation according to NEN-9997-1 7.3.2.2 (e).
96
- Typically values are 1.0 for piles cast in place, and 0.75 for other pile types.
97
- adhesion
98
- Adhesion value [kPa], for if the pile shaft has undergone a special treatment.
99
- Examples:
100
- - adhesion = 50 kN/m2 for synthetic coating
101
- - adhesion = 20 kN/m2 for bentonite
102
- - adhesion = 10 kN/m2 for bitumen coating
103
- See 7.3.2.2(d) of NEN 9997-1 for examples.
104
- is_low_vibrating
105
- Determines wether the pile has an installation type with low vibration.
106
- is_auger
107
- Determines wether the pile the pile is an auger pile or not.
108
- name
109
- The name of the pile instance.
110
- """
111
- self._name = name
112
- self._alpha_s_clay = alpha_s_clay
113
- self._adhesion = adhesion
114
- self._pile_tip_factor_s = pile_tip_factor_s
115
- self._pile_type_specification = pile_type_specification
116
- self._pile_type = pile_type_specification["pile_type"]
117
- self._installation = pile_type_specification["installation"]
118
- self._specification = pile_type_specification["specification"]
119
-
120
- self._alpha_s_sand = alpha_s_sand
121
- self._alpha_p = alpha_p
122
- self._beta_p = beta_p
123
- self._settlement_curve = settlement_curve
124
- self._elastic_modulus = elastic_modulus
125
- self._negative_fr_delta_factor = negative_fr_delta_factor
126
- self._is_low_vibrating = is_low_vibrating
127
- self._is_auger = is_auger
128
-
129
- self._height_base = height_base
130
-
131
- @property
132
- def name(self) -> str | None:
133
- """
134
- Pile name (optional)
135
- """
136
- if self._name is not None:
137
- return str(self._name)
138
- else:
139
- return None
140
-
141
- @property
142
- def alpha_s_clay(self) -> str | float:
143
- """
144
- Alpha s factor for soft layers used in the positive friction calculation [-].
145
- """
146
- if isinstance(self._alpha_s_clay, str):
147
- return self._alpha_s_clay
148
- else:
149
- return float(self._alpha_s_clay)
150
-
151
- @property
152
- def alpha_s_sand(self) -> float:
153
- """
154
- Alpha s factor for coarse layers used in the positive friction calculation [-].
155
- """
156
- return float(self._alpha_s_sand)
157
-
158
- @property
159
- def alpha_p(self) -> float:
160
- """
161
- Alpha p factor used in pile tip resistance calculation [-].
162
- """
163
- return float(self._alpha_p)
164
-
165
- @property
166
- def elastic_modulus(self) -> float:
167
- """
168
- Modulus of elasticity of the pile [MPa].
169
- """
170
- return float(self._elastic_modulus)
171
-
172
- @property
173
- def negative_fr_delta_factor(self) -> float:
174
- """
175
- factor * φ = δ. This parameter will be multiplied with phi to get the delta
176
- parameter used in negative friction calculation according to NEN-9997-1 7.3.2.2 (e).
177
- """
178
- return float(self._negative_fr_delta_factor)
179
-
180
- @property
181
- def is_low_vibrating(self) -> bool:
182
- """
183
- Determines wether the pile has an installation type with low vibration.
184
- """
185
- return bool(self._is_low_vibrating)
186
-
187
- @property
188
- def is_auger(self) -> bool:
189
- """
190
- Determines wether the pile the pile is an auger pile or not.
191
- """
192
- return bool(self._is_auger)
193
-
194
- @property
195
- def adhesion(self) -> float:
196
- """
197
- Adhesion value [kPa], used if the pile shaft has undergone a special treatment
198
- """
199
- return float(self._adhesion)
200
-
201
- @property
202
- def shape(self) -> str:
203
- """
204
- The shape of the pile (round or rect).
205
- """
206
- return str(self._shape)
207
-
208
- @property
209
- def pile_type(self) -> str:
210
- """
211
- The pile type of the pile in the configured locale setting.
212
- """
213
- return str(self._pile_type)
214
-
215
- @property
216
- def installation(self) -> str:
217
- """
218
- The installation of the pile.
219
- """
220
- return str(self._installation)
221
-
222
- @property
223
- def specification(self) -> str:
224
- """
225
- The specification of the pile.
226
- """
227
- return str(self._specification)
228
-
229
- @property
230
- def height_base(self) -> float:
231
- """
232
- Height of the pile base [m].
233
- """
234
- return float(self._height_base)
235
-
236
- @property
237
- def settlement_curve(self) -> int:
238
- """
239
- The settlement curve number.
240
- """
241
- return int(self._settlement_curve)
242
-
243
- @property
244
- def pile_tip_factor_s(self) -> float:
245
- """
246
- Factor s [-], used in pile tip resistance calculation as per NEN 9997-1 7.6.2.3 (h).
247
- """
248
- return float(self._pile_tip_factor_s)
249
-
250
- @property
251
- def pile_type_specification(self) -> Dict[str, str]:
252
- """
253
- A Dictionary with default pile-type definition.
254
- """
255
- return self._pile_type_specification
256
-
257
- @property
258
- @abstractmethod
259
- def circumference_pile_shaft(self) -> float:
260
- """
261
- Circumference of the pile shaft [m].
262
- """
263
- raise NotImplementedError
264
-
265
- @property
266
- @abstractmethod
267
- def circumference_pile_base(self) -> float:
268
- """
269
- Circumference of the pile base [m].
270
- """
271
- raise NotImplementedError
272
-
273
- @property
274
- @abstractmethod
275
- def area_pile_tip(self) -> float:
276
- """
277
- Cross-sectional area of the pile tip [m^2].
278
- """
279
- raise NotImplementedError
280
-
281
- @property
282
- @abstractmethod
283
- def equiv_base_diameter(self) -> float:
284
- """
285
- Equivalent base diameter [m].
286
- """
287
- raise NotImplementedError
288
-
289
- @property
290
- @abstractmethod
291
- def equiv_shaft_diameter(self) -> float:
292
- """
293
- Equivalent shaft diameter [m].
294
- """
295
- raise NotImplementedError
296
-
297
- @property
298
- def beta_p(self) -> float:
299
- """
300
- The beta-p factor 𝛽_𝑝 to account for the shape of the pile tip according to NEN9997-1 Fig 7.i.
301
- """
302
- return float(self._beta_p)
303
-
304
- @abstractmethod
305
- def get_circum_vs_depth(
306
- self,
307
- pile_tip_level: float | int,
308
- pile_head_level: float | int,
309
- depth: NDArray[np.floating],
310
- ) -> NDArray[np.floating]:
311
- """
312
- Returns an array with pile circumferences for the depths in the depth parameter.
313
-
314
- Parameters
315
- ----------
316
- pile_tip_level
317
- pile tip level in the depth array.
318
- pile_head_level
319
- pile head level in the depth array.
320
- depth : numpy.ndarray
321
- Array with depths below surface [m].
322
- """
323
- raise NotImplementedError
324
-
325
- @abstractmethod
326
- def get_area_vs_depth(
327
- self,
328
- pile_tip_level: float | int,
329
- pile_head_level: float | int,
330
- depth: NDArray[np.floating],
331
- ) -> NDArray[np.floating]:
332
- """
333
- Returns an array with cross-sectional areas for the depths in the depth parameter.
334
-
335
- Parameters
336
- ----------
337
- pile_tip_level
338
- pile tip level in the depth array.
339
- pile_head_level
340
- pile head level in the depth array.
341
- depth : numpy.ndarray
342
- Array with depths below surface [m].
343
- """
344
- raise NotImplementedError
345
-
346
-
347
- class RoundPileProperties(PileProperties):
348
- """
349
- A class with round pile properties
350
- """
351
-
352
- _shape = "round"
353
-
354
- def __init__(
355
- self,
356
- pile_type_specification: Dict[str, str],
357
- diameter_base: float | int,
358
- diameter_shaft: float | int,
359
- height_base: float | int,
360
- alpha_s_sand: float,
361
- alpha_s_clay: float | str,
362
- alpha_p: float,
363
- beta_p: float,
364
- pile_tip_factor_s: float,
365
- settlement_curve: int,
366
- elastic_modulus: float | int,
367
- negative_fr_delta_factor: float | int,
368
- adhesion: float | int,
369
- is_low_vibrating: bool,
370
- is_auger: bool,
371
- name: str | None = None,
372
- ):
373
- """
374
- Parameters
375
- ----------
376
- pile_type_specification
377
- Keys
378
- pile_type: str
379
- One of ["concrete", "steel", "micro", "wood"]
380
- specification: str
381
- One of ["1", "2", "3", "4", "5", "6", "7"]
382
- installation: str
383
- One of ["A", "B", "C", "D", "E", "F", "G"]
384
- See Also:
385
- pilecore/lib/pile_types.json
386
- diameter_base : float, int
387
- Diameter of pile base [m].
388
- diameter_shaft : float, int
389
- Diameter of pile shaft [m].
390
- height_base : float, int
391
- height of pile base [m].
392
- alpha_s_sand
393
- Alpha s factor for coarse layers used in the positive friction calculation [-].
394
- alpha_s_clay
395
- Alpha s factor for soft layers used in the positive friction calculation [-].
396
- alpha_p
397
- Alpha p factor used in pile tip resistance calculation [-].
398
- beta_p
399
- The beta-factor 𝛽_𝑝 to account for the shape of the pile tip according to NEN9997-1 Fig 7.i.
400
- pile_tip_factor_s
401
- Factor s [-] used in pile tip resistance calculation as per NEN 9997-1 7.6.2.3 (h).
402
- settlement_curve
403
- Settlement lines for figures 7.n and 7.o of NEN-9997-1
404
- elastic_modulus : float
405
- Modulus of elasticity of the pile [MPa].
406
- negative_fr_delta_factor : float
407
- factor * φ = δ. This parameter is multiplied with phi to get the delta
408
- parameter used in negative friction calculation according to NEN-9997-1 7.3.2.2 (e).
409
- Typically values are 1.0 for piles cast in place, and 0.75 for other pile types.
410
- adhesion
411
- Adhesion value [kPa], for if the pile shaft has undergone a special treatment.
412
- Examples:
413
- - adhesion = 50 kN/m2 for synthetic coating
414
- - adhesion = 20 kN/m2 for bentonite
415
- - adhesion = 10 kN/m2 for bitumen coating
416
-
417
- See 7.3.2.2(d) of NEN 9997-1 for examples.
418
- is_low_vibrating : bool
419
- Determines wether the pile has an installation type with low vibration.
420
- is_auger : bool
421
- Determines wether the pile the pile is an auger pile or not.
422
- name
423
- The name of the pile instance.
424
- """
425
- super().__init__(
426
- pile_type_specification=pile_type_specification,
427
- pile_tip_factor_s=pile_tip_factor_s,
428
- alpha_s_sand=alpha_s_sand,
429
- alpha_s_clay=alpha_s_clay,
430
- alpha_p=alpha_p,
431
- beta_p=beta_p,
432
- elastic_modulus=elastic_modulus,
433
- adhesion=adhesion,
434
- settlement_curve=settlement_curve,
435
- negative_fr_delta_factor=negative_fr_delta_factor,
436
- is_low_vibrating=is_low_vibrating,
437
- is_auger=is_auger,
438
- height_base=height_base,
439
- name=name,
440
- )
441
- self._diameter_shaft = diameter_shaft
442
- self._diameter_base = diameter_base
443
-
444
- @property
445
- def diameter_base(self) -> float:
446
- """
447
- Diameter of the pile tip/base [m].
448
- """
449
- return float(self._diameter_base)
450
-
451
- @property
452
- def diameter_shaft(self) -> float:
453
- """
454
- Diameter of the pile shaft [m].
455
- """
456
- return float(self._diameter_shaft)
457
-
458
- @property
459
- def circumference_pile_shaft(self) -> float:
460
- """
461
- Circumference of the pile shaft [m].
462
- """
463
- return float(math.pi * self.diameter_shaft)
464
-
465
- @property
466
- def circumference_pile_base(self) -> float:
467
- """
468
- Circumference of the pile tip/base [m].
469
- """
470
- return float(math.pi * self.diameter_base)
471
-
472
- @property
473
- def area_pile_tip(self) -> float:
474
- """
475
- Cross-sectional area of the pile tip/base [m].
476
- """
477
- return float(0.25 * math.pi * self.diameter_base**2)
478
-
479
- @property
480
- def area_pile_shaft(self) -> float:
481
- """
482
- Cross-sectional area of the pile shaft [m].
483
- """
484
- return float(0.25 * math.pi * self.diameter_shaft**2)
485
-
486
- @property
487
- def equiv_base_diameter(self) -> float:
488
- """
489
- Equivalent base diameter [m]. Equal to base diameter for round piles.
490
- """
491
- return float(self.diameter_base)
492
-
493
- @property
494
- def equiv_shaft_diameter(self) -> float:
495
- """
496
- Equivalent shaft diameter [m]. Equal to shaft diameter for round piles.
497
- """
498
- return float(self.diameter_shaft)
499
-
500
- def get_diameter_vs_depth(
501
- self,
502
- pile_tip_level: float | int,
503
- pile_head_level: float | int,
504
- depth: NDArray[np.floating],
505
- ) -> NDArray[np.floating]:
506
- """
507
- Returns pile diameters for given input depths.
508
-
509
- Parameters
510
- ----------
511
- pile_tip_level : float
512
- pile tip level in the depth array.
513
- pile_head_level : float
514
- pile head level in the depth array.
515
- depth : np.array
516
- Array with depths below surface [m].
517
-
518
- Returns
519
- -------
520
- np.array
521
- Array with pile diameters for the depths in the depth parameter.
522
- """
523
- diameter_vs_depth = np.zeros_like(depth)
524
- diameter_vs_depth[
525
- (depth >= pile_head_level) & (depth < pile_tip_level - self.height_base)
526
- ] = self.diameter_shaft
527
- diameter_vs_depth[
528
- (depth >= pile_tip_level - self.height_base) & (depth <= pile_tip_level)
529
- ] = self.diameter_base
530
- return diameter_vs_depth
531
-
532
- def get_circum_vs_depth(
533
- self,
534
- pile_tip_level: float | int,
535
- pile_head_level: float | int,
536
- depth: NDArray[np.floating],
537
- ) -> NDArray[np.floating]:
538
- """
539
- Returns pile circumferences for given input depths.
540
-
541
- Parameters
542
- ----------
543
- pile_tip_level : float
544
- pile tip level in the depth array.
545
- pile_head_level : float
546
- pile head level in the depth array.
547
- depth : np.array
548
- Array with depths below surface [m].
549
-
550
- Returns
551
- -------
552
- np.array
553
- Array with pile circumferences for the depths in the depth parameter.
554
- """
555
- return (
556
- self.get_diameter_vs_depth(
557
- pile_tip_level=pile_tip_level,
558
- pile_head_level=pile_head_level,
559
- depth=depth,
560
- )
561
- * math.pi
562
- )
563
-
564
- def get_area_vs_depth(
565
- self,
566
- pile_tip_level: float | int,
567
- pile_head_level: float | int,
568
- depth: NDArray[np.floating],
569
- ) -> NDArray[np.floating]:
570
- """
571
- Returns cross-sectional areas of the pile for given input depths.
572
-
573
- Parameters
574
- ----------
575
- pile_tip_level : float
576
- pile tip level in the depth array.
577
- pile_head_level : float
578
- pile head level in the depth array.
579
- depth : np.array
580
- Array with depths below surface [m].
581
-
582
- Returns
583
- -------
584
- np.array
585
- Array with cross-sectional areas for the depths in the depth parameter.
586
- """
587
- return (
588
- self.get_diameter_vs_depth(
589
- pile_tip_level=pile_tip_level,
590
- pile_head_level=pile_head_level,
591
- depth=depth,
592
- )
593
- / 2
594
- ) ** 2 * math.pi
595
-
596
-
597
- class RectPileProperties(PileProperties):
598
- """
599
- A class with rectangular pile properties
600
- """
601
-
602
- _shape = "rect"
603
-
604
- def __init__(
605
- self,
606
- pile_type_specification: Dict[str, str],
607
- width_base_large: float | int,
608
- width_base_small: float | int,
609
- width_shaft_large: float | int,
610
- width_shaft_small: float | int,
611
- height_base: float | int,
612
- alpha_s_sand: float,
613
- alpha_s_clay: float | str,
614
- alpha_p: float,
615
- beta_p: float,
616
- pile_tip_factor_s: float | int,
617
- settlement_curve: int,
618
- elastic_modulus: float | int,
619
- negative_fr_delta_factor: float | int,
620
- adhesion: float | int,
621
- is_low_vibrating: bool,
622
- is_auger: bool,
623
- name: str | None = None,
624
- ):
625
- """
626
- Parameters
627
- ----------
628
- pile_type_specification
629
- Keys
630
- pile_type: str
631
- One of ["concrete", "steel", "micro", "wood"]
632
- specification: str
633
- One of ["1", "2", "3", "4", "5", "6", "7"]
634
- installation: str
635
- One of ["A", "B", "C", "D", "E", "F", "G"]
636
- See Also:
637
- pilecore/lib/pile_types.json
638
- width_base_large: Union[float, int]
639
- Largest dimension of the pile base [m].
640
- width_base_small: Union[float, int]
641
- Smallest dimension of the pile base [m].
642
- width_shaft_large: Union[float, int]
643
- Largest dimension of the pile shaft [m].
644
- width_shaft_small: Union[float, int]
645
- Smallest dimension of the pile shaft [m].
646
- height_base: Union[float, int]
647
- Height of pile base [m].
648
- alpha_s_sand
649
- Alpha s factor for coarse layers used in the positive friction calculation [-].
650
- alpha_s_clay
651
- Alpha s factor for soft layers used in the positive friction calculation [-].
652
- alpha_p
653
- Alpha p factor used in pile tip resistance calculation [-].
654
- beta_p
655
- The beta-factor 𝛽_𝑝 to account for the shape of the pile tip according to NEN9997-1 Fig 7.i.
656
- pile_tip_factor_s
657
- Factor s [-] used in pile tip resistance calculation as per NEN 9997-1 7.6.2.3 (h).
658
- settlement_curve
659
- Settlement lines for figures 7.n and 7.o of NEN-9997-1
660
- elastic_modulus
661
- Modulus of elasticity of the pile [MPa].
662
- negative_fr_delta_factor
663
- factor * φ = δ. This parameter is multiplied with phi to get the delta
664
- parameter used in negative friction calculation according to NEN-9997-1 7.3.2.2 (e).
665
- Typically values are 1.0 for piles cast in place, and 0.75 for other pile types.
666
- adhesion
667
- Adhesion value [kPa], for if the pile shaft has undergone a special treatment.
668
- Examples:
669
- - adhesion = 50 kN/m2 for synthetic coating
670
- - adhesion = 20 kN/m2 for bentonite
671
- - adhesion = 10 kN/m2 for bitumen coating
672
-
673
- See 7.3.2.2(d) of NEN 9997-1 for examples.
674
- is_low_vibrating
675
- Determines wether the pile has an installation type with low vibration.
676
- is_auger
677
- Determines wether the pile the pile is an auger pile or not.
678
- name
679
- The name of the pile instance.
680
- """
681
- super().__init__(
682
- pile_type_specification=pile_type_specification,
683
- alpha_s_sand=alpha_s_sand,
684
- alpha_s_clay=alpha_s_clay,
685
- alpha_p=alpha_p,
686
- beta_p=beta_p,
687
- pile_tip_factor_s=pile_tip_factor_s,
688
- settlement_curve=settlement_curve,
689
- elastic_modulus=elastic_modulus,
690
- adhesion=adhesion,
691
- negative_fr_delta_factor=negative_fr_delta_factor,
692
- is_low_vibrating=is_low_vibrating,
693
- is_auger=is_auger,
694
- height_base=height_base,
695
- name=name,
696
- )
697
- self._width_base_large = width_base_large
698
- self._width_base_small = width_base_small
699
- self._width_shaft_large = width_shaft_large
700
- self._width_shaft_small = width_shaft_small
701
-
702
- @property
703
- def width_base_large(self) -> float:
704
- """
705
- Largest dimension of the pile base [m].
706
- """
707
- return self._width_base_large
708
-
709
- @property
710
- def width_base_small(self) -> float:
711
- """
712
- Smallest dimension of the pile base [m].
713
- """
714
- return self._width_base_small
715
-
716
- @property
717
- def width_shaft_large(self) -> float:
718
- """
719
- Largest dimension of the pile shaft [m].
720
- """
721
- return self._width_shaft_large
722
-
723
- @property
724
- def width_shaft_small(self) -> float:
725
- """
726
- Smallest dimension of the pile shaft [m].
727
- """
728
- return self._width_shaft_small
729
-
730
- @property
731
- def circumference_pile_shaft(self) -> float:
732
- """
733
- Circumference of the pile shaft [m].
734
- """
735
- return float(2 * self.width_shaft_large + 2 * self.width_shaft_small)
736
-
737
- @property
738
- def circumference_pile_base(self) -> float:
739
- """
740
- Circumference of the pile tip/base [m].
741
- """
742
- return float(2 * self.width_base_large + 2 * self.width_base_small)
743
-
744
- @property
745
- def area_pile_tip(self) -> float:
746
- """
747
- Cross-sectional area of the pile tip/base [m].
748
- """
749
- return float(self.width_base_large * self.width_base_small)
750
-
751
- @property
752
- def area_pile_shaft(self) -> float:
753
- """
754
- Cross-sectional area of the pile shaft [m].
755
- """
756
- return float(self.width_shaft_large * self.width_shaft_small)
757
-
758
- @property
759
- def equiv_base_diameter(self) -> float:
760
- """
761
- Equivalent base diameter [m] according to NEN-9997-1+C2_2017
762
- paragraphs 1.5.2.106a and 7.6.2.3.(10)(e).
763
-
764
- Specifically: returns self.width_base_small
765
- if self.width_base_large > (1,5 * self.width_base_small)
766
- """
767
- a_min = self.width_base_small
768
- b_max = self.width_base_large
769
- if b_max > (1.5 * a_min):
770
- return a_min
771
- return float(1.13 * a_min * math.sqrt(b_max / a_min))
772
-
773
- @property
774
- def equiv_shaft_diameter(self) -> float:
775
- """
776
- Equivalent base diameter [m] according to NEN-9997-1+C2_2017
777
- paragraphs 1.5.2.106b and 7.6.2.3.(10)(e).
778
-
779
- Specifically: returns self.width_shaft_small
780
- if self.width_shaft_large > (1,5 * self.width_shaft_small)
781
- """
782
- a_min = self.width_shaft_small
783
- b_max = self.width_shaft_large
784
- if b_max > (1.5 * a_min):
785
- return a_min
786
- return float(1.13 * a_min * math.sqrt(b_max / a_min))
787
-
788
- def get_circum_vs_depth(
789
- self,
790
- pile_tip_level: float | int,
791
- pile_head_level: float | int,
792
- depth: NDArray[np.floating],
793
- ) -> NDArray[np.floating]:
794
- """
795
- Returns pile circumferences for given input depths.
796
-
797
- Parameters
798
- ----------
799
- pile_tip_level : float
800
- pile tip level in the depth array.
801
- pile_head_level : float
802
- pile head level in the depth array.
803
- depth : np.array
804
- Array with depths below surface [m].
805
-
806
- Returns
807
- -------
808
- np.array
809
- Array with pile circumferences for the depths in the depth parameter.
810
- """
811
- circum_vs_depth = np.zeros_like(depth)
812
- circum_vs_depth[
813
- (depth >= pile_head_level) & (depth < pile_tip_level - self.height_base)
814
- ] = self.circumference_pile_shaft
815
- circum_vs_depth[
816
- (depth >= pile_tip_level - self.height_base) & (depth <= pile_tip_level)
817
- ] = self.circumference_pile_base
818
- return circum_vs_depth
819
-
820
- def get_area_vs_depth(
821
- self,
822
- pile_tip_level: float | int,
823
- pile_head_level: float | int,
824
- depth: NDArray[np.floating],
825
- ) -> NDArray[np.floating]:
826
- """
827
- Returns cross-sectional areas of the pile for given input depths.
828
-
829
- Parameters
830
- ----------
831
- pile_tip_level : float
832
- pile tip level in the depth array.
833
- pile_head_level : float
834
- pile head level in the depth array.
835
- depth : np.array
836
- Array with depths below surface [m].
837
-
838
- Returns
839
- -------
840
- np.array
841
- Array with cross-sectional areas for the depths in the depth parameter.
842
- """
843
- area_vs_depth = np.zeros_like(depth)
844
- area_vs_depth[
845
- (depth >= pile_head_level) & (depth <= pile_tip_level - self.height_base)
846
- ] = self.area_pile_shaft
847
- area_vs_depth[
848
- (depth > pile_tip_level - self.height_base) & (depth <= pile_tip_level)
849
- ] = self.area_pile_tip
850
- return area_vs_depth
851
-
852
-
853
- def create_pile_properties_from_api_response(response_dict: dict) -> PileProperties:
854
- shape = response_dict["type"]
855
- props = response_dict["props"]
856
-
857
- kwargs = dict(
858
- height_base=props["height_base"],
859
- pile_type_specification=props["pile_type_specification"],
860
- alpha_s_sand=props["alpha_s_sand"],
861
- alpha_s_clay=props["alpha_s_clay"],
862
- alpha_p=props["alpha_p"],
863
- beta_p=props["beta_p"],
864
- pile_tip_factor_s=props["pile_tip_factor_s"],
865
- settlement_curve=props["settlement_curve"],
866
- elastic_modulus=props["elastic_modulus"],
867
- negative_fr_delta_factor=props["negative_fr_delta_factor"],
868
- adhesion=props["adhesion"],
869
- is_low_vibrating=props["is_low_vibrating"],
870
- is_auger=props["is_auger"],
871
- )
872
-
873
- if "name" in props.keys():
874
- kwargs.update(name=props["name"])
875
-
876
- if shape == "round":
877
- return RoundPileProperties(
878
- diameter_base=props["diameter_base"],
879
- diameter_shaft=props["diameter_shaft"],
880
- **kwargs,
881
- )
882
- elif shape == "rect":
883
- return RectPileProperties(
884
- width_base_large=props["width_base_large"],
885
- width_base_small=props["width_base_small"],
886
- width_shaft_large=props["width_shaft_large"],
887
- width_shaft_small=props["width_shaft_small"],
888
- **kwargs,
889
- )
890
- else:
891
- raise ValueError(f"Received unknown pile-type: {shape}.")