Method for converting HFSS project file into universal pre-processing file

By converting HFSS project files into general preprocessing files, the problem of incompatibility between software data formats is solved, and the HFSS project is automatically rebuilt in the shaking software, which improves design efficiency and robustness, and reduces manpower and material resources. waste.

CN119226231APending Publication Date: 2024-12-31UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411292752.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

There is a data format incompatibility between the domestically developed electromagnetic simulation software Shaking and HFSS software, which leads to difficulty in exchanging data for simulation projects between different software. Engineers need to re-establish the project, which consumes a lot of time and energy, and increases human errors. possibilities.

Method used

By converting HFSS project files into general preprocessing files, using VisualStudio programming software to import HFSS software engineering files, establish an overall management class, read and decompose file contents, and generate files such as SimulationMaterials.xml, SimulationModels.sat, and SimulationSettings.xml, etc. Implement automatic reconstruction project.

Benefits of technology

It improves the efficiency of rebuilding projects in different software, reduces human errors, significantly improves the credibility and consistency of simulation results, greatly reduces the time required to rebuild projects, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226231A_ABST
    Figure CN119226231A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of electromagnetic simulation design, and particularly relates to a method for converting an HFSS project file into a universal pre-processing file. The method comprises the following steps: firstly, importing an HFSS software engineering file of target electromagnetic simulation based on VisualStudio programming software; then extracting material information according to the keyword and generating a corresponding first pre-processing file for storing the material information; then, combining the extracted material information with model information extracted through keywords in the engineering file, establishing a model, storing the model information into an entity list, and generating a pre-processing file of a second storage model; then, extracting solution setting and boundary information by using keywords, and generating a corresponding third pre-processing file for storing boundary conditions and solution setting information; and finally, solving the three pre-processing files by using shaking light software to obtain a solving result of the target project file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electromagnetic simulation design, and in particular is a method for converting an HFSS engineering file into a universal pre-processing file. Background Art

[0002] As an important tool for modern engineering and scientific research, electromagnetic simulation goes hand in hand with theoretical analysis and experimental methods. Electronic equipment and systems will face various electromagnetic interferences during operation, which will cause system performance degradation, signal distortion, and even equipment failure, thus affecting their overall function and reliability. Because of the complexity of electromagnetic phenomena and its close relationship with system materials, geometry, etc. In order to solve or reduce various electromagnetic interference problems, traditional experimental testing methods are difficult to be widely used due to their high cost, long cycle and difficulty in adjusting parameters in real time. Electromagnetic simulation methods are low-cost, short-cycle and easy to optimize and adjust, which greatly improves design efficiency and product performance. Electromagnetic simulation can help engineers verify the electromagnetic performance of the system in various working environments and ensure electromagnetic compatibility and signal integrity. Therefore, fast and effective electromagnetic simulation technology is the key to the design of electronic equipment and systems.

[0003] There is a problem of incompatibility between the domestically developed electromagnetic simulation software Yaoguang and HFSS software, which makes it extremely difficult to exchange data for simulation projects between different software. There is currently no direct data exchange method to rebuild the project files in HFSS in Yaoguang software. Engineers need to rebuild the project from modeling, material settings, and solution settings. This will consume a lot of engineers' energy, greatly increase the time cost, and may introduce factors such as operational errors and parameter setting errors. By parsing the HFSS project files and automatically generating a universal pre-processing file, the project can be automatically rebuilt in the Yaoguang software, which not only improves work efficiency and reduces human errors, but also significantly improves the credibility and consistency of simulation results. Therefore, the development of a universal pre-processing file conversion method is a key step in the field of electromagnetic simulation, which helps to improve the efficiency and robustness of reconstructing projects in different software, break down barriers between software, and reduce waste of manpower and material resources. Summary of the invention

[0004] In view of the above problems or shortcomings, in order to solve the format incompatibility problem, the engineering files in the HFSS software can be quickly rebuilt in the Yaoguang software to improve the simulation design efficiency; the present invention provides a method for converting HFSS engineering files into general pre-processing files.

[0005] A method for converting an HFSS project file into a general pre-processing file comprises the following steps:

