0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

円周方向応力 第10章 薄肉圧力容器 基本例題10.14 p342「材料力学演習(20221021)」をsympyでやってみたい。(英:thin wall structure)

Last updated at Posted at 2023-12-13

オリジナル

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

sympyで

ver0.2

from sympy import *

var('σt1,σt2',real=True)
var('R1 ,R2' ,real=True)
var('p,t,D'  ,real=True)
eq=Eq(σt1/R1+σt2/R2,p/t)
rep={R1:D/2}                                      
print("#   ",eq) 
print("# 1)",solve(eq.subs({σt2:0})                .subs(rep),σt1)[0])  
print("# 2)",solve(eq.subs({R2:R1}).subs({σt2:σt1}).subs(rep),σt1)[0])  
#    Eq(σt2/R2 + σt1/R1, p/t)
# 1) D*p/(2*t)
# 2) D*p/(4*t)

ver0.1

# ver0.1
from sympy import *

var('σt1,σt2',real=True)
var('R1 ,R2',real=True)
var('p,t,D' ,real=True)
eq=Eq(σt1/R1+σt2/R2,p/t)                        ;print("#   ",eq)
# 
eq1=eq .subs({σt2:0})                           ;print("# 1)",eq1)
print("# 1)",solve(eq1.subs({R1:D/2}),σt1)[0])  ;print()  
# 
eq2=Eq(eq.lhs.subs({R2:R1}).factor(),eq.rhs)    ;print("# 2)",eq2)
eq2=eq2.subs({σt2:σt1})                         ;print("# 2)",eq2)
print("# 2)",solve(eq2.subs({R1:D/2}),σt1)[0])  
#    Eq(σt2/R2 + σt1/R1, p/t)

# 1) Eq(σt1/R1, p/t)
# 1) D*p/(2*t)

# 2) Eq((σt1 + σt2)/R1, p/t)
# 2) Eq(2*σt1/R1, p/t)
# 2) D*p/(4*t)

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

(テンプレート)

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?