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?

材料力学「オイラー座屈(Buckling)を教えて下さい。」をAI先生に聞きました。sympyで。

Last updated at Posted at 2025-01-20

オイラー座屈を教えて下さい。
オイラー座屈の計算式を証明して下さい。
オイラー座屈の証明を微分方程式で教えて下さい。
オイラー座屈の証明を微分方程式で、sympyのソースコードで教えて下さい。

Gemini先生へ

(回答抜粋)
...証明の難しさ
オイラー座屈の証明は、数学的に厳密に行うためには、以下の知識が必要です。
・微分方程式: 常微分方程式の解法、特に境界値問題
・変分法: 関数の極値問題を扱う数学の分野
・行列: 固有値問題を解くための行列の理論
...

from sympy import *

# 変数の定義
x = symbols('x')
w = Function('w')(x)
E, I, P, L = symbols('E I P L', positive=True)

# 微分方程式の定義
diffeq = Eq(E*w.diff(x, x) + P*w, 0)
print(diffeq)

# 一般解
sol = dsolve(diffeq, w)
print(sol)

# 境界条件を適用
C1 = symbols('C1')
C2 = symbols('C2')
sol = sol.subs(w.subs(x, 0), 0).subs(w.subs(x, L), 0)
print(sol)

# 座屈荷重を求める
from sympy.solvers import solve
eq = sol.args[1].args[1]
sol_P = solve(eq, P)
print(sol_P)

このコードを実行すると、以下の様な結果が得られます。

Eq(E*Derivative(w(x), (x, 2)) + P*w(x), 0)
Eq(w(x), (C1*sin(sqrt(P/E)*x))/sqrt(P/E) + C2*cos(sqrt(P/E)*x))
Eq(0, C2) & Eq(0, C1*sin(sqrt(P/E)*L)/sqrt(P/E))
[Eq(P, E*pi**2*n**2/L**2)]  # nは任意の整数

私のvscodeの結果

Eq(E*Derivative(w(x), (x, 2)) + P*w(x), 0)
Eq(w(x), C1*sin(sqrt(P)*x/sqrt(E)) + C2*cos(sqrt(P)*x/sqrt(E)))
Eq(w(x), C1*sin(sqrt(P)*x/sqrt(E)) + C2*cos(sqrt(P)*x/sqrt(E)))
[pi**2*E/(4*x**2), 9*pi**2*E/(4*x**2)]

ChatGPT先生へ

copilot先生へ

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

(テンプレート)

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

wikipedia

>Plate buckling
>支配方程式

Qiita

Google検索

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?