Three-dimensional simulation coupling interface method based on dynamic parameter mapping and control

By using a dynamic parameter mapping and control-based 3D simulation coupling interface method, the problem of cumbersome and error-prone coupling processes between Flownex and ANSYS CFX in existing technologies has been solved. This method enables automated simulation, improves simulation efficiency and stability, and ensures the independence and reusability of the 3D simulation platform.

CN121634880APending Publication Date: 2026-03-10CHINA UNITED GAS TURBINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In the existing technology, the coupling workflow of commercial software Flownex and ANSYS CFX relies on manual operation, which is inefficient and error-prone. It also intrudes on the boundary conditions of the 3D simulation platform, undermining its independence and reusability.

Method used

A three-dimensional simulation coupling interface method based on dynamic parameter mapping and control is adopted. Through a script parsing module, parameter mapping module, script dynamic reconstruction module, state machine process scheduler, and data verification module, the automatic coupling between the one-dimensional simulation platform and the three-dimensional simulation platform is realized, reducing manual operation and ensuring the dynamic control and independence of boundary conditions.

Benefits of technology

It achieves one-stop automated simulation, improves the convenience and stability of coupled use, reduces manual operation, ensures the independent operation and reusability of the 3D simulation platform, makes parameter mapping adjustment more intuitive and efficient, reduces the amount of computation and improves simulation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121634880A_ABST
    Figure CN121634880A_ABST
Patent Text Reader

Abstract

The invention provides a three-dimensional simulation coupling interface method based on dynamic parameter mapping and control, which comprises the following steps of: S1, reading a coupling simulation basic file of a three-dimensional simulation platform by a script analysis module of a simulation coupling interface system, and establishing a parameter corresponding relationship between a one-dimensional simulation platform and the three-dimensional simulation platform; s2, the script dynamic reconstruction module reads data of the parameter mapping module and carries out solving simulation in the three-dimensional simulation platform, a result file is fed back to the script dynamic reconstruction module, the result file is processed by a state machine flow scheduler and then fed back to the three-dimensional simulation platform for operation, and a simulation result is output; and S3, a simulation result is verified and then transmitted to the one-dimensional simulation platform, and loop iteration solution is carried out again. According to the method, the one-dimensional simulation platform and the three-dimensional simulation platform are coupled in a non-intrusive mode, it is ensured that the examples can operate independently and be used cooperatively, and the convenience, stability and efficiency of coupling use of the one-dimensional simulation platform and the three-dimensional simulation platform are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of thermodynamics and fluid mechanics simulation technology, and in particular to a three-dimensional simulation coupling interface method based on dynamic parameter mapping and control. Background Technology

[0002] In numerous engineering fields, such as aerospace engines, gas turbines, petrochemicals, and urban pipe networks, fluid flow phenomena simultaneously exist at the system-level large-scale pipeline transportation and within the complex three-dimensional flows of critical components. One-dimensional fluid system simulation software excels at quickly and efficiently simulating the macroscopic flow characteristics of the entire pipe network system, such as pressure, flow rate, and temperature variations along the pipeline, but it cannot capture complex flow details in three-dimensional space, such as eddies, secondary flows, and separations. Three-dimensional CFD software (such as ANSYS Fluent and ANSYS CFX) can accurately simulate the refined flow field structure of local areas, but applying it to the entire large-scale pipe network system presents insurmountable challenges, including extremely complex modeling, a massive number of meshes, staggering computational resource consumption, and excessively long simulation cycles.

[0003] In existing technologies, 1D-3D coupling platforms, exemplified by commercial software Flownex, typically employ a coupling workflow with ANSYS CFX. This workflow, as a typical example, usually involves several key steps. At its core is a coupling mode based on manual configuration via a graphical user interface (GUI) and "black box" components. This process relies entirely on manual user operation and needs to be repeated for each passed parameter. Furthermore, it depends on pre-compiled external programs and libraries: to enable CFX to communicate with Flownex, users must manually import pre-compiled external program files provided by Flownex into the CFX preprocessing software, CFX-Pre. The internal implementation logic of these programs and functions is completely opaque to the user; the user can only call them but cannot view or modify their source code—typical "black box" modules. This results in a cumbersome and fragmented workflow, inefficient configuration, and proneness to errors. Users must permanently modify the boundary condition definitions of the 3D simulation platform in CFX-Pre, making them dependent on external user functions provided by Flownex. This modification is intrusive and undermines the independence and reusability of 3D simulation cases. Summary of the Invention

[0004] The main objective of this invention is to provide a three-dimensional simulation coupling interface method based on dynamic parameter mapping and control, which can effectively solve the problems in the background technology.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The three-dimensional simulation coupling interface method based on dynamic parameter mapping and control has the following steps: S1, the script analysis module of the simulation coupling interface system reads the coupling simulation basic file of the three-dimensional simulation platform, and the parameter mapping module is guided by the working condition logic switching module to establish the parameter corresponding relationship between the one-dimensional simulation platform and the three-dimensional simulation platform; S2, the script dynamic reconstruction module reads the data of the parameter mapping module and is transmitted to the three-dimensional simulation platform through the state machine process scheduler to solve simulation and post-processing, and the result file after simulation is fed back to the script dynamic reconstruction module for data updating, then after processing by the state machine process scheduler, it is fed back to the three-dimensional simulation platform for running and updating data, and the simulation result is output; S3, the simulation result is transmitted into the one-dimensional simulation platform after being checked by the data verification module, and the parameters are processed and updated after the parameter mapping module, and then the script dynamic reconstruction module, the state machine process scheduler, the three-dimensional simulation platform and the data verification module are used for cyclic iteration solution.

