Thermodynamic parameter correction method and system of HCh software

By introducing gradient scaling technology and binary search method, the search step size is dynamically adjusted, and the Gibbs free energy and activity coefficient are adjusted synchronously. This solves the problems of low efficiency and human factor influence in the thermodynamic parameter correction of HCh software, realizes efficient and accurate parameter optimization, and improves the reliability and scalability of the correction process.

CN121525354BActive Publication Date: 2026-05-05UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF SCI & TECH BEIJING
Filing Date
2025-09-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The existing HCh software thermodynamic parameter correction mainly relies on manual adjustment, which is inefficient and easily affected by human factors. It lacks a systematic optimization path, resulting in a slow parameter adjustment process and difficulty in determining the optimal thermodynamic parameters. The optimization process is highly subjective and has poor scalability.

Method used

Gradient scaling technology is used to dynamically adjust the search step size, and the Gibbs free energy and activity coefficient are adjusted simultaneously by combining the binary search method. The thermodynamic parameters are optimized through an automated process, and the parameters are precisely adjusted using the Jacobian matrix and Stokes damping formula, reducing manual intervention.

Benefits of technology

It improves the accuracy and efficiency of thermodynamic parameter correction, reduces human error, enhances reliability and scalability, and ensures the stability and precision of the parameter correction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525354B_ABST
    Figure CN121525354B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for thermodynamic parameter correction in HCh software, relating to the field of parameter correction technology. The method includes: determining initial thermodynamic parameters of a target component; inputting the initial thermodynamic parameters into HCh software for preliminary simulation and outputting the equilibrium concentration of the target component; calculating the comprehensive deviation between the equilibrium concentration of the target component and the desired equilibrium concentration; determining the search step size based on the relative magnitude of the comprehensive deviation and the desired equilibrium concentration, combined with gradient scaling technology; synchronously adjusting the Gibbs free energy and activity coefficient in the initial thermodynamic parameters using a binary search method in a coupled manner according to the search step size to obtain optimized thermodynamic parameters; updating the initial thermodynamic parameters using the optimized thermodynamic parameters, returning to re-simulate, until the comprehensive deviation is less than a preset comprehensive deviation value; and outputting the optimized thermodynamic parameters, completing the thermodynamic parameter correction. This invention improves the accuracy and efficiency of parameter correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of parameter correction technology, and in particular to a method and system for correcting thermodynamic parameters of HCh software. Background Technology

[0002] HCh software is a computational platform for geochemical and thermodynamic simulations, capable of simulating chemical equilibrium states in multi-component systems. Based on the principle of Gibbs free energy minimization, it can calculate the chemical equilibrium of multiphase systems such as fluids, minerals, and gases, and is widely used in fields such as mineralization processes, fluid-rock interactions, and environmental geochemistry. HCh software relies on standard parameters in a thermodynamic database, such as Gibbs free energy and activity coefficients.

[0003] The parameters used in the thermodynamic database of the HCh software may deviate from actual experimental data. Due to the complexity of natural systems and the limitations of experimental data in the database, simulation results often cannot fully and accurately reflect reality. By correcting the thermodynamic parameters in the HCh software, the accuracy and reliability of the simulation can be improved, ensuring that the simulation results are better consistent with experimental data, thereby providing more reliable numerical predictions and theoretical support for geochemical research, environmental science, and other fields.

[0004] However, existing HCh software thermodynamic parameter correction mainly relies on manual adjustment of thermodynamic parameters, which is inefficient and easily affected by human factors. Furthermore, the lack of a systematic optimization path leads to a slow parameter adjustment process and makes it difficult to determine the optimal thermodynamic parameters, resulting in a highly subjective optimization process with poor scalability. Summary of the Invention

[0005] To address the technical problems of existing HCh software thermodynamic parameter correction, which mainly relies on manual adjustment of thermodynamic parameters, resulting in low efficiency, susceptibility to human factors, slow parameter adjustment process due to lack of systematic optimization path, and difficulty in determining optimal thermodynamic parameters, leading to strong subjectivity and poor scalability in the optimization process, this invention provides a thermodynamic parameter correction method and system for HCh software.

[0006] The technical solutions provided by the embodiments of the present invention are as follows:

[0007] In a first aspect, embodiments of the present invention provide a method for correcting the thermodynamic parameters of HCh software, comprising:

[0008] S1: Determine the initial thermodynamic parameters of the target component;

[0009] S2: Input the initial thermodynamic parameters into the HCh software for preliminary simulation and output the equilibrium concentration of the target component;

