Pseudo-density root calculation method and device

By determining the mechanical critical density of the target equation of state in a chemical process and using extrapolation equations to calculate the pseudo-density root, the problems of high computational cost and convergence difficulty of non-cubic equations of state are solved, thus improving the accuracy and stability of chemical process simulation.

CN121789810APending Publication Date: 2026-04-03SUPCON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, non-cubic equations of state have high computational costs and difficulty in convergence when calculating pseudo-density roots, resulting in unstable phase equilibrium calculations and low accuracy in chemical process simulations.

Method used

By determining the target equation of state, calculating the mechanical critical density, and using extrapolation equations to calculate the pseudo-density root under a given pressure, computational costs are reduced and convergence stability is improved.

Benefits of technology

This approach reduces computational costs when dealing with complex equations of state and improves the accuracy and stability of phase equilibrium calculations in chemical process simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121789810A_ABST
    Figure CN121789810A_ABST
Patent Text Reader

Abstract

The invention discloses a pseudo-density root calculation method and device. The method comprises the following steps: determining a target state equation according to components of a calculation system; thermodynamic state variables of the calculation system are determined through the target state equation, and the thermodynamic state variables at least comprise pressure and density; under the condition that the pseudo-density root of the target state equation is determined to be solved, the mechanical critical density of the calculation system is calculated, and the mechanical critical density is the density when the first derivative and the second derivative of the pressure to the density are both equal to zero; according to the target interval of the mechanical critical density, an extrapolation equation is determined, and the pseudo-density root of the target state equation under the given pressure is determined through the extrapolation equation. According to the method, the technical problems of unstable phase equilibrium calculation and low accuracy in chemical process simulation caused by high calculation cost and difficulty in convergence when a related pseudo-density root calculation method is used for processing a complex state equation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chemical process simulation, and more specifically, to a method and apparatus for calculating pseudo-density roots. Background Technology

[0002] Chemical process simulation is an indispensable tool in chemical engineering. Its core lies in accurately calculating the thermodynamic properties of fluids, such as density, enthalpy, entropy, and fugacity, to achieve precise simulation and optimization of complex chemical processes. In this process, equations of state, as mathematical models describing the phase behavior of fluids, play a crucial role. Equations of state can express the relationships between the volume, pressure, temperature, and composition of a fluid in equation form, and are the foundation for phase equilibrium calculations and thermodynamic property predictions.

[0003] Cubic equations of state, such as the Redlich-Kwong (RK) and Peng-Robinson (PR) equations, were widely used in early chemical process simulations due to their concise mathematical form and ease of solving analytical solutions. However, with a deeper understanding of the real behavior of fluids, the limitations of cubic equations of state have become increasingly apparent; they cannot accurately describe the complex behavior of fluids under high temperature and pressure, in critical regions, and near critical points. Therefore, non-cubic equations of state, such as the Benedict-Webb-Rubin-Starling (BWRS) and Perturbed Chain-Statistical Association Fluid Theory (PC-SAFT) equations, have gradually become a research and application hotspot because they can more accurately reflect the real properties of fluids.

[0004] While noncubic equations of state offer higher accuracy in predicting thermodynamic properties, their computational complexity increases significantly. Traditional methods for solving the density roots of noncubic equations of state often employ iterative algorithms, such as Newton's method and quasi-Newton methods. However, due to the more complex mathematical form of noncubic equations of state, these iterative algorithms may struggle to converge to the correct physical roots in certain situations, especially when dealing with multi-component mixtures and extreme operating conditions. This leads to a sharp increase in computational cost and difficulty, causing instability or even non-convergence in phase equilibrium calculations during chemical process simulations, thus greatly impacting the accuracy and efficiency of the simulations.

[0005] Furthermore, the strategies used in related technologies to calculate pseudo-density roots (i.e., estimated density values ​​used to fill the computational gap when the equation of state cannot directly provide physical roots) are often based on simplified or idealized assumptions of the equation of state. This may produce large errors when dealing with complex non-cubic equations of state, especially in the region where the system is close to the critical point or phase equilibrium boundary. The accuracy of the calculation of pseudo-density roots has a particularly significant impact on the overall simulation results.

[0006] There is currently no effective solution to the above problems. Summary of the Invention

[0007] This application provides a method and apparatus for calculating pseudo-density roots, which at least solves the technical problems of unstable and low accuracy of phase equilibrium calculations in chemical process simulation caused by the high computational cost and convergence difficulty of related pseudo-density root calculation methods when dealing with complex equations of state.

[0008] According to one aspect of this application, a method for calculating a pseudo-density root is provided, comprising: determining a target equation of state based on the constituent components of a computational system, wherein the computational system includes at least one of the following: gas, liquid, and solid; determining the thermodynamic state variables of the computational system through the target equation of state, wherein the thermodynamic state variables include at least: pressure and density; calculating the mechanical critical density of the computational system when a pseudo-density root for obtaining the target equation of state is determined, wherein the mechanical critical density is the density when both the first and second derivatives of pressure with respect to density are equal to zero; determining an extrapolation equation based on a target range of the mechanical critical density, and determining the pseudo-density root of the target equation of state at a given pressure through the extrapolation equation.

[0009] Optionally, calculating the mechanical critical density of the computational system includes: obtaining a target temperature value when the target equation of state is a non-cubic equation of state; constructing a simplified equation to describe the pressure-density relationship based on the target equation of state, the constituent components of the computational system, and the target temperature value, and selecting at least two density fitting points within a preset density interval, wherein the pressure value calculated by the simplified equation and the target equation of state at each density fitting point is equal; determining the undetermined coefficients in the simplified equation based on the density fitting points to obtain the target simplified equation; calculating the first and second derivatives of pressure with respect to density in the target simplified equation, and determining whether there exists a target density in the target simplified equation that satisfies that the first and second derivatives of pressure with respect to density are both zero; if so, determining the target density as the mechanical critical density under the constituent components and the target temperature value.

[0010] Optionally, based on the target range of mechanical critical density, an extrapolation equation is determined, including: when calculating the root of the gas phase density, the following steps are performed: based on the target range of mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, the product of the lower limit of the mechanical critical density in the target range and the scaling factor is the left boundary of the extrapolation density range, and the scaling factor is less than 1; within the extrapolation density range, a first density is found that satisfies the target state equation, where the pressure-density derivative is equal to a first preset value; if a first density is found, the first density is determined as the gas phase extrapolation density. Extrapolating density point: Substitute the extrapolated density point of the gas phase into the target equation of state to obtain the corresponding extrapolated pressure of the gas phase. If the extrapolated pressure of the gas phase is less than the preset pressure, determine the extrapolation equation according to the first target condition. The first target condition includes: at the extrapolated density point of the gas phase, the pressure value calculated by the extrapolation equation is equal to the extrapolated pressure of the gas phase; at the extrapolated density point of the gas phase, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target equation of state; when the density independent variable in the extrapolation equation is equal to the preset reference density value, the function value of the extrapolation equation is zero.

[0011] Optionally, the method further includes: if the first density is not found, determining the upper limit of the mechanical critical density in the target interval as the gas phase extrapolation density point.

