Beispiel #1
0
 def test_renderer_instanitate_qansys_renderer(self):
     """Test instantiation of QAnsysRenderer in ansys_renderer.py"""
     design = designs.DesignPlanar()
     try:
         QAnsysRenderer(design)
     except Exception:
         self.fail("QAnsysRenderer() failed")
Beispiel #2
0
    def test_renderer_qansys_renderer_options(self):
        """Test that defaults in QAnsysRenderer were not accidentally changed."""
        design = designs.DesignPlanar()
        renderer = QAnsysRenderer(design)
        options = renderer.default_options

        self.assertEqual(len(options), 14)
        self.assertEqual(options['Lj'], '10nH')
        self.assertEqual(options['Cj'], 0)
        self.assertEqual(options['_Rj'], 0)
        self.assertEqual(options['max_mesh_length_jj'], '7um')
        self.assertEqual(options['project_path'], None)
        self.assertEqual(options['project_name'], None)
        self.assertEqual(options['design_name'], None)
        self.assertEqual(options['ansys_file_extension'], '.aedt')
        self.assertEqual(options['x_buffer_width_mm'], 0.2)
        self.assertEqual(options['y_buffer_width_mm'], 0.2)
        self.assertEqual(options['wb_threshold'], '400um')
        self.assertEqual(options['wb_offset'], '0um')
        self.assertEqual(options['wb_size'], 5)

        self.assertEqual(len(options['plot_ansys_fields_options']), 13)
        self.assertEqual(options['plot_ansys_fields_options']['name'],
                         "NAME:Mag_E1")
        self.assertEqual(
            options['plot_ansys_fields_options']['UserSpecifyName'], '0')
        self.assertEqual(
            options['plot_ansys_fields_options']['UserSpecifyFolder'], '0')
        self.assertEqual(options['plot_ansys_fields_options']['QuantityName'],
                         "Mag_E")
        self.assertEqual(options['plot_ansys_fields_options']['PlotFolder'],
                         "E Field")
        self.assertEqual(
            options['plot_ansys_fields_options']['StreamlinePlot'], "False")
        self.assertEqual(
            options['plot_ansys_fields_options']['AdjacentSidePlot'], "False")
        self.assertEqual(options['plot_ansys_fields_options']['FullModelPlot'],
                         "False")
        self.assertEqual(options['plot_ansys_fields_options']['IntrinsicVar'],
                         "Phase=\'0deg\'")
        self.assertEqual(
            options['plot_ansys_fields_options']['PlotGeomInfo_0'], "1")
        self.assertEqual(
            options['plot_ansys_fields_options']['PlotGeomInfo_1'], "Surface")
        self.assertEqual(
            options['plot_ansys_fields_options']['PlotGeomInfo_2'],
            "FacesList")
        self.assertEqual(
            options['plot_ansys_fields_options']['PlotGeomInfo_3'], "1")
Beispiel #3
0
    def test_renderer_ansys_renderer_element_table_data(self):
        """Test element_table_data in QAnsysRenderer."""
        design = designs.DesignPlanar()
        renderer = QAnsysRenderer(design)
        etd = renderer.element_table_data

        self.assertEqual(len(etd), 2)
        self.assertEqual(len(etd['path']), 1)
        self.assertEqual(len(etd['junction']), 4)

        self.assertEqual(etd['path']['wire_bonds'], False)
        self.assertEqual(etd['junction']['inductance'], '10nH')
        self.assertEqual(etd['junction']['capacitance'], 0)
        self.assertEqual(etd['junction']['resistance'], 0)
        self.assertEqual(etd['junction']['mesh_kw_jj'], 7e-06)
Beispiel #4
0
 def test_renderer_ansys_renderer_name(self):
     """Test name in QAnsysRenderer."""
     design = designs.DesignPlanar()
     renderer = QAnsysRenderer(design)
     self.assertEqual(renderer.name, 'ansys')
Beispiel #5
0
 def test_renderer_ansys_renderer_name_delim(self):
     """Test NAME_DELIM in QAnsysRenderer."""
     design = designs.DesignPlanar()
     renderer = QAnsysRenderer(design)
     self.assertEqual(renderer.NAME_DELIM, '_')