def solve(self): # 等效跨径计算 self._m1 = True # 使用算法一 if self.span_type == 'Simple': self.Lc = self.L1 self._eq1 = 'L1' self._m1 = True if self.location_simple == 'Span' else False elif self.span_type == 'Continous': if self.location_continous == 'SideSupport': self.Lc = 0.8*self.L1 self._eq1 = '0.8*L1' self._m1 = False elif self.location_continous == 'MiddleSupport': self.Lc = 0.2*(self.L1+self.L2) self._eq1 = '0.2*(L1+L2)' elif self.location_continous == 'SideSpan': self.Lc = 0.8*self.L1 self._eq1 = '0.8*L1' elif self.location_continous == 'MiddleSpan': self.Lc = 0.6*self.L2 self._eq1 = '0.6*L2' else: raise InputError(self, 'location_continous', '不支持的参数值') else: raise InputError(self, 'span_type', '不支持的参数值') self.bc1 = min(self.Lc/6, self.b1) self.bc2 = min(self.Lc/6, self.b2) if self._m1: self.bc = self.b0+self.bc1+self.bc2 else: self.validate('positive', 'b1', 'b2') self.β1 = min(0.55+0.025*self.Lc/self.b1,1.0) self.β2 = min(0.55+0.025*self.Lc/self.b2,1.0) self.bc = self.b0+self.β1*self.bc1+self.β2*self.bc2
def solve(self): if self.location == 'middle_support': self.validate('positive', 'l1', 'l2') else: self.validate('positive', 'l') if self.section == 'I': bf_1 = None if self.beam_type == 'simple': bf_1 = self.l/3 elif self.beam_type == 'continuous': if self.location == 'side_span': bf_1 = 0.27*self.l elif self.location == 'middle_span': bf_1 = 0.2*self.l elif self.location == 'middle_support': bf_1 = 0.07*(self.l1+self.l2) else: raise InputError(self, 'location', '不支持的截面位置') bf_2 = self.da bf_3 = self.b+2*min(self.bh, 3*self.hh)+12*self.hf_ self.bfi = min(bf_1, bf_2, bf_3) if bf_1 else min(bf_2, bf_3) self.bfo = self.bfi/2+self.b/2+min(self.ha_o, self.bm_o) elif self.section == 'box': if self.beam_type == 'simple': self.li = self.l elif self.beam_type == 'continuous': if self.location == 'side_span': self.li = 0.8*self.l elif self.location == 'side_support': self.li = 0.8*self.l elif self.location == 'middle_span': self.li = 0.6*self.l elif self.location == 'middle_support': self.li = 0.2*(self.l1+self.l2) else: raise InputError(self, 'location', '不支持的截面位置') elif self.beam_type == 'cantilever': self.li = 1.5*self.l else: raise InputError(self, 'beam_type', '不支持的梁类型') ratio = self.bi/self.li if ratio < 0.7: self.ρf = -6.44*ratio**4+10.10*ratio**3-3.56*ratio**2-1.44*ratio+1.08 self.ρs = 21.86*ratio**4-38.01*ratio**3+24.57*ratio**2-7.67*ratio+1.27 if self.ρf > 1: self._ρf = self.ρf self.ρf = 1 if self.ρs > 1: self._ρs = self.ρs self.ρs = 1 else: self.ρf = 0.247 self.ρs = 0.148 self.bmif = self.ρf*self.bi self.bmis = self.ρs*self.bi if self.h >= self.bi/0.3: self.bmif = self.bmis = self.bi self.ratio = ratio else: raise InputError(self, 'section', '不支持的截面形状')
def solve(self): none_zeros = list(self.__inputs__.keys()) none_zeros.remove('Nl') none_zeros.remove('Ml') self.none_zero_check( *none_zeros) #('r', 'rs', 'l', 'l0', 'As', 'C', 'd') if self.Ns == 0: # 受弯构件 raise InputError(self, 'Ns', 'JTG规范不支持圆形截面受弯构件裂缝宽度计算') if self.Ms == 0: # 受压构件 raise InputError(self, 'Ms', 'JTG规范不支持圆形截面轴心受压(拉)构件裂缝宽度计算') self.C2 = 1 + 0.5 * self.Nl / self.Ns if self.Ms > 0: self.C2 = max(self.C2, 1 + 0.5 * self.Ml / self.Ms) self.e0 = self.Ms / self.Ns * 1e3 return self.solve_Wtk() if self.option == 'review' else self.solve_As()
def solve(self): self.validate('positive', 'a', 'hw') op = { 'Q235': [[70, 0, 0], [160, 280, 310]], 'Q345': [[60, 0, 0], [140, 240, 310]] } if not self.steel in op: # raise InputError(self, 'steel', '不支持的类型') # 规范有遗漏,未给出其它钢材品种的取值说明,计算时标号大于Q345的按Q345取值 self.steel = 'Q345' nt = min(int(self.nt), 1) nl = min(int(self.nl), 2) self.C = op[self.steel][nt][nl] if self.C <= 0: raise InputError(self, 'nt', '设置纵向加劲肋时,需同时设置横向加劲肋') self.η, self.tw_min = self.web_thick(self.τ, self.fvd, self.hw, self.C) opC1 = [345, 900, 3000] opC2 = {True: [77, 120, 187], False: [58, 90, 140]} opC3 = [1, 0.8, 0.64] self.C1 = opC1[nl] bl = self.a / self.hw > opC3[nl] self.C2 = opC2[bl][nl] self.eql = self.rib_space(self.a, self.hw, self.tw, self.σ, self.τ, self.fvd, self.C1, self.C2) self.It_min = self.fIt(self.hw, self.tw) self.ξl = self._ξl = self.fξl(self.a, self.hw) if self.ξl < 1.5: self.ξl = 1.5 self.Il_min = self.fIl(self.ξl, self.hw, self.tw)
def _get_end_layer_num(self): '''获取持力层所在的层号''' l = 0 for i in range(len(self.li)): l += self.li[i] if l > self.L: return i raise InputError(self, 'L', '桩长不能大于土层厚度之和')
def solve(self): self.validate('non-negative', 'υ', 'nl') if self.υ >= 1: raise InputError(self, 'υ', '应<1') self.Il,self.It,self.D,self.γl,self.γt,self.n,self.α0,\ self.α,self.Asl,self.δl,self.γl_,self.Asl_min,self.γt_min = \ self.fsolve(self.E,self.υ,self.a,self.b,self.t,self.hl,self.tl,self.ht,self.tt,self.nl,self.at) self.k = self.fk(self.α, self.α0, self.γl, self.δl, self.n, self.γl >= self.γl_)
def _seperate(param:str): a = getattr(self, param) if a == None: return None if isinstance(a, float) or isinstance(a, int): ax = ay = a elif isinstance(a, tuple) or isinstance(a, list): n = len(a) if n >0 and n < 1: ax = ay = a elif n > 1: ax = a[0] ay = a[1] else: raise InputError(self,param,'无法识别的输入') else: raise InputError(self,param,'无法识别的输入') return (ax, ay)
def solve(self): self.validate('non-negative', 'b', 'd', 'i') if self.b <= 0 and self.d <= 0 and self.i <= 0: raise InputError(self, 'i', '请输入b,d,i任意一项的值') self.φ = axial_compression._phi(self.l0, self.b, self.d, self.i) self.Nu = axial_compression.fNu(self.φ, self.fc, self.A, self.fy_, self.As_) * 1e-3 self.轴压比 = axial_compression.compression_ratio(self.N, self.A, self.fc) * 1e3
def solve_Rt(self): self.validate('positive', 'L', 'u', 'Ap') # , 'm0', 'λ', 'k2', 'γ2' def _to_list(param): if hasattr(param, '__len__') and not isinstance(param, str): return param else: return [param] self.layers = _to_list(self.layers) self.li = _to_list(self.li) self.qik = _to_list(self.qik) # 判断列表参数的元素个数是否一致 n = len(self.layers) for item in ('li', 'qik'): attr = getattr(self, item) if len(attr) != n: raise InputError(self, item, '元素个数与土层名称个数不一致') if self.L > sum(self.li): raise InputError(self, 'L', '桩长不能大于土层厚度之和') rt = 0 # 竖向承载力(kN) ls = 0 _αi_is_array = isinstance(self.αi, list) or isinstance(self.αi, tuple) if _αi_is_array: if len(self.αi) < n: raise InputError(self, 'αi', '元素个数与土层名称个数不一致') for i in range(len(self.li)): αi = self.αi[i] if _αi_is_array else self.αi if ls + self.li[i] < self.L: rt += αi * self.qik[i] * self.li[i] elif ls < self.L: rt += αi * self.qik[i] * (self.L - ls) break else: break ls += self.li[i] self.Rt = 0.3 * self.u * rt self.R = self.R0 - self.γc * self.L * self.Ap self.K = self.Rt / self.R return rt
def solve(self): sum = 0 xs = [] xs.append(sum) for span in self.spans: sum += span xs.append(sum) ks = [] I_is_list = isinstance(self.I, list) or isinstance(self.I, tuple) l_is_list = isinstance(self.I, list) or isinstance(self.I, tuple) kb_is_list = isinstance(self.kb, list) or isinstance(self.kb, tuple) if kb_is_list: for ki in self.kb: if ki == 0: raise InputError(self, 'kb', '支座刚度应大于0') for i in range(len(xs)): # 支座刚度 kb = self.kb[i] if kb_is_list else self.kb # 桥墩刚度 if self.option == 'A': nkp = len(self.kp) kp = self.kp[i] if i < nkp else self.kp[nkp - 1] if kp <= 0: raise InputError(self, 'kp', '应 > 0') elif self.option == 'B': I = self.I[i] if I_is_list else self.I l = self.l[i] if l_is_list else self.I kp = 3 * self.E * I / l**3 if i < len(self.kp): self.kp[i] = kp else: self.kp.append(kp) else: raise InputError(self, 'option', '不支持的选项') k = kb * kp / (kb + kp) ks.append(k) # 温度作用水平力分配 self.xsp, self.move_status, self.Fs = self.temperature_force_distribution( xs, ks, self.Ws, self.fixeds, self.Δt, self.α, self.μ) self.xs = xs self.ks = ks return
def solve(self): if self.t < self.ts: raise InputError(self, 't', '不满足t>=ts') self.fcm = 0.8 * self.fcuk + 8 if self.option == '0': self.εcs0, self.βRH = self.fεcs0(self.fcm, self.RH, self.βsc) else: self.εcs0 = 0.529e-3 if self.RH < 70 else 0.310e-3 if self.fcuk > 50: self.εcs0 = self.εcs0 * sqrt(32.4 / self.fck) self.εcs, self.βsΔt = self.fε(self.t, self.ts, self.h, self.εcs0)
def init_params(self): ''' 初始化基本计算参数 ''' self.a = self.a_s if self.Ap <= 0 else \ (self.fy*self.As*self.a_s+self.fpy*self.Ap*self.ap)/(self.fy*self.As+self.fpy*self.Ap) self.a_ = self.as_ if self.Ap_ <= 0 else \ (self.fy_*self.As_*self.a_s+(self.fpy_-self.σp0_)*self.Ap_*self.ap_)\ /(self.fy_*self.As_+(self.fpy_-self.σp0_)*self.Ap_) self.h0 = self.h - self.a if self.h0 <= 0: raise InputError(self, 'h', '截面高度不足,或受拉钢筋距边缘距离过大,导致截面有效高度为负') self.ξb = self.f_ξb() self.xb = self.ξb * self.h0
def solve(self): self.validate('non-negative', 'l0') self.validate('positive', 'C0', 'Ec', 'd') self.I = pi * self.d**4 / 64 self.I0 = self.I self.npiles = sum(self.Ki) # 总桩数 if self.npiles <= 0: raise InputError(self, 'Ki', '桩数应>0') self.n = len(self.xi) if hasattr(self.xi, '__len__') else 1 # 平行于水平力作用方向的一排桩的桩数 if self.ξ <= 0: self.ξ = 1 if self.bottom_fixed else 0.5 self.solveP06()
def solve(self): if self.α < 0 or self.α >= 90: raise InputError(self, 'α', '应0 ≤ α < 90') self.ξ, self.sep = earth_pressure.static_earth_pressure( self.φ * pi / 180, self.B, self.γ, self.H) φ = self.φ * pi / 180 α = self.α * pi / 180 self.μ, self.aep, self.C = self.active_earth_pressure( φ, α, self.β * pi / 180, self.B, self.γ, self.H) if self.G > 0: self.l0, self.h, self.aep, self.C = self.active_earth_pressure_live( φ, α, self.B, self.γ, self.H, self.G) self.q = self.μ * self.γ * self.h
def solve(self): self.validate('positive','As','Is','Es','Ac','Ic','Ec') self.n0 = self.Es/self.Ec # 混凝土收缩 if self.load_type == '1': # self.solve_deadload() self.ψL = 1.1 self.nL = self.n0*(1+self.ψL*self.φ) self.solve_section_properties() self.Ecgφ = self.fEcφ(self.Ec, self.ψL, self.φ) self.P0 = self.fP0g(self.Ecgφ,self.Ac,self.ε0,self.φ) elif self.load_type == '2': # self.solve_shrinkage() self.ψL = 0.55 self.nL = self.n0*(1+self.ψL*self.φ) self.solve_section_properties() self.Ecsφ = self.fEcφ(self.Ec, self.ψL, self.φ) εsh = self.εsh if εsh>0: εsh = -εsh self.P0 = self.fP0sh(self.Ecsφ,self.Ac,εsh*self.ξ) elif self.load_type == '3': # self.solve_temperature() self.ψL = 0 self.nL = self.n0 self.solve_section_properties() if self.temperature_type == '1': self.P0 = self.fP0t(self.Ac,self.Ec,self.αc,self.αs,self.Δt) elif self.temperature_type == '2': self.P0 = self.fP0t2(self.Ac,self.Ec,self.αc,self.αs,self.ts,self.tc) else: raise InputError(self, 'temperature_type', '梯形温差计算尚未实现') else: raise InputError(self, 'load_type', '不支持的荷载类型') self.M0 = self.P0*self.y0c self.Δσc = self.fΔσc(self.P0,self.M0,self.nL,self.A0L,self.I0L,self.Ac,self.y0Lc) self.Δσs = self.fΔσs(self.P0,self.M0,self.A0L,self.I0L,self.Ac,self.y0Ls) self.Pc = self.fPc(self.P0,self.M0,self.nL,self.A0L,self.I0L,self.Ac,self.S0c) self.Ps = self.fPs(self.P0,self.M0,self.A0L,self.I0L,self.As,self.S0s)
def solve(self): self.validate('positive', 'fy', 'E', 'k') self.λp, self.ε0, self.ρip = self.fρ(self.bp, self.t, self.fy, self.E, self.k) self.beip = self.ρip * self.bi if self.beam_type == 'simple': self.validate('positive', 'L') option = 'A' self.l = self.L elif self.beam_type == 'continuous': option = 'A' if (self.location == 'side_span' or self.location == 'middle_span') else 'B' if self.location == 'side_span': self.validate('positive', 'L1') self.l = 0.8 * self.L1 elif self.location == 'middle_span': self.validate('positive', 'L2') self.l = 0.6 * self.L2 elif self.location == 'middle_support': self.validate('positive', 'L1', 'L2') self.l = 0.2 * (self.L1 + self.L2) else: raise InputError(self, 'location', '未知的输入参数') elif self.beam_type == 'cantilever': option = 'A' if self.location == 'side_span': self.validate('positive', 'L1') self.l = 2 * self.L1 elif self.location == 'middle_span': self.validate('positive', 'L2') self.l = 0.6 * self.L2 elif self.location == 'middle_support': self.validate('positive', 'L1') self.l = 2 * self.L1 else: raise InputError(self, 'location', '未知的输入参数') self.beis = self.fbeis(self.bi, self.l, option) self.ρis = self.beis / self.bi self.bei = self.ρis * self.beip
def solve(self): self.validate('positive', 'N', 'b', 'd') N = self.N Mx = self.Mx My = self.My b = self.b d = self.d γR = self.γR fa = self.fa A = self.A = b * d Wx = self.Wx = b * d**2 / 6 Wy = self.Wy = d * b**2 / 6 self.p = N / A # (4.2.2-1) self.eqr = γR * fa ex = self.ex = My / N ey = self.ey = Mx / N pmin = self.pmin = N / A - Mx / Wx - My / Wy self.e0 = e0 = sqrt(ex**2 + ey**2) if e0 == 0: # 只承受轴心荷载 return self.ρ = e0 / (1 - pmin * A / N) # 偏心距验算 self.ξ = 1 if self.地基条件 == 'a': if self.作用情况 == 'a': self.ξ = 0.1 if self.墩台类型 == 'a' else 0.75 elif self.地基条件 == 'b': self.ξ = 1.2 elif self.地基条件 == 'c': self.ξ = 1.5 else: raise InputError(self, '地基条件') self.e0_max = self.ξ * self.ρ self.ecc_ok = self.e0 <= self.e0_max # 基底承载力验算 self.status = 0 if e0 > self.ρ: # 应力重分布 if ex != 0 and ey != 0: # 双向偏压 self.pmax = self.λ * N / A self.status = 2 elif ey == 0: # 单向偏压 self.pmax = 2 * N / 3 / (b / 2 - ex) / d self.status = 1 elif ex == 0: # 单向偏压 self.pmax = 2 * N / 3 / (d / 2 - ey) / b self.status = 1 else: # 不发生重分布 self.pmax = N / A + Mx / Wx + My / Wy
def solve(self): self.validate('non-negative', 'l0') self.validate('positive', 'C0', 'Ec', 'd') self.I = pi * self.d**4 / 64 self.I0 = self.I self.n = len(self.xi) if hasattr(self.xi, '__len__') else 1 # 平行于水平力作用方向的一排桩的桩数 if isinstance(self.Ki, (int, float)): if self.n > 0: self.Ki = [self.Ki for i in range(self.n)] elif isinstance(self.Ki, (tuple, list)): if len(self.Ki) != self.n: raise InputError(self, 'Ki', '数目与xi不对应') self.npiles = sum(self.Ki) # 总桩数 if self.npiles <= 0: raise InputError(self, 'Ki', '桩数应>0') if self.ξ <= 0: self.ξ = 1 if self.bottom_fixed else 0.5 self._solve()
def solve(self): self.validate('positive', 'fy') self.eql = self.hs / self.ts if self.type == '1': self.eqr = 12 * sqrt(345 / self.fy) elif self.type == '2': self.eqr = 30 * sqrt(345 / self.fy) self.eql2 = self.bs0 / self.ts self.eqr2 = 12 * sqrt(345 / self.fy) elif self.type == '3': self.eqr = 18 * sqrt(345 / self.fy) elif self.type == '4': self.eqr = 40 * sqrt(345 / self.fy) self.eql2 = self.bs / self.ts self.eqr2 = 30 * sqrt(345 / self.fy) else: raise InputError(self, 'type', '不支持的类型')
def bottom_force(cls, load, H): ''' 计算柱底荷载 load:荷载 H:柱高 ''' loadtype = load[0] h = load[1] if h<0: h = abs(h) if h > 1: raise InputError(cls, 'loads', '相对长度绝对值不能大于1') h = h*H f = wrapforces(load[2]) f.Mz += f.Fy*h f.My += f.Fz*h return (loadtype, f.forces)
def solve_As(self): '''计算普通钢筋面积,已知弯矩,按单筋截面计算,暂未考虑受压钢筋和预应力筋''' self.validate('positive', 'α1', 'fc', 'b') self.delta = self.h0**2 - 2 * self.γ0 * self.M * 1E6 / self.α1 / self.fc / self.b if self.delta > 0: self.x = self.h0 - sqrt(self.delta) self.ξb = self.f_ξb() self.xb = self.ξb * self.h0 if self.x < self.xb: self.As = self.α1 * self.fc * self.b * self.x / self.fy return self.As else: self.εcu = self.f_εcu() self.σs = self.Es * self.εcu * (self.β1 * self.h0 / self.x - 1) if self.σs < 0: raise InputError(self, 'h0', '截面受压区高度过大,钢筋出现压应力,弯矩无法平衡\n') else: self.As = self.α1 * self.fc * self.b * self.x / self.σs return self.As
def solve(self): self.validate('positive', 'Bu', 'tD') self.Ifu = self.tu * (self.Bu + 2 * self.b1)**3 / 12 self.Ifl = self.tl * (self.Bl + 2 * self.b2)**3 / 12 self.e, self.f, self.α1, self.α2, self.Idw, self.Kmin = self.fKmin( self.E, self.Ld, self.Ifu, self.Ifl, self.Bu, self.Bl, self.Fu, self.Fl, self.Fh, self.H, self.b1, self.b2) if self.option == '1': self.validate('positive', 'A') self.K = self.fK1(self.G, self.Ac, self.tD) self.τu, self.τh, self.τl = self.fτ1(self.Bu, self.Bl, self.tD, self.A, self.Td * 1e6) elif self.option == '2': self.validate('positive', 'A', 'Ab') self.K = self.fK2(self.E, self.Ac, self.Ab, self.Lb, self.shape) self.Nb = self.fNb(self.Lb, self.A, self.Td, self.shape) self.σ = self.Nb / self.Ab elif self.option == '3': self.validate('positive', 'b', 'h', 'Iu', 'Il', 'Ih') self.K = self.fK3(self.β, self.E, self.b, self.h, self.Iu, self.Il, self.Ih) else: raise InputError(self, 'option', '不支持的选项值')
def solve_Ra(self): self.positive_check('L', 'u', 'Ap', 'γ2') def _to_list(param): if hasattr(param, '__len__') and not isinstance(param, str): return param else: return [param] self.layers = _to_list(self.layers) self.li = _to_list(self.li) self.qik = _to_list(self.qik) self.frk = _to_list(self.frk) self.status = _to_list(self.status) # 判断列表参数的元素个数是否一致 n = len(self.layers) for item in ('li', 'qik', 'frk', 'status'): attr = getattr(self, item) if len(attr) != n: raise InputError(self, item, '元素个数与土层名称个数不一致') if self.L > sum(self.li): raise InputError(self, 'L', '桩长不能大于土层厚度之和') endlayer = self._get_end_layer_num() frk = self.frk[endlayer] if frk > 2000 and frk < 15000: self.ζs = 0.8 elif frk < 30000: self.ζs = 0.5 elif frk > 30000: self.ζs = 0.2 else: self.ζs = 1 typeγ = type(self.γ2) bl = typeγ is list or typeγ is tuple ls = 0 ra = 0 # 竖向承载力(kN) γl = 0 # 土层重度*土层厚度之和 Nn = 0 # 负摩阻力(kN) # 负摩阻力计算,条文说明5.3.2节 if self.option: if self.ln >= sum(self.li): raise InputError(self, 'ln', '不能超过土层厚度之和') if self.ln > self.L: raise InputError(self, 'ln', '中性点深度不能大于桩长') for i in range(len(self.li)): if ls < self.ln: if ls + self.li[i] < self.ln: if bl: γl += self.li[i] * self.γ2[i] γi_ = γl / (ls + self.li[i]) else: γi_ = self.γ2 - 10 else: if bl: γl += (self.ln - ls) * self.γ2[i] γi_ = γl / self.ln else: γi_ = self.γ2 - 10 zi = ls + self.li[i] / 2 # 第i层土中点深度 σvi_ = self.p + γi_ * zi qni = self.β * σvi_ Nn += self.u * qni * self.li[i] else: break ls += self.li[i] # 承载力计算 table_c1 = self.table_c1 table_c2 = self.table_c2 # 表5.3.4附注第2条 if self.method == 'drill': table_c1 = [0.8 * c1 for c1 in table_c1] table_c2 = [0.8 * c1 for c1 in table_c2] # 表5.3.4附注第3条 if '中风化' in self.layers[endlayer]: table_c1 = [0.75 * c1 for c1 in table_c1] table_c2 = [0.75 * c1 for c1 in table_c2] ls = 0 for i in range(len(self.li)): if self.option and ls + self.li[i] <= self.ln: ls += self.li[i] continue index = self.status[i] if index > 2 or index < -1: raise InputError(self, 'status', '输入值超出合理范围') c2 = table_c2[index] if ls + self.li[i] < self.L: if bl: γl += self.li[i] * self.γ2[i] if self.status[i] == -1: ra += 0.5 * self.ζs * self.u * self.qik[i] * self.li[i] else: # ra += self.u*c2*self.frk[i]*self.li[i] # TODO:需考虑折减,暂时简单处理 ra += self.u * c2 * self.frk[i] * self.li[i] elif ls < self.L: if bl: γl += (self.ln - ls) * self.γ2[i] self.γ2 = γl / self.L if bl else self.γ2 c1 = table_c1[self.status[i]] # 表5.3.4附注第1条 if (self.L - ls) <= 0.5: c1 = 0.75 * c1 c2 = 0 ra += self.u * c2 * self.frk[i] * (self.L - ls) ra += c1 * self.Ap * self.frk[i] self.c1 = c1 break else: break ls += self.li[i] self.Ra = ra - Nn self.Nn = Nn self.R = self.R0 + (self.γc - self.γ2) * self.L * self.Ap self.K = self.Ra / self.R return self.Ra
def solveP06(self): d = self.d h = self.h hc = self.hc l0 = self.l0 kf = self.kf Ec = self.Ec * 1e3 I = self.I I0 = self.I0 m = self.m C0 = self.C0 bottom_fixed = self.bottom_fixed ξ = self.ξ xi = self.xi ψ = self.ψ Ki = self.Ki P = self.P H = self.H M = self.M A = pi / 4 * self.d**2 # 入土部分桩的平均截面积 S = 0 for i in range(1, len(xi)): Si = abs(xi[i] - xi[i - 1]) if S <= 0 or S < Si: S = Si L1 = S - d if L1 <= 0: raise InputError(self, 'd', '桩径不能大于桩距') # 规范中h1在P.0.1、P.0.2、P.0.3中的意义各不相同,全局h1取P.0.3中的意义,其余加后缀_P0N以示区别 h1_P01 = min(3 * (d + 1), h) n = self.n b2 = 1.0 if n <= 1 else 0.6 if n <= 2 else 0.5 if n <= 3 else 0.45 k = 1 if L1 >= 0.6 * h1_P01 else b2 + (1 - b2) / 0.6 * L1 / h1_P01 b1 = self.f_b1(k, kf, d) E = 0.8 * Ec α = self.f_α(m, b1, E, I) kh = C0 / (α * E) * I0 / I # 系数查表P.0.8 αh = α * h # round(α*h, 1) if αh > 4: αh = 4 δHH0, δMH0, δHM0, δMM0 = pile_effects.fδ0(α, αh, E, I, kh, bottom_fixed) δHH = l0**3 / (3 * E * I) + δMM0 * l0**2 + 2 * δMH0 * l0 + δHH0 δMH = l0**2 / (2 * E * I) + δMM0 * l0 + δMH0 δHM = l0**2 / (2 * E * I) + δMM0 * l0 + δHM0 δMM = l0 / (E * I) + δMM0 A0 = min(pi * (d / 2 + h * tan(ψ / 4))**2, pi / 4 * S**2) ρPP = 1 / ((l0 + ξ * h) / E / A + 1 / C0 / A0) ρHH = δMM / (δHH * δMM - δMH**2) ρMH = ρHM = δMH / (δHH * δMM - δMH**2) ρMM = δHH / (δHH * δMM - δMH**2) n = self.npiles if l0 > 0: γcc = n * ρPP γaa = n * ρHH γaβ = γβa = -n * ρHM γββ = n * ρMM + ρPP * sum([K * x**2 for (K, x) in zip(Ki, xi)]) else: # 当地面或局部冲刷线在承台底以上时,承台周围土视作弹性介质,此时,形常数按下列公式计算: cc = m * hc Fc = cc * hc / 2 Sc = cc * hc**2 / 6 Ic = cc * hc**3 / 12 γcc = n * ρPP γaa = n * ρHH + b1 * Fc γaβ = γβa = -n * ρHM + b1 * Sc γcβ = γβc = ρPP * sum([K * x for (K, x) in zip(Ki, xi)]) γββ = n * ρMM + ρPP * sum([K * x**2 for (K, x) in zip(Ki, xi)]) + b1 * Ic # 承台变位 c = P / γcc a = (γββ * H - γaβ * M) / (γaa * γββ - γaβ**2) β = (γaa * M - γaβ * H) / (γaa * γββ - γaβ**2) # 桩顶作用效应 Ni = [(c + β * x) * ρPP for x in xi] Qi = a * ρHH - β * ρHM Mi = β * ρMM - a * ρMH self.Ni = Ni self.Qi = Qi self.Mi = Mi # 地面或局部冲刷线处桩顶截面上的作用“力” self.H0 = Qi self.M0 = Mi + Qi * l0 self.α = α self.γcc = γcc self.γaa = γaa self.γaβ = γaβ self.γβa = γβa self.γββ = γββ if l0 <= 0: self.γcβ = γcβ self.γβc = γβc self.c = c self.a = a self.β = β self.L1 = L1 self.S = S self.b2 = b2
def solve(self): self.positive_check('As') xi = [x*1000 for x in self.xi] if hasattr(self.xi, '__len__') else [self.xi*1000] yi = [y*1000 for y in self.yi] if hasattr(self.yi, '__len__') else [self.yi*1000] pvf = cap.pile_vertical_force(**self.inputs) pvf.solve() Nd = pvf.fNid n = pvf.npile nx = pvf.nx ny = pvf.ny self.Nids = [] for ix in range(nx): row = [] for iy in range(ny): _Nd = Nd(ix, iy) row.append(_Nd) print(_Nd) self.Nids.append(row) self.fc_beams = [] self.Rstx = [] # 设计方法:单梁0, 拉压杆1;Cu self.Rsty = [] a = 0.15*self.h0 # 压杆中线与承台顶面的交点至墩台边缘的距离 for o in ['x', 'y']: # 分别计算平行于x轴方向和平行于y轴方向的弯曲 li = xi if o == 'x' else yi As = self.As if isinstance(As, (tuple, list)): if len(As) > 1: As = self.As[0] if o == 'x' else self.As[1] elif len(As) > 0: As = self.As[0] else: raise InputError(self, 'As', '不能为空') # 对于撑杆系杆模型,只算最外排桩;对于梁模型,只算最大的截面 for i in [0, len(li)-1]: # 计算第i排桩 x = abs(li[i]) - (self.bx if o == 'x' else self.by)/2 #第i排桩距柱边距离 bs = 2*self.a+3*self.D*(n-1) #承台截面计算宽度 w = self.wy if o == 'x' else self.wx if bs > w: bs = w # 计算第i排桩竖向力设计值 group = yi if o == 'x' else xi ngp = len(group) Nid = max([(Nd(i,j) if o == 'x' else Nd(j,i)) for j in range(ngp)])*ngp if x <= self.h: # 按拉压杆模型计算承载力(8.5.4条) # group = yi if o == 'x' else xi # ngp = len(group) # Nid = max([Nd(i,j) for j in range(ngp)])*ngp θi = atan(self.h0/(a+x)) Cid = Nid/sin(θi) Tid = Nid/tan(θi) # bs = 2*self.a+3*self.D*(n-1) # w = self.wy if o == 'x' else self.wx # if bs > w: # bs = w t, ε1, fced, Ciu = self.capacity( self.s, self.d, self.b, θi, Tid*1e3, As, self.Es, self.fcd, bs, self.βc) Tiu = self.fsd*As if o == 'x': self.Rstx.append(('{}={}'.format(o, li[i]), '拉压杆模型', t, bs, ε1, fced, Cid, Ciu/1e3, Tid, Tiu/1e3)) else: self.Rsty.append(('{}={}'.format(o, li[i]), '拉压杆模型', t, bs, ε1, fced, Cid, Ciu/1e3, Tid, Tiu/1e3)) else: # 按梁构件计算抗弯承载力(8.5.2条) j = i Mcd = 0 while True: Mcd += Nid*x if i == 0: j += 1 if li[j] >= 0: break else: j -= 1 if li[j] <= 0: break x = abs(li[j]) - (self.bx if o == 'x' else self.by)/2 Nid = max([Nd(i,j) if o == 'x' else Nd(j,i) for j in range(ngp)])*ngp fc = bc.fc_rect( option="review", γ0=1.1, fcd=self.fcd, fcuk=35, Es=200000, b=bs, h0=self.h0, ftd=self.ftd, fsd=self.fsd, As=As, fsd_=self.fsd, As_=0, ps="无", Md = Mcd*1e-3) # f = fc_rect(concrete="C50", rebar="HRB400") fc.solve() self.fc_beams.append(fc) # 8.5.5节 冲切承载力验算 # 1 柱或墩台向下冲切 Fld = self.Fd for ix in range(1, nx-1): for iy in range(1, ny-1): Fld -= Nd(ix, iy) ax0 = abs(xi[0]) - self.D/2 - self.bx/2 ax1 = abs(xi[-1]) - self.D/2 - self.bx/2 ax = (ax0+ax1)/2 ay0 = abs(yi[0]) - self.D/2 - self.by/2 ay1 = abs(yi[-1]) - self.D/2 - self.by/2 ay = (ay0+ay1)/2 λx = max(ax/self.h0, 0.2) λy = max(ay/self.h0, 0.2) αpx = 1.2/(λx+0.2) # (8.5.5-2) αpy = 1.2/(λy+0.2) # (8.5.5-3) f_Flu = lambda ftd,h0,αpx,by,ay,αpy,bx,ax:0.6*ftd*h0*(2*αpx*(by+ay)+2*αpy*(bx+ax)) # (8.5.5-1) Flu = f_Flu(self.ftd,self.h0,αpx,self.by,ay,αpy,self.bx,ax)/1e3 # kN # 保存计算结果 self.punching_down = {'Fld':Fld, 'Flu':Flu} # 替代上面的代码 self.punching_capacity_down = punching_capacity( option="down", γ0=self.γ0, ftd=self.ftd, ax=ax, ay=ay, bx=self.bx, by=self.by, h0=self.h0, Fld=Fld) self.punching_capacity_down.solve() # 2 角桩向上冲切 f_Flu = lambda ftd,h0,αpx,by,ay,αpy,bx,ax:0.6*ftd*h0*(αpx_*(by+ay/2)+αpy_*(bx+ax/2)) # (8.5.5-4) self.punching_up = [] self.punching_capacity_ups = [] for ix in (0, nx-1): for iy in (0, ny-1): Fld = Nd(ix, iy) ax0 = abs(xi[0]) - self.D/2 - self.bx/2 ax1 = abs(xi[-1]) - self.D/2 - self.bx/2 ax = (ax0+ax1)/2 bx = self.wx/2 - abs(xi[ix]) + self.D/2 ay0 = abs(yi[0]) - self.D/2 - self.by/2 ay1 = abs(yi[-1]) - self.D/2 - self.by/2 ay = (ay0+ay1)/2 by = self.wy/2 - abs(yi[iy]) + self.D/2 λx = max(ax/self.h0, 0.2) λy = max(ay/self.h0, 0.2) αpx_ = 0.8/(λx+0.2) # (8.5.5-5) αpy_ = 0.8/(λy+0.2) # (8.5.5-6) Flu = f_Flu(self.ftd,self.h0,αpx_,by,ay,αpy_,bx,ax)/1e3 # kN # 保存计算结果 self.punching_up.append({'type':'角桩', 'ix':ix, 'iy':iy, 'Fld':Fld, 'Flu':Flu}) # 替代上面的代码 punching_capacity_up = punching_capacity( option="up_corner", γ0=self.γ0, ftd=self.ftd, ax=ax, ay=ay, bx=self.bx, by=self.by, h0=self.h0, Fld=Fld) punching_capacity_up.solve() self.punching_capacity_ups.append(punching_capacity_up) # 3 边桩向上冲切 # f_Flu = lambda ftd,h0,αpx,by,ay,αpy,bx,ax:0.6*ftd*h0*(αpx_*(bp+h0)+0.667*(2*bx+ax)) # (8.5.5-7) for o in ('x', 'y'): ni = nx if o == 'x' else ny nj = ny if o == 'x' else nx for i in (0, ni-1): for j in range(1, nj-1): ix = i if o == 'x' else j iy = j if o == 'x' else i Fld = Nd(ix, iy) ax0 = abs(xi[0]) - self.D/2 - self.bx/2 ax1 = abs(xi[-1]) - self.D/2 - self.bx/2 ax = (ax0+ax1)/2 bx = self.wx/2 - abs(xi[ix]) + self.D/2 ay0 = abs(yi[0]) - self.D/2 - self.by/2 ay1 = abs(yi[-1]) - self.D/2 - self.by/2 ay = (ay0+ay1)/2 by = self.wy/2 - abs(yi[iy]) + self.D/2 λx = max(ax/self.h0, 0.2) λy = max(ay/self.h0, 0.2) αpx_ = 0.8/(λx+0.2) # (8.5.5-2) αpy_ = 0.8/(λy+0.2) # (8.5.5-3) # Flu = f_Flu(self.ftd,self.h0,αpx_,by,ay,αpy_,bx,ax)/1e3 # kN # 保存计算结果 self.punching_up.append({'type':'边桩', 'ix':ix, 'iy':iy, 'Fld':Fld, 'Flu':Flu}) # 替代上面的代码 punching_capacity_up = punching_capacity( option="up_side", γ0=self.γ0, ftd=self.ftd, ax=ax, ay=ay, bx=self.bx, by=self.by, h0=self.h0, bp=self.b, Fld=Fld) punching_capacity_up.solve() self.punching_capacity_ups.append(punching_capacity_up)
def solve_Ra(self): self.positive_check('L', 'u', 'Ap', 'm0', 'λ', 'k2', 'γ2') def _to_list(param): if hasattr(param, '__len__') and not isinstance(param, str): return param else: return [param] self.layers = _to_list(self.layers) self.li = _to_list(self.li) self.fa0 = _to_list(self.fa0) self.qik = _to_list(self.qik) # 判断列表参数的元素个数是否一致 n = len(self.layers) for item in ('li', 'qik', 'fa0'): attr = getattr(self, item) if len(attr) != n: raise InputError(self, item, '元素个数与土层名称个数不一致') if self.L > sum(self.li): raise InputError(self, 'L', '桩长不能大于土层厚度之和') typeγ = type(self.γ2) bl = typeγ is list or typeγ is tuple ra = 0 # 竖向承载力(kN) γl = 0 # 土层重度*土层厚度之和 Nn = 0 # 负摩阻力(kN) # 负摩阻力计算,条文说明5.3.2节 ls = 0 if self.option: if self.ln >= sum(self.li): raise InputError(self, 'ln', '不能超过土层厚度之和') if self.ln > self.L: raise InputError(self, 'ln', '中性点深度不能大于桩长') for i in range(len(self.li)): if ls < self.ln: if ls + self.li[i] < self.ln: if bl: γl += self.li[i] * self.γ2[i] γi_ = γl / (ls + self.li[i]) else: γi_ = self.γ2 - 10 else: if bl: γl += (self.ln - ls) * self.γ2[i] γi_ = γl / self.ln else: γi_ = self.γ2 - 10 if γi_ < 0: raise InputError(self, 'γ2', '应>10') zi = ls + self.li[i] / 2 # 第i层土中点深度 σvi_ = self.p + γi_ * zi qni = self.β * σvi_ Nn += self.u * qni * self.li[i] else: break ls += self.li[i] # 承载力计算 # ls = self.L # lstop = self.ln if self.option else 0 # for i in range(len(self.li)): # if ls > self.li[i]: # ra += 0.5*self.u*self.qik[i]*self.li[i] # if bl: # γ_total += self.li[i]*self.γ2[i] # elif ls > 0: # if bl: # γ_total += self.li[i]*ls # self.γ2 = γ_total / self.L if bl else self.γ2 # self.positive_check('γ2') # self.h = self.L if self.L < 40 else 40 # self.qr = self.m0*self.λ*(self.fa0[i]+self.k2*self.γ2*(self.h-3)) # ra += 0.5*self.u*self.qik[i]*ls + self.Ap*self.qr # break # else: # break # ls -= self.li[i] ls = 0 for i in range(len(self.li)): if self.option and ls + self.li[i] <= self.ln: ls += self.li[i] continue if ls + self.li[i] < self.L: if bl: γl += self.li[i] * self.γ2[i] ra += 0.5 * self.u * self.qik[i] * self.li[i] elif ls < self.L: if bl: γl += (self.ln - ls) * self.γ2[i] self.γ2 = γl / self.L if bl else self.γ2 self.positive_check('γ2') if self.h > 40: self.h = 40 self.qr = self.m0 * self.λ * (self.fa0[i] + self.k2 * self.γ2 * (self.h - 3)) ra += 0.5 * self.u * self.qik[i] * (self.L - ls) + self.Ap * self.qr break else: break ls += self.li[i] self.Ra = ra - Nn self.Nn = Nn self.R = self.R0 + (self.γc - self.γ2) * self.L * self.Ap self.K = self.Ra / self.R return ra
def solve_wmax(self): # αcr #uncomplete if self.force_type == '0' or self.force_type == '1': if self.Ap>0: self.αcr = 1.5 else: self.αcr = 1.9 elif self.force_type == '2': if self.Ap>0: self.αcr = 1.5 #? else: self.αcr = 2.4 elif self.force_type == '3': if self.Ap>0: self.αcr = 2.2 else: self.αcr = 2.7 # todo: 添加预应力混凝土构件特征系数 # Ate if self.force_type=='3': self.Ate=self.b*self.h else: self.Ate=0.5*self.b*self.h if self.bf > self.b and self.hf > 0: self.Ate += (self.bf-self.b)*self.hf # ρte self.ρte = (self.As + self.Ap)/ self.Ate if self.ρte<0.01: self.ρte = 0.01 # 钢筋等效应力 if self.force_type == '0': self.σs = 1E6*self.Mq/0.87/self.h0/self.As elif self.force_type == '1': self.validate('positive', 'Mq') hf_ = self.hf_ if self.hf_>0.2*self.h0: hf_ = 0.2*self.h0 gamma_f_comp = (self.bf_-self.b)*hf_/self.b/self.h0 self.e0 = self.Mq/self.Nq*1e3 eta_s=1+1/4000/(self.e0/self.h0)*math.pow(self.l0/self.h,2) e=eta_s*self.e0+self.ys z=(0.87-0.12*(1-gamma_f_comp)*math.pow(self.h0/e,2))*self.h0 self.σs = self.Nq*1e3*(e-z)/self.As/z elif self.force_type == '2': self.e0 = self.Mq/self.Nq*1e3 self.e_ = self.e0+self.ys_ self.σs = self.Nq*1E3*self.e_/self.As/(self.h0-self.as_) elif self.force_type == '3': self.σs = self.Nq*1E3/self.As else: raise InputError(self, 'σs', '无效的输入值') # ψ - ψi self.ψi = 1.1 - 0.65 * self.ftk / self.ρte / self.σs if self.bear_repeated_load: self.ψi = 1.0 elif self.ψi<0.2: self.ψi = 0.2 elif self.ψi>1.0: self.ψi = 1.0 # todo: deq self.wmax = self.αcr*self.ψi*self.σs/self.Es*(1.9*self.cs+0.08*self.deq/self.ρte) return self.wmax
def solve(self): self.validate('positive', 'b', 'h') self.h0 = self.h - self.a_s if self.h0 < 0: raise InputError(self, 'h', '截面高度过小导致有效高度为负') self.ea = max(20, self.h / 30) # 6.2.5 if self.option_m2: self.validate('positive', 'N') self.A = self.b * self.h self.ζc = 0.5 * self.fc * self.A / (self.N * 1e3) if self.ζc > 1: self.ζc = 1 self.ηns = eccentric_compression.f_ηns(self.M2 * 1e6, self.N * 1e3, self.ea, self.h, self.h0, self.lc, self.ζc) self.Cm = 0.7 + 0.3 * self.M1 / self.M2 _Cmηns = self.Cm * self.ηns self.M = _Cmηns * self.M2 if _Cmηns > 1 else self.M2 self.e0 = self.M / self.N * 1e3 self.ei = self.e0 + self.ea # (6.2.17-4) # strictly, a = (σs*As*a_s+σp*Ap*ap)/(σs*As+σp*Ap) self.a = self.a_s if self.Ap == 0 else (self.a_s + self.ap) / 2 self.e = self.ei + self.h / 2 - self.a # (6.2.17-3) self.es = self.ei + self.h / 2 - self.a_s self.ep = self.ei + self.h / 2 - self.ap self.es_ = self.ei - self.h / 2 + self.as_ self.ep_ = self.ei - self.h / 2 + self.ap_ self.β1 = fβ1(self.fcuk) self.εcu = self.f_εcu(self.fcuk) self.ξb = self.fξb(self.β1, self.fy, self.Es, self.εcu, self.fpy, self.σp0) self.xb = self.ξb * self.h0 self.Asmin = self.ρmin * self.b * self.h # self._b = self.b # if self.bf>0 and self.hf>0: # self.b = self.bf # super(eccentric_compression_Ishape, eccentric_compression_Ishape).solve(self) # ec = eccentric_compression() # ec.inputs = self.inputs # ec.solve() # self.x = ec.x # if self.x <= self.hf_: # self.b = self._b # self._b = self.bf # return if self.option == 'review': if self.symmetrical: self.As_ = self.As self.large_eccentric, self.x, Nu = self.solve_Nu( self.b, self.h, self.bf, self.hf, self.bf_, self.hf_, self.h0, self.e, self.α1, self.β1, self.fc, self.Es, self.fy, self.As, self.es, self.fy_, self.As_, self.as_, self.es_, self.Ep, self.fpy, self.σp0, self.Ap, self.ep, self.fpy_, self.σp0_, self.Ap_, self.ap_, self.ep_, self.εcu, self.ξb) self.Nu = Nu / 1000 #kN # 6.2.17 节 第2条要求 self.σp_ = self.fpy_ - self.σp0 self.a_ = self.as_ if (self.Ap_ == 0 or self.σp_>0) else \ (self.fy_*self.As_*self.as_+(self.fpy_-self.σp0_)*self.Ap_*self.ap_)/(self.fy_*self.As_+self.fpy_*self.Ap_) if self.x < 2 * self.a_: self.es_ = self.ei - (self.h / 2 - self.as_ ) # 偏心压力作用点至受压钢筋合力点的距离 self.Md = self.N * self.es_ * 1e-3 self.Mu = self.fMu2(self.h, self.fy, self.As, self.a_s, self.as_, self.fpy, self.Ap, self.ap, self.fpy_, self.σp0_, self.Ap_, self.ap_) * 1e-6 # kNm # Ac = self.b*x + (self.bf_-self.b)*self.hf_ # if self.x > (self.h-self.hf): # Ac += (self.bf-self.b)*(self.x+self.hf-self.h) # TODO:需乘以翼缘折减系数 else: # self.large_eccentric, self.x, self.As, self._As, self.As_, self._As_ = self.solve_As( # self.symmetrical, self.Asp_known, self.Asmin, # self.b, self.h, self.h0, self.N*1e3, self.ei, self.e, self.α1, self.β1, self.fc, # self.Es, self.fy, self.As, self.es, self.fy_, self.As_, self.as_, self.es_, # self.Ep, self.fpy, self.σp0, self.Ap, self.ep, # self.fpy_, self.σp0_, self.Ap_, self.ap_, self.ep_, self.εcu, self.ξb # ) raise Exception('抱歉,I形截面偏心受压截面设计功能尚在开发中,敬请期待')
def solve(self): self.validate('positive', 'N') self.h0 = self.h - self.a_s if self.h0 <= 0: raise InputError(self, 'h', '截面高度有误') self.ea = max(20, self.h / 30) # 6.2.5 if self.option_m2: self.A = self.b * self.h self.ζc = 0.5 * self.fc * self.A / (self.N * 1e3) if self.ζc > 1: self.ζc = 1 self.ηns = eccentric_compression.f_ηns(self.M2 * 1e6, self.N * 1e3, self.ea, self.h, self.h0, self.lc, self.ζc) self.Cm = 0.7 + 0.3 * self.M1 / self.M2 _Cmηns = self.Cm * self.ηns self.M = _Cmηns * self.M2 if _Cmηns > 1 else self.M2 self.e0 = self.M / self.N * 1e3 self.ei = self.e0 + self.ea # (6.2.17-4) # strictly, a = (σs*As*a_s+σp*Ap*ap)/(σs*As+σp*Ap) self.a = self.a_s if self.Ap == 0 else (self.a_s + self.ap) / 2 self.e = self.ei + self.h / 2 - self.a # (6.2.17-3) self.es = self.ei + self.h / 2 - self.a_s self.ep = self.ei + self.h / 2 - self.ap self.es_ = self.ei - self.h / 2 + self.as_ self.ep_ = self.ei - self.h / 2 + self.ap_ self.β1 = fβ1(self.fcuk) self.εcu = self.f_εcu(self.fcuk) self.ξb = self.fξb(self.β1, self.fy, self.Es, self.εcu, self.fpy, self.σp0) self.xb = self.ξb * self.h0 self.Asmin = self.ρmin * self.b * self.h if self.option == 'review': if self.As == 0 and self.As_ == 0 and self.Ap == 0 and self.Ap_ == 0: raise InputError(self, 'As', '应>0') if self.symmetrical: self.As_ = self.As self.large_eccentric, self.x, Nu = self.solve_Nu( self.b, self.h0, self.e, self.α1, self.β1, self.fc, self.Es, self.fy, self.As, self.es, self.fy_, self.As_, self.as_, self.es_, self.Ep, self.fpy, self.σp0, self.Ap, self.ep, self.fpy_, self.σp0_, self.Ap_, self.ap_, self.ep_, self.εcu, self.ξb) self.σs = self.f_σsi(self.β1, self.Es, self.εcu, self.h0, self.x) self.σp = self.f_σpi(self.β1, self.Ep, self.εcu, self.h0, self.x, self.σp0) self.Nu = Nu / 1000 #kN self.Mu = self.fMu(self.α1, self.fc, self.b, self.x, self.h0, self.fy_, self.As_, self.as_, self.σp0_, self.fpy_, self.Ap_, self.ap_) * 1e-6 # kNm # 6.2.17 节 第2条要求 self.σp_ = self.fpy_ - self.σp0 self.a_ = self.as_ if (self.Ap_ == 0 or self.σp_>0) else \ (self.fy_*self.As_*self.as_+(self.fpy_-self.σp0_)*self.Ap_*self.ap_)/(self.fy_*self.As_+self.fpy_*self.Ap_) if self.x < 2 * self.a_: self.es_ = self.ei - (self.h / 2 - self.as_ ) # 偏心压力作用点至受压钢筋合力点的距离 self.Md = self.N * self.es_ * 1e-3 self.Mu = self.fMu2(self.h, self.fy, self.As, self.a_s, self.as_, self.fpy, self.Ap, self.ap, self.fpy_, self.σp0_, self.Ap_, self.ap_) * 1e-6 # kNm else: self.large_eccentric, self.x, self.As, self._As, self.As_, self._As_ = self.solve_As( self.symmetrical, self.Asp_known, self.Asmin, self.b, self.h, self.h0, self.N * 1e3, self.ei, self.e, self.α1, self.β1, self.fc, self.Es, self.fy, self.As, self.es, self.fy_, self.As_, self.as_, self.es_, self.Ep, self.fpy, self.σp0, self.Ap, self.ep, self.fpy_, self.σp0_, self.Ap_, self.ap_, self.ep_, self.εcu, self.ξb)
def solve_GB_JTG(self): paras = self.inputs # 荷载基本组合或偶然组合 lc = calla.JTG.loads.load_combination forces_fu = self.forces_fu forces_ac = self.forces_ac forces_uls = wrapforces([max(abs(f1),abs(f2)) for f1,f2 in zip(forces_fu, forces_ac)]) if self.section == 'rectangle': self.A = self.b*self.h #mm2 bc = calla.JTG.bearing_capacity.eccentric_compression(**paras) if self.code == 'JTG' else \ calla.GB.compressive_capacity.eccentric_compression(**paras) elif self.section == 'Tshape': self.A = self.b*(self.h - self.hf)+self.bf*self.hf bc = calla.JTG.bearing_capacity.eccentric_compression_Ishape(**paras) if self.code == 'JTG' else \ calla.GB.compressive_capacity.eccentric_compression_Ishape(**paras) elif self.section == 'round': self.A = pi/4*self.d**2 bc = calla.JTG.bearing_capacity.bc_round(**paras) if self.code == 'JTG' else \ calla.GB.flexural_capacity.fc_round(**paras) bc.r = self.d/2 bc.rs = self.d/2 - self.a_s else: raise NameError('section type {} is not defined'.format(self.section)) # 确定两个方向的钢筋面积 def _seperate(param:str): a = getattr(self, param) if a == None: return None if isinstance(a, float) or isinstance(a, int): ax = ay = a elif isinstance(a, tuple) or isinstance(a, list): n = len(a) if n >0 and n < 1: ax = ay = a elif n > 1: ax = a[0] ay = a[1] else: raise InputError(self,param,'无法识别的输入') else: raise InputError(self,param,'无法识别的输入') return (ax, ay) if isinstance(self.As, float) or isinstance(self.As, int): Asx = Asy = self.As elif isinstance(self.As, tuple) or isinstance(self.As, list): n = len(self.As) if n >0 and n < 1: Asx = Asy = self.As elif n > 1: Asx = self.As[0] Asy = self.As[1] else: raise InputError(self,'As','无法识别的输入') else: raise InputError(self,'As','无法识别的输入') Asx_, Asy_ = _seperate('As_') if isinstance(self.Ap, float) or isinstance(self.Ap, int): Apx = Apy = self.Ap elif isinstance(self.Ap, tuple) or isinstance(self.Ap, list): n = len(self.Ap) if n >0 and n < 1: Apx = Apy = self.Ap elif n > 1: Apx = self.Ap[0] Apy = self.Ap[1] else: raise InputError(self,'Ap','无法识别的输入') else: raise InputError(self,'Ap','无法识别的输入') # 轴心受压承载力 ac = calla.JTG.bearing_capacity.axial_compression(**paras) if self.code == 'JTG' else \ calla.GB.compressive_capacity.axial_compression(**paras) ac.Nd = forces_uls.Fx ac.A = self.A ac.As_ = Asx+Asy ac.solve() # 偏心受压承载力 bc.fcuk = calla.JTG.concrete.fcuk(self.concrete) # bc.fcd = calla.JTG.concrete.fcd(self.concrete) # bc.fsd=bc.fsd_=calla.JTG.rebar.fsd(self.rebar) bc.option = 'review' Nd = forces_uls.Fx #choseX = forces_uls[0] > forces_uls[1] bcs = [] # z方向偏心弯曲验算,对于圆截面则是合力方向计算 if self.section == 'round': Md = sqrt(forces_uls.Mz**2+forces_uls.My**2) else: Md = forces_uls.My if self.code == 'GB': bc.N = abs(Nd) bc.M = abs(Md) else: bc.Nd = abs(Nd) bc.Md = abs(Md) bc.b = self.h bc.h = self.b bc.h0 = self.b - self.as_ bc.l0 = self.k*self.l bc.As = Asx bc.As_ = Asx_ bc.Ap = Apx bc.solve() bcs.append(bc) # y方向偏心弯曲验算 if self.section != 'round': bcy = copy.copy(bc) Md = abs(forces_uls.Mz) if self.code == 'GB': bc.M = Md else: bc.Md = Md bcy.b = self.b bcy.h = self.h bcy.h0 = self.h - self.as_ bcy.As = Asy bcy.As_ = Asy_ bcy.Ap = Apy bcy.solve() bcs.append(bcy) #双向偏心受压承载力 if self.section != 'round' and self.code == 'JTG': be = calla.JTG.bearing_capacity.biaxial_eccentric(**paras) # TODO: support GB be.Nd = forces_uls.Fx be.Nu0 = ac.Nud be.Nux = bcs[0].Nu be.Nuy = bcs[1].Nu be.solve() # 裂缝宽度 cw = calla.JTG.crack_width.crack_width(**paras) if self.code == 'JTG' else \ calla.GB.crack_width.crack_width(**paras) if self.section == 'round': cw.case = 'round' cw.r = self.d/2 cw.rs = self.d/2 - self.a_s else: cw.case = 'rect' cw.b = self.h cw.h = self.b cw.h0 = cw.h-self.a_s cw.ys = cw.h/2-self.a_s cw.C3 = 0.9 cw.l0 = self.k*self.l cw.d = self.deq cw.C1 = 1.4 if self.rebar.startswith('HPB') else 1.0 # 内力计算 # 长期作用(准永久组合) forces_l=wrapforces(self.forces_qp) cw.Nl = abs(forces_l.Fx) # 短期作用(频遇组合) forces_s = wrapforces(self.forces_fr) cw.Ns = abs(forces_s.Fx) # z方向验算 cw.As = Asx if self.section == 'round': cw.Ml = sqrt(forces_l.Mz**2+forces_l.My**2) cw.Ms = sqrt(forces_s.Mz**2+forces_s.My**2) else: cw.Ml = abs(forces_l.My) cw.Ms = abs(forces_s.My) # y方向验算 cws = [] cws.append(cw) if self.section != 'round': cws.append(copy.copy(cw)) cws[1].b = self.b cws[1].h = self.h cws[1].h0 = cws[1].h-cws[1].a_s cws[1].As = Asy cws[1].ys = cws[1].h/2-cws[1].a_s cws[1].Ml = abs(forces_l.Mz) cws[1].Ms = abs(forces_s.Mz) for f in cws: if f.Ns == 0: f.force_type = 'BD' else: if f.Ms == 0: f.force_type = 'AT' if forces_l.Fx > 0 else 'AC' else: f.force_type = 'EC' if forces_l.Fx < 0 else 'ET' f.Ns = abs(f.Ns) if f.force_type != 'AC': f.solve() # 保存计算器 self.ac = ac self.bcs = bcs if self.section != 'round': self.be = be self.cws = cws