A general interface method for uncertainty analysis of reactor analysis programs
By introducing a common interface method in reactor uncertainty analysis, using template files and parameter identifiers for data interaction, the complex problem of data interaction in the prior art is solved, and a more efficient and general analysis process is achieved.
Patent Information
- Application Number
- CN202310997527.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2043-08-09
AI Technical Summary
In the prior art, data interactions in reactor uncertainty analysis are complex and there is a lack of efficient and general interface methods, which affects the convenience and versatility of analysis.
A general interface method suitable for uncertainty analysis of reactor analysis programs is proposed. Through the identification of template input files and output files and the demarcation of corresponding aiming points and parameter identifiers, the filling of input parameter samples and the extraction of output parameters is realized, and the data interaction process is simplified.
It reduces the complexity of data interaction in reactor uncertainty analysis, improves the convenience and versatility of analysis, and is suitable for uncertainty analysis of different reactor analysis procedures.
Smart Images

Figure CN117112256B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of reactor uncertainty analysis, and is a universal interface method suitable for uncertainty analysis of a reactor analysis program. Background Art
[0002] Uncertainty analysis of reactors can quantify the impact of uncertain input parameters on output parameters, reduce redundancy in reactor design, and improve the economy of reactors while ensuring reactor safety. Statistical analysis methods based on sampling have the advantages of good flexibility and have been widely used, becoming one of the mainstream analysis methods for uncertainty analysis.
[0003] The basic process of uncertainty analysis based on statistical analysis methods is to substitute the input parameters obtained by sampling into the reactor analysis program, and extract the output parameters of interest after calculation for uncertainty analysis. Therefore, realizing data exchange between the input parameters and output parameters between the reactor analysis program and the uncertainty analysis program has become a key step in reactor uncertainty analysis. For uncertainty analysis programs, an efficient and universal interface method can greatly improve the convenience of using uncertainty analysis. Summary of the invention
[0004] The present invention overcomes the shortcomings of the prior art, and the purpose of the present invention is to provide an efficient universal interface method suitable for reactor uncertainty analysis. The method can efficiently and conveniently realize data interaction between the reactor analysis program and the uncertainty analysis program, thereby reducing the complexity of data interaction during reactor uncertainty analysis, and at the same time has good versatility, and can realize uncertainty analysis of different programs. The present invention provides a universal interface method suitable for uncertainty analysis of reactor analysis programs.
[0005] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0006] The present invention provides a general interface method suitable for uncertainty analysis of a reactor analysis program, and the present invention provides the following technical solutions:
[0007] A general interface method applicable to uncertainty analysis of a reactor analysis program, the method comprising the following steps:
[0008] Step 1: Based on a template input file, identify the parameters in the template input file that need to be modified by the interface to locate the parameters that need to be modified;
[0009] Step 2: Based on a template output file, define the corresponding aiming points and parameter identifiers for the parameters in the template output file that need to be recognized by the interface. For transient analysis, the time identifier and parameter type identifier also need to be defined;
[0010] Step 3: Based on step 1, based on the input parameter sample set and the template output file obtained in step 1, fill the input parameter sample into the corresponding position of the corresponding template input file to obtain a new input file;
[0011] Step 4: Based on step 2, the anchor point is obtained based on the template output card, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. For transient analysis, the relative position between time and the anchor point also needs to be extracted;
[0012] Step 5: Based on step 4, the parameter values identified in step 4 are obtained based on the output file and anchor points calculated by the reactor analysis program and their relative positions to the anchor points. For transient analysis, different segments are divided according to the anchor points. The time of the segment is obtained through the relative position of the anchor points and time, and it is determined whether the time of the segment is within the range set by the user.
[0013] Preferably, step 2 specifically includes: selecting "{}" as the anchor point identifier, selecting "《》" as the output parameter identifier, selecting "¥¥" as the output parameter type symbol, and selecting a number as the parameter type symbol, where 0 represents the minimum value, 1 represents the mean value, and 2 represents the maximum value.
[0014] Preferably, the step 3 is specifically:
[0015] Step 3.1: Read a line from the input file;
[0016] Step 3.2: Determine whether there is an input parameter identifier in the line read in step 3.1. If there is no input parameter identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 3.3.
[0017] Step 3.3: Identify the parameter name in the input parameter identifier, and obtain the parameter value that needs to be filled in the input parameter identifier according to the input parameter name;
[0018] Step 3.4: Based on step 3.3, the parameter value to be replaced at the position replaces the input parameter identifier and its internal parameter name as a whole, thereby modifying the parameter;
[0019] Step 3.5: In some cases, there may be multiple parameters that need to be modified in the same row, so it is necessary to determine whether the input parameter identifier still exists in the row. If the input parameter identifier still exists, return to step 3.3. If the input parameter identifier does not exist, proceed to step 3.6.
[0020] Step 3.6: Determine whether it is the last line of the input file. If it is not the last line of the input file, return to step 3.1. If it is the last line, it indicates that all parameters that need to be replaced have been replaced to form a new input file.
[0021] Preferably, the step 4 is specifically:
[0022] On the basis of step 2, based on the template output card, the anchor point is obtained, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. At the same time, for transient analysis, the relative position between the time and the anchor point and the type of the parameter also need to be extracted;
[0023] For steady state, the steps are as follows:
[0024] Step 4.1: Read a line from the template output file;
[0025] Step 4.2: Determine whether there is an anchor identifier in the line read in step 4.1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 4.3.
[0026] Step 4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier;
[0027] Step 4.4: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step 4.5. If there is an output parameter identifier, proceed to step 4.6.
[0028] Step 4.5: Entering this step means that the current line has no output parameter identifier, so read the next line and return to step 4.4;
[0029] Step 4.6: Enter this step to identify that there is an output parameter identifier in the current row, and read the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers;
[0030] Step 4.7: In some cases, there may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step 4.6; if not, proceed to step 4.8;
[0031] Step 4.8: Determine whether this line is the last line of the template output file. If it is not the last line, return to step 4.1 and read the next line. If so, all anchor points and their relative distances are obtained.
[0032] Preferably, the step 4 is specifically:
[0033] For transient states, the process of obtaining the anchor point name and time, the relative position of the output parameters, and the output parameter type based on the template output card is divided into the following steps:
[0034] Step S4.1: Read a line in the template output file;
[0035] Step S4.2: Determine whether there is an anchor identifier in the line read in step S4.1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step S4.3.
[0036] Step S4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier;
[0037] Step S4.4: Determine whether there is a time identifier in the row. If there is a time identifier, proceed to step S4.5. If there is no output parameter identifier, proceed to step S4.6.
[0038] Step S4.5: Obtain the relative distance between the time identifier and the anchor identifier, that is, the number of words between the two identifiers, and proceed to step S4.6
[0039] Step S4.6: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step S4.7. If there is an output parameter identifier, proceed to step S4.8.
[0040] Step S4.7: Entering this step indicates that the current row has no output parameter identifier, so the next row is read and the process returns to step S4.6;
[0041] Step S4.8: Entering this step identifies that there is an output parameter identifier in the current row, reads the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers, and obtains the parameter type behind the parameter identifier;
[0042] Step S4.9: There may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step S4.8; if not, proceed to step S4.10;
[0043] Step S4.10: Determine whether this line is the last line of the template output file. If not, return to step S4.1 and read the next line. If yes, all anchor point names and their time, relative distances of output parameters and parameter types are obtained.
[0044] Preferably, for steady state, the process of obtaining the anchor point name and relative position based on the template output card to obtain output parameters is divided into the following steps:
[0045] Step 5.1: Read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0046] Step 5.2: Based on step 5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0047] Step 5.3: Based on step 5.2 and the relative distance obtained in step 4, the desired target output parameter is obtained.
[0048] Preferably, for transient states, the process of obtaining the anchor point name, time relative position, output parameter relative position and output parameter type based on the template output card to obtain the output parameter is divided into the following steps:
[0049] Step S5.1: read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0050] Step S5.2: Based on step S5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0051] Step S5.3: Based on step S5.2 and the time relative distance obtained in step 4, the time of the slice is obtained;
[0052] Step S5.4: Determine whether the time is within the range set by the user, if yes, proceed to step 5.5, if not, return to step S5.2;
[0053] Step S5.5: Based on step S5.2, and based on the relative distance of the output parameters obtained in step 4, the desired target output parameters are obtained;
[0054] Step S5.6: Step S5.5 is to obtain the target output parameter within a certain time range, and usually the maximum value, minimum value or mean value within the range u is obtained, so the corresponding output parameter is obtained according to the parameter identifier.
[0055] A universal interface system suitable for uncertainty analysis of a reactor analysis program, the system comprising:
[0056] A parameter identification module, which identifies the parameters in the template input file that need to be modified by the interface based on a template input file, so as to locate the parameters that need to be modified;
[0057] A transient analysis module, which is based on a template output file and defines corresponding aiming points and parameter identifiers for parameters in the template output file that need to be recognized by the interface. For transient analysis, a time identifier and a parameter type identifier also need to be defined;
[0058] An input file module, which fills the input parameter sample into the corresponding position of the corresponding template input file based on the input parameter sample set and the obtained template output file to obtain a new input file;
[0059] A time extraction module, wherein the time extraction module obtains an anchor point based on a template output card, and obtains a relative position between a parameter to be extracted and an anchor point value according to a parameter identifier. In transient analysis, the relative position between time and the anchor point also needs to be extracted;
[0060] A parameter setting module, which obtains the identified parameter value based on the output file and anchor point and the relative position to the anchor point calculated by the reactor analysis program. For transient analysis, different segments are divided according to the anchor points, and the time of the segment is obtained through the relative position of the anchor point and time, and it is judged whether the time of the segment is within the range set by the user.
[0061] A computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement a general interface method for uncertainty analysis of a reactor analysis program
[0062] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a general interface method suitable for uncertainty analysis of a reactor analysis program is implemented.
[0063] The present invention has the following beneficial effects:
[0064] Compared with the prior art, the present invention has the following advantages:
[0065] The present invention proposes a universal interface method suitable for uncertainty analysis of reactor analysis programs. It realizes input file modification and output file parameter extraction of various reactor analysis programs through only one method, provides a convenient interface method for reactor uncertainty analysis programs, and has broad application prospects. At the same time, the method process is simple, suitable for engineering applications, and is beneficial to improving the safety and economy of reactors. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 The following is the overall flow chart;
[0068] Figure 2 Enter the card schematic for the template;
[0069] Figure 3 This is a schematic diagram of the template output card;
[0070] Figure 4 Modify the flow chart for input parameters;
[0071] Figure 5 Obtain a flow chart for steady-state output parameter positions;
[0072] Figure 6 Get the flow chart for the transient output parameter position;
[0073] Figure 7 Extract flow chart for steady-state output parameters;
[0074] Figure 8 Extract flow chart for transient output parameters. DETAILED DESCRIPTION
[0075] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0076] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0077] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0078] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0079] The present invention is described in detail below in conjunction with specific embodiments. Specific embodiment one:
[0081] according to Figures 1 to 8 As shown, the specific optimization technical solution adopted by the present invention to solve the above technical problems is: the present invention relates to a universal interface method suitable for uncertainty analysis of reactor analysis programs, which realizes input file modification and output file parameter extraction of various reactor analysis programs through a method, provides a convenient interface method for reactor uncertainty analysis programs, and has broad application prospects; at the same time, the method process is simple, suitable for engineering applications, and is beneficial to improving the safety and economy of reactors.
[0082] A general interface method applicable to uncertainty analysis of a reactor analysis program, the method comprising the following steps:
[0083] Step 1: Based on a template input file, identify the parameters in the template input file that need to be modified by the interface to locate the parameters that need to be modified;
[0084] Step 2: Based on a template output file, define the corresponding aiming points and parameter identifiers for the parameters in the template output file that need to be recognized by the interface. For transient analysis, the time identifier and parameter type identifier also need to be defined;
[0085] Step 3: Based on step 1, based on the input parameter sample set and the template output file obtained in step 1, fill the input parameter sample into the corresponding position of the corresponding template input file to obtain a new input file;
[0086] Step 4: Based on step 2, the anchor point is obtained based on the template output card, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. For transient analysis, the relative position between time and the anchor point also needs to be extracted;
[0087] Step 5: Based on step 4, the parameter values identified in step 4 are obtained based on the output file and anchor points calculated by the reactor analysis program and their relative positions to the anchor points. For transient analysis, different segments are divided according to the anchor points. The time of the segment is obtained through the relative position of the anchor points and time, and it is determined whether the time of the segment is within the range set by the user. Specific embodiment 2:
[0089] The difference between the second embodiment of the present application and the first embodiment is that:
[0090] The step 2 specifically includes: selecting "{}" as the anchor point identifier, selecting "《》" as the output parameter identifier, selecting "¥¥" as the output parameter type symbol, and selecting a number as the parameter type symbol, where 0 represents the minimum value, 1 represents the mean value, and 2 represents the maximum value. Specific embodiment three:
[0092] The difference between the third embodiment of the present application and the second embodiment is that:
[0093] The step 3 is specifically as follows:
[0094] Step 3.1: Read a line from the input file;
[0095] Step 3.2: Determine whether there is an input parameter identifier in the line read in step 3.1. If there is no input parameter identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 3.3.
[0096] Step 3.3: Identify the parameter name in the input parameter identifier, and obtain the parameter value that needs to be filled in the input parameter identifier according to the input parameter name;
[0097] Step 3.4: Based on step 3.3, the parameter value to be replaced at the position replaces the input parameter identifier and its internal parameter name as a whole, thereby modifying the parameter;
[0098] Step 3.5: In some cases, there may be multiple parameters that need to be modified in the same row, so it is necessary to determine whether the input parameter identifier still exists in the row. If the input parameter identifier still exists, return to step 3.3. If the input parameter identifier does not exist, proceed to step 3.6.
[0099] Step 3.6: Determine whether it is the last line of the input file. If it is not the last line of the input file, return to step 3.1. If it is the last line, it indicates that all parameters that need to be replaced have been replaced to form a new input file. Specific embodiment four:
[0101] The difference between the fourth embodiment of the present application and the third embodiment is that:
[0102] The step 4 is specifically as follows:
[0103] On the basis of step 2, based on the template output card, the anchor point is obtained, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. At the same time, for transient analysis, the relative position between the time and the anchor point and the type of the parameter also need to be extracted;
[0104] For steady state, the steps are as follows:
[0105] Step 4.1: Read a line from the template output file;
[0106] Step 4.2: Determine whether there is an anchor identifier in the line read in step 4.1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 4.3.
[0107] Step 4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier;
[0108] Step 4.4: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step 4.5. If there is an output parameter identifier, proceed to step 4.6.
[0109] Step 4.5: Entering this step means that the current line has no output parameter identifier, so read the next line and return to step 4.4;
[0110] Step 4.6: Enter this step to identify that there is an output parameter identifier in the current row, and read the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers;
[0111] Step 4.7: In some cases, there may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step 4.6; if not, proceed to step 4.8;
[0112] Step 4.8: Determine whether this line is the last line of the template output file. If it is not the last line, return to step 4.1 and read the next line. If so, all anchor points and their relative distances are obtained. Specific embodiment five:
[0114] The difference between the fifth embodiment of the present application and the fourth embodiment is that:
[0115] The step 4 is specifically as follows:
[0116] For transient states, the process of obtaining the anchor point name and time, the relative position of the output parameters, and the output parameter type based on the template output card is divided into the following steps:
[0117] Step S4.1: Read a line in the template output file;
[0118] Step S4.2: Determine whether there is an anchor identifier in the line read in step S4.1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step S4.3.
[0119] Step S4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier;
[0120] Step S4.4: Determine whether there is a time identifier in the row. If there is a time identifier, proceed to step S4.5. If there is no output parameter identifier, proceed to step S4.6.
[0121] Step S4.5: Obtain the relative distance between the time identifier and the anchor identifier, that is, the number of words between the two identifiers, and proceed to step S4.6;
[0122] Step S4.6: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step S4.7. If there is an output parameter identifier, proceed to step S4.8.
[0123] Step S4.7: Entering this step indicates that the current row has no output parameter identifier, so the next row is read and the process returns to step S4.6;
[0124] Step S4.8: Entering this step identifies that there is an output parameter identifier in the current row, reads the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers, and obtains the parameter type behind the parameter identifier;
[0125] Step S4.9: There may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step S4.8; if not, proceed to step S4.10;
[0126] Step S4.10: Determine whether this line is the last line of the template output file. If not, return to step S4.1 and read the next line. If yes, all anchor point names and their time, relative distances of output parameters and parameter types are obtained. Specific embodiment six:
[0128] The difference between the sixth embodiment of the present application and the fifth embodiment is that:
[0129] For steady state, the process of obtaining the anchor point name and relative position to obtain output parameters based on the template output card is divided into the following steps:
[0130] Step 5.1: Read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0131] Step 5.2: Based on step 5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0132] Step 5.3: Based on step 5.2 and the relative distance obtained in step 4, the desired target output parameter is obtained. Specific embodiment seven:
[0134] The difference between the seventh embodiment of the present application and the sixth embodiment is that:
[0135] For transient states, the process of obtaining the anchor point name, time relative position, output parameter relative position and output parameter type based on the template output card is divided into the following steps:
[0136] Step S5.1: read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0137] Step S5.2: Based on step S5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0138] Step S5.3: Based on step S5.2 and the time relative distance obtained in step 4, the time of the slice is obtained;
[0139] Step S5.4: Determine whether the time is within the range set by the user, if yes, proceed to step 5.5, if not, return to step S5.2;
[0140] Step S5.5: Based on step S5.2, and based on the relative distance of the output parameters obtained in step 4, the desired target output parameters are obtained;
[0141] Step S5.6: Step S5.5 is to obtain the target output parameter within a certain time range, and usually the maximum value, minimum value or mean value within the range u is obtained, so the corresponding output parameter is obtained according to the parameter identifier. Specific embodiment eight:
[0143] The difference between the eighth embodiment of the present application and the seventh embodiment is only that:
[0144] The present invention provides a universal interface system suitable for uncertainty analysis of a reactor analysis program, the system comprising:
[0145] A parameter identification module, which identifies the parameters in the template input file that need to be modified by the interface based on a template input file, so as to locate the parameters that need to be modified;
[0146] A transient analysis module, which is based on a template output file and defines corresponding aiming points and parameter identifiers for parameters in the template output file that need to be recognized by the interface. For transient analysis, a time identifier and a parameter type identifier also need to be defined;
[0147] An input file module, which fills the input parameter sample into the corresponding position of the corresponding template input file based on the input parameter sample set and the obtained template output file to obtain a new input file;
[0148] A time extraction module, wherein the time extraction module obtains an anchor point based on a template output card, and obtains a relative position between a parameter to be extracted and an anchor point value according to a parameter identifier. In transient analysis, the relative position between time and the anchor point also needs to be extracted;
[0149] A parameter setting module, which obtains the identified parameter value based on the output file and anchor point and the relative position to the anchor point calculated by the reactor analysis program. For transient analysis, different segments are divided according to the anchor points, and the time of the segment is obtained through the relative position of the anchor point and time, and it is judged whether the time of the segment is within the range set by the user. Specific embodiment nine:
[0151] The difference between the ninth embodiment of the present application and the eighth embodiment is that:
[0152] The present invention provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement a general interface method suitable for uncertainty analysis of a reactor analysis program
[0153] The method comprises the following steps:
[0154] This specific example takes the reactor accident analysis program relap5 as an example, batch modifies the input files of relap5, and outputs files based on the template to obtain output parameters.
[0155] Figure 1 The overall flow chart of the method is as follows: Figure 1 As shown, the general interface method for uncertainty analysis of the reactor analysis program of the present invention is as follows:
[0156] Step 1: Based on a template input file, identify the parameters in the template input file that need to be modified by the interface to locate the parameters that need to be modified. For this embodiment, the "{}" symbol is selected as the input parameter identifier, and the identifier is the name of the input parameter. The modified template input card is as follows: Figure 2 As shown;
[0157] Step 2: Based on a template output file, for the parameters in the template output file that need to be recognized by the interface, define the corresponding aiming points and parameter identifiers. For transient analysis, it is also necessary to define the time identifier and parameter type symbol. For this embodiment, select "{}" as the anchor identifier, select "《》" as the output parameter identifier, select "¥¥" as the output parameter type symbol, and select a number as the parameter type symbol, where 0 represents the minimum value, 1 represents the mean value, and 2 represents the maximum value. The modified template output card is as follows: Figure 3 As shown;
[0158] Step 3, based on step 1, based on the input parameter sample set and the template output file obtained in step 1, fill the input parameter sample into the corresponding position of the corresponding template input file to obtain a new input file. The specific process is as follows: Figure 4 As shown, it is divided into the following steps:
[0159] Step 301, read a line in the input file;
[0160] Step 302, determining whether there is an input parameter identifier in the line read in step 301, if there is no input parameter identifier, returning to step 1 to read the next line, if there is an input parameter identifier, proceeding to step 303;
[0161] Step 303, identifying the parameter name in the input parameter identifier, and obtaining the parameter value to be filled in the input parameter identifier according to the input parameter name;
[0162] Step 304, based on step 303, the parameter value to be replaced at the position replaces the input parameter identifier and the parameter name inside it as a whole, thereby modifying the parameter;
[0163] Step 305: In some cases, there may be multiple parameters that need to be modified in the same row, so it is necessary to determine whether there is still an input parameter identifier in the row. If there is still an input parameter identifier, return to step 303; if there is no input parameter identifier, proceed to step 306;
[0164] Step 306, determining whether it is located at the last line of the input file, if it is not the last line of the input file, returning to step 301, if it is the last line, it indicates that all parameters that need to be replaced are replaced, forming a new input file.
[0165] Step 4, based on step 2, based on the template output card, obtain the anchor point, and obtain the relative position between the parameter to be extracted and the anchor point value according to the parameter identifier. For transient analysis, it is also necessary to extract the relative position between the time and the anchor point and the type of the parameter;
[0166] For steady state, the process of obtaining anchor point names and relative positions based on the template output card is as follows: Figure 5 As shown, it is divided into the following steps:
[0167] Step 401, read a line in the template output file;
[0168] Step 402, determining whether there is an anchor identifier in the line read in step 401, if there is no anchor identifier, returning to step 1 to read the next line, if there is an input parameter identifier, proceeding to step 403;
[0169] Step 403, based on the anchor identifier, obtaining the anchor name in the anchor identifier;
[0170] Step 404, determine whether there is an output parameter identifier in the row, if not, proceed to step 405, if there is an output parameter identifier, proceed to step 406;
[0171] Step 405: Entering this step indicates that the current row has no output parameter identifier, so the next row is read and the process returns to step 404;
[0172] Step 406, entering this step to identify that there is an output parameter identifier in the current row, read the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers;
[0173] Step 407, in some cases, there may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step 406, if not, proceed to step 408;
[0174] Step 408, determine whether the line is the last line of the template output file, if not the last line, return to step 401, read the next line, if so, all anchor points and their relative distances are obtained.
[0175] For transient states, the process of obtaining the anchor point name and time, the relative position of the output parameter, and the output parameter type based on the template output card is as follows: Figure 6 As shown, it is divided into the following steps:
[0176] Step 401, read a line in the template output file;
[0177] Step 402, determining whether there is an anchor identifier in the line read in step 401, if there is no anchor identifier, returning to step 1 to read the next line, if there is an input parameter identifier, proceeding to step 403;
[0178] Step 403, based on the anchor identifier, obtaining the anchor name in the anchor identifier;
[0179] Step 404, determine whether the row has a time identifier, if so, proceed to step 405, if not, proceed to step 406;
[0180] Step 405, obtain the relative distance between the time identifier and the anchor identifier, that is, the number of words between the two identifiers, and proceed to step 406
[0181] Step 406, determine whether there is an output parameter identifier in the row, if not, proceed to step 407, if there is an output parameter identifier, proceed to step 408;
[0182] Step 407: Entering this step indicates that the current row has no output parameter identifier, so the next row is read and the process returns to step 406;
[0183] Step 408, entering this step to identify that there is an output parameter identifier in the current row, read the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers, and obtain the parameter type behind the parameter identifier;
[0184] Step 409, in some cases, there may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step 408, if not, proceed to step 410;
[0185] Step 410, determine whether the line is the last line of the template output file, if not, return to step 401, read the next line, if yes, then obtain all the anchor point names and their time and the relative distance of the output parameters and the type of the parameters.
[0186] Step 5, based on step 4, based on the output file calculated by the reactor analysis program and the anchor point and the relative position with the anchor point, obtain the parameter value identified in step 4. For transient analysis, divide different segments according to the anchor points, obtain the time of the segment through the relative position of the anchor point and time, and judge whether the time of the segment is within the range set by the user.
[0187] For steady state, the process of obtaining the anchor point name and relative position based on the template output card to obtain the output parameters is as follows: Figure 7 As shown, it is divided into the following steps:
[0188] Step 501, read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0189] Step 502: based on step 501, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0190] Step 503, based on step 502 and the relative distance obtained in step 4, obtain the desired target output parameter.
[0191] For transient states, the process of obtaining output parameters based on the template output card is as follows: Figure 8 As shown, it is divided into the following steps:
[0192] Step 501, read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4;
[0193] Step 502: based on step 501, the segments that have been divided according to the anchor points are sliced again according to the spaces;
[0194] Step 503, based on step 502 and the time relative distance obtained in step 4, obtain the time of the slice;
[0195] Step 504, determining whether the time is within the range set by the user, if yes, proceeding to step 505, if not yes, returning to step 502;
[0196] Step 505, based on step 502 and the relative distance of the output parameters obtained in step 4, obtaining the desired target output parameter;
[0197] Step 506: Step 505 is to obtain the target output parameter within a certain time range, and usually the maximum value, minimum value or mean value within the range u is obtained, so the corresponding output parameter is obtained according to the parameter identifier. Specific embodiment ten:
[0199] The difference between the tenth embodiment of the present application and the ninth embodiment is that:
[0200] The present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a universal interface method suitable for uncertainty analysis of a reactor analysis program is implemented.
[0201] In the description of this specification, the description of reference terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. Any process or method description in the flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a custom logic function or process, and the scope of the preferred embodiment of the present invention includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the art to which the embodiments of the present invention belong. The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as a sequenced list of executable instructions for implementing the logic function, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or N wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM).In addition, the computer readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, then editing, interpreting or processing in other suitable ways as necessary, and then storing it in a computer memory. It should be understood that the various parts of the present invention can be implemented with hardware, software, firmware, or a combination thereof. In the above-mentioned embodiment, N steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented with hardware, as in another embodiment, any one of the following technologies known in the art or their combination can be used to implement: a discrete logic circuit with a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit with a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0202] The above is only a preferred implementation of a general interface method applicable to uncertainty analysis of a reactor analysis program. The protection scope of a general interface method applicable to uncertainty analysis of a reactor analysis program is not limited to the above embodiment. All technical solutions under this idea belong to the protection scope of the present invention. It should be pointed out that for those skilled in the art, several improvements and changes without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A general interface method for uncertainty analysis of reactor analysis programs, Its characteristics are: The method comprises the following steps: Step 1: Based on a template input file, identify the parameters in the template input file that need to be modified by the interface to locate the parameters that need to be modified; Step 2: Based on a template output file, define the corresponding aiming points and parameter identifiers for the parameters in the template output file that need to be recognized by the interface. For transient analysis, the time identifier and parameter type identifier also need to be defined; Step 3: Based on step 1, based on the input parameter sample set and the template output file obtained in step 1, fill the input parameter sample into the corresponding position of the corresponding template input file to obtain a new input file; Step 4: Based on step 2, the anchor point is obtained based on the template output card, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. For transient analysis, the relative position between time and the anchor point also needs to be extracted; Step 5: Based on step 4, the parameter values identified in step 4 are obtained based on the output file and anchor points calculated by the reactor analysis program and their relative positions to the anchor points. For transient analysis, different segments are divided according to the anchor points. The time of the segment is obtained through the relative position of the anchor points and time, and it is determined whether the time of the segment is within the range set by the user.
2. The method according to claim 1, Its characteristics are: The step 2 specifically includes: selecting "{}" as the anchor point identifier, selecting "《》" as the output parameter identifier, selecting "¥¥" as the output parameter type symbol, and selecting a number as the parameter type symbol, where 0 represents the minimum value, 1 represents the mean value, and 2 represents the maximum value.
3. The method according to claim 2, Its characteristics are: The step 3 is specifically as follows: Step 3.1: Read a line from the input file; Step 3.2: Determine whether there is an input parameter identifier in the line read in step 3.
1. If there is no input parameter identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 3.
3. Step 3.3: Identify the parameter name in the input parameter identifier, and obtain the parameter value that needs to be filled in the input parameter identifier according to the input parameter name; Step 3.4: Based on step 3.3, the parameter value to be replaced at the position replaces the input parameter identifier and its internal parameter name as a whole, thereby modifying the parameter; Step 3.5: In some cases, there may be multiple parameters that need to be modified in the same row, so it is necessary to determine whether the input parameter identifier still exists in the row. If the input parameter identifier still exists, return to step 3.
3. If the input parameter identifier does not exist, proceed to step 3.
6. Step 3.6: Determine whether it is the last line of the input file. If it is not the last line of the input file, return to step 3.
1. If it is the last line, it indicates that all parameters that need to be replaced have been replaced to form a new input file.
4. The method according to claim 3, Its characteristics are: The step 4 is specifically as follows: On the basis of step 2, based on the template output card, the anchor point is obtained, and the relative position between the parameter to be extracted and the anchor point value is obtained according to the parameter identifier. At the same time, for transient analysis, the relative position between the time and the anchor point and the type of the parameter also need to be extracted; For steady state, the steps are as follows: Step 4.1: Read a line from the template output file; Step 4.2: Determine whether there is an anchor identifier in the line read in step 4.
1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step 4.
3. Step 4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier; Step 4.4: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step 4.
5. If there is an output parameter identifier, proceed to step 4.
6. Step 4.5: Entering this step means that the current line has no output parameter identifier, so read the next line and return to step 4.4; Step 4.6: Enter this step to identify that there is an output parameter identifier in the current row, and read the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers; Step 4.7: In some cases, there may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step 4.6; if not, proceed to step 4.8; Step 4.8: Determine whether this line is the last line of the template output file. If it is not the last line, return to step 4.1 and read the next line. If so, all anchor points and their relative distances are obtained.
5. The method according to claim 3, Its characteristics are: The step 4 is specifically as follows: For transient states, the process of obtaining the anchor point name and time, the relative position of the output parameters, and the output parameter type based on the template output card is divided into the following steps: Step S4.1: Read a line in the template output file; Step S4.2: Determine whether there is an anchor identifier in the line read in step S4.
1. If there is no anchor identifier, return to step 1 to read the next line. If there is an input parameter identifier, proceed to step S4.
3. Step S4.3: Based on the anchor identifier, obtain the anchor name in the anchor identifier; Step S4.4: Determine whether there is a time identifier in the row. If there is a time identifier, proceed to step S4.
5. If there is no output parameter identifier, proceed to step S4.
6. Step S4.5: Obtain the relative distance between the time identifier and the anchor identifier, that is, the number of words between the two identifiers, and proceed to step S4.6; Step S4.6: Determine whether there is an output parameter identifier in the row. If there is no output parameter identifier, proceed to step S4.
7. If there is an output parameter identifier, proceed to step S4.
8. Step S4.7: Entering this step indicates that the current row has no output parameter identifier, so the next row is read and the process returns to step S4.6; Step S4.8: Entering this step identifies that there is an output parameter identifier in the current row, reads the relative distance between the output parameter identifier and the anchor identifier, that is, the number of words between the two identifiers, and obtains the parameter type behind the parameter identifier; Step S4.9: There may be multiple output parameter identifiers in a row, so it is necessary to determine whether there are other output parameter identifiers in the row. If there are other output parameter identifiers, return to step S4.8; if not, proceed to step S4.10; Step S4.10: Determine whether this line is the last line of the template output file. If not, return to step S4.1 and read the next line. If yes, all anchor point names and their time, relative distances of output parameters and parameter types are obtained.
6. The method according to claim 4, Its characteristics are: For steady state, the process of obtaining the anchor point name and relative position to obtain output parameters based on the template output card is divided into the following steps: Step 5.1: Read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4; Step 5.2: Based on step 5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces; Step 5.3: Based on step 5.2 and the relative distance obtained in step 4, the desired target output parameter is obtained.
7. The method according to claim 5, Its characteristics are: For transient states, the process of obtaining the anchor point name, time relative position, output parameter relative position and output parameter type based on the template output card is divided into the following steps: Step S5.1: read the newly obtained output file, traverse the output file, and slice the output file according to the anchor point name based on the anchor point name obtained in step 4; Step S5.2: Based on step S5.1, the segments that have been divided according to the anchor points are sliced again according to the spaces; Step S5.3: Based on step S5.2 and the time relative distance obtained in step 4, the time of the slice is obtained; Step S5.4: Determine whether the time is within the range set by the user, if yes, proceed to step 5.5, if not, return to step S5.2; Step S5.5: Based on step S5.2, and based on the relative distance of the output parameters obtained in step 4, the desired target output parameters are obtained; Step S5.6: Step S5.5 is to obtain the target output parameter within a certain time range, and usually the maximum value, minimum value or mean value within the range u is obtained, so the corresponding output parameter is obtained according to the parameter identifier.
8. A universal interface system for uncertainty analysis of reactor analysis programs, Its characteristics are: The system comprises: A parameter identification module, which identifies the parameters in the template input file that need to be modified by the interface based on a template input file, so as to locate the parameters that need to be modified; A transient analysis module, which is based on a template output file and defines corresponding aiming points and parameter identifiers for parameters in the template output file that need to be recognized by the interface. For transient analysis, a time identifier and a parameter type identifier also need to be defined; An input file module, which fills the input parameter sample into the corresponding position of the corresponding template input file based on the input parameter sample set and the obtained template output file to obtain a new input file; A time extraction module, wherein the time extraction module obtains an anchor point based on a template output card, and obtains a relative position between a parameter to be extracted and an anchor point value according to a parameter identifier. In transient analysis, the relative position between time and the anchor point also needs to be extracted; A parameter setting module, which obtains the identified parameter value based on the output file and anchor point and the relative position to the anchor point calculated by the reactor analysis program. For transient analysis, different segments are divided according to the anchor points, and the time of the segment is obtained through the relative position of the anchor point and time, and it is judged whether the time of the segment is within the range set by the user.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the method according to claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. Its characteristics are: When the processor executes the computer program, the method of claims 1-7 is implemented.
Citation Information
Patent Citations
An automation method of core refueling design
CN109359433A
Techniques for providing interpretation for text classification
CN115989490A