Two-phase flow total hidden numerical method for transient safety analysis of nuclear power plant
Technical Field
The invention belongs to the technical field of transient safety analysis of nuclear power plants, and particularly relates to a two-phase flow total-hidden numerical method for transient safety analysis of a nuclear power plant.
Background
The nuclear reactor transient safety analysis program is used as a main means and tool for recognizing and researching the normal operation and accident transient phenomenon of the nuclear reactor and verifying the system design, and the importance of the nuclear reactor transient safety analysis program is self-evident. From the last 60 th century until now, a number of well-known reactor transient safety analysis programs have been developed, such as: RELAP5, TRAC, ATHLET, CATHARE, etc. have been widely used in system design and accident safety analysis of various nuclear power plants or nuclear reactors. There are still some problems to be solved and optimized.
Currently widely used procedures for analyzing reactor transient safety include: RELAP5 or TRACE program, it uses two fluid models to simulate two-phase flow, the numerical solution adopts semi-implicit solution, the precision is relatively low, and the numerical stability is affected by the coulomb limit of sound velocity of the material, so the time step cannot be taken very much, the efficiency is low when the program simulates some long transient problems;
for some advanced programs that employ the fully hidden numerical algorithm, such as: the CARHARE2 program adopts Newton method, and because the two fluid models contain a large number of constitutive models, the difficulty is great in constructing the Jacobian matrix of the fully implicit discrete equation;
in order to solve the problems of low semi-implicit numerical efficiency and difficult construction of the traditional fully implicit solution Jacobian matrix, researchers in recent years propose a Newton-Krylov subspace iteration method (JFNK method) without Jacobian matrix. At present, in the field of nuclear reactor transient safety analysis programs, the JFNK algorithm is mostly applied to solving of drift flow models, and when the JFNK algorithm is applied to solving of two-fluid models, the preprocessing technology adopts some pure mathematical preprocessing technologies, and the Jacobian matrix still needs to be formed, so that the difficulty of constructing the Jacobian matrix still exists.
In summary, the semi-implicit solution adopted in the currently-used nuclear reactor transient safety analysis program has certain disadvantages, the traditional total hidden algorithm has certain difficulties, and although some researches apply the JFNK algorithm to the solution of the drift flow model and the two-fluid model, the preprocessing technology is not concise enough, so that the model and the algorithm need to be improved to enable the nuclear reactor transient safety analysis program to be more accurate and efficient.
Disclosure of Invention
The invention provides a two-phase flow total hidden numerical method for transient safety analysis of a nuclear power plant, which improves the instability of a numerical algorithm of a transient safety analysis program of an existing nuclear reactor. Firstly, realizing a fully implicit solution of two fluid models based on an JFNK algorithm, so that a numerical algorithm is not limited by the coulomb value of the sound velocity of a material; secondly, a pre-processing technology of the Jacobian matrix based on the semi-hidden difference is established, and the calculation efficiency is improved; finally, a two-phase flow total hidden numerical method for transient safety analysis of the nuclear power plant is obtained.
The invention is realized by adopting the following technical scheme:
a two-phase flow total hidden numerical method for transient safety analysis of a nuclear power plant, comprising:
the first step: dividing control bodies according to the operation parameters and pipeline structure parameters of the nuclear power plant system, and establishing a nonlinear equation set of a two-fluid two-phase flow model of all the control bodies:
wherein,residual form of the vapor phase momentum equation at the inlet boundary i-1/2 for control volume i;Residual form of the liquid phase momentum equation at the inlet boundary i-1/2 of the control volume i;Residual form of the vapor phase energy equation for control volume i;Controlling the residual form of the liquid phase energy equation of the body i;Controlling the residual form of the vapor phase mass conservation equation of the body i; f (F) P,i Controlling the residual form of the mixed phase mass conservation equation of the body i;Residual form of the vapor phase momentum equation at the outlet boundary i+1/2 of the control volume i;Residual form of the liquid phase momentum equation at the outlet boundary i+1/2 of the control volume i;
and a second step of: and solving a nonlinear equation set established in the (n+1) th time step and the (k) th Newton iteration step by adopting a JFNK method to obtain the vapor phase internal energy, the liquid phase internal energy, the cavitation share, the pressure, the vapor phase speed and the liquid phase speed of all control bodies in the (n+1) th time step, wherein the JFNK method comprises the following steps: the preprocessing matrix M, krylov subspace iteration and newton iteration are constructed.
The invention is further improved in that the conservation equation of the two-fluid two-phase flow model in the first step is discretized based on staggered grids and time backward difference and space first-order windward difference, and the obtained fully implicit discrete equation of the control body i and the outlet boundary i+1/2 is as follows:
k-phase energy equation for control i, k=g for vapor phase and k=l for liquid phase:
vapor phase mass equation for control volume i
Mixed phase mass equation for control volume i
K-phase momentum equation controlling the bulk i exit boundary i+1/2:
wherein: Δx is the control body length; Δt is the time step of transient analysis; a is the cross section of the control body; p is the control body pressure; alpha k 、ρ k 、U k Respectively representing the volume fraction, density and internal energy of k phase; Γ -shaped structure i,k 、Q w,k 、Q i,k 、E w,k 、E i,k Respectively representing the transmission quantity of k-phase unit volume, the heat exchange quantity of a control body and a wall surface, the heat exchange quantity between a control body gas phase and a liquid phase, the heat transfer quantity caused by wall surface mass transfer and the heat transfer quantity caused by interphase mass transfer; v (V) k 、F g,k 、F w,k 、F c,k 、F i,k 、M k Respectively representing the velocity of k phase, wall gravity, wall friction, local resistance, interphase friction and momentum transfer caused by mass transfer;the quantity of the boundary of the control body is assigned through first-order windward differential assignment; k=g represents a vapor phase, and k=l represents a liquid phase.
The invention is further improved in that in the second step of the method, firstly, the nonlinear equation set established in the first step is linearized:
J(x k )·δx k =-F(x k )
wherein J (x) k ) Jacobian matrix, δx, for the kth Newton iteration k Solution variable increment for the kth Newton iteration, F (x k ) Nonlinear equation set, x, for the kth Newton iteration k Independent variable for the kth Newton iteration
Wherein,controlling the vapor phase velocity at the inlet boundary i-1/2 of volume i for the kth Newton iteration;Controlling the liquid phase velocity at the inlet boundary i-1/2 of the body i for the kth Newton iteration;Controlling the vapor phase internal energy of the body i for the kth Newton iteration;Controlling the liquid phase internal energy of the body i for the kth Newton iteration;Controlling the fraction of vapor phase cavitation of volume i for the kth newton iteration; p (P) i k Controlling the pressure of the body i for the kth newton iteration;Controlling the vapor phase velocity at the exit boundary i+1/2 of the volume i for the kth Newton iteration;The liquid phase velocity at the exit boundary i+1/2 of volume i is controlled for the kth Newton iteration.
The invention is further improved in that the linear equation set is preprocessed, and becomes:
(J(x k )M -1 )·(Mδx k )=-F(x k )
the construction method of the pretreatment matrix M comprises the following steps:
based on the staggered grid and the finite volume difference, semi-implicit discrete is carried out on the two-fluid two-phase flow equation to obtain a nonlinear equation set
Wherein,a residual form after semi-implicit discrete of a vapor phase momentum equation at an inlet boundary i-1/2 of a control body i;The residual form after the semi-implicit discrete of the liquid phase momentum equation at the inlet boundary i-1/2 of the control body i;a residual form after semi-implicit discrete of a vapor phase energy equation for the control volume i;The residual form after the semi-implicit discrete of the liquid phase energy equation of the control body i;A residual form after semi-implicit discrete of a vapor phase mass conservation equation of the control body i; f (F) P ′ ,i A residual form after semi-implicit discrete of a mixed phase mass conservation equation of the control body i;A residual form after semi-implicit discrete of a vapor phase momentum equation at an outlet boundary i+1/2 of the control body i;The residual form after the semi-implicit discrete of the liquid phase momentum equation at the outlet boundary i+1/2 of the control body i;
the elements of the d-th row and e-th column of the pretreatment matrix M are:
wherein F' (x) k ) d Is the d-th equation in the linear equation set F' (x),to solve for the variable x k The e-th solution variable in (a).
The invention further improves that the linear equation system after pretreatment is solved by using a Krylov subspace iteration method, which concretely comprises the following steps:
first, a standard orthogonal basis vector Vm and an epinastine matrix of a Krylov subspace Km with dimension m are established through an Arnoldi processNamely:
Vm=(v 1 ,v 2 ,...,v m )
next, the preprocessed equation set (J (x k )M -1 )·(Mδx k )=-F(x k ) Conversion to a new system of equations
Wherein r is (0) =-F(x k )-A·x k ,A=J(x k )M -1 M is the dimension of the Krylov subspace, z m ∈R n To solve for the variables, z (m) =V m ·Y=(v 1 ,v 2 ,...,v m )·(y 1 ,y 2 ,...,y m ) T ,y i (i=1, m) is the basis vector v i Corresponding substrate, β= ||r (0) ||,
New system of equationsIs an overdetermined equation set with m unknowns and m+1 equations, and can be solved by using QR decomposition based on Hastelloy transformation to obtain Y, so as to calculate z m 。
The invention is further improved in that the dot product calculation of the Jacobian matrix and the vector involved in the Krylov subspace iteration method is all calculated by differential approximation as follows:
wherein epsilon is a differential step length or a disturbance parameter, and x is solved according to the kth step k Vector v k Machine accuracy epsilon mach Determination of
The invention is further improved in that the convergence condition of the Krylov subspace iteration is two:
1)
2)
if either convergence condition is satisfied, the Krylov subspace iteratively converges, a system of equations (J (x k )M -1 )·(Mδx k )=-F(x k ) Solution of δx k =M -1 (x (k) +z m ) The method comprises the steps of carrying out a first treatment on the surface of the Otherwise the dimension m of the Krylov subspace becomes m+1, and the system of equations is solved again (J (x k )M -1 )·(Mδx k )=-F(x k )。
The invention is further improved in that the solution delta x of the linear equation system obtained by iterative convergence of the Krylov subspace k Updating solution x for the kth Newton iteration k
x k+1 =x k +δx k
Judging whether Newton iteration converges or not, wherein the Newton iteration converges conditions are three:
1)||F(x k+1 )||≤1.0 -3 ;
2)
3)
wherein nvol is the total number of control bodies in the nuclear reactor system, njun is the total number of takeover in the nuclear reactor system;
if the kth newton iteration does not meet all of the above conditions, then the newton iteration is considered non-converging, k=k+1, with x k+1 As x k Re-performing Krylov subspace iteration; otherwise Newton iteration converges, x k+1 For the solution of the n+1th time step, according to x k +1 The vapor phase internal energy, liquid phase internal energy, void fraction, pressure, vapor phase velocity, and liquid phase velocity of all control bodies can be obtained for the n+1th time step.
Compared with the prior art, the invention has at least the following beneficial technical effects:
1: because the conventional nuclear reactor transient safety analysis program adopts a semi-implicit solution, the stability of the numerical method is limited by the coulomb value of the sound velocity of the material, and the time step cannot be taken very much, so that the efficiency is lower when the problem of slow transient is calculated. The method uses the fully hidden numerical method of the two-fluid model based on the JFNK algorithm, can accurately and efficiently simulate the two-phase flow problem in a nuclear reactor system, and can save the difficulty of writing the Jacobian matrix compared with the traditional Newton method.
2: because the JFNK algorithm is currently applied to the research of two-fluid models, the preprocessing technology mostly adopts the preprocessing technology based on the pure numerology built in the PETSc program package, and the Jacobian matrix based on the fully hidden numerical method needs to be written. According to the invention, the pretreatment technology of the Jacobian matrix based on the semi-hidden difference is used, only the Jacobian matrix based on the semi-hidden numerical method is needed to be written, the difficulty of the numerical method is greatly reduced, and the pretreatment matrix has physical significance.
Drawings
Fig. 1 is a flow chart of the fully hidden numerical method for the two-phase flow for transient safety analysis of the nuclear power plant.
Fig. 2 is a graph comparing cavitation share distribution calculated by the total hidden numerical method with experimental values and calculation results of the semi-hidden numerical method, wherein fig. 2 (a) is a working condition 1, fig. 2 (b) is a working condition 2, fig. 2 (c) is a working condition 3, and fig. 2 (d) is a working condition 4.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
The implementation steps of the two-phase flow total hidden numerical method for transient safety analysis of a nuclear power plant proposed in the present invention will be described in detail with reference to fig. 1, taking a one-dimensional vertical pipe flow heat transfer problem similar to the flow heat transfer of the reactor core of a nuclear power plant as an example.
The first step: dividing a one-dimensional reactor core into 20 control bodies from bottom to top, and establishing a two-fluid two-phase flow equation of each control body
Wherein,to control the vapor phase at the inlet boundary i-1/2 of the body iResidual form of momentum equation;Residual form of the liquid phase momentum equation at the inlet boundary i-1/2 of the control volume i;Residual form of the vapor phase energy equation for control volume i;Controlling the residual form of the liquid phase energy equation of the body i;Controlling the residual form of the vapor phase mass conservation equation of the body i; f (F) P,i Controlling the residual form of the mixed (vapor phase + liquid phase) mass conservation equation of the body i;Residual form of the vapor phase momentum equation at the outlet boundary i+1/2 of the control volume i;Residual form of the liquid phase momentum equation at the outlet boundary i+1/2 of the control volume i;
and a second step of: dispersing the conservation equation of the two-fluid two-phase flow model in the first step based on staggered grids and time backward difference and space first-order windward difference to obtain a fully implicit discrete equation of the control body i and the outlet boundary i+1/2 as follows:
k (k=g represents vapor phase, k=l represents liquid phase) phase energy equation of control body i:
vapor phase mass equation for control volume i
Mixed phase (vapor phase + liquid phase) mass equation for control volume i
K (k=g represents vapor phase, k=l represents liquid phase) phase momentum equation for control volume i exit boundary i+1/2:
wherein: Δx is the control body length; Δt is the time step of transient analysis; a is the cross section of the control body; p is the control body pressure; alpha k 、ρ k 、U k Respectively representing the volume fraction, density and internal energy of k phase; Γ -shaped structure i,k 、Q w,k 、Q i,k 、E w,k 、E i,k Respectively representing the transmission quantity of k-phase unit volume, the heat exchange quantity of a control body and a wall surface, the heat exchange quantity between a control body gas phase and a liquid phase, the heat transfer quantity caused by wall surface mass transfer and the heat transfer quantity caused by interphase mass transfer; v (V) k 、F g,k 、F w,k 、F c,k 、F i,k 、M k Respectively representing the velocity of k phase, wall gravity, wall friction, local resistance, interphase friction and momentum transfer caused by mass transfer;the quantity of the boundary of the control body is assigned through first-order windward differential assignment; k=g represents a vapor phase, and k=l represents a liquid phase.
Forming a nonlinear equation set by the total 120 equations of the 20 control bodies and the inlet-outlet boundaries of each control body:
the solution variables are:
x=(…,V g,i-1/2 ,V l,i-1/2 ,U g,i ,U l,i ,α g,i ,P i ,V g,i+1/2 ,V l,i+1/2 ,…) T
wherein V is g,i-1/2 To control the vapor phase velocity at the inlet boundary i-1/2 of the body i; v (V) l,i-1/2 To control the liquid phase velocity at the inlet boundary i-1/2 of the body i; u (U) g,i To control the vapor phase internal energy of the body i; u (U) l,i To control the liquid phase internal energy of the body i; alpha g,i To control the fraction of vapor phase cavitation of the body i; p (P) i For controlling the pressure of the body i; v (V) g,i+1/2 To control the vapor phase velocity at the outlet boundary i+1/2 of the body i; v (V) l,i+1/2 To control the liquid phase velocity at the outlet boundary i+1/2 of the body i;
and a third step of: linearizing the nonlinear equation set established in the second step:
J(x k )·δx k =-F(x k )
wherein J (x) k ) Jacobian matrix, δx, for the kth Newton iteration k Solution variable increment for the kth Newton iteration, F (x k ) Nonlinear equation set, x, for the kth Newton iteration k Independent variable for the kth Newton iteration
Fourth step: the linear equation set formed in the third step is preprocessed, and the construction method of the preprocessing matrix M comprises the following steps:
based on the staggered grid and the finite volume difference, semi-implicit discrete is carried out on the two-fluid two-phase flow equation to obtain a nonlinear equation set
Wherein,a residual form after semi-implicit discrete of a vapor phase momentum equation at an inlet boundary i-1/2 of a control body i;The residual form after the semi-implicit discrete of the liquid phase momentum equation at the inlet boundary i-1/2 of the control body i;a residual form after semi-implicit discrete of a vapor phase energy equation for the control volume i;The residual form after the semi-implicit discrete of the liquid phase energy equation of the control body i;A residual form after semi-implicit discrete of a vapor phase mass conservation equation of the control body i; f (F) P ′ ,i A residual form after semi-implicit discretization of a mixed (vapor phase+liquid phase) mass conservation equation for the control body i;A residual form after semi-implicit discrete of a vapor phase momentum equation at an outlet boundary i+1/2 of the control body i;The residual form after the semi-implicit discrete of the liquid phase momentum equation at the outlet boundary i+1/2 of the control body i;
the elements of the d-th row and e-th column of the pretreatment matrix M are:
wherein F' (x) k ) d Is the d-th equation in the linear equation set F' (x),to solve for the variable x k The e-th solution variable in (a).
The linear equation set becomes after pretreatment:
(J(x k )M -1 )·(Mδx k )=-F(x k )
and fifthly, solving the preprocessed linear equation set formed in the fourth step by using a Krylov subspace iteration method, wherein the method specifically comprises the following steps:
first, a standard orthogonal basis vector Vm and a Shandong Berger matrix of a Krylov subspace Km of dimension m (first iteration m is 1) are established by an Arnoldi processNamely:
Vm=(v 1 ,v 2 ,...,v m )
next, the preprocessed equation set (J (x k )M -1 )·(Mδx k )=-F(x k ) Conversion to a new system of equations
Wherein r is (0) =-F(x k )-A·x k ,A=J(x k )M -1 M is the dimension of the Krylov subspace, z m ∈R n To solve for the variables, z (m) =V m ·Y=(v 1 ,v 2 ,...,v m )·(y 1 ,y 2 ,...,y m ) T ,y i (i=1, m) is the basis vector v i Corresponding substrate, β= ||r (0) ||,
New system of equationsIs an overdetermined equation set with m unknowns and m+1 equations, and can be solved by using QR decomposition based on Hastelloy transformation to obtain Y, so as to calculate z m 。
The dot product calculation of the jacobian matrix and the vector involved in the fifth step Krylov subspace iteration method is all calculated by differential approximation as follows:
wherein epsilon is a differential step length or a disturbance parameter, and x is solved according to the kth step k Vector v k Machine accuracy epsilon mach Determination of
For a commonly used 64-bit computer ε mach =10 -8 。
Sixth step: z for the band solved in the fifth step m Judging whether the Krylov subspace iteration converges or not, wherein two convergence conditions are provided:
1)
2)
if either convergence condition is satisfied, the Krylov subspace iteratively converges, a system of equations (J (x k )M -1 )·(Mδx k )=-F(x k ) Solution of δx k =M -1 (x (k) +z m ) The method comprises the steps of carrying out a first treatment on the surface of the Otherwise Krylov subspaceThe dimension m of (2) becomes m+1, and returns to the fifth step again, and the solution equation set (J (x k )M -1 )·(Mδx k )=-F(x k ) Solution z of (2) m+1 ;
Seventh, solution delta x of linear equation set obtained by utilizing Krylov subspace iteration convergence in sixth step k Updating solution x for the kth Newton iteration k+1 =x k +δx k And judging whether Newton iteration converges or not. The newton iteration convergence condition has three:
1)||F(x k+1 )||≤1.0 -3 ;
2)
3)
if the kth newton iteration does not meet all of the above conditions, then the newton iteration is considered non-converging, k=k+1, with x k+1 As x k The fifth, sixth and seventh steps are carried out again; otherwise Newton iteration converges, x k+1 For the solution of the n+1th time step, according to x k+1 The vapor phase internal energy, liquid phase internal energy, void fraction, pressure, vapor phase velocity, and liquid phase velocity of all control bodies can be obtained for the n+1th time step.
Through the above-described procedure, the numerical calculation results are shown in fig. 2. The calculation results obtained by the fully hidden numerical algorithm in the invention are better in accordance with the experimental results and are similar to the calculation results of the semi-hidden numerical algorithm in precision. In numerical simulation of the several groups of experimental conditions, limited by the count value, in order to obtain stable time numerical calculation results, the time step of the explicit or semi-implicit numerical algorithm of the several groups of conditions is not more than 0.008s, typically 0.005s or less, while in the fully implicit numerical method, the time step Δt=0.01 s. Therefore, the time step of the fully implicit numerical method is not influenced by the count value, and the numerical calculation efficiency of the transient safety analysis of the nuclear power plant can be improved.
While the invention has been described in detail in the foregoing general description and with reference to specific embodiments thereof, it will be apparent to one skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.