Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Visualizing Shear Force and Bending Moment | Structural Analysis with Python
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Civil Engineers

bookVisualizing Shear Force and Bending Moment

Understanding shear force and bending moment diagrams is essential for any civil engineer involved in structural analysis. These diagrams visually represent how internal forces and moments are distributed along the length of a beam, helping you predict where the structure may experience maximum stress or potential failure. Shear force refers to the force that causes one part of a material to slide past another, while bending moment is the measure of the internal moment that causes the beam to bend. By analyzing these diagrams, you can ensure that a beam is designed safely and efficiently to withstand applied loads.

123456789101112131415161718192021222324252627
import numpy as np # Beam parameters length = 10 # meters point_load = 20 # kN load_position = length / 2 # Center of the beam # Discretize the beam into 100 points x = np.linspace(0, length, 100) shear_force = np.zeros_like(x) bending_moment = np.zeros_like(x) # Calculate shear force and bending moment at each point for i, xi in enumerate(x): if xi < load_position: shear_force[i] = point_load / 2 bending_moment[i] = (point_load / 2) * xi else: shear_force[i] = -point_load / 2 bending_moment[i] = (point_load / 2) * (length - xi) # Display sample values at key points print("Shear force at left support: {:.2f} kN".format(shear_force[0])) print("Shear force just left of load: {:.2f} kN".format(shear_force[48])) print("Shear force just right of load: {:.2f} kN".format(shear_force[51])) print("Shear force at right support: {:.2f} kN".format(shear_force[-1])) print("Max bending moment at center: {:.2f} kNm".format(bending_moment[50]))
copy

Once you have calculated the shear force and bending moment values at discrete points along the beam, you can use these values to create visual diagrams. Plotting these diagrams helps you quickly identify critical locations, such as the point of maximum bending moment or abrupt changes in shear force. For a simply supported beam with a central point load, the shear force diagram will show a sudden jump at the load application point, while the bending moment diagram will peak at the center. Interpreting these diagrams allows you to make informed engineering decisions, such as where to reinforce the beam or how to select appropriate materials and cross-sections.

1234567891011121314151617181920212223
import matplotlib.pyplot as plt # Plot Shear Force Diagram plt.figure(figsize=(10, 4)) plt.plot(x, shear_force, label="Shear Force (kN)", color='blue') plt.axhline(0, color='black', linewidth=0.8) plt.title("Shear Force Diagram") plt.xlabel("Position along beam (m)") plt.ylabel("Shear Force (kN)") plt.legend() plt.grid(True) plt.show() # Plot Bending Moment Diagram plt.figure(figsize=(10, 4)) plt.plot(x, bending_moment, label="Bending Moment (kNm)", color='red') plt.axhline(0, color='black', linewidth=0.8) plt.title("Bending Moment Diagram") plt.xlabel("Position along beam (m)") plt.ylabel("Bending Moment (kNm)") plt.legend() plt.grid(True) plt.show()
copy

1. What does a bending moment diagram help an engineer determine?

2. Which Python library is used for plotting engineering diagrams in this chapter?

3. Fill in the blank: The ______ diagram shows the variation of internal forces along the length of the beam.

question mark

What does a bending moment diagram help an engineer determine?

Select the correct answer

question mark

Which Python library is used for plotting engineering diagrams in this chapter?

Select the correct answer

question-icon

Fill in the blank: The ______ diagram shows the variation of internal forces along the length of the beam.

diagram shows the variation of internal forces along the length of the beam.
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

bookVisualizing Shear Force and Bending Moment

Glissez pour afficher le menu

Understanding shear force and bending moment diagrams is essential for any civil engineer involved in structural analysis. These diagrams visually represent how internal forces and moments are distributed along the length of a beam, helping you predict where the structure may experience maximum stress or potential failure. Shear force refers to the force that causes one part of a material to slide past another, while bending moment is the measure of the internal moment that causes the beam to bend. By analyzing these diagrams, you can ensure that a beam is designed safely and efficiently to withstand applied loads.

123456789101112131415161718192021222324252627
import numpy as np # Beam parameters length = 10 # meters point_load = 20 # kN load_position = length / 2 # Center of the beam # Discretize the beam into 100 points x = np.linspace(0, length, 100) shear_force = np.zeros_like(x) bending_moment = np.zeros_like(x) # Calculate shear force and bending moment at each point for i, xi in enumerate(x): if xi < load_position: shear_force[i] = point_load / 2 bending_moment[i] = (point_load / 2) * xi else: shear_force[i] = -point_load / 2 bending_moment[i] = (point_load / 2) * (length - xi) # Display sample values at key points print("Shear force at left support: {:.2f} kN".format(shear_force[0])) print("Shear force just left of load: {:.2f} kN".format(shear_force[48])) print("Shear force just right of load: {:.2f} kN".format(shear_force[51])) print("Shear force at right support: {:.2f} kN".format(shear_force[-1])) print("Max bending moment at center: {:.2f} kNm".format(bending_moment[50]))
copy

Once you have calculated the shear force and bending moment values at discrete points along the beam, you can use these values to create visual diagrams. Plotting these diagrams helps you quickly identify critical locations, such as the point of maximum bending moment or abrupt changes in shear force. For a simply supported beam with a central point load, the shear force diagram will show a sudden jump at the load application point, while the bending moment diagram will peak at the center. Interpreting these diagrams allows you to make informed engineering decisions, such as where to reinforce the beam or how to select appropriate materials and cross-sections.

1234567891011121314151617181920212223
import matplotlib.pyplot as plt # Plot Shear Force Diagram plt.figure(figsize=(10, 4)) plt.plot(x, shear_force, label="Shear Force (kN)", color='blue') plt.axhline(0, color='black', linewidth=0.8) plt.title("Shear Force Diagram") plt.xlabel("Position along beam (m)") plt.ylabel("Shear Force (kN)") plt.legend() plt.grid(True) plt.show() # Plot Bending Moment Diagram plt.figure(figsize=(10, 4)) plt.plot(x, bending_moment, label="Bending Moment (kNm)", color='red') plt.axhline(0, color='black', linewidth=0.8) plt.title("Bending Moment Diagram") plt.xlabel("Position along beam (m)") plt.ylabel("Bending Moment (kNm)") plt.legend() plt.grid(True) plt.show()
copy

1. What does a bending moment diagram help an engineer determine?

2. Which Python library is used for plotting engineering diagrams in this chapter?

3. Fill in the blank: The ______ diagram shows the variation of internal forces along the length of the beam.

question mark

What does a bending moment diagram help an engineer determine?

Select the correct answer

question mark

Which Python library is used for plotting engineering diagrams in this chapter?

Select the correct answer

question-icon

Fill in the blank: The ______ diagram shows the variation of internal forces along the length of the beam.

diagram shows the variation of internal forces along the length of the beam.
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
some-alt