0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

材料力学「モーメント荷重が作用するはりのモーメントが直線変化なのは、どうしてですか?」をAI先生に聞きました。

Last updated at Posted at 2025-01-03

モーメント荷重が作用するはりのモーメントが直線変化なのは、どうしてですか?sympyのソースコードで教えて下さい。

Gemini先生へ

(回答抜粋)
モーメント荷重が作用するはりのモーメントが直線変化するのは、力のつり合いとモーメントのつり合いの原理に基づきます。...

from sympy import symbols, diff, plot

# 変数の定義
x, L, w = symbols('x L w')

# 曲げモーメントの式
M = w * x * (L - x) / 2

# 微分して曲げモーメントの変化率を確認
dMdx = diff(M, x)

# 数値代入してプロット
L_val = 10  # 梁の長さ
w_val = 1  # モーメント荷重

M_num = M.subs([(L, L_val), (w, w_val)])
plot(M_num, (x, 0, L_val), title='Bending Moment Diagram')

ChatGPT先生へ

(回答抜粋)
モーメント荷重が一定であれば、そのモーメントの傾き(つまり曲げモーメント図の勾配)が一様に変化し、直線的になります。

from sympy import symbols, integrate, Piecewise

# 定義
x = symbols('x')  # はりの位置
L, M0 = symbols('L M0')  # はりの長さとモーメント荷重

# 曲げモーメントの変化
moment = Piecewise(
    (M0 * x, x <= L),  # モーメント荷重が作用する区間
    (0, x > L)         # それ以外
)

# 結果の表示
moment

copilot先生へ

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)  開発環境

いつもと違うおすすめです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?