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 simultaneously, which 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.

CN121525354AActive Publication Date: 2026-02-13UNIV OF SCI & TECH BEIJING
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511427873.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-13
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

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 synchronously by combining the binary search method. The thermodynamic parameters are optimized through an automated process, and the search step size is accurately calculated using the Jacobian matrix and depth metric coefficient to achieve automated parameter correction.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525354A_ABST
    Figure CN121525354A_ABST
Patent Text Reader

Abstract

The invention provides a thermodynamic parameter correction method and system of HCH software, and relates to the technical field of parameter correction. The method comprises the following steps: determining initial thermodynamic parameters of a target component; the initial thermodynamic parameters are input into HCH software for preliminary simulation, and the target component equilibrium concentration is output; calculating a comprehensive deviation value between the target component equilibrium concentration and the expected target component equilibrium concentration; according to the relative size between the comprehensive deviation value and the expected target component equilibrium concentration, determining a search step length in combination with a gradient scaling technology; synchronously adjusting Gibbs free energy and an activity coefficient in the initial thermodynamic parameters in a coupling manner by utilizing a binary search method according to the search step length to obtain optimized thermodynamic parameters; updating the initial thermodynamic parameters by using the optimized thermodynamic parameters, and returning to re-simulate until the comprehensive deviation value is smaller than a preset comprehensive deviation value; and outputting the optimized thermodynamic parameters to complete thermodynamic parameter correction. According to the invention, the accuracy and efficiency of parameter correction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of parameter correction, in particular to a thermodynamic parameter correction method and system of HCh software. BACKGROUND

[0002] HCh software is a calculation platform for geochemistry and thermodynamic simulation, which can simulate the chemical equilibrium state in multi-component systems. It is based on the principle of Gibbs free energy minimization, and can calculate the chemical equilibrium of multi-phase systems such as fluid, mineral and gas. It is widely used in the fields of ore-forming process, fluid-rock interaction and environmental geochemistry. HCh software relies on standard parameters in the thermodynamic database, such as Gibbs free energy and activity coefficient.

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

[0004] However, the existing HCh software thermodynamic parameter correction mainly relies on manual adjustment of thermodynamic parameters, which is low in efficiency and easy to be affected by human factors. The lack of systematic optimization path leads to a slow parameter adjustment process, and it is difficult to determine the best thermodynamic parameters, resulting in a strong subjectivity of the optimization process and poor scalability. SUMMARY

[0005] In order to solve the technical problems in the prior art that the HCh software thermodynamic parameter correction mainly relies on manual adjustment of thermodynamic parameters, which is low in efficiency and easy to be affected by human factors, and the lack of systematic optimization path leads to a slow parameter adjustment process, and it is difficult to determine the best thermodynamic parameters, resulting in a strong subjectivity of the optimization process and poor scalability, the present application provides a thermodynamic parameter correction method and system of HCh software.

[0006] The technical scheme provided by the embodiments of the present application is as follows:

[0007] In a first aspect, the embodiments of the present application provide a thermodynamic parameter correction method of HCh software, comprising:

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

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

[0010] S3: calculating a comprehensive deviation value of the target component equilibrium concentration and the expected target component equilibrium concentration;

[0011] S4: determining a search step length by combining a gradient scaling technique according to the relative size between the comprehensive deviation value and the expected target component equilibrium concentration;

[0012] S5: synchronously adjusting the initial thermodynamic parameters in a coupled manner by using a binary search method according to the search step length, to obtain optimized thermodynamic parameters;

[0013] S6: updating the initial thermodynamic parameters by using the optimized thermodynamic parameters, and returning to step S2 until the comprehensive deviation value is less than a preset comprehensive deviation value;

[0014] S7: outputting the optimized thermodynamic parameters, and completing the thermodynamic parameter correction.

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

[0016] Optionally, the S3 specifically includes:

[0017] S301: calculating a span value between the target component equilibrium concentration and the expected target component equilibrium concentration;

[0018] S302: in the case that the span value is less than a preset span value, proceeding to step S303, otherwise, proceeding to step S304;

[0019] S303: determining a deviation value by a relative percentage calculation manner, and proceeding to step S305;

[0020] S304: determining the deviation value by a logarithmic scale calculation manner;

[0021] S305: performing weighted average on the determined deviation value, to obtain the comprehensive deviation value.

[0022] Optionally, the S4 specifically includes:

[0023] S401: establishing a deep metric coefficient quantifying a nonlinear relationship between the comprehensive deviation value and the component concentration;

