rs2.interpreter package

rs2.interpreter.InterpreterEnums module

class rs2.interpreter.InterpreterEnums.ExportResultType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

SOLID_TOTAL_STRESS_SIGMA_ONE = 'INTERPRET_SIGMA_ONE'
SOLID_TOTAL_STRESS_SIGMA_THREE = 'INTERPRET_SIGMA_THREE'
SOLID_TOTAL_STRESS_SIGMA_Z = 'INTERPRET_SIGMA_ZED'
STRENGTH_FACTOR = 'INTERPRET_STRENGTH_FACTORS'
SOLID_DISPLACEMENT_HORIZONTAL_DISPLACEMENT_ABS = 'INTERPRET_X_DISP_ABS'
SOLID_DISPLACEMENT_VERTICAL_DISPLACMENT_ABS = 'INTERPRET_Y_DISP_ABS'
SOLID_DISPLACEMENT_TOTAL_DISPLACEMENT = 'INTERPRET_TOTAL_DISPLACE'
STRENGTH_FACTOR_WITH_UBIQUITOUS_JOINTS = 'INTERPRET_UBIQUITOUS'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_ONE = 'INTERPRET_SIGMA_ONE_EFF'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_THREE = 'INTERPRET_SIGMA_THREE_EFF'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_Z = 'INTERPRET_SIGMA_Z_EFF'
SEEPAGE_PORE_PRESSURE = 'INTERPRET_PORE_PRESSURE'
SEEPAGE_EXCESS_PORE_PRESSURE = 'INTERPRET_EXCESS_PWP'
SEEPAGE_DEGREE_OF_SATURATION = 'INTERPRET_DEGREE_SATURATION'
SEEPAGE_PRESSURE_HEAD = 'INTERPRET_PRESSUREHEAD'
SEEPAGE_TOTAL_HEAD = 'INTERPRET_TOTAL_HEAD'
SEEPAGE_HORIZONTAL_DISCHARGE_VELOCITY = 'INTERPRET_X_FLUX_SIGNED'
SEEPAGE_VERTICAL_DISCHARGE_VELOCITY = 'INTERPRET_Y_FLUX_SIGNED'
SEEPAGE_HORIZONTAL_DISCHARGE_VELOCITY_ABS = 'INTERPRET_X_FLUX_ABS'
SEEPAGE_VERTICAL_DISCHARGE_VELOCITY_ABS = 'INTERPRET_Y_FLUX_ABS'
SEEPAGE_TOTAL_DISCHARGE_VELOCITY = 'INTERPRET_TOTAL_FLUX'
SEEPAGE_HORIZONTAL_HYDRAULIC_GRADIENT_ABS = 'INTERPRET_HYD_GRAD_X_ABS'
SEEPAGE_VERTICAL_HYDARULIC_GRADIENT_ABS = 'INTERPRET_HYD_GRAD_Y_ABS'
SEEPAGE_HORIZONTAL_HYDRAULIC_GRADIENT = 'INTERPRET_HYD_GRAD_X_SIGNED'
SEEPAGE_VERTICAL_HYDARULIC_GRADIENT = 'INTERPRET_HYD_GRAD_Y_SIGNED'
SEEPAGE_TOTAL_HYDRAULIC_GRADIENT = 'INTERPRET_HYD_GRAD_TOTAL'
SEEPAGE_HORIZONTAL_PERMEABILITY = 'INTERPRET_PERMEABILITY_X'
SEEPAGE_VERTICAL_PERMEABILITY = 'INTERPRET_PERMEABILITY_Y'
SEEPAGE_YIELDED_ELEMENTS = 'INTERPRET_YIELDED_ELEMENTS'
SOLID_STRAIN_VOLUMETRIC_STRAIN = 'INTERPRET_STRAIN_VOLUMETRIC'
SOLID_STRAIN_MAX_SHEAR_STRAIN = 'INTERPRET_STRAIN_MAX_SHEAR'
SOLID_DISPLACEMENT_HORIZONTAL_DISPLACEMENT = 'INTERPRET_X_DISP_SIGNED'
SOLID_DISPLACEMENT_VERTICAL_DISPLACEMENT = 'INTERPRET_Y_DISP_SIGNED'
SOLID_TOTAL_STRESS_MEAN_STRESS = 'INTERPRET_STRESS_P'
SOLID_TOTAL_STRESS_VON_MISES_STRESS = 'INTERPRET_STRESS_Q'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_MEAN_STRESS = 'INTERPRET_STRESS_P_EFF'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_VON_MISES_STRESS = 'INTERPRET_STRESS_Q_EFF'
SOLID_TOTAL_STRESS_SIGMA_XX = 'INTERPRET_SIGMA_XX'
SOLID_TOTAL_STRESS_SIGMA_YY = 'INTERPRET_SIGMA_YY'
SOLID_TOTAL_STRESS_SIGMA_XY = 'INTERPRET_SIGMA_XY'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_XX = 'INTERPRET_SIGMA_XX_EFF'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_YY = 'INTERPRET_SIGMA_YY_EFF'
SOLID_EFFECTIVE_STRESS_EFFECTIVE_SIGMA_XY = 'INTERPRET_SIGMA_XY_EFF'
SOLID_TOTAL_STRESS_DIFFERENTIAL_STRESS = 'INTERPRET_STRESS_DIFFERENTIAL'
SOLID_STRAIN_STRAIN_XX = 'INTERPRET_STRAIN_XX'
SOLID_STRAIN_STRAIN_YY = 'INTERPRET_STRAIN_YY'
SOLID_STRAIN_STRAIN_ZZ = 'INTERPRET_STRAIN_ZZ'
SOLID_STRAIN_STRAIN_XY = 'INTERPRET_STRAIN_XY'
SOLID_STRAIN_MAJOR_PRINCIPAL_STRAIN = 'INTERPRET_STRAIN_P_MAJOR'
SOLID_STRAIN_MEAN_PRINCIPAL_STRAIN = 'INTERPRET_STRAIN_P_MEAN'
SOLID_STRAIN_MINOR_PRINCIPAL_STRAIN = 'INTERPRET_STRAIN_P_MINOR'
PLASTIC_STRAIN_XX = 'INTERPRET_PLASTIC_STRAIN_XX'
PLASTIC_STRAIN_YY = 'INTERPRET_PLASTIC_STRAIN_YY'
PLASTIC_STRAIN_ZZ = 'INTERPRET_PLASTIC_STRAIN_ZZ'
PLASTIC_STRAIN_XY = 'INTERPRET_PLASTIC_STRAIN_XY'
PLASTIC_STRAIN_MAJOR_PRICIPAL_PLASTIC_STRAIN = 'INTERPRET_PLASTIC_STRAIN_P_MAJOR'
PLASTIC_STRAIN_MEAN_PRINCIPAL_PLASTIC_STRAIN = 'INTERPRET_PLASTIC_STRAIN_P_MEAN'
PLASTIC_STRAIN_MINOR_PRINCIPAL_PLASTIC_STRAIN = 'INTERPRET_PLASTIC_STRAIN_P_MINOR'
PLASTIC_STRAIN_VOLUMETRIC_PLASTIC_STRAIN = 'INTERPRET_PLASTIC_STRAIN_VOLUMETRIC'
PLASTIC_STRAIN_MAX_SHEAR_PLASTIC_STRAIN = 'INTERPRET_PLASTIC_STRAIN_MAX_SHEAR'
THERMAL_TEMPERATURE = 'INTERPRET_TEMPERATURE'
THERMAL_HORIZONTAL_FLUX = 'INTERPRET_THERMO_X_FLUX_SIGNED'
THERMAL_VERTICAL_FLUX = 'INTERPRET_THERMO_Y_FLUX_SIGNED'
THERMAL_TOTAL_FLUX = 'INTERPRET_THERMO_TOTAL_FLUX'
THERMAL_HORIZONTAL_GRADIENT = 'INTERPRET_THERMO_GRAD_X_SIGNED'
THERMAL_VERTICAL_GRADIENT = 'INTERPRET_THERMO_GRAD_Y_SIGNED'
THERMAL_TOTAL_GRADIENT = 'INTERPRET_THERMO_GRAD_TOTAL'
THERMAL_HORIZONTAL_CONDUCTIVITY = 'INTERPRET_THERMO_CONDUCTIVITY_X_SIGNED'
THERMAL_VERTICAL_CONDUCTIVITY = 'INTERPRET_THERMO_CONDUCTIVITY_Y_SIGNED'
THERMAL_TOTAL_CONDUCTIVITY = 'INTERPRET_THERMO_CONDUCTIVITY_TOTAL'
THERMAL_SPECIFIC_HEAT = 'INTERPRET_SPECIFIC_HEAT'
THERMAL_UNFROZEN_WATER_CONTENT = 'INTERPRET_UNFROZEN_WATER_CONTENT'
DYNAMIC_MINIMUM_X_DISPLACEMENT = 'INTERPRET_DYN_MIN_DISPLACEMENT_X'
DYNAMIC_MAXIMUM_X_DISPLACEMENT = 'INTERPRET_DYN_MAX_DISPLACEMENT_X'
DYNAMIC_MINIMUM_Y_DISPLACEMENT = 'INTERPRET_DYN_MIN_DISPLACEMENT_Y'
DYNAMIC_MAXIMUM_Y_DISPLACEMENT = 'INTERPRET_DYN_MAX_DISPLACEMENT_Y'
DYNAMIC_MINIMUM_X_VELOCITY = 'INTERPRET_DYN_MIN_VELOCITY_X'
DYNAMIC_MAXIMUM_X_VELOCITY = 'INTERPRET_DYN_MAX_VELOCITY_X'
DYNAMIC_MINIMUM_Y_VELOCITY = 'INTERPRET_DYN_MIN_VELOCITY_Y'
DYNAMIC_MAXIMUM_Y_VELOCITY = 'INTERPRET_DYN_MAX_VELOCITY_Y'
DYNAMIC_MINIMUM_X_ACCELERATION = 'INTERPRET_DYN_MIN_ACCELERATION_X'
DYNAMIC_MAXIMUM_X_ACCELERATION = 'INTERPRET_DYN_MAX_ACCELERATION_X'
DYNAMIC_MINIMUM_Y_ACCELERATION = 'INTERPRET_DYN_MIN_ACCELERATION_Y'
DYNAMIC_MAXIMUM_Y_ACCELERATION = 'INTERPRET_DYN_MAX_ACCELERATION_Y'