[0006] Step 1: Import the HFSS software engineering file of the target electromagnetic simulation based on VisualStudio programming software and establish an overall management class pSimulation.

[0007] The overall management class pSimulation includes the variable container m_mapProperties, the material management class m_pMaterialManager, the boundary condition management class m_pManagerBoundaries, the model management class m_pManagerModel, the simulation setting management class m_pManagerSolverSetting, the material information container m_mapMaterial, the entity list savelist and the solution type m_nSolutionType.

[0008] Step 2: Read the project file in step 1, read the variable name and corresponding value as a key-value pair, and store them in the variable container m_mapProperties.

[0009] Furthermore, after importing the project file, the variable name and the corresponding value are stored in the variable container m_mapProperties by searching the keyword VariableProp.

[0010] Step 3. Read the project file in step 1, and obtain the material content in the project file according to the keyword Material; decompose different materials with the material name as the index and store them as independent material files; read the stored material files in turn, obtain the material information, update the material information container m_mapMaterial, and generate the first pre-processing file SimulationMaterials.xml.

[0011] The material management class m_pMaterialManager contains an index container m_mapIndexMaterial with a unique identifier M_ID and a material base class as a key-value pair. The derived classes of the material base class include relative dielectric constant, relative magnetic permeability, volume conductivity, dielectric loss tangent, magnetic loss tangent, magnetic coercivity, thermal conductivity, mass density, specific heat capacity, Young's modulus, Poisson's ratio, thermal expansion coefficient, and thermal expansion coefficient reference temperature properties.

[0012] Furthermore, the specific method of obtaining material information is:

[0013] Create a std::vector container pMaterial of the material base class object, read the decomposed material files in turn, and store the corresponding data in the derived class instance of the corresponding material base class according to the keywords permittivity, permeability, conductivity, dielectric_loss_tangent, magnetic_loss_tangent, magnetic_coercivity, thermal_conductivity, mass_density, specific_heat, youngs_modulus, poissons_ratio and thermal_expansion_coeffcient, and update it to the container pMaterial. After all material files are read, update the container pMaterial to the material management class m_pMaterialManager, and update the material information container m_mapMaterial.

[0014] Step 4, read the project file in step 1, and obtain the relative coordinate system part in the project file according to the keyword CoordinateSystems; decompose different coordinate systems into independent relative coordinate system files according to the keyword Operation, read the decomposed relative coordinate system files in turn, obtain the coordinate system information, and generate a relative coordinate system information container m_mapRCS with the coordinate system operation unique identifier RCS_ID and the relative coordinate system displacement information trans as key-value pairs.

[0015] Step 5. Read the project file in step 1, establish a model ID information container tmapModel, and obtain the model part content in the project file according to the keywords ToplevelParts and OperandParts; decompose the modeling operation with the model name as the index, store it as independent model files, and store the corresponding unique identifier ID and model operation type in the model ID information container tmapModel.

[0016] The model management class m_pManagerModel contains a model information container m_mapModel with a unique identifier ID and a model base class as a key-value pair. The model base class contains the model name, unique identifier ID and model operation type. Different model operation types correspond to the following derived classes: model classes: Box, Cylinder, Sphere, Circle, Helix, Polyhedron, Polyline, Rectangle, Region and Torus; Boolean operation classes: Unite, Subtract, Imprint, Intersect and Split; other operation classes: Clone, Mirror, Rotate, Duplicate, Fillet and Sweep, etc. Each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair, for example, the index container of Box is m_mapBox.

[0017] Furthermore, the process of decomposing the modeling operation using the model name as the index is as follows:

[0018] The model part is decomposed using ToplevelParts and OperandParts as keywords, where ToplevelParts corresponds to the entity part that needs to be exported, and OperandParts corresponds to the object involved in the Boolean operation, which is deleted when the model is established and does not need to be exported.

[0019] Then perform a secondary decomposition with the keyword GeometryPart. GeometryPart contains two types of keywords: Attribute and Operation. Attribute contains the name and material information of the model, and Operation contains the unique identifier ID and the model operation type and related information. A GeometryPart part will contain multiple Operation keywords, which are decomposed according to the keyword Operation to obtain independent model files.

