diff --git a/io/iovabs.py b/io/iovabs.py index 151e96b..9908a58 100644 --- a/io/iovabs.py +++ b/io/iovabs.py @@ -242,6 +242,8 @@ def readVABSOutHomo(fn, scrnout=True): keywordsIndex['sc'] = lineNumber if 'Mass Per Unit Span' in line: sm.density = float(line.split('=')[-1].strip()) + #old dic method to save density + sm.eff_props[1]['density'] = float(line.split('=')[-1].strip()) if 'Classical Stiffness Matrix' in line: keywordsIndex['csm'] = lineNumber if 'Classical Flexibility Matrix' in line: @@ -300,13 +302,21 @@ def readVABSOutHomo(fn, scrnout=True): sm.shear_center = [ float(linesRead[ln + 3].split()[-1]), float(linesRead[ln + 4].split()[-1]) ] - + #old dic method to save shear center + sm.eff_props[1]['shearcenter'] = [ + float(linesRead[ln + 3].split()[-1]), float(linesRead[ln + 4].split()[-1]) + ] ln = keywordsIndex['mass'] sm.mass_origin = utl.textToMatrix(linesRead[ln + 3:ln + 9]) + #old dic method to save mass origin + sm.eff_props[1]['mass']['origin'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) + try: ln = keywordsIndex['massatcenter'] sm.mass_mc = utl.textToMatrix(linesRead[ln + 3:ln + 9]) + #old dic method to save mass center + sm.eff_props[1]['mass']['masscenter'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) except KeyError: sm.mass_mc = sm.mass_origin @@ -316,6 +326,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['vsm'] sm.stiffness_refined = utl.textToMatrix(linesRead[ln + 3:ln + 8]) + #old dic to save valsov stiffness matrix + sm.eff_props[1]['stiffness']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 8]) except KeyError: if scrnout: print('No Vlasov stiffness matrix found.') @@ -324,6 +336,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['vfm'] sm.compliance_refined = utl.textToMatrix(linesRead[ln + 3:ln + 8]) + #old dic to save valsov compliance matrix + sm.eff_props[1]['compliance']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 8]) except KeyError: if scrnout: print('No Vlasov flexibility matrix found.') @@ -367,6 +381,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['csm'] sm.stiffness = utl.textToMatrix(linesRead[ln + 3:ln + 7]) + #old dic method to save classical stiffness + sm.eff_props[1]['stiffness']['classical'] = utl.textToMatrix(linesRead[ln + 3:ln + 7]) except KeyError: if scrnout: print('No Classical stiffness matrix found.') @@ -376,6 +392,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['cfm'] sm.compliance = utl.textToMatrix(linesRead[ln + 3:ln + 7]) + #old dic method to save classical compliance + sm.eff_props[1]['compliance']['classical'] = utl.textToMatrix(linesRead[ln + 3:ln + 7]) except KeyError: if scrnout: print('No Classical flexibility matrix found.') @@ -385,7 +403,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['tsm'] sm.stiffness_refined = utl.textToMatrix(linesRead[ln + 3:ln + 9]) -# sm.eff_props[1]['stiffness']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) + #old dic method to save refined stiffness matrix + sm.eff_props[1]['stiffness']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) except KeyError: if scrnout: print('No timoshenko stiffness matrix found.') @@ -394,7 +413,8 @@ def readVABSOutHomo(fn, scrnout=True): try: ln = keywordsIndex['tfm'] sm.compliance_refined = utl.textToMatrix(linesRead[ln + 3:ln + 9]) -# sm.eff_props[1]['compliance']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) + #old dic method to save refined compliance matrix + sm.eff_props[1]['compliance']['refined'] = utl.textToMatrix(linesRead[ln + 3:ln + 9]) except KeyError: if scrnout: print('No timoshenko flexibility matrix found.')