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?

材料力学「平行弦ワンレントラス 三角形2個」sympyのTrussで作図。

Last updated at Posted at 2025-05-31

・タイトル。変更予定です。
・sympyのTrussで作図しました。縦横比が1:1でありません。

Truss

# 平行弦ワンレントラス
from sympy.physics.continuum_mechanics.truss import Truss
import math
from sympy import *
var('S1 S2 S3 S4 S5')
P=1   # var('P')
L=1   # var('L')
t = Truss()
t.add_node     ((2,Rational(1,2)*L,Rational(1,2)*L*sqrt(3)), \
                (4,Rational(3,2)*L,Rational(1,2)*L*sqrt(3)))                       
t.add_node     ((1,0,0) ,(3,L,0)) 
t.add_member   ((S1,1,2),(S2,1,3),(S3,2,3))   
t.add_member   ((S4,2,4),(S5,3,4))   
t.apply_support((1,"pinned"), (3,"roller"))
t.apply_load   ((4,P,270))
p = t.draw()
p.show()
# 
t.solve()
print("#",t.internal_forces)
print("#",t.reaction_loads )           
# {S1: sqrt(3)/3, S2: -sqrt(3)/6, S3: -sqrt(3)/3, S4: sqrt(3)/3, S5: -2*sqrt(3)/3}
# {'R_1_x': 0, 'R_1_y': -1/2, 'R_3_y': 3/2}

111.png

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

(テンプレート)

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

wikipedia

Qiita

sympyのDoc 

・Truss (Docstrings) - SymPy 1.14.0 documentation

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?