[0020] Step 6. Based on the model ID information container tmapModel and model file obtained in step 5, create a corresponding number of operation derived classes; read the decomposed model files in sequence according to the storage order, combine the variable container m_mapProperties, material information container m_mapMaterial and relative coordinate system information container m_mapRCS obtained in steps 2, 3 and 4, obtain the model information, and store it in the model information container m_mapModel and the corresponding derived class index container, such as the Box index container m_mapBox.

[0021] Furthermore, the process of storing the model information is as follows:

[0022] Read the decomposed model files in sequence, and enter the reading of the corresponding operation derived class by matching the unique identifier ID. Read the keyword Name = get the model name information; the keyword MaterialValue = get the material model information, index through the material information container m_mapMaterial, and get the unique identifier M_ID corresponding to the model material; ReferenceCoordSystemID = keyword get the reference coordinate system corresponding identifier RCS_ID, index through the relative coordinate system information container m_mapRCS, and get the relative coordinate system displacement information trans of the model; store the unique identifier ID and the read operation information in the model information container m_mapModel and the corresponding derived class index container.

[0023] Step 7, traverse the model information container m_mapModel in step 6, enter the corresponding modeling operation function according to the model operation type to generate the model and perform the unique feature mark m_ID on the model, save the information into the entity list savelist and generate the second pre-processing file SimulationModels.sat.

[0024] Furthermore, the model is established using the API function in 3D ACIS Modeler (ACIS), and the body, surface, edge, and point of the model are uniquely marked with m_ID respectively through ACIS attribute operation functions.

[0025] Step 8: Read the project file in step 1 and update the solution type m_nSolutionType according to the keyword SolutionType=.

[0026] Step 9. Read the project file in step 1, create a boundary ID information container tmapBoundaries, obtain the boundary condition part in the project file according to the keyword Boundaries, decompose different boundary conditions with the boundary name as the index, store different boundaries as independent boundary files, and store the corresponding operation unique identifier ID and boundary operation type in the boundary ID information container tmapBoundaries.

[0027] The boundary condition management class m_pManagerBoundaries contains an index container m_mapIndxBC with a unique identifier ID and a boundary base class as a key-value pair. The boundary base class contains the boundary name, boundary type, and face index list faceid. Different boundary types correspond to different derived classes, excitation classes: band port excitation, lumped port excitation, Floquet port excitation, and plane wave excitation; boundary classes: ideal electric wall, ideal magnetic wall, radiation boundary, finite conductor boundary, impedance boundary, master-slave boundary, ideal matching layer, and lumped RLC boundary. Each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair, for example, the index container for the radiation boundary is m_mapRadiation.

[0028] Step 10. Based on the boundary ID information container tmapBoundaries and boundary files obtained in step 9, create a corresponding number of derived classes; read in the decomposed boundary files in sequence, combine the variable container m_mapProperties and entity list savelist obtained in steps 2 and 7, obtain the boundary information, and update the boundary condition management class m_pManagerBoundaries.

[0029] The update process is as follows: read the decomposed boundary files in sequence, and enter the reading of the corresponding derived class by matching the unique identifier ID. Different boundary types require different boundary information to be read, and store the ID and the read boundary information in m_mapIndxBC and the corresponding derived class index container.

[0030] Step 11. Read the project file in step 1, obtain the simulation setting class part in the project file according to the keywords GeometryCore, SolveSetups and FarFieldSetups, and update the simulation setting management class m_pManagerSolverSetting; then combine the boundary condition information stored in the boundary condition management class m_pManagerBoundaries obtained in step 10 to generate the third pre-processing file SimulationSettings.xml.

[0031] The simulation setting management class m_pManagerSolverSetting contains unit class, setting class and simulation module class. The unit class contains distance unit and frequency unit; the setting class contains solution type, solution frequency, whether to sweep, maximum and minimum sweep frequency, number of sweep points, sweep type, grid adaptive error and maximum grid adaptive times solution settings; the simulation module class contains post-processing related parameters and far-field radiation sphere related parameters.

[0032] Step 12: Use the solver of Yaoguang software to call the three pre-processing files generated in step 3, step 7 and step 11 to solve and obtain the solution results.