[0012] Optionally, based on the target range of the mechanical critical density, the extrapolation equation is determined, including: when calculating the root of the liquid phase density, the following steps are performed: based on the target range of the mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, and the lower limit of the mechanical critical density in the target range is the left boundary of the extrapolation density range; within the extrapolation density range, a second density is found that satisfies the second preset value, where the pressure-density derivative of the target state equation is equal to the second preset value; if the second density is found, it is determined as the liquid phase extrapolation density point; the liquid phase extrapolation density point is substituted into the target state equation to obtain the corresponding liquid phase extrapolation point pressure, and if the liquid phase extrapolation point pressure is greater than the preset pressure, the extrapolation equation is determined according to the second target condition, wherein the second target condition includes: at the liquid phase extrapolation density point, the pressure value calculated by the extrapolation equation is equal to the liquid phase extrapolation point pressure; at the liquid phase extrapolation density point, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target state equation for the liquid phase extrapolation density point.

[0013] Optionally, the method further includes: if a second density is not found, determining the upper limit of the mechanical critical density in the target interval as the liquid phase extrapolation density point.

[0014] Optionally, the determination of whether to obtain a pseudo-density root of the target state equation is made by the following methods: determining the number of density roots of the target state equation; and determining to obtain a pseudo-density root of the target state equation when the number of density roots is one and the density roots do not conform to a preset phase reference standard.

[0015] According to another aspect of this application, a device for calculating a pseudo-density root is also provided, comprising: a first determining module for determining a target equation of state based on the constituent components of a calculation system, wherein the calculation system includes at least one of the following: gas, liquid, and solid; a second determining module for determining the thermodynamic state variables of the calculation system through the target equation of state, wherein the thermodynamic state variables include at least pressure and density; a calculation module for calculating the mechanical critical density of the calculation system, wherein the mechanical critical density is the density when both the first and second derivatives of pressure with respect to density are equal to zero, given that a pseudo-density root of the target equation of state is determined; and a third determining module for determining an extrapolation equation based on a target range of the mechanical critical density, and determining the pseudo-density root of the target equation of state at a given pressure through the extrapolation equation.

[0016] According to another aspect of this application, a non-volatile storage medium is also provided, the storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the above-described method for calculating the pseudo-density root.

[0017] According to another aspect of this application, an electronic device is also provided, comprising: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the above-described method for calculating the pseudo-density root.

[0018] According to another aspect of this application, a computer program is also provided, wherein when the computer program is executed by a processor, it implements the above-described method for calculating the pseudo-density root.

[0019] According to another aspect of this application, a computer program product is also provided, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program that, when executed by a processor, implements the above-described method for calculating the pseudo-density root.

[0020] In this application, a target equation of state is determined based on the constituent components of the computational system, wherein the computational system includes at least one of the following: gas, liquid, and solid; the thermodynamic state variables of the computational system are determined through the target equation of state, and the thermodynamic state variables include at least pressure and density; the mechanical critical density of the computational system is calculated after determining the pseudo-density root of the target equation of state, wherein the mechanical critical density is the density when both the first and second derivatives of pressure with respect to density are equal to zero; an extrapolation equation is determined based on the target range of the mechanical critical density, and the pseudo-density root of the target equation of state under a given pressure is determined through the extrapolation equation. By introducing a strategy for calculating the mechanical critical density based on the tangent point method and determining the extrapolation equation, the computational cost is reduced and the convergence stability is improved when dealing with complex equations of state. This achieves the technical effect of high accuracy and numerical stability in phase equilibrium calculation in chemical process simulation, and solves the technical problem of unstable and low accuracy in phase equilibrium calculation in chemical process simulation caused by the high computational cost and convergence difficulty of related pseudo-density root calculation methods when dealing with complex equations of state. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 This is a flowchart of a method for calculating a pseudo-density root according to an embodiment of this application;

[0023] Figure 2 This is a flowchart of another method for calculating pseudo-density roots according to an embodiment of this application;

[0024] Figure 3 This is a schematic diagram illustrating the calculation of a gas-phase pseudo-density root according to an embodiment of this application;

[0025] Figure 4 This is a structural diagram of a pseudo-density root calculation device according to an embodiment of this application;

[0026] Figure 5 This is a hardware structure block diagram of a computer terminal for a pseudo-density root calculation method according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] According to an embodiment of this application, a method embodiment for calculating pseudo-density roots is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] Figure 1 This is a flowchart of a method for calculating a pseudo-density root according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0031] Step S102: Determine the target equation of state based on the constituent components of the calculation system, wherein the calculation system includes at least one of the following: gas, liquid, and solid.

[0032] In step S102, the constituent components of the computational system are analyzed, and a target equation of state suitable for the system is selected. The computational system can contain gases, liquids, or solids, or any combination thereof. The selection of the target equation of state is based on the type of fluid in the system and the operating conditions, ensuring that the selected equation can accurately describe the thermodynamic behavior of the system. For example, for a binary gas mixture system composed of methane and n-butane, with an operating temperature of 21°C and an operating pressure of 50 bar, the target equation of state is preferably a non-cubic equation of state, such as PC-SAFT, which can effectively handle complex mixtures to accurately reflect the true properties of the gas mixture.

[0033] The choice of the equation of state affects the accuracy of subsequent thermodynamic property calculations and the stability of the calculation process.

[0034] The target equation of state can be any equation of state suitable for describing the various thermodynamic properties (such as density, enthalpy, entropy, etc.) of a specific chemical system under given temperature, pressure, and composition conditions. Below are some common examples of equations of state:

[0035] Cubic equations of state, such as the Peng-Robinson (PR) or Redlich-Kwong (RK) equations, are typically expressed as density polynomial equations and are suitable for gas-liquid mixtures under medium to high temperatures and pressures. Non-cubic equations of state, such as the Perturbed Chain SAFT (PC-SAFT), Soave-Redlich-Kwong (SRK), and van der Waals equations, can include more parameters and complex interaction terms to more accurately reflect intermolecular forces, and are particularly suitable for polar fluids, correlated fluids, and fluids under high pressures.

[0036] Determining the target equation of state is fundamental to the entire calculation process. It not only determines how to calculate key thermodynamic variables such as density and pressure, but also indirectly affects the calculation strategy and reliability of pseudo-density roots in subsequent steps.

[0037] Step S104: Determine the thermodynamic state variables of the calculation system through the target equation of state. The thermodynamic state variables include at least pressure and density.

[0038] In step S104, the thermodynamic state variables of the calculation system are determined through the selected target equation of state, among which pressure and density are the most crucial fundamental variables. Specifically, when the system's temperature, component molar ratio, and other necessary parameters are input, the target equation of state can output the corresponding pressure and density values. This process is essentially a quantitative description of the thermodynamic state of the system under given conditions, serving as the premise and foundation for all subsequent thermodynamic property calculations. For example, for a binary mixture system—methane and n-butane—using the PC-SAFT equation of state, under set environmental conditions such as a temperature of 21°C and a pressure of 50 bar, the target equation of state will calculate the molar density of the system using a molar composition of 0.5:0.5. As a highly nonlinear equation of state, PC-SAFT can meticulously capture the microscopic interactions between fluids, thereby providing density and pressure data that are closer to reality.

[0039] Step S106: Given that the pseudo-density root of the target state equation is determined, calculate the mechanical critical density of the system, where the mechanical critical density is the density when both the first and second derivatives of pressure with respect to density are equal to zero.

