def __init__(self, card=None, data=None, comment=''): """ :: DRESP1 1S1 CSTRAIN PCOMP 1 1 10000 """ if comment: self._comment = comment self.oid = integer(card, 1, 'oid') self.label = string(card, 2, 'label') self.rtype = string(card, 3, 'rtype') # elem, pbar, pshell, etc. (ELEM flag or Prop Name) self.ptype = integer_string_or_blank(card, 4, 'ptype') if 0: assert self.ptype in ['ELEM', 'PSHELL', 'PBAR', 'PROD', 'PCOMP', 'PSOLID', 'PELAS', 'PBARL', 'PBEAM', 'PBEAML', 'PSHEAR', 'PTUBE', 'PKNL', #: .. todo:: is this correct? None], 'DRESP1 ptype=%s' % self.ptype self.region = integer_or_blank(card, 5, 'region') self.atta = integer_double_string_or_blank(card, 6, 'atta') self.attb = integer_double_string_or_blank(card, 7, 'attb') self.atti = integer_double_string_or_blank(card, 8, 'atti') self.others = [interpret_value(field) for field in card[9:] ]
def __init__(self, card=None, data=None, comment=''): Table.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') self.Type = integer_or_blank(card, 2, 'Type', 1) assert self.Type in [1, 2], 'TABLES1 Type=%s' % self.Type nfields = len(card) - 1 nterms = (nfields - 9) // 2 if nterms < 0: raise SyntaxError('%r card is too short' % self.type) xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double_or_string(card, n, 'x' + str(i + 1)) y = double_or_string(card, n + 1, 'y' + str(i + 1)) if x == 'SKIP' or y == 'SKIP': continue xy += [x, y] string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] xy = data[1:] isData = True self.parse_fields(xy, nrepeated=2, isData=isData)
def __init__(self, card=None, data=None, comment=''): Table.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') nfields = len(card) - 1 nterms = (nfields - 9) // 2 if nterms < 0: raise SyntaxError('%r card is too short' % self.type) xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double(card, n, 'x' + str(i + 1)) y = double(card, n + 1, 'y' + str(i + 1)) xy += [x, y] string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] xy = data[1:] isData = True self.parse_fields(xy, nrepeated=2, isData=isData)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.oid = integer(card, 1, 'ID') self.label = string(card, 2, 'label') self.group = string(card, 3, 'group') self.Type = string(card, 4, 'Type') self.region = integer(card, 5, 'Type') i = 0 fields = [interpret_value(field) for field in card[9:]] key = '$NULL$' # dummy key self.params = {key: []} value_list = [] for (i, field) in enumerate(fields): if i % 8 == 0 and field is not None: self.params[key] = value_list key = field value_list = [] elif field is not None: value_list.append(field) #else: # pass self.params[key] = value_list del self.params['$NULL$'] else: raise RuntimeError(data)
def __init__(self, card=None, data=None, comment=''): RandomTable.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') self.xaxis = string_or_blank(card, 2, 'xaxis', 'LINEAR') self.yaxis = string_or_blank(card, 3, 'yaxis', 'LINEAR') nfields = len(card) - 1 nterms = (nfields - 9) // 2 if nterms < 0: raise SyntaxError('%r card is too short' % self.type) xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double(card, n, 'x' + str(i + 1)) y = double(card, n + 1, 'y' + str(i + 1)) xy += [x, y] string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] self.xaxis = self.map_axis(data[1]) self.yaxis = self.map_axis(data[2]) xy = data[3:] isData = True assert self.xaxis in ['LINEAR', 'LOG'], 'xaxis=|%s|' % (self.xaxis) assert self.yaxis in ['LINEAR', 'LOG'], 'yaxis=|%s|' % (self.yaxis) self.parse_fields(xy, nrepeated=2, isData=isData)
def __init__(self, card=None, data=None, comment=''): """ +--------+-----------+------------+-------+------+--------+-------+-----+-------+ | DRESP1 | 1S1 | CSTRAIN | PCOMP | | | 1 | 1 | 10000 | +--------+-----------+------------+-------+------+--------+-------+-----+-------+ """ if comment: self._comment = comment if card: self.oid = integer(card, 1, 'oid') self.label = string(card, 2, 'label') self.rtype = string(card, 3, 'rtype') # elem, pbar, pshell, etc. (ELEM flag or Prop Name) self.ptype = integer_string_or_blank(card, 4, 'ptype') #if 1: ## incomplete #assert self.ptype in ['ELEM', 'PSHELL', 'PBAR', 'PROD', 'PCOMP', #'PSOLID', 'PELAS', 'PBARL', 'PBEAM', #'PBEAML', 'PSHEAR', 'PTUBE', #'PKNL', #None], 'DRESP1 ptype=%s' % self.ptype self.region = integer_or_blank(card, 5, 'region') self.atta = integer_double_string_or_blank(card, 6, 'atta') self.attb = integer_double_string_or_blank(card, 7, 'attb') self.atti = [] for i in range(8, len(card)): atti = integer_double_string_or_blank(card, i, 'atti_%i' % (i + 1)) self.atti.append(atti) else: raise RuntimeError(data)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.sid = integer(card, 1, 'sid') self.eid = integer(card, 2, 'eid') self.Type = string(card, 3, 'Type') self.scale = string(card, 4, 'scale') self.x1 = double(card, 5, 'x1') self.p1 = double(card, 6, 'p1') self.x2 = double_or_blank(card, 7, 'x2', self.x1) self.p2 = double_or_blank(card, 8, 'p2', self.p1) assert 0 <= self.x1 <= self.x2 assert len(card) <= 9, 'len(PLOAD1 card) = %i' % len(card) else: self.sid = data[0] self.eid = data[1] self.Type = data[2] self.scale = data[3] self.x1 = data[4] self.p1 = data[5] self.x2 = data[6] self.p2 = data[7] if self.Type not in self.validTypes: msg = '%s is an invalid type on the PLOAD1 card' % self.Type raise RuntimeError(msg) assert self.scale in self.validScales, '%s is an invalid scale on the PLOAD1 card' % (self.scale)
def __init__(self, card=None, data=None, comment=''): Table.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') self.x1 = double(card, 2, 'x1') self.x2 = double(card, 3, 'x2') assert self.x2 != 0.0 self.x3 = double(card, 4, 'x3') self.x4 = double(card, 5, 'x4') assert self.x3 < self.x4 nfields = len(card) - 1 nterms = (nfields - 9) // 2 xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double(card, n, 'x' + str(i + 1)) y = double(card, n + 1, 'y' + str(i + 1)) xy += [x, y] ENDT = string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] self.x1 = data[1] self.x2 = data[2] self.x3 = data[3] self.x4 = data[4] xy = data[3:] isData = True self.parse_fields(xy, nrepeated=1, isData=isData)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.name = string(card, 1, 'name') #zero #: 4-Lower Triangular; 5=Upper Triangular; 6=Symmetric; 8=Identity (m=nRows, n=m) self.ifo = integer(card, 3, 'ifo') #: 1-Real, Single Precision; 2=Real,Double Precision; 3=Complex, Single; 4=Complex, Double self.tin = integer(card, 4, 'tin') #: 0-Set by cell precision self.tout = integer_or_blank(card, 5, 'tout', 0) #: Input format of Ai, Bi. (Integer=blank or 0 indicates real, imaginary format; #: Integer > 0 indicates amplitude, phase format.) self.polar = integer_or_blank(card, 6, 'polar', 0) if self.ifo in [6, 9]: self.ncol = integer(card, 8, 'ncol') else: # technically right, but nulling this will fix bad decks self.ncol = None #self.ncol = blank(card, 8, 'ncol') else: raise NotImplementedError(data) self.GCj = [] self.GCi = [] self.Real = [] if self.is_complex(): self.Complex = []
def __init__(self, card=None, data=None, comment=''): ThermalLoad.__init__(self, card, data) if comment: self._comment = comment if card: #: Load set identification number. (Integer > 0) self.sid = integer(card, 1, 'eid') self.flag = string(card, 2, 'flag') assert self.flag in ['POINT', 'LINE', 'REV', 'AREA3', 'AREA4', 'AREA6', 'AREA8'] #: Magnitude of thermal flux into face. Q0 is positive for heat #: into the surface. (Real) self.Q0 = double(card, 3, 'Q0') #: Area factor depends on type. (Real > 0.0 or blank) self.af = double_or_blank(card, 4, 'af') nfields = card.nFields() #: grids self.grids = fields(integer, card, 'grid', i=5, j=nfields) #: Grid point identification of connected grid points. #: (Integer > 0 or blank) self.grids = expand_thru_by(self.grids) else: self.sid = data[0] self.flag = data[1] self.Q0 = data[2] self.af = data[3] self.grids = data[4:]
def __init__(self, card=None, data=None, comment=''): """ Design Sensitivity Equation Response Quantities Defines equation responses that are used in the design, either as constraints or as an objective. """ if comment: self._comment = comment self.oid = integer(card, 1, 'oid') self.label = string(card, 2, 'label') self.eqidFunc = integer_or_string(card, 3, 'eqid_Func') self.region = integer_or_blank(card, 4, 'region') self.method = string_or_blank(card, 5, 'method', 'MIN') self.c1 = double_or_blank(card, 6, 'c1', 100.) self.c2 = double_or_blank(card, 7, 'c2', 0.005) self.c3 = double_or_blank(card, 8, 'c3') #: .. todo:: or blank? i = 0 fields = [interpret_value(field) for field in card[9:] ] key = '$NULL$' # dummy key self.params = {key: []} valueList = [] for (i, field) in enumerate(fields): if i % 8 == 0 and field is not None: self.params[key] = valueList key = field valueList = [] elif field is not None: valueList.append(field) #else: # pass self.params[key] = valueList del self.params['$NULL$']
def __init__(self, card=None, data=None, comment=''): ThermalElement.__init__(self, card, data) if comment: self._comment = comment if card: #: Surface element ID self.eid = integer(card, 1, 'eid') #: PHBDY property entry identification numbers. (Integer > 0) self.pid = integer(card, 2, 'pid') assert self.pid > 0 self.Type = string(card, 3, 'Type') #print "self.Type = ",self.Type # msg = 'CHBDYP Type=|%s|' (self.Type) #assert self.Type in ['POINT','LINE','ELCYL','FTUBE','TUBE'], msg #: A VIEW entry identification number for the front face. self.iViewFront = integer_or_blank(card, 4, 'iViewFront', 0) #: A VIEW entry identification number for the back face. self.iViewBack = integer_or_blank(card, 5, 'iViewBack', 0) #: Grid point identification numbers of grids bounding the surface. #: (Integer > 0) self.g1 = integer(card, 6, 'g1') #: Grid point identification numbers of grids bounding the surface. #: (Integer > 0) if self.Type != 'POINT': self.g2 = integer(card, 7, 'g2') else: self.g2 = blank(card, 7, 'g2') #: Orientation grid point. (Integer > 0; Default = 0) self.g0 = integer_or_blank(card, 8, 'g0', 0) #: RADM identification number for front face of surface element. #: (Integer > 0) self.radMidFront = integer_or_blank(card, 9, 'radMidFront', 0) #: RADM identification number for back face of surface element. #: (Integer > 0) self.radMidBack = integer_or_blank(card, 10, 'radMidBack', 0) #: Grid point identification number of a midside node if it is used #: with the line type surface element. self.gmid = integer_or_blank(card, 11, 'gmid') #: Coordinate system for defining orientation vector. #: (Integer > 0; Default = 0 self.ce = integer_or_blank(card, 12, 'ce', 0) #: Components of the orientation vector in coordinate system CE. #: The origin of the orientation vector is grid point G1. #: (Real or blank) self.e1 = double_or_blank(card, 13, 'e3') self.e2 = double_or_blank(card, 14, 'e3') self.e3 = double_or_blank(card, 15, 'e3') assert len(card) <= 16, 'len(CHBDYP card) = %i' % len(card) else: raise NotImplementedError(data)
def __init__(self, card=None, data=None, comment=''): BushingProperty.__init__(self, card, data) if comment: self._comment = comment if card: self.pid = integer(card, 1, 'pid') nfields = len(card) - 1 nrows = nfields // 8 if nfields % 8 != 0: nrows += 1 self.k_tables = [] self.b_tables = [] self.ge_tables = [] self.kn_tables = [] for irow in range(nrows): ifield = 1 + irow * 8 param = string(card, ifield + 1, 'param_type') table = [] for j in range(6): table_value = integer_or_blank(card, ifield + j + 2, param + '%i' % (j+1)) table.append(table_value) if param == 'K': self.k_tables = table elif param == 'B': self.b_tables = table elif param == 'GE': self.ge_tables = table elif param == 'KN': self.kn_tables = table else: raise ValueError(param) else: raise NotImplementedError()
def __init__(self, card=None, data=None, comment=""): ThermalElement.__init__(self, card, data) if comment: self._comment = comment if card: #: Surface element ID self.eid = integer(card, 1, "eid") #: PHBDY property entry identification numbers. (Integer > 0) self.pid = integer(card, 2, "pid") assert self.pid > 0 self.Type = string(card, 3, "Type") # print("self.Type = %s" % self.Type) # msg = 'CHBDYP Type=%r' % self.Type # assert self.Type in ['POINT','LINE','ELCYL','FTUBE','TUBE'], msg #: A VIEW entry identification number for the front face. self.iViewFront = integer_or_blank(card, 4, "iViewFront", 0) #: A VIEW entry identification number for the back face. self.iViewBack = integer_or_blank(card, 5, "iViewBack", 0) #: Grid point identification numbers of grids bounding the surface. #: (Integer > 0) self.g1 = integer(card, 6, "g1") #: Grid point identification numbers of grids bounding the surface. #: (Integer > 0) if self.Type != "POINT": self.g2 = integer(card, 7, "g2") else: self.g2 = blank(card, 7, "g2") #: Orientation grid point. (Integer > 0; Default = 0) self.g0 = integer_or_blank(card, 8, "g0", 0) #: RADM identification number for front face of surface element. #: (Integer > 0) self.radMidFront = integer_or_blank(card, 9, "radMidFront", 0) #: RADM identification number for back face of surface element. #: (Integer > 0) self.radMidBack = integer_or_blank(card, 10, "radMidBack", 0) #: Grid point identification number of a midside node if it is used #: with the line type surface element. self.gmid = integer_or_blank(card, 11, "gmid") #: Coordinate system for defining orientation vector. #: (Integer > 0; Default = 0 self.ce = integer_or_blank(card, 12, "ce", 0) #: Components of the orientation vector in coordinate system CE. #: The origin of the orientation vector is grid point G1. #: (Real or blank) self.e1 = double_or_blank(card, 13, "e3") self.e2 = double_or_blank(card, 14, "e3") self.e3 = double_or_blank(card, 15, "e3") assert len(card) <= 16, "len(CHBDYP card) = %i" % len(card) else: raise NotImplementedError(data)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.name = string(card, 1, 'name') #zero #: Form of the matrix: 1=Square (not symmetric); 2=Rectangular; #: 3=Diagonal (m=nRows,n=1); 4=Lower Triangular; 5=Upper Triangular; #: 6=Symmetric; 8=Identity (m=nRows, n=m) self.form = integer(card, 3, 'form') #: 1-Real, Single Precision; 2=Real,Double Precision; #: 3=Complex, Single; 4=Complex, Double self.tin = integer(card, 4, 'tin') #: 0-Set by cell precision self.tout = integer_or_blank(card, 5, 'tout', 0) self.nRows = integer(card, 7, 'nrows') self.nCols = integer(card, 8, 'ncols') assert len(card) == 9, 'len(DMI card) = %i' % len(card) else: raise NotImplementedError(data) self.GCj = [] self.GCi = [] self.Real = [] if self.is_complex(): self.Complex = []
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.name = string(card, 1, 'name') #zero #: 4-Lower Triangular; 5=Upper Triangular; 6=Symmetric; 8=Identity (m=nRows, n=m) self.ifo = integer(card, 3, 'ifo') #: 1-Real, Single Precision; 2=Real,Double Precision; 3=Complex, Single; 4=Complex, Double self.tin = integer(card, 4, 'tin') #: 0-Set by cell precision self.tout = integer_or_blank(card, 5, 'tout', 0) self.polar = integer_or_blank(card, 6, 'polar') if self.ifo == 9: self.ncol = integer(card, 8, 'ncol') else: self.ncol = blank(card, 8, 'ncol') else: raise NotImplementedError(data) self.GCj = [] self.GCi = [] self.Real = [] if self.isComplex(): self.Complex = []
def __init__(self, card=None, data=None, comment=''): Table.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') self.Type = string_or_blank(card, 2, 'Type', 'G') assert self.Type in ['G', 'CRIT', 'Q'], 'Type=%r' % self.Type nfields = len(card) - 1 nterms = (nfields - 9) // 2 if nterms < 0: raise SyntaxError('%r card is too short' % self.type) xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double(card, n, 'x' + str(i + 1)) y = double(card, n + 1, 'y' + str(i + 1)) xy += [x, y] ENDT = string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] self.x1 = data[1] self.Type = data[2] xy = data[5:] isData = True self.parse_fields(xy, nrepeated=2, isData=isData)
def __init__(self, card=None, data=None, comment=''): ThermalLoad.__init__(self, card, data) if comment: self._comment = comment if card: #: Load set identification number. (Integer > 0) self.sid = integer(card, 1, 'eid') self.flag = string(card, 2, 'flag') assert self.flag in ['POINT', 'LINE', 'REV', 'AREA3', 'AREA4', 'AREA6', 'AREA8'] #: Magnitude of thermal flux into face. Q0 is positive for heat #: into the surface. (Real) self.Q0 = double(card, 3, 'Q0') #: Area factor depends on type. (Real > 0.0 or blank) self.af = double_or_blank(card, 4, 'af') nfields = card.nfields nnodes = self.flag_to_nnodes[self.flag] #: Grid point identification of connected grid points. #: (Integer > 0 or blank) self.grids = [] for i in range(nnodes): grid = integer(card, 5 + i, 'grid%i' % (i + 1)) self.grids.append(grid) else: self.sid = data[0] self.flag = data[1] self.Q0 = data[2] self.af = data[3] self.grids = data[4:]
def __init__(self, card, comment=''): self.pid = integer(card, 1, 'property_id') self.sets = [] self.Types = [] self.gammas = [] self._cps = [] #self.set = integer(card, 2, 'set_id') #self.Type = string(card, 3, 'Type') #if self.Type not in ['NEWTON','PRANDTL-MEYER', 'CP']: # raise RuntimeError('Type=%r' % Type) #self.gamma = double_or_blank(card, 4, 'gamma', 1.4) i = 2 while i < len(card): self.sets.append(integer(card, i, 'set_id')) Type = string(card, i+1, 'Type') self.Types.append(Type) #if self.Type not in ['NEWTON','PRANDTL-MEYER', 'CP']: #raise RuntimeError('Type=%r' % Type) self.gammas.append(double_or_blank(card, i+2, 'gamma', 1.4)) _cp = None if Type == 'CP': _cp = double(card, i+3, 'Cp') elif Type == 'NEWTON': _cp = double_or_blank(card, i+3, 'Cp_nominal', 2.0) self._cps.append(_cp) i += 7
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment self.cid = integer(card, 1, 'cid') self.entity = string(card, 2, 'entity') self.gm_ids = [ integer(card, 3, 'GM_ID1'), integer_or_blank(card, 4, 'GM_ID2'), ]
def __init__(self, card=None, data=None, comment=''): """ Design Variable to Material Relation Defines the relation between a material property and design variables.:: DVMREL1 ID TYPE MID MPNAME MPMIN MPMAX C0 DVID1 COEF1 DVID2 COEF2 DVID3 COEF3 -etc.- """ if comment: self._comment = comment if card: self.oid = integer(card, 1, 'oid') self.Type = string(card, 2, 'Type') self.mid = integer(card, 3, 'mid') self.mpName = string(card, 4, 'mpName') #if self.mpName in ['E', 'RHO', 'NU']: positive values #self.mpMin = double_or_blank(card, 5, 'mpMin', 1e-15) #else: # negative #self.mpMin = double_or_blank(card, 5, 'mpMin', -1e-35) self.mpMin = double_or_blank(card, 5, 'mpMin') #: .. todo:: bad default self.mpMax = double_or_blank(card, 6, 'mpMax', 1e20) self.c0 = double_or_blank(card, 7, 'c0', 0.0) self.dvids = [] self.coeffs = [] endFields = [interpret_value(field) for field in card[9:]] #print "endFields = ",endFields nfields = len(endFields) - 1 if nfields % 2 == 1: endFields.append(None) nfields += 1 i = 0 for i in range(0, nfields, 2): self.dvids.append(endFields[i]) self.coeffs.append(endFields[i + 1]) if nfields % 2 == 1: print(card) print("dvids = %s" % (self.dvids)) print("coeffs = %s" % (self.coeffs)) print(str(self)) raise RuntimeError('invalid DVMREL1...') else: raise RuntimeError(data)
def __init__(self, card=None, data=None, comment=''): LineProperty.__init__(self, card, data) if comment: self._comment = comment if card: #: Property ID self.pid = integer(card, 1, 'pid') #: Material ID self.mid = integer(card, 2, 'mid') self.group = string_or_blank(card, 3, 'group', 'MSCBMLO') #: Section Type (e.g. 'ROD', 'TUBE', 'I', 'H') self.Type = string(card, 4, 'Type') ndim = self.validTypes[self.Type] j = 9 + ndim + 1 dims = [] #dim_old = None ## TODO: is there a default? for i in range(ndim): dim = double_or_blank(card, 9 + i, 'dim%i' % (i + 1)) dims.append(dim) #: dimension list self.dim = dims assert len(dims) == ndim, 'PBARL ndim=%s len(dims)=%s' % (ndim, len(dims)) assert len(dims) == len(self.dim), 'PBARL ndim=%s len(dims)=%s' % (ndim, len(self.dim)) #: non-structural mass self.nsm = double_or_blank(card, 9 + ndim + 1, 'nsm', 0.0) else: self.pid = data[0] self.mid = data[1] self.group = data[2].strip() self.Type = data[3].strip() self.dim = list(data[4:-1]) self.nsm = data[-1] #print("group = %r" % self.group) #print("Type = %r" % self.Type) #print("dim = ",self.dim) #print(str(self)) #print("*PBARL = ",data) #raise NotImplementedError('not finished...') if self.Type not in self.validTypes: msg = ('Invalid PBARL Type, Type=%s ' 'validTypes=%s' % (self.Type, self.validTypes.keys())) raise RuntimeError(msg) if len(self.dim) != self.validTypes[self.Type]: msg = 'dim=%s len(dim)=%s Type=%s len(dimType)=%s' % ( self.dim, len(self.dim), self.Type, self.validTypes[self.Type]) raise RuntimeError(msg) assert None not in self.dim
def add(self, card=None, comment=''): if comment: self._comment = comment i = self.i #: Identification number of a MAT1, MAT2, or MAT9 entry. self.material_id[i] = integer(card, 1, 'mid') #: Identification number of a TABLES1 or TABLEST entry. If H is #: given, then this field must be blank. self.table_id[i] = integer_or_blank(card, 2, 'tid', 0) #: Type of material nonlinearity. ('NLELAST' for nonlinear elastic #: or 'PLASTIC' for elastoplastic.) self.Type[i] = string(card, 3, 'Type') if self.Type[i] == 'NLELAST': self.h[i] = blank(card, 4, 'h') self.hr[i] = blank(card, 6, 'hr') self.yf[i] = blank(card, 5, 'yf') self.limit1[i] = blank(card, 7, 'yf') self.limit2[i] = blank(card, 8, 'yf') else: #: Work hardening slope (slope of stress versus plastic strain) in #: units of stress. For elastic-perfectly plastic cases, H=0.0. #: For more than a single slope in the plastic range, the #: stress-strain data must be supplied on a TABLES1 entry #: referenced by TID, and this field must be blank h = double_or_blank(card, 4, 'H') self.h[i] = h if h is None: self.hflag[i] = False else: self.hflag[i] = True #: Yield function criterion, selected by one of the following #: values (1) Von Mises (2) Tresca (3) Mohr-Coulomb #: (4) Drucker-Prager self.yf[i] = integer_or_blank(card, 5, 'yf', 1) #: Hardening Rule, selected by one of the following values #: (Integer): (1) Isotropic (Default) (2) Kinematic #: (3) Combined isotropic and kinematic hardening self.hr[i] = integer_or_blank(card, 6, 'hr', 1) #: Initial yield point self.limit1[i] = double(card, 7, 'limit1') if self.yf[i] == 3 or self.yf[i] == 4: #: Internal friction angle, measured in degrees, for the #: Mohr-Coulomb and Drucker-Prager yield criteria self.limit2[i] = double(card, 8, 'limit2') else: #self.limit2[i] = blank(card, 8, 'limit2') #self.limit2[i] = None pass assert len(card) <= 9, 'len(MATS1 card) = %i' % len(card) self.i += 1
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment #: Response type for which the screening criteria apply. (Character) self.rType = string(card, 1, 'rType') #: Truncation threshold. (Real; Default = -0.5) self.trs = double_or_blank(card, 2, 'trs', -0.5) #: Maximum number of constraints to be retained per region per load #: case. (Integer > 0; Default = 20) self.nstr = integer(card, 3, 'nstr', 20) assert len(card) == 4, 'len(DSCREEN card) = %i' % len(card)
def build(self): #if comment: #self._comment = comment cards = self._cards ncards = len(cards) float_fmt = self.model.float self.load_id = zeros(ncards, 'int32') self.element_id = zeros(ncards, 'int32') self.Type = array([''] * ncards, '|S4') self.scale = array([''] * ncards, '|S4') self.x1 = zeros(ncards, float_fmt) self.x2 = zeros(ncards, float_fmt) self.p1 = zeros(ncards, float_fmt) self.p2 = zeros(ncards, float_fmt) self.n = ncards for i, card in enumerate(cards): self.load_id[i] = integer(card, 1, 'load_id') self.element_id[i] = integer(card, 2, 'eid') Type = string(card, 3, 'Type ("%s")' % '", "'.join(self.valid_types) ) scale = string(card, 4, 'scale ("%s")' % '", "'.join(self.valid_scales) ) self.x1[i] = double(card, 5, 'x1') self.p1[i] = double(card, 6, 'p1') self.x2[i] = double_or_blank(card, 7, 'x2', self.x1) self.p2[i] = double_or_blank(card, 8, 'p2', self.p1) assert len(card) <= 9, 'len(PLOAD1 card) = %i' % len(card) if Type not in self.valid_types: msg = '%r is an invalid type on the PLOAD1 card' % Type raise RuntimeError(msg) self.Type[i] = Type assert 0.0 <= self.x1[i] <= self.x2[i] if scale in ['FR', 'FRPR']: assert self.x1[i] <= 1.0, 'x1=%r' % self.x1[i] assert self.x2[i] <= 1.0, 'x2=%r' % self.x2[i] assert scale in self.valid_scales, '%s is an invalid scale on the PLOAD1 card' % scale self.scale[i] = scale self._cards = [] self._comments = []
def __init__(self, card=None, data=None, comment=''): Constraint.__init__(self, card, data) if comment: self._comment = comment if card: self.conid = integer(card, 1, 'sid') self.components = components(card, 2, 'components') self.entity = string(card, 3, 'entity') self.entity_id = integer(card, 4, 'entity_id') else: raise NotImplementedError('GMSPC')
def __init__(self, card=None, data=None, comment=''): LineProperty.__init__(self, card, data) if comment: self._comment = comment if card: #: Property ID self.pid = integer(card, 1, 'pid') #: Material ID self.mid = integer(card, 2, 'mid') self.group = string_or_blank(card, 3, 'group', 'MSCBMLO') #: Section Type (e.g. 'ROD', 'TUBE', 'I', 'H') self.Type = string(card, 4, 'Type') ndim = self.validTypes[self.Type] j = 9 + ndim + 1 #: dimension list self.dim = fields(double_or_blank, card, 'dim', i=9, j=j) #: non-structural mass self.nsm = double_or_blank(card, 9 + ndim + 1, 'nsm', 0.0) if ndim > 0: self.nsm = set_default_if_blank(self.dim.pop(), 0.0) else: self.nsm = 0.0 assert isinstance(self.nsm, float), 'nsm=%r' % self.nsm else: self.pid = data[0] self.mid = data[1] self.group = data[2].strip() self.Type = data[3].strip() self.dim = list(data[4:-1]) self.nsm = data[-1] #print("group = %r" % self.group) #print("Type = %r" % self.Type) #print("dim = ",self.dim) #print(str(self)) #print("*PBARL = ",data) #raise NotImplementedError('not finished...') if self.Type not in self.validTypes: msg = ('Invalid PBARL Type, Type=%s ' 'validTypes=%s' % (self.Type, self.validTypes.keys())) raise RuntimeError(msg) if len(self.dim) != self.validTypes[self.Type]: msg = 'dim=%s len(dim)=%s Type=%s len(dimType)=%s' % ( self.dim, len(self.dim), self.Type, self.validTypes[self.Type]) raise RuntimeError(msg) assert None not in self.dim
def __init__(self, card=None, data=None, comment=''): IntegratedLineProperty.__init__(self, card, data) if comment: self._comment = comment if card: #: Property ID self.pid = integer(card, 1, 'pid') #: Material ID self.mid = integer(card, 2, 'mid') self.group = string_or_blank(card, 3, 'group', 'MSCBMLO') #: Section Type (e.g. 'ROD', 'TUBE', 'I', 'H') self.Type = string(card, 4, 'Type') # determine the number of required dimensions on the PBEAM ndim = self.validTypes[self.Type] #nAll = ndim + 1 #: dimension list self.dim = [] Dim = [] #: Section position self.xxb = [0.] #: Output flag self.so = ['YES'] #: non-structural mass :math:`nsm` self.nsm = [] i = 9 n = 0 while i < len(card): if n > 0: so = string_or_blank(card, i, 'so_n=%i' % n, 'YES') xxb = double_or_blank(card, i + 1, 'xxb_n=%i' % n, 1.0) self.so.append(so) self.xxb.append(xxb) i += 2 Dim = [] for ii in range(ndim): dim = double(card, i, 'dim_n=%i_ii=%i' % (n, ii)) Dim.append(dim) i += 1 self.dim.append(Dim) nsm = double_or_blank(card, i, 'nsm_n=%i' % n, 0.0) self.nsm.append(nsm) n += 1 i += 1
def __init__(self, card=None, data=None, comment=''): Table.__init__(self, card, data) if comment: self._comment = comment if card: self.tid = integer(card, 1, 'tid') self.x1 = double(card, 2, 'x1') self.x2 = double(card, 3, 'x2') self.x3 = double(card, 4, 'x3') self.x4 = double(card, 5, 'x4') assert self.x2 != 0.0 assert self.x3 < self.x4 nfields = len(card) - 1 nterms = (nfields - 9) // 2 if nterms < 0: raise SyntaxError('%r card is too short' % self.type) xy = [] for i in range(nterms): n = 9 + i * 2 if card.field(n) == 'ENDT': break x = double_or_string(card, n, 'x' + str(i + 1)) y = double_or_string(card, n + 1, 'y' + str(i + 1)) if x == 'SKIP' or y == 'SKIP': continue xy += [x, y] string(card, nfields, 'ENDT') isData = False else: self.tid = data[0] self.x1 = data[1] self.x2 = data[2] self.x3 = data[3] self.x4 = data[4] xy = data[5:] isData = True self.parse_fields(xy, nrepeated=2, isData=isData)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: self.oid = integer(card, 1, 'oid') self.label = string(card, 2, 'label') self.xinit = double(card, 3, 'xinit') self.xlb = double_or_blank(card, 4, 'xlb', -1e20) self.xub = double_or_blank(card, 5, 'xub', 1e20) self.delx = double_or_blank(card, 6, 'delx', 1e20) self.ddval = integer_or_blank(card, 7, 'ddval') assert len(card) <= 8, 'len(DESVAR card) = %i' % len(card) else: raise NotImplementedError(data)
def __init__(self, card=None, data=None, comment=''): if comment: self._comment = comment if card: #: Contact set ID. Parameters defined in this command apply to #: contact set CSID defined by a BCTSET entry. (Integer > 0) self.csid = integer(card, 1, 'csid') i = 2 j = 1 self.params = {} while i < card.nFields(): param = string(card, i, 'param%s' % j) i += 1 if param == 'TYPE': value = integer(card, i, 'value%s' % j, 0) assert value in [0, 1, 2], 'TYPE must be [0, 1, 2]' elif param == 'NSIDE': value = integer_or_blank(card, i, 'value%s' % j, 1) assert value in [1, 2], 'NSIDE must be [1, 2]' elif param == 'TBIRTH': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'TDEATH': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'INIPENE': value = integer_or_blank(card, i, 'value%s' % j, 0) assert value in [0, 1, 2], 'INIPENE must be [0, 1, 2]' elif param == 'PDEPTH': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'SEGNORM': value = integer_or_blank(card, i, 'value%s' % j, 0) assert value in [-1, 0, 1], 'SEGNORM must be [-1, 0, 1]' elif param == 'OFFTYPE': value = integer_or_blank(card, i, 'value%s' % j, 0) assert value in [0, 1, 2], 'SEGNORM must be [0, 1, 2]' elif param == 'OFFSET': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'TZPENE': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'CSTIFF': value = integer_or_blank(card, i, 'value%s' % j, 0) assert value in [0, 1], 'CSTIFF must be [0, 1]' elif param == 'TIED': value = integer_or_blank(card, i, 'value%s' % j, 0) assert value in [0, 1], 'TIED must be [0, 1]' elif param == 'TIEDTOL': value = double_or_blank(card, i, 'value%s' % j, 0.0) elif param == 'EXTFAC': value = double_or_blank(card, i, 'value%s' % j, 0.0) assert 1.0E-6 < value < 0.1, 'EXTFAC must be 1.0E-6 < EXTFAC < 0.1' else: # FRICMOD, FPARA1/2/3/4/5, EPSN, EPST, CFACTOR1, PENETOL # NCMOD, TCMOD, RFORCE, LFORCE, RTPCHECK, RTPMAX, XTYPE # ... value = integer_double_or_blank(card, i, 'value%s' % j) assert value is not None, '%s%i must not be None' % (param, j) self.params[param] = value i += 2 j += 1 else: msg = '%s has not implemented data parsing' % self.type raise NotImplementedError(msg)
def __init__(self, card=None, data=None, comment=''): RigidElement.__init__(self, card, data) if comment: self._comment = comment self.eid = integer(card, 1, 'eid') self.Gni = [] self.Cni = [] #fields = card[2:] iUm = card.index('UM') if iUm > 0: assert string(card, iUm, 'UM') == 'UM' if isinstance(card[-1], float): self.alpha = card.fields[-1].pop( ) # the last field is not part of fields #nfields = len(card) - 1 else: #nfields = len(card) self.alpha = 0. # loop till UM, no field9,field10 #print("iUm = %s" % iUm) n = 1 i = 0 offset = 2 while offset + i < iUm - 1: #print('field(%s) = %s' % (offset + i, card.field(offset + i))) gni = integer_or_blank(card, offset + i, 'gn%i' % n) cni = components_or_blank(card, offset + i + 1, 'cn%i' % n) if gni: #print("gni=%s cni=%s" % (gni ,cni)) self.Gni.append(gni) self.Cni.append(cni) n += 1 else: assert cni is None i += 2 #print('Gni =', self.Gni) #print('Cni =', self.Cni) self.Gmi = [] self.Cmi = [] # loop till alpha, no field9,field10 n = 1 offset = iUm + 1 i = 0 while offset + i < len(card): # dont grab alpha gmi = integer_or_blank(card, offset + i, 'gm%i' % n) cmi = components_or_blank(card, offset + i + 1, 'cm%i' % n) if gmi: #print("gmi=%s cmi=%s" % (gmi ,cmi)) self.Gmi.append(gmi) self.Cmi.append(cmi) n += 1 else: assert cmi is None i += 2
def __init__(self, card, data=None, comment=''): """ Creates a PARAM card. :param self: the object :param card: BDFCard object :param data: list of PARAM entries not including 'PARAM'; intended to be used by OP2 Reader (default=None) :param comment: optional string (default='') """ if comment: self._comment = comment if data: card = BDFCard(['PARAM'] + data) self.key = string(card, 1, 'key') n = 1 value = None if self.key == 'ACOUT': value = string_or_blank(card, 2, 'value', 'PEAK') elif self.key == 'ACOWEAK': value = string_or_blank(card, 2, 'value', 'NO') elif self.key == 'ACSYM': value = string_or_blank(card, 2, 'value', 'YES') elif self.key == 'ADJMETH': value = integer_or_blank(card, 2, 'value', 0) elif self.key == 'ADPCON': value = double_or_blank(card, 2, 'value', 1.0) #elif self.key == 'ADMPOST': #value = string_or_blank(card, 2, 'value', 0) ## TODO: 0 is not a string elif self.key == 'ADSDISC': value = double_or_blank(card, 2, 'value', 1e-8) elif self.key == 'AESMAXIT': value = integer_or_blank(card, 2, 'value', 15) elif self.key == 'AESMETH': value = string_or_blank(card, 2, 'value', 'SELECT') assert value in ['SELECT', 'AUTO', 'DIRECT', 'RITZ', 'ITER'], 'value=%s' % value elif self.key == 'AESTOL': value = double_or_blank(card, 2, 'value', 1e-10) elif self.key == 'ADSTAT': value = string_or_blank(card, 2, 'value', 'YES') elif self.key in ['ALPHA1', 'ALPHA2', 'ALPHA1FL', 'ALPHA2FL']: # check alpha1/alpha1FL value1 = double_or_blank(card, 2, 'value1', 0.0) value2 = double_or_blank(card, 3, 'value2', 0.0) n = 2 elif self.key in ['CB1', 'CB2', 'CK1', 'CK2', 'CK3', 'CM1', 'CM2', 'CP1', 'CP2']: value1 = double_or_blank(card, 2, 'value1', 1.0) value2 = double_or_blank(card, 3, 'value2', 0.0) n = 2 elif self.key == 'POST': value = integer_or_blank(card, 2, 'value', 1) else: value1 = integer_double_string_or_blank(card, 2, 'value1') value2 = integer_double_string_or_blank(card, 3, 'value2') if value2 is None: value = value1 if value is None: if isinstance(value1, string_types): assert ' ' not in value1, 'PARAM value1=%r' % value1 if isinstance(value2, string_types): assert ' ' not in value2, 'PARAM value2=%r' % value2 self.values = [value1, value2] else: if isinstance(value, string_types): assert ' ' not in value, 'PARAM value=%r' % value self.values = [value] if n == 1: if len(card) != 3: raise RuntimeError('len(PARAM card)=%i card=%r' % (len(card), card)) else: if len(card) != 4: raise RuntimeError('len(PARAM card)=%i card=%r' % (len(card), card))
def __init__(self, card=None, data=None, comment=''): Method.__init__(self, card, data) if comment: self._comment = comment # CLAN self.mblkszs = [] self.iblkszs = [] self.ksteps = [] self.NJIs = [] # HESS self.alphaBjs = [] self.omegaBjs = [] self.LJs = [] self.NEJs = [] self.NDJs = [] if card: #: Set identification number. (Unique Integer > 0) self.sid = integer(card, 1, 'sid') #: Method of complex eigenvalue extraction self.method = string(card, 2, 'method') assert self.method in [ 'INV', 'HESS', 'CLAN' ], ('method=%s is not INV, HESS, CLAN' % (self.method)) #: Method for normalizing eigenvectors self.norm = string_or_blank(card, 3, 'norm') if self.norm == 'POINT': #: Grid or scalar point identification number. Required only if #: NORM='POINT'. (Integer>0) self.G = integer(card, 4, 'G') #: Component number. Required only if NORM='POINT' and G is a #: geometric grid point. (1<Integer<6) self.C = components(card, 5, 'C') else: self.G = blank(card, 4, 'G') self.C = blank(card, 5, 'C') #: Convergence criterion. (Real > 0.0. Default values are: #: 10^-4 for METHOD = "INV", #: 10^-15 for METHOD = "HESS", #: E is machine dependent for METHOD = "CLAN".) self.E = double_or_blank(card, 6, 'E') self.ndo = integer_double_string_or_blank(card, 7, 'ND0') # ALPHAAJ OMEGAAJ ALPHABJ OMEGABJ LJ NEJ NDJ fields = [interpret_value(field) for field in card[9:]] self.alphaAjs = [] self.omegaAjs = [] nfields = len(fields) nrows = nfields // 8 if nfields % 8 > 0: nrows += 1 #if nrows == 0: #raise RuntimeError('invalid row count=0; nfields=%s \ncard=%s\nfields=%s' % (nfields, card, fields)) if self.method == 'CLAN': self.loadCLAN(nrows, card) elif self.method in ['HESS', 'INV']: # HESS, INV self.loadHESS_INV(nrows, card) else: msg = 'invalid EIGC method...method=%r' % self.method raise RuntimeError(msg) #assert card.nFields() < 8, 'card = %s' % card else: raise NotImplementedError('EIGC')
def add_card(self, card, i): #: property ID self.property_id[i] = integer(card, 1, 'property_id') #: material ID self.material_id[i] = integer(card, 2, 'material_id') SO = [] XXB = [] A = [] I1 = [] I2 = [] I12 = [] J = [] NSM = [] # at least one cross section are required # so[0] and xxb[0] aren't used #: Output flag SO = ['YES'] #: Section position XXB = [0.] A.append(double(card, 3, 'A')) I1.append(double_or_blank(card, 4, 'I1', 0.0)) I2.append(double_or_blank(card, 5, 'I2', 0.0)) I12.append(double_or_blank(card, 6, 'I12', 0.0)) J.append(double_or_blank(card, 7, 'J', 0.0)) NSM.append(double_or_blank(card, 8, 'nsm', 0.0)) print(card) assert I1[0] > 0, I1[0] assert I2[0] > 0, I2[0] isCDEF = False field9 = double_string_or_blank(card, 9, 'field9') field17 = double_string_or_blank(card, 17, 'field17') try: isinstance(field17, float) isCDEF = True isFooter = True except SyntaxError: pass #print("f9=%s f17=%s" % (field9, field17)) #nlines = nfields // 8 if field9 in ['YES', 'YESA', 'NO']: isCDEF = False isContinue = True elif field17 in ['YES', 'YESA', 'NO']: isCDEF = True isContinue = True else: isContinue = False isCDEF = True C1 = [double_or_blank(card, 9, 'c1', 0.0)] C2 = [double_or_blank(card, 10, 'c2', 0.0)] D1 = [double_or_blank(card, 11, 'd1', 0.0)] D2 = [double_or_blank(card, 12, 'd2', 0.0)] E1 = [double_or_blank(card, 13, 'e1', 0.0)] E2 = [double_or_blank(card, 14, 'e2', 0.0)] F1 = [double_or_blank(card, 15, 'f1', 0.0)] F2 = [double_or_blank(card, 16, 'f2', 0.0)] # ---------------------------------------------------------------- # figure out how many YES/YESA/NO fields there are # and if there is a footer # counting continuation cards nfields = len(card) - 1 # -1 for PBEAM field if isCDEF: nmajor = nfields // 16 nleftover = nfields % 16 if nleftover == 0: nmajor -= 1 if nmajor == 0: nmajor = 1 # jump to the last block of 16 x = nmajor * 16 + 1 # If it's an SO field, we don't read the footer # remark 6: # The fourth and fifth continuation entries, which # contain fields K1 through N2(B), are optional # and may be omitted if the default values are appropriate. val = integer_double_string_or_blank(card, x, 'YES/YESA/NO') if val in ['YES', 'YESA', 'NO']: # there is no footer nmajor += 1 x += 16 else: # read the footer pass else: nmajor = nfields // 8 nleftover = nfields % 8 if nleftover == 0: nmajor -= 1 if nmajor == 0: nmajor = 1 x = nmajor * 8 + 1 val = integer_double_string_or_blank(card, x, 'YES/YESA/NO') if val in ['YES', 'YESA', 'NO']: # there is no footer nmajor += 1 x += 8 else: # read the footer pass # ---------------------------------------------------------------- for nRepeated in xrange(1, nmajor): # start at 1 to drop the header # field 17 is the first possible so if isCDEF: nStart = nRepeated * 16 + 1 else: nStart = nRepeated * 8 + 1 so = string(card, nStart, 'SO%i' % nRepeated) xxb = double(card, nStart + 1, 'x/xb%i' % nRepeated) a = double_or_blank(card, nStart + 2, 'Area%i' % nRepeated, 0.0) i1 = double_or_blank(card, nStart + 3, 'I1 %i' % nRepeated, 0.0) i2 = double_or_blank(card, nStart + 4, 'I2 %i' % nRepeated, 0.0) i12 = double_or_blank(card, nStart + 5, 'I12 %i' % nRepeated, 0.0) j = double_or_blank(card, nStart + 6, 'J%i' % nRepeated, 0.0) nsm = double_or_blank(card, nStart + 7, 'nsm%i' % nRepeated, 0.0) SO.append(so) XXB.append(xxb) A.append(a) I1.append(i1) I2.append(i2) I12.append(i12) J.append(j) NSM.append(nsm) if isCDEF: c1 = double_or_blank(card, nStart + 8, 'c1 %i' % nRepeated, 0.0) c2 = double_or_blank(card, nStart + 9, 'c2 %i' % nRepeated, 0.0) d1 = double_or_blank(card, nStart + 10, 'd1 %i' % nRepeated, 0.0) d2 = double_or_blank(card, nStart + 11, 'd2 %i' % nRepeated, 0.0) e1 = double_or_blank(card, nStart + 12, 'e1 %i' % nRepeated, 0.0) e2 = double_or_blank(card, nStart + 13, 'e2 %i' % nRepeated, 0.0) f1 = double_or_blank(card, nStart + 14, 'f1 %i' % nRepeated, 0.0) f2 = double_or_blank(card, nStart + 15, 'f2 %i' % nRepeated, 0.0) C1.append(c1) C2.append(c2) D1.append(d1) D2.append(d2) E1.append(e1) E2.append(e2) F1.append(f1) F2.append(f2) else: # YESA or NO, values MUST be omitted; remark 5 C1.append(None) C2.append(None) D1.append(None) D2.append(None) E1.append(None) E2.append(None) F1.append(None) F2.append(None) if len(XXB) > 1: assert min(XXB) == 0.0, 'min=%s, but should be 0.0\nxxb=%s' % (min(XXB), XXB) assert max(XXB) == 1.0, 'max=%s, but should be 1.0\nxxb=%s' % (max(XXB), XXB) # footer fields #: Shear stiffness factor K in K*A*G for plane 1. self.k1[i] = double_or_blank(card, x, 'k1', 1.0) #: Shear stiffness factor K in K*A*G for plane 2. self.k2[i] = double_or_blank(card, x + 1, 'k2', 1.0) #: Shear relief coefficient due to taper for plane 1. self.s1[i] = double_or_blank(card, x + 2, 's1', 0.0) #: Shear relief coefficient due to taper for plane 2. self.s2[i] = double_or_blank(card, x + 3, 's2', 0.0) #: non structural mass moment of inertia per unit length #: about nsm center of gravity at Point A. self.nsia[i] = double_or_blank(card, x + 4, 'nsia', 0.0) #: non structural mass moment of inertia per unit length #: about nsm center of gravity at Point B. self.nsib[i] = double_or_blank(card, x + 5, 'nsib', self.nsia) #: warping coefficient for end A. self.cwa[i] = double_or_blank(card, x + 6, 'cwa', 0.0) #: warping coefficient for end B. self.cwb[i] = double_or_blank(card, x + 7, 'cwb', self.cwa) #: y coordinate of center of gravity of #: nonstructural mass for end A. self.m1a[i] = double_or_blank(card, x + 8, 'm1a', 0.0) #: z coordinate of center of gravity of #: nonstructural mass for end A. self.m2a[i] = double_or_blank(card, x + 9, 'm2a', self.m1a) #: y coordinate of center of gravity of #: nonstructural mass for end B. self.m1b[i] = double_or_blank(card, x + 10, 'm1b', 0.0) #: z coordinate of center of gravity of #: nonstructural mass for end B. self.m2b[i] = double_or_blank(card, x + 11, 'm2b', self.m1b) #: y coordinate of neutral axis for end A. self.n1a[i] = double_or_blank(card, x + 12, 'n1a', 0.0) #: z coordinate of neutral axis for end A. self.n2a[i] = double_or_blank(card, x + 13, 'n2a', self.n1a) #: y coordinate of neutral axis for end B. self.n1b[i] = double_or_blank(card, x + 14, 'n1a', 0.0) #: z coordinate of neutral axis for end B. self.n2b[i] = double_or_blank(card, x + 15, 'n2b', self.n1b)