[0033] In summary, the present invention generates a universal pre-processing file by reading the engineering file in HFSS and performs calculations in the Yaoguang software to realize the rapid reconstruction of the engineering in HFSS in the Yaoguang software. The generation process of the pre-processing file of the present invention is automated, and the time required is almost negligible. In contrast, engineers will spend a lot of time and energy to rebuild the engineering from scratch in terms of modeling, material settings, solution settings, etc. Therefore, the present invention provides an efficient method for converting the engineering files of HFSS software into universal pre-processing files, which greatly reduces the time required to rebuild the engineering, improves work efficiency, and promotes the design of electronic equipment and systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of the present invention;

[0035] Figure 2 is a model diagram of an embodiment;

[0036] Figure 3 Comparison chart of the results calculated in the embodiment and the results calculated by manual reconstruction engineering in Yaoguang software. DETAILED DESCRIPTION

[0037] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and embodiments.

[0038] A method for converting HFSS project files into pre-processing files, refer to Figure 1 , including the following steps:

[0039] Step 1: Import the HFSS software engineering file related to the target electromagnetic simulation based on the VisualStudio 2022 programming software, and establish an overall management class pSimulation. This embodiment takes the WR62 three-pole waveguide filter simulation in the HFSS instance library as an example, imports the engineering file, and establishes an overall management class pSimulation.

[0040] The overall management class pSimulation includes the variable container m_mapProperties, the material management class m_pMaterialManager, the boundary condition management class m_pManagerBoundaries, the model management class m_pManagerModel, the simulation setting management class m_pManagerSolverSetting, the material information container m_mapMaterial, the entity list savelist and the solution type m_nSolutionType.

[0041] Step 2: Read the project file in step 1, search for the keyword VariableProp, and store the variable name and corresponding value as a key-value pair into the variable container m_mapProperties.

[0042] Step 3. Read the project file in step 1, obtain the material content in the project file according to the keyword Material, decompose different materials with the material name as the index, and store them as independent material files; read the stored material files in turn, obtain the material information, update the material information container m_mapMaterial, and generate the first pre-processing file SimulationMaterials.xml of the XML document.

[0043] The material management class m_pMaterialManager contains an index container m_mapIndexMaterial with a unique identifier M_ID and a material base class as a key-value pair. The derived classes of the material base class include relative dielectric constant, relative magnetic permeability, volume conductivity, dielectric loss tangent, magnetic loss tangent, magnetic coercivity, thermal conductivity, mass density, specific heat capacity, Young's modulus, Poisson's ratio, thermal expansion coefficient, and thermal expansion coefficient reference temperature properties.

[0044] The specific steps to obtain material information are as follows: create a std::vector container pMaterial of the material base class object, read the decomposed material files in turn, and store the corresponding data in the derived class instance of the corresponding material base class according to the keywords permittivity=, permeability=, conductivity, dielectric_loss_tangent, magnetic_loss_tangent, magnetic_coercivity, thermal_conductivity, mass_density, specific_heat, youngs_modulus, poissons_ratio and thermal_expansion_coeffcient, and update it to the container pMaterial. After all material files are read, update the container pMaterial to the material management class m_pMaterialManager, and update the material information container m_mapMaterial.

[0045] Step 4, read the project file in step 1, obtain the relative coordinate system part in the project file according to the keyword CoordinateSystems, decompose different coordinate systems into independent relative coordinate system files according to the keyword Operation, read the decomposed relative coordinate system files in turn, obtain the coordinate system information, and generate a relative coordinate system information container m_mapRCS with the coordinate system operation unique identifier RCS_ID and the relative coordinate system displacement information trans as key-value pairs.

[0046] Step 5. Read the project file in step 1, establish a model ID information container tmapModel, and obtain the model part content in the project file according to the keywords ToplevelParts and OperandParts; decompose the modeling operation with the model name as the index, store it as independent model files, and store the corresponding unique identifier ID and model operation type in the model ID information container tmapModel.

