# Set a parameter for the axial load P = 180.0; # 10% of axial capacity of columns # create a Linear TimeSeries (load factor varies linearly with time) - command: timeSeries Linear $tag ops.timeSeries("Linear", 1) # create a Plain load pattern - command: pattern Plain $tag $timeSeriesTag { $loads } ops.pattern("Plain", 1, 1, "-fact", 1.0) # create the nodal load - command: load nodeID xForce yForce zMoment ops.load(3, 0.0, -P, 0.0) ops.load(4, 0.0, -P, 0.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example3.1.json") # ------------------------------ # End of model generation # ------------------------------ # ------------------------------ # Start of analysis generation # ------------------------------ # create the system of equation ops.system("BandGeneral") # create the DOF numberer, the reverse Cuthill-McKee algorithm ops.numberer("RCM")
# Single point constraints # node u1 u2 ops.fix(1, 1, 1) ops.fix(bn, 0, 1) # Define gravity loads # create a Linear time series ops.timeSeries("Linear", 1) # create a Plain load pattern ops.pattern("Plain", 1, 1, "-fact", 1.0) ops.load(l1, 0.0, -1.0) ops.load(l2, 0.0, -1.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example6.1.json") # ----------------------- # End of model generation # ----------------------- # -------------------------------------------------------------------- # Start of static analysis (creation of the analysis & analysis itself) # -------------------------------------------------------------------- # create the system of equation ops.system("ProfileSPD") # create the DOF numberer ops.numberer("RCM")
P = 180.0 # 10% of axial capacity of columns # create a Linear TimeSeries (load factor varies linearly with time) - command: timeSeries Linear $tag ops.timeSeries("Linear", 1) # create a Plain load pattern - command: pattern Plain $tag $timeSeriesTag { $loads } ops.pattern("Plain", 1, 1, "-fact", 1.0) # create the nodal load - command: load nodeID xForce yForce zMoment ops.load(3, 0.0, -P, 0.0) ops.load(4, 0.0, -P, 0.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example3.1.json") # ------------------------------ # End of model generation # ------------------------------ # ------------------------------ # Start of analysis generation # ------------------------------ # create the system of equation ops.system("BandGeneral") # create the DOF numberer, the reverse Cuthill-McKee algorithm ops.numberer("RCM")
# Define earthquake excitation # ---------------------------- dt = 0.02 # Set up the acceleration records for Tabas fault normal and fault parallel ops.timeSeries("Path", 2, "-filePath", "tabasFN.txt", "-dt", dt, "-factor", g) ops.timeSeries("Path", 3, "-filePath", "tabasFP.txt", "-dt", dt, "-factor", g) # Define the excitation using the Tabas ground motion records # tag dir accel series args ops.pattern("UniformExcitation", 2, 1, "-accel", 2) ops.pattern("UniformExcitation", 3, 2, "-accel", 3) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example5.1.json") # ----------------------- # End of model generation # ----------------------- # ---------------------------- # Start of analysis generation # ---------------------------- # create the system of equation ops.system("UmfPack") # create the DOF numberer ops.numberer("Plain")
ops.element("truss", 2, 2, 4, 5.0, 1) ops.element("truss", 3, 3, 4, 5.0, 1) # Define loads # ------------ # create a Linear TimeSeries (load factor varies linearly with time) - command: timeSeries Linear $tag ops.timeSeries("Linear", 1) # create a Plain load pattern - command: pattern Plain $tag $timeSeriesTag { $loads } ops.pattern("Plain", 1, 1, "-fact", 1.0) # create the nodal load - command: load nodeID xForce yForce ops.load(4, 100.0, -50.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example1.1.json") # ------------------------------ # End of model generation # ------------------------------ # ------------------------------ # Start of analysis generation # ------------------------------ # create the system of equation, a SPD using a band storage scheme ops.system("BandSPD") # create the DOF numberer, the reverse Cuthill-McKee algorithm ops.numberer("RCM")
node1 = i*3 + 2 node2 = node1 + 1 if (i == 0): ops.load(node1, 0.0, P, 0.0) ops.load(node2, 0.0, P/2.0, 0.0) elif (i == numBay): ops.load(node1, 0.0, P, 0.0) ops.load(node2, 0.0, P/2.0, 0.0) else: ops.load(node1, 0.0, 2.0*P, 0.0) ops.load(node2, 0.0, P, 0.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example4.1.json") # ------------------------------ # End of model generation # ------------------------------ # -------------------------------------------------- # Start of analysis generation for gravity analysis # -------------------------------------------------- # create the system of equation ops.system("BandGeneral") # create the DOF numberer, the reverse Cuthill-McKee algorithm ops.numberer("RCM")
currentDisp = ops.nodeDisp(3, 1) ok = 0 while ((ok == 0) and (currentDisp < maxU)): ok = ops.analyze(1) # if the analysis fails try initial tangent iteration if (ok != 0): print( "regular newton failed .. lets try an initial stiffness for this step" ) ops.test("NormDispIncr", 1.0E-12, 1000) ops.algorithm("ModifiedNewton", "-initial") ok = ops.analyze(1) if (ok == 0): print("that worked .. back to regular newton") ops.test("NormDispIncr", 1.0E-12, 10) ops.algorithm("Newton") currentDisp = ops.nodeDisp(3, 1) # Print a message to indicate if analysis succesfull or not if (ok == 0): print("\nPushover analysis completed SUCCESSFULLY\n") else: print("\nPushover analysis FAILED\n") # Print the state at node 3 ops.printModel("node", 3) ops.wipe()
if (ok != 0): currentDisp = ops.nodeDisp(3, 1) ok = 0 while ((ok == 0) and (currentDisp < maxU)): ok = ops.analyze(1) # if the analysis fails try initial tangent iteration if (ok != 0): print("regular newton failed .. lets try an initial stiffness for this step") ops.test("NormDispIncr", 1.0E-12, 1000) ops.algorithm("ModifiedNewton", "-initial") ok = ops.analyze(1) if (ok == 0): print("that worked .. back to regular newton") ops.test("NormDispIncr", 1.0E-12, 10) ops.algorithm("Newton") currentDisp = ops.nodeDisp(3, 1) # Print a message to indicate if analysis successful or not if (ok == 0): print("\nPushover analysis completed SUCCESSFULLY\n") else: print("\nPushover analysis FAILED\n") # Print the state at node 3 ops.printModel("node", 3) ops.wipe()
node1 = i * 3 + 2 node2 = node1 + 1 if (i == 0): ops.load(node1, 0.0, P, 0.0) ops.load(node2, 0.0, P / 2.0, 0.0) elif (i == numBay): ops.load(node1, 0.0, P, 0.0) ops.load(node2, 0.0, P / 2.0, 0.0) else: ops.load(node1, 0.0, 2.0 * P, 0.0) ops.load(node2, 0.0, P, 0.0) # print model #ops.printModel() ops.printModel("-JSON", "-file", "Example4.1.json") # ------------------------------ # End of model generation # ------------------------------ # -------------------------------------------------- # Start of analysis generation for gravity analysis # -------------------------------------------------- # create the system of equation ops.system("BandGeneral") # create the DOF numberer, the reverse Cuthill-McKee algorithm ops.numberer("RCM")