[0006] The application provides a three-dimensional simulation coupling interface system based on dynamic parameter mapping and control, comprising: The script analysis module is used for structured analysis and semantic extraction of a plurality of solver script files, automatically identifies the physical boundary, parameter item and hierarchical relationship therein, and provides basic data support for subsequent parameter mapping and dynamic coupling; The parameter mapping module provides a graphical parameter mapping list for establishing the parameter corresponding relationship between the one-dimensional simulation platform and the three-dimensional simulation model; The script dynamic reconstruction module is responsible for dynamically generating the input script required by the three-dimensional solver in a non-invasive manner at the start of each coupling iteration, and provides automatic support for cross-platform parameter coupling; The state machine process scheduler strictly drives the whole coupling process to run in sequence by calling the interfaces of other functional modules, and strictly monitors the execution process; The data verification module performs strict verification on the data fed back by the three-dimensional simulation platform; The working condition logic switching module acts on the parameter mapping module to guide the user to accurately establish the mapping rule.

[0007] Further, the script analysis module operates according to the following steps: 1.1): file scanning and line-level analysis, the system reads the content of the coupling simulation basic file by line, performs regular matching on each line, automatically identifies the line containing the definition statement, and filters the non-structural or comment content; 1.2): pattern matching and element extraction, through the pre-defined regular rule, the system decomposes the matched line according to the semantic type, and extracts four types of core lexical units: Keyword, indicating a logic block or object range; Identifiers are used to identify specific objects; Operators are used to describe definition or assignment relationships; Literals are used to record parameter values ​​and unit information. 1.3): Decomposition and structured storage: The successfully matched statement lines are segmented, and the extracted core lexical units are structured and saved according to the fields of "type → name → value → unit". The system uses QVector as the storage container, records each entry in sequence, and maintains the corresponding category tags internally to ensure that subsequent indexing and retrieval can be performed based on type or hierarchy. 1.4): Result display and interaction. After parsing, the system will automatically load the extracted results into the QTable control for visual display, forming a parameter mapping list.

[0008] Furthermore, the process of establishing the mapping relationship in the parameter mapping module is as follows: 2.1): In the parameter mapping list, each row represents a parameter mapping rule. The system defines the mapping relationship as a key-value pair structure consisting of two parts: source parameters, which are internal parameters from the one-dimensional simulation platform; and target parameters, which are parameter paths obtained from the script parsing of the three-dimensional simulation platform. 2.2): The user selects the source parameters and the target parameters, and then the system automatically generates corresponding relationship records in the background. Each mapping relationship contains basic information such as parameter path, name, unit and data exchange direction, forming a unified parameter mapping index table. 2.3): After the system is established, the mapping result is saved as a script. The script dynamic reconstruction module reads the data from the parameter mapping module and drives the boundary condition transfer and state synchronization between the one-dimensional simulation platform and the three-dimensional simulation platform, realizing automated data coupling and updating between platforms.

[0009] Furthermore, the implementation process of the script dynamic reconstruction module is as follows: 3.1): Script template loading and dynamic script reconstruction module first reads the original script file provided by the user into memory line by line, forming an operable row list data structure, while keeping the original script content unchanged, providing basic data for subsequent parameter updates; 3.2): Parameter location and update: Based on the pre-established parameter mapping list, the system traverses all input parameters and accurately locates the corresponding row and parameter name in the row list for each parameter; it replaces the original script values ​​with the latest calculated parameter values ​​from the one-dimensional simulation platform, while retaining the original unit identifiers and line indentation format; it enables local and precise modification of the script without re-parsing or rewriting the entire file. 3.3): Temporary script generation. After the update is completed, the row list is serialized into a new script file in the original order and automatically named a temporary file with iteration step number. A syntactically correct temporary file is generated and can be directly read and executed by the solver of the 3D simulation platform. Each round of coupled iteration can use an independent script with the latest parameters to achieve automated iteration and cross-platform data synchronization.

[0010] Furthermore, the process of a single iteration of the state machine process scheduler is as follows: 4.1): During the rewriting phase, at the start of the iteration, the state machine process scheduler first obtains the input data of the current iteration step from the one-dimensional simulation platform. Then, it immediately calls the interface function of the script dynamic reconstruction module to pass the latest data. The script dynamic reconstruction module will dynamically generate a temporary three-dimensional solver script containing the latest boundary conditions based on the parameter mapping module. After this phase is completed, the state automatically switches to the solving phase. 4.2): In the solution phase, the state machine process scheduler starts the solver process of the external 3D simulation platform through the QProcess module and instructs it to load the temporary script file generated in the previous phase. Synchronous blocking monitoring is performed, and the state machine process scheduler calls process.waitForFinished(-1) to suspend the main thread until the solver process of the 3D simulation platform completely exits. After the process ends, the state machine process scheduler immediately obtains its exit code and judges it according to the following logic: an exit code of "0" is considered "normal termination," meaning the solution is successful; any non-"0" exit code is considered "ERROR," indicating calculation failure. A pop-up window will be displayed after a calculation failure, and an error code will be output for the user to modify the solution parameters. 4.3): Extraction phase. This phase is activated only when the solution phase is judged as "successful". The execution action is as follows: The state machine process scheduler first calls the modifyCSEFile interface to update the result file path in the post-processing script. Then, it starts the post-processing program again through QProcess to execute the script. The post-processing script is responsible for calculating and extracting all parameters defined in the Output direction from the result file and writing the results to a temporary ".csv" result file. This process also uses synchronous blocking and exit code checking to ensure successful execution. If the calculation fails, a pop-up prompt will be displayed and an error code will be output for the user to modify the solution parameters. 4.4): During the update phase, the state machine process scheduler calls the internal data processing interface to read the ".csv" file. After the data verification is successful, the extracted result parameter values ​​are updated back to the corresponding component parameters inside the one-dimensional simulation platform, completing the data closure of one iteration.

