Bolt Result Script Examples#

Download the SupportResult.fez for this example.

Code Snippet: Get Support Bolt Results#
from rs2.interpreter.RS2Interpreter import RS2Interpreter
import os, inspect

RS2Interpreter.startApplication(port=60085)
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None))) 
interpreter = RS2Interpreter(port=60085)
model = interpreter.openFile(rf"{current_dir}\example_models\SupportResults.fez")

stages = [1, 2]

results = model.GetBoltResults(stages)

for stageNum, allBoltResults in results.items():
    print(f"Stage {stageNum} Bolt Results")
    for singleBoltResult in allBoltResults:
        boltID = singleBoltResult.entity_id
        start_x = singleBoltResult.start_x
        start_y = singleBoltResult.start_y
        end_x = singleBoltResult.end_x
        end_y = singleBoltResult.end_y
        print(f"\tBolt Unique ID = {boltID}, \n\tStart X-Coord = {start_x}, \n\tStart Y-Coord = {start_y}, End X-Coord = {end_x}, End Y-Coord = {end_y}")
        yieldingResults = singleBoltResult.yielding_results
        print("\tBolt Yielding Results:")
        for boltYieldData in yieldingResults:
            start_x = boltYieldData.start_x
            start_y = boltYieldData.start_y
            end_x = boltYieldData.end_x
            end_y = boltYieldData.end_y
            yieldingStatus = boltYieldData.yielding_flag
            print(f"\t\tYielded Start X-Coord = {start_x}, Yielded Start Y-Coord = {start_y}, Yielded End X-Coord = {end_x}, Yielded End Y-Coord = {end_y}")
            print(f"\t\tYielded Status = {yieldingStatus}")
        print("\tForce Displacement Results:")
        forceDisplacementResults = singleBoltResult.force_displacement_results
        for dispResult in forceDisplacementResults:
            loc_x = dispResult.location_x
            loc_y = dispResult.location_y
            dist = dispResult.distance
            axial_force = dispResult.axial_force
            axial_stress = dispResult.axial_stress
            shear_force = dispResult.shear_force
            rock_disp = dispResult.rock_displacement
            bolt_disp = dispResult.bolt_displacement
            print(f"\t\tLocation X = {loc_x}, Location Y = {loc_y}, Distance = {dist}, Axial Force = {axial_force}, Axial Stress = {axial_stress}")
            print(f"\t\tShear Force = {shear_force}, Rock Displacement = {rock_disp}, Bolt Displacement = {bolt_disp}\n")

model.close()

interpreter.closeProgram()

Output#

Stage 1 Bolt Results
	Bolt Unique ID = Bolt0, 
	Start X-Coord = 6.22240061957463, 
	Start Y-Coord = 11.6115981742334, End X-Coord = 3.46451125989402, End Y-Coord = 10.1389388074137
	Bolt Yielding Results:
		Yielded Start X-Coord = 6.22240061957, Yielded Start Y-Coord = 11.6115981742, Yielded End X-Coord = 3.46451125989, Yielded End Y-Coord = 10.1389388074
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
	Force Displacement Results:
		Location X = 6.22240061957463, Location Y = 11.6115981742334, Distance = 0.0, Axial Force = 2818.9200074861933, Axial Stress = 918825.069306
		Shear Force = None, Rock Displacement = None, Bolt Displacement = None

		Location X = 3.4645112599026806, Location Y = 10.138938807418324, Distance = 3.126448357299371, Axial Force = 2818.9200074861933, Axial Stress = 918825.069306
		Shear Force = None, Rock Displacement = None, Bolt Displacement = None

	Bolt Unique ID = Bolt1, 
	Start X-Coord = 6.75791311659999, 
	Start Y-Coord = 11.3973931754233, End X-Coord = 4.41504594211404, End Y-Coord = 9.85779474647534
	Bolt Yielding Results:
		Yielded Start X-Coord = 6.7579131166, Yielded Start Y-Coord = 11.3973931754, Yielded End X-Coord = 5.94263139468, Yielded End Y-Coord = 10.8616366153
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
		Yielded Start X-Coord = 5.94263139468, Yielded Start Y-Coord = 10.8616366153, Yielded End X-Coord = 4.41504594211, Yielded End Y-Coord = 9.85779474648
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
	Force Displacement Results:
		Location X = 6.75791311659999, Location Y = 11.3973931754233, Distance = 0.0, Axial Force = 302.00115595, Axial Stress = 120800.46238
		Shear Force = -0.0, Rock Displacement = 0.00370887550739, Bolt Displacement = 0.00370887550739

		Location X = 5.942631394688653, Location Y = 10.861636615310118, Distance = 0.9755610579492318, Axial Force = 198.721414577, Axial Stress = 79488.5658308
		Shear Force = -211.734038646, Rock Displacement = 0.00424398215181, Bolt Displacement = 0.00373708850421

		Location X = 4.415045942124044, Location Y = 9.857794746481915, Distance = 2.803460347434165, Axial Force = 0.0, Axial Stress = 0.0
		Shear Force = -5.69743115188, Rock Displacement = 0.00424398215181, Bolt Displacement = 0.00373708850421