rs2.interpreter.InterpreterGraphEnums module

class rs2.interpreter.InterpreterGraphEnums.HistoryQueryGraphEnums

Bases: object

class VerticalAxisTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

HORIZONTAL_DISPLACEMENT = 4070
VERTICAL_DISPLACEMENT = 4071
HORIZONTAL_VELOCITY = 4072
VERTICAL_VELOCITY = 4073
HORIZONTAL_ACCELERATION = 4074
VERTICAL_ACCELERATION = 4075
EFFECTIVE_STRESS_XX = 4076
EFFECTIVE_STRESS_YY = 4077
EFFECTIVE_STRESS_XY = 4078
EFFECTIVE_STRESS_Z = 4079
STRAIN_XX = 4080
STRAIN_YY = 4081
STRAIN_XY = 4082
EXCESS_PORE_PRESSURE = 4083
PORE_PRESSURE = 4084
HORIZONTAL_HYDRAULIC_VELOCITY = 4085
VERTICAL_HYDRAULIC_VELOCITY = 4086
HORIZONTAL_HYDRAULIC_GRADIENT = 4087
VERTICAL_HYDRAULIC_GRADIENT = 4088
TEMPERATURE = 4089
HORIZONTAL_THERMAL_FLUX = 4090
VERTICAL_THERMAL_FLUX = 4091
HORIZONTAL_THERMAL_GRADIENT = 4092
VERTICAL_THERMAL_GRADIENT = 4093
class HorizontalAxisTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