[0024] S402: calculating a dynamic damping factor controlling the initial thermodynamic parameter adjustment amplitude by a Stokes damping formula in combination with the deep metric coefficient;

[0025] S403: calculating the search step length by the gradient scaling technique in combination with the dynamic damping factor and the deep metric coefficient.

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

[0027] S4011: calculating a Euclidean distance between the target component equilibrium concentration and the expected target component equilibrium concentration of different target components;

[0028] S4012: calculating an arithmetic mean of the expected target component equilibrium concentration of different target components;

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

[0030] S4014: calculating the depth metric coefficient according to the Euclidean distance, the arithmetic mean of the expected target component equilibrium concentration and the standard deviation of the expected target component equilibrium concentration.

[0031] Optionally, the S5 specifically comprises:

[0032] S501: calculating a Jacobian matrix between the Gibbs free energy and the activity coefficient in combination with the depth metric coefficient;

[0033] S502: determining a joint search interval of the Gibbs free energy and the activity coefficient according to the Jacobian matrix;

[0034] S503: correcting the search step length by using the Jacobian matrix to ensure that the Gibbs free energy and the activity coefficient converge synchronously;

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

[0036] Optionally, the S503 specifically comprises:

[0037] S5031: calculating a determinant of the Jacobian matrix;

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

[0039] S5033: correcting the search step length according to the determinant and the Frobenius norm to obtain the corrected search step length.

[0040] Optionally, the S504 specifically is:

[0041] adjusting the initial thermodynamic parameters according to the joint search interval as an adjustment direction and the corrected search step length as an adjustment amplitude to obtain the optimized thermodynamic parameters.

[0042] In a second aspect, an embodiment of the present application provides a thermodynamic parameter correction system of HCh software, comprising:

[0043] a processor;

[0044] a memory having computer readable instructions stored thereon for execution by the processor to implement the thermodynamic parameter correction method of the HCh software as claimed in the first aspect.

[0045] In a third aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the thermodynamic parameter correction method of the HCh software as claimed in the first aspect.

[0046] The technical solutions provided by the embodiments of the present application have at least the following beneficial effects:

[0047] In the embodiments of the present application, by introducing the gradient scaling technique to dynamically adjust the search step, the step can be intelligently enhanced or a damping force can be applied according to the size of the deviation, thereby avoiding the problems of low efficiency or missing the optimal solution caused by too fast or too slow adjustment in the traditional method. At the same time, the bisection search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and the activity coefficient, fully considering the coupling relationship between them, thereby improving the accuracy and efficiency of the correction process. In addition, the automated process reduces human intervention and eliminates human error, significantly improving the reliability and scalability of parameter correction. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0049] Figure 1 A flowchart of a thermodynamic parameter correction method of HCh software provided by an embodiment of the present application;

[0050] Figure 2 A structural diagram of a thermodynamic parameter correction system of HCh software provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the present application will be described below with reference to the drawings.

[0052] In the embodiments of the present application, the words such as "example", "for example" are used to represent an example, illustration, or description. Any embodiment or design scheme described as "example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the word "example" is intended to present the concept in a specific manner. In addition, in the embodiments of the present application, the meaning expressed by "and / or" can be both, or can be one of the two.

[0053] To make the technical problems, technical solutions and advantages to be solved by the present application clearer, the following will be described in detail in conjunction with the drawings and specific embodiments.

[0054] Referring to the drawings accompanying the Figure 1 , a flowchart of a thermodynamic parameter correction method of HCh software provided by an embodiment of the present application is shown.

[0055] An embodiment of the present application provides a thermodynamic parameter correction method of HCh software, which can be implemented by a thermodynamic parameter correction device of HCh software. The thermodynamic parameter correction device of HCh software can be a terminal or a server. The processing flow of the thermodynamic parameter correction method of HCh software can 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 an existing database. The target component refers to a specific substance or chemical composition that needs to be studied and corrected in thermodynamic simulation. In a multi-component system, the target component refers to a substance whose concentration change is concerned in the process of thermodynamic equilibrium.

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

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

[0060] The Gibbs free energy is a thermodynamic quantity that describes whether a system can spontaneously change. It combines the internal energy, entropy and temperature of the system, and can predict the spontaneity of the reaction under constant temperature and pressure. The activity coefficient is a measure of the degree to which a solute deviates from the ideal solution behavior in a solution. It describes the "effective concentration" of solute in the solution and corrects the concentration assumption under ideal conditions, taking into account the interaction between solute molecules.

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

