Skip to content

Index

subsurfaceio.pile_group

Pile group API.

Place piles in plan and compute group efficiency:

from subsurfaceio.pile_group import Pile, PileGroup

PileGroup(piles=[Pile(center_x=0, center_y=0, diameter=0.5)]).calculate()

Classes:

Name Description
EfficiencyFactor

Pairwise pile interaction efficiency factor.

Pile

Single pile location and diameter in a group.

PileGroup

Pile group efficiency factor calculation.

PileGroupResults

Pile group efficiency-factor results.

PileGroupResultsData

Per-pile efficiency-factor results.

PileGroupResultsMetadata

Group-level efficiency factor.

EfficiencyFactor pydantic-model

Bases: BaseModel

Pairwise pile interaction efficiency factor.

Fields:

configuration pydantic-field

configuration: Literal[
    "leading", "trailing", "side-by-side", "skewed"
]

respect_to pydantic-field

respect_to: int

value pydantic-field

value: float

Pile pydantic-model

Bases: BaseModel

Single pile location and diameter in a group.

Fields:

center property

center: tuple[float, float]

(center_x, center_y) plan coordinates.

center_x pydantic-field

center_x: float

center_y pydantic-field

center_y: float

diameter pydantic-field

diameter: float

radius property

radius: float

Pile radius in the same units as diameter.

from_ezdxf_circle classmethod

from_ezdxf_circle(e: Any) -> Self

Build a pile from an ezdxf circle entity.

Parameters:

Name Type Description Default
e Any

ezdxf circle entity.

required

Returns:

Type Description
Self

Pile at the circle center with diameter 2 * radius.

PileGroup pydantic-model

Bases: Model

Pile group efficiency factor calculation.

Force is applied from right to left. rotate() turns the group when the force is along another plan direction.

References
  • ensoftGROUPtechnicalmanual

Fields:

group_efficiency_factor property

group_efficiency_factor

piles pydantic-field

piles: list[Pile]

results pydantic-field

results: PileGroupResults | None = None

calculate

calculate() -> Self

Run the calculation and store results.

Returns:

Type Description
Self

self with results populated.

from_dxf classmethod

from_dxf(source: str | Path) -> Self

Build a pile group from circle entities in a DXF file.

Other entities are skipped. results are left unset.

Parameters:

Name Type Description Default
source str | Path

Path to a DXF file.

required

Returns:

Type Description
Self

A new pile group with one pile per circle.

get_leading staticmethod

get_leading(distance: float, diameter: float) -> float

Leading-pile efficiency factor (group-manual figure 6.5).

Parameters:

Name Type Description Default
distance float

Center-to-center spacing.

required
diameter float

Target pile diameter.

required

Returns:

Type Description
float

Efficiency factor clipped to at most 1.

get_side_by_side staticmethod

get_side_by_side(distance: float, diameter: float) -> float

Side-by-side efficiency factor (group-manual figure 6.4).

Parameters:

Name Type Description Default
distance float

Center-to-center spacing.

required
diameter float

Target pile diameter.

required

Returns:

Type Description
float

Efficiency factor clipped to at most 1.

get_trailing staticmethod

get_trailing(distance: float, diameter: float) -> float

Trailing-pile efficiency factor (group-manual figure 6.6).

Parameters:

Name Type Description Default
distance float

Center-to-center spacing.

required
diameter float

Target pile diameter.

required

Returns:

Type Description
float

Efficiency factor clipped to at most 1.

plot

plot(
    plot_module: Literal["plotly", "mpl"] = "plotly",
) -> Any

Draw the pile group in plan.

Circles and pile indexes are drawn from the coordinates. After calculate(), each pile is also labeled with its efficiency factor and the title includes the group factor.

Parameters:

Name Type Description Default
plot_module Literal['plotly', 'mpl']

Figure backend.

'plotly'

Returns:

Type Description
Any

Plotted figure for the selected backend.

Raises:

Type Description
ValueError

If plot_module is invalid.

rotate

rotate(
    angle: float, *, origin_x: float, origin_y: float
) -> Self

Rotate pile centers counter-clockwise about a plan point.

Efficiency is always computed for a force pointing left. Rotating the piles counter-clockwise is equivalent to turning that force clockwise on the original plan.

  • 0 degrees: force pointing left
  • 90 degrees: force pointing up
  • 180 degrees: force pointing right
  • 270 degrees: force pointing down

The plot arrow stays leftward because the piles move and the force axis does not. Stored results are cleared.

Parameters:

Name Type Description Default
angle float

Rotation in degrees. Positive is counter-clockwise.

required
origin_x float

Pivot x coordinate.

required
origin_y float

Pivot y coordinate.

required

Returns:

Type Description
Self

self with updated pile coordinates.

write_dxf

write_dxf(path: str | Path) -> Path

Write piles as circles to a DXF file.

Parameters:

Name Type Description Default
path str | Path

Output DXF path.

required

Returns:

Type Description
Path

The written path.

PileGroupResults pydantic-model

Bases: BaseModel

Pile group efficiency-factor results.

Fields:

data pydantic-field

data: list[PileGroupResultsData]

metadata pydantic-field

metadata: PileGroupResultsMetadata

PileGroupResultsData pydantic-model

Bases: BaseModel

Per-pile efficiency-factor results.

Fields:

efficiency_factor pydantic-field

efficiency_factor: float

efficiency_factors pydantic-field

efficiency_factors: list[EfficiencyFactor]

PileGroupResultsMetadata pydantic-model

Bases: BaseModel

Group-level efficiency factor.

Fields:

group_efficiency_factor pydantic-field

group_efficiency_factor: float