rsseismic.ElementTestLayer module#

class rsseismic.ElementTestLayer.ElementTestLayer(client: Client, modelId: str, elementTestLayerId: str, *, sourceLayerId: str = '', profileName: str = '')#

Bases: _ProxyObject, SoilLayerPropertiesMixin

Working copy of a soil layer for Single Element Test scripting.

Obtain an instance from layer.createElementTestLayer() on a SoilLayer. Changes made here do not modify the live profile layer.

Configure the working copy with the familiar get* / set* helpers (the same soil-model and pore-pressure options available in the Single Element Test dialog). Properties outside that dialog set are rejected by the server. Then call runSingleElementTest with a strain path to compute results as a pandas DataFrame. You can reconfigure and run again on the same object.

Prefer closing when finished (close() or a with block). Closing is optional for short scripts because the server also clears working copies when the project model closes.

property elementTestLayerId: str#

Server ID of this Single Element Test working copy.

runSingleElementTest(strainPath: Sequence[StrainPathSegment | Sequence[Any] | Mapping[str, Any]], *, enableDissipation: bool | None = None, topBoundaryPermeable: bool | None = None, bottomBoundaryPermeable: bool | None = None, timestep: float | None = None) → pandas.DataFrame#

Run a strain-controlled Single Element Test on this working copy.

Strain values use percent (%), matching the Single Element Test dialog. Dissipation options are run-time settings (not layer properties). When the pore-pressure model is None, the server ignores or forces dissipation off.

Parameters:
  • strainPath – One or more segments. Each segment may be a StrainPathSegment, a (startingStrain, endingStrain, increments) sequence, or a dict with those keys. increments must be greater than zero.

  • enableDissipation – Optional. Enable pore-pressure dissipation for this run.

  • topBoundaryPermeable – Optional. Top drainage boundary for dissipation.

  • bottomBoundaryPermeable – Optional. Bottom drainage boundary for dissipation.

  • timestep – Optional. Dissipation time step used when dissipation is enabled.

Returns:

A pandas DataFrame of element-test results. Column units are stored in dataframe.attrs["column_units"] when the server provides them.

Raises:
  • ValueError – If strainPath is empty or a segment is malformed.

  • ScriptingError – If this working copy is already closed, or the server rejects the run.

close() → None#

Release this Single Element Test working copy on the server.

Safe to call more than once. After close, get* / set* and runSingleElementTest are no longer available. Closing is recommended for long-running sessions that create many working copies; it is optional when the project model will close soon, because the server clears remaining copies then.