1
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?

More than 1 year has passed since last update.

静力学と材料力学 発展例題1.23 P17「材料力学演習(20221021)」をsympyでやってみた。

Last updated at Posted at 2023-05-31

オリジナル

発展例題1.23 P17
http://zairikiweb.starfree.jp/zai_enshuh/zai_enshuh_ver.3.3.pdf#page=22

「材料力学演習(20221021)一括(ver.3.3)」を勉強したい。>sympy
https://qiita.com/mrrclb48z/items/c3274daf5f7a99cfe027#%E4%BD%9C%E6%A5%AD%E4%B8%AD%E7%A7%81%E3%81%AE%E8%A7%A3%E7%AD%94sympy

sympyで

from sympy import *
l1,l2,l3=symbols('l1,l2,l3',real=True)
P      =symbols('P'        ,real=True)
T      =symbols('T'        ,real=True)
RAH,RAV=symbols('RAH,RAV'  ,real=True)
RBH,RBV=symbols('RBH,RBV'  ,real=True)
myFx=Eq( RAH-RBH                ,0)
myFy=Eq( RAV+RBV-P              ,0)
myM =Eq((l1+l2)*RBV-(l1+l2+l3)*P,0)          # (Aまわり)
ans=solve([myFx,myFy,myM],[RAH,RAV,RBH,RBV])
# print(ans)
mySubs={P:500,l1:4,l2:2,l3:1}
RBV_ans=ans[RBV].subs(mySubs)
print("#",round(RBV_ans), round(ans[RAV].subs(mySubs)),ans[RAH].simplify())
# 
myCM=Eq(2*RBV-4*RBH,0) 
RBH_ans=solve(myCM,RBH)[0].subs({RBV:RBV_ans})
RAH_ans=RBH_ans.subs({RBV:RBV_ans})
RCH_ans=RBH_ans.subs({RBV:RBV_ans})
RCV_ans=RBV_ans
print("#",round(RBH_ans))
print("#",round(RCH_ans),round(RCV_ans))
# 583 -83 RBH
# 292
# 292 583

①私の環境は,pycharmです。
②よく聞くのは、Jupyterです。
③web上で、上記のソースを「SymPy Live shell」に、コピー貼り付けでもできました。
黒背景の右上に、マウスを移動すると、コピーマークが発生します。
??? タブレット環境で、コピー貼り付けが実行できませんでした。???

Mathematicaで

勉強中

作図

勉強中

1
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
1
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?