UserDefinedFunctions#

User-defined strength functions (Shear/Normal, C/Phi, Discrete, Undrained/Vertical stress). These are project-level function definitions; materials of the corresponding strength type select one by index via StrengthProperties.setStrengthType and setFunctionSelectionIndex.

class GeneralizedAnisotropicInputType(*values)#

Bases: Enum

ANGLE_RANGE = 1#
ANGLE_OR_SURFACE = 2#
class GeneralizedAnisotropicAngleSurfaceDefinitionType(*values)#

Bases: Enum

ANGLE = 1#
SURFACE = 2#
class GeneralizedAnisotropicAngleSurfaceMappingType(*values)#

Bases: Enum

A_B = 1#
COSINE = 3#
LINEAR = 2#
class DiscreteFunctionType(*values)#

Bases: Enum

UNDRAINED = 1#
DRAINED = 2#
GENERALIZED_HOEK_BROWN = 3#
class DInterpolationType(*values)#

Bases: Enum

THIN_PLATE_SPLINE = 1#
MODIFIED_CHUGH = 2#
LOCAL_THIN_PLATE_SPLINE = 3#
TIN_TRIANGULATION = 4#
INVERSE_DISTANCE = 5#
LINEAR_BY_ELEVATION = 6#
CHUGH = 7#
KRIGING = 8#
class DiscreteFunctionSymbol(*values)#

Bases: Enum

SQUARE = 1#
TRIANGLE = 2#
RHOMBUS = 3#
CIRCULE = 4#
VERTICAL_CROSS = 5#
DIAGONAL_CROSS = 6#
DOT = 7#
class ShearNormalPoint(effective_normal_stress: float, shear_stress: float)#

Bases: object

getEffectiveNormalStress() → float#
getShearStress() → float#
class ShearNormalFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Shear/Normal strength functions (tau vs sigma).

listFunctions() → List[Tuple[int, str]]#
getFunction(function_index: int) → Tuple[str, List[ShearNormalPoint]]#
setFunction(function_index: int, name: str, points: List[ShearNormalPoint])#
setFunctionName(function_index: int, name: str)#
getFunctionName(function_index: int) → str#
getFunctionPoints(function_index: int) → List[ShearNormalPoint]#
setFunctionPoints(function_index: int, points: List[ShearNormalPoint])#
addFunction(name: str, points: List[ShearNormalPoint]) → int#
deleteFunction(function_index: int)#
class ShearNormalStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: Shear-Normal Function Example

getSelectedFunctionIndex() → int#
setSelectedFunctionIndex(index: int)#
class CPhiPoint(effective_normal_stress: float, phi: float, cohesion: float)#

Bases: object

getEffectiveNormalStress() → float#
getPhi() → float#
getCohesion() → float#
class CPhiFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

C/Phi strength functions (normal, cohesion, phi points).

listFunctions() → List[Tuple[int, str]]#
getFunction(function_index: int) → Tuple[str, List[CPhiPoint]]#
setFunction(function_index: int, name: str, points: List[CPhiPoint])#
setFunctionName(function_index: int, name: str)#
getFunctionName(function_index: int) → str#
getFunctionPoints(function_index: int) → List[CPhiPoint]#
setFunctionPoints(function_index: int, points: List[CPhiPoint])#
addFunction(name: str, points: List[CPhiPoint]) → int#
deleteFunction(function_index: int)#
class CPhiStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: C-Phi Function Example

getSelectedFunctionIndex() → int#
setSelectedFunctionIndex(index: int)#
class UndrainedVerticalStressPoint(effective_vertical_stress: float, undrained_strength: float)#

Bases: object

getEffectiveVerticalStress() → float#
getUndrainedStrength() → float#
class UndrainedVerticalFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Undrained/Vertical stress strength functions (x-y points).