[0011] Furthermore, the data verification module includes ".csv" result file verification, mapping parameter verification, and secure extraction. The ".csv" result file verification first checks if the ".csv" result file exists and is readable. If file access fails, processing is immediately halted and empty data is returned to prevent the coupled process from crashing due to reading an invalid file. Then, numerical format verification is performed, validating the format of each cell in the file. Using built-in numerical matching rules, only strings that can be recognized as standard numerical formats are accepted and converted to internal numerical types; all non-numerical content is automatically filtered and discarded at this stage. The mapping parameter verification iterates through the internal post-processing result set and the pre-configured parameter mapping list, performing cross-validation. Cross-validation confirms whether the "target parameter" defined in the parameter mapping list exists in the data just extracted from the post-processing result set. Secure extraction occurs only after successful cross-validation; the system extracts the corresponding result value and associates it with the "source parameter" defined in the parameter mapping list.

[0012] Furthermore, the working condition logic switching module constructs a mode definition interface to establish multiple "solution modes." When a user selects a mode, the "parameter mapping" window is immediately and dynamically reconstructed. Based on the logic of the selected mode, the parameter list of the one-dimensional simulation platform is automatically labeled with "Input" and input into the three-dimensional simulation platform, or labeled with "Output" and received from the three-dimensional simulation platform. This guides the user to configure many-to-many mappings and accurately establishes mapping rules. The "solution mode" selected during the configuration phase is read by the state machine process scheduler at runtime. The state machine process scheduler strictly packages the data according to the "Input" list defined by the mode, ensuring that the execution logic at runtime is completely consistent with the user's intention during configuration.

[0013] Furthermore, the coupling interface system includes a static configuration phase and a dynamic execution phase; The static configuration phase generates a "system configuration file," and the process is as follows: The script parsing module starts first, parses the user-provided 3D script file, and outputs a structured "list of available 3D parameters." The parameter mapping module acts as a configuration workbench, receiving the "list of available 3D parameters" from the script parsing module. The working condition logic switching module guides the configuration. When the user selects a mode, the working condition logic switching module immediately dynamically labels the 1D simulation platform parameters with "Input" or "Output" tags in the parameter mapping module. The parameter mapping module completes the "pairing" of the labeled 1D parameters with the parsed 3D parameters. This configuration is saved as a "coupled parameter transfer configuration," ultimately forming the "system configuration file." The dynamic execution phase is driven by a state machine process scheduler as the central engine. It reads the corresponding "coupling parameter transfer configuration" from the "system configuration file" to automatically drive iteration, achieving automated iterative loops. The process is as follows: The state machine process scheduler starts, reads the "coupling parameter transfer configuration" to obtain the current "solution mode" and "mapping rules"; then, the state machine process scheduler calls the script dynamic reconstruction module and passes two pieces of data to it: the "Input" packaged according to the "solution mode". The process involves several steps: First, the script dynamic reconstruction module generates a temporary script file for coupled solution. The state machine process scheduler receives a completion signal from the script dynamic reconstruction module, executes the temporary script file, and monitors the exit code signal returned by the external process. Upon successful execution, it generates the original CSV result file. Then, the state machine process scheduler calls the data verification module, passing two pieces of data: the path to the original CSV result file and the mapping rules used for cross-validation. The data verification module performs the verification and returns a valid dataset after verification to the state machine process scheduler. The state machine process scheduler receives the valid dataset, updates the internal parameters of the one-dimensional simulation platform, and determines whether convergence has occurred. If convergence fails, the state machine process scheduler will prompt the user with a solution error, requiring the user to manually modify the coupled solution parameters and optimize the solution process.

[0014] Compared with existing technologies, this invention utilizes the one-dimensional simulation platform FloTides. The platform integrates the Fluent / CFX simulation coupling interface system, unifying the configuration, execution, monitoring, and post-processing steps scattered across one-dimensional and three-dimensional simulation platforms into a single interface. This achieves "one-stop" automated coupled simulation, reducing manual operations and improving stability. Furthermore, it enables dynamic control of boundary conditions in a non-intrusive manner, avoiding permanent modifications to the three-dimensional simulation platform. This ensures that the simulation examples can run independently and are easily used collaboratively, guaranteeing the independence and reusability of the coupling. The cooperation of the parameter mapping module, script dynamic reconstruction module, state machine process scheduler, and operating condition logic switching module enables visual selection and rapid modification of parameter paths, making boundary mapping adjustments more intuitive and efficient, avoiding repeated script export / import. A globally traceable parameter mapping mechanism is established, providing a global mapping relationship view, facilitating intuitive review and debugging of coupled logic, reducing the risk of omissions or incorrect connections. Transient and steady-state operating condition calculations can be performed within the one-dimensional simulation platform, enabling multi-core parallel settings and system-level automated analysis and optimization. This significantly reduces computational load and greatly improves the convenience, stability, and efficiency of coupling one-dimensional and three-dimensional simulation platforms. Attached Figure Description