[0062] The target component equilibrium concentration refers to the concentration of the target component in the system at thermodynamic equilibrium under the given temperature, pressure, and component concentration conditions. This value represents the distribution of the target component in each phase (liquid phase, gas phase, solid phase, etc.) in the system, usually at the equilibrium state where no further change occurs. By inputting the initial thermodynamic parameters into the HCh software, the software performs preliminary simulation based on these parameters, calculates and outputs the concentration of the target component at thermodynamic equilibrium. This simulation result provides basic data for subsequent parameter optimization, helps to calculate the deviation between the actual and expected concentrations, and prepares for the correction process.

[0063] S3: Calculate the comprehensive deviation value of the target component equilibrium concentration and the expected target component equilibrium concentration.

[0064] The expected target component equilibrium concentration refers to the concentration value that the target component should reach at thermodynamic equilibrium based on experimental data, theoretical models, or expected conditions. These values are usually obtained through experimental observation or idealized calculation and are the target reference values in the correction process. The comprehensive deviation value refers to the difference between the simulated target component equilibrium concentration and the expected target component equilibrium concentration. Usually, the error between the two is calculated, and multiple deviations are weighted or summed to obtain a comprehensive error value to reflect the deviation between the current simulation and the expected result.

[0065] The difference between the calculated target component equilibrium concentration and the expected target component equilibrium concentration is obtained to obtain the comprehensive deviation value. This deviation value is an important indicator of the consistency of the simulation result and the expected result, and the subsequent optimization and correction process will be adjusted according to this deviation value to gradually reduce the error and approach the target concentration.

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

[0067] S301: Calculate the span value between the target component equilibrium concentration and the expected target component equilibrium concentration.

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

[0069] It should be noted that the size of the preset span value can be set by the person skilled in the art according to actual needs, and the present application does not limit it.

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

[0071] The calculation formula of step S303 is specifically:

[0072]

[0073] wherein C sim,i and C exp,i respectively represent the target component equilibrium concentration and the expected target component equilibrium concentration of the i-th target component, represents the deviation value of the i-th target component calculated by the relative percentage.

[0074] S304: determining the deviation value by the calculation method of logarithmic scale.

[0075] The calculation formula of step S304 is specifically:

[0076]

[0077] wherein ln represents the natural logarithm function, represents the deviation value of the i-th target component calculated by the logarithmic scale, and || represents taking the absolute value.

[0078] S305: weighting and averaging the determined deviation value to obtain a comprehensive deviation value.

[0079] The calculation formula of the comprehensive deviation value is specifically:

[0080]

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

[0082] wherein δ i According to different branch conditions, it is specifically or

[0083] Specifically, this process calculates the deviation value between the target component and the expected component by two different methods (relative percentage calculation and logarithmic scale calculation), so as to more accurately measure the difference between the simulation result and the expected data. Step S301 calculates a span value for judging whether the deviation reaches a preset threshold value. If the span value is less than the preset value, the relative percentage calculation is adopted to calculate the deviation. Otherwise, the logarithmic scale calculation is adopted. By weightedly averaging these deviation values, a comprehensive deviation value is obtained, so as to comprehensively reflect the simulation accuracy. The relative percentage calculation is suitable for the case of large error, and can intuitively reflect the relative difference of the concentration. The logarithmic scale calculation is more sensitive when the deviation is small, and is helpful for fine adjustment. By dynamically selecting the calculation method according to the size of the span value in step S302, the accumulation of errors caused by inappropriate methods can be effectively avoided. In addition, by weightedly averaging the deviation values of different target components, the importance of different components can be considered, and the accuracy and reliability of the comprehensive deviation value are further improved. These advantages make this method not only efficient, but also ensure the accuracy of the optimization result in the correction of thermodynamic parameters.

[0084] S4: determining a search step size according to the relative size between the comprehensive deviation value and the expected target component equilibrium concentration, combined with gradient scaling technology.

[0085] wherein the gradient scaling technology is a strategy for dynamically adjusting the search step size, which is usually used in the optimization process to adjust the step size combined with the change rate of the objective function. When the deviation is large, the gradient scaling can increase the step size, so that the optimization process quickly approaches the target. When the deviation is small, the step size is reduced or a damping force is applied to slow down the adjustment, so as to prevent excessive adjustment and unstable oscillation. The search step size refers to the amplitude of each parameter adjustment in the optimization process. A larger step size helps to quickly search, but may skip the optimal solution. A smaller step size helps to accurately adjust, but may cause the optimization process to be too slow. By dynamically adjusting the step size, the speed and accuracy of the search can be balanced.

