Disclosure of Invention
The invention aims to provide a multiphase flow transient calculation method based on space conservation. Another object of the present invention is to provide a multiphase flow transient computing system based on space conservation. It is a further object of the present invention to provide a computer apparatus and it is a further object of the present invention to provide a computer readable medium.
In order to achieve the above object, the present invention discloses a multiphase flow transient calculation method based on space conservation, which includes:
acquiring pipeline parameters and fluid parameters;
and obtaining transient data of the multiphase fluid by a fluid dynamics analysis method based on a preset fluid and pipeline conservation model, a continuity conservation model, a momentum conservation model and an energy conservation model according to the pipeline parameters and the fluid parameters.
Preferably, the method further comprises the step of establishing the fluid and pipe conservation model, the continuity conservation model, the momentum conservation model and the energy conservation model.
Preferably, the establishing of the fluid and pipeline conservation model specifically comprises:
determining the conservation relation between the expansion and contraction rate of the pipeline sectional area along with time and the change rate of the fluid flowing through the pipeline;
and establishing a fluid and pipeline conservation model based on the associated phase fraction under the multiphase fluid according to the conservation relation.
Preferably, the conservation relation is:
wherein A is the cross-sectional area of the pipeline, t is time, u is the fluid velocity, and x is the axial length of the pipeline.
Preferably, the fluid and pipe conservation model is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiThe velocity of the ith fluid phase, A is the cross-sectional area of the conduit, t is the time, and x is the axial length of the conduit.
Preferably, the obtaining of the transient data of the multiphase fluid by the fluid dynamics analysis method based on the preset fluid and pipeline conservation model, the continuity conservation model, the momentum conservation model and the energy conservation model according to the pipeline parameters and the fluid parameters specifically includes:
selecting a first-order windward format to disperse the pipeline model;
dividing the staggered grids to form a solution model;
and calculating to obtain transient data of the multiphase fluid according to the solving model, the fluid and pipeline conservation model, the continuity conservation model, the momentum conservation model and the energy conservation model.
Preferably, the continuity conservation model is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, t is the time, and x is the axial length of the pipe.
Preferably, the momentum conservation model is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, k is the number of fluid phases in contact with the ith fluid, and αiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, pikIs the pressure between the phase interfaces of the ith fluid phase and the k fluid phases with which it is in contact, fiIs the friction between the ith fluid phase and the pipe wall, rikThe acting force of all k fluids in contact with the ith fluid relative to the ith fluid phase in the axial direction of the pipeline is marked as "+" if the acting force direction is opposite to the flow velocity direction of the fluids, the former mark is marked as "-" if the acting force direction is the same as the flow velocity direction of the fluids, theta is the inclination angle between the pipeline and the horizontal line, g is the gravitational acceleration, t is the time, and x is the axial length of the pipeline.
Preferably, the energy conservation model is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, EiIs the i-th fluid phase internal energy, HiIs the specific total enthalpy of the ith fluid phase, theta is the angle of inclination between the pipe and the horizontal line, g is the gravitational acceleration, t is the time, and x is the axial length of the pipe.
The invention also discloses a multiphase flow transient computing system based on space conservation, which comprises a model establishing unit and a model solving unit;
the model establishing unit is used for establishing a fluid and pipeline conservation model, a continuity conservation model, a momentum conservation model and an energy conservation model based on the correlation phase fraction between the pipeline and the multiphase fluid flowing through the pipeline;
the model solving unit is used for obtaining transient data of the multiphase fluid through a fluid dynamics analysis method according to the fluid and pipeline conservation model, the continuity conservation model, the momentum conservation model and the energy conservation model.
The invention also discloses a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor,
the processor, when executing the program, implements the method as described above.
The invention also discloses a computer-readable medium, having stored thereon a computer program,
which when executed by a processor implements the method as described above.
The invention can realize the multiphase flow transient calculation based on space conservation, namely, the transient flow of incompressible and compressible fluid and multi-fluid phase under any flow rate can be simulated by adding the conservation relation between the described fluid flow and the pipeline into the traditional multiphase fluid model. The method can overcome the defect that the traditional multiphase flow simulation calculation is difficult to accurately describe the relationship between the fluid and the pipeline space, and has the advantages that: the method can simulate the transient flow of incompressible and compressible fluid multi-fluid phases at any flow rate, obtain the transient multi-phase numerical simulation calculation result with high precision, high efficiency and high reliability, can be applied to the multi-phase flow transient calculation in the production of chemical industry, nuclear industry and petroleum industry, and serves the aspects of process design, production efficiency improvement, energy conservation, consumption reduction and the like in the industry.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
According to one aspect of the invention, the embodiment discloses a multiphase flow transient calculation method based on space conservation. As shown in fig. 1, in this embodiment, the method 10 includes:
s100: pipeline parameters and fluid parameters are obtained. The pipe parameters may include pipe cross-sectional area, pipe length and other parameters, and the fluid parameters may include the number of fluid phases, the density of the fluid, the initial velocity of the fluid and other parameters.
S200: and obtaining transient data of the multiphase fluid by a fluid dynamics analysis method based on a preset fluid and pipeline conservation model, a continuity conservation model, a momentum conservation model and an energy conservation model according to the pipeline parameters and the fluid parameters.
According to the invention, through the intrinsic characteristic research of the flowing mechanism of the fluid in the pipeline, the conservation model between the pipeline volume and the fluid volume is added in the multiphase fluid model, the transient state of the flow of incompressible and compressible fluid and multiple fluids at any flow rate can be simulated, the solving accuracy and reliability of the multiphase flow transient data are high, the defect that the relation between the fluid and the pipeline space is difficult to accurately describe in the traditional multiphase flow simulation is overcome, the method can be applied to the multiphase flow calculation with a wider range, and has important significance for accurately simulating the multiphase flow problem in the chemical industry, the nuclear industry and the petroleum industry.
In a preferred embodiment, the multiphase flow transient calculation method based on space conservation may further include the step of establishing a conservation model of the fluid and the pipeline, a conservation model of continuity, a conservation model of momentum, and a conservation model of energy. Specifically, as shown in fig. 2, the S100 may specifically include:
s110: the conservation of the rate of change of fluid flow through the pipe is determined as a function of the expansion and contraction of the pipe cross-sectional area over time. Preferably, for a pipe segment infinitesimal as shown in fig. 3, the change in pipe volume results from the expansion and contraction of the pipe cross-sectional area over time as follows:
wherein A is the cross-sectional area of the pipeline, Deltax is the length of the micro-element of the pipeline, and t is time.
For a fluid flow of only one fluid phase in a pipe segment infinitesimal as shown in fig. 3, the change in volume of the fluid flowing through the pipe results from the rate of change of flow into and out of the pipe element:
wherein A is the cross-sectional area of the pipeline, Deltax is the length of the micro-element of the pipeline, and u is the fluid velocity.
The conservation of the rate of change of fluid flow through the conduit with respect to the rate of expansion and contraction of the cross-sectional area of the conduit over time can be expressed as:
wherein A is the cross-sectional area of the pipeline, t is time, u is the fluid velocity, and x is the axial length of the pipeline.
S120: and establishing a fluid and pipeline conservation model based on the associated phase fraction under the multiphase fluid according to the conservation relation. Taking into account that the pipe is always filled with at least any one fluid phase in the pipe in the full space-time range of the pipe, a conservation model of the fluid and the pipe is derived for establishing the related phase fraction, wherein the conservation model can comprise two terms, wherein one term represents the fluctuation property of the compressible fluid as a function of the density of the fluid, and the other term represents the flow property of the incompressible fluid as a function of the velocity of the fluid. The invention can improve a double-fluid model, has better applicability to both multi-fluid phases and compressible and incompressible fluid phases, and has high simulation accuracy and reliability of the multi-fluid phases.
Preferably, the fluid and pipe conservation model may be:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiThe velocity of the ith fluid phase, A is the cross-sectional area of the conduit, t is the time, and x is the axial length of the conduit.
In a preferred embodiment, the continuous conservation model for multiple fluids is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, t is the time, and x is the axial length of the pipe.
The momentum conservation model is as follows:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, k is the number of fluid phases in contact with the ith fluid, and αiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, pikIs the pressure between the phase interfaces of the ith fluid phase and the k fluid phases with which it is in contact, fiIs the friction between the ith fluid phase and the pipe wall, rikFor all k fluids in contact with the ith fluid relative to the ith fluid phaseThe resultant force in the axial direction of the pipeline is marked as "+" before the direction of the acting force is opposite to the flow velocity direction of the fluid, if the direction of the acting force is the same as the flow velocity direction of the fluid, the sign is "-", theta is the inclination angle between the pipeline and the horizontal line, g is the gravity acceleration, t is the time, and x is the axial length of the pipeline.
The energy conservation model is as follows:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, EiIs the i-th fluid phase internal energy, HiIs the specific total enthalpy of the ith fluid phase, theta is the angle of inclination between the pipe and the horizontal line, g is the gravitational acceleration, t is the time, and x is the axial length of the pipe.
In a preferred embodiment, the transient data of the multiphase fluid may be calculated by a fluid dynamics method as shown in fig. 4, and the S300 may specifically include:
s310: the first order windward format is selected to discretize the pipe model as shown in fig. 5.
S320: and dividing the staggered grids to form a solution model.
S330: solving the solution model based on the preset fluid and pipeline conservation model, continuity conservation model, momentum conservation model and energy conservation model according to the pipeline parameters and the fluid parameters to obtain transient data of the multiphase fluid, such as pipeline pressure (p) at discrete points in the solution modelW、pP、pE) Fluid density (alpha)W、αP、αE) And phase fraction of fluid phase (p)W、ρE、ρP) And the fluid velocity (u) of the discrete sub-regionsw、ue、uee)。
FIG. 6 is a graph showing a comparison of initial, transient and steady state flow of fluid through a faucet tube in a specific embodiment of the faucet. The transient data results of the fluid shown in fig. 7-9 are obtained by the multiphase flow transient calculation method, and as can be seen from fig. 7-9, the multiphase flow transient calculation method based on space conservation and theoretical analytic solution data have high goodness of fit, which indicates that the simulation method can accurately and efficiently simulate the transient state of a multi-flow phase in a pipeline.
According to another aspect of the present invention, the present embodiment further discloses a multiphase flow transient computing system based on space conservation. As shown in fig. 10, the system includes a parameter acquisition unit 11 and a model solving unit 12.
The parameter obtaining unit 11 is configured to obtain a pipeline parameter and a fluid parameter. The pipe parameters may include pipe cross-sectional area, pipe length and other parameters, and the fluid parameters may include the number of fluid phases, the density of the fluid, the initial velocity of the fluid and other parameters.
The model solving unit 12 is configured to obtain transient data of the multiphase fluid by a fluid dynamics analysis method based on a preset fluid and pipeline conservation model, a continuity conservation model, a momentum conservation model and an energy conservation model according to the pipeline parameters and the fluid parameters.
According to the invention, through the intrinsic characteristic research of the flowing mechanism of the fluid in the pipeline, the conservation model between the pipeline volume and the fluid volume is added in the multiphase fluid model, the transient state of the flow of incompressible and compressible fluid and multiple fluids at any flow rate can be simulated, the solving accuracy and reliability of the multiphase flow transient data are high, the defect that the relation between the fluid and the pipeline space is difficult to accurately describe in the traditional multiphase flow simulation is overcome, the method can be applied to the multiphase flow calculation with a wider range, and has important significance for accurately simulating the multiphase flow problem in the chemical industry, the nuclear industry and the petroleum industry.
In a preferred embodiment, as shown in fig. 11, the system further comprises a model establishing unit 13, which can be used to establish the fluid and pipe conservation model, the continuity conservation model, the momentum conservation model and the energy conservation model. Preferably, the model establishing unit 13 may determine a conservation relation between the expansion and contraction rate of the pipe cross-sectional area with time and the change rate of the fluid flowing through the pipe, and establish a conservation model of the fluid and the pipe based on the associated phase fraction in the multiphase fluid according to the conservation relation. Taking into account that the pipe is always filled with at least any one fluid phase in the pipe in the full space-time range of the pipe, a conservation model of the fluid and the pipe is derived for establishing the related phase fraction, wherein the conservation model can comprise two terms, wherein one term represents the fluctuation property of the compressible fluid as a function of the density of the fluid, and the other term represents the flow property of the incompressible fluid as a function of the velocity of the fluid. The invention can improve a double-fluid model, has better applicability to both multi-fluid phases and compressible and incompressible fluid phases, and has high simulation accuracy and reliability of the multi-fluid phases.
Preferably, for a pipe segment infinitesimal as shown in fig. 3, the change in pipe volume results from the expansion and contraction of the pipe cross-sectional area over time as follows:
wherein A is the cross-sectional area of the pipeline, Deltax is the length of the micro-element of the pipeline, and t is time.
For a fluid flow of only one fluid phase in a pipe segment infinitesimal as shown in fig. 3, the change in volume of the fluid flowing through the pipe results from the rate of change of flow into and out of the pipe element:
wherein A is the cross-sectional area of the pipeline, Deltax is the length of the micro-element of the pipeline, and u is the fluid velocity.
The conservation of the rate of change of fluid flow through the conduit with respect to the rate of expansion and contraction of the cross-sectional area of the conduit over time can be expressed as:
wherein A is the cross-sectional area of the pipeline, t is time, u is the fluid velocity, and x is the axial length of the pipeline.
Preferably, the fluid and pipe conservation model may be:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiThe velocity of the ith fluid phase, A is the cross-sectional area of the conduit, t is the time, and x is the axial length of the conduit.
In a preferred embodiment, the continuous conservation model for multiple fluids is:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, t is the time, and x is the axial length of the pipe.
The momentum conservation model is as follows:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, k is the number of fluid phases in contact with the ith fluid, and αiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, pikK for the ith fluid phase in contact therewithPressure between the phase boundaries of the fluid phases, riIs the friction between the ith fluid phase and the pipe wall, rikThe acting force of all k fluids in contact with the ith fluid relative to the ith fluid phase in the axial direction of the pipeline is marked as "+" if the acting force direction is opposite to the flow velocity direction of the fluids, the former mark is marked as "-" if the acting force direction is the same as the flow velocity direction of the fluids, theta is the inclination angle between the pipeline and the horizontal line, g is the gravitational acceleration, t is the time, and x is the axial length of the pipeline.
The energy conservation model is as follows:
wherein i is the number of fluid phases in the pipeline, i is 1,2,. n, n is a positive integer, alphaiIs the phase fraction, p, of the ith fluid phaseiIs the density of the ith fluid phase, uiIs the velocity of the ith fluid phase, p is the line pressure, EiIs the i-th fluid phase internal energy, HiIs the specific total enthalpy of the ith fluid phase, theta is the angle of inclination between the pipe and the horizontal line, g is the gravitational acceleration, t is the time, and x is the axial length of the pipe.
In a preferred embodiment, the model solving unit 12 is further configured to select a first-order windward format to discretize the pipeline, divide the staggered grids to form a solving model, and solve the solving model based on a preset fluid and pipeline conservation model, a continuity conservation model, a momentum conservation model and an energy conservation model according to the pipeline parameters and the fluid parameters to obtain transient data of the multiphase fluid. For example, the pipeline pressure (p) at discrete points in the solution model may be solvedW、pP、pE) Fluid density (alpha)W、αP、αE) And phase fraction of fluid phase (p)W、ρE、ρP) And the fluid velocity (u) of the discrete sub-regionsw、ue、uee)。
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example, the computer device specifically comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method performed by the client as described above when executing the program, or the processor implementing the method performed by the server as described above when executing the program.
Referring now to FIG. 12, shown is a schematic block diagram of a computer device 600 suitable for use in implementing embodiments of the present application.
As shown in fig. 12, the computer apparatus 600 includes a Central Processing Unit (CPU)601 which can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM)) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a liquid crystal feedback (LCD), and the like, and a speaker and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 606 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted as necessary on the storage section 608.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.