Exemplo n.º 1
0
    def __init__(self, tokenizer):
        dataRecords = [
            Record([
                Field(format='1I10', name='node_label'),
                Field(format='1I10', name='export_coordinate_system'),
                Field(format='1I10', name='displacement_coordinate_system'),
                Field(format='1I10', name='color')
            ]),
            Record([Field(format='1P3D25.16', name='coordinate')])
        ]

        DataSet.__init__(self, 2411, [], dataRecords, tokenizer)
        self.name = 'Nodes - Double Precision'
Exemplo n.º 2
0
 def __init__(self, tokenizer):
     definitionRecords = [
       Record([Field(format='80A1', name='model_file_name')])
     , Record([Field(format='80A1', name='model_file_description')])
     , Record([Field(format='80A1', name='application_created_db')])
     , Record([
           Field(format='10A1', name='date_db_created')
         , Field(format='1I10', name='time_db_created')
         , Field(format='1I10', name='db_version')
         , Field(format='1I10', name='db_subversion')
         , Field(format='1I10', name='file_type', options=FileTypeOptions)
       ])
     , Record([
           Field(format='10A1', name='date_last_saved')
         , Field(format='10A1', name='time_last_saved')
       ])
     , Record([Field(format='80A1', name='application_created_file')])
     , Record([   
           Field(format='10A1', name='date_file_created')
         , Field(format='10A1', name='time_file_created')
         #Below are in the html but not in the record we have
         #, Field(int,  5, 'release_wrote_file', '')
         #, Field(int,  5, 'version', '')
         #, Field(int,  5, 'host_id', '')
         #, Field(int,  5, 'test_id', '')
         #, Field(int,  5, 'release_counter_per_host', '')
       ])
     ]
     
     DataSet.__init__(self, 151, definitionRecords, [], tokenizer)
     self.name = 'Header'
Exemplo n.º 3
0
    def __init__(self, tokenizer):
        dataRecords = [
            Record([
                Field(format='1I10', name='element_label'),
                Field(format='1I10', name='fe_descriptor_id'),
                Field(format='1I10', name='physical_property_table_number'),
                Field(format='1I10', name='material_property_table_number'),
                Field(format='1I10', name='color'),
                Field(format='1I10', name='number_of_nodes')
            ])
            #TODO: this section from number of nodes on elements and fe_descriptor id
            ,
            Record([Field(format='1P3I10', name='orientation')]),
            Record([Field(format='1P2I10', name='nodes')])
        ]

        DataSet.__init__(self, 2412, [], dataRecords, tokenizer)
        self.name = 'Elements'
Exemplo n.º 4
0
    def __init__(self, tokenizer):
        definitionRecords = [
            Record([
                Field(format='1I10',
                      name='units_code',
                      options=UnitsCodeOptions),
                Field(format='20A1', name='units_desc'),
                Field(format='1I10',
                      name='temperature_mode',
                      options=TemperatureModeOptions)
            ]),
            Record([
                Field(format='1D25.17', name='length'),
                Field(format='1D25.17', name='force'),
                Field(format='1D25.17', name='temperature'),
                Field(format='1D25.17', name='temperature_offset')
            ])
        ]

        DataSet.__init__(self, 164, definitionRecords, [], tokenizer)
        self.name = 'Units'
Exemplo n.º 5
0
    def read_definition(self):
        '''
        '''
        values = DataSet.read_definition(self)

        records = []
        if values.dataset.location == 1:  #Data At Nodes
            records.append(Record([Field(format='1E13.5',
                                         name='node_number')]))
            fields = []

            if values.data_type == 5:  #Single Precision, Complex
                format = 'C13.5'
            if values.data_characteristic == 3:  #3 * Translation + 3 * Rotation
                format = 'P3' + format
                fields.append(Field(format=format, name='translation'))
                fields.append(Field(format=format, name='rotation'))

            if len(fields) > 0:
                records.append(Record(fields))

        self.data_records = records
        return values