[0086] It should be noted that by dynamically adjusting the search step size combined with the gradient scaling technology, the efficiency and accuracy of the optimization process are improved. When the deviation is large, the step size is increased to speed up the search. When the deviation approaches convergence, the step size is reduced and a damping force is applied to prevent excessive adjustment and avoid skipping the optimal solution. This method can reduce unnecessary iteration times, avoid oscillation and instability, and ensure that the parameters gradually approach the optimal value, thereby improving the overall effect of the optimization process.

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

[0088] S401: establishing a deep metric coefficient for quantifying the nonlinear relationship between the comprehensive deviation value and the component concentration.

[0089] In a possible implementation, the calculation process of the depth metric coefficient is specifically as follows:

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

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

[0092] The calculation formula of the arithmetic mean of the expected target component equilibrium concentration is specifically as follows:

[0093]

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

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

[0096] The calculation formula of the standard deviation of the expected target component equilibrium concentration is specifically as follows:

[0097]

[0098] Wherein, σ represents the standard deviation of the expected target component equilibrium concentration.

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

[0100] The calculation formula of the depth metric coefficient is specifically as follows:

[0101]

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

[0103] Wherein, reflects the complexity of the component system. η represents the depth metric coefficient, that is, the depth metric coefficient obtained in the current iteration process.

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

[0105] S402: In combination with the depth metric coefficient, calculate the dynamic damping factor that controls the initial thermodynamic parameter adjustment amplitude by the Stokes damping formula.

[0106] The calculation formula of the dynamic damping factor is specifically:

[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, C represents the current iteration number, represents the attenuation constant related to the current iteration number.

[0109] Where the larger the dynamic damping factor, the larger the initial thermodynamic parameter adjustment amplitude. The smaller the dynamic damping factor, the smaller the initial thermodynamic parameter adjustment amplitude.

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

[0111] S403: In combination with the dynamic damping factor and the depth metric coefficient, calculate the search step size using the gradient scaling technique.

[0112] The calculation formula of the search step size is specifically:

[0113]

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

[0115] It should be noted that by combining the dynamic damping factor and the depth metric coefficient, the search step is accurately calculated using the gradient scaling technique, thereby optimizing the speed and accuracy of parameter adjustment. The gradient scaling term dynamically adjusts the step size according to the changes in the target parameters, ensuring that both fast convergence to the optimal solution and prevention of over-adjustment are achieved during the optimization process, avoiding oscillation or instability. This method improves the efficiency and accuracy of optimization, ensuring more accurate and reliable parameter correction.

[0116] Specifically, this process quantifies the relationship between the comprehensive deviation value and the component concentration by establishing a depth metric coefficient and a nonlinear relationship, thereby dynamically adjusting the adjustment range of the thermodynamic parameters. In step S402, a dynamic damping factor is calculated by the Stokes damping formula, which controls the adjustment range of the parameters according to the changes in the iteration number and 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 approaches convergence, the damping factor becomes smaller, reducing the adjustment range and avoiding over-adjustment. Step S403 combines the damping factor and the depth metric coefficient to accurately calculate the search step using the gradient scaling technique, 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 the changes in the deviation, improving the efficiency and stability of the optimization process, while avoiding oscillation or over-adjustment during the convergence process.

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

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

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

[0120] S501: Calculate the Jacobian matrix between the Gibbs free energy and the activity coefficient in combination with the depth metric coefficient.

[0121] The calculation formula of the Jacobian matrix is specifically:

[0122]

[0123] Φ = η 2

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

[0125] Alternatively, each item in the Jacobian matrix can be approximated by the finite element difference method, for example:

[0126]

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

[0128] It should be noted that the relationship between the Gibbs free energy and the activity coefficient is quantified by calculating the Jacobian matrix. The elements in 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 the activity coefficient, which measure the mutual influence of the Gibbs free energy and the activity coefficient when they change. The calculation of the Jacobian matrix can be approximated by the finite element difference method to improve the calculation efficiency. The advantage of this process is that it can accurately describe the coupling relationship between the Gibbs free energy and the activity coefficient, providing accurate gradient information for optimization, thereby accelerating the optimization process, avoiding over-adjustment, and ensuring the accuracy and stability of parameter convergence.

[0129] S502: Determine the joint search interval of the Gibbs free energy and the activity coefficient according to the Jacobian matrix.

[0130]

[0131] where A new and B new represent the new midpoint values of the Gibbs free energy and the activity coefficient, respectively, A mid and B mid represent the midpoint values of the Gibbs free energy and the activity coefficient determined by the bisection method without considering the Jacobian matrix, respectively, A prev and B prev represent the midpoint values of the Gibbs free energy and the activity coefficient in the previous iteration process, respectively, J 11 , J 12 , J 21 , and J 22 represent the elements of the Jacobian matrix, and the first number in the element subscript represents the row number, and the second number in the element subscript represents the column number.

[0132] where A new and B new represent the joint search interval of the Gibbs free energy and the activity coefficient.

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

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

[0135] In a 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: Correct the search step according to the determinant and the Frobenius norm to obtain the corrected search step.

[0139] The correction formula is specifically:

[0140]

[0141] where Δθ coupled represents the corrected search step, det(J) represents the determinant of the Jacobian matrix J, and ||J|| F represents the Frobenius norm of the Jacobian matrix J.

[0142] It should be noted that the search step is accurately corrected by calculating the determinant and the Frobenius norm of the Jacobian matrix. The determinant reflects the overall scale change of the matrix, and the Frobenius norm measures the overall size of the matrix. These two indicators are combined to correct the search step, ensuring that the parameter adjustment amplitude is more adaptive to the current gradient information in the optimization process, thereby improving the accuracy and efficiency of optimization. In this way, the step size can be dynamically adjusted during iteration, avoiding excessive adjustment or slow convergence, 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 to obtain the optimized thermodynamic parameters.

[0144] In a possible implementation, S504 is specifically:

[0145] The combined search interval is taken as the adjustment direction, and the modified search step is taken as the adjustment amplitude to adjust the initial thermodynamic parameters to obtain the optimized thermodynamic parameters.

[0146] It can be understood that the initial thermodynamic parameters are accurately adjusted by taking the combined search interval as the adjustment direction and the modified search step as the adjustment amplitude. The advantage of this process is that by combining the accurately calculated search interval and step, rapid and stable parameter optimization can be achieved, avoiding the problems of excessive adjustment or slow convergence, ensuring that the optimization process is more efficient and accurate, and ultimately obtaining the optimized thermodynamic parameters that meet the actual requirements.

[0147] Specifically, the process quantifies the relationship between Gibbs free energy and activity coefficient by calculating the Jacobian matrix and optimizes the search strategy by combining the depth metric coefficient. First, the combined search interval of Gibbs free energy and activity coefficient is calculated using the Jacobian matrix to ensure that the parameters converge simultaneously during the iteration process. By approximating the elements of the Jacobian matrix using the finite difference method, the gradient in each iteration can be accurately calculated, ensuring the accuracy and stability of the search step correction. The advantage of this method is that by simultaneously adjusting the Gibbs free energy and activity coefficient, it can effectively avoid the error accumulation problem that occurs during single parameter optimization, and by accurately correcting the search step using the Jacobian matrix, it can improve the convergence speed and accuracy of the optimization process.

[0148] S6: Update the initial thermodynamic parameters with the optimized thermodynamic parameters and return to step S2 until the comprehensive deviation value is less than the preset comprehensive deviation value.

[0149] Specifically, the optimized thermodynamic parameters are updated as the initial thermodynamic parameters, and then returned to step S2 for new simulation calculation. This process will be iterated until the comprehensive deviation value is less than the preset threshold, ensuring that the simulation results gradually approach the target value. In this way, the thermodynamic parameters can be continuously optimized, the model can be accurately adjusted, and the consistency between the simulation results and the experimental data can be achieved, thereby improving the accuracy and reliability of the correction.

[0150] It should be noted that the size of the preset comprehensive deviation value can be set according to actual needs by those skilled in the art, and the present application does not limit it.

[0151] S7: Output the optimized thermodynamic parameters to complete the thermodynamic parameter correction.

[0152] In practical applications, the initial thermodynamic parameters such as Gibbs free energy and activity coefficient are optimized through step-by-step iteration. First, the deviation value between the calculation simulation result and the expected result is calculated, and the search step is adjusted according to the deviation value. Then, the relationship between the Gibbs free energy and the activity coefficient is quantified by using the Jacobian matrix, and the joint search interval and the corrected search step are accurately calculated. This process ensures that the two parameters can converge simultaneously, avoiding the problems of excessive adjustment or slow convergence. By combining gradient scaling, dynamic damping factor and other technologies, the adjustment amplitude and step size can be dynamically adjusted, and the optimization process is more efficient and accurate, and finally the optimized thermodynamic parameters meeting the actual requirements are obtained. This method not only improves the efficiency and accuracy of the correction process, but also avoids the error accumulation and instability in the traditional method, ensuring the reliability and scalability of the optimization results.

[0153] In the embodiments of the present application, the gradient scaling technology is introduced to dynamically adjust the search step, which can intelligently enhance the step size or apply damping force according to the deviation size, avoiding the problems of low efficiency or missing the optimal solution caused by excessive or slow adjustment in the traditional method. At the same time, the bisection search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and the activity coefficient, fully considering the coupling relationship between them, thereby improving the accuracy and efficiency of the correction process. In addition, the automatic process reduces human intervention and eliminates human error, significantly improving the reliability and scalability of parameter correction.

[0154] Referring to the accompanying drawings Figure 2 , a structure schematic diagram of a thermodynamic parameter correction system of an HCh software provided by the present application is shown.

[0155] The present application also provides a thermodynamic parameter correction system 20 of an HCh software, which is applied to the above-mentioned thermodynamic parameter correction method of the HCh software, comprising:

[0156] A processor 201.

[0157] A memory 202, the memory 202 stores computer readable instructions, and when the computer readable instructions are executed by the processor 201, the thermodynamic parameter correction method of the HCh software is realized.

[0158] The thermodynamic parameter correction system 20 of the HCh software provided by the present application can execute the above-mentioned thermodynamic parameter correction method of the HCh software, and realize the same or similar technical effects. To avoid repetition, the present application will not be described again.

[0159] It should be appreciated that a processor in the embodiments of the present application can be a central processing unit (CPU), and can also 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 gates or transistor logic, discrete hardware components, etc. The general purpose processor can be a microprocessor or the processor can be any conventional processor.

[0160] It should also be appreciated that the memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory, among others. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example, and 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 SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DR RAM). The RAM can have a memory controller that provides an interface between the processor and the RAM.

