CN-116775018-B - Method for realizing universal code conversion from weather certificate to program in wind tunnel test
Abstract
The invention discloses a method for realizing universal code conversion from a balance certificate to a program in a wind tunnel test, which utilizes the program to automatically read a Word balance certificate, searches information such as a bridge combination, a coefficient table and the like in the balance certificate, automatically generates a C language code for balance load calculation according to a balance formula algorithm, and is directly used when a data processing program calculates the load. The method realizes the one-key conversion from the balance certificate to the program calling code, solves the problems of low efficiency and high possibility of error caused by manual input of a large number of balance formula coefficients in the past, greatly improves the test efficiency and ensures the reliability of the calculation result.
Inventors
- YUE TINGRUI
- LIU ZHONGHUA
Assignees
- 中国空气动力研究与发展中心低速空气动力研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20230713
Claims (6)
- 1. The method for converting the weather certificate into the program universal code in the wind tunnel test is characterized by comprising the following steps of: s1, calling a control, and reading text information of a balance certificate; s2, searching information in the text information and extracting the information according to the keyword positioning starting position, wherein the extracting step comprises the following steps: A1, positioning a starting position according to a balance coefficient table, extracting coefficient table information from text information and generating an electronic coefficient table; A2, positioning a starting position according to the relation between each component signal and each bridge output signal, and extracting component group bridge information from the text information; A3, positioning a starting position according to other parameters, and extracting parameter related information from the text information; S3, generating a load formula node code according to the electronic coefficient table, wherein the object for generating the load formula node code comprises two balance formulas, and the balance formula I and the balance formula II have different code generation methods; S4, generating a combined formula node code according to the group bridge information; and S5, adding the generated load formula node codes and the generated combined formula node codes into a standard calculation module for data processing to finish calculation.
- 2. The method for converting a weather certificate into a program universal code in a wind tunnel test according to claim 1, wherein the method for generating a load formula node code of a balance formula one is as follows: B1, creating all coefficient variables, wherein the coefficient variables are matched with all coefficients in a standard coefficient table one by taking coefficient names as keywords; b2, initializing coefficient variables, and giving initial values of 0 to all the coefficient variables; B3, in each column, matching the matched variables row by taking the coefficient variable names as keywords, and assigning values of the unmatched variables to be 0; B4, generating a main term and square term formula code; b401, judging each coefficient, distinguishing positive and negative terms, B402, respectively generating character strings of the main term and the square term formula, B403, combining the character strings into a main term and square term formula code of the main term variable; b5, generating a primary term and a quadratic term formula code; b501, judging each coefficient, if 0, not outputting, if 0, distinguishing positive and negative terms, B502 generating a formula string for each coefficient, B503, combining the formula character strings of all the primary terms and the secondary terms into a primary term formula code and a secondary term formula code of the component; B6, generating an interference term formula code; B601, judging each coefficient, if 0, not outputting, if 0, distinguishing positive and negative terms, B602 generating a formula string for each interference term coefficient, B603, combining the formula character strings of all interference terms into an interference term formula code of the component; b7, adding fixed codes of the main item variables of the column, and combining all the generated codes into a calculation code of the component; B8, combining the six-component calculation codes into a main calculation code of the formula node; and B9, adding a load formula node fixed code to generate a final load formula node code.
- 3. The method for converting a weather certificate into a program universal code in a wind tunnel test according to claim 1, wherein the method for generating a load formula node code of a balance formula II is as follows: C1, generating a component formula code, in each column, matching a coefficient variable character string with a standard coefficient table line by using a fixed sequence, generating a formula character string of each coefficient, and combining all the formula character strings into the component formula code; C2, adding the component fixed code, and combining the generated codes into a calculation code of the component; c3, combining the six-component calculation codes into a main calculation code of the formula node; And C4, adding a load formula node fixed code to generate a final load formula node code.
- 4. A method of implementing universal transcoding of a weather certificate to a program in a wind tunnel test as claimed in claim 1, wherein the generation of group bridge information comprises the steps of: D1, searching and matching character by character in the bridge group information, and finding out the maximum number to determine the number of bridge circuits, namely signal channels; D2, generating channel definition codes according to the number of channels; d3, matching component bridge combined character strings line by taking the component names as keywords; d4, combining the bridge combination codes of six components; And D5, combining the channel definition code with the six-component bridge combination code, and adding a fixed code to generate a final combination formula node code.
- 5. The method for converting a weather certificate to a program universal code in a wind tunnel test according to any one of claims 1 to 4, wherein the data call is based on a word class of word.
- 6. The method for converting the universal code from the balance certificate to the program in the wind tunnel test according to claim 5, wherein the node code for generating the balance load technology is based on a C language code.
Description
Method for realizing universal code conversion from weather certificate to program in wind tunnel test Technical Field The invention relates to the technical field of aerodynamic wind tunnel tests, in particular to a method for converting a weather certificate into a program universal code in a wind tunnel test. Background The purpose of the wind tunnel force test is to obtain the force and moment carried by the test model in the wind tunnel flow field. Typically, the forces and moments carried by the test model are measured using a balance. The balance is a device for measuring the model load in a wind tunnel force test, and is essentially a multi-component sensor, and the original output of the multi-component sensor is a voltage signal. The balance needs to be calibrated before use to obtain the relation between the applied standard load and the balance output signal and give a certificate, and because of the mutual coupling among multiple components, the relation is often a nonlinear polynomial, and when the coefficients of the quadratic terms are taken according to the general convergence condition, the coefficient result is a matrix of 6 multiplied by 27, and 7 significant digits after decimal point are reserved, so that the matrix is a relatively complex matrix. During wind tunnel test, under a certain test state, firstly acquiring an original voltage signal output by a balance, and then carrying out iterative calculation according to a formula and a coefficient obtained by calibration to obtain a load result. Because the number of balances is large and the periodic calibration is needed, certificates used in each test are different, and firstly, the balance formula coefficients are manually recorded and are modified in a standard calculation module of a data processing program. In the process, two problems are that firstly, most of numerical values are smaller, the number of bits is large, the difference is small, the numerical values are not easy to distinguish, the error is very easy to see or input, the calculation result is influenced, and secondly, a large amount of time is required for each input and repeated inspection due to the large number of coefficients, and the test efficiency is seriously influenced. Along with development requirements of advanced aircrafts and development of wind tunnel test technologies, requirements on test efficiency are higher and higher, so that the traditional manual method is changed, an automatic means is developed, and the test efficiency is improved. Disclosure of Invention The invention aims to solve the problems of low efficiency and extremely easy error caused by manual input of a large number of balance formula coefficients in the existing program by automatically generating language codes for balance load calculation and directly using the language codes for the data processing program to calculate the load. In order to achieve the above purpose, the present invention adopts the following technical scheme: a method for realizing universal code conversion from a weather certificate to a program in a wind tunnel test comprises the following steps: And S1, the program calls a Word. Application ActiveX class in the Office system, and reads all text information of a Word balance certificate. And S2, searching related information in the text information according to the keyword positioning start position and extracting the related information. A1, positioning a starting position according to a balance coefficient table, extracting coefficient table information from text information, and generating an electronic coefficient table. A2, according to the relation between each component signal and each bridge output signal, locating the starting position, and extracting the component group bridge information from the text information. A3, extracting relevant information from the text information according to the positioning start positions such as the certificate number, the calibration date, the effective date and the like. And S3, generating a load formula node code according to the electronic coefficient table. The method is divided into two balance formulas (a balance formula I and a balance formula II), namely a load formula node code generation method, wherein the method shown in the balance formula I is as follows: And B1, newly building all coefficient variables. Since the number of actual coefficient table coefficients is generally less than the standard coefficient table and the coefficient entries are not identical, it is necessary to match all coefficients in the standard coefficient table one by one. The newly built coefficient variables are named as keywords by coefficient names, and all possible changes of the same coefficient type are considered. The method is specifically divided into a main coefficient, a square term coefficient, a primary term, a secondary term, a cross term and the like, and 88 variables are used. All coefficients of six compon