[0047] The model management class m_pManagerModel contains a model information container m_mapModel with a unique identifier ID and a model base class as a key-value pair. The model base class contains the model name, unique identifier ID and model operation type. Different model operation types correspond to the following derived classes: model classes: Box, Cylinder, Sphere, Circle, Helix, Polyhedron, Polyline, Rectangle, Region and Torus; Boolean operation classes: Unite, Subtract, Imprint, Intersect and Split; other operation classes: Clone, Mirror, Rotate, Duplicate, Fillet and Sweep, etc. Each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair, for example, the index container of Box is m_mapBox.

[0048] The decomposition process is as follows:

[0049] The model part is decomposed using ToplevelParts and OperandParts as keywords, where ToplevelParts corresponds to the entity part that needs to be exported, and OperandParts corresponds to the object involved in the Boolean operation, which is deleted when the model is established and does not need to be exported.

[0050] Then perform a secondary decomposition with the keyword GeometryPart. GeometryPart contains two types of keywords: Attribute and Operation. Attribute contains the name and material information of the model, and Operation contains the unique identifier ID corresponding to the model operation and the model operation type and related information. A GeometryPart part will contain multiple Operation keywords, which are decomposed according to the keyword Operation to obtain independent model files.

[0051] Step 6. Based on the model ID information container tmapModel and model file obtained in step 5, create a corresponding number of operation derived classes; read the decomposed model files in sequence according to the storage order, combine the variable container m_mapProperties, material information container m_mapMaterial and relative coordinate system information container m_mapRCS obtained in steps 2, 3 and 4, obtain the model information, and store it in the model information container m_mapModel and the corresponding derived class index container, such as the Box index container m_mapBox.

[0052] The process of depositing information is as follows:

[0053] Read the decomposed model files in sequence, and enter the reading of the corresponding operation derived class by matching the unique identifier ID. Read the keyword Name = get the model name information; the keyword MaterialValue = get the material model information, index through the material information container m_mapMaterial, and get the unique identifier M_ID corresponding to the model material; ReferenceCoordSystemID = keyword get the reference coordinate system corresponding identifier RCS_ID, index through the relative coordinate system information container m_mapRCS, and get the relative coordinate system displacement information trans of the model; store the unique identifier ID and the read operation information in the model information container m_mapModel and the corresponding derived class index container.

[0054] This embodiment involves cuboid modeling, cylinder modeling, copying operations, chamfering operations, and merging and subtracting operations in Boolean operations. The cuboid model contains the following operation information: model operation type, relative coordinate system identifier, starting point coordinates, and length, width, and height. The cuboid model operation type, relative coordinate system identifier RCS_ID, starting point coordinates, and length, width, and height are obtained according to the OperationType=, ReferenceCoordSystemID=, XPosition=, YPosition=, ZPosition=, XSize=, YSize=, and ZSize= keywords. This information is stored in the cuboid class Box, and the unique identifier ID corresponding to the cuboid model and the Box class are used as key-value pairs to be stored in the model information container m_mapModel and the Box index container m_mapBox, respectively.

[0055] Step 7, traverse the model information container m_mapModel in step 6, enter the corresponding modeling operation function according to the model operation type to generate the model and perform the unique feature mark m_ID on the model, save the information into the entity list savelist and generate the second pre-processing file SimulationModels.sat.

[0056] The model is established using the API functions in 3D ACIS Modeler (ACIS), and the body, surface, edge, and point of the model are uniquely marked with m_ID through ACIS attribute operation functions.

[0057] According to this embodiment, the engineering file generation model is as follows Figure 2 shown.

[0058] Step 8: Read the project file in step 1 and update the solution type m_nSolutionType according to the keyword SolutionType=.

[0059] Step 9. Read the project file in step 1, create a boundary ID information container tmapBoundaries, obtain the boundary condition part in the project file according to the keyword Boundaries, decompose different boundary conditions with the boundary name as the index, store different boundaries as independent boundary files, and store the corresponding operation unique identifier ID and boundary operation type in the boundary ID information container tmapBoundaries.

[0060] The boundary condition management class m_pManagerBoundaries contains an index container m_mapIndxBC with a unique identifier ID and a boundary base class as a key-value pair. The boundary base class contains the boundary name, boundary type, and face index list faceid. Different boundary types correspond to different derived classes, excitation classes: band port excitation, lumped port excitation, Floquet port excitation, and plane wave excitation; boundary classes: ideal electric wall, ideal magnetic wall, radiation boundary, finite conductor boundary, impedance boundary, master-slave boundary, ideal matching layer, and lumped RLC boundary. Each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair, for example, the index container for the radiation boundary is m_mapRadiation.

