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.32 P288 「材料力学演習(20221021)」をsympyでやってみたい。

Last updated at Posted at 2023-05-05

・勉強して、直しました。(2024/01/13)
・申し訳ありません。意味がわかっていません。勉強中。

オリジナル

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

sympyで

・ver0.3 下と同じです。(2024/01/18)

# ver0.3
# 基本例題8.32 P288
from sympy import *
var('P,a,b,AE,EI,x1,x2',real=True)
U  = 1/(2*EI)*integrate( ( P*b)    **2,(x1,0,a))+1/(2*AE)*integrate((-P)**2,(x1,0,a)) \
    +1/(2*EI)*integrate( (-P*b+P*x2)**2,(x2,0,b))                                       #;print('#',U)
δCH=diff(U,P)                                                                          ;print('#',δCH)                                              
δCV= 1/EI   *integrate( (-P*b)*(-a+x1),(x1,0,a))                                       ;print('#',δCV)
# P*a*b**2/EI + P*b**3/(3*EI) + P*a/AE
# P*a**2*b/(2*EI)

・ver0.2 ver0.1のEq()が不要でした。(2024/01/13)

# ver0.2
# 基本例題8.32 P288
from sympy import *

var('l,EIz,AE,P,a,b,x1,x2,z',real=True)
MAB=-P*b      
MBC=-P*b+P*x2
NAB=-P
NBC=0
U1  =1/(2*EIz)*Integral(MAB **2,(x1,0,a)) 
U2  =1/(2*AE )*Integral((-P)**2,(x1,0,a)) 
U3  =1/(2*EIz)*Integral(MBC **2,(x2,0,b))  
U   =U1+U2+U3                                                         ;print("# U   =",U) 
δCH=diff(U1.doit(),P)+diff(U2.doit(),P).simplify()+diff(U3.doit(),P) ;print("# δCH =",δCH) 
mAB=-a+x1
δCV=1/EIz*Integral(MAB*mAB,(x1,0,a)).doit().simplify()               ;print("# δCV =",δCV) 
# U   = Integral(P**2*b**2, (x1, 0, a))/(2*EIz) + Integral((-P*b + P*x2)**2, (x2, 0, b))/(2*EIz) + Integral(P**2, (x1, 0, a))/(2*AE)
# δCH = P*a*b**2/EIz + P*b**3/(3*EIz) + P*a/AE
# δCV = P*a**2*b/(2*EIz)

・ver0.1 (2023/05/05)

from sympy import *
P      =symbols('P'      ,real=True)
a  ,b  =symbols('a   b'  ,real=True) 
MAB,MBC=symbols('MAB MBC',real=True)
NAB,NBC=symbols('NAB NBC',real=True)
A      =symbols('A'      ,real=True)
EE     =symbols('EE'     ,real=True)
x1,x2  =symbols('x1 x2'  ,real=True) 
U      =symbols('U'      ,real=True)
IZ     =symbols('IZ'     ,real=True)
myMAB  =Eq(MAB,-P*b)
myMBC  =Eq(MBC,-P*b+P*x2)
myNAB  =Eq(NAB,-P)
myNBC  =Eq(NBC, 0)
U      = 1/(2*EE*IZ)*integrate((-P*b     )**2,(x1,0,a)) \
        +1/(2*A *EE)*integrate((-P       )**2,(x1,0,a)) \
        +1/(2*EE*IZ)*integrate((-P*b+P*x2)**2,(x2,0,b))
print("#",diff(U,P))
dCV=1/(EE*IZ)*integrate((-P*b)*(-a+x1),(x1,0,a))
print("#",dCV)
# P*a*b**2/(EE*IZ) + P*b**3/(3*EE*IZ) + P*a/(A*EE)
# P*a**2*b/(2*EE*IZ)

いつもの? 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?