Search

CN-121525354-B - Thermodynamic parameter correction method and system for HCh software

CN121525354BCN 121525354 BCN121525354 BCN 121525354BCN-121525354-B

Abstract

The invention provides a thermodynamic parameter correction method and system for HCh software, and relates to the technical field of parameter correction. The method comprises the steps of determining initial thermodynamic parameters of target components, inputting the initial thermodynamic parameters into HCh software for preliminary simulation, outputting balance concentration of the target components, calculating a comprehensive deviation value of the balance concentration of the target components and the balance concentration of expected target components, determining a search step length according to the relative magnitude between the comprehensive deviation value and the balance concentration of expected target components by combining a gradient scaling technology, synchronously adjusting Gibbs free energy and activity coefficients in the initial thermodynamic parameters in a coupling mode by utilizing a binary search method according to the search step length to obtain optimized thermodynamic parameters, updating the initial thermodynamic parameters by utilizing the optimized thermodynamic parameters, returning to re-simulation until the comprehensive deviation value is smaller than a preset comprehensive deviation value, and outputting the optimized thermodynamic parameters to finish thermodynamic parameter correction. The invention improves the accuracy and efficiency of parameter correction.

Inventors

  • LING YIFAN
  • Zhong Richen
  • LI YANXIA
  • LI ZIMENG

Assignees

  • 北京科技大学

Dates

Publication Date
20260505
Application Date
20250930

Claims (10)

  1. 1.A thermodynamic parameter correction method for HCh software, comprising: S1, determining initial thermodynamic parameters of a target component; S2, inputting the initial thermodynamic parameters into the HCh software for preliminary simulation, and outputting the equilibrium concentration of the target component; s3, calculating a comprehensive deviation value between the target component equilibrium concentration and the expected target component equilibrium concentration; S4, determining a search step length according to the relative magnitude between the comprehensive deviation value and the expected target component equilibrium concentration and combining a gradient scaling technology; S5, synchronously adjusting the Gibbs free energy and activity coefficient in the initial thermodynamic parameter in a coupling mode by utilizing a binary search method according to the search step length to obtain an optimized thermodynamic parameter; s6, updating the initial thermodynamic parameter by using the optimized thermodynamic parameter, and returning to the step S2 until the comprehensive deviation value is smaller than a preset comprehensive deviation value; And S7, outputting the optimized thermodynamic parameters to finish thermodynamic parameter correction.
  2. 2. The method of claim 1, wherein the initial thermodynamic parameters include the gibbs free energy and the activity coefficient.
  3. 3. The thermodynamic parameter correction method for HCh software according to claim 1, wherein S3 specifically comprises: s301, calculating a span value between the target component equilibrium concentration and the expected target component equilibrium concentration; s302, if the span value is smaller than the preset span value, entering a step S303, otherwise, entering a step S304; S303, determining a deviation value through a calculation mode of the relative percentage, and entering a step S305; S304, determining the deviation value through a logarithmic scale calculation mode; and S305, carrying out weighted average on the determined deviation value to obtain the comprehensive deviation value.
  4. 4. The thermodynamic parameter correction method for HCh software according to claim 1, wherein S4 specifically comprises: S401, establishing a depth measurement coefficient for quantifying the nonlinear relation between the comprehensive deviation value and the component concentration; S402, combining the depth measurement coefficient, and calculating a dynamic damping factor for controlling the adjustment amplitude of the initial thermodynamic parameter through a Stokes damping formula; S403, combining the dynamic damping factor and the depth measurement coefficient, and calculating the search step size by the gradient scaling technology.
  5. 5. The thermodynamic parameter correction method for HCh software according to claim 4, wherein the depth metric coefficient calculation process specifically comprises: S4011, calculating Euclidean distances between the target component equilibrium concentrations of different target components and the desired target component equilibrium concentration; S4012 calculating the arithmetic mean of the desired target component equilibrium concentrations for the different target components; s4013. Calculating the standard deviation of the equilibrium concentration of the desired target components for the different target components; S4014. Calculate the depth measurement factor based on the Euclidean distance, the arithmetic mean of the equilibrium concentration of the desired target component, and the standard deviation of the equilibrium concentration of the desired target component.
  6. 6. The thermodynamic parameter correction method for HCh software according to claim 4, wherein S5 specifically comprises: s501, calculating a jacobian matrix between the Gibbs free energy and the activity coefficient by combining the depth measurement coefficient; s502, determining a joint search interval of the Gibbs free energy and the activity coefficient according to the jacobian matrix; S503, correcting the searching step length by utilizing the jacobian matrix to ensure that the Gibbs free energy and the activity coefficient are converged synchronously; And S504, adjusting the initial thermodynamic parameters according to the joint search interval and the corrected search step length to obtain the optimized thermodynamic parameters.
  7. 7. The thermodynamic parameter correction method for HCh software according to claim 6, wherein S503 specifically comprises: s5031, calculating determinant of the jacobian matrix; s5032, calculating Frobenius norms of the jacobian matrix; And S5033, correcting the search step length according to the determinant and the Frobenius norm to obtain a corrected search step length.
  8. 8. The thermodynamic parameter correction method for HCh software according to claim 6, wherein S504 is specifically: and taking the joint search interval as an adjusting direction, taking the corrected search step length as an adjusting amplitude, and adjusting the initial thermodynamic parameter to obtain the optimized thermodynamic parameter.
  9. 9. A thermodynamic parameter correction system for HCh software, comprising: A processor; A memory having stored thereon computer readable instructions which, when executed by the processor, implement the thermodynamic parameter correction method of HCh software as claimed in any one of claims 1 to 8.
  10. 10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a thermodynamic parameter correction method of HCh software according to any one of claims 1 to 8.

