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?

More than 1 year has passed since last update.

弾性棒に係る不静定系の力学 基本例題1.21 P15「材料力学演習(20221021)」をsympyでやってみた。

Last updated at Posted at 2023-05-24

solveを1回にする方法を教えて下さい。

オリジナル

基本例題1.21 P15
http://zairikiweb.starfree.jp/zai_enshuh/zai_enshuh_ver.3.3.pdf#page=20

「材料力学演習(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 *
l  ,t   =symbols('l   t'  ,real=True)
P       =symbols('P'      ,real=True)
NAC,NBC =symbols('NAC NBC',real=True)
RAH,RAV =symbols('RAH,RAV',real=True)
RBH,RBV =symbols('RBH,RBV',real=True)
my121_FH=Eq(NAC*cos(t)+NBC,0)
my121_FV=Eq(NAC*sin(t)-P  ,0)
ans=solve([my121_FH,my121_FV],[NAC,NBC])
NAC=ans[NAC]
NBC=ans[NBC]
#
myZu122L_FH=Eq( RAH+RBH   ,0)
myZu122L_FV=Eq( RAV+RBV-P ,0)
myZU122L_M =Eq(-RAH*l-P*l ,0)        # (Bまわり)  
ans=solve([myZu122L_FH,myZu122L_FV,
           myZU122L_M   
          ],[RAH,RBH])
RAH=ans[RAH]
RBH=ans[RBH]
#
myZu122R_FV=Eq( RAV-NAC*cos(t) ,0)
ans=solve(myZu122R_FV,RAV)
RAV=ans[0]
RBV=P-RAV
print("# RAH  RAV      RBH RBV"   )
print("#",RAH," ",RAV,RBH," ",RBV )
# RAH  RAV      RBH RBV
# -P   P/tan(t) P   P - P/tan(t)

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

Mathematicaで

勉強中

作図

勉強中

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?