[0061] Step 10. Based on the boundary ID information container tmapBoundaries and boundary file obtained in step 9, create a corresponding number of derived classes, read in the decomposed boundary files in sequence, combine the variable container m_mapProperties and entity list savelist obtained in steps 2 and 7, obtain the boundary information, and update the boundary condition management class m_pManagerBoundaries.

[0062] The update process is as follows:

[0063] Read the decomposed boundary files in sequence, and enter the reading of the corresponding derived class by matching the unique identifier ID. Different boundary types require different boundary information to be read, and store the ID and the read boundary information in m_mapIndxBC and the corresponding derived class index container.

[0064] This embodiment involves the band port excitation boundary operation. The band port excitation contains the following information: the unique mark m_ID corresponding to the surface / body to which the boundary is attached, whether it is normalized, the normalized value, the Deembed setting, the Deembed distance, the amplitude and its unit, the phase value and its unit, and the mode list m_stModes of the band port, which includes the calculation method of the characteristic impedance, whether there is an integral line and the starting and ending points of the integral line. Obtain m_ID according to the Faces keyword, find the corresponding face by traversing the entity list savelis and update the face index list faceid; obtain Deembed related parameters through the DoDeembed= and DeembedDist= keywords; obtain whether there is an integral line through the UseIntLine= keyword, obtain the starting and ending points of the integral line through the PositionType= and UParam= keywords; obtain the amplitude and phase value size and unit through the Magnitude= and Phase= keywords. Store the acquired information in the band port excitation class, and store the ID and the information in the band port excitation class as key-value pairs in m_mapIndxBC and the index container m_mapWaveport of the wave port excitation.

[0065] Step 11. Read the project file in step 1, obtain the simulation setting class part in the project file according to the keywords GeometryCore, SolveSetups and FarFieldSetups, update the simulation setting management class m_pManagerSolverSetting, and then combine the boundary condition information stored in the boundary condition management class m_pManagerBoundaries obtained in step 10 to generate the third pre-processing file SimulationSettings.xml.

[0066] The simulation setting management class m_pManagerSolverSetting contains unit class, setting class and simulation module class. The unit class contains distance unit and frequency unit; the setting class contains solution type, solution frequency, whether to sweep, maximum and minimum sweep frequency, number of sweep points, sweep type, grid adaptive error and maximum grid adaptive times solution settings; the simulation module class contains post-processing related parameters and far-field radiation sphere related parameters.

[0067] Step 12: Use the solver of Yaoguang software to call the three pre-processing files generated in step 3, step 7 and step 11 to solve and obtain the solution results.

[0068] Effect verification: Check the solution results in the Yaoguang solver in step 12, and compare and analyze them with the solution results obtained after direct reconstruction in Yaoguang. Figure 3It is a comparison chart of the calculation results obtained by automatically generating the pre-processing file based on the embodiment of the present invention and the calculation results of the manual reconstruction project in the Yaoguang software.

[0069] By comparison Figure 3 It can be seen that the result obtained by calculating the pre-processing file generated by the present invention as input in the Yaoguang software is consistent with the result obtained by calculating the pre-processing file generated by artificial reconstruction. This shows that the pre-processing file generated by the present invention after reading the HFSS software engineering file is correct. The generation process of the pre-processing file of the present invention is automatic, and the required time is almost negligible. In contrast, engineers will spend a lot of time and energy to rebuild the engineering from modeling. Therefore, the present invention provides a method for efficiently converting the engineering file of HFSS software into pre-processing file, which greatly reduces the time required for rebuilding the engineering and does not have the error during human operation, thereby improving work efficiency and robustness.

Claims

