geolib.models.dstability.dstability_model

Classes

DStabilityCalculationModel(value[, names, ...])

Set Type of Calculation.

DStabilityCalculationType(value[, names, ...])

Set Type of Calculation.

DStabilityModel(*args, **data)

D-Stability is software for soft soil slope stability.

DStabilityObject(**data)

class geolib.models.dstability.dstability_model.DStabilityCalculationModel(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Set Type of Calculation.

Bishop = 1
Spencer = 3
UpliftVan = 2
class geolib.models.dstability.dstability_model.DStabilityCalculationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Set Type of Calculation.

BoundarySearch = 1
SingleCalc = 2
class geolib.models.dstability.dstability_model.DStabilityModel(*args, **data)

D-Stability is software for soft soil slope stability.

This model can read, modify and create .stix files

add_calculation(scenario_index=None, label='Calculation', notes='', set_current=True)

Add a new calculation to the model.

Parameters:
  • scenario_index (Optional[int]) – The scenario index to add the calculation to, defaults to the current scenario.

  • label (str) – Label for the calculation.

  • notes (str) – Notes for the calculation.

  • set_current (bool) – Whether to make the new calculation the current calculation.

Return type:

int

Returns:

the id of the new stage

add_excavation(points, label, notes='', scenario_index=None, stage_index=None)
Parameters:
  • points (List[Point])

  • label (str)

  • notes (str)

  • scenario_index (Optional[int])

  • stage_index (Optional[int])

add_head_line(points, label='', notes='', is_phreatic_line=False, scenario_index=None, stage_index=None)

Add head line to the model

Parameters:
  • points (List[Point]) – list of Point classes

  • label (str) – label defaults to empty string

  • notes (str) – notes defaults to empty string

  • is_phreatic_line (bool) – set as phreatic line, defaults to False

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage

Returns:

id of the added headline

Return type:

bool

add_layer(points, soil_code, label='', notes='', scenario_index=None, stage_index=None)

Add a soil layer to the model

Parameters:
  • points (List[Point]) – list of Point classes, in clockwise order (non closed simple polygon)

  • soil_code (str) – code of the soil for this layer

  • label (str) – label defaults to empty string

  • notes (str) – notes defaults to empty string

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage

Returns:

id of the added layer

Return type:

int

add_layer_and_connect_points(current_layers, new_layer)

Adds a new layer to the list of layers and connects the points of the new layer to the existing layers.

Parameters:
add_load(load, consolidations=None, scenario_index=None, stage_index=None)

Add a load to the object.

The geometry should be defined before adding loads.

If no consolidations are provided, a Consolidation with default values will be made for each SoilLayer. It is not possible to set consolidation degrees of loads afterwards since they don’t have an id.

Parameters:
  • load (DStabilityLoad) – A subclass of DStabilityLoad.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario.

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage.

  • consolidations (Optional[List[Consolidation]])

Raises:

ValueError – When the provided load is no subclass of DStabilityLoad, an invalid stage_index is provided, or the datastructure is no longer valid.

Return type:

None

add_reference_line(points, bottom_headline_id, top_head_line_id, label='', notes='', scenario_index=None, stage_index=None)

Add reference line to the model

Parameters:
  • points (List[Point]) – list of Point classes

  • bottom_headline_id (int) – id of the headline to use as the bottom headline

  • top_head_line_id (int) – id of the headline to use as the top headline

  • label (str) – label defaults to empty string

  • notes (str) – notes defaults to empty string

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage

Returns:

id of the added reference line

Return type:

int

add_reinforcement(reinforcement, scenario_index=None, stage_index=None)

Add a reinforcement to the model.

Parameters:
  • reinforcement (DStabilityReinforcement) – A subclass of DStabilityReinforcement.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario.

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage.

Returns:

Assigned id of the reinforcements (collection object of all reinforcements for a stage).

Return type:

int

Raises:

ValueError – When the provided reinforcement is no subclass of DStabilityReinforcement, an invalid stage_index is provided, or the datastructure is no longer valid.

add_scenario(label='Scenario', notes='', set_current=True)

Add a new scenario to the model.

Parameters:
  • label (str) – Label for the scenario.

  • notes (str) – Notes for the scenario.

  • set_current (bool) – Whether to make the new scenario the current scenario.

Return type:

int

Returns:

the id of the new stage

add_soil(soil)

Add a new soil to the model. The code must be unique, the id will be generated

Parameters:

soil (Soil) – a new soil

Returns:

id of the added soil

Return type:

int

add_soil_correlation(list_correlated_soil_ids)

Add a soil correlation to the model.

Parameters:

list_correlated_soil_ids (List[str]) – A list of soil ids that are correlated.

add_soil_layer_consolidations(soil_layer_id, consolidations=None, scenario_index=None, stage_index=None)

Add consolidations for a layer (layerload).

Consolidations cannot be added when adding soil layers since in the consolidations, all other soil layers need to be referred. Therefore, all soillayers in a stage should be defined before setting consolidation and the number of consolidations given should equal the amount of layers.

Parameters:
  • soil_layer_id (int) – Consolidation is set for this soil layer id.

  • consolidations (Optional[List[Consolidation]]) – List of Consolidation. Must contain a Consolidation for every other layer.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario.

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage.

Raises:

ValueError – When the provided load is no subclass of DStabilityLoad, an invalid stage_index is provided, or the datastructure is no longer valid.

Return type:

None

add_stage(scenario_index=None, label='Stage', notes='', set_current=True)

Add a new stage to the model at the given scenario index.

Parameters:
  • scenario_index (Optional[int]) – The scenario index to add the stage to, defaults to the current scenario.

  • label (str) – Label for the stage.

  • notes (str) – Notes for the stage.

  • set_current (bool) – Whether to make the new stage the current stage.

Return type:

int

Returns:

the id of the new stage

add_state_correlation(correlated_state_ids, scenario_index=None, stage_index=None)

Add state correlation between the given state point ids.

Parameters:
  • correlated_state_ids (List[int]) – The state point ids to correlate.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario.

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage.

Returns:

None

add_state_line(points, state_points, scenario_index=None, stage_index=None)

Add state line. From the Soils, only the state parameters are used.

points are a list of points with x,z coordinates state_point are a list of DStabilityStateLinePoint where ONLY the x is used, the Z will be calculated

Parameters:
  • points (List[Point]) – The geometry points of the state line.

  • state_point (List[DStabilityStatePoint]) – The list of state point values.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario.

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage.

  • state_points (List[DStabilityStateLinePoint])

Returns:

The created state line

Return type:

PersistableStateLine

add_state_point(state_point, scenario_index=None, stage_index=None)

Add state point to the model

Parameters:
  • state_point (DStabilityStatePoint) – DStabilityStatePoint class

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario

  • stage_index (Optional[int]) – stage to add to, defaults to the current stage

Returns:

id of the added add_state_point

Return type:

int

connect_layers(layer1, layer2)

Connects two polygons by adding a the missing points on the polygon edges. Returns the two new polygons.

Parameters:
current_calculation: int
current_id: int
current_scenario: int
current_stage: int
property custom_console_path: Path
datastructure: DStabilityStructure

This is the base class for all models in GEOLib.

Note that datastructure is a SerializeAsAny type, which means that the inheriting class is serialized according to its own definition (duck-typing). This is needed since Pydantic v2 as the default behavior has changed: https://docs.pydantic.dev/latest/concepts/serialization/#subclass-instances-for-fields-of-basemodel-dataclasses-typeddict

property default_console_path: Path
dstability_points_to_shapely_polygon(points)
Parameters:

points (List[PersistablePoint])

Return type:

Polygon

geolib_points_to_shapely_polygon(points)
Parameters:

points (List[Point])

Return type:

Polygon

get_calculation_index(calculation_index)
Parameters:

calculation_index (Optional[int])

static get_color_from_soil_id(soil_visualizations, soil_id)
Parameters:
Return type:

str

get_result(scenario_index=None, calculation_index=None)

Returns the results of a calculation. Calculation results are based on analysis type and calculation type.

Parameters:
  • scenario_index (Optional[int]) – Index of a scenario, if None is supplied the result of the current scenario is returned.

  • calculation_index (Optional[int]) – Index of a calculation, if None is supplied the result of the current calculation is returned.

Returns:

The analysis results of the stage.

Return type:

DStabilityResult

Raises:

ValueError – No results or calculationsettings available

get_scenario_index(scenario_index)
Parameters:

scenario_index (Optional[int])

get_slipcircle_result(scenario_index=None, calculation_index=None)

Get the slipcircle(s) of the calculation result of a given stage.

Parameters:
  • scenario_index (Optional[int]) – scenario for which to get the available results

  • calculation_index (Optional[int]) – calculation for which to get the available results

Returns:

the slipcircle for the given calculation

Return type:

Union[BishopSlipCircleResult, UpliftVanSlipCircleResult]

Raises:
  • ValueError – Result is not available for provided scenario and calculation index

  • AttributeError – When the result has no slipcircle. Try get the slipplane

get_slipplane_result(scenario_index=None, calculation_index=None)

Get the slipplanes of the calculations result of a calculation.

Parameters:
  • scenario_index (Optional[int]) – scenario for which to get the available results

  • calculation_index (Optional[int]) – calculation for which to get the available results

Returns:

the slip plane for the given calculation

Return type:

SpencerSlipPlaneResult

Raises:
  • ValueError – Result is not available for provided scenario and calculation index

  • AttributeError – When the result has no slipplane. Try get the slipcircle

get_soil(code)

Gets an existing soil with the given soil code.

Parameters:

code (str) – the code of the soil

Returns:

the soil

Return type:

PersistableSoil

get_soil_by_name(name)

Gets an existing soil with the given soil name.

Parameters:

name (str) – the name of the soil

Returns:

the soil

Return type:

PersistableSoil

static get_soil_id_from_layer_id(layers, layer_id)
Parameters:
Return type:

Optional[str]

get_stage_index(stage_index)
Parameters:

stage_index (Optional[int])

has_result(scenario_index=None, calculation_index=None)

Returns whether a calculation has a result.

Parameters:
  • scenario_index (Optional[int]) – Index of a scenario, if None the current scenario is used.

  • calculation_index (Optional[int]) – Index of a calculation, if None the current calculation is used.

Returns:

Value indicating whether the calculation has a result.

Return type:

bool

make_points_valid(points)
Parameters:

points (List[Point])

Return type:

List[PersistablePoint]

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'current_calculation': FieldInfo(annotation=int, required=False, default=-1), 'current_id': FieldInfo(annotation=int, required=False, default=-1), 'current_scenario': FieldInfo(annotation=int, required=False, default=-1), 'current_stage': FieldInfo(annotation=int, required=False, default=-1), 'datastructure': FieldInfo(annotation=DStabilityStructure, required=False, default=DStabilityStructure(waternets=[Waternet(Id='14', ContentVersion='2', PhreaticLineId=None, HeadLines=[], ReferenceLines=[], UnitWeightWater=9.81)], waternetcreatorsettings=[WaternetCreatorSettings(AdjustForUplift=False, AquiferInsideAquitardLayerId=None, AquiferLayerId=None, AquiferLayerInsideAquitardLeakageLengthInwards='NaN', AquiferLayerInsideAquitardLeakageLengthOutwards='NaN', AquitardHeadLandSide='NaN', AquitardHeadWaterSide='NaN', ContentVersion='2', DitchCharacteristics=PersistableDitchCharacteristics(DitchBottomEmbankmentSide='NaN', DitchBottomLandSide='NaN', DitchEmbankmentSide='NaN', DitchLandSide='NaN'), DrainageConstruction=PersistablePoint(X='NaN', Z='NaN'), EmbankmentCharacteristics=PersistableEmbankmentCharacteristics(EmbankmentToeLandSide='NaN', EmbankmentToeWaterSide='NaN', EmbankmentTopLandSide='NaN', EmbankmentTopWaterSide='NaN', ShoulderBaseLandSide='NaN'), EmbankmentSoilScenario=<EmbankmentSoilScenarioEnum.CLAY_EMBANKMENT_ON_CLAY: 'ClayEmbankmentOnClay'>, Id='15', InitialLevelEmbankmentTopLandSide='NaN', InitialLevelEmbankmentTopWaterSide='NaN', IntrusionLength='NaN', IsAquiferLayerInsideAquitard=False, IsDitchPresent=False, IsDrainageConstructionPresent=False, MeanWaterLevel='NaN', NormativeWaterLevel='NaN', OffsetEmbankmentToeLandSide='NaN', OffsetEmbankmentTopLandSide='NaN', OffsetEmbankmentTopWaterSide='NaN', OffsetShoulderBaseLandSide='NaN', PleistoceneLeakageLengthInwards='NaN', PleistoceneLeakageLengthOutwards='NaN', UseDefaultOffsets=True, WaterLevelHinterland='NaN')], states=[State(ContentVersion='2', Id='16', StateLines=[], StatePoints=[])], statecorrelations=[StateCorrelation(ContentVersion='2', Id='17', StateCorrelations=[])], scenarios=[Scenario(Stages=[Stage(DecorationsId='12', GeometryId='11', Id='43', Label='Stage 1', LoadsId='18', Notes='Default stage by GEOLib', ReinforcementsId='19', SoilLayersId='13', StateCorrelationsId='17', StateId='16', WaternetCreatorSettingsId='15', WaternetId='14')], Calculations=[PersistableCalculation(Id='42', Label='Calculation 1', Notes='Default calculation by GEOLib', ResultId=None, CalculationSettingsId='20')], ContentVersion='2', Id='0', Label='Scenario 1', Notes='Default Scenario by GEOLib')], soillayers=[SoilLayerCollection(ContentVersion='2', Id='13', SoilLayers=[])], soilcorrelation=SoilCorrelation(ContentVersion='2', SoilCorrelations=[]), soils=SoilCollection(ContentVersion='2', Soils=[PersistableSoil(Code='H_Aa_ht_new', Id='2', IsProbabilistic=False, Name='Embankment new', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.MOHR_COULOMB_ADVANCED: 'MohrCoulombAdvanced'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=7.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=30.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.26, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=19.3, VolumetricWeightBelowPhreaticLevel=19.3, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_Aa_ht_old', Id='3', IsProbabilistic=False, Name='Embankment old', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.MOHR_COULOMB_ADVANCED: 'MohrCoulombAdvanced'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=7.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=30.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.26, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=18.0, VolumetricWeightBelowPhreaticLevel=18.0, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_Rk_k_shallow', Id='4', IsProbabilistic=False, Name='Clay, shallow', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.23, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=14.8, VolumetricWeightBelowPhreaticLevel=14.8, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_Rk_k_deep', Id='5', IsProbabilistic=False, Name='Clay, deep', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.23, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=15.6, VolumetricWeightBelowPhreaticLevel=15.6, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_Rk_ko', Id='6', IsProbabilistic=False, Name='Organic clay', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.24, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.85, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=13.9, VolumetricWeightBelowPhreaticLevel=13.9, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_vhv_v', Id='7', IsProbabilistic=False, Name='Peat, shallow', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.3, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=10.1, VolumetricWeightBelowPhreaticLevel=10.1, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_vbv_v', Id='8', IsProbabilistic=False, Name='Peat, deep', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.27, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=11.0, VolumetricWeightBelowPhreaticLevel=11.0, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='Sand', Id='9', IsProbabilistic=False, Name='Sand', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.MOHR_COULOMB_ADVANCED: 'MohrCoulombAdvanced'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.MOHR_COULOMB_ADVANCED: 'MohrCoulombAdvanced'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=30.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.0, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=18.0, VolumetricWeightBelowPhreaticLevel=20.0, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='P_Rk_k&s', Id='10', IsProbabilistic=False, Name='Clay with silt', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.22, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=18.0, VolumetricWeightBelowPhreaticLevel=18.0, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0)), PersistableSoil(Code='H_Ro_z&k', Id='11', IsProbabilistic=False, Name='Sand with clay', Notes='', ShearStrengthModelTypeAbovePhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, ShearStrengthModelTypeBelowPhreaticLevel=<ShearStrengthModelTypePhreaticLevelInternal.SU: 'Su'>, MohrCoulombClassicShearStrengthModel=PersistableMohrCoulombClassicShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), MohrCoulombAdvancedShearStrengthModel=PersistableMohrCoulombAdvancedShearStrengthModel(Cohesion=0.0, CohesionAndFrictionAngleCorrelated=False, CohesionStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), Dilatancy=0.0, DilatancyStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), FrictionAngle=0.0, FrictionAngleStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), SuShearStrengthModel=PersistableSuShearStrengthModel(ShearStrengthRatio=0.22, ShearStrengthRatioAndShearStrengthExponentCorrelated=False, ShearStrengthRatioStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), StrengthIncreaseExponent=0.9, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0)), VolumetricWeightAbovePhreaticLevel=18.0, VolumetricWeightBelowPhreaticLevel=18.0, SuTable=PersistableSuTable(StrengthIncreaseExponent=1.0, StrengthIncreaseExponentStochasticParameter=PersistableStochasticParameter(IsProbabilistic=False, Mean=1.0, StandardDeviation=0.0), SuTablePoints=[], IsSuTableProbabilistic=False, SuTableVariationCoefficient=0.0))]), soilvisualizations=SoilVisualisation(ContentVersion='2', SoilVisualizations=[]), reinforcements=[Reinforcements(Id='19', ContentVersion='2', ForbiddenLines=[], Geotextiles=[], Nails=[])], projectinfo=ProjectInfo(Analyst='', ApplicationCreated='', ApplicationModified='', ContentVersion='2', Created=datetime.date(2024, 9, 10), CrossSection='', Date=datetime.date(2024, 9, 10), IsDataValidated=False, LastModified=datetime.date(2024, 9, 10), LastModifier='GEOLib', Path='', Project='', Remarks='Created with GEOLib 2.5.0'), nailproperties=NailProperties(ContentVersion='2', NailPropertiesForSoils=[]), loads=[Loads(Id='18', ContentVersion='2', Earthquake=PersistableEarthquake(Consolidations=[], FreeWaterFactor=0.0, HorizontalFactor=0.0, IsEnabled=False, Label='', Notes='', VerticalFactor=0.0), LayerLoads=[], LineLoads=[], Trees=[], UniformLoads=[])], decorations=[Decorations(Elevations=[], ContentVersion='2', Excavations=[], Id='12')], calculationsettings=[CalculationSettings(AnalysisType=<AnalysisTypeEnum.BISHOP_BRUTE_FORCE: 'BishopBruteForce'>, Bishop=PersistableBishopSettings(Circle=PersistableCircle(Center=PersistablePoint(X='NaN', Z='NaN'), Radius='NaN'), Label='', Notes=''), BishopBruteForce=PersistableBishopBruteForceSettings(GridEnhancements=PersistableGridEnhancements(ExtrapolateSearchSpace=True), SearchGrid=PersistableSearchGrid(BottomLeft=None, Label='', Notes='', NumberOfPointsInX=1, NumberOfPointsInZ=1, Space=1.0), SlipPlaneConstraints=PersistableSlipPlaneConstraints(IsSizeConstraintsEnabled=False, IsZoneAConstraintsEnabled=False, IsZoneBConstraintsEnabled=False, MinimumSlipPlaneDepth=0.0, MinimumSlipPlaneLength=0.0, WidthZoneA=0.0, WidthZoneB=0.0, XLeftZoneA=0.0, XLeftZoneB=0.0), TangentLines=PersistableTangentLines(BottomTangentLineZ='NaN', Label='', Notes='', NumberOfTangentLines=1, Space=0.5)), CalculationType=<CalculationTypeEnum.DETERMINISTIC: 'Deterministic'>, ContentVersion='2', Id='20', ModelFactorMean=1.05, ModelFactorStandardDeviation=0.033, Spencer=PersistableSpencerSettings(Label='', Notes='', SlipPlane=None, SlipPlaneConstraints=PersistableGeneticSlipPlaneConstraints(IsEnabled=False, MinimumAngleBetweenSlices=0.0, MinimumThrustLinePercentageInsideSlices=0.0)), SpencerGenetic=PersistableSpencerGeneticSettings(Label='', Notes='', OptionsType=<OptionsTypeEnum.DEFAULT: 'Default'>, SlipPlaneA=None, SlipPlaneB=None, SlipPlaneConstraints=PersistableGeneticSlipPlaneConstraints(IsEnabled=False, MinimumAngleBetweenSlices=0.0, MinimumThrustLinePercentageInsideSlices=0.0)), UpliftVan=PersistableUpliftVanSettings(Label='', Notes='', SlipPlane=PersistableTwoCirclesOnTangentLine(FirstCircleCenter=NullablePersistablePoint(X='NaN', Z='NaN'), FirstCircleRadius='NaN', SecondCircleCenter=NullablePersistablePoint(X='NaN', Z='NaN'))), UpliftVanParticleSwarm=PersistableUpliftVanParticleSwarmSettings(Label='', Notes='', OptionsType=<OptionsTypeEnum.DEFAULT: 'Default'>, SearchAreaA=PersistableSearchArea(Height=0.0, Label='', Notes='', TopLeft=None, Width=0.0), SearchAreaB=PersistableSearchArea(Height=0.0, Label='', Notes='', TopLeft=None, Width=0.0), SlipPlaneConstraints=PersistableSlipPlaneConstraints(IsSizeConstraintsEnabled=False, IsZoneAConstraintsEnabled=False, IsZoneBConstraintsEnabled=False, MinimumSlipPlaneDepth=0.0, MinimumSlipPlaneLength=0.0, WidthZoneA=0.0, WidthZoneB=0.0, XLeftZoneA=0.0, XLeftZoneB=0.0), TangentArea=PersistableTangentArea(Height=0.0, Label='', Notes='', TopZ='NaN')))], geometries=[Geometry(ContentVersion='2', Id='11', Layers=[])], uplift_van_results=[], uplift_van_particle_swarm_results=[], uplift_van_reliability_results=[], uplift_van_particle_swarm_reliability_results=[], spencer_results=[], spencer_genetic_algorithm_results=[], spencer_reliability_results=[], spencer_genetic_algorithm_reliability_results=[], bishop_results=[], bishop_bruteforce_results=[], bishop_reliability_results=[], bishop_bruteforce_reliability_results=[])), 'filename': FieldInfo(annotation=Union[Path, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property output: List[UpliftVanResult | UpliftVanParticleSwarmResult | UpliftVanReliabilityResult | UpliftVanParticleSwarmReliabilityResult | SpencerGeneticAlgorithmResult | SpencerReliabilityResult | SpencerGeneticAlgorithmReliabilityResult | SpencerResult | BishopBruteForceResult | BishopReliabilityResult | BishopBruteForceReliabilityResult | BishopResult | None]

Access internal dict-like datastructure of the output.

Requires a successful execute.

parse(*args, **kwargs)

Parse input or outputfile to Model, depending on extension.

property parser_provider_type: Type[DStabilityParserProvider]

Returns the parser provider type of the current concrete class.

Raises:

NotImplementedError – If not implemented in the concrete class.

Returns:

Type[BaseParserProvider] – Concrete parser provider.

plot(scenario_index=None, stage_index=None)
Parameters:
  • scenario_index (Optional[int])

  • stage_index (Optional[int])

property points

Enables easy access to the points in the internal dict-like datastructure. Also enables edit/delete for individual points.

property scenarios: List[Scenario]
serialize(location)

Support serializing to directory while developing for debugging purposes.

Parameters:

location (Union[Path, BinaryIO])

set_model(analysis_method, scenario_index=None, calculation_index=None)

Sets the model and applies the given parameters

Parameters:
  • analysis_method (DStabilityAnalysisMethod) – A subclass of DStabilityAnalysisMethod.

  • scenario_index (Optional[int]) – scenario to add to, defaults to the current scenario

  • calculation_index (Optional[int]) – calculation to add to, defaults to the current calculation

Raises:
  • ValueError – When the provided analysis method is no subclass of DStabilityAnalysisMethod,

  • an invalid stage_index is provided, the analysis method is not known or the datastructure is no longer valid.

Return type:

None

property soil_correlations: SoilCorrelation
property soils: SoilCollection

Enables easy access to the soil in the internal dict-like datastructure. Also enables edit/delete for individual soils.

to_dstability_points(shapely_object)
Parameters:

shapely_object (Union[LineString, Polygon])

Return type:

List[PersistablePoint]

to_shapely_linestring(points)
Parameters:

points (List[PersistablePoint])

Return type:

LineString

property waternets: List[Waternet]
class geolib.models.dstability.dstability_model.DStabilityObject(**data)
Parameters:

data (Any)

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'datastructure': FieldInfo(annotation=Union[Annotated[BaseModelStructure, SerializeAsAny], NoneType], required=False, default=None), 'filename': FieldInfo(annotation=Union[Path, NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.