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, はりの応力とSFD,BMD 基本例題4.20 P98 「材料力学演習(20221021)」をsympyでやってみたい。

Last updated at Posted at 2023-12-29

オリジナル

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

latexで

基本事項3(せん断力と曲げモーメント)4. p94より

\begin{array}{ll}
F=\dfrac{dM}{dx}\\
\end{array}

sympyで

・ver0.1

# ver0.1
# 基本例題4.20 P98
from sympy import *
from decimal import Decimal, ROUND_HALF_UP

var('FAC,x,a,MAC,FCB,P,MCB,l,RB,MC',real=True)
# var('RA,RB'                        ,real=True)
RA = Symbol('RA')
RB = Symbol('RB')
def myDic (myStrKey,myValue):
    return {sympify(myStrKey):myValue}
def myRound1(x, d=1):
    p = Decimal(str(x)).quantize(Decimal(str(1/10**d)), rounding=ROUND_HALF_UP)
    p = float(p)
    return p
MAC=solve(-RA*x+MAC   ,MAC)[0]                  ;print("# MAC =",MAC)
MCB=solve(-RA*x+MC+MCB,MCB)[0]                  ;print("# MCB =",poly(MCB,P).args[0])
FAC=diff(MAC,x)                                 ;print("# FAC =",FAC)
FCB=diff(MCB,x)                                 ;print("# FCB =",FCB)
RA =solve(MCB.subs({x:l}),RA )[0]               ;print("# RA  =",RA)           
RB =solve(RA+RB          ,RB )[0]               ;print("# RB  =",RB) ;print()          
# 
rep = {l:1.0,a:0.4,MC:1000}
rep|= myDic("RA" ,myRound1(RA.subs(rep)) )     # ;print("# rep =",rep)
rep|= myDic("RB" ,myRound1(RB.subs(rep)) )     # ;print("# rep =",rep)
print("# ",rep )
# 
print("# RA  =",myRound1(RA .subs(rep)))
print("# RB  =",myRound1(RB .subs(rep)))
print("# FAC =",myRound1(FAC.subs(rep)))
print("# FCB =",myRound1(FCB.subs(rep)))
print("# MAC =",MAC         .subs(rep) )
print("# MCB =",MCB         .subs(rep) )
# MAC = RA*x
# MCB = -MC + RA*x
# FAC = RA
# FCB = RA
# RA  = MC/l
# RB  = -MC/l

#  {l: 1.0, a: 0.4, MC: 1000, RA: 1000.0}
# RA  = 1000.0
# RB  = -1000.0
# FAC = 1000.0
# FCB = 1000.0
# MAC = 1000.0*x
# MCB = 1000.0*x - 1000

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

(テンプレート)

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

参考文献

>一部に等分布荷重を受ける単純支持はり
>JSME p89
 
>片持ちばり 1)
>構造力学公式集 表5.1 片持ちばりの公式 p128

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?