Exemplo n.º 6
0
 def read_definition(self):
     '''Data record format of this data set depends on two fields in definition:
        1. Record 7.ordinate_data_type:
             2 - real, single precision
             4 - real, double precision
             5 - complex, single precision
             6 - complex, double precision
        2. Record 7. abscissa_spacing:
             0 - uneven
             1 - even (no abscissa values stored)
             
                       Ordinate            Abscissa
          Case     Type     Precision     Spacing       Format
        -------------------------------------------------------------
            1      real      single        even         6E13.5       ? 1
            2      real      single       uneven        6E13.5       ? 2
            3     complex    single        even         6E13.5       ? 2
            4     complex    single       uneven        6E13.5       ? 3
            5      real      double        even         4E20.12      ? 1
            6      real      double       uneven     2(E13.5,E20.12) ? 1
            7     complex    double        even         4E20.12      ? 2
            8     complex    double       uneven      E13.5,2E20.12    OK
        --------------------------------------------------------------
     '''
     values = DataSet.read_definition(self)
     fields = []
     if values.data.abscissa_spacing == 0:
         fields.append(Field(format='1E13.5', name='abscissa'))
     if  values.data.ordinate_data_type == 2:
         fields.append(Field(format='1E13.5', name='value'))
     elif values.data.ordinate_data_type == 4:
         fields.append(Field(format='1E20.12', name='value'))
     elif values.data.ordinate_data_type == 5:
         fields.append(Field(format='C13.5', name='value'))
     elif values.data.ordinate_data_type == 6:
         fields.append(Field(format='C20.12', name='value'))
     
     self.data_records = [Record(fields)]
     
     if 0:
         print '\n'
         for v in values: 
             print v
             for k in values[v]:
                 print '   ', k, '=', values[v][k]
         
     return values
Exemplo n.º 7
0
 def __init__(self, tokenizer):
     definitionRecords = [
         Record([Field(format='1I10', name='label')], 'dataset'),
         Record([Field(format='40A2', name='name')], 'dataset'),
         Record([
             Field(format='1I10',
                   name='location',
                   options=DataSetLocationOptions)
         ], 'dataset'),
         Record([Field(format='40A2', name=1)], 'id_lines'),
         Record([Field(format='40A2', name=2)], 'id_lines'),
         Record([Field(format='40A2', name=3)], 'id_lines'),
         Record([Field(format='40A2', name=4)], 'id_lines'),
         Record([Field(format='40A2', name=5)], 'id_lines'),
         Record([  #Record 9
             Field(format='1I10',
                   name='model_type',
                   options=ModelTypeOptions),
             Field(format='1I10',
                   name='analysis_type',
                   options=AnalysisTypeOptions),
             Field(format='1I10',
                   name='data_characteristic',
                   options=DataCharacteristicOptions),
             Field(format='1I10',
                   name='result_type',
                   options=ResultTypeOptions),
             Field(format='1I10', name='data_type',
                   options=DataTypeOptions),
             Field(format='1I10', name='number_of_data_values')
         ]),
         Record([  #Record 10
             Field(format='1I10', name='design_set_id'),
             Field(format='1I10', name='iteration_number'),
             Field(format='1I10', name='solution_set_id'),
             Field(format='1I10', name='boundary_condition'),
             Field(format='1I10', name='load_set'),
             Field(format='1I10', name='mode_number'),
             Field(format='1I10', name='time_stamp_number'),
             Field(format='1I10', name='frequency_number')
         ]),
         Record([  #Record 11, Doc says 8 values but only two explained.
             Field(format='1I10', name='creation_option'),
             Field(format='1I10', name='number_retained1'),
             Field(format='1I10', name='number_retained2'),
             Field(format='1I10', name='number_retained3'),
             Field(format='1I10', name='number_retained4'),
             Field(format='1I10', name='number_retained5'),
             Field(format='1I10', name='number_retained6'),
             Field(format='1I10', name='number_retained7')
         ]),
         Record([  #Record 12
             Field(format='1E13.5', name='time'),
             Field(format='1E13.5', name='frequency'),
             Field(format='1E13.5', name='eigenvalue'),
             Field(format='1E13.5', name='modal_mass'),
             Field(format='1E13.5', name='viscous_damping_ratio'),
             Field(format='1E13.5', name='hysteretic_damping_ratio')
         ]),
         Record([  #Record 13
             Field(format='1E13.5', name='eigenvalue_re'),
             Field(format='1E13.5', name='eigenvalue_im'),
             Field(format='1E13.5', name='modalA_re'),
             Field(format='1E13.5', name='modalA_im'),
             Field(format='1E13.5', name='modalB_re'),
             Field(format='1E13.5', name='modalB_im')
         ])
     ]
     DataSet.__init__(self, 2414, definitionRecords, [], tokenizer)
     self.name = 'Analysis Data'