[0040] The mechanical critical density is a specific density value in the equation of state that satisfies the condition that both the first and second derivatives of pressure with respect to density are zero. While the mechanical critical density is not necessarily equivalent to the true critical density of the fluid, for mixtures, it provides a stable reference point for calculating pseudo-density roots, ensuring that the equation of state converges quickly to a physically meaningful root during iterative solutions. In chemical process simulations, the mechanical critical density can be considered a "pseudo-critical point" to guide the construction of extrapolation equations, which is particularly important when dealing with complex nonlinear equations of state.

[0041] In the theory of state equations, pressure is considered a function of density, temperature, and molar mass. When the first derivative of pressure with respect to density is zero, it means that the rate of change of pressure with respect to density has reached a stationary state at this point. The second derivative being zero further indicates that this stationary state is a critical point, that is, the mechanical critical density represents a special position in the process of fluid transition from the gas phase to the liquid phase. Near this position, the properties of the fluid change drastically, such as the temperature and pressure at the critical point, and the associated critical density.

[0042] For example, when dealing with a binary mixture of methane and n-butane, the PC-SAFT equation of state is used to calculate thermodynamic properties. Due to the high nonlinearity and complexity of the PC-SAFT equations, direct solutions may be difficult. In such cases, the mechanical critical density acts as a bridge, not only helping to determine a reasonable density range but also providing necessary information for constructing extrapolation equations. This ensures that, under a given pressure, even if the equation of state itself cannot directly provide all physically meaningful density roots, a reasonable pseudo-density root can be calculated through extrapolation, thus guaranteeing the stability and accuracy of phase equilibrium calculations such as flash distillation and rectification.

[0043] It is worth noting that when calculating the mechanical critical density using the tangent point method, a simplified two-parameter equation can be constructed. This equation, at a specific temperature and composition, satisfies the condition that the pressure-density derivative equals the pressure-density ratio. By combining this simplified two-parameter equation with the condition that pressure equals zero when density equals zero, the computational efficiency and stability can be further improved. The coefficients of this simplified equation need to be determined based on the behavior of the equation of state at specific points, ensuring that it can well approximate the behavior of the original equation of state near the tangent point.

[0044] Specifically, the mechanical critical density is calculated using the following formula:

[0045]

[0046] in, For pressure, Let be the mechanical critical temperature, and z be the molar composition of different components. For cubic equations of state, the analytical derivatives can be used directly. For complex non-cubic equations of state, automatic differentiation can be used to obtain the first and second derivatives of pressure with respect to density, which can then be solved using iterative algorithms. .

[0047] For complex state equation methods, the complex iterative process may be difficult to converge or find a suitable root. The tangent point method provides a simplified solution. The equations were used, and the first and second derivatives were calculated by simplifying the equations to find the mechanical critical density. At specific temperatures and compositions, There exists a single point of tangency on the curve where the derivative of pressure with respect to density equals the ratio of pressure to density. Furthermore, when density is zero, pressure is also zero. (Combined...) (where k represents the Boltzmann constant), a simplified equation fitting the state equation curve can be obtained. This simplified equation is not a simple Taylor expansion, but a combination of the Taylor expansion and the fitting at the tangent point. By ensuring that both the state equation and the simplified equation are satisfied at certain points, the equation coefficients can be calculated. Under specific temperatures and compositions, the simplified equation is calculated to obtain... Given a specific composition, the corresponding mechanical critical temperature is calculated using an iterative algorithm, at which point the simplified equations are obtained. The points need to satisfy to obtain .

[0048] Step S108: Based on the target range of mechanical critical density, determine the extrapolation equation, and through the extrapolation equation, determine the pseudo-density root of the target state equation under a given pressure.

[0049] Extrapolation equations are simplified equations used to estimate density roots under specific conditions (e.g., when a direct solution to the equation of state fails to yield a reasonable solution or the calculated density root does not satisfy physical meaning). Extrapolation equations can take the form of linear, quadratic, or exponential equations, and they provide a reasonable approximation near the mechanical critical density point of the target equation of state. For example, when solving for pseudo-density roots in the gas or liquid phase, the extrapolation equation can satisfy the same pressure and pressure-density derivative values ​​at the extrapolated density point in the gas or liquid phase as the target equation of state, thus ensuring the consistency and stability of the calculation results.

[0050] In step S108, based on the previously calculated mechanical critical density as a reference, a target range for the extrapolation equation is established to address the problem that the target equation of state may not directly produce a physically reasonable density root under given pressure conditions. The target range refers to the density range set for the extrapolation equation above and below the mechanical critical density, used to ensure that a reasonable pseudo-density root can be obtained in the case of a single density root, or to maintain computational continuity and stability.

[0051] Pseudo-density roots are generated by the equation of state under certain special conditions to replace unreasonable or missing true density roots. In chemical process simulations, especially in phase equilibrium scenarios such as flash evaporation calculations and distillation column design, the calculation of pseudo-density roots can help avoid model convergence problems and ensure the continuity and stability of the calculation process. When the direct solution of the equation of state cannot provide sufficient density roots or the provided roots do not meet the conditions of the physical phase (such as the absence of appropriate density values ​​between the upper limit of the gas phase density root and the lower limit of the liquid phase density root), the density values ​​calculated using extrapolation equations, i.e., pseudo-density roots, can be used as inputs to ensure the smooth progress of the simulation process. For example, in the calculation of pseudo-density roots in the gas phase, the extrapolation equation will generate a density root value at a given pressure, and even at the pressure of the upper limit of the gas phase density root, it can give a reasonable density value that approximates the gas phase behavior.

[0052] For solving the gas phase density root, the determined extrapolated density range can be [mechanical critical density × 0.7, mechanical critical density × 0.95]. This step aims to find a density value close to the upper limit of the gas phase density root of the equation of state. An equation is constructed to determine the extrapolation point by setting the derivative of pressure with respect to density to a small positive number δ (e.g., 0.1). The extrapolation point is calculated based on the target equation of state at a specific temperature, and if the equation cannot provide a solution, the mechanical critical density × 0.95 is directly used as the extrapolation point. Substituting the extrapolation point back into the equation of state, the corresponding pressure value is calculated and compared to the given pressure. If the calculated pressure value is less than the given pressure, the mechanism of using the extrapolation equation to determine the pseudo-density root is triggered.

[0053] In chemical process simulation, applying the above steps can enhance the robustness and adaptability of simulation software. For example, in flash evaporation, it is necessary to determine the equilibrium density and composition of the gas and liquid phases. If the direct solution of the equation of state at a certain pressure results in the gas and liquid phases having the same density, using pseudo-density roots can distinguish the two phases, ensuring the accuracy of the calculation. The design of distillation columns relies on accurately calculating the density and composition of the gas and liquid phases on each tray. Under extreme operating conditions, using pseudo-density roots can avoid numerical instability in the iterative calculation process, ensuring the optimization of tray design. In chemical reactions carried out in reactors, the thermodynamic equilibrium analysis requires calculating the densities of different reaction products. Using pseudo-density roots can help overcome the computational difficulties caused by non-ideal behavior, providing accurate data for reaction kinetics and thermodynamic analysis.

[0054] In general, in chemical process simulation, the appropriate selection of the target equation of state, accurate calculation of the mechanical critical density, and the design and application of extrapolation equations to calculate the pseudo-density root are key steps to ensure the stability and reliability of the simulation process, especially when dealing with nonlinear and complex mixture systems. The combined application of these methods enables chemical engineers to effectively simulate and predict the behavior of chemical processes under various operating conditions, thereby optimizing design and operating strategies.

[0055] The following are Figure 1 The steps shown are illustrated and explained by way of example.