[0161] The above-described embodiments can be implemented in whole or in part by software, hardware (e.g., circuitry), firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of 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 and executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. 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. The semiconductor medium can be a solid-state disk.

[0162] It should be understood that the term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship, which can be understood according to the context before and after it.

[0163] In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0164] It should be understood that in various embodiments of the present application, the size of the sequence number of each process described above does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0165] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed 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 implementation should not be considered beyond the scope of the present application.

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

[0167] In several embodiments provided by the present application, 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 schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0168] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0169] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0170] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0171] The embodiment of the present application provides a computer readable storage medium, which stores a computer program. The program is executed by a processor to realize the thermodynamic parameter correction method of HCh software as described in the method embodiment.

[0172] The computer readable storage medium provided by the present application can realize the steps and effects of the thermodynamic parameter correction method of the HCh software of the above-mentioned method embodiment. To avoid repetition, the present application will not be described again.

[0173] The technical solutions provided by the embodiment of the present application have at least the following beneficial effects:

[0174] In the embodiment of the present application, the gradient scaling technique is introduced to dynamically adjust the search step size, which can intelligently enhance the step size or apply damping force according to the deviation size, avoiding the problems of low efficiency or missing the best solution caused by too fast or too slow adjustment in the traditional method. At the same time, the bisection search method considering the coupling relationship can simultaneously adjust the Gibbs free energy and activity coefficient, fully considering the coupling relationship between them, thereby improving the accuracy and efficiency of the correction process. In addition, the automated process reduces human intervention and eliminates human error, significantly improving the reliability and scalability of parameter correction.

[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0176] The following points need to be explained:

[0177] (1) The drawings of the embodiments of the present application only involve the structures related to the embodiments of the present application, and other structures can refer to the usual design.

[0178] (2) For clarity, in the drawings used to describe the embodiments of the present application, the thickness of layers or regions are exaggerated or reduced, that is, the drawings are not drawn on scale. It will be understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, it can be "directly" on or under the other element or an intervening element can also be present.

[0179] (3) The embodiments of the present application and the features in the embodiments can be combined if they do not conflict with each other to obtain new embodiments.

[0180] The above merely illustrates the embodiments of the present application, but the protection scope of the present application is not limited thereto, and should be subject to the protection 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

  • Antenna polarization simulation method based on phase and amplitude calibration

    CN119109527A

  • Hollow silicon oxide microsphere preparation parameter optimization method based on flow field simulation

    CN120430243A

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

    CN120597698A