listFunctions() → List[Tuple[int, str]]#
getFunction(function_index: int) → Tuple[str, List[UndrainedVerticalStressPoint]]#
setFunction(function_index: int, name: str, points: List[UndrainedVerticalStressPoint])#
setFunctionName(function_index: int, name: str)#
getFunctionName(function_index: int) → str#
getFunctionPoints(function_index: int) → List[UndrainedVerticalStressPoint]#
setFunctionPoints(function_index: int, points: List[UndrainedVerticalStressPoint])#
addFunction(name: str, points: List[UndrainedVerticalStressPoint]) → int#
deleteFunction(function_index: int)#
class UndrainedVerticalStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: Undrained Vertical Function Example

getSelectedFunctionIndex() → int#
setSelectedFunctionIndex(index: int)#
class DiscretePoint(x: float, y: float, cohesion=0.0, phi=0.0, gsi=50.0, mi=10.0, d=0.0, ucs=50000.0)#

Bases: object

getX() → float#
getY() → float#
getCohesion() → float#
getPhi() → float#
getGsi() → float#
getMi() → float#
getD() → float#
getUcs() → float#
class DiscreteFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Discrete strength functions (x, y, coh, phi, gsi, mi, d, ucs per point; fn_type and interpolation).

listFunctions() → List[Tuple[int, str]]#
getFunction(function_index: int) → Tuple[str, DiscreteFunctionType, DInterpolationType, DiscreteFunctionSymbol, int, bool, int, List[DiscretePoint]]#
setFunction(function_index: int, name: str, fn_type: DiscreteFunctionType, interpolation: DInterpolationType, symbol: DiscreteFunctionSymbol, exterior_color: int, use_interior_color: bool, interior_color: int, points: List[DiscretePoint])#
getFunctionName(function_index: int) → str#
setFunctionName(function_index: int, name: str)#
getFunctionPoints(function_index: int) → List[DiscretePoint]#
setFunctionPoints(function_index: int, points: List[DiscretePoint])#
getFunctionType(function_index: int) → DiscreteFunctionType#
setFunctionType(function_index: int, function_type: DiscreteFunctionType)#
getInterpolationType(function_index: int) → DInterpolationType#
setInterpolationType(function_index: int, interp_type: DInterpolationType)#
getSymbolType(function_index: int) → DiscreteFunctionSymbol#
setSymbolType(function_index: int, symbol: DiscreteFunctionSymbol)#
getSymbolExteriorColor(function_index: int) → int#
setSymbolExteriorColor(function_index: int, color: int)#
getUseSymbolInteriorColor(function_index: int) → bool#
setUseSymbolInteriorColor(function_index: int, use: bool)#
getSymbolInteriorColor(function_index: int) → int#
setSymbolInteriorColor(function_index: int, color: int)#
addFunction(name: str, points: List[DiscretePoint], fn_type=DiscreteFunctionType.UNDRAINED, interpolation=DInterpolationType.LOCAL_THIN_PLATE_SPLINE, symbol=DiscreteFunctionSymbol.TRIANGLE, exterior_color=0, use_interior_color=False, interior_color=256) → int#
deleteFunction(function_index: int)#
class DiscreteStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: Discrete Function Example

getSelectedFunctionIndex() → int#
setSelectedFunctionIndex(index: int)#
class AnisotropicPoint(angle: float, cohesion: float, phi: float)#

Bases: object

getAngle() → float#
getCohesion() → float#
getPhi() → float#
class AnisotropicFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Anisotropic strength functions (angle vs cohesion, phi).

listFunctions() → List[Tuple[int, str]]#
getFunction(function_index: int) → Tuple[str, List[AnisotropicPoint]]#
setFunction(function_index: int, name: str, points: List[AnisotropicPoint])#
setFunctionName(function_index: int, name: str)#
getFunctionName(function_index: int) → str#
getFunctionPoints(function_index: int) → List[AnisotropicPoint]#
setFunctionPoints(function_index: int, points: List[AnisotropicPoint])#
addFunction(name: str, points: List[AnisotropicPoint]) → int#
deleteFunction(function_index: int)#
class AnisotropicFunctionStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: Anisotropic Function Example