[0010] S3: Calculate the combined deviation between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component;

[0011] S4: Determine the search step size based on the relative magnitude between the comprehensive deviation value and the desired equilibrium concentration of the target component, combined with gradient scaling techniques;

[0012] S5: Based on the search step size, the initial thermodynamic parameters are synchronously adjusted in a coupled manner using a binary search method to obtain the optimized thermodynamic parameters;

[0013] S6: Update the initial thermodynamic parameters using optimized thermodynamic parameters, return to step S2, until the overall deviation value is less than the preset overall deviation value;

[0014] S7: Outputs optimized thermodynamic parameters and completes thermodynamic parameter correction.

[0015] Optionally, the initial thermodynamic parameters include the Gibbs free energy and the activity coefficient.

[0016] Optionally, S3 specifically includes:

[0017] S301: Calculate the span between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component;

[0018] S302: If the span value is less than the preset span value, proceed to step S303; otherwise, proceed to step S304.

[0019] S303: Determine the deviation value by calculating the relative percentage, and proceed to step S305;

[0020] S304: The deviation value is determined by calculation using a logarithmic scale;

[0021] S305: Calculate the weighted average of the determined deviation values ​​to obtain the comprehensive deviation value.

[0022] Optionally, S4 specifically includes:

[0023] S401: Establish a depth metric coefficient to quantify the nonlinear relationship between the overall deviation value and the component concentration;

[0024] S402: Combine the aforementioned depth measurement coefficient with the Stokes damping formula to calculate the dynamic damping factor that controls the adjustment range of the initial thermodynamic parameters;

[0025] S403: Calculate the search step size using the gradient scaling technique, combining the dynamic damping factor and the depth metric coefficient.

[0026] Optionally, the calculation process of the depth metric coefficient is as follows:

[0027] S4011: Calculate the Euclidean distance between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component for different target components;

[0028] S4012: Calculate the arithmetic mean of the expected equilibrium concentrations of different target components;

[0029] S4013: Calculate the standard deviation of the expected equilibrium concentration of different target components;

[0030] S4014: Calculate the depth measurement coefficient based on the Euclidean distance, the arithmetic mean of the equilibrium concentrations of the desired target components, and the standard deviation of the equilibrium concentrations of the desired target components.

[0031] Optionally, S5 specifically includes:

[0032] S501: Calculate the Jacobian matrix between the Gibbs free energy and the activity coefficient using the depth metric coefficient;

[0033] S502: Determine the joint search interval for the Gibbs free energy and the activity coefficient based on the Jacobian matrix;

[0034] S503: Use the Jacobian matrix to correct the search step size to ensure that the Gibbs free energy and the activity coefficient converge synchronously;

[0035] S504: Adjust the initial thermodynamic parameters according to the joint search interval and the corrected search step size to obtain the optimized thermodynamic parameters.

[0036] Optionally, S503 specifically includes:

[0037] S5031: Calculate the determinant of the Jacobian matrix;

[0038] S5032: Calculate the Frobenius norm of the Jacobian matrix;

[0039] S5033: The search step size is corrected according to the determinant and the Frobenius norm to obtain the corrected search step size.

[0040] Optionally, S504 specifically includes:

[0041] Using the joint search interval as the adjustment direction and the corrected search step size as the adjustment range, the initial thermodynamic parameters are adjusted to obtain the optimized thermodynamic parameters.

[0042] Secondly, embodiments of the present invention provide a thermodynamic parameter correction system for HCh software, comprising:

[0043] processor;

[0044] A memory storing computer-readable instructions, which, when executed by the processor, implement the thermodynamic parameter correction method of the HCh software as described in the first aspect.

[0045] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the thermodynamic parameter correction method of the HCh software as described in the first aspect.

[0046] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0047] In this embodiment of the invention, by introducing gradient scaling technology to dynamically adjust the search step size, the step size can be intelligently increased or damping force applied according to the magnitude of the deviation, avoiding the inefficiency or missing of the optimal solution caused by excessively fast or slow adjustments in traditional methods. Simultaneously, the binary search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and activity coefficient, fully taking into account their coupling relationship, thereby improving the accuracy and efficiency of the calibration process. Furthermore, the automated process reduces manual intervention, eliminates human error, and significantly improves the reliability and scalability of parameter calibration. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A flowchart illustrating a thermodynamic parameter correction method for HCh software provided in an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of the structure of a thermodynamic parameter correction system for HCh software provided in an embodiment of the present invention. Detailed Implementation

