Пример #1
0
                                                   ys=yield_strength, r=r, kclosure=kclosure,
                                                   threshold=threshold)

# Kmax at Overload计算
k_max_ol = mts_analysis.DeltaKCalculating(b=thickness,
                                          w=width,
                                          a=aol_hold,
                                          pmax=pol,
                                          pmin=0)

# 塑性区系数及尺寸计算
factor = overload_analysis.FactorXiaoping(kmax=k_max_ol,
                                          t=thickness,
                                          ys=yield_strength)
r_ol = overload_analysis.PlasticZoneWithFactor(kmax=[k_max_ol],
                                               ys=yield_strength,
                                               factor=factor)

# 计算dK_eff
dkeff = []
dk_willenborg = []
for seq, value in enumerate(a_Manual):
    # 只计算裂纹长度扩展到aol_hold以后的数据的dk_eff(未施加高载以前的不进行计算)
    if value > aol_minrate:
        k_red = k_max_ol * np.sqrt(1 - (a_Manual[seq] - aol_minrate) * 1e-3 /
                                   r_ol) - dk_Manual[seq] / (1 - r)
        kmax_eff = dk_Manual[seq] / (1 - r) - k_red
        if dk_Manual[seq] * r / (1 - r) > k_red:
            kmin_eff = dk_Manual[seq] * r / (1 - r) - k_red
        else:
            kmin_eff = 0
    read_data.ReadTestInf(sequence=sequence[0])
cycles, cracklength, kmax, kmin, pmax, pmin = read_data.ReadOriginResult(
    sequence[0], closure=False, cod=False)
dadn_Manual, n_Manual, dk_Manual, a_Manual = \
    experiment_calculation.FCGRandDKbyOriginalData(b=thickness, w=width, n=cycles, pmax=pmax, pmin=pmin,
                                                   a=cracklength,
                                                   ys=yield_strength, r=stress_ratio, threshold=threshold)
# 实验数据读取和初步处理

kol = mts_analysis.DeltaKCalculating(b=thickness,
                                     w=width,
                                     a=aol,
                                     pmax=pol,
                                     pmin=0)
rol = overload_analysis.PlasticZoneWithFactor(kmax=np.array([kol]),
                                              ys=yield_strength,
                                              factor=factor)
# 高载参数计算

dadn_ola, dk_ola, n_ola, a_ola = \
    mts_analysis.FCGDataSelectByThreshold(dadn=dadn_Manual, dk=dk_Manual, n=n_Manual, a=a_Manual,
                                          threshold=aol, target='a', keepbigger=1)
# 以高载时裂纹长度aol筛选出高载后的数据

kmax_ola = np.array([dk / (1 - stress_ratio) for dk in dk_ola])
rm_ola = overload_analysis.PlasticZoneWithFactor(kmax=kmax_ola,
                                                 ys=yield_strength,
                                                 factor=factor)
# 高载段参数计算