1. A method for converting an HFSS engineering file into a general pre-processing file, characterized in that: The following steps are involved: Step 1: Import the HFSS software engineering file of the target electromagnetic simulation based on VisualStudio programming software and establish an overall management class pSimulation; The overall management class pSimulation includes the variable container m_mapProperties, the material management class m_pMaterialManager, the boundary condition management class m_pManagerBoundaries, the model management class m_pManagerModel, the simulation setting management class m_pManagerSolverSetting, the material information container m_mapMaterial, the entity list savelist and the solution type m_nSolutionType; Step 2: Read the project file in step 1, read the variable name and the corresponding value as a key-value pair, and store them in the variable container m_mapProperties; Step 3: Read the project file in step 1, and obtain the material content in the project file according to the keyword Material; Decompose different materials using material names as indexes and store them as independent material files; read the stored material files in sequence, obtain material information, update the material information container m_mapMaterial, and generate the first pre-processing file SimulationMaterials.xml; The material management class m_pMaterialManager contains an index container m_mapIndexMaterial with a unique identifier M_ID and a material base class as a key-value pair. The derived classes of the material base class include relative permittivity, relative magnetic permeability, bulk conductivity, dielectric loss tangent, magnetic loss tangent, magnetic coercivity, thermal conductivity, mass density, specific heat capacity, Young's modulus, Poisson's ratio, thermal expansion coefficient, and thermal expansion coefficient reference temperature attributes; Step 4, read the project file in step 1, and obtain the relative coordinate system part in the project file according to the keyword CoordinateSystems; decompose different coordinate systems into independent relative coordinate system files according to the keyword Operation, read the decomposed relative coordinate system files in turn, obtain the coordinate system information, and generate a relative coordinate system information container m_mapRCS with the coordinate system operation unique identifier RCS_ID and the relative coordinate system displacement information trans as key-value pairs; Step 5: Read the project file in step 1, create a model ID information container tmapModel, obtain the model content in the project file according to the keywords ToplevelParts and OperandParts; decompose the modeling operation with the model name as the index, store it as independent model files, and store the corresponding unique identifier ID and model operation type in the model ID information container tmapModel; The model management class m_pManagerModel contains a model information container m_mapModel with a unique identifier ID and a model base class as a key-value pair; the model base class contains the model name, unique identifier ID and model operation type. Different model operation types correspond to the following derived classes: model classes: Box, Cylinder, Sphere, Circle, Helix, Polyhedron, Polyline, Rectangle, Region and Torus; Boolean operation classes: Unite, Subtract, Imprint, Intersect and Split; other operation classes: Clone, Mirror, Rotate, Duplicate, Fillet and Sweep; each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair; Step 6: Based on the model ID information container tmapModel and the model file obtained in step 5, create a corresponding number of operation derived classes; read the decomposed model files in sequence according to the storage order, combine the variable container m_mapProperties, material information container m_mapMaterial and relative coordinate system information container m_mapRCS obtained in steps 2, 3 and 4, obtain the model information, and store it in the model information container m_mapModel and the corresponding derived class index container; Step 7, traverse the model information container m_mapModel in step 6, enter the corresponding modeling operation function according to the model operation type to generate the model and perform a unique feature mark m_ID on the model, save the information into the entity list savelist and generate the second pre-processing file SimulationModels.sat; Step 8, read the project file in step 1, and update the solution type m_nSolutionType according to the keyword SolutionType=; Step 9, read the project file in step 1, create a boundary ID information container tmapBoundaries, obtain the boundary condition part in the project file according to the keyword Boundaries, decompose different boundary conditions with the boundary name as the index, store different boundaries as independent boundary files, and store the corresponding operation unique identifier ID and boundary operation type in the boundary ID information container tmapBoundaries; The boundary condition management class m_pManagerBoundaries contains an index container m_mapIndxBC with a unique identifier ID and a boundary base class as a key-value pair; the boundary base class contains the boundary name, boundary type and face index list faceid. Different boundary types correspond to different derived classes, excitation classes: band port excitation, lumped port excitation, Floquet port excitation and plane wave excitation; boundary classes: ideal electric wall, ideal magnetic wall, radiation boundary, finite conductor boundary, impedance boundary, master-slave boundary, ideal matching layer and lumped RLC boundary; each derived class corresponds to an index container with a unique identifier ID and a derived class as a key-value pair; Step 10: Based on the boundary ID information container tmapBoundaries and boundary files obtained in step 9, create a corresponding number of derived classes; read the decomposed boundary files in sequence, combine the variable container m_mapProperties and entity list savelist obtained in steps 2 and 7, obtain boundary information, and update the boundary condition management class m_pManagerBoundaries; Step 11, read the project file in step 1, obtain the simulation setting class part in the project file according to the keywords GeometryCore, SolveSetups and FarFieldSetups, and update the simulation setting management class m_pManagerSolverSetting; then combine the boundary condition information stored in the boundary condition management class m_pManagerBoundaries obtained in step 10 to generate the third pre-processing file SimulationSettings.xml; The simulation setting management class m_pManagerSolverSetting contains unit class, setting class and simulation module class; the unit class contains distance unit and frequency unit; the setting class contains solution type, solution frequency, whether to sweep, maximum and minimum sweep frequency, number of sweep points, sweep type, grid adaptive error and maximum grid adaptive times solution settings; the simulation module class contains post-processing related parameters and far-field radiation sphere related parameters; Step 12: Use the solver of Yaoguang software to call the three pre-processing files generated in step 3, step 7 and step 11 to solve and obtain the solution results.