[0015] Fig. 1This is a schematic diagram of the simulation coupling interface system of the present invention.

[0016] Fig. 2 This is a schematic diagram of the coupling interface method between the one-dimensional fluid system simulation software Flotides and the three-dimensional simulation platform ANSYS Fluent, as described in this invention. Fig. 3 This is a schematic diagram of the coupling interface method between the one-dimensional fluid system simulation software Flotides and the three-dimensional simulation platform ANSYS CFX of the present invention. Detailed Implementation

[0017] To make the objectives, technical means and advantages of the present invention readily understood, the present invention will be further described below in conjunction with specific embodiments.

[0018] like Figs. 1-3 As shown, this invention provides a three-dimensional simulation coupling interface method based on dynamic parameter mapping and control, the steps of which are as follows: S1. The script parsing module 1 of the simulation coupling interface system reads the coupling simulation basic file of the three-dimensional simulation platform. Guided by the working condition logic switching module 2, the parameter mapping module 3 establishes the parameter correspondence between the one-dimensional simulation platform and the three-dimensional simulation platform. S2. The script dynamic reconstruction module 4 reads the data from the parameter mapping module 3 and transmits it to the 3D simulation platform through the state machine process scheduler 5 for solution simulation and post-processing. The result file after the simulation is completed is fed back to the script dynamic reconstruction module 4 for data update. After being processed by the state machine process scheduler 5, it is fed back to the 3D simulation platform for running and updating data, and outputs the simulation results. S3. After the simulation results are verified by the data verification module 6, they are transmitted to the one-dimensional simulation platform. After the parameters are processed and updated by the parameter mapping module 2, they are re-solved through the script dynamic reconstruction module 4, the state machine process scheduler 5, the three-dimensional simulation platform and the data verification module 6 in a loop.

[0019] like Fig. 1 As shown, this canteen provides a three-dimensional simulation coupling interface system based on dynamic parameter mapping and control, including: Script parsing module 1 is used to perform structured parsing and semantic extraction of solver script files from different 3D simulation platforms, automatically identifying physical boundaries, parameter terms and their hierarchical relationships, providing basic data support for subsequent parameter mapping and dynamic coupling; Parameter mapping module 3 provides a graphical parameter mapping list for establishing the parameter correspondence between the one-dimensional simulation platform and the three-dimensional simulation model; The script dynamic reconstruction module 4 is responsible for dynamically generating the input scripts required by the 3D solver in a non-intrusive manner when each round of coupling iteration starts, and at the same time provides automated support for cross-platform parameter coupling. The state machine process scheduler 5 drives the entire coupled process to run strictly in sequence by calling the interfaces of other functional modules, and closely monitors the execution process. Data verification module 6 performs rigorous verification on the data fed back from the 3D simulation platform; The operating condition logic switching module 2 acts on the parameter mapping module 3 to guide the user to accurately establish mapping rules.

[0020] This invention uses the coupling interfaces between the one-dimensional simulation platform FloTides and the three-dimensional simulation platforms ANSYS Fluent and ANSYS CFX as examples for specific illustration: Figs. 1-3 As shown, the script parsing module 1 operates according to the following steps: 1.1): File scanning and line-level parsing are performed. The one-dimensional simulation platform FloTides reads the contents of the coupled simulation base file line by line through the script parsing module 1, that is, the CSE file, CCL file and DEF file of the three-dimensional simulation platform ANSYS CFX or the JOU file and CSE file of the three-dimensional simulation platform ANSYS Fluent. Regular expression matching is performed on each line to automatically identify the lines containing definition statements, such as boundary block definition (BOUNDARY:), parameter assignment (Pressure=101325[Pa]) or identifier declaration (inlet), and non-structured or comment content is filtered. 1.2): Pattern matching and element extraction: Using predefined regular expression rules, the system decomposes the matched lines according to semantic type and extracts four types of core lexical units (Tokens): Keywords (such as BOUNDARY:, DOMAIN:) indicate logical blocks or object scopes; Identifiers (such as inlet and outlet) are used to identify specific objects; Operators (such as =, :) are used to describe definition or assignment relationships; Literal values ​​(such as 101325 [Pa], 293 [K]) are used to record parameter values ​​and unit information; 1.3): Decomposition and structured storage: The successfully matched statement lines are segmented, and the extracted core lexical units (Tokens) are structured and saved according to the fields of "type → name → value → unit". The system uses QVector as the storage container, records each entry in sequence, and maintains the corresponding category tags internally to ensure that subsequent indexing and retrieval can be performed based on type or hierarchy. 1.4): Result display and interaction. After parsing, the system will automatically load the extracted results into the QTable control for visual display, forming a parameter mapping list. Users can directly view and filter each parameter record in the interface to realize visual management and quick retrieval of script parameters.