[0051] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0052] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0053] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0054] Reference manual attached Figure 1 The diagram shows a flowchart of a thermodynamic parameter correction method for HCh software provided in an embodiment of the present invention.

[0055] This invention provides a method for correcting the thermodynamic parameters of HCh software. This method can be implemented using a thermodynamic parameter correction device for HCh software, which can be a terminal or a server. The processing flow of the HCh software thermodynamic parameter correction method may include the following steps:

[0056] S1: Determine the initial thermodynamic parameters of the target component.

[0057] The initial thermodynamic parameters are preliminary values ​​provided by existing databases. The target component refers to the specific substance or chemical composition that needs to be studied and corrected in the thermodynamic simulation. In a multi-component system, the target component refers to the substance whose concentration change is of interest during thermodynamic equilibrium.

[0058] It should be noted that there can be multiple target components.

[0059] In one possible implementation, the initial thermodynamic parameters include Gibbs free energy and activity coefficient.

[0060] Gibbs free energy is a thermodynamic quantity describing whether a system can spontaneously change. It combines the system's internal energy, entropy, and temperature, and can predict the spontaneity of reactions under isothermal and isobaric conditions. The activity coefficient measures the degree to which a solute in a solution deviates from the ideal solution behavior. It describes the "effective concentration" of the solute in the solution and corrects for the concentration assumptions under ideal conditions, taking into account the interactions between solute molecules.

[0061] S2: Input the initial thermodynamic parameters into the HCh software for preliminary simulation and output the equilibrium concentration of the target component.

[0062] The equilibrium concentration of the target component refers to the concentration of the target component in the system under thermodynamic equilibrium conditions, calculated by HCh software simulation using given temperature, pressure, and component concentration. This value represents the distribution of the target component in each phase (liquid, gas, solid, etc.) of the system, typically the concentration at equilibrium where no further changes occur. Initial thermodynamic parameters are input into the HCh software, which performs a preliminary simulation based on these parameters, calculating and outputting the concentration of the target component at thermodynamic equilibrium. This simulation result provides fundamental data for subsequent parameter optimization, helps calculate the deviation between the actual and desired concentrations, and prepares for the correction process.

[0063] S3: Calculate the combined deviation between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component.

[0064] The desired equilibrium concentration of the target component refers to the concentration value that the target component should reach under thermodynamic equilibrium conditions, based on experimental data, theoretical models, or expected conditions. These values ​​are usually obtained through experimental observation or idealized calculations and serve as target reference values ​​in the calibration process. The comprehensive deviation value refers to the difference between the simulated equilibrium concentration of the target component and the desired equilibrium concentration. It is typically obtained by calculating the error between the two and weighting or summing multiple deviations to obtain a comprehensive error value, which reflects the degree of deviation between the current simulation and the expected result.

[0065] The difference between the calculated equilibrium concentration of the target component and the expected equilibrium concentration of the target component is used to derive a comprehensive deviation value. This deviation value is an important indicator for measuring the consistency between the simulation results and the expected results. Subsequent optimization and correction processes will be adjusted based on this deviation value to gradually reduce errors and approach the target concentration.

[0066] In one possible implementation, S3 specifically includes:

[0067] S301: Calculate the span between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component.

[0068] S302: If the span value is less than the preset span value, proceed to step S303; otherwise, proceed to step S304.

[0069] It should be noted that those skilled in the art can set the size of the preset span value according to actual needs, and this invention does not limit this.

[0070] S303: Determine the deviation value by calculating the relative percentage, and proceed to step S305.

[0071] The specific calculation formula for step S303 is as follows:

[0072]

[0073] Among them, C sim,i and C exp,i Let these represent the target equilibrium concentration and the desired target equilibrium concentration of the i-th target component, respectively. This represents the deviation value of the i-th target component calculated as a relative percentage.

[0074] S304: Determine the deviation value by calculating using a logarithmic scale.

[0075] The specific calculation formula for step S304 is as follows:

[0076]

[0077] Where ln represents the natural logarithm function, This represents the deviation value of the i-th target component calculated using a logarithmic scale, where || represents taking the absolute value.

[0078] S305: Take a weighted average of the determined deviation values ​​to obtain the comprehensive deviation value.

[0079] The formula for calculating the overall deviation value is as follows:

[0080]

[0081] Where δ represents the overall deviation value, n represents the total number of components of the target component, and w i This represents the weight coefficient of the i-th target component.

[0082] Where, δ i Depending on the different branching conditions, specifically... or

