Coupling method of thermal hydraulic program and containment program

文档序号:1114702 发布日期:2020-09-29 浏览:10次 中文

阅读说明:本技术 一种热工水力程序与安全壳程序的耦合方法 (Coupling method of thermal hydraulic program and containment program ) 是由 张斌 谢天辞 单建强 于 2020-05-28 设计创作,主要内容包括:本发明公开了一种热工水力程序与安全壳程序的耦合方法,基于两流体模型并结合参与耦合程序的数值求解方法,导出求解变量的空间离散方程组,对问题区域进行求解分割,引入虚拟节点模拟耦合边界,通过设定的读写规则,在参与耦合的程序间进行信息交互,基于参与耦合程序的适用范围划分耦合区域,采用半隐式与显式方法完成热工水力程序与安全壳程序的耦合,耦合程序能同时模拟主回路与安全壳的热工水力响应。本发明能同时模拟主回路与安全壳的热工水力响应,提高了反应堆工程设计的速度与精度。(The invention discloses a coupling method of a thermal hydraulic program and a containment program, which is based on two fluid models and combined with a numerical solving method of participating in the coupling program, derives a space discrete equation set of solving variables, solves and divides a problem area, introduces a virtual node to simulate a coupling boundary, performs information interaction among the programs participating in the coupling through a set reading and writing rule, divides the coupling area based on the application range of participating in the coupling program, adopts a semi-implicit and explicit method to complete the coupling of the thermal hydraulic program and the containment program, and can simultaneously simulate the thermal hydraulic response of a main loop and the containment by the coupling program. The invention can simultaneously simulate the thermal hydraulic response of the main loop and the containment vessel, and improves the speed and the precision of the reactor engineering design.)

1. A method for coupling a thermal hydraulic program and a containment program is characterized in that a space discrete equation set of solving variables is derived based on two fluid models and combined with a numerical solving method of participating in the coupling program, a problem area is solved and divided, a virtual node is introduced to simulate a coupling boundary, information interaction is performed among the programs participating in coupling through a set reading and writing rule, the coupling area is divided based on an application range of participating in the coupling program, the coupling of the thermal hydraulic program and the containment program is completed by adopting a semi-implicit method and an explicit method, and the coupling program can simultaneously simulate thermal hydraulic response of a main loop and the containment.

2. The method of claim 1, wherein the conservation equations of the gas phase and the liquid phase are established based on two fluid models, and the variable V ═ is selected (α)g,Pg,Pf,ug,uf,Eg,Ef)T,αk,uk,Ek,PkRespectively mean volume fraction, pressure, speed and energy of the k phase, and rewriting a conservation equation and a complementary constitutive relation into a vector function; for all spatial differential termsAnd obtaining a differential equation compatible with the differential equation by adopting a discrete format and combining, obtaining a spatial discrete equation of a j node for a spatial differential term by using information of a front m node and a rear n node, and determining an internal node equation.

3. The method for coupling a thermohydraulic program and a containment program according to claim 2, wherein the system of equations for solving the internal nodes is as follows:

FD represents a differential equation relation of solving variables, x and t represent space and time variables respectively, and CiFor solving systems of variablesThe number of the first and second groups is,

Figure FDA0002514252170000013

4. The method for coupling a thermohydraulic program with a containment program according to claim 2, wherein the conservation equation of the gas phase and the liquid phase participating in the coupling is specifically as follows:

the conservation of mass equation for the k-phase is as follows:

Figure FDA0002514252170000021

conservation of momentum equation for k-phase:

Figure FDA0002514252170000022

energy conservation equation for k-phase:

k represents a liquid or gas phase αkk,uk,k,Ek,Pk,Qk,IkThe average volume fraction of the k phase, the density, the speed, the mass transfer rate, the internal energy and the pressure are respectively an energy change term caused by the work done by other forces except the self pressure and the heat transfer, and a momentum change term caused by the impulse of other forces except the self pressure.

5. The method for coupling a thermohydraulic power program with a containment program according to claim 2, wherein the spatial discrete equation of j node:

FD represents a differential equation relation of solving variables, x and t represent space and time variables respectively, and CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

6. The method for coupling a thermodynamic hydraulic program and a containment program according to claim 1, wherein a similar semi-implicit solution is adopted, during coupling calculation, the problem is divided into two parts from a j node, the equation sets of the two parts are spliced, and a discrete equation AD is supplemented to keep the solution after coupling division unchanged.

7. The method for coupling a thermohydraulic power process to a containment process according to claim 6, wherein the first half formula is:

Figure FDA0002514252170000031

the first m nodes and the last n nodes of the area are boundary conditions;

the latter half of the formula is:

Figure FDA0002514252170000032

the first m node and the last n node of the area are boundary conditions, FD represents the difference equation relation of solving variables, x and t represent space and time variables respectively, CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

8. The method for coupling a thermohydraulic program to a containment program according to claim 6, wherein the supplemented discrete equation AD is:

Figure FDA0002514252170000034

wherein, C'kA' is the corresponding coefficient and coefficient vector in FD, FD is the differential equation relation of solving variables, x and t are space and time variables respectively, CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

9. The method for coupling a thermohydraulic power program and a containment program according to claim 1, wherein in the semi-implicit coupling, the j-node pressure drop equation is as follows:

Figure FDA0002514252170000041

wherein the content of the first and second substances,

Figure FDA0002514252170000042

10. The method for coupling a thermohydraulic power program with a containment program according to claim 9, wherein in the explicit coupling, the j node is:

Figure FDA0002514252170000044

wherein the content of the first and second substances,given by another program participating in the coupling, and then directly incorporated into the system of pressure drop equations for solution.

Technical Field

The invention belongs to the technical field of thermal hydraulic power of nuclear reactors, and particularly relates to a coupling method of a thermal hydraulic power program and a containment program.

Background

The traditional nuclear power plant design method is carried out in blocks, and when probability safety risk evaluation is carried out, the phenomena of thermodynamic balance in a containment vessel, reactor core melting and repositioning, fragment bed forming and migration, chemical element release and transportation and the like are concerned after an accident. The characteristic dimensions of these phenomena are generally between a few meters and tens of meters; the thermal parameter design or the benchmark accident analysis is carried out, and the phenomena of flowing boiling, flash evaporation, liquid level collapse, critical flow, pressure wave, transonic velocity flow and the like in the loop are concerned at the moment. The characteristic dimensions of these phenomena are generally several centimeters to several meters; if the fuel assembly or flow path is further designed, the motion mechanisms of turbulent turbulences, moving boundaries, phase interfaces and component capture are of concern. These phenomena feature sizes can be as low as several millimeters. To cope with these different demands, various different levels of software have been produced over the past decades. The analysis and design tasks of the nuclear power plant can be completed by comprehensively applying the tool chain formed by the programs.

When the tool chains are used, the traditional design method usually processes the part except the simulation object as a boundary condition, obtains simulation parameters of different parts, then replaces and modifies the simulation parameters, and iterates repeatedly to finally obtain the parameters of the whole system. However, in the face of more and more advanced design schemes, the conventional design method has difficulty in meeting the requirements of accuracy and complexity. The first is the complexity increase problem caused by the system design progress. The strong coupling effect between systems makes the splitting iterative design become especially inefficient; another problem is that existing programs have difficulty meeting design accuracy requirements. The details in modern design have been developed from system to component level, but the components in the traditional thermal hydraulic program are not recognizable individuals, and the amount of calculation for the CFD program capable of giving details is hard to bear. These problems all make the new generation of reactor thermal hydraulic simulation program to develop to multi-field and multi-scale.

Disclosure of Invention

The technical problem to be solved by the invention is to provide a coupling method of a thermal hydraulic program and a containment program aiming at the defects in the prior art, which can perform one-time full-range simulation calculation on most problems in the nuclear power field, can simultaneously simulate the thermal hydraulic response of a main loop and a containment, and improves the speed and the precision of reactor engineering design.

The invention adopts the following technical scheme:

a method for coupling a thermal hydraulic program and a containment program is characterized in that a space discrete equation set of solving variables is derived based on two fluid models and combined with a numerical solving method of participating in the coupling program, a problem area is solved and divided, a virtual node simulation coupling boundary is introduced, information interaction is performed among the programs participating in the coupling through a set reading and writing rule, the coupling area is divided based on the application range participating in the coupling program, the coupling of the thermal hydraulic program and the containment program is completed by adopting a semi-implicit method and an explicit method, and the coupling program can simultaneously simulate the thermal hydraulic response of a main loop and the containment.

Specifically, a gas phase conservation equation and a liquid phase conservation equation are respectively established based on two fluid models, and a variable V is selected as (α)g,Pg,Pf,ug,uf,Eg,Ef)T,αk,uk,Ek,PkRespectively mean volume fraction, pressure, speed and energy of the k phase, and rewriting a conservation equation and a complementary constitutive relation into a vector function; for all spatial differential terms

Figure BDA0002514252180000021

And obtaining a differential equation compatible with the differential equation by adopting a discrete format and combining, obtaining a spatial discrete equation of a j node for a spatial differential term by using information of a front m node and a rear n node, and determining an internal node equation.

Further, the solving equation set of the internal nodes is as follows:

FD represents a differential equation relation of solving variables, x and t represent space and time variables respectively, and CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

Further, the conservation equation of the gas phase and the liquid phase participating in the coupling is specifically as follows:

the conservation of mass equation for the k-phase is as follows:

conservation of momentum equation for k-phase:

energy conservation equation for k-phase:

k represents a liquid or gas phase αkk,uk,k,Ek,Pk,Qk,IkThe average volume fraction of the k phase, the density, the speed, the mass transfer rate, the internal energy and the pressure are respectively an energy change term caused by the work done by other forces except the self pressure and the heat transfer, and a momentum change term caused by the impulse of other forces except the self pressure.

Further, the spatial discrete equation of the j node:

FD represents a differential equation relation of solving variables, x and t represent space and time variables respectively, and CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

Specifically, a similar semi-implicit solution is adopted, during coupling calculation, the problem is divided into two parts from a j node, equation sets of the two parts are spliced, and a discrete equation AD is supplemented to keep the solution after coupling division unchanged.

Further, the first half is formulated as:

the first m nodes and the last n nodes of the area are boundary conditions;

the latter half of the formula is:

the first m node and the last n node of the area are boundary conditions, FD represents the difference equation relation of solving variables, x and t represent space and time variables respectively, CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

Further, the complementary discrete equation AD is:

Figure BDA0002514252180000043

wherein, C'kA' is the corresponding coefficient and coefficient vector in FD, FD is the differential equation relation of solving variables, x and t are space and time variables respectively, CiIn order to solve for the coefficients of the variables,is the time differential V of the solution variableiIs the i-th component of the vector variable V, AiAre the coefficients of the vector components prior to the time derivative.

Specifically, in the semi-implicit coupling, the j node voltage drop equation is as follows:

Figure BDA0002514252180000045

wherein the content of the first and second substances,

Figure BDA0002514252180000052

is the node voltage drop, A-1,b,g1,g2,f1,f2Are all the coefficients of an equation that is,representing the content of non-condensable gas, energy flow, volume flow and mass flow of the k phase at the j node interface.

Further, in the coupling by adopting an explicit method, the j node is:

Figure BDA0002514252180000054

wherein the content of the first and second substances,given by another program participating in the coupling, and then directly incorporated into the system of pressure drop equations for solution. .

Compared with the prior art, the invention has at least the following beneficial effects:

the invention relates to a coupling method of a thermal hydraulic program and a containment program, which is based on two fluid models and combined with a numerical solving method of participating in the coupling program to solve and divide a problem area, introduces a virtual node simulation coupling boundary and carries out information interaction between the programs participating in the coupling through a specific read-write rule. The division of the coupling area is based on the application range of the coupling program, the simulation capability is improved, and the simulation precision is improved.

Further, a differential equation set of single solution variables is derived using two fluid control equations that are similar in all coupled programs.

Furthermore, because the original calculation domain is divided into two blocks by the coupling problem, the lost equation AD is respectively supplemented for the two equation sets, and the same solution is kept as the original equation set.

Furthermore, when the semi-implicit coupling is utilized, the calculation speed is high, the stability is good, but the method requires that the programs participating in the coupling adopt similar semi-implicit solutions to solve, and the solved basic variables are selected consistently.

Furthermore, when the explicit coupling method is used for coupling, the universality is good, the programs participating in the coupling are not required to have the same solving process, only the selection of the solved basic variable set is consistent, but the calculation speed is low.

In summary, the invention breaks through the process that the calculation result of one program is set as the boundary condition to be calculated by another program, and then the iteration is carried out between the two programs, and the problem in the reactor engineering design can be solved at one time.

The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.

Drawings

FIG. 1 is a region segmentation graph of a coupling calculation;

FIG. 2 is a schematic view of a discharge experimental apparatus;

FIG. 3 is a schematic diagram of a modeling of a blow-down experiment;

FIG. 4 is a graph comparing simulation and experiment of outlet pressure;

fig. 5 is a graph comparing simulation and experiment of void fraction.

Detailed Description

The invention relates to a coupling method of a thermal hydraulic program and a containment program, wherein the containment calculation program and the thermal hydraulic program both adopt two fluid models as the basis, and the coupling method comprises the following steps:

s1, deriving a space discrete equation set of the solution variables;

the two fluid models establish conservation equations for the gas and liquid phases, respectively.

Wherein the mass conservation equation of the k phase is as follows:

conservation of momentum equation for k-phase:

energy conservation equation for k-phase:

k represents a liquid or gas phase αkk,uk,k,Ek,Pk,Qk,IkThe average volume fraction of the k phase, the density, the speed, the mass transfer rate, the internal energy and the pressure are respectively an energy change term caused by the work done by other forces except the self pressure and the heat transfer, and a momentum change term caused by the impulse of other forces except the self pressure. The above physical quantities all adopt the standard international system of units.

The unexpanded form of the above conservation equation is a first-order non-linear partial differential equation of a plurality of state parameters.

Choosing the variable V ═ (α)g,Pg,Pf,ug,uf,Eg,Ef)TThe conservation equation and the complementary constitutive relation are rewritten as vector functions:

Figure BDA0002514252180000071

wherein A and B are both 7x7 matrixes and elements are both ViAnd its derivatives in time and space.

The space of a differential function formed by taking a space variable x and a time variable t as independent variables is recorded asIs provided with

Figure BDA0002514252180000073

Is a differential function, the i-th equation in the above equation can be written as:

Figure BDA0002514252180000074

wherein A isi,BiIs the ith row vector of the matrix a, B.

Assuming that all the spaces have been differentiatedItem(s)

Figure BDA0002514252180000075

Adopting proper discrete formats, combining the formats to obtain a differential equation compatible with the differential equation, using the information of the front m node and the rear n node in the process, and regarding the spatial differential terms, the method comprises the following steps:

wherein, Vi(k) Representing the value of the variable to be solved at node k; ckIs a discrete format coefficient and BiThe result after multiplication still has nonlinearity. The space of the differential function with t as an independent variable isThen there isIs provided with

Figure BDA0002514252180000079

For j > m, the spatial discrete equation of the j node is obtained:

the above is applied to all computations, namely, the computation matrix is a solution matrix of a certain variable, but the first m node and the last n node are not included, and the boundary nodes do not meet the difference condition of spatial dispersion and need additional processing.

The system of equations for solving the inner nodes is as follows:

s2, deriving the virtual node equation needed for coupling (which is the virtual node equation needed for coupling)

For the coupling calculation, in the scenario as shown in fig. 1, when the j node is taken as a partition node, the area before the j node is intersected with a certain program for calculation, another program for calculation is used after the j node, and information is transmitted between the programs by a certain mechanism; for the first half, there are:

Figure BDA0002514252180000082

the first m node and the last n node of the area are boundary conditions. Similarly, for the latter half:

the first m node and the last n node of the area are boundary conditions.

And splicing the two formulas and comparing the two formulas with the original internal node equation set to find that the segmented solving equation set lacks equations from the j-n +1 node to the j + m node.

The reason is that:

compared with the original solution domain, the last n nodes in the first half solution domain and the front m nodes in the second half solution domain become extra boundary conditions due to segmentation, and are not processed according to the inner nodes.

Due to the absence of the computing nodes, the direct coupling segmentation inevitably causes the change of the solution, and equations need to be supplemented into the solution to keep the solution after the coupling segmentation unchanged. As shown in FIG. 1, if a certain number of virtual nodes are supplemented to a program beyond the partition nodes, let k satisfy j-n +1 ≤ k ≤ j + m, there is a supplementary discrete equation AD:

Figure BDA0002514252180000091

wherein, C'kAnd a' is the coefficient and coefficient vector corresponding to that in FD.

Supplementing the above formula to the original first half equation and the second half equation according to the virtual nodes, wherein the latter half is taken as an example, and the method comprises the following steps:

after the first half equation and the second half equation of the supplementary equation are spliced, the number of the equations is consistent with that of the original equation. If the complementary equation and the original equation can be kept in the same solution, the coupled segmentation does not influence the solution of the problem. After the coupling calculation segmentation area is explained, the virtual nodes are supplemented properly, and the homolysis before and after the coupling calculation can be ensured by supplementing a proper virtual node equation. The supplementary virtual nodes are nodes used in the spatial difference, and for the form of the supplementary equation, the simplest way is to supplement the same form as the original equation. However, the problem is that the spatial discrete equation FD is a nonlinear equation with time differentiation, and different programs use different numerical methods to solve. When the form of the supplementary equation AD is consistent with that of FD, the coupling method also has the difference of explicit coupling and implicit coupling with the difference of the original solution mode.

The above discussion shows that: when the program in the coupled calculation system at least comprises the same control equation and variable definition, the coupled calculation mode and the original calculation mode have the same convergence solution for the commonly contained equation through the supplementary equation and adopting a proper numerical solution. However, due to the additional or unique constitutive equations contained in the program, the overall derived transient processes still have differences.

S3, combining the steps S1 and S2, applying the method to a specific program, and performing coupling processing by adopting semi-implicit and explicit methods

Display coupling:

assuming that the coupling calculation region is divided from the j point, the j +1 node is supplemented outside the j point, and the j th point has:

Figure BDA0002514252180000101

wherein the superscript represents that the value is a predicted step value of the thermodynamic hydraulic program, the value is extrapolated with time according to an initial value of time, and the superscript represents that the item needs to be obtained from the outside when calculation is started.

Substituting the pressure drop value into the pressure drop matrix, when PCG:

the subsequent solving steps are consistent with the solving process in the original program.

The method has the advantages that the number of the transferred variables in the explicit coupling is small, the numerical method of the nodes in the original equation is not concerned, and the method has good universality.

Semi-implicit coupling method:

the reason is that the pressure matrix PCG solution and the momentum equation linearization are performed in two procedures. Assuming that two programs participating in the coupling calculation are called PP (primary program) and sp (secondary program), the calculation region is divided from j, and j +1 node is supplemented outside j, then in PP, there are:

wherein the content of the first and second substances,

Figure BDA0002514252180000113

energy flow, volume flow and mass flow representing the k phase on the j node interface are transmitted from the outside; the semi-implicit coupling method is characterized by splitting the above solution that occurs in one procedure into two procedures. E.g. using a second program in a first program

Figure BDA0002514252180000114

Find A-1,b,g1,g2,f1,f2And the coefficients are transferred to a corresponding equation of a second program, the second program utilizes the equation to derive a pressure drop relation in a linear momentum equation and replaces the pressure drop relation to the first program, and the first program utilizes the node pressure drop relation to combine an original pressure drop relation equation set into a complete pressure drop equation set PCG.

Using the variables passed in by the SP, the variable coefficients of the above equation can be derived, and given similar expressions in the SP, these coefficients are passed into:

Figure BDA0002514252180000115

deriving a velocity momentum relationship by utilizing a linearized momentum equation in the SP, substituting the velocity momentum relationship into the formula to obtain a discrete pressure equation and a pressure drop matrix:

Figure BDA0002514252180000116

then the solving step is consistent with the solving process in the original program.

The method indicates a theoretical method for coupling the thermal hydraulic program and the containment program, and the specific implementation depends on an inter-process coupling communication library.

The invention provides a coupling method between a thermal hydraulic program and a containment program, and when the coupling method is specifically implemented in the program, the transmission of variables among equations depends on the communication among program processes. An interprocess communication library for coupling is also disclosed.

The inter-process communication base for coupling, namely the coupling base component base, is a base which is developed by self and constructed by utilizing a shared memory and a message queue principle. In particular to a Windows platform, because the Windows platform is a system framework supporting parallelism, an own shared variable mechanism is adopted. Among the APIs provided by Windows, the common inter-process interaction means are the following: file mapping, shared memory, anonymous pipes, named pipes, mail slots, clipboards, dynamic data exchange, object linking and embedding, dynamic link libraries, process remote calls, NetBIOS functions, web sockets, and message queues. Although the means is various, the means after removing the network function which is difficult to use remains: file mapping, shared memory and message queue. The base library combines the required functions based on these three approaches.

Serializing to standardize the coupling data between the thermal hydraulic program and the containment program, and sending and reading messages to receive and send coupled variables. Code synchronization can be used to control the execution state of programs participating in the coupling.

Serialized read-write:

in view of the uncertainty in the data transmission of the coupling program, it is necessary to serialize the data. The IPC (Inter-Process Communication) mechanism of the coupling program mainly uses file mapping combined with a shared memory and is assisted by a message queue to synchronize partial codes. Therefore, the serialized data is stored in the mapped file/memory, and programs in different languages and different frameworks can be ensured to be read and written.

The program-serialized read-write format is a superposition of a set of character information. Each set of character information comprises two parts, the former part is a data label for describing the meaning of the data, and the part is not of a fixed length. The latter part is the data itself, which is fixed to 15 bits long. A separator is arranged between the two parts. The individual data is serialized in memory through the underlying library as follows:

PH2O$ 2877.2765#

and a string of data becomes:

time$ 0#progress$ 0#init1$ 2877.2765#i nit2$ 1.2e+09#PH2O$ 0#progress2$ 0#init1$ 283.15#

both $ and # in the data are delimiters to distinguish between the data tag and the data itself. The library can query the data itself according to the data tags, or can query according to the sequence of occurrence of the data. After serialization, a great deal of space is wasted in data transmission, but due to the fact that a uniform read-write format is adopted, the data have the cross-language interaction capacity.

And (3) message sending:

data transmission among processes is realized by combining shared memory and file mapping. The address spaces of Windows system processes are logically isolated from each other, but physically overlap. By overlapping is meant that the memory area within the same block may be used by multiple processes simultaneously. By utilizing the principle, communication among different processes can be realized. Firstly, calling CreateFileMapping to create a named memory mapping file object, at the moment, the system applies for a region with a specified size in a physical memory, and returns a file handle. For convenience of operation, a file mapping function is adopted to map the internal memory of the block into a readable and writable file, so that data transmission is facilitated, namely, a MapViewOfFile function is called to enable Windows to map the internal memory space to the address space of a process. Then the serialized data is directly copied to the designated area of the memory file, and the handle is closed, thus completing the write operation of the shared memory.

During the writing operation, it should be noted that, once the written content exceeds the limit, the redundant characters are truncated. In addition, when a shared memory is created by initialization, the character content uninitliuction is also written into the shared memory.

Receiving a message:

the process of message acceptance is the reverse of sending. After a program creates a shared memory, when other processes access the memory area of the shared memory, the object handle must be obtained by using the OpenFileMapping function, and a map of the memory space must be obtained by calling the MapViewOfFile function. The handle at this time operates on the file object. The memory data is copied to the local and the type conversion is carried out, so that the previous character information can be obtained, and the specific transmission data can be obtained according to the deserialization rule.

It should be noted that the read contents cannot exceed the limit, and once the read contents exceed the limit, the problem of out-of-range access may occur, which may lead to program crash. The good way is that the mapping sizes of the read and write files are kept consistent, and the problem of memory boundary crossing is avoided. If the dummy word is read, it is highly likely that the shared memory will not be created, and if the UNINITLIZATION is read, a block of shared memory that has never been written is read.

Code synchronization:

in the above message passing, all operations are not thread-safe. The method of combining shared memory with file mapping can solve the problem of data transmission, but the problem of data synchronization still exists. In addition, there is a risk of read and write races. In order to achieve synchronous operation of the code, an additional auxiliary mechanism, namely a message mechanism, is introduced.

Message queues are the most applicable mechanism for inter-process communication within Windows. Fig. 1 illustrates the principle. The API WaitForSingleObject function provided by Windows is capable of receiving a particular named event object. Whenever the function is set in a program, the function runs to it to listen for the system's event loop waiting to be accepted. And calling an OpenEvent function in another program to create a corresponding named event, wherein the program can release the blocking state of another monitoring program while calling the SetEvent function, thereby achieving the purpose of synchronous execution of codes.

The execution steps of the participated coupling program are controlled by adaptively modifying the participated program, and the coupling of the thermal hydraulic program and the containment program is realized by utilizing the coupling basic component library to exchange interface information.

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.

The Edwards and O' Brien blowing experiments are a group of experiments conducted in the 70 s investigating the critical flow of pipes. FIG. 2 shows a schematic diagram of the experimental setup. The main body of the experimental device is a straight pipeline which is 4.096m long and 0.073m in outer diameter. The interior of the pipeline is filled with water, and the pressure and the temperature fluctuate between 3.55MPa and 514.8K and between 17.34MPa and 616.5K according to experimental conditions. The conditions of 7.1MPa and 513.7K are simulated.

One end of the experiment pipeline is blocked by a glass plug, and when an experiment is started, the plug is broken and spraying is started. Since a part of the glass plug still remains on the pipe wall, the actual area of the pipe sprayed in the experiment is only 87% of the original area according to the measurement. The main measurement parameters of the experiment are the temperature and pressure of each part of the experiment pipeline and the void fraction. The procedure used to simulate the experiment was a coupling procedure, which was coupled according to the explicit coupling method described above, and the modeling of the experiment is shown in fig. 3, where the pipeline was divided into 5 control volumes, the first three using containment procedure calculations, and the last two using thermal hydraulic procedure calculations.

Referring to fig. 4 and 5, fig. 4 and 5 are graphs comparing the calculated pressure at the nozzle outlet and the fraction of intermediate cavitation bubbles with the experiment. The results of the individual calculations of the containment program are also given in the figure. Wherein, the experiment, the coupling calculation and the containment vessel are respectively expressed by EXP, CPL and MEL. At the beginning of the experiment, the tube outlet rapidly vaporizes and produces a pressure wave propagating towards the other end of the tube, a process that is short lasting tens of milliseconds, after which the tube outlet develops a steady critical flow in hundreds of milliseconds until the pressure is no longer sufficient to support the blow-off. For all parameters measured by the experiment, the coupling calculation is quite consistent with the experiment result and is superior to the individual calculation of the containment program, which is not listed here. The reason is that the critical flow model used by the thermal hydraulic program is more accurate than the containment, which also shows that by coupling different calculation programs, the respective advantages of the programs can be exerted, and the defects thereof are avoided.

In summary, the thermal hydraulic general coupling method established by the invention can be used for coupling a general thermal hydraulic program to a containment program.

The above-mentioned contents are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modification made on the basis of the technical idea of the present invention falls within the protection scope of the claims of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:辐射防护屏

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!