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-02-24

・おすすめのwebページを探しています。よろしくお願いします。
・質問リストの追番は無視して下さい。
(2025-02-26再質問)

# 質問リスト
1. はりの剛性マトリックスとトラスの剛性マトリックスの違いを教えて下さい。  
2. 上記の違いをsympy のソースコードで教えて下さい。  

ChatGPT先生へ

ChatGPT の回答は必ずしも正しいとは限りません。重要な情報は確認するようにしてください。
回答抜粋

・以下、私は実行していません。

import sympy as sp

# 記号の定義
E, A, L, I = sp.symbols('E A L I')

# 1. トラス要素の剛性マトリックス (1D 2節点)
K_truss = (E*A/L) * sp.Matrix([
    [1, -1],
    [-1, 1]
])

# 2. はり要素の剛性マトリックス (2D 2節点, 曲げ考慮)
K_beam = (E*I/L**3) * sp.Matrix([
    [12,  6*L,  -12,  6*L],
    [6*L,  4*L**2, -6*L,  2*L**2],
    [-12, -6*L,  12, -6*L],
    [6*L,  2*L**2, -6*L,  4*L**2]
])

# 表示
print("トラス要素の剛性マトリックス:")
sp.pprint(K_truss)
print("\nはり要素の剛性マトリックス:")
sp.pprint(K_beam)
import sympy as sp

# 記号の定義
E, A, L = sp.symbols('E A L')

# 角度 (水平, 垂直, 斜め)
theta_h = 0  # 水平方向
theta_v = sp.pi/2  # 垂直方向
theta_d = sp.pi/4  # 斜め方向

def truss_stiffness_matrix(theta):
    c = sp.cos(theta)
    s = sp.sin(theta)
    return (E * A / L) * sp.Matrix([
        [c**2, c*s, -c**2, -c*s],
        [c*s, s**2, -c*s, -s**2],
        [-c**2, -c*s, c**2, c*s],
        [-c*s, -s**2, c*s, s**2]
    ])

# 各要素の剛性マトリックス
K_h = truss_stiffness_matrix(theta_h)
K_v = truss_stiffness_matrix(theta_v)
K_d = truss_stiffness_matrix(theta_d)

# 表示
print("水平方向トラス要素の剛性マトリックス:")
sp.pprint(K_h)
print("\n垂直方向トラス要素の剛性マトリックス:")
sp.pprint(K_v)
print("\n斜め方向トラス要素の剛性マトリックス:")
sp.pprint(K_d)

Gemini先生へ

copilot先生へ

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

(テンプレート)

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

wikipedia

Qiita

Google検索

文献

・旧い本です。
青木徹彦 『構造力学(土木系 大学講義シリーズ 5)』(コロナ社、1986年)200頁 など
https://www.coronasha.co.jp/np/isbn/9784339050448/

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?