m1, _ = overload_analysis.WheelerFittingBaseParis(a=a_ola,
Пример #3
0
specimen.a_dadn_min = 13.8055
specimen.a_kc_max = specimen.a_alpha_end
specimen.a_alpha_end += 2.5
specimen.specimen_print()

# paris参数
c_ca, m_ca = paris_and_walker.ParisParameter(r=specimen.stress_ratio)

# Overload PLZ相关参数,塑性区系数为Irwin
kol = mts_analysis.DeltaKCalculating(b=specimen.thickness,
                                     w=specimen.width,
                                     a=specimen.a_ol_applied,
                                     pmax=specimen.overload,
                                     pmin=0)
plz_ol = overload_analysis.PlasticZoneWithFactor(kmax=np.array([kol]),
                                                 ys=specimen.yield_stress,
                                                 factor=plz_factor,
                                                 t=specimen.thickness)

# 数据筛选(筛选出dadn_min后的数据,标记为1)
dadn_1, dk_1, kc_1, n_1, a_1 = specimen.data_select_by_cracklength(
    lowerlimit=specimen.a_dadn_min, upperlimit=specimen.a_kc_max)
# 移动平均
if moving_average:
    print('Notice: moving average working!')
    dadn_ave, dk_ave = closureanalysis.DoubleDataSelectMovingAverage(
        data=specimen.dadn, reference=specimen.dk, ratio=0.2, numofaverage=7)
    _, a_ave = closureanalysis.DoubleDataSelectMovingAverage(
        data=specimen.dadn, reference=specimen.a, ratio=0.2, numofaverage=7)
    dadn_temp, dk_temp = closureanalysis.DoubleDataSelectMovingAverage(
        data=dadn_1, reference=dk_1, ratio=0.2, numofaverage=7)
    _, a_temp = closureanalysis.DoubleDataSelectMovingAverage(data=dadn_1,
Пример #4
0
    read_data.ReadTestInf(sequence=sequence[0])
cycles, cracklength, kmax, kmin, pmax, pmin = read_data.ReadOriginResult(
    sequence[0], closure=False, cod=False)
dadn_Manual, n_Manual, dk_Manual, a_Manual = \
    experiment_calculation.FCGRandDKbyOriginalData(b=thickness, w=width, n=cycles, pmax=pmax, pmin=pmin,
                                                   a=cracklength,
                                                   ys=yield_strength, r=stress_ratio, threshold=threshold)

# 高载参数计算
kol = mts_analysis.DeltaKCalculating(b=thickness,
                                     w=width,
                                     a=a_ol,
                                     pmax=pol,
                                     pmin=0)
rol = overload_analysis.PlasticZoneWithFactor(kmax=np.array([kol]),
                                              ys=yield_strength,
                                              factor=1 / math.pi)

# 以高载时裂纹长度aol筛选出高载后的数据
dadn_ola, dk_ola, n_ola, a_ola = \
    mts_analysis.FCGDataSelectByThreshold(dadn=dadn_Manual, dk=dk_Manual, n=n_Manual, a=a_Manual,
                                          threshold=a_fcgr_min, target='a', keepbigger=1)

# 高载段参数计算
kmax_ola = np.array([dk / (1 - stress_ratio) for dk in dk_ola])
rm_ola = overload_analysis.PlasticZoneWithFactor(kmax=kmax_ola,
                                                 ys=yield_strength,
                                                 factor=1 / math.pi)

# Wheeler模型指数系数m1拟合
m1, _ = overload_analysis.WheelerFittingBaseParis(a=a_ola,
# 计算塑性区大小
# 2018/10/15 Version 1.0
# Lu Yunchao

from FCGAnalysisLib import overload_analysis
from FCGAnalysisLib import mts_analysis
from FCGAnalysisLib import paris_and_walker
import numpy as np

sequence = ["yang-baoban_Lu-420-05"]
specimen_data = paris_and_walker.test_database2(specimen=sequence[0])
ys = 0.365          # GPa
a_ol = np.array([specimen_data["a_ol_applied"]])      # mm
p_ol = specimen_data["overload"]         # N
p_max = specimen_data["maxload"]
a_kc_max = specimen_data["a_kc_max"]
print('specimen:'+sequence[0]+',a_ol_applied:'+str(a_ol)+'mm,overload:'+str(p_ol)+'N, maxload:'+str(p_max))
b = 2.5             # mm
w = 40              # mm

k_ol = np.array([mts_analysis.DeltaKCalculating(b=b, w=w, a=a_ol, pmax=p_ol, pmin=0)])
k_kc_max = np.array([mts_analysis.DeltaKCalculating(b=b, w=w, a=a_kc_max, pmax=p_max, pmin=0)])
factor = overload_analysis.FactorXiaoping(kmax=k_ol, t=b, ys=ys)
print(factor)
print(str(1/np.pi))
r_ol = overload_analysis.PlasticZoneWithFactor(kmax=k_ol, ys=ys, factor='Xiaoping', t=b)
r_kc_max = overload_analysis.PlasticZoneWithFactor(kmax=k_kc_max, ys=ys, factor='Xiaoping', t=b)
print("r_ol:", r_ol)
print("r_kc_max:", r_kc_max)
Пример #6
0
def BiSelection(a,
                b,
                const,
                t,
                w,
                ys,
                a_ol_applied,
                pmax,
                plz_factor,
                accu=0.001):
    # 利用二分法计算主导位置变化
    # 裂纹自高载后的扩展长度+循环塑性区尺寸是已知值,但循环区尺寸是扩展长度的函数且不易解,故采用二分法求解
    # 求解的方程可表示为求解长度da使方程:
    # da + plz,reversing(da) - plz,ol * precentage(44% for OLR = 2, 80% for OLR = 1.5)= 0
    # input arguments:
    # a, b: 二分法的左右两端
    # const:高载塑性区尺寸乘比例(44% or 80%)
    # t, w, ys: 试件的thickness、width和yielding stress,可由类读取
    # a_ol_applied:试验高载时对应裂纹长度,可由类读取
    # pmax:试验中循环载荷峰值,可由类读取
    # plz_factor:塑性区尺寸,可输入常数或Xiaoping,若输入Xiaoping则会自动根据试件尺寸计算
    # accu:二分法精度,默认为0.001
    # return arguments:
    # result: 数组,第0位为解的值x,第1位为此时函数的值
    i = 0  # 计数器
    # 计算二分法左端的函数值
    ka = mts_analysis.DeltaKCalculating(b=t,
                                        w=w,
                                        a=a_ol_applied + a,
                                        pmax=pmax,
                                        pmin=0)
    plza = overload_analysis.PlasticZoneWithFactor(kmax=[ka],
                                                   factor=plz_factor,
                                                   ys=ys,
                                                   t=t)
    ya = a + plza - const
    # 计算二分法右端的函数值
    kb = mts_analysis.DeltaKCalculating(b=t,
                                        w=w,
                                        a=a_ol_applied + b,
                                        pmax=pmax,
                                        pmin=0)
    plzb = overload_analysis.PlasticZoneWithFactor(kmax=[kb],
                                                   factor=plz_factor,
                                                   ys=ys,
                                                   t=t)
    yb = b + plzb - const
    result = []
    # 若两端为0的情况:
    if ya == 0:
        result.append(a)
        result.append(ya)
    elif yb == 0:
        result.append(b)
        result.append(yb)
    else:
        # 若两端不为零->进入二分法
        while i >= 0:
            c = (a + b) / 2
            # 计算中点的函数值
            kc = mts_analysis.DeltaKCalculating(b=t,
                                                w=w,
                                                a=a_ol_applied + c,
                                                pmax=pmax,
                                                pmin=0)
            plzc = overload_analysis.PlasticZoneWithFactor(kmax=[kc],
                                                           factor=plz_factor,
                                                           ys=ys,
                                                           t=t)
            yc = c + plzc - const
            # 判断解的范围精度是否满足accu的设定
            if np.abs(b - a) < accu:
                result.append(c)
                result.append(yc)
                print('Find Zero_point due to tolrance at c=' + str(c))
                break
            if yc == 0:
                result.append(c)
                result.append(yc)
                print('Find Zero_point due to Midpoint_value=0 at c=' + str(c))
                break
            elif yc * ya < 0:
                b = c
                i = i + 1
                continue
            elif yc * yb < 0:
                i = i + 1
                a = c
                continue
            else:
                print(
                    'ERROR: Unexpected situation come across.Check the process.'
                )
                break
    return result