[0021] In a preferred embodiment, the mapping relationship establishment process of the parameter mapping module is as follows: 2.1): In the parameter mapping list, each row represents a parameter mapping rule. The system defines the mapping relationship as a key-value pair structure consisting of two parts: source parameters, which are internal parameters from the one-dimensional simulation platform FloTides; and target parameters, which are parameter paths obtained from the script parsing of the three-dimensional simulation platform. 2.2): The user selects the source parameters and the target parameters, and then the system automatically generates corresponding relationship records in the background. Each mapping relationship contains basic information such as parameter path, name, unit and data exchange direction, forming a unified parameter mapping index table. 2.3): After the system is established, the system saves the mapping result as a script. The script dynamic reconstruction module 4 reads the data from the parameter mapping module 3 and drives the boundary condition transfer and state coupling synchronization between FloTides and the 3D simulation platform to realize automated data coupling and updating across platforms.

[0022] In a preferred embodiment, the script dynamic reconstruction module 4 is implemented as follows: 3.1): Script template loading and script dynamic reconstruction module 4 first reads the original script file provided by the user into memory line by line, forming an operable row list data structure, while keeping the original script content unchanged, providing basic data for subsequent parameter updates; 3.2): Parameter location and update: Based on the pre-established parameter mapping list, the system traverses all input parameters and precisely locates the corresponding row and parameter name in the row list for each parameter; it replaces the original script values ​​with the latest calculated parameter values ​​in FloTides, while retaining the original unit identifiers and line indentation format; this enables local and precise modification of the script. In the process of coupling the ANSYS CFX interface on the 3D simulation platform, the CCL script is reconstructed, and in the process of coupling the ANSYS Fluent interface on the 3D simulation platform, the JOU script is reconstructed, without the need to re-parse or rewrite the entire file; 3.3): Temporary script generation. After the update is complete, the row list is serialized into a new script file in the original order and automatically named a temporary file with iteration step number (e.g., iteration_5.ccl). A syntactically correct temporary file is generated and directly read and executed by the solver of the 3D simulation platform. That is, it simulates the modified CCL file or JOU file of the 1D simulation platform FloTides and outputs Res format result file or cdat format result file respectively, and returns it to the 3D simulation platform FloTides for further iteration through the state machine process scheduler 5. Each round of coupled iteration can use an independent script with the latest parameters to achieve automated iteration and cross-platform data synchronization.

[0023] In a preferred embodiment, the process of a single iteration of the state machine process scheduler 5 is as follows: 4.1): During the rewriting phase, at the start of the iteration, the state machine process scheduler 5 first obtains the input data (such as pressure, flow rate, etc.) of the current iteration step from the one-dimensional simulation platform FloTides. Then, it immediately calls the interface function of the script dynamic reconstruction module 4 to pass over this latest data. The script dynamic reconstruction module 4 will dynamically generate a temporary three-dimensional solver script (such as a CCL file or a JOU file) containing the latest boundary conditions based on the parameter mapping module 3. After this phase is completed, the state automatically switches to the solution phase. 4.2): In the solution phase, the state machine process scheduler 5 starts the solver process of the external 3D simulation platform (such as cfx5solve.exe) through the QProcess module and instructs it to load the temporary script file generated in the previous phase for synchronous blocking monitoring. The state machine process scheduler 5 calls process.waitForFinished(-1) to suspend the main thread until the solver process of the 3D simulation platform completely exits. After the process ends, the state machine process scheduler 5 immediately obtains its exit code and judges it according to the following logic: an exit code of "0" is regarded as "normal termination", that is, the solution is successful; any non-"0" exit code is regarded as ERROR, indicating that the calculation failed. After the calculation fails, a pop-up window will be displayed and the error code will be output for the user to modify the solution parameters. 4.3): Extraction phase: This phase is activated only when the solution phase is judged as "successful" (exit code "0"). The execution action is as follows: State machine process scheduler 5 first calls the modifyCSEFile interface to update the result file path in the post-processing script (i.e., CSE file). Then, it starts the post-processing program (e.g., cfx5post.exe) again through QProcess to execute the script. The post-processing script is responsible for calculating and extracting all parameters defined in the Output direction from the parameter mapping list in the result file, and writing the results to a temporary ".csv" result file. This process also uses synchronous blocking and exit code checking to ensure successful execution. If the calculation fails, a pop-up prompt will be displayed and an error code will be output for the user to modify the solution parameters. 4.4): During the update phase, the state machine process scheduler 5 calls the internal data processing interface to read the ".csv" file, extracts the three-dimensional output parameters, and after the data verification is passed, updates the extracted result parameter values ​​back to the corresponding component parameters inside the FloTides platform, completing one iteration of data closure.