[0083] Specifically, this process calculates the deviation between the target component and the desired component using two different methods (relative percentage calculation and logarithmic scaling calculation), thereby more accurately measuring the difference between the simulation results and the expected data. Step S301 calculates the span value to determine whether the deviation reaches a preset threshold. If the span value is less than the preset value, the deviation is calculated using relative percentage. Otherwise, logarithmic scaling is used. By weighted averaging these deviation values, a comprehensive deviation value is obtained, thus comprehensively reflecting the simulation accuracy. Relative percentage calculation is suitable for cases with large errors and can intuitively reflect the relative differences in concentration. Logarithmic scaling calculation is more sensitive when the deviation is small and helps with fine-tuning. By dynamically selecting the calculation method according to the size of the span value in step S302, error accumulation caused by inappropriate methods can be effectively avoided. In addition, by weighted averaging the deviation values ​​of different target components, the importance of different components can be considered, further improving the accuracy and reliability of the comprehensive deviation value. These advantages enable this method to maintain high efficiency and ensure the accuracy of optimization results in thermodynamic parameter correction.

[0084] S4: Determine the search step size based on the relative magnitude between the comprehensive deviation value and the desired equilibrium concentration of the target component, combined with gradient scaling techniques.

[0085] Gradient scaling is a strategy for dynamically adjusting the search step size, typically used in optimization processes to adjust the step size in conjunction with the rate of change of the objective function. When the deviation is large, gradient scaling can increase the step size, allowing the optimization process to quickly approach the target. When the deviation is small, the step size is decreased or damping forces are applied to slow down the adjustment, preventing over-adjustment and unstable oscillations. The search step size refers to the magnitude of each parameter adjustment during the optimization process. A larger step size helps with a fast search but may skip the optimal solution. A smaller step size helps with precise adjustment but may cause the optimization process to be too slow. By dynamically adjusting the step size, a balance can be struck between search speed and accuracy.

[0086] It should be noted that by combining gradient scaling techniques to dynamically adjust the search step size, efficiency and accuracy are improved during the optimization process. When the deviation is large, the step size is increased to accelerate the search. Conversely, when the deviation approaches convergence, the step size is decreased and a damping force is applied to prevent over-adjustment and avoid skipping the optimal solution. This method reduces unnecessary iterations, avoids oscillations and instability, and ensures that the parameters gradually approach the optimal value, thus improving the overall performance of the optimization process.

[0087] In one possible implementation, S4 specifically includes:

[0088] S401: A depth measurement coefficient for establishing the nonlinear relationship between the quantitative comprehensive deviation value and the component concentration.

[0089] In one possible implementation, the calculation process for the depth metric coefficient is as follows:

[0090] S4011: Calculate the Euclidean distance between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component for different target components.

[0091] S4012: Calculate the arithmetic mean of the expected equilibrium concentrations of different target components.

[0092] The specific formula for calculating the arithmetic mean of the equilibrium concentrations of the desired target component is as follows:

[0093]

[0094] Where μ represents the arithmetic mean of the desired equilibrium concentration of the target component, n represents the total number of the target components, and C exp,i This represents the desired equilibrium concentration of the i-th target component.

[0095] S4013: Calculate the standard deviation of the expected equilibrium concentration of different target components.

[0096] The formula for calculating the standard deviation of the equilibrium concentration of the target component is as follows:

[0097]

[0098] Where σ represents the standard deviation of the desired equilibrium concentration of the target component.

[0099] S4014: Calculate the depth metric coefficient based on the Euclidean distance, the arithmetic mean of the desired target component equilibrium concentration, and the standard deviation of the desired target component equilibrium concentration.

[0100] The specific formula for calculating the depth metric coefficient is as follows:

[0101]

[0102] Where η represents the depth metric coefficient, ∈ represents a small constant to avoid division by zero, and C sim and C exp These represent the equilibrium concentration vector of the target component and the equilibrium concentration vector of the desired target component, respectively.

[0103] in, This reflects the complexity of the component system. η represents the depth metric coefficient, i.e., the depth metric coefficient obtained in the current iteration process.

[0104] Specifically, this process quantifies the difference between simulated and expected concentrations by calculating the Euclidean distance, arithmetic mean, and standard deviation of different target components, reflecting the degree of change in the equilibrium concentration of the target components. By using a depth metric, the deviation between simulation results and experimental data, as well as the complexity of component concentrations, can be comprehensively considered. In particular, σ / μ reflects the complexity of the component system, further refining the measurement of error. The calculation of the depth metric ensures that deviations can be accurately measured in each iteration, providing a basis for adjustments, effectively improving the accuracy and stability of optimization, and avoiding over-adjustment or slow convergence. This method not only enhances the accuracy of the model but also improves optimization efficiency.