getSelectedFunctionIndex() → int#
setSelectedFunctionIndex(index: int)#
getUseTensileStrength() → bool#
setUseTensileStrength(use_tensile_strength: bool)#
getTensileStrength() → float#
setTensileStrength(tensile_strength: float)#
class AngleRangeGeneralizedAnisotropicPoint(angle: float, material: int)#

Bases: object

getAngle() → float#
getMaterial() → int#
class AngleOrSurfaceGeneralizedAnisotropicPoint(angle: float, surface: int, a: float, b: float, material: int)#

Bases: object

getAngle() → float#
getSurface() → int#
getA() → float#
getB() → float#
getMaterial() → int#
class GeneralizedAnisotropicFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Generalized Anisotropic strength functions - supports both angle range and angle/surface types.

listAngleRangeFunctions() → List[Tuple[int, str]]#
getAngleRangeFunction(function_index: int) → Tuple[str, List[AngleRangeGeneralizedAnisotropicPoint]]#
setAngleRangeFunction(function_index: int, name: str, points: List[AngleRangeGeneralizedAnisotropicPoint])#
addAngleRangeFunction(name: str, points: List[AngleRangeGeneralizedAnisotropicPoint]) → int#
deleteAngleRangeFunction(function_index: int)#
listAngleOrSurfaceFunctions() → List[Tuple[int, str]]#
getAngleOrSurfaceFunction(function_index: int) → Tuple[str, int, int, int, List[AngleOrSurfaceGeneralizedAnisotropicPoint]]#
setAngleOrSurfaceFunction(function_index: int, name: str, base_material: int, anisotropy_definition: GeneralizedAnisotropicAngleSurfaceDefinitionType, mapping_type: GeneralizedAnisotropicAngleSurfaceMappingType, points: List[AngleOrSurfaceGeneralizedAnisotropicPoint])#
addAngleOrSurfaceFunction(name: str, base_material: int, anisotropy_definition: GeneralizedAnisotropicAngleSurfaceDefinitionType, mapping_type: GeneralizedAnisotropicAngleSurfaceMappingType, points: List[AngleOrSurfaceGeneralizedAnisotropicPoint]) → int#
deleteAngleOrSurfaceFunction(function_index: int)#
getBaseMaterial(function_index: int) → int#
setBaseMaterial(function_index: int, base_material: int)#
getAnisotropyDefinition(function_index: int) → GeneralizedAnisotropicAngleSurfaceDefinitionType#
setAnisotropyDefinition(function_index: int, anisotropy_definition: GeneralizedAnisotropicAngleSurfaceDefinitionType)#
getMappingType(function_index: int) → GeneralizedAnisotropicAngleSurfaceMappingType#
setMappingType(function_index: int, mapping_type: GeneralizedAnisotropicAngleSurfaceMappingType)#
class GeneralizedAnisotropicStrength(model_id: str, material_id: str, client: Client)#

Bases: object

Examples: Code Snippet: Generalized Anisotropic Function

getSelectedAngleRangeFunctionIndex() → int#
setSelectedAngleRangeFunctionIndex(index: int)#
getSelectedAngleOrSurfaceFunctionIndex() → int#
setSelectedAngleOrSurfaceFunctionIndex(index: int)#
getInputType() → GeneralizedAnisotropicInputType#
setInputType(input_type: GeneralizedAnisotropicInputType)#
class MultipleJointOption(*values)#

Bases: Enum

WORST_CASE = 1#
CLOSEST = 2#
class GeneralizedAnisotropicAdvancedSettings(model_id: str, client: Client)#

Bases: object

getMultipleJointOption() → MultipleJointOption#
setMultipleJointOption(joint_option: MultipleJointOption)#
getUseBaseMaterialStrengthIfWeakerThanJoint() → bool#
setUseBaseMaterialStrengthIfWeakerThanJoint(use: bool)#
class UserDefinedFunctions(model_id: str, client: Client)#

Bases: _BaseFunctionHelper

Examples: Code Snippet: User Defined Functions

Access to all user-defined strength functions for the model.