def showGeometry(self): Visualization.RenderModel(self.model, text_height=0.003, deformed_shape=True, deformed_scale=40000000, render_loads=True)
False, False, False, True, True) truss.DefineReleases('ae', False, False, False, False, True, True, False, False, False, False, True, True) # Add nodal loads truss.AddNodeLoad('a', 'FY', 600) truss.AddNodeLoad('a', 'FX', 200) truss.AddNodeLoad('a', 'FZ', -800) # Analyze the model truss.Analyze(False) # Render the model Visualization.RenderModel(truss, text_height=0.2, deformed_shape=True, deformed_scale=1000, render_loads=True) # Print results a = truss.GetNode('a') b = truss.GetNode('b') c = truss.GetNode('c') d = truss.GetNode('d') e = truss.GetNode('e') print('Node b Reactions: ', b.RxnFX, b.RxnFY, b.RxnFZ, b.RxnMX, b.RxnMY, b.RxnMZ) print('Node c Reactions: ', c.RxnFX, c.RxnFY, c.RxnFZ, c.RxnMX, c.RxnMY, c.RxnMZ) print('Node e Reactions: ', d.RxnFX, d.RxnFY, d.RxnFZ, d.RxnMX, d.RxnMY,
# Add a beam with the following properties: # E = 29000 ksi, G = 11400 ksi, Iy = 100 in^4, Iz = 250 in^4, J = 250 in^4, A = 15 in^2 MomentFrame.AddMember("M3", "N2", "N3", 29000, 11400, 100, 250, 250, 15) # Provide fixed supports at the bases of the columns MomentFrame.DefineSupport("N1", True, True, True, True, True, True) MomentFrame.DefineSupport("N4", True, True, True, True, True, True) # Add a nodal lateral load of 50 kips at the left side of the frame MomentFrame.AddNodeLoad("N2", "FX", 50) # Analyze the frame MomentFrame.Analyze() # Display the model for viewing, with the text height 5 model units (inches) high Visualization.RenderModel(MomentFrame, 5) # Print the shear, moment, and deflection diagrams for member 'M3' MomentFrame.GetMember("M3").PlotShear("Fy") MomentFrame.GetMember("M3").PlotMoment("Mz") MomentFrame.GetMember("M3").PlotDeflection("dy") # Print reactions at the bottom of the frame print("Left Support X Reaction: {Rxn:.2f} kip".format( Rxn=MomentFrame.GetNode("N1").RxnFX)) print("Left Support Y Reaction: {Rxn:.2f} kip".format( Rxn=MomentFrame.GetNode("N1").RxnFY)) print("Left Support Moment Reaction: {Rxn:.2f} kip-ft".format( Rxn=MomentFrame.GetNode("N1").RxnMZ)) print("Right Support X Reacton: {Rxn:.2f} kip".format(
False) # Not constrained for torsion at 'N2' # Add a downward point load of 5 kips at the midspan of the beam SimpleBeam.add_member_pt_load('M1', 'Fy', -5, 7 * 12, 'D') # 5 kips Dead load SimpleBeam.add_member_pt_load('M1', 'Fy', -8, 7 * 12, 'L') # 8 kips Live load # Add load combinations SimpleBeam.add_load_combo('1.4D', {'D': 1.4}) SimpleBeam.add_load_combo('1.2D+1.6L', {'D': 1.2, 'L': 1.6}) # Analyze the beam and perform a statics check SimpleBeam.analyze(check_statics=True) Visualization.RenderModel(SimpleBeam, text_height=10, deformed_shape=True, deformed_scale=30, render_loads=True, combo_name='1.2D+1.6L') # Print the shear, moment, and deflection diagrams SimpleBeam.Members['M1'].plot_shear('Fy', '1.2D+1.6L') SimpleBeam.Members['M1'].plot_moment('Mz', '1.2D+1.6L') SimpleBeam.Members['M1'].plot_deflection('dy', '1.2D+1.6L') # Print reactions at each end of the beam print('Left Support Reaction:', SimpleBeam.Nodes['N1'].RxnFY['1.2D+1.6L'], 'kip') print('Right Support Reacton:', SimpleBeam.Nodes['N2'].RxnFY['1.2D+1.6L'], 'kip') # Print the max/min shears and moments in the beam
for i in range(num_segs): # Add members between nodes cantilever.AddMember(str(i+1), str(i+1), str(i+2), E, G, I, I, 200/12**4, 10/12**2) # Add a fixed support at the base of the column cantilever.DefineSupport('1', True, True, True, True, True, True) # Add a -10 kip axial load to the top of the column cantilever.AddNodeLoad(str(num_nodes), 'FY', -P) # Add a 5 kip lateral load to the top of the column cantilever.AddNodeLoad(str(num_nodes), 'FX', H) # Render the model for visualization Visualization.RenderModel(cantilever, 0.3) # Perform 2nd order analysis cantilever.Analyze_PDelta() # cantilever.Analyze() # Print the moment at the base of the column print('PyNite Calculated Moment: ', -cantilever.GetMember('1').Moment('Mz', 0.001)) # Print the deflection at the top of the column print('PyNite Calculated Displacement: ', cantilever.GetNode(str(num_nodes)).DX*12) # Print the AISC benchmark problem solution: alpha = (P*L**2/(E*I))**0.5 Mmax = H*L*(math.tan(alpha)/alpha) ymax = H*L**3/(3*E*I)*(3*(math.tan(alpha)-alpha)/alpha**3)
# Add a load combination named '1.0W' with a factor of 1.0 applied to any loads designated as 'W' model.add_load_combo('1.0W', {'W': 1.0}) # Analyze the model model.analyze(check_statics=True) # +-----------------------+ # | Discussion of Results | # +-----------------------+ # Render the wall. The quad mesh will be set to show 'Mx' results. from PyNite import Visualization Visualization.RenderModel(model, annotation_size=mesh_size / 6, deformed_shape=False, combo_name='1.0W', color_map='Mx', render_loads=True) # The it should be noted that the rendered contours are smoothed. Smoothing averages the corner # stresses from every quad framing into each node. This leads to a much more accurate contour. # An unsmoothed plot would essentially show quad center stresses at the quad element corners. # Here are the expected results from Timoshenko's "Theory of Plates and Shells" Table 35, p. 202. # Note that the deflection values for the PyNite solution are slightly larger, due to transverse # shear deformations being accounted for. D = E * t**3 / (12 * (1 - nu**2)) print('Solution from Timoshenko Table 35 for b/a = 2.0:') print('Expected displacement: ', 0.00254 * load * width**4 / D) print('Expected Mx at Center:', -0.0412 * load * width**2) print('Expected Mx at Edges:', 0.0829 * load * width**2)
# Provide simple supports SimpleBeam.DefineSupport('N1', True, True, True, False, False, False) SimpleBeam.DefineSupport('N2', True, True, True, True, False, False) # Add a uniform load of 200 lbs/ft to the beam SimpleBeam.AddMemberDistLoad('M1', 'Fy', -200 / 1000 / 12, -200 / 1000 / 12, 0, 168) # Alternatively the following line would do apply the load to the full length of the member as well # SimpleBeam.AddMemberDistLoad('M1', 'Fy', 200/1000/12, 200/1000/12) # Analyze the beam SimpleBeam.Analyze() # Print the shear, moment, and deflection diagrams SimpleBeam.GetMember('M1').PlotShear('Fy') SimpleBeam.GetMember('M1').PlotMoment('Mz') SimpleBeam.GetMember('M1').PlotDeflection('dy') # Print reactions at each end of the beam print('Left Support Reaction:', SimpleBeam.GetNode('N1').RxnFY, 'kip') print('Right Support Reacton:', SimpleBeam.GetNode('N2').RxnFY, 'kip') # Render the deformed shape of the beam magnified 100 times, with a text height of 5 inches from PyNite import Visualization Visualization.RenderModel(SimpleBeam, text_height=5, deformed_shape=True, deformed_scale=100, render_loads=True)
meshsize = 1 # ft load = 250 # psf myWall = RectWall(width, height, t, E, nu, meshsize, 'Fixed', 'Fixed', 'Fixed', 'Fixed') myWall.add_load(0, height, load, load) # Analyze the wall import cProfile cProfile.run('myWall.analyze()', sort='cumtime') # Render the wall. The default load combination 'Combo 1' will be displayed since we're not specifying otherwise. # The plates will be set to show the 'Mx' results from PyNite import Visualization Visualization.RenderModel(myWall.fem, text_height=meshsize / 6, render_loads=True, color_map='Mx') # Plot the displacement contour myWall.plot_disp() # Plot the shear force contours myWall.plot_forces('Qx') myWall.plot_forces('Qy') # Plot the moment contours myWall.plot_forces('Mx') myWall.plot_forces('My') myWall.plot_forces('Mxy') # Results from Timoshenko's "Theory of Plates and Shells" textbook
# +-----------------------+ # | Discussion of Results | # +-----------------------+ # MITC4 elements are very accurate, but there are some nuances to be aware of. They are described # below. # Render the wall. The default load combination 'Combo 1' will be displayed since we're not # specifying otherwise. The quad mesh will be set to show 'Mx' results. It will be noted that the # results are `unsmoothed` making the contour plot look "striped" like a step function. This will # be discussed below in more detail. from PyNite import Visualization Visualization.RenderModel(myWall.fem, text_height=meshsize / 6, deformed_shape=False, combo_name='Combo 1', color_map='Mx', render_loads=True) # The `RectWall` class has a smoothing algorithm built into it. Let's plot a smoothed contour for # Mx for comparison. myWall.plot_forces('Mx') # Essentially, smoothing averages the corner stresses from every quad framing into each node. This # leads to a much more accurate solution. The unsmoothed plot is essentially showing quad center # stresses at the quad element corners. # Here are the expected results from Timoshenko's "Theory of Plates and Shells" Table 35, p. 202. # Note that the deflection values for the PyNite solution are slightly larger, due to transverse # shear deformations being accounted for. D = E * t**3 / (12 * (1 - nu**2))
truss.DefineReleases('AD', False, False, False, False, True, True, \ False, False, False, False, True, True) truss.DefineReleases('BC', False, False, False, False, True, True, \ False, False, False, False, True, True) truss.DefineReleases('BD', False, False, False, False, True, True, \ False, False, False, False, True, True) truss.DefineReleases('BE', False, False, False, False, True, True, \ False, False, False, False, True, True) # Add nodal loads truss.AddNodeLoad('A', 'FX', 10) truss.AddNodeLoad('A', 'FY', 60) truss.AddNodeLoad('A', 'FZ', 20) # Analyze the model truss.Analyze() # Print results print('Member BC calculated axial force: ' + str(truss.GetMember('BC').MaxAxial())) print('Member BC expected axial force: 32.7 Tension') print('Member BD calculated axial force: ' + str(truss.GetMember('BD').MaxAxial())) print('Member BD expected axial force: 45.2 Tension') print('Member BE calculated axial force: ' + str(truss.GetMember('BE').MaxAxial())) print('Member BE expected axial force: 112.1 Compression') # Render the model for viewing. The text height will be set to 50 mm. Visualization.RenderModel(truss, 0.05)
SimpleBeam.AddMember("M1", "N1", "N2", 29000, 11400, 100, 150, 250, 20) # Provide simple supports SimpleBeam.DefineSupport("N1", True, True, True, False, False, False) SimpleBeam.DefineSupport("N2", False, True, True, True, False, False) # Add a uniform load of 200 lbs/ft to the beam SimpleBeam.AddMemberDistLoad("M1", "Fy", 200 / 1000 / 12, 200 / 1000 / 12, 0, 168) # Alternatively the following line would do apply the load to the full length of the member as well # SimpleBeam.AddMemberDistLoad("M1", "Fy", 200/1000/12, 200/1000/12) # Analyze the beam SimpleBeam.Analyze() # Print the shear, moment, and deflection diagrams SimpleBeam.GetMember("M1").PlotShear("Fy") SimpleBeam.GetMember("M1").PlotMoment("Mz") SimpleBeam.GetMember("M1").PlotDeflection("dy") # Print reactions at each end of the beam print("Left Support Reaction: {Rxn:.2f} kip".format( Rxn=SimpleBeam.GetNode("N1").RxnFY)) print("Right Support Reacton: {Rxn:.2f} kip".format( Rxn=SimpleBeam.GetNode("N2").RxnFY)) # Render the beam for viewing with a text height of 5 inches from PyNite import Visualization Visualization.RenderModel(SimpleBeam, 5)
path = os.path.join(os.path.dirname(__file__), 'gridmembers.csv') member_list = inputfiles.read_csv(path) # Add the members to the model for member in member_list: Name, iNode, jNode = member model.AddMember(Name, iNode, jNode, E, G, Iy, Iz, J, A) # Import supports from file path = os.path.join(os.path.dirname(__file__), 'gridsupports.csv') support_list = inputfiles.read_dict_from_csv(path) for row in support_list: model.DefineSupport(**row) # Import node loads from file path = os.path.join(os.path.dirname(__file__), 'gridnodesloads.csv') node_loads = inputfiles.read_csv(path) for load in node_loads: Node, Direction, P = load # Add node loads model.AddNodeLoad(Node, Direction, float(P)) # Analyze the model model.Analyze(check_statics=True) # Render the model Visualization.RenderModel(model, deformed_shape=True, text_height=0.25, render_loads=True)
# Simple beam created by using an end release at fixed supports # Units used in this example are inches, and kips # Import `FEModel3D` from `PyNite` from PyNite import FEModel3D from PyNite import Visualization myModel = FEModel3D() myModel.AddNode('N1', 0, 0, 0) myModel.AddNode('N2', 10 * 12, 0, 0) myModel.DefineSupport('N1', True, True, True, True, True, True) myModel.DefineSupport('N2', True, True, True, True, True, True) myModel.AddMember('M1', 'N1', 'N2', 29000, 11400, 100, 150, 250, 10) myModel.DefineReleases('M1', False, False, False, False, False, True, \ False, False, False, False, False, True) myModel.AddMemberDistLoad('M1', 'Fy', -0.5, -0.5) Visualization.RenderModel(myModel) myModel.Analyze() myModel.GetMember('M1').PlotShear('Fy') myModel.GetMember('M1').PlotMoment('Mz') print('Calculated moment: ' + str(myModel.GetMember('M1').MinMoment('Mz'))) print('Expected moment: ' + str(-0.5 * (10 * 12)**2 / 8))
system = FEModel3D() system.AddNode('1', 0, 0, 0) system.AddNode('2', 30, 0, 0) system.AddNode('3', 10, 0, 0) system.AddNode('4', 20, 0, 0) system.AddSpring('S1', '1', '3', 1000) system.AddSpring('S2', '3', '4', 2000) system.AddSpring('S3', '4', '2', 3000) system.DefineSupport('1', True, True, True, True, True, True) system.DefineSupport('2', True, True, True, True, True, True) system.DefineSupport('3', False, True, True, True, True, True) system.DefineSupport('4', False, True, True, True, True, True) system.AddNodeLoad('4', 'FX', 5000) system.Analyze(True) print(system.GetNode('3').DX['Combo 1']) print(system.GetNode('4').DX['Combo 1']) print('') print(system.GetNode('1').RxnFX['Combo 1']) print(system.GetNode('2').RxnFX['Combo 1']) from PyNite import Visualization Visualization.RenderModel(system, text_height=0.5, deformed_shape=True, deformed_scale=1)
# Import `FEModel3D` from `PyNite` from PyNite import FEModel3D from PyNite import Visualization myModel = FEModel3D() myModel.AddNode('N1', 0, 0, 0) myModel.AddNode('N2', 10 * 12, 0, 0) myModel.DefineSupport('N1', True, True, True, True, True, True) myModel.DefineSupport('N2', True, True, True, True, True, True) myModel.AddMember('M1', 'N1', 'N2', 29000, 11400, 100, 150, 250, 10) myModel.DefineReleases('M1', False, False, False, False, False, True, \ False, False, False, False, False, True) myModel.AddMemberDistLoad('M1', 'Fy', -0.5, -0.5) myModel.Analyze() Visualization.RenderModel(myModel, text_height=3, deformed_shape=True, deformed_scale=100, render_loads=True) myModel.GetMember('M1').PlotShear('Fy') myModel.GetMember('M1').PlotMoment('Mz') print('Calculated moment: ' + str(myModel.GetMember('M1').MinMoment('Mz'))) print('Expected moment: ' + str(-0.5 * (10 * 12)**2 / 8))
width = 20 # ft height = 20 # ft nu = 0.3 meshsize = 1 # ft load = 250 # psf myWall = RectWall(width, height, t, E, nu, meshsize, 'Fixed', 'Fixed', 'Fixed', 'Fixed') myWall.add_load(0, height, load, load) # Analyze the wall myWall.analyze() # Render the wall from PyNite import Visualization Visualization.RenderModel(myWall.fem, meshsize / 6) # Plot the displacement contour myWall.plot_disp() # Plot the shear force contours myWall.plot_forces('Qx') myWall.plot_forces('Qy') # Plot the moment contours myWall.plot_forces('Mx') myWall.plot_forces('My') myWall.plot_forces('Mxy') # Results from Timoshenko's "Theory of Plates and Shells" D = E * t**3 / (12 * (1 - nu**2))
beam.AddMemberDistLoad('AB', 'Fy', -2 / 12, -2 / 12) beam.AddMemberDistLoad('BC', 'Fy', -2 / 12, -2 / 12) beam.AddMemberDistLoad('CD', 'Fy', -2 / 12, -2 / 12) # Add support settlements beam.AddNodeDisplacement('B', 'DY', -5 / 8) beam.AddNodeDisplacement('C', 'DY', -1.5) beam.AddNodeDisplacement('D', 'DY', -0.75) # Analyze the beam beam.Analyze() # Render the beam's deformed shape Visualization.RenderModel(beam, text_height=12, deformed_shape=True, deformed_scale=40, render_loads=True) # Print reactions print('Calculated Reaction at A:', beam.GetNode('A').RxnFY, 'k') print('Calculated Reaction at B:', beam.GetNode('B').RxnFY, 'k') print('Calculated Reaction at C:', beam.GetNode('C').RxnFY, 'k') print('Calculated Reaction at D:', beam.GetNode('D').RxnFY, 'k') print('Expected Reaction at A: -1.098 k') print('Expected Reaction at B: 122.373 k') print('Expected Reaction at C: -61.451 k') print('Expected Reaction at D: 60.176 k') # Print the shear diagrams beam.GetMember('AB').PlotShear('Fy')
def visulize(self, **kwargs): Visualization.RenderModel(self.frame, **kwargs)
frame.AddNode('N1', 0, 0, 0) frame.AddNode('N2', 10*12, 0, 0) frame.AddNode('N3', 10*12, 0, -10*12) frame.AddNode('N4', 10*12, -20*12, -10*12) # Define the supports frame.DefineSupport('N1', True, True, True, True, True, True) frame.DefineSupport('N4', True, True, True, True, True, True) # Create members (all members will have the same properties in this example) J = 100 Iy = 200 Iz = 1000 E = 30000 G = 10000 A = 100 frame.AddMember('M12', 'N1', 'N2', E, G, Iy, Iz, J, A) frame.AddMember('M23', 'N2', 'N3', E, G, Iy, Iz, J, A) frame.AddMember('M34', 'N3', 'N4', E, G, Iy, Iz, J, A) # Add nodal loads frame.AddNodeLoad('N2', 'FY', -5) frame.AddNodeLoad('N2', 'MX', -100*12) frame.AddNodeLoad('N3', 'FZ', 40) frame.Analyze() Visualization.RenderModel(frame) print('Calculated results: ', frame.GetNode('N2').DY, frame.GetNode('N3').DZ) print('Expected results: ', -0.063, 1.825)
# Provide fixed supports TorqueBeam.DefineSupport('N1', False, True, True, True, True, True) TorqueBeam.DefineSupport('N2', True, True, True, True, True, True) # Add a point load of 5 kip-ft and 10 kip-ft at 3ft and 11 ft along the beam respectively TorqueBeam.AddMemberPtLoad('M1', 'Mx', 5, 3 * 12) TorqueBeam.AddMemberPtLoad('M1', 'Mx', 10, 11 * 12) # Analyze the beam and perform a statics check TorqueBeam.Analyze(check_statics=True) from PyNite import Visualization Visualization.RenderModel(TorqueBeam, text_height=5, deformed_shape=True, deformed_scale=30, render_loads=True) # Print the torsion diagram TorqueBeam.GetMember('M1').PlotTorsion() # Print reactions at each end of the beam print('**Individual Support Reactions**') print('Left Support Reaction: {Rxn:.2f} kip'.format( Rxn=TorqueBeam.GetNode('N1').RxnMX['Combo 1'])) print('Right Support Reacton: {Rxn:.2f} kip'.format( Rxn=TorqueBeam.GetNode('N2').RxnMX['Combo 1'])) # Print the max/min torques on the beam print('**Member Internal Torsion**')
frame.DefineSupport('N6', True, True, True, True, True, True) # Create members (all members will have the same properties in this example) J = 250 Iy = 250 Iz = 200 E = 30000 G = 250 A = 12 frame.AddMember('M1', 'N1', 'N2', E, G, Iz, Iy, J, A) frame.AddMember('M2', 'N2', 'N3', E, G, Iy, Iz, J, A) frame.AddMember('M3', 'N3', 'N4', E, G, Iy, Iz, J, A) frame.AddMember('M4', 'N4', 'N5', E, G, Iy, Iz, J, A) frame.AddMember('M5', 'N5', 'N6', E, G, Iz, Iy, J, A) # Add nodal loads frame.AddNodeLoad('N3', 'FY', -30) frame.AddNodeLoad('N4', 'FY', -30) # Analyze the model frame.Analyze() # Render the model for viewing Visualization.RenderModel(frame, text_height=15, deformed_shape=True, deformed_scale=10, render_loads=True) node1 = frame.GetNode('N1') node6 = frame.GetNode('N6') print('Calculated reactions: ', node1.RxnFZ, node1.RxnFY, node1.RxnMX, node6.RxnFZ, node6.RxnFY, node6.RxnMX) print('Expected reactions: ', 11.69, 30, 1810, -11.69, 30, -1810) print('Calculated displacements: ', frame.GetNode('N3').DY, frame.GetNode('N4').DY, frame.GetNode('N3').RX, frame.GetNode('N4').RX)
# Add members between nodes cantilever.AddMember(str(i+1), str(i+1), str(i+2), E, G, I, I, 200/12**4, 10/12**2) # Add a fixed support at the base of the column cantilever.DefineSupport('1', True, True, True, True, True, True) # Add a -10 kip axial load to the top of the column cantilever.AddNodeLoad(str(num_nodes), 'FY', -P) # Add a 5 kip lateral load to the top of the column cantilever.AddNodeLoad(str(num_nodes), 'FX', H) # Perform 2nd order analysis cantilever.Analyze_PDelta() # Render the deformed shape Visualization.RenderModel(cantilever, text_height=0.3, deformed_shape=True, deformed_scale=2, render_loads=True) # Print the moment at the base of the column print('PyNite Calculated Moment: ', -cantilever.GetMember('1').Moment('Mz', 0.001, 'Combo 1')) # Print the deflection at the top of the column print('PyNite Calculated Displacement: ', cantilever.GetNode(str(num_nodes)).DX['Combo 1']*12) # Print the AISC benchmark problem solution: alpha = (P*L**2/(E*I))**0.5 Mmax = H*L*(math.tan(alpha)/alpha) ymax = H*L**3/(3*E*I)*(3*(math.tan(alpha)-alpha)/alpha**3) print('AISC Benchmark Problem Moment: ', Mmax) print('AISC Benchmark Problem Displacement: ', ymax*12)
# BracedFrame.AddLoadCombo('1.4D', factors={'D':1.4}) BracedFrame.AddLoadCombo('1.2D+1.0W', factors={'D': 1.2, 'W': 1.0}) BracedFrame.AddLoadCombo('0.9D+1.0W', factors={'D': 0.9, 'W': 1.0}) # Analyze the braced frame # P-Delta analysis could also be performed using BracedFrame.Analyze_PDelta(). # Generally, P-Delta analysis will have little effect on a model of a braced # frame, as there is usually very little bending moment in the members. BracedFrame.Analyze() # Display the deformed shape of the structure magnified 50 times with the text # height 5 model units (inches) high from PyNite import Visualization Visualization.RenderModel(BracedFrame, text_height=5, deformed_shape=True, deformed_scale=50, combo_name='1.2D+1.0W') # Plot the axial load diagrams for the braces. We should see no compression on # 'Brace2' and 64 kips on 'Brace1' if the tension-only analysis worked # correctly. BracedFrame.GetMember('Brace1').PlotAxial(combo_name='1.2D+1.0W') BracedFrame.GetMember('Brace2').PlotAxial(combo_name='1.2D+1.0W') # Report the frame reactions for the load combination '1.2D+1.0W'. We should # see a -50 kip horizontal reaction at node 'N1', and a zero kip reaction at # node 'N4' if the tension-only analysis worked correctly. Similarly, we print('1.2D+1.0W: N1 reaction FY =', '{:.3f}'.format(BracedFrame.GetNode('N1').RxnFY['1.2D+1.0W']), 'kip') print('1.2D+1.0W: N1 reaction FX =',
False, False, False, False, True, True) truss.DefineReleases('BE', False, False, False, False, True, True, \ False, False, False, False, True, True) # Add nodal loads truss.AddNodeLoad('A', 'FX', 10) truss.AddNodeLoad('A', 'FY', 60) truss.AddNodeLoad('A', 'FZ', 20) # Analyze the model truss.Analyze() # Print results print('Member BC calculated axial force: ' + str(truss.GetMember('BC').MaxAxial())) print('Member BC expected axial force: 32.7 Tension') print('Member BD calculated axial force: ' + str(truss.GetMember('BD').MaxAxial())) print('Member BD expected axial force: 45.2 Tension') print('Member BE calculated axial force: ' + str(truss.GetMember('BE').MaxAxial())) print('Member BE expected axial force: 112.1 Compression') # Render the model for viewing. The text height will be set to 50 mm. # Because the members in this example are nearly rigid, there will be virtually no deformation. The deformed shape won't be rendered. # The program has created a default load case 'Case 1' and a default load combo 'Combo 1' since we didn't specify any. We'll display 'Case 1'. Visualization.RenderModel(truss, text_height=0.05, render_loads=True, case='Case 1')