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?

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

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)

sympyのTrussで

# ver1.1
from sympy.physics.continuum_mechanics.truss import Truss
from sympy import *
var('P')
var('L,H,l,A,E',positive=True)  
def myTruss(L):
    def myAdd_member(*args):
        def make_triples(s):
            return (s,s[0],s[1])
        for s in args:
            t.add_member(make_triples(s))      
    t = Truss()
    t.add_node     (('A',0,L)) 
    t.add_node     (('B',0,0),('C',L,0)) 
    myAdd_member   ( 'AC','CB')  
    t.apply_support(('A' ,'pinned'))
    t.apply_support(('B' ,'pinned'))
    t.apply_load   (('C',P,270))   
    return t
# -------------------------------------------------------------------------------------
myTruss(1).draw().show()       # 作図のため(l=1)
t=myTruss(l);t.solve()         # 計算のみ
print("#",{k:v for k,v in t.reaction_loads.items()})           
# {'R_A_x': -P, 'R_A_y': P, 'R_B_x': P, 'R_B_y': 0}

・縦横比は1:1でありません。

111.png

Mathematicaで

勉強中

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

(テンプレート)

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

wikipedia

Qiita内で

・類題

参考文献

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

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?