[0024] In a preferred embodiment, the data verification module 6 includes ".csv" result file verification, mapping parameter verification, and secure extraction. The ".csv" result file verification first checks if the ".csv" result file exists and is readable. If file access fails (e.g., missing or corrupted), processing is immediately halted and empty data is returned to prevent the coupled process from crashing due to reading an invalid file. Then, numerical format verification is performed, validating the format of each cell in the file. Through built-in numerical matching rules, only strings that can be recognized as standard numerical formats (including integers, floating-point numbers, and scientific notation) are accepted and converted to internal numerical types. All non-numerical content (such as header text, "N / A", or error messages) is automatically filtered and discarded at this stage. The mapping parameter verification iterates through the internal post-processing result set and the pre-configured parameter mapping list, performing cross-validation. Cross-validation confirms whether the "target parameter" defined in the parameter mapping list exists in the data just extracted from the post-processing result set. Secure extraction occurs only after successful cross-validation (i.e., the parameter is found in the result set). Only then will the system extract the corresponding result value, i.e., the 3D simulation platform ANSYS. The component boundary parameters in CFX and the boundary parameters in the updated CCL file, or the component boundary parameters in the 3D simulation platform ANSYS Fluent and the boundary parameters in the updated JOU file, are associated with the "source parameters" defined in the parameter mapping list.

[0025] In a preferred embodiment, the working condition logic switching module 2 constructs a mode definition interface and establishes multiple "solution modes". When the user selects a mode, the "parameter mapping" window is immediately and dynamically reconstructed. According to the logic of the selected mode, the parameter list of the one-dimensional simulation platform FloTides is automatically labeled with "Input" and input into the three-dimensional simulation platform, or labeled with "Output" and received from the three-dimensional simulation platform. This guides the user to configure many-to-many mapping and accurately establishes mapping rules. The "solution mode" selected during the configuration phase is read by the state machine process scheduler 5 at runtime. The state machine process scheduler 5 strictly packages the data according to the "Input" list defined by the mode, ensuring that the execution logic at runtime is completely consistent with the user's intention during configuration (i.e., the selected mode).

[0026] In a preferred embodiment, the coupling interface system includes a static configuration phase and a dynamic execution phase; The static configuration phase generates a "system configuration file," and the process is as follows: Script parsing module 1 starts first, parsing the user-provided 3D script file (i.e., the CSE, CCL, and DEF files of the 3D simulation platform ANSYS CFX, or the JOU and CSE files of the 3D simulation platform ANSYS Fluent), and outputs a structured "list of available 3D parameters." Parameter mapping module 3, acting as a configuration workbench, receives the "list of available 3D parameters" provided by script parsing module 1. The working condition logic switching module 2 guides the configuration. When the user selects a mode, the working condition logic switching module 1 immediately dynamically labels the 1D simulation platform parameters with "Input" or "Output" tags in parameter mapping module 3. The "pairing" of the labeled 1D parameters with the parsed 3D parameters is completed in parameter mapping module 3. This configuration is saved as a "coupled parameter transfer configuration," ultimately forming the "system configuration file." The dynamic execution phase is driven by the state machine process scheduler 5 as the central engine. It reads the corresponding "coupling parameter transfer configuration" from the "system configuration file" to automatically drive iteration, achieving automated iterative loops. The process is as follows: The state machine process scheduler 5 starts, reads the "coupling parameter transfer configuration" to obtain the current "solution mode" and "mapping rules"; then, the state machine process scheduler 5 calls the script dynamic reconstruction module 4 and passes two pieces of data to it: the "Input" packaged according to the "solution mode". The process involves several steps: First, the system generates data and mapping rules. The script dynamic reconstruction module 4 produces a temporary script file for coupled solution. The state machine process scheduler 5 receives a completion signal from the script dynamic reconstruction module 4, executes the temporary script file, and monitors the exit code signal returned by the external process. Upon successful completion, it produces the original CSV result file. Then, the state machine process scheduler 5 calls the data verification module 6, passing two pieces of data: the path to the original CSV result file and the mapping rules used for cross-validation. The data verification module 6 performs verification and returns a valid dataset after verification to the state machine process scheduler 5. The state machine process scheduler 5 receives the valid dataset, updates the internal parameters of the one-dimensional simulation platform, and determines whether convergence has occurred. If convergence fails, the state machine process scheduler 5 will prompt the user with a solution error, requiring the user to manually modify the coupled solution parameters and optimize the solution process. This invention integrates the three-dimensional simulation platform Fluent / CFX into the one-dimensional simulation platform FloTides. The coupling interface system unifies the configuration, execution, monitoring, and post-processing steps scattered across one-dimensional and three-dimensional simulation platforms into a single interface, achieving "one-stop" automated coupled simulation. This reduces manual operations and improves stability. Furthermore, it achieves dynamic control of boundary conditions in a non-intrusive manner, avoiding permanent modifications to the three-dimensional simulation platform. This ensures that the simulation examples can run independently and are easy to use collaboratively, guaranteeing the independence and reusability of the coupling. The cooperation of parameter mapping module 3, script dynamic reconstruction module 4, state machine process scheduler 5, and operating condition logic switching module 2 enables visual selection and rapid modification of parameter paths, making boundary mapping adjustments more intuitive and efficient, and avoiding repeated script export / import. A globally traceable parameter mapping mechanism is established, providing a global mapping relationship view, facilitating intuitive review and debugging of coupled logic by users, reducing the risk of omissions or incorrect connections. Transient and steady-state operating condition calculations can be performed on the one-dimensional simulation platform, enabling multi-core parallel settings and system-level automated analysis and optimization. This significantly improves the convenience, stability, and efficiency of coupling one-dimensional and three-dimensional simulation platforms.