[0056] According to some optional embodiments of this application, the mechanical critical density of the computational system can be calculated by the following method: when the target equation of state is a non-cubic equation of state, obtain the target temperature value; based on the target equation of state, the constituent components of the computational system, and the target temperature value, construct a simplified equation to describe the pressure-density relationship, and select at least two density fitting points within a preset density range, wherein the pressure value calculated by the simplified equation and the target equation of state at each density fitting point is equal; based on the density fitting points, determine the undetermined coefficients in the simplified equation to obtain the target simplified equation; calculate the first and second derivatives of pressure with respect to density in the target simplified equation, and determine whether there exists a target density in the target simplified equation that satisfies that the first and second derivatives of pressure with respect to density are both zero; if so, determine the target density as the mechanical critical density under the constituent components and the target temperature value.

[0057] In this embodiment, when the target equation of state is a non-cubic equation of state, the specific temperature value for calculation must first be determined. For example, when the calculation system contains a mixture of methane and n-butane, and the temperature is set to 21°C, the temperature value is a fixed parameter in the calculation system and participates in all subsequent formula derivations and numerical calculations.

[0058] Secondly, based on the selected non-cubic equation of state, the specific mixture composition ratio, and the confirmed target temperature value, a simplified equation describing the relationship between pressure and density is constructed. The simplified equation is designed to mathematically facilitate the handling of complex nonlinear equations while maintaining the fundamental properties of the physical model. To ensure the effectiveness and accuracy of the simplified equation, at least two density values ​​are selected as fitting points within a predetermined density range. The selection of density fitting points should cover a representative range of the entire density range so that the simplified equation can comprehensively reflect the pressure-density relationship of the target equation of state at that temperature and composition.

[0059] Then, the pressure values ​​at these two density fitting points are used as constraints to determine the unknown coefficients in the simplified equations. The pressure values ​​calculated by the simplified equations and the non-cubic target state equations at each density fitting point must be identical to ensure that the behavior of the simplified equations at key points matches that of the target state equations, thus maintaining the physical consistency of the model. By solving the system of equations, all coefficients of the simplified equations can be precisely determined. The resulting target simplified equations will provide a reliable pressure-density description for subsequent calculations across the entire density range.

[0060] The simplified equation is differentiated again to calculate the first and second derivatives of pressure with respect to density. The first derivative reflects the rate of pressure change with density, while the second derivative reflects the trend of this rate. By checking if there exists a density value in the simplified equation such that both the first and second derivatives of pressure with respect to density are zero, the mechanical critical density can be located. The mechanical critical density means finding a density point where the pressure response to density neither increases nor decreases, and there is no tendency for acceleration or deceleration. This is a special mathematical representation of the fluid transition from the gas phase to the liquid phase.

[0061] If a density exists in the target simplified equation that satisfies the condition that both the first and second derivatives are zero, then this specific density value is formally recognized as the mechanical critical density at a given mixture composition and target temperature. Although this density value is theoretical, it is of significant value in chemical process simulation because it provides a stable reference point for handling complex nonlinear equations. Particularly when the equation of state cannot directly provide a meaningful density root under certain conditions, the mechanical critical density, as an alternative reference point, ensures the continuity and accuracy of the calculations, thereby promoting the efficient and robust operation of the entire process simulation.

[0062] According to some alternative embodiments of this application, the extrapolation equation is determined based on the target range of the mechanical critical density, which can be achieved by the following method: When calculating the root of the gas phase density, the following steps are performed: Based on the target range of the mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, and the product of the lower limit of the mechanical critical density in the target range and a scaling factor is the left boundary of the extrapolation density range, with the scaling factor being less than 1; Within the extrapolation density range, a first density is found that satisfies the target state equation, where the derivative of pressure with respect to density is equal to a first preset value; If a first density is found, it is determined as the gas phase extrapolation density point; if not... The first density is found, and the upper limit of the mechanical critical density in the target range is determined as the gas phase extrapolation density point. The gas phase extrapolation density point is substituted into the target state equation to obtain the corresponding gas phase extrapolation pressure. If the gas phase extrapolation pressure is less than the preset pressure, the extrapolation equation is determined according to the first target condition. The first target condition includes: at the gas phase extrapolation density point, the pressure value calculated by the extrapolation equation is equal to the gas phase extrapolation pressure; at the gas phase extrapolation density point, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target state equation; and when the density independent variable in the extrapolation equation is equal to the preset reference value, the function value of the extrapolation equation is zero.

[0063] In this embodiment, firstly, based on the calculated mechanical critical density, an extrapolation density interval is defined. The right boundary of the extrapolation density interval corresponds to the upper limit of the mechanical critical density, and the left boundary is the product of the lower limit of the mechanical critical density and a scaling factor less than 1. The scaling factor determines the width of the extrapolation interval, thus affecting the accuracy and efficiency of subsequent calculations. For example, when the determined mechanical critical density is a specific value, multiplying it by a scaling factor between 0.7 and 0.95 can ensure that the extrapolated density points in the gas phase are within a reasonable density range, neither too sparse nor too dense, to avoid abnormal states in numerical calculations.

[0064] Then, within the extrapolated density range, a specific density value, known as the first density, is searched. This first density satisfies the condition that the derivative of pressure with respect to density in the target equation of state equals a preset small positive number, referred to as the first preset value. This preset value can be 0.1, representing a pressure gradient close to but not equal to the upper limit of the root of the gas phase density. If a first density satisfying this condition is successfully found, this density point is officially recognized as the gas phase extrapolated density point and used for subsequent extrapolation calculations. However, if no density value matching the first preset value is found after traversing the extrapolated density range, then as an alternative strategy, the upper limit of the mechanical critical density is directly used as the gas phase extrapolated density point to ensure the calculation process can continue.

[0065] After determining the extrapolated density point in the gas phase, the next step is to calculate the corresponding pressure value, i.e., the extrapolated pressure. This is achieved by substituting the extrapolated density point into the target equation of state to obtain the pressure value that the system should have at that density point. If the obtained extrapolated pressure is less than the preset pressure value, it means that a valid gas phase density root could not be obtained in direct calculation, or that the density root exceeds the conventional physical range. In this case, introducing an extrapolation equation becomes essential.

[0066] The extrapolation equations are constructed following a series of strict first objective conditions to ensure their applicability and accuracy in calculating the gas phase density root. The primary condition is that the pressure value calculated by the extrapolation equations at the gas phase extrapolation density point must be exactly equal to the pressure at the gas phase extrapolation point obtained through the target equation of state. This ensures the physical consistency between the extrapolation equations and the original equation of state. Secondly, to match the slope of the target equation of state, the first derivative of pressure with respect to density in the extrapolation equations at the gas phase extrapolation density point must also be equal to the corresponding derivative of the target equation of state at that point. This ensures that the extrapolation equations can smoothly transition to the behavior pattern of the target equation of state as the density gradually changes. Finally, to handle the pressure description problem when the density approaches infinity, the extrapolation equations have a function value of zero when the density independent variable equals a preset reference value. The reference value can be an extremely large density value, representing the limit state of infinite density. By adhering to these first objective conditions, the physical rationality of the extrapolation equations in the high-density region is guaranteed, avoiding numerical anomalies in the calculation limit cases, thus providing a stable and continuous pressure-density description throughout the entire density range.

