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?

sympyのBeamを調べた。(追加)MathematicaのLaplace変換で

Last updated at Posted at 2024-10-24

・タイトルを変更予定です。

Doc

sympyで

片持ち梁(cantilever beam)

集中荷重

・操作が逆のような気もします。一般解の微分から,戻って積分です。

# ver0.1
from sympy import *
var("E,I,w,P,l,x")
myEIw   =Rational(1,6)*P*(l-x)**3+Rational(1,2)*P*l**2*x-Rational(1,6)*P*l**3
myEIw_d1=diff(myEIw,x)
myEIw_d2=diff(myEIw,x,2)
print("#",myEIw)
print("#",myEIw_d1)
print("#",myEIw_d2)
print("#", integrate(integrate(myEIw_d2,x),x))
print("#",(integrate(integrate(myEIw_d2,x),x)-myEIw).simplify())
# -P*l**3/6 + P*l**2*x/2 + P*(l - x)**3/6
# P*l**2/2 - P*(l - x)**2/2
# P*(l - x)
# P*l*x**2/2 - P*x**3/6
# 0

・二重積分の部分を修正。

# ver0.2
from sympy import *
var("E,I,w,P,l,x")
myEIw   =Rational(1,6)*P*(l-x)**3+Rational(1,2)*P*l**2*x-Rational(1,6)*P*l**3
myEIw_d1=diff(myEIw,x)
myEIw_d2=diff(myEIw,x,2)
print("#",myEIw)
print("#",myEIw_d1)
print("#",myEIw_d2)
print("#", integrate( myEIw_d2,(x,0,x)        ) )
print("#", integrate( myEIw_d2,(x,0,x),(x,0,x)) )
print("#",(integrate( myEIw_d2,(x,0,x),(x,0,x))-myEIw).simplify())
# -P*l**3/6 + P*l**2*x/2 + P*(l - x)**3/6
# P*l**2/2 - P*(l - x)**2/2
# P*(l - x)
# P*l*x - P*x**2/2
# P*l*x**2/2 - P*x**3/6
# 0

・仮想仕事の原理 で
【構造力学】一級項目別解説⑩「はり・ラーメンの変位(仮想仕事の原理)」〈確実に1点取る〉 【一級建築士試験】
10:35 13:14
https://youtu.be/jIk9uBtkM60?t=635

# ver0.3
from sympy import *
var("E,I,P,l,x")
M    =-P*x
M_Bar=M.subs({P:1})
print("#",1/(E*I)*integrate( M*M_Bar,(x,0,l)))
# P*l**3/(3*E*I)

・(作業中)

# ver0.4


以下勉強中

等分布荷重

両端固定梁

集中荷重

等分布荷重

(追加)Mathematicaの ラプラス変換で

片持ち梁(cantilever beam)

集中荷重

LaplaceTransform[EI Y''[x] == -(-P*(l - x)), x, s] /. {Y[0] -> 0, 
   Y'[0] -> 0};
Solve[%, LaplaceTransform[Y[x], x, s]];
Expand[InverseLaplaceTransform[%, s, x]];
% //. {x_} :> x /. x -> l
D[%% //. {x_} :> x, x] /. x -> l

OUt

Y[l] -> (l^3 P)/(3 EI)
Derivative[1][Y][l] -> (l^2 P)/(2 EI)

両端固定梁

XXX できませんでした。ディラックのデルタ関数。集中荷重

LaplaceTransform[EI Y''''[x] == P*DiracDelta[l/2]] /. {Y[0] -> 0, 
   Y'[0] -> 0, Y[l] -> 0, Y'[l] -> 0};
Solve[%, LaplaceTransform[Y[x], x, s]];
Expand[InverseLaplaceTransform[%, s, x]];
% //. {x_} :> x /. x -> l
D[%% //. {x_} :> x, x] /. x -> l

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

(テンプレート)

・以下ができたら、助かります。指定と全部です

いつもと違うリンクのおすすめです。

「弘前大学 Home Sweet Home - 弘大ホーム」様

「構造と連続体の力学基礎を独習する」様 

「構造力学II」様

>・単位荷重法(単純梁)< 構造力学II第14回 < 構造力学II Youtubeあり

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?