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?

ひずみエネルギとそれを使った材料力学 基本例題8.04 P268 「材料力学演習(20221021)」をsympyでやってみたい。

Last updated at Posted at 2025-07-07

・もっといい結果の表示方法があるかもしれない。
・作図未です。
・教科書の例題7.1 p93 の 固定支持Bをフリー
 「図7.5 途中にねじりモーメントを受ける円形断面棒」

オリジナル

基本例題8.04 P268「材料力学演習(20221021)一括(ver.3.3)」を勉強したい。#sympy
        ???タブレット等で、pdfを開く事ができないかも。??? 

sympyで

オリジナル 様の方法を参考に

・ver0.1

# ver0.1
from sympy import *
var('TAC,TCB,GIp,x,l1,l2,TA,TB,TC')
U=Integral(TAC**2/(2*GIp),(x,0,l1))+Integral(TCB**2/(2*GIp),(x,l1,l1+l2)) #;print(U)
U=U.subs({TAC:TC+TA,TCB:TB})                                              #;print(U)
U=U.doit().expand()                                                                 
print("#",U)
print("#",U.factor(l1))
print("#",U.expand().factor(l1))
print("#",U.factor(1/(2*GIp)))
print("#",(U-TB**2*l2/(2*GIp))         .simplify(),"+",TB**2*l2/(2*GIp))
print("#",(U-TB**2*l2/(2*GIp)).factor().simplify(),"+",TB**2*l2/(2*GIp))
# TA**2*l1/(2*GIp) + TA*TC*l1/GIp + TB**2*l2/(2*GIp) + TC**2*l1/(2*GIp)
# (TB**2*l2 + l1*(TA**2 + 2*TA*TC + TC**2))/(2*GIp)
# (TB**2*l2 + l1*(TA**2 + 2*TA*TC + TC**2))/(2*GIp)
# (TA**2*l1 + 2*TA*TC*l1 + TB**2*l2 + TC**2*l1)/(2*GIp)
# l1*(TA**2 + 2*TA*TC + TC**2)/(2*GIp) + TB**2*l2/(2*GIp)
# l1*(TA + TC)**2/(2*GIp) + TB**2*l2/(2*GIp)
# 
# xxxxだめです。 print("#",combine_sqrts_as_string_fixed(U, variable_order=[l1,l2])) 
# (TC+TB)**2/(2*GIp)*l1 + TB**2/(2*GIp)*l2

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

(テンプレート)

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

参考文献

>一部に等分布荷重を受ける単純支持はり
>JSME p89
 
>単純支持ばり 7)
>構造力学公式集 p136

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?