[0067] Through the above steps, we can not only handle various complex situations that may be encountered in the calculation of gas phase density roots of non-cubic equations of state, but also ensure the physical meaning and numerical stability of the calculation results, providing a powerful tool for the accurate simulation and optimization of chemical processes.

[0068] On the other hand, the extrapolation equation can also be determined through the following steps.

[0069] If it is necessary to calculate the root density of the gas phase, the range of the extrapolated density should be determined as follows: [ , ],in A value less than 1 allows the gas phase density to be less than 1. To avoid calculating negative pressure at low temperatures, a value of 0.7-0.95 is recommended. Extrapolating the density point is mainly used when only a single density root exists. Therefore, the derivative of pressure with respect to density can be set to a small value. The corresponding density is close to the upper limit of the gas phase density root in the equation of state. The extrapolated point can be obtained by solving the following equation:

[0070]

[0071] Where R represents the ideal gas constant, and T is the given temperature. This is a small value, defaulted to 0.1. Solving this equation yields the corresponding extrapolated density points. If the corresponding root cannot be found, then... As extrapolation point Substituting the extrapolated points into the state equation yields the corresponding pressure. .

[0072] Compare the magnitudes of the given pressure and the extrapolated pressure. This requires determining the pseudo-density root of the gas phase through extrapolation equations. If at this point the entire... If the curve has only a single root, the pseudo-density root is directly determined by the extrapolation equation; if there are three roots, even if a gas phase root exists, the pseudo-density root of the extrapolation equation is used as the gas phase root to ensure the continuity of the extrapolation. Pressure up to the upper limit of the gas phase density root (satisfying) A pseudo-density root is used between the gas phase and the density of the atmosphere. The pseudo-density root of the atmosphere is expressed by the following extrapolation equation:

[0073]

[0074] The equation coefficients are determined by boundary conditions, including the equality of pressure at the extrapolation point in the state equation and the extrapolation equation, the equality of the first derivative of pressure with respect to density, and the condition that the density is sufficiently large (default is...). )hour Solving the system of equations yields the following coefficients:

[0075]

[0076]

[0077]

[0078] in This represents the first derivative of pressure with respect to density at the extrapolated point.

[0079] In some optional embodiments of this application, the extrapolation equation is determined based on the target range of the mechanical critical density, which can be achieved by the following method: When calculating the root of the liquid phase density, the following steps are performed: Based on the target range of the mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, and the lower limit of the mechanical critical density in the target range is the left boundary of the extrapolation density range; within the extrapolation density range, a second density is found that satisfies the target state equation, where the derivative of pressure with respect to density is equal to a second preset value; if a second density is found, it is determined as the liquid phase. Extrapolate the density point; if the second density is not found, determine the upper limit of the mechanical critical density in the target interval as the liquid phase extrapolated density point; substitute the liquid phase extrapolated density point into the target state equation to obtain the corresponding liquid phase extrapolated pressure, and if the liquid phase extrapolated pressure is greater than the preset pressure, determine the extrapolation equation according to the second target condition, wherein the second target condition includes: at the liquid phase extrapolated density point, the pressure value calculated by the extrapolation equation is equal to the liquid phase extrapolated pressure; at the liquid phase extrapolated density point, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target state equation.

[0080] This embodiment searches for a second density within a preset extrapolation density range. This second density has a key characteristic: at this density, the derivative of pressure with respect to density in the target equation of state equals a second preset value. The second preset value is a selected small positive number that reflects the slight slope of the pressure-density change near the lower limit of the liquid phase density root. If a density value is successfully located within the extrapolation density range that satisfies the condition that the derivative equals the second preset value, this specific density value will be marked as the liquid phase extrapolation density point for subsequent liquid phase density root extrapolation calculations. If, after traversing the entire extrapolation density range, no density value satisfying the above condition is found, the upper limit of the mechanically critical density in the target range will be used as a substitute for the liquid phase extrapolation density point to ensure the continuity of the calculation process.

[0081] After determining the extrapolated density point of the liquid phase, it is substituted into the target equation of state to calculate the corresponding pressure value at that density point, i.e., the extrapolated pressure of the liquid phase. The extrapolated pressure of the liquid phase is an important reference point in the calculation of the root density of the liquid phase; its comparison with the preset pressure value will determine whether further extrapolation equations are needed. If the extrapolated pressure of the liquid phase is found to be greater than the preset system pressure, it indicates that an effective root density of the liquid phase was not obtained in the direct calculation, or that the root density exceeds the conventional range of liquid phase density. In this case, it is necessary to construct an extrapolation equation based on the second target condition to provide an approximate solution for the root density of the liquid phase.

[0082] When constructing the extrapolation equation, the second objective condition ensures that the equation's behavior at the extrapolated density point in the liquid phase is consistent with the target equation of state. Specifically, the pressure value calculated by the extrapolation equation at the extrapolated density point in the liquid phase must be exactly equal to the pressure at the extrapolated point obtained through the target equation of state. This condition guarantees the continuity and consistency of the extrapolation equation with the original equation of state in terms of pressure values. Simultaneously, to match the slope of pressure with respect to density in the target equation of state at the extrapolated density point in the liquid phase, the first derivative of pressure with respect to density in the extrapolation equation must also match the derivative of the target equation of state at the same point. This requirement ensures that the extrapolation equation is consistent not only with the target equation of state in terms of pressure values ​​but also in the rate at which density changes cause pressure changes, thus achieving a smooth numerical transition and avoiding discontinuities or abrupt changes in the calculation process.

[0083] On the other hand, the extrapolation equation can also be determined through the following steps.