Stage 2 Bolt Results
	Bolt Unique ID = Bolt0, 
	Start X-Coord = 6.22240061957463, 
	Start Y-Coord = 11.6115981742334, End X-Coord = 3.46451125989402, End Y-Coord = 10.1389388074137
	Bolt Yielding Results:
		Yielded Start X-Coord = 6.22240061957, Yielded Start Y-Coord = 11.6115981742, Yielded End X-Coord = 3.46451125989, Yielded End Y-Coord = 10.1389388074
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
	Force Displacement Results:
		Location X = 6.22240061957463, Location Y = 11.6115981742334, Distance = 0.0, Axial Force = 3260.336972798898, Axial Stress = 1062704.63051
		Shear Force = None, Rock Displacement = None, Bolt Displacement = None

		Location X = 3.4645112599026806, Location Y = 10.138938807418324, Distance = 3.126448357299371, Axial Force = 3260.336972798898, Axial Stress = 1062704.63051
		Shear Force = None, Rock Displacement = None, Bolt Displacement = None

	Bolt Unique ID = Bolt1, 
	Start X-Coord = 6.75791311659999, 
	Start Y-Coord = 11.3973931754233, End X-Coord = 4.41504594211404, End Y-Coord = 9.85779474647534
	Bolt Yielding Results:
		Yielded Start X-Coord = 6.7579131166, Yielded Start Y-Coord = 11.3973931754, Yielded End X-Coord = 5.94263139468, Yielded End Y-Coord = 10.8616366153
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
		Yielded Start X-Coord = 5.94263139468, Yielded Start Y-Coord = 10.8616366153, Yielded End X-Coord = 4.41504594211, Yielded End Y-Coord = 9.85779474648
		Yielded Status = BoltElementYieldStatus.BOLT_ELEMENT_NOT_YIELDED
	Force Displacement Results:
		Location X = 6.75791311659999, Location Y = 11.3973931754233, Distance = 0.0, Axial Force = 420.86328447, Axial Stress = 168345.313788
		Shear Force = -0.0, Rock Displacement = 0.00238461431863, Bolt Displacement = 0.00238461431863

		Location X = 5.942631394688653, Location Y = 10.861636615310118, Distance = 0.9755610579492318, Axial Force = 301.856401502, Axial Stress = 120742.56060079999
		Shear Force = -243.976288308, Rock Displacement = 0.00300801338724, Bolt Displacement = 0.00242393143471

		Location X = 4.415045942124044, Location Y = 9.857794746481915, Distance = 2.803460347434165, Axial Force = 0.0, Axial Stress = 0.0
		Shear Force = -86.3005526951, Rock Displacement = 0.00300801338724, Bolt Displacement = 0.00242393143471