TIME = 9094
STAGE_LOAD_PERCENTAGE = 9096
class rs2.interpreter.InterpreterGraphEnums.TimeQueryGraphEnums

Bases: object

class VerticalAxisTypes(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

X_VELOCITY = 4041
X_DISPLACEMENT = 4042
X_ACCELERATION = 4043
Y_VELOCITY = 4044
Y_DISPLACEMENT = 4045
Y_ACCELERATION = 4046
PORE_PRESSURE = 4050
STRAIN_XX = 4055
STRAIN_YY = 4056
STRAIN_XY = 4057
TOTAL_STRESS_XX = 4058
TOTAL_STRESS_YY = 4059
TOTAL_STRESS_XY = 4060
TOTAL_STRESS_ZZ = 4061
EFFECTIVE_STRESS_XX = 4062
EFFECTIVE_STRESS_YY = 4063
EFFECTIVE_STRESS_XY = 4064
EFFECTIVE_STRESS_ZZ = 4065

rs2.interpreter.InterpreterModel module

class rs2.interpreter.InterpreterModel.Model(client, ID)

Bases: BaseModel

Code Snippet: Model Manipulation

saveCopyAs(fileName: str)

Saves the model using the given file name.

Example:

model.saveCopyAs('C:/simple_3_stage.fez')
SetActiveStage(stageNumber: int)

Code Snippet: Manipulation of Material Queries

Change model’s active stage by its stage number
SetResultType(resultType: ExportResultType) list[dict]

Code Snippet: Get Model Mesh Results

Sets the export result type for your model.
Raises:

ValueError – resultType must be an enum of type ExportResultType. Any other value will raise an error

SetUserDefinedResultType(resultName: str) list[dict]
Sets the export result type to the user defined result type name.
GetMeshResults() MeshResults

Code Snippet: Get Model Mesh Results

Returns the mesh results at all nodes for your model.
GetHistoryQueryResults(hq_name: str, horizontal_axis: HorizontalAxisTypes, vertical_axis: VerticalAxisTypes, stages: list[int]) dict[int, list[HistoryQueryResult]]

Code Snippet: Manipulation of History Query and its results

Returns a map of HistoryQueryResult for all input stages and history queries in your model.
Raises:

ValueError – horizontal_axis and vertical_axis must be an enum of type HistoryQueryGraphEnums. Any other value will raise an error.

GetAllTimeQueryPointResults(stages: list[int], vertical_axis: VerticalAxisTypes) dict[int, list[TimeQueryPointResults]]

Code Snippet: Manipulation of Time Query and its results

Returns a map of TimeQueryPointResults for all input stages and time query points in your model.
Please note points that are over an excavation at specific stages will not have data returned at those locations.
Raises:

ValueError – vertical_axis must be an enum of type TimeQueryGraphEnums. Any other value will raise an error.

GetAllTimeQueryLinesResults(stages: list[int], vertical_axis: VerticalAxisTypes, apply_post_process_scaling: bool) dict[int, list[TimeQueryLineResults]]

Code Snippet: Manipulation of Time Query and its results

Returns a map of TimeQueryLineResults for all input stages and time query lines in your model.
Please note points that are over an excavation at specific stages will not have data returned at those locations.
Raises:

ValueError – vertical_axis must be an enum of type TimeQueryGraphEnums. Any other value will raise an error.

AddMaterialQuery(points: list[list[float]]) str

Code Snippet: Manipulation of Material Queries

Adds a material query point/line to your model using the specified coordinates in order.
Returns a unique identifier for the newly added material query point/line.
RemoveMaterialQuery(IDs_toRemove: list[str]) str

Code Snippet: Manipulation of Material Queries

Removes material query points or lines for provided list of IDs.
GetMaterialQueryResults() list[MaterialQueryResults]

Code Snippet: Manipulation of Material Queries

Returns the results for all the material queries defined in your model for active model stage and result type.
To get results for a different stage, please call SetActiveStage(int stageNumber) before calling this function.
To get results for a different result type, please call either before calling this function:
  • SetResultType(InterpreterGraphEnums resultType)

  • SetUserDefinedResultType(“Your defined resultType name”)

GetBoltResults(stages: list[int]) dict[int, list[BoltResult]]

Code Snippet: Get Support Bolt Results

Returns a map of BoltResult for all input stages and support bolt defined in your model.
GetJointResults(stages: list[int]) dict[int, list[JointResult]]

Code Snippet: Get Support Joint Results

Returns a map of JointResult for all input stages and support joint defined in your model.
GetLinerResults(stages: list[int]) dict[int, list[LinerResult]]

Code Snippet: Get Support Liner Results

Returns a map of LinerResult for all input stages and support liner defined in your model.
GetPileResults(stages: list[int]) dict[int, list[PileResult]]

Code Snippet: Get Support Pile Results

Returns a map of PileResult for all input stages and support pile defined in your model.
GetCompositeResults(stages: list[int]) dict[int, list[CompositeResult]]

Code Snippet: Get Support Composite Results

Returns a map of CompositeResult for all input stages and support composite defined in your model.
GetStructuralResults(stages: list[int]) dict[int, list[StructuralResult]]

Code Snippet: Get Support Structural Results

Returns a map of StructuralResult for all input stages and support structural defined in your model.
getCriticalSRF()
Get Critical SRF

rs2.interpreter.RS2Interpreter module

class rs2.interpreter.RS2Interpreter.RS2Interpreter(host='localhost', port=60055)

Bases: object

openFile(fileName: str) Model

Takes in the absolute path to an rs2 file to be opened in the modeler.

Example:

model = modeler.openFile('C:/simple_3_stage.fez')
classmethod startApplication(port: int, overridePathToExecutable: str = None, timeout: float = 30) None

Opens the most recently installed RS2 application. Starts the python server and binds it to the given port.

Parameters:
  • port (int) – the port to bind the python server to. Use this same port when initializing RS2Modeler

  • overridePathToExecutable (str, optional) – full path to the desired executable to be opened. If not provided, the latest installation of rs2 is used

  • timeout (float, optional) – the maximum amount of time to wait for the application and server to start.

Raises:
  • ValueError – Port range must be between 49152 and 65535, otherwise ValueError is raised

  • TimeoutError – if timeout is provided, raises TimeoutError if not able to connect to the server within that time.

closeProgram(saveModels=True, timeout=30)

Closes the modeler program. All unsaved models are saved by default.

Example:

#Saves all models before closing
modeler.closeProgram(True)

#Closes without saving any models
modeler.closeProgram(False)