[0084] To calculate the root density of the liquid phase, the range of the extrapolated density is determined as follows: [ , Similarly, extrapolating density points is mainly used when there is only a single density root. Therefore, the derivative of pressure with respect to density can be made to a small value. At this time, the corresponding density is close to the lower limit of the liquid phase density root in its equation of state. Solving the extrapolation point determination equation is the same as that for the gas phase. Solving this equation yields the corresponding extrapolated density points. If the corresponding root cannot be found, then... As extrapolation point Substituting the extrapolated points into the state equation yields the corresponding pressure. .

[0085] Compare the magnitudes of the given pressure and the extrapolated pressure. The pseudo-density root of the liquid phase needs to be determined through extrapolation equations. If at this point the entire... If the curve has only a single root, the pseudo-density root is directly determined by the extrapolation equation; if there are three roots, even if a liquid phase root exists, the pseudo-density root of the extrapolation equation is used as the liquid phase root to ensure the continuity of the extrapolation. To the lower limit pressure of the liquid phase density root (satisfying) A pseudo-density root is used between the two phases. The pseudo-density root of the liquid phase is expressed by the following extrapolation equation:

[0086]

[0087] in Values ​​less than 1 are allowed, with a default value of 0.7. This ensures that the density value will not be unreasonably low, regardless of the pressure. The equation coefficients are determined by boundary conditions, including the equality of pressure and the first derivative of pressure with respect to density at the extrapolation points in both the state equation and the extrapolation equation. Solving the system of equations yields the following coefficients:

[0088]

[0089]

[0090] in The first derivative of pressure with respect to density at the extrapolated point has the following value:

[0091]

[0092] In some alternative embodiments of this application, the determination of whether to obtain a pseudo density root of the target state equation is made by: determining the number of density roots of the target state equation; and determining to obtain a pseudo density root of the target state equation when the number of density roots is one and the density roots do not conform to a preset phase reference standard.

[0093] It is important to note that determining the number of density roots in the target equation of state is a crucial step in the calculation of thermodynamic properties, directly impacting the choice of calculation path and methodology. Under specific operating conditions, such as temperature, pressure, and molar composition, calculating the density of a system using the equation of state method may generate one or more density roots. These roots correspond to different physical phases, such as gas, liquid, or supercritical states. The number and properties of these density roots are essential for understanding the phase behavior of the system.

[0094] When only one density root is obtained from the equation of state, it is first necessary to evaluate whether this single density root conforms to the expected phase reference standard. The phase reference standard can be based on physicochemical principles, combined with given conditions, to determine whether a density root reasonably belongs to the gas or liquid phase. For example, under low temperature and low pressure conditions, a larger density root might be considered a liquid phase density, while a smaller density root might belong to a gas phase density. However, if the value or behavior of this single density root does not match the expected phase state—for example, if the calculation results show abnormal physical properties or violate basic thermodynamic laws—this indicates that the direct solution may not be suitable for describing the actual physical system. This is especially true when only one density root appears; the direct solution may point to a physically unreasonable state, such as a supercritical or unstable state.

[0095] In this context, determining the pseudo-density root for the target equation of state becomes particularly important. A pseudo-density root is a density value introduced in addition to the physically non-existent or unstable true density root. This value mathematically satisfies the equation of state, but in practical applications, it serves as a substitute reference point to fill gaps where the equation of state fails to provide a valid solution under specific conditions. The purpose of introducing a pseudo-density root is to maintain the continuity and stability of phase equilibrium calculations, especially in the simulation of chemical processes such as flash distillation and rectification, where iterative calculations rely on continuous, physically meaningful density values. The strategy for calculating the pseudo-density root depends on the specific type of equation of state (cubic or non-cubic) and operating conditions. For example, the concept of mechanical critical density can be used to generate pseudo-density roots for the gas or liquid phases by combining extrapolation point calculations with the determination of extrapolation equations.

[0096] Specifically, when there is only one density root, and this single density root exhibits characteristics inconsistent with the gas or liquid phase, a pseudo-density root for the gas or liquid phase can be determined using the tangent-point method described above. If the density root calculated between the upper and lower limits of the liquid phase does not conform to the liquid phase reference standard, it can be extrapolated to a lower density value that satisfies certain mathematical conditions (such as the first derivative of pressure with respect to density being equal to a small positive value), and a density value conforming to the characteristics of the liquid phase can be calculated using the extrapolation equation. Conversely, if the calculated density root does not conform to the gas phase reference standard, a similar strategy can be used, but a higher density value must be found as the extrapolation density point for the gas phase to generate a pseudo-density root conforming to the characteristics of the gas phase.

[0097] This method allows for the use of pseudo-density roots, even when direct calculations of density roots encounter challenges or deficiencies. It ensures that every step in chemical process simulation is based on reasonable and continuous density values, thereby improving calculation accuracy and process stability. This step is particularly important for complex non-cubic equations of state, as these often exhibit more complex nonlinear behavior under specific conditions, and direct solutions may be difficult to obtain or lack physical meaning. The introduction of pseudo-density roots effectively compensates for this deficiency, enabling the successful calculation of the thermodynamic properties of complex systems.

[0098] Figure 2 This is a flowchart of another method for calculating pseudo-density roots according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0099] Step 1: Select a binary mixture system consisting of methane and n-butane, and use the non-cubic equation of state method PC-SAFT to calculate the thermodynamic properties. The temperature is 21℃, the pressure is 50 bar, and the molar composition of both components is 0.5.

[0100] Step 2: For highly nonlinear state equations like PC-SAFT, density cannot be directly calculated. An iterative method is needed to adjust the density so that the final calculated pressure equals the system pressure. Divide the entire density range into multiple density intervals. Substitute each density value into the state equation to calculate the pressure. Calculate the difference between the pressure at two adjacent density points and the system pressure. Compare the signs of the two pressure differences. If the signs are different, it indicates the existence of a density root within the interval, and the corresponding density interval is recorded. After traversing all density intervals, solve for the density root for each interval using the secant method, bisection method, or inverse quadratic interpolation method.

[0101] Step 3: Given the temperature and composition, a definite result is obtained. The curve shows the density roots. Different numbers of density roots can be obtained from this curve based on the system pressure. If there are three density roots, even if there are actual gas-liquid phase density roots, to ensure the continuity of the extrapolation, pseudo-density roots from the extrapolation equation are needed as solutions for the corresponding phase in some regions. If there is only one density root, it is necessary to determine whether the single root satisfies the criterion for the corresponding phase; if not, a pseudo-density root is calculated. When the system pressure is 50 bar, there is only a single density root, and the molar density is 11.16 kmol / m³.

[0102] Step 4: Solve for the mechanical critical density of the system obtained in Step 1. The mechanical critical density requires that both the first and second derivatives of pressure with respect to density be zero. Because the PC-SAFT equations of state are inherently complex, their analytical solutions cannot be obtained directly; iterative algorithms are required for solving them. A simplified two-parameter method is obtained using the tangent point method. The equations were used, and the first and second derivatives were calculated by simplifying the equations to find the mechanical critical density. At specific temperatures and compositions, There exists a single point of tangency on the curve that satisfies the following equation:

[0103]

[0104] When density is 0, pressure is also 0. (Combined) (where k represents the Boltzmann constant), thus yielding a two-parameter equation:

[0105]

[0106] The tangent point that meets the requirements can be calculated using the state equation. , Substituting this point into the two-parameter equation, and substituting the equation satisfied by the tangent point into the two-parameter equation, we get:

[0107]

[0108] The coefficients of the equations calculated from the above equations are as follows:

[0109]

[0110] Under specific temperature and composition, the two-parameter equation was calculated to obtain... Given a specific composition, the corresponding mechanical critical temperature is calculated using an iterative algorithm. At this point, the two-parameter equation... The points need to satisfy to obtain It is important to note that the calculations obtained by simplifying the equations... It may not be perfectly accurate, but such accuracy is sufficient to meet the requirements of the reference point for the extrapolation equation.

[0111] Step 5: Determine the upper and lower limits of the PC-SAFT equation of state density. , The value is used to determine the extrapolation point density range for the pseudo-density root calculation. The PC-SAFT equation of state calculation uses a dimensionless density η, which ranges from [1e-13, 0.7405], and the corresponding molar density range for this system is [3.93e-9, 29077] (kmol / m^3).

[0112] Step 6: If the root density of the gas phase needs to be calculated, determine the range of the extrapolated density as [3.93e-9, 0.9]. Extrapolating the density point is mainly used when there is only a single density root. Therefore, the derivative of pressure with respect to density can be set to a small value, at which point the corresponding density is close to the upper limit of the gas phase density root in its equation of state. The extrapolated point is obtained by solving the following equation:

[0113]

[0114] Where R represents the ideal gas constant and T is the given temperature. Solving this equation yields the corresponding extrapolated density point. (2.41 kmol / m^3). If no corresponding root can be found, then 0.9 As extrapolation point Substituting the extrapolated points into the state equation yields the corresponding pressure. (29.16 bar).