[0105] S402: Combined with the depth measurement coefficient, the dynamic damping factor that controls the adjustment range of the initial thermodynamic parameters is calculated using the Stokes damping formula.

[0106] The formula for calculating the dynamic damping factor is as follows:

[0107]

[0108] Where λ represents the dynamic damping factor, tanh represents the hyperbolic tangent function, η0 represents the initial depth metric coefficient (i.e., the depth metric coefficient calculated in the first iteration), exp represents the natural exponential function, and C represents the current iteration number. This represents the decay constant related to the current iteration number.

[0109] The larger the dynamic damping factor, the greater the adjustment range of the initial thermodynamic parameters. The smaller the dynamic damping factor, the smaller the adjustment range of the initial thermodynamic parameters.

[0110] It should be noted that the adjustment range of thermodynamic parameters is flexibly adjusted by calculating the dynamic damping factor to ensure the stability of the optimization process. When the deviation is large, the adjustment range is increased to accelerate convergence. When the deviation is small, the adjustment range is decreased to prevent over-adjustment. The dynamic damping factor makes the optimization process more efficient and accurate, avoids oscillations, enhances the stability of parameter adjustment, and ensures the accuracy of the final result.

[0111] S403: Combines the dynamic damping factor and depth metric coefficient to calculate the search step size using gradient scaling techniques.

[0112] The specific formula for calculating the search step size is as follows:

[0113]

[0114] Where Δθ represents the search step size of the initial thermodynamic parameter θ. Represents the gradient scaling term. This indicates the partial derivative.

[0115] It should be noted that by combining the dynamic damping factor and the depth metric coefficient, gradient scaling techniques are used to accurately calculate the search step size, thereby optimizing the speed and accuracy of parameter adjustment. The gradient scaling term dynamically adjusts the step size according to changes in the target parameters, ensuring that the optimization process can quickly approach the optimal solution while preventing over-adjustment and avoiding oscillations or instability. This method improves the efficiency and accuracy of optimization, ensuring more precise and reliable parameter correction.

[0116] Specifically, this process quantifies the relationship between the overall deviation value and the component concentration by establishing a depth metric coefficient and a nonlinear relationship, thereby dynamically adjusting the adjustment range of thermodynamic parameters. In step S402, a dynamic damping factor is calculated using the Stokes damping formula. This factor controls the adjustment range of parameters based on the number of iterations and changes in the depth metric coefficient. When the deviation is large, the damping factor is large, increasing the adjustment range and quickly approaching the target. When the deviation is close to convergence, the damping factor decreases, reducing the adjustment range and avoiding over-adjustment. Step S403 combines this damping factor and the depth metric coefficient, using gradient scaling technology to accurately calculate the search step size, ensuring that each adjustment is more reasonable and accurate. The advantage of this method is that it can flexibly control the adjustment speed according to changes in deviation, improving the efficiency and stability of the optimization process, while avoiding oscillations or over-adjustment during convergence.

[0117] S5: Based on the search step size, the initial thermodynamic parameters are synchronously adjusted in a coupled manner using a binary search method to obtain the optimized thermodynamic parameters.

[0118] It should be noted that by utilizing the binary search method and the search step size, the optimal solution can be found efficiently within the parameter space. The binary search process ensures that the search does not skip the optimal thermodynamic parameters, and considering the coupling relationship between different thermodynamic parameters, it helps to simultaneously optimize the Gibbs free energy and activity coefficient. This improves optimization efficiency while ensuring the accuracy of the adjustment process, avoiding error accumulation and instability in traditional methods.

[0119] In one possible implementation, S5 specifically includes:

[0120] S501: Combine depth metric coefficients to calculate the Jacobian matrix between Gibbs free energy and activity coefficient.

[0121] The formula for calculating the Jacobian matrix is ​​as follows:

[0122]

[0123] Φ=η 2

[0124] Where J represents the Jacobian matrix between Gibbs free energy A and activity coefficient B, and Φ represents the intermediate variable.

[0125] Alternatively, the specific terms in the Jacobian matrix can be approximated using the finite element difference method, for example:

[0126]

[0127] Where e represents the natural constant and o represents the intermediate variable.

