def _read_tstepnl_nx(self, data: bytes, n: int) -> Tuple[int, List[TSTEPNL]]: """ TSTEPNL(3103,31,337) - record 29 NX 2019.2 23 KDAMP I Flags to include differential stiffness to form structural damping 24 KUPDATE I Method for dynamic matrix update 25 KUSTEP I Number of iterations before the stiffness update 26 TINTOPT I Time integration method 27 GAMMA RS Amplitude decay factor for 2nd order transient integration """ ntotal = 108 * self.factor # 27*4 s = Struct(mapfmt(self._endian + b'iif5i3f3if3i4f 4if', self.size)) nentries = (len(data) - n) // ntotal assert (len(data) - n) % ntotal == 0 assert nentries > 0, nentries tstepnls = [] for unused_i in range(nentries): edata = data[n:n + ntotal] out = s.unpack(edata) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out method = out[4] if method in [4]: self.log.warning('method=4; skipping TSTEPNL=%r' % str(out)) else: tstepnl = TSTEPNL.add_op2_data(out) tstepnls.append(tstepnl) n += ntotal return n, tstepnls
def readTSTEPNL(self, data): """ TSTEPNL(3103,31,337) - record 29 """ #print "reading TSTEPNL" while len(data) >= 88: # 19*4 data = data[88:] out = unpack('iifiiiiifffiiifiiiffff', data[:88]) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out self.add_TSTEPNL(TSTEPNL(None, out))
def _read_tstepnl_msc(self, data: bytes, n: int) -> Tuple[int, List[TSTEPNL]]: """ TSTEPNL(3103,31,337) - record 29 MSC 2005.2 1 SID I Set identification number 2 NDT I Number of time steps of value DT 3 DT RS Time increment 4 NO I Time step interval for output 5 METHOD I Method for dynamic matrix update 6 KSTEP I Time step interval or number of converged bisections 7 MAXITER I Limit on number of iterations 8 CONV I Flags to select convergence criteria 9 EPSU RS Error tolerance for displacement U criterion 10 EPSP RS Error tolerance for displacement P criterion 11 EPSW RS Error tolerance for displacement W criterion 12 MAXDIV I Limit on probable divergence conditions 13 MAXQN I Maximum number of quasi-Newton correction vectors 14 MAXLS I Maximum number of line searches 15 FSTRESS RS Fraction of effective stress 16 MAXBIS I Maximum number of bisections 17 ADJUST I Time step skip factor for automatic time step adjustment 18 MSTEP I Number of steps to obtain the dominant period response 19 RB RS Define bounds for maintaining the same time step 20 MAXR RS Maximum ratio for the adjusted arc-length increment 21 UTOL RS Tolerance on displacement or temperature increment 22 RTOLB RS Maximum value of incremental rotation """ ntotal = 88 * self.factor # 22*4 s = Struct(mapfmt(self._endian + b'iif5i3f3if3i4f', self.size)) nentries = (len(data) - n) // ntotal assert (len(data) - n) % ntotal == 0 assert nentries > 0, nentries tstepnls = [] for unused_i in range(nentries): edata = data[n:n + ntotal] out = s.unpack(edata) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out method = out[4] if method in [4]: self.log.warning('method=4; skipping TSTEPNL=%r' % str(out)) else: tstepnl = TSTEPNL.add_op2_data(out) tstepnls.append(tstepnl) n += ntotal return n, tstepnls
def _read_tstepnl(self, data, n): """ TSTEPNL(3103,31,337) - record 29 """ #print("reading TSTEPNL") ntotal = 88 # 19*4 s = Struct(b(self._endian + 'iif5i3f3if3i4f')) nentries = (len(data) - n) // ntotal for i in range(nentries): edata = data[n:n+88] out = s.unpack(edata) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out self.add_TSTEPNL(TSTEPNL.add_op2_data(out)) n += ntotal self.card_count['TSTEPNL'] = nentries return n
def _read_tstepnl(self, data, n): """ TSTEPNL(3103,31,337) - record 29 """ #print("reading TSTEPNL") ntotal = 88 # 19*4 s = Struct(b(self._endian + 'iif5i3f3if3i4f')) nentries = (len(data) - n) // ntotal for i in range(nentries): edata = data[n:n+88] out = s.unpack(edata) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out self._add_tstepnl_object(TSTEPNL.add_op2_data(out)) n += ntotal self.card_count['TSTEPNL'] = nentries return n
def _read_tstepnl(self, data, n): """TSTEPNL(3103,31,337) - record 29""" ntotal = 88 * self.factor # 19*4 s = Struct(mapfmt(self._endian + b'iif5i3f3if3i4f', self.size)) nentries = (len(data) - n) // ntotal for unused_i in range(nentries): edata = data[n:n + ntotal] out = s.unpack(edata) #(sid,ndt,dt,no,kMethod,kStep,maxIter,conv,epsU,epsP,epsW, # maxDiv,maxQn,maxLs,fStress,lsTol,maxBisect,adjust,mStep,rb,maxR,uTol,rTolB) = out method = out[4] if method in [4]: self.log.warning('method=4; skipping TSTEPNL=%r' % str(out)) else: self._add_tstepnl_object(TSTEPNL.add_op2_data(out)) n += ntotal self.card_count['TSTEPNL'] = nentries return n