LoginSignup
0
0

圧力容器の直径の変化量 第10章 薄肉圧力容器 基本例題10.04 p338「材料力学演習(20221021)」をsympyでやってみたい。(英:thin wall structure)

Last updated at Posted at 2023-12-18

オリジナル

基本例題10.04 p338「材料力学演習(20221021)一括(ver.3.3)」を勉強したい。#sympy
          ???タブレット等で、pdfを開く事ができないかも。??? 
←基本例題10.01 p335

sympyで

from sympy import *

var('εt,D,ΔD'      ,real=True)
var('σt,σx,v,E,p,t',real=True)
def myEq_RepLR(eq):
     return {eq.lhs:eq.rhs}
eq1=Eq(εt,(pi*(D+ΔD)-pi*D)/(pi*D))           ;print("#",eq1)
eq1=Eq(eq1.lhs,eq1.rhs.simplify())           ;print("#",eq1);print()
# 
eq2=Eq(εt,σt/E-v*σt/E)                       ;print("#",eq2)
rep=myEq_RepLR( Eq(σt,D*p/(2*t)))           #;print(rep)
eq2=Eq(eq2.lhs,eq2.rhs.subs(rep).factor())   ;print("#",eq2);print()
# 
ans=solve(eq1,ΔD)[0]                         ;print("#",ans)
eq3=Eq(ΔD,ans)                               ;print("#",eq3)
rep=myEq_RepLR(eq2)                         #;print(rep)
eq3=eq3.subs(rep)                            ;print("#",eq3)
# Eq(εt, (-pi*D + pi*(D + ΔD))/(pi*D))
# Eq(εt, ΔD/D)

# Eq(εt, -v*σt/E + σt/E)
# Eq(εt, -D*p*v/(2*E*t) + D*p/(2*E*t))
# Eq(εt, -D*p*(v - 1)/(2*E*t))

# D*εt
# Eq(ΔD, D*εt)
# Eq(ΔD, -D**2*p*(v - 1)/(2*E*t))

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

(テンプレート)

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