2. The method for converting a HFSS project file into a general pre-processing file as claimed in claim 1, characterized in that: The step 2 searches for the keyword VariableProp and stores the variable name and the corresponding value into the variable container m_mapProperties.

3. The method for converting a HFSS project file into a general pre-processing file as claimed in claim 1, characterized in that: The specific method of obtaining material information in step 3 is: create a std::vector container pMaterial of the material base class object, read in the decomposed material files in sequence, and according to the keywords permittivity=, permeability=, conductivity, dielectric_loss_tangent, magnetic_loss_tangent, magnetic_coercivity, thermal_conductivity, mass_density, specific_heat, youngs_modulus, poissons_ratio and thermal_expansion_coeffcient, store the corresponding data in the derived class instance of the corresponding material base class, and update it to the container pMaterial; after all material files are read, update the container pMaterial to the material management class m_pMaterialManager, and update the material information container m_mapMaterial.

4. The method for converting a HFSS project file into a general pre-processing file as claimed in claim 1, characterized in that: The specific process of decomposing the modeling operation using the model name as an index in step 5 is as follows: The model part is decomposed once using ToplevelParts and OperandParts as keywords, where ToplevelParts corresponds to the entity part that needs to be exported, and OperandParts corresponds to the object involved in the Boolean operation, which is deleted when the model is established and does not need to be exported; Then perform a secondary decomposition with the keyword GeometryPart. GeometryPart contains two types of keywords: Attribute and Operation. Attribute contains the name and material information of the model, and Operation contains the unique identifier ID and the model operation type and related information. A GeometryPart part will contain multiple Operation keywords, which are decomposed according to the keyword Operation to obtain independent model files.

5. The method for converting a HFSS project file into a general pre-processing file as claimed in claim 1, characterized in that: The specific process of storing the model information in step 6 is as follows: read the decomposed model files in sequence, and enter the reading of the corresponding operation derived class by matching the unique identifier ID; read the keyword Name = to obtain the model name information; the keyword MaterialValue = to obtain the material model information, index through the material information container m_mapMaterial, and obtain the unique identifier M_ID corresponding to the model material; ReferenceCoordSystemID = keyword to obtain the reference coordinate system corresponding identifier RCS_ID, index through the relative coordinate system information container m_mapRCS, and obtain the relative coordinate system displacement information trans of the model; store the unique identifier ID and the read operation information into the model information container m_mapModel and the corresponding derived class index container.

6. The method for converting a HFSS engineering file into a general pre-processing file as claimed in claim 1, characterized in that: In step 7, the model is established using the API function in the 3D ACIS Modeler, and the body, surface, edge, and point of the model are uniquely marked with m_ID respectively through the ACIS attribute operation function.

7. The method for converting a HFSS engineering file into a general pre-processing file as claimed in claim 1, characterized in that: The update process in step 10 is: read the decomposed boundary files in sequence, and enter the reading of the corresponding derived class according to the matching of the unique identifier ID; different boundary types require different boundary information to be read, and the ID and the read boundary information are stored in m_mapIndxBC and the corresponding derived class index container.