[0128] It's important to note that the relationship between Gibbs free energy and activity coefficient is quantified by calculating the Jacobian matrix. The elements of the Jacobian matrix represent the partial derivatives of the intermediate variable (the square of the depth metric coefficient) with respect to the Gibbs free energy and activity coefficient, measuring the mutual influence of these two variables as they change. The Jacobian matrix can be approximated using the finite element difference method to improve computational efficiency. The advantage of this process is that it accurately describes the coupling relationship between the Gibbs free energy and activity coefficient, providing accurate gradient information for optimization, thereby accelerating the optimization process, avoiding over-tuning, and ensuring the accuracy and stability of parameter convergence.

[0129] S502: Determine the joint search interval for Gibbs free energy and activity coefficient based on the Jacobian matrix.

[0130]

[0131] Among them, A new and B new Let A represent the new midpoint values ​​of Gibbs free energy and activity coefficient, respectively. mid and B mid Let A represent the midpoint values ​​of the Gibbs free energy and activity coefficient determined by the binary search method without considering the Jacobian matrix. prev and B prev J represents the midpoint value of the Gibbs free energy and activity coefficient in the previous iteration, respectively. 11 J 12 J 21 and J 22 These represent the elements of the Jacobian matrix, where the first number in the element index indicates the row number and the second number in the element index indicates the column number.

[0132] Among them, A new and B new The different values ​​of these values ​​constitute the joint search interval for Gibbs free energy and activity coefficient.

[0133] It should be noted that the joint search interval for Gibbs free energy and activity coefficient is calculated using the Jacobian matrix. The current midpoint value is updated based on the midpoint value obtained in the previous iteration and the elements of the Jacobian matrix. This method adjusts the search step size by considering the coupling relationship between parameters, ensuring that both parameters converge synchronously during the optimization process. The advantage lies in the ability to more accurately adjust the search interval by incorporating the gradient information of the Jacobian matrix, avoiding the problem of skipping the optimal solution that may occur in traditional methods, while simultaneously improving the efficiency and accuracy of the optimization.

[0134] S503: The search step size is corrected using the Jacobian matrix to ensure that the Gibbs free energy and activity coefficient converge synchronously.

[0135] In one possible implementation, S503 specifically includes:

[0136] S5031: Calculate the determinant of the Jacobian matrix.

[0137] S5032: Calculate the Frobenius norm of the Jacobian matrix.

[0138] S5033: The search step size is corrected based on the determinant and Frobenius norm to obtain the corrected search step size.

[0139] The revised formula is as follows:

[0140]

[0141] Where, Δθ coupled Denotes the corrected search step size, det(J) represents the determinant of the Jacobian matrix J, ||J|| F Let J denote the Frobenius norm of the Jacobian matrix J.

[0142] It's important to note that the search step size is precisely adjusted by calculating the determinant and Frobenius norm of the Jacobian matrix. The determinant reflects the overall scaling of the matrix, while the Frobenius norm measures its overall size. These two metrics are combined to refine the search step size, ensuring that each parameter adjustment during optimization better reflects the current gradient information, thereby improving the accuracy and efficiency of the optimization. This approach allows for dynamic adjustment of the step size during iterations, preventing over-adjustment or slow convergence, and enhancing the stability and accuracy of the optimization process.

[0143] S504: Adjust the initial thermodynamic parameters according to the joint search interval and the corrected search step size to obtain the optimized thermodynamic parameters.

[0144] In one possible implementation, S504 specifically includes:

[0145] By using the joint search interval as the adjustment direction and the corrected search step size as the adjustment range, the initial thermodynamic parameters are adjusted to obtain the optimized thermodynamic parameters.

[0146] Understandably, the initial thermodynamic parameters are precisely adjusted by using the joint search interval as the adjustment direction and the corrected search step size as the adjustment amplitude. The advantage of this process is that by combining the precisely calculated search interval and step size, rapid and stable parameter optimization can be achieved, avoiding over-adjustment or slow convergence, ensuring a more efficient and accurate optimization process, and ultimately obtaining optimized thermodynamic parameters that meet actual needs.

[0147] Specifically, this process quantifies the relationship between Gibbs free energy and activity coefficient by calculating the Jacobian matrix and optimizes the search strategy by combining it with a depth metric coefficient. First, the joint search interval for Gibbs free energy and activity coefficient is calculated using the Jacobian matrix, ensuring simultaneous convergence of the parameters during iteration. By approximating the elements of the Jacobian matrix using the finite element difference method, the gradient in each iteration can be accurately calculated, thus ensuring the accuracy and stability of the search step size correction. The advantage of this method is that by simultaneously adjusting the Gibbs free energy and activity coefficient, it effectively avoids the error accumulation problem that occurs when optimizing a single parameter. Simultaneously, by accurately correcting the search step size using the Jacobian matrix, it improves the convergence speed and accuracy of the optimization process.

