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?

長柱の座屈,フレームの座屈 基本例題7.02 P222「材料力学演習(20221021)」をsympyでやってみたい。

Last updated at Posted at 2025-01-24

・未 [細長比の条件]
・済 [オイラー座屈荷重の式の適用性]
・済 [オイラー座屈荷重と座屈応力]

オリジナル

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

sympyで

[細長比の条件] の勉強中

# ver0.1
# 基本例題7.02 P222
from sympy import *
var('t,h,E.I,l,A',nonnegative=True)
def print_significant(value, sig_figs=3):
    """
    数値を指定された有効数字で表示する関数

    :param value: 表示したい数値
    :param sig_figs: 有効数字の桁数(デフォルトは3桁)
    """
    formatted_value = f"{value:.{sig_figs}g}"
    return formatted_value  # print ではなく return を使う
# [オイラー座屈荷重の式の適用性]
I_kosiki=t*h**3/12
Pcr     =pi**2*E*I/(4*l**2)
rep     ={E:70*10**9,l:1000}                                  # ;print(rep)
I1 =round(I_kosiki.subs({t:15,h:10}))*10**(-12)                 ;print("#"    ,print_significant(float(I1),4))
I2 =round(I_kosiki.subs({t:10,h:15}))*10**(-12)                 ;print("# ???",print_significant(float(I2),4))
# l_k=round((l*sqrt(A/I )).subs({l:1.0,A:10*15*10**(-6),I:I1})  ;print("#"   ,l_k)
l_k  =round((l*sqrt(A/I1)).subs({l:1.0,A:10*15*10**(-6)}),1)    ;print("#"   ,l_k)
print()
# [オイラー座屈荷重と座屈応力]
# Pcr=round((pi**2*E*I/(4*L**2)).subs({E:70*10**9,I:I1,L:1.0})) ;print("#",Pcr)
Pcr=float((pi**2*E*I/(4*L**2)).subs({E:70*10**9,I:I1,L:1.0}))   ;print("#",round(Pcr))
σ  =float((Pcr/A).subs({A:t*h}).subs({t:15,h:10}))              ;print("#",round(σ,2))
Pcr=Pcr*4;                σ=σ*4                                 ;print("#",round(Pcr),round(σ,2))
Pcr=round(Pcr*4/1000,2);  σ=round(σ  *4,1)                      ;print("#",Pcr,σ)
# 1.25e-09
# ??? 2.812e-09
# 346.4

# 216
# 1.44
# 864 5.76
# 3.45 23.0

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

(テンプレート)

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

参考文献

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

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?