[0027] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes, equivalent substitutions, and improvements can be made without departing from the spirit and scope of the invention, and all such changes should fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A three-dimensional simulation coupling interface method based on dynamic parameter mapping and control, characterized in that, S1. The script analysis module of the simulation coupling interface system reads the coupling simulation basic file of the three-dimensional simulation platform, and establishes the parameter correspondence between the one-dimensional simulation platform and the three-dimensional simulation platform in the parameter mapping module guided by the working condition logic switching module; S2. The script dynamic reconstruction module reads the data of the parameter mapping module and transmits it to the three-dimensional simulation platform through the state machine process scheduler for solving simulation and post-processing, and feeds back the result file after the simulation is completed to the script dynamic reconstruction module for data updating, and then processes it through the state machine process scheduler and feeds it back to the three-dimensional simulation platform for running and updating data, and outputs the simulation results; S3. After the simulation results are checked by the data verification module, they are transmitted to the one-dimensional simulation platform, and after the parameters are processed and updated by the parameter mapping module, they are reprocessed by the script dynamic reconstruction module, the state machine process scheduler, the three-dimensional simulation platform and the data verification module for cyclic iteration solving.

2. The dynamic parameter mapping and control based three-dimensional simulation coupling interface method of claim 1, wherein, The simulation coupling interface system comprises: A script analysis module for structured analysis and semantic extraction of a variety of solver script files, automatically identifying the physical boundaries, parameter items and their hierarchical relationships therein; A parameter mapping module providing a graphical parameter mapping list for establishing the parameter correspondence between the one-dimensional simulation platform and the three-dimensional simulation model; A script dynamic reconstruction module dynamically generating the input script required by the three-dimensional solver at the start of each coupling iteration, while providing automatic support for cross-platform parameter coupling; A state machine process scheduler driving the entire coupling process by calling the interfaces of other functional modules and closely monitoring the execution process; A data verification module for checking the data fed back by the three-dimensional simulation platform; A working condition logic switching module acting on the parameter mapping module to guide users to accurately establish mapping rules.

3. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein The script analysis module operates according to the following steps: (1.1) File scanning and line-level analysis: the system reads the contents of the coupling simulation basic file line by line, performs regular matching on each line, automatically identifies the lines containing definition statements, and filters out non-structural or comment content; (1.2) Pattern matching and element extraction: through pre-defined regular rules, the system decomposes the matched lines by semantic type, and extracts four types of core lexical units: Keywords representing logical blocks or object ranges; Identifiers for identifying specific objects; Operators for describing definition or assignment relationships; Literal values for recording parameter values and unit information; (1.3) Decomposition and structured storage: the successfully matched statement lines are segmented and processed, and the extracted core lexical units are structured and saved according to the "type → name → value → unit" field structure. The system uses QVector as the storage container, records each entry in order, and maintains the corresponding classification tags internally to ensure that subsequent indexing and retrieval can be based on type or hierarchy; (1.4) Result display and interaction: after the analysis is completed, the system automatically loads the extraction results into the QTable control for visual display, forming a parameter mapping list.

4. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein, The mapping relationship of the parameter mapping module is established as follows: (2.1): In the parameter mapping list, each row represents a parameter mapping rule, and the system defines the mapping relationship as a key-value pair structure composed of two parts: the source parameter, which is an internal parameter from the one-dimensional simulation platform; and the target parameter, which is a parameter path obtained by script analysis of the three-dimensional simulation platform; (2.2): The user selects the source parameter and the target parameter, and then the system automatically generates a corresponding relationship record in the background. Each mapping relationship includes basic information such as parameter path, name, unit, and data exchange direction, forming a unified parameter mapping index table; (2.3): After the establishment is completed, the system saves the mapping results as a script, and the script dynamic reconstruction module reads the parameter mapping module data to drive the boundary condition transmission and state synchronization between the one-dimensional simulation platform and the three-dimensional simulation platform. The implementation process of the script dynamic reconstruction module is as follows:

5. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein, (3.1): Script template loading. The script dynamic reconstruction module first reads the user-provided original script file line by line into memory to form an operable row list data structure, and keeps the original script content unchanged; (3.2): Parameter positioning and updating. According to the parameter mapping list established in advance, the system traverses all Input parameters, and for each parameter, it accurately locates its corresponding row and parameter name in the row list; Replace the parameter values calculated in the one-dimensional simulation platform with the original script values while retaining the original unit identifier and line indentation format; (3.3): Temporary script generation. After updating, the row list is serialized into a new script file in the original order, and is automatically named as a temporary file with correct syntax and iteration step number, which is directly used for reading and execution by the solver of the three-dimensional simulation platform; each round of coupled iteration uses a script with independent and latest parameters to realize automatic iteration and cross-platform data synchronization. The process of a single iteration of the state machine flow scheduler is as follows:

6. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein, (4.1): Rewrite phase. At the beginning of the iteration, the state machine flow scheduler first obtains the input data of the current iteration step from the one-dimensional simulation platform, immediately calls the interface function of the script dynamic reconstruction module, and passes the latest data. The script dynamic reconstruction module will dynamically generate a temporary three-dimensional solver script containing the latest boundary conditions based on the parameter mapping module. After this stage is completed, the state automatically switches to the solving phase; (4.2): Solving phase. The state machine flow scheduler starts the solver process of the external three-dimensional simulation platform through the QProcess module, instructs it to load the temporary script file generated in the previous stage, and performs synchronous blocking monitoring. The state machine flow scheduler calls process.waitForFinished(-1) to suspend the main thread until the solver process of the three-dimensional simulation platform completely exits. After the process ends, the state machine flow scheduler immediately obtains its exit code and judges the logic: an exit code of "0" is considered as "normal termination", i.e. successful solving; any non-"0" exit code is considered as "ERROR", indicating that the calculation fails. After the calculation fails, a pop-up window will be prompted and the error code will be output for the user to modify the solving parameters; ​ (4.3): Extraction phase, only activated when the solving phase is judged as "solving success"; the action is: the state machine flow scheduler first calls the modifyCSEFile interface to update the result file path in the post-processing script, then starts the post-processing program again through QProcess, executes the script; the post-processing script is responsible for calculating and extracting all parameters defined as Output direction in the parameter mapping list from the result file, and writing the results into a temporary ".csv" result file, this process also uses synchronous blocking and exit code checking to ensure successful execution, and will also pop up a window prompt and output an error code if the calculation fails, so that the user can modify the solving parameters; (4.4): Update phase, the state machine flow scheduler calls the internal data processing interface to read the ".csv" file, and after the data verification is passed, the extracted result parameter values are updated back to the corresponding element parameters in the one-dimensional simulation platform, completing a data closed loop of one iteration.

7. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein, The data verification module includes ".csv" result file verification, mapping parameter verification and safe extraction; the ".csv" result file verification first checks whether the ".csv" result file exists and is readable, if the file access fails, the process is immediately terminated and returns empty data, preventing the coupled process from crashing due to reading invalid files; then perform numerical format verification on each cell content in the file; Only strings that can be recognized as standard numerical format will be accepted and converted to internal numerical type through built-in numerical matching rules, all non-numeric content will be automatically filtered and discarded at this stage; the mapping parameter verification will traverse the internal post-processing result set and the pre-configured parameter mapping list, and perform cross-validation, which will confirm whether the "target parameter" defined in the parameter mapping list exists in the data just extracted from the post-processing result set; the safe extraction is only performed after the cross-validation is successful, the system extracts the corresponding result value and associates it with the "source parameter" defined in the parameter mapping list.

8. The dynamic parameter mapping and control based three-dimensional simulation coupling interface method of claim 2, wherein, The working condition logic switching module constructs a mode definition interface to establish multiple "solving modes", when the user selects a mode, the "parameter mapping" window will be dynamically reconstructed immediately, and according to the logic of the selected mode, the parameter list of the one-dimensional simulation platform is automatically labeled with "Input" and input into the three-dimensional simulation platform or labeled with "Output" to receive from the three-dimensional simulation platform; Guide the user to configure multiple-to-multiple mapping to accurately establish the mapping rules; The "solving mode" selected in the configuration phase will be read by the state machine flow scheduler at runtime, and the state machine flow scheduler strictly packages data according to the "Input" list defined in the mode, ensuring that the execution logic at runtime is completely consistent with the user's intention when configuring.

9. The dynamic parameter mapping and control based three-dimensional simulation coupled interface method of claim 2, wherein, The coupling interface system includes a static configuration phase and a dynamic execution phase; The static configuration phase is to generate a "system configuration file", the running process is as follows: the script parsing module is started first, parses the three-dimensional script file provided by the user, and outputs a structured "three-dimensional available parameter list"; the parameter mapping module serves as a configuration platform, receives the "three-dimensional available parameter list" provided by the script parsing module, and the working condition logic switching module guides the configuration. When the user selects a mode, the working condition logic switching module immediately dynamically labels the one-dimensional simulation platform parameters as "Input" or "Output" in the parameter mapping module; The "pairing" of the marked one-dimensional parameters and the parsed three-dimensional parameters in the parameter mapping module is completed, this configuration is saved as "coupling parameter transmission configuration", and finally a "system configuration file" is formed; The dynamic execution phase is driven by the state machine flow scheduler as the central engine, reads the corresponding "coupling parameter transmission configuration" of the "system configuration file" to automatically drive iteration, and realizes automatic iteration cycle; the running process is as follows: the state machine flow scheduler is started, reads the "coupling parameter transmission configuration" to obtain the current "solving mode" and "mapping rule"; then the state machine flow scheduler calls the script dynamic reconstruction module, and transmits two data to the script dynamic reconstruction module, the two data are: "Input" data packaged according to "solving mode" and "mapping rule"; The script dynamic reconstruction module outputs a "temporary script file" for coupling solution; the state machine flow scheduler receives the completion signal from the script dynamic reconstruction module, executes the "temporary script file", and monitors the "exit code" signal returned by the external process. After the process is successful, an "original CSV result file" is output; then the state machine flow scheduler calls the data verification module, and transmits two data to the data verification module, the two data are: the path of the "original CSV result file" and the "mapping rule" for cross verification; The data verification module performs verification and returns a "verified effective data set" to the state machine flow scheduler; the state machine flow scheduler receives the "verified effective data set", updates the internal parameters of the one-dimensional simulation platform, and judges whether it converges. If it does not converge, the state machine flow scheduler will prompt the user to solve the error, and the user needs to manually modify the coupling solution related parameters to optimize the solving process.