[0115] Comparing the given pressure and the extrapolated pressure, since the system pressure is 50 bar, it satisfies... The pseudo-density root of the gas phase needs to be determined through extrapolation equations. At this point, the entire... If the curve has only a single root, the pseudo-density root is directly determined by the extrapolation equation. If three roots exist, even if a gas phase root exists, the pseudo-density root of the extrapolation equation is used as the gas phase root to ensure the continuity of the extrapolation. Pressure up to the upper limit of the gas phase density root (satisfying) A pseudo-density root is used between the gas phase and the density of the atmosphere. The pseudo-density root of the atmosphere is expressed by the following extrapolation equation:

[0116]

[0117] The equation coefficients are determined by boundary conditions, including the equality of pressure at the extrapolation point between the state equation and the extrapolation equation, the equality of the first derivative of pressure with respect to density, and the condition that the density is sufficiently large (default is...). )hour Solving the system of equations yields the following coefficients:

[0118]

[0119]

[0120]

[0121] Based on the extrapolation equation, and given a system pressure of 50 bar, the pseudo-density root can be calculated to be 3.063 kmol / m^3. Figure 3 This is a schematic diagram of the calculation of the gas phase pseudo-density root in an embodiment of this application. Figure 3 It can be seen that, compared with the true density root of 11.16 kmol / m^3, the pseudo density root calculated in the embodiments of this application is a more reasonable gas phase density.

[0122] Step 7: If you need to calculate the liquid phase density root, you can compare the calculated individual density root with... Since the true density root is greater than the mechanical critical density root at this time, the density is the liquid phase density, and there is no need to calculate the pseudo density root through extrapolation equations.

[0123] The above steps provide a method for calculating the pseudo-density root of the equation of state based on the tangent point method. The tangent point method can efficiently calculate the first and second derivatives of pressure with respect to density, thereby obtaining the mechanical critical density. It is applicable to both cubic and non-cubic equation of state methods. Combined with extrapolation point calculation and the determination of extrapolation equations, it efficiently and stably calculates the pseudo-density root. This ensures that the equation of state remains numerically stable and converges to the correct physical root during iterative solutions of phase equilibrium in processes such as flash distillation and rectification, providing a foundation for accurate calculations in full-process simulation and optimization. It can be applied to general-purpose process simulation software.

[0124] Figure 4 This is a structural diagram of a pseudo-density root calculation device according to an embodiment of this application, as shown below. Figure 4 As shown, the device includes:

[0125] The first determining module 42 is used to determine the target equation of state based on the constituent components of the computational system, wherein the computational system includes at least one of the following: gas, liquid and solid.

[0126] The second determining module 44 is used to determine the thermodynamic state variables of the computational system through the target equation of state. The thermodynamic state variables include at least pressure and density.

[0127] The calculation module 46 is used to calculate the mechanical critical density of the calculation system when the pseudo-density root of the target state equation is determined, wherein the mechanical critical density is the density when the first and second derivatives of pressure with respect to density are both equal to zero.

[0128] The third determining module 48 is used to determine the extrapolation equation based on the target range of mechanical critical density, and to determine the pseudo-density root of the target state equation under a given pressure through the extrapolation equation.

[0129] Optionally, calculating the mechanical critical density of the computational system includes the following steps: when the target equation of state is a non-cubic equation of state, obtaining the target temperature value; based on the target equation of state, the constituent components of the computational system, and the target temperature value, constructing a simplified equation to describe the pressure-density relationship, and selecting at least two density fitting points within a preset density range, wherein the pressure value calculated by the simplified equation and the target equation of state at each density fitting point is equal; determining the undetermined coefficients in the simplified equation according to the density fitting points to obtain the target simplified equation; calculating the first and second derivatives of pressure with respect to density in the target simplified equation, and determining whether there exists a target density in the target simplified equation that satisfies that the first and second derivatives of pressure with respect to density are both zero; if so, determining the target density as the mechanical critical density under the constituent components and the target temperature value.

[0130] Optionally, based on the target range of the mechanical critical density, the extrapolation equation is determined, specifically including the following steps: When calculating the root of the gas phase density, the following steps are performed: Based on the target range of the mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, and the product of the lower limit of the mechanical critical density in the target range and the scaling factor is the left boundary of the extrapolation density range, with the scaling factor being less than 1; Within the extrapolation density range, a first density is found that satisfies the target state equation, where the pressure-density derivative is equal to a first preset value; If a first density is found, it is determined as... Gas phase extrapolation density point; Substitute the gas phase extrapolation density point into the target state equation to obtain the corresponding gas phase extrapolation pressure. If the gas phase extrapolation pressure is less than the preset pressure, determine the extrapolation equation according to the first target condition. The first target condition includes: at the gas phase extrapolation density point, the pressure value calculated by the extrapolation equation is equal to the gas phase extrapolation pressure; at the gas phase extrapolation density point, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target state equation; and when the density independent variable in the extrapolation equation is equal to the preset reference density value, the function value of the extrapolation equation is zero.

[0131] Optionally, if the first density is not found, the upper limit of the mechanical critical density in the target range is determined as the gas phase extrapolation density point.

[0132] Optionally, based on the target range of the mechanical critical density, the extrapolation equation is determined, specifically including the following steps: When calculating the root of the liquid phase density, the following steps are performed: Based on the target range of the mechanical critical density, an extrapolation density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolation density range, and the lower limit of the mechanical critical density in the target range is the left boundary of the extrapolation density range; Within the extrapolation density range, a second density is found that satisfies the second preset value, where the pressure-density derivative of the target state equation is equal to the second preset value; If a second density is found, it is determined as the liquid phase extrapolation density point; The liquid phase extrapolation density point is substituted into the target state equation to obtain the corresponding liquid phase extrapolation point pressure, and if the liquid phase extrapolation point pressure is greater than the preset pressure, the extrapolation equation is determined according to the second target condition, wherein the second target condition includes: at the liquid phase extrapolation density point, the pressure value calculated by the extrapolation equation is equal to the liquid phase extrapolation point pressure; at the liquid phase extrapolation density point, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density in the target state equation for the liquid phase extrapolation density point.

[0133] Optionally, if a second density is not found, the upper limit of the mechanical critical density in the target range is determined as the extrapolated density point of the liquid phase.

[0134] Optionally, the determination of whether to obtain pseudo-density roots of the target state equation can be made through the following steps: determining the number of density roots of the target state equation; if the number of density roots is one and the density roots do not conform to the preset phase reference standard, determining whether to obtain pseudo-density roots of the target state equation.

[0135] It should be noted that the above Figure 4 The modules in can be program modules (e.g., a set of program instructions that implements a specific function) or hardware modules. For the latter, they can be represented in the following forms, but are not limited to these: each of the above modules is represented by a processor, or the functions of each of the above modules are implemented by a processor.

[0136] It should be noted that, Figure 4 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 1 The relevant descriptions of the embodiments shown will not be repeated here.

[0137] Figure 5 A hardware block diagram of a computer terminal for implementing a method for calculating pseudo-density roots is shown. Figure 5 As shown, the computer terminal 50 may include one or more processors 502 (shown as 502a, 502b, ..., 502n in the figure) 502 (processor 502 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 504 for storing data, and a transmission module 506 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 5 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 50 may also include... Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown.

[0138] It should be noted that the aforementioned one or more processors 502 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 50. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0139] The memory 504 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the pseudo-density root calculation method in this embodiment. The processor 502 executes various functional applications and data processing by running the software programs and modules stored in the memory 504, thereby realizing the aforementioned pseudo-density root calculation method. The memory 504 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 504 may further include memory remotely located relative to the processor 502, and these remote memories can be connected to the computer terminal 50 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0140] The transmission module 506 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 50. In one example, the transmission module 506 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 506 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0141] The display may be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 50.