[0148] S6: Update the initial thermodynamic parameters using optimized thermodynamic parameters, return to step S2, until the overall deviation value is less than the preset overall deviation value.

[0149] Specifically, the optimized thermodynamic parameters are updated to the initial thermodynamic parameters, and then the process returns to step S2 for a new simulation calculation. This process iterates continuously until the overall deviation value is less than a preset threshold, ensuring that the simulation results gradually approach the target value. This allows for continuous optimization of thermodynamic parameters, precise adjustment of the model, and ultimately, consistency between the simulation results and experimental data, thereby improving the accuracy and reliability of the calibration.

[0150] It should be noted that those skilled in the art can set the preset comprehensive deviation value according to actual needs, and this invention does not limit this.

[0151] S7: Outputs optimized thermodynamic parameters and completes thermodynamic parameter correction.

[0152] In practical applications, initial thermodynamic parameters such as Gibbs free energy and activity coefficient are optimized iteratively. First, the deviation between the simulation results and the expected results is calculated, and the search step size is adjusted based on this deviation. Next, the relationship between the Gibbs free energy and the activity coefficient is quantified using the Jacobian matrix, accurately calculating the joint search interval and the corrected search step size. This process ensures that the two parameters converge synchronously, avoiding over-adjustment or slow convergence. By combining techniques such as gradient scaling and dynamic damping factors, the adjustment magnitude and step size can be dynamically adjusted, making the optimization process more efficient and accurate, ultimately obtaining optimized thermodynamic parameters that meet practical needs. This method not only improves the efficiency and accuracy of the correction process but also avoids error accumulation and instability in traditional methods, ensuring the reliability and scalability of the optimization results.

[0153] In this embodiment of the invention, by introducing gradient scaling technology to dynamically adjust the search step size, the step size can be intelligently increased or damping force applied according to the magnitude of the deviation, avoiding the inefficiency or missing of the optimal solution caused by excessively fast or slow adjustments in traditional methods. Simultaneously, the binary search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and activity coefficient, fully taking into account their coupling relationship, thereby improving the accuracy and efficiency of the calibration process. Furthermore, the automated process reduces manual intervention, eliminates human error, and significantly improves the reliability and scalability of parameter calibration.

[0154] Reference manual attached Figure 2 The diagram shows a schematic of the structure of a thermodynamic parameter correction system for HCh software provided by the present invention.

[0155] The present invention also provides a thermodynamic parameter correction system 20 for HCh software, applied to the above-mentioned thermodynamic parameter correction method for HCh software, comprising:

[0156] Processor 201.

[0157] The memory 202 stores computer-readable instructions, which, when executed by the processor 201, implement the thermodynamic parameter correction method of the HCh software as described in the method embodiment.

[0158] The thermodynamic parameter correction system 20 for HCh software provided by this invention can execute the thermodynamic parameter correction method for HCh software described above and achieve the same or similar technical effects. To avoid repetition, this invention will not elaborate further.

[0159] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0160] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0161] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0162] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.

[0163] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.

[0164] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0165] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0166] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0167] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0168] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0169] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0170] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0171] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the thermodynamic parameter correction method of the HCh software as described in the method embodiment.

[0172] The present invention provides a computer-readable storage medium that can implement the steps and effects of the thermodynamic parameter correction method of the HCh software in the above method embodiments. To avoid repetition, the present invention will not repeat them.

[0173] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0174] In this embodiment of the invention, by introducing gradient scaling technology to dynamically adjust the search step size, the step size can be intelligently increased or damping force applied according to the magnitude of the deviation, avoiding the inefficiency or missing of the optimal solution caused by excessively fast or slow adjustments in traditional methods. Simultaneously, the binary search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and activity coefficient, fully taking into account their coupling relationship, thereby improving the accuracy and efficiency of the calibration process. Furthermore, the automated process reduces manual intervention, eliminates human error, and significantly improves the reliability and scalability of parameter calibration.

[0175] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0176] The following points need to be explained:

[0177] (1) The accompanying drawings of the embodiments of the present invention only involve the structures involved in the embodiments of the present invention. Other structures can refer to the general design.