Exemplo n.º 8
0
 def __init__(self, tokenizer):
     definitionRecords = [
           Record([Field(format='80A1', name=1)], 'id_lines')
         , Record([Field(format='80A1', name=2)], 'id_lines')
         , Record([Field(format='80A1', name=3)], 'id_lines')
         , Record([Field(format='80A1', name=4)], 'id_lines')
         , Record([Field(format='80A1', name=5)], 'id_lines')
         , Record(name='dof', fields=[ #Record 6:     Format(2(I5,I10),2(1X,10A1,I10,I4))
               Field(format='1I5' , name='function_type', options= FunctionTypeOptions)
             , Field(format='1I10', name='function_id')
             , Field(format='1I5' , name='sequence_number')
             , Field(format='1I10', name='load_case_id', options=LoadCaseIDOptions)
             , Field(format='1X')
             , Field(format='10A1', name='response_entity_name')
             , Field(format='1I10', name='response_node')
             , Field(format='1I4' , name='response_direction', options=ResponseDirectionOptions)
             , Field(format='1X')
             , Field(format='10A1', name='reference_entity_name')
             , Field(format='1I10', name='reference_node')
             , Field(format='1I4' , name='reference_direction', options=ResponseDirectionOptions)
                  ])
         , Record(name='data', fields=[ #Record 7:     Format(3I10,3E13.5)
                       Field(format='1I10'  , name='ordinate_data_type', options=OrdinateDataTypeOptions)
                     , Field(format='1I10'  , name='number_of_data_points')
                     , Field(format='1I10'  , name='abscissa_spacing', options=AbscissaSpacingOptions)
                     , Field(format='1E13.5', name='abscissa_minimum')
                     , Field(format='1E13.5', name='abscissa_increment')
                     , Field(format='1E13.5', name='z_axis_value')
                  ])
         , Record(name='abscissa', fields=[ #Record 8:     Format(I10,3I5,2(1X,20A1))
                       Field(format='1I10', name='data_type', options=AbscissaDataTypeOptions)
                     , Field(format='1I5' , name='length_units_exponent')
                     , Field(format='1I5' , name='force_units_exponent')
                     , Field(format='1I5' , name='temperature_units_exponent')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_label')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_units_label')
                  ])
         , Record(name='ordinate_numerator', fields=[ #Record 9:     Format(I10,3I5,2(1X,20A1))
                       Field(format='1I10', name='data_type', options=AbscissaDataTypeOptions)
                     , Field(format='1I5' , name='length_units_exponent')
                     , Field(format='1I5' , name='force_units_exponent')
                     , Field(format='1I5' , name='temperature_units_exponent')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_label')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_units_label')
                  ])
         , Record(name='ordinate_denominator', fields=[ #Record 10:    Format(I10,3I5,2(1X,20A1))
                       Field(format='1I10', name='data_type', options=AbscissaDataTypeOptions)
                     , Field(format='1I5' , name='length_units_exponent')
                     , Field(format='1I5' , name='force_units_exponent')
                     , Field(format='1I5' , name='temperature_units_exponent')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_label')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_units_label')
                  ])
         , Record(name='z_axis', fields=[ #Record 11:    Format(I10,3I5,2(1X,20A1))
                       Field(format='1I10', name='data_type')
                     , Field(format='1I5' , name='length_units_exponent')
                     , Field(format='1I5' , name='force_units_exponent')
                     , Field(format='1I5' , name='temperature_units_exponent')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_label')
                     , Field(format='1X')
                     , Field(format='20A1', name='axis_units_label')
                  ])
     ]
     DataSet.__init__(self, 58, definitionRecords, [], tokenizer)
     self.name = 'Function at Nodal DOF'