Description

Thermodynamic parameter correction method and system for HCh software Technical Field The invention relates to the technical field of parameter correction, in particular to a thermodynamic parameter correction method and system of HCh software. Background HCh software is a computational platform for geochemical and thermodynamic simulations that is capable of modeling chemical equilibrium states in multicomponent systems. Based on the Gibbs free energy minimization principle, the method can calculate the chemical balance of multiphase systems such as fluid, mineral, gas and the like, and is widely applied to the fields of ore forming process, fluid-rock interaction, environmental geochemistry and the like. HCh software relies on standard parameters in thermodynamic databases such as gibbs free energy and activity coefficients. Parameters used in the thermodynamic database of HCh software may deviate from actual experimental data. Due to the complexity of the natural system and the limitations of experimental data in the database, the simulation results often cannot reflect the real situation completely and accurately. By correcting thermodynamic parameters in HCh software, the simulation precision and reliability can be improved, and the simulation result is ensured to be better consistent with experimental data, so that more reliable numerical prediction and theoretical support are provided for geochemistry research, environmental science and other fields. However, the existing thermodynamic parameter correction of HCh software mainly relies on manual adjustment of thermodynamic parameters, has low efficiency and is easily affected by human factors, and the lack of systematic optimization paths results in slow parameter adjustment process, and the optimal thermodynamic parameters are difficult to determine, so that the optimization process has strong subjectivity and poor expandability. Disclosure of Invention The invention provides a thermodynamic parameter correction method and a thermodynamic parameter correction system for HCh software, which aim to solve the technical problems that thermodynamic parameter correction of HCh software in the prior art mainly depends on manual adjustment of thermodynamic parameters, has low efficiency and is easily influenced by human factors, and a systematic optimization path is lacked to cause slow parameter adjustment process, and optimal thermodynamic parameters are difficult to determine, so that the optimization process is high in subjectivity and poor in expandability. The technical scheme provided by the embodiment of the invention is as follows: In a first aspect, an embodiment of the present invention provides a thermodynamic parameter correction method for HCh software, including: S1, determining initial thermodynamic parameters of a target component; S2, inputting initial thermodynamic parameters into HCh software for preliminary simulation, and outputting the equilibrium concentration of the target component; s3, calculating a comprehensive deviation value of the equilibrium concentration of the target component and the equilibrium concentration of the expected target component; S4, determining a search step length according to the relative magnitude between the comprehensive deviation value and the balance concentration of the expected target component and combining a gradient scaling technology; s5, synchronously adjusting initial thermodynamic parameters in a coupling mode by utilizing a binary search method according to the search step length to obtain optimized thermodynamic parameters; S6, updating initial thermodynamic parameters by using optimized thermodynamic parameters, and returning to the step S2 until the comprehensive deviation value is smaller than a preset comprehensive deviation value; And S7, outputting optimized thermodynamic parameters to finish thermodynamic parameter correction. Optionally, the initial thermodynamic parameters include the gibbs free energy and the activity coefficient. Optionally, the step S3 specifically includes: s301, calculating a span value between the target component equilibrium concentration and the expected target component equilibrium concentration; s302, if the span value is smaller than the preset span value, entering a step S303, otherwise, entering a step S304; S303, determining a deviation value through a calculation mode of the relative percentage, and entering a step S305; S304, determining the deviation value through a logarithmic scale calculation mode; and S305, carrying out weighted average on the determined deviation value to obtain the comprehensive deviation value. Optionally, the step S4 specifically includes: S401, establishing a depth measurement coefficient for quantifying the nonlinear relation between the comprehensive deviation value and the component concentration; S402, combining the depth measurement coefficient, and calculating a dynamic damping factor for controlling the adjustment a