AllowableStress
許容応力の確率論的決定
Shinsuke Sakai
Emeritus Professor, The University of Tokyo, Japan
Visiting Professor, Yokohama National University, Japan
参考文献
酒井信介、"許容応力の確率論的決定法"、圧力技術60巻1号(2022)、pp.18-23.
使用プログラム言語
Python
ライセンス
このプロジェクトは,MITライセンスのもとにライセンスが付与される。詳細はLICENSEを参照のこと。
インストール方法
ターミナルモードにおいて
pip install AllowableStress
事前準備
from AllowableStress import AllowableStress as Astress
pas=Astress.PAStress()
メソッドの詳細は下記コマンドで確認できる。
help(AStress)
正規分布
$\mu$, $\sigma$ともに既知の場合
引張強さの分布が $N(400,30^2)$の正規分布であるとき,P=0.01満足する許容応力 $S_a$を決定する。
pas.LowerLimit(mu=400, sigm=30, P=0.01)
#330.2095637787748
$\mu$のみが未知の場合
引張強さの許容応力を決定するために,5本の強度実験を実施した。その結果 $\hat{\mu}=400MPa$ が得られた。信頼度90%,信頼水準95%を満足するための許容応力 $S_a$を求めよ。ただし,過去の経験から強度の標準偏差 $\sigma=20MPa$が与えられているものとする。
pas.SetParam(param='n',val=5)
pas.SetParam(param='mu',val=400)
pas.SetParam(param='sigm',val=20)
pas.Bbasis2()
#359.6569505975057
$\mu$, $\sigma$ともに未知の場合
引張強さの許容応力を決定するために,5本の強度実験を実施した。その結果 $\hat{\mu}=400MPa$, $\hat{\sigma}=20MPa$が得られた。信頼度90%,信頼水準95%を満足するための許容応力 $\hat{S_a}$を求めよ。
pas.SetParam(param='n',val=5)
pas.SetParam(param='mu',val=400)
pas.SetParam(param='sigm',val=20)
pas.Bbasis()
#331.867335129965
A許容値,B許容値の決定
5本の引張試験(サンプルサイズ $n$=5)の結果,引張強さ(408.4, 374.0, 395.9, 405.8, 412.3)(単位:MPa)が得られた。この材料の $\mu$, $\sigma$ともに未知であるとするとき,A許容値,B許容値を決定せよ
data=[408.4, 374.0, 395.9, 405.8,412.3]
pas.SetData(data)
SaA=pas.Abasis()
SaB=pas.Bbasis()
SaA,SaB
#311.00403498262483 346.8989842383104
対数正規分布
母集団の強度Sが対数正規分布に従い、logSの平均値を $\mu_L$,標準偏差を $\sigma_L$とする。まず、対数正規分布に従うサンプルデータ10点を下記により発生する。 $\mu_L$のみが未知の場合と、 $\mu_L$, $\sigma_L$ともに未知の場合について、A許容値、B許容値の評価プログラムを示す。
import numpy as np
sigm=np.log(1.1)
mu=np.log(400)
n=10
s=np.random.lognormal(mu,sigm,n)
slog=np.log(s)
$\mu_L$のみが未知の場合
mu=slog.mean()
pas.SetParam(param='n',val=10)
pas.SetParam(param='mu',val=mu)
pas.SetParam(param='sigm',val=sigm)
Abasis=np.exp(pas.Abasis2())
Bbasis=np.exp(pas.Bbasis2())
print('Absis=',Abasis,':Bbasis=',Bbasis)
#Absis= 291.2633407447084 :Bbasis= 321.76051705594955
$\mu_L$, $\sigma_L$ともに未知の場合
sigm=slog.std()
mu=slog.mean()
pas.SetParam(param='n',val=10)
pas.SetParam(param='mu',val=mu)
pas.SetParam(param='sigm',val=sigm)
Abasis=np.exp(pas.Abasis())
Bbasis=np.exp(pas.Bbasis())
print('Absis=',Abasis,':Bbasis=',Bbasis)
# Absis= 246.67391288011243 :Bbasis= 294.9455976839429
二母数ワイブル分布
母集団の強度Sが二母数ワイブル分布に従い、形状母数 $\alpha$が既知とする。まず、形状母数 $\alpha$,尺度母数 $\beta$である二母数ワイブル分布に従うサンプルデータ10点を下記により発生する。A許容値、B許容値の評価プログラムを示す。
import numpy as np
### 例題 ###
#### 二母数ワイブル分布の乱数発生 ###
#alpha 形状母数 beta 尺度母数 n 個数
alpha=8.0
beta=400.0
n=10
dd=np.random.weibull(alpha,n)*beta
# 形状母数は既知であるとして、A許容値、B許容値を評価する #
pas=Astress.PAStressW()
pas.SetData(dd,alpha)
print('Abasis=',pas.Abasis(),'Bbasis=',pas.Bbasis())
#Abasis= 205.56913798387714 Bbasis= 275.7528938820833
Metadata
Release files for allowablestress 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allowablestress-0.0.6.tar.gz | 5.3 kB | Without provenance | Details for allowablestress-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allowablestress-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for allowablestress-0.0.6-py3-none-any.whl |
Total release size: 11.2 kB
Release files / allowablestress-0.0.6.tar.gz
| Download URL | allowablestress-0.0.6.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61ed0a0dcd4cdfaaa67d52ab3762a6f6a63a102da9c62db480a07c9eef137d44
|
|
BLAKE2b-256 checksum How to use checksums |
96725fc2530ec61430b7290a0a740d918f87f26045fcca6fc0d48c1818054b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Release files / allowablestress-0.0.6-py3-none-any.whl
| Download URL | allowablestress-0.0.6-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8819dee6f493513fe0ebaf470c9acf730b4ca7e69fcaf0708a592f7455da3e87
|
|
BLAKE2b-256 checksum How to use checksums |
09abe529cfd94dc6e758ebf18aef54b565b6e6cccb3abb235c60cd1eae8c810a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.9
|
Security for allowablestress 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.