[0142] It should be noted here that, in some optional embodiments, the above... Figure 5 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 5 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0143] It should be noted that, Figure 5 The computer terminal shown is used to execute Figure 1 The method for calculating the pseudo-density root shown above also applies to this electronic device, and will not be repeated here.

[0144] This application also provides a non-volatile storage medium, which includes a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the above-mentioned method for calculating the pseudo-density root.

[0145] A non-volatile storage medium performs the following functions: Based on the constituent components of the computational system, determines the target equation of state, wherein the computational system includes at least one of the following: gas, liquid, and solid; using the target equation of state, determines the thermodynamic state variables of the computational system, which include at least pressure and density; if a pseudo-density root is determined for the target equation of state, calculates the mechanical critical density of the computational system, wherein the mechanical critical density is the density at which both the first and second derivatives of pressure with respect to density are equal to zero; based on the target range of the mechanical critical density, determines the extrapolation equation, and using the extrapolation equation, determines the pseudo-density root of the target equation of state at a given pressure.

[0146] This application also provides an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the above-described method for calculating the pseudo-density root during runtime.

[0147] The processor is used to run a program that performs the following functions: determining a target equation of state based on the constituent components of the computational system, wherein the computational system includes at least one of the following: gas, liquid, and solid; determining the thermodynamic state variables of the computational system using the target equation of state, wherein the thermodynamic state variables include at least pressure and density; calculating the mechanical critical density of the computational system, wherein the mechanical critical density is the density at which both the first and second derivatives of pressure with respect to density are equal to zero, given the determination of a target interval for the mechanical critical density; determining an extrapolation equation based on the target interval for the mechanical critical density, and determining the pseudo-density root of the target equation of state at a given pressure using the extrapolation equation.

[0148] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0149] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0150] In the above embodiments of this application, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with relevant laws, regulations and standards, take necessary protective measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.

[0151] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0152] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] Furthermore, the functional units in the various embodiments of this application 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0154] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part 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 application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0155] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for calculating pseudo-density roots, characterized in that, include: The target equation of state is determined based on the constituent components of the computational system, wherein the computational system includes at least one of the following: gas, liquid, and solid; The thermodynamic state variables of the computational system are determined by the target equation of state, and the thermodynamic state variables include at least: pressure and density; Given that the pseudo-density root of the target equation of state is determined, the mechanical critical density of the computational system is calculated, wherein the mechanical critical density is the density when the first and second derivatives of the pressure with respect to the density are both equal to zero. Based on the target range of the mechanical critical density, an extrapolation equation is determined, and through the extrapolation equation, the pseudo-density root of the target state equation under a given pressure is determined.

2. The method according to claim 1, characterized in that, Calculating the mechanical critical density of the computational system includes: When the target equation of state is a non-cubic equation of state, the target temperature value is obtained; Based on the target equation of state, the constituent components of the calculation system, and the target temperature value, a simplified equation for describing the pressure-density relationship is constructed, and at least two density fitting points are selected within a preset density range, wherein the pressure value calculated by the simplified equation and the target equation of state at each density fitting point is equal. Based on the density fitting points, the undetermined coefficients in the simplified equation are determined to obtain the target simplified equation; Calculate the first and second derivatives of pressure with respect to density in the target simplified equation, and determine whether there exists a target density in the target simplified equation that satisfies that the first and second derivatives of pressure with respect to density are both zero; if so, determine the target density as the mechanical critical density under the constituent components and the target temperature value.

3. The method according to claim 1, characterized in that, Based on the target range of the mechanical critical density, the extrapolation equation is determined, including: When calculating the root density of the gas phase, perform the following steps: Based on the target range of the mechanical critical density, an extrapolated density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolated density range, and the product of the lower limit of the mechanical critical density in the target range and the scaling factor is the left boundary of the extrapolated density range, wherein the scaling factor is less than 1. Within the extrapolated density range, find the first density that satisfies the target state equation, where the pressure-density derivative is equal to a first preset value; if the first density is found, determine the first density as the gas phase extrapolated density point; Substituting the extrapolated density point of the gas phase into the target equation of state yields the corresponding extrapolated pressure of the gas phase. If the extrapolated pressure of the gas phase is less than a preset pressure, the extrapolation equation is determined according to a first target condition, wherein the first target condition includes: At the extrapolated density point in the gas phase, the pressure value calculated by the extrapolation equation is equal to the pressure at the extrapolation point in the gas phase. At the extrapolated density point in the gas phase, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density at the extrapolated density point in the target equation of state. When the density independent variable in the extrapolation equation is equal to a preset reference density value, the function value of the extrapolation equation is zero.

4. The method according to claim 3, characterized in that, The method further includes: if the first density is not found, determining the upper limit of the mechanical critical density in the target interval as the gas phase extrapolated density point.

5. The method according to claim 1, characterized in that, Based on the target range of the mechanical critical density, the extrapolation equation is determined, including: When calculating the root density of the liquid phase, perform the following steps: Based on the target range of the mechanical critical density, an extrapolated density range is determined, wherein the upper limit of the mechanical critical density in the target range is the right boundary of the extrapolated density range, and the lower limit of the mechanical critical density in the target range is the left boundary of the extrapolated density range. Within the extrapolated density range, find a second density that satisfies the target state equation, where the pressure-density derivative is equal to a second preset value; if the second density is found, determine the second density as the liquid phase extrapolated density point; Substituting the extrapolated density point of the liquid phase into the target equation of state yields the corresponding extrapolated pressure of the liquid phase. If the extrapolated pressure of the liquid phase is greater than a preset pressure, the extrapolation equation is determined according to a second target condition, wherein the second target condition includes: At the extrapolated density point of the liquid phase, the pressure value calculated by the extrapolation equation is equal to the pressure at the extrapolation point of the liquid phase; At the extrapolated density point in the liquid phase, the first derivative of pressure with respect to density in the extrapolation equation is equal to the first derivative of pressure with respect to density at the extrapolated density point in the target state equation.

6. The method according to claim 5, characterized in that, The method further includes: if the second density is not found, determining the upper limit of the mechanical critical density in the target interval as the liquid phase extrapolation density point.

7. The method according to claim 1, characterized in that, Whether to obtain the pseudo-density root of the target state equation is determined by the following methods: Determine the number of density roots of the target equation of state; If the number of density roots is one and the density roots do not conform to the preset phase state reference standard, a pseudo density root for obtaining the target state equation is determined.

8. A device for calculating pseudo-density roots, characterized in that, include: The first determining module is used to determine the target equation of state based on the constituent components of the computational system, wherein the computational system includes at least one of the following: gas, liquid, and solid; The second determining module is used to determine the thermodynamic state variables of the computational system through the target equation of state, wherein the thermodynamic state variables include at least: pressure and density; The calculation module is used to calculate the mechanical critical density of the computational system when the pseudo-density root of the target equation of state is determined, wherein the mechanical critical density is the density when the first and second derivatives of the pressure with respect to the density are both equal to zero. The third determining module is used to determine the extrapolation equation based on the target range of the mechanical critical density, and to determine the pseudo-density root of the target state equation under a given pressure through the extrapolation equation.

9. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the non-volatile storage medium to perform the method for calculating the pseudo-density root as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the method for calculating the pseudo-density root as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for calculating the pseudo-density root as described in any one of claims 1 to 7.