[0178] (2) For clarity, the thickness of layers or regions is enlarged or reduced in the drawings used to describe embodiments of the present invention; that is, these drawings are not drawn to actual scale. It is understood that when an element such as a layer, film, region, or substrate is referred to as being “above” or “below” another element, the element may be “directly” located “above” or “below” the other element, or there may be intermediate elements.

[0179] (3) Where there is no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.

[0180] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for correcting thermodynamic parameters in HCh software, characterized in that, include: S1: Determine the initial thermodynamic parameters of the target component; S2: Input the initial thermodynamic parameters into the HCh software for preliminary simulation and output the equilibrium concentration of the target component; S3: Calculate the overall deviation between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component; S4: Determine the search step size based on the relative magnitude between the comprehensive deviation value and the desired equilibrium concentration of the target component, combined with gradient scaling techniques; S5: Based on the search step size, the Gibbs free energy and activity coefficient in the initial thermodynamic parameters are synchronously adjusted in a coupled manner using a binary search method to obtain the optimized thermodynamic parameters; S6: Update the initial thermodynamic parameters using the optimized thermodynamic parameters, and return to step S2 until the comprehensive deviation value is less than the preset comprehensive deviation value; S7: Output the optimized thermodynamic parameters to complete the thermodynamic parameter correction.

2. The thermodynamic parameter correction method for HCh software according to claim 1, characterized in that, The initial thermodynamic parameters include the Gibbs free energy and the activity coefficient.

3. The thermodynamic parameter correction method for HCh software according to claim 1, characterized in that, S3 specifically includes: S301: Calculate the span between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component; S302: If the span value is less than the preset span value, proceed to step S303; otherwise, proceed to step S304. S303: Determine the deviation value by calculating the relative percentage, and proceed to step S305; S304: The deviation value is determined by calculation using a logarithmic scale; S305: Calculate the weighted average of the determined deviation values ​​to obtain the comprehensive deviation value.

4. The thermodynamic parameter correction method for HCh software according to claim 1, characterized in that, S4 specifically includes: S401: Establish a depth metric coefficient to quantify the nonlinear relationship between the overall deviation value and the component concentration; S402: Combine the aforementioned depth measurement coefficient with the Stokes damping formula to calculate the dynamic damping factor that controls the adjustment range of the initial thermodynamic parameters; S403: Calculate the search step size using the gradient scaling technique, combining the dynamic damping factor and the depth metric coefficient.

5. The thermodynamic parameter correction method for HCh software according to claim 4, characterized in that, The calculation process for the depth metric coefficient is as follows: S4011: Calculate the Euclidean distance between the equilibrium concentration of the target component and the desired equilibrium concentration of the target component for different target components; S4012: Calculate the arithmetic mean of the expected equilibrium concentrations of different target components; S4013: Calculate the standard deviation of the expected equilibrium concentration of different target components; S4014: Calculate the depth measurement coefficient based on the Euclidean distance, the arithmetic mean of the equilibrium concentrations of the desired target components, and the standard deviation of the equilibrium concentrations of the desired target components.

6. The thermodynamic parameter correction method for HCh software according to claim 4, characterized in that, S5 specifically includes: S501: Calculate the Jacobian matrix between the Gibbs free energy and the activity coefficient using the depth metric coefficient; S502: Determine the joint search interval for the Gibbs free energy and the activity coefficient based on the Jacobian matrix; S503: Use the Jacobian matrix to correct the search step size to ensure that the Gibbs free energy and the activity coefficient converge synchronously; S504: Adjust the initial thermodynamic parameters according to the joint search interval and the corrected search step size to obtain the optimized thermodynamic parameters.

7. The thermodynamic parameter correction method for HCh software according to claim 6, characterized in that, S503 specifically includes: S5031: Calculate the determinant of the Jacobian matrix; S5032: Calculate the Frobenius norm of the Jacobian matrix; S5033: The search step size is corrected according to the determinant and the Frobenius norm to obtain the corrected search step size.

8. The thermodynamic parameter correction method for HCh software according to claim 6, characterized in that, Specifically, S504 is: Using the joint search interval as the adjustment direction and the corrected search step size as the adjustment range, the initial thermodynamic parameters are adjusted to obtain the optimized thermodynamic parameters.

9. A thermodynamic parameter correction system for HCh software, characterized in that, include: processor; A memory storing computer-readable instructions, which, when executed by the processor, implement the thermodynamic parameter correction method of the HCh software as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the thermodynamic parameter correction method of the HCh software as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Gas flow field thermal environment numerical value determination method

    CN113901733A

  • Thermodynamic optimization method and device for thermoelectric power generation module and medium

    CN120597698A