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?

simple beam,a downward point load 第6章 はりのたわみと不静定はり 基本例題6.01 p155「材料力学演習(20221021)」をsympyでやってみたい。

Last updated at Posted at 2024-01-08

パイソニスタの方へ
・ver0.1 被積分関数をバラさずに,(x-a)のままで、積分計算の使い方を教えて下さい。
 置換積分???  積分+積分+積分 → 結果 → 結果1+結果2+結果2 
 最後に、(x-a)**nで、整列できますか? (2024/01/08)

latexで(勉強中)

基本事項1(はりのたわみ)p155 (pdf)より

\dfrac{d^{2}y}{dx^{2}}=\dfrac{M}{EI_{z}}

オリジナル

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

sympyで

・ver0.2
 4元連立方程式で

# ver0.2
# 基本例題6.01 P155
from sympy import *

var('x,P,EI' ,real=True)
var('EI,L'   ,real=True,nonnegative=True)
var('A,B,C,D',real=True)
y1_2=-P*x/(2*EI)                                  ;print("# y1_2 =",y1_2)
y1_1=(integrate( y1_2,x)+A).factor()              ;print("# y1_1 =",y1_1)
y1  =(integrate( y1_1,x)+B).factor()              ;print("# y1   =",y1  )
# 
y2_2=-P*(L-x)/(2*EI)                              ;print("# y2_2 =",y2_2)
y2_1=(integrate( y2_2,x)+C).factor()              ;print("# y2_1 =",y2_1)
y2  =(integrate( y2_1,x)+D).factor()              ;print("# y2   =",y2  )
rep=solve( [y1  .subs({x:0  }),
            y2  .subs({x:L  }),
            y1  .subs({x:L/2})-y2  .subs({x:L/2}),             
            y1_1.subs({x:L/2})-y2_1.subs({x:L/2})             
           ] ,[A,B,C,D]  )                        ;print("# rep  =",rep )
y1=y1.subs(rep)                                   ;print("# y1   =",y1  )
y2=y2.subs(rep)                                   ;print("# y2   =",y2  )
ans=solve(diff(y1,x),x)                           ;print("# ans  =",ans )
ans=solve(diff(y2,x),x)                           ;print("# ans  =",ans )
ymax=y2.subs({x:ans[0],})                         ;print("# ymax =",ymax)
# y1_2 = -P*x/(2*EI)
# y1_1 = -(-4*A*EI + P*x**2)/(4*EI)
# y1   = -(-12*A*EI*x - 12*B*EI + P*x**3)/(12*EI)
# y2_2 = -P*(L - x)/(2*EI)
# y2_1 = (4*C*EI - 2*L*P*x + P*x**2)/(4*EI)
# y2   = (12*C*EI*x + 12*D*EI - 3*L*P*x**2 + P*x**3)/(12*EI)
# rep  = {A: L**2*P/(16*EI), B: 0, C: 3*L**2*P/(16*EI), D: -L**3*P/(48*EI)}
# y1   = -(-3*L**2*P*x/4 + P*x**3)/(12*EI)
# y2   = (-L**3*P/4 + 9*L**2*P*x/4 - 3*L*P*x**2 + P*x**3)/(12*EI)
# ans  = [-L/2, L/2]
# ans  = [L/2, 3*L/2]
# ymax = L**3*P/(48*EI)

・ver0.1

# ver0.1
# 基本例題6.01 P155
from sympy import *

var('P,l,EIz,vA,vC,x,a,z',real=True)
θA = Symbol('θA')
θC = Symbol('θC')
RA  = Symbol('RA')
repxz={x:z}
repxa={x:a}
repxl={x:l}
repvA={vA:0}
repRA={RA: (l-a)*P/l}
repa2={ a:  l     /2}
zax =(z,a,x)
# 
MAC=RA*x                                                        ;print("# MAC =",MAC)
MCB=RA*x-P*(x-a)                                                ;print("# MCB =",MCB)
# 
θAC=θA-integrate(MAC/EIz,x)                                     ;print("# θAC=",θAC)
vAC =vA+integrate(θAC   ,x)                                     ;print("# vAC=",vAC)     ;print()
# 
θCB= θC                                                               \
     +integrate((-RA*x             /EIz ).subs(repxz),zax).factor()   \
     +integrate((  P*(x-a)         /EIz ).subs(repxz),zax).factor()                         ;print("# θCB =",θCB)
vCB=  vC                                                              \
     +integrate(( θC                    ).subs(repxz),zax).factor()   \
     +integrate((-RA*(-a**2 + x**2)/EIz/2).subs(repxz),zax).factor()  \
     +integrate((  P*(-a + x)**2   /EIz/2).subs(repxz),zax).factor()                        ;print("# vCB =",vCB)   ;print()
# 
θCa=θAC.subs(repxa)                                                                       ;print("# θC =",θCa)
vCa=vAC.subs(repxa)                                                                         ;print("# vC  =",vCa)   ;print()
# 
θCB=θCB.subs({θC:θCa})               .simplify()                                     ;print("# θCB =",θCB)
vCB=vCB.subs({vC:vCa}).subs({θC:θCa})                                                     ;print("# vCB =",vCB)   ;print()
# 
sol1=solve(vCB.subs(repxl),θA)[0].subs(repvA).subs(repRA)                        .factor() ;print("# θA =",sol1)
sol2=vAC.subs({θA:sol1})         .subs(repvA).subs(repRA).subs(repxa).subs(repa2).factor() ;print("# vc  =",sol2)
# MAC = RA*x
# MCB = -P*(-a + x) + RA*x
# θAC= θA - RA*x**2/(2*EIz)
# vAC= vA + x*θA - RA*x**3/(6*EIz)

# θCB = θC + P*(-a + x)**2/(2*EIz) - RA*(-a + x)*(a + x)/(2*EIz)
# vCB = vC + θC*(-a + x) + P*(-a + x)**3/(6*EIz) - RA*(-a + x)**2*(2*a + x)/(6*EIz)

# θC = θA - RA*a**2/(2*EIz)
# vC  = a*θA + vA - RA*a**3/(6*EIz)

# θCB = θA + P*(a - x)**2/(2*EIz) - RA*x**2/(2*EIz)
# vCB = a*θA + vA + (-a + x)*(θA - RA*a**2/(2*EIz)) + P*(-a + x)**3/(6*EIz) - RA*a**3/(6*EIz) - RA*(-a + x)**2*(2*a + x)/(6*EIz)

# θA = P*a*(a - 2*l)*(a - l)/(6*EIz*l)
# vc  = P*l**3/(48*EIz)

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

(テンプレート)

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

>北海道大学工学部
>はりのたわみの微分方程式 day

参考文献

>集中荷重Pを受ける単純支持はり
>JSME p86
 
>単純支持ばり 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?