Two-fluid six-equation-based container and pipeline parameter panel initialization parameter automatic checking and calculating method suitable for Modelica language
By using a two-fluid hexa equation method in the Modelica language, the initialization parameters of the container and pipeline model are automatically checked and calculated, and the problem of difficult parameter self-consistentness is solved, reducing the configuration difficulty and improving the convergence of the simulation model.
Patent Information
- Application Number
- CN202411933326.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-02
AI Technical Summary
In the Modelica language, the initialization parameters of the container model and pipeline model need to be manually configured, which makes it difficult to ensure the self-consistent parameters, affecting the convergence of the thermal hydraulic system simulation model.
Using a method based on the two-fluid hexa equation, the initialization parameters of the container and pipeline model are automatically checked and calculated to ensure that the initial pressure, initial temperature, initial liquid level and initial share of non-condensed gas are physically self-consistent.
It reduces the difficulty and workload of users to configure initialization parameters, avoids the negative impact of unreasonable initial parameter configuration on the convergence of simulation models, and improves parameter self-consistentness and stability of simulation models.
Smart Images

Figure BDA0005210891020000021 
Figure BDA0005210891020000022 
Figure BDA0005210891020000023
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of thermal hydraulic simulation, and in particular relates to an automatic checking and calculating method for initialization parameters of a container and pipeline parameter panel based on two-fluid six equations and applicable to Modelica language. Background Art
[0002] The initialization parameters of the container model and pipeline model based on Modelica need to configure pressure, temperature, liquid level, mass vapor content, and non-condensable gas fraction. There are complex constraints between these parameters in the physical sense. Taking the container model as an example, when the container liquid level is between 0 liquid level and full liquid level and the non-condensable gas fraction is 0, the fluid temperature should be the saturation temperature corresponding to the initial pressure; when the container liquid level is between 0 liquid level and full liquid level and the non-condensable gas fraction is greater than 0, the influence of the non-condensable gas partial pressure needs to be considered, and the fluid temperature should be the saturation temperature corresponding to the pressure obtained by deducting the non-condensable gas partial pressure from the initial pressure; or when the container liquid level is full liquid level, that is, the container is a water entity, the temperature only needs to meet the requirement of not being greater than the saturation temperature corresponding to the pressure. Therefore, it is difficult to ensure the self-consistency of the container model by manually configuring its initial parameters, which restricts the convergence of the simulation. Summary of the invention
[0003] The purpose of the present invention is to provide a method for automatically checking and calculating the initialization parameters of a container and pipeline parameter panel based on two-fluid six equations suitable for Modelica language, which can quickly realize the self-consistency of the initial pressure, initial temperature, initial liquid level and initial share of non-condensable gas of the container model in a physical sense, reduce the difficulty and workload of users configuring the initial parameters of the container model, and avoid the influence of unreasonable initial parameter configuration of the container model on the convergence of the thermal-hydraulic system simulation model.
[0004] The technical solution of the present invention is as follows: a method for automatically checking and calculating the initialization parameters of a container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language, comprising the following steps:
[0005] Step 1: Calculation logic of the model initialization parameter verification process for the container model;
[0006] Step 2: Calculation logic of the parameter panel calculator for the pipeline model.
[0007] The step 1 comprises:
[0008] Step 11: Determine whether the initial liquid level H0 of the container is full. If it is full, proceed to step 12; if it is zero, proceed to step 13; otherwise, proceed to step 14;
[0009] Step 12: Check the initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 is not adjusted; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 ;
[0010] Then check the initial non-condensable gas fraction Q n0 for:
[0011]
[0012] Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0;
[0013] Step 13: First check the initial fraction of non-condensable gas Q n0 , Q n0 Should meet:
[0014]
[0015] Among them, P s (T env ) is the ambient temperature T env The corresponding saturation pressure is when the initial non-condensable gas fraction Q n0 When formula (6) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (6) is not satisfied, Q n0 Automatically adjust to:
[0016]
[0017] Then check the defined initial temperature T0, which should satisfy:
[0018] T0≥T s (P gs0 )=T s (P0(1-Q n0 )) (4)
[0019] Among them, P gs0 is the partial pressure of the container vapor, T s (P gs0 ) is the saturation temperature corresponding to the steam partial pressure. When the defined initial temperature T0 satisfies formula (8), that is, T0 is greater than or equal to the initial steam partial pressure P of the container, g0 When the corresponding saturation temperature is reached, the defined initial temperature T0 is not adjusted; when the defined initial temperature T0 does not satisfy formula (8), T0 is automatically adjusted to:
[0020] T0=Ts (P gs0 )=T s (P0(1(1-Q n0 )) (5)
[0021] Step 14: First check the defined initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 will not be adjusted temporarily; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 ;
[0022] Then check the initial fraction of non-condensable gas Q n0 , Q n0 Should meet:
[0023]
[0024] Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0. When the initial fraction of non-condensable gas Q n0 When formula (10) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (10) is not satisfied, Q n0 Automatically adjust to:
[0025]
[0026] Finally, the defined initial temperature T0 is checked and automatically adjusted to:
[0027] T0=T s (P gs0 )=T s (P0(1-Q n0 )) (8)
[0028] Step 15: Set the verified initial pressure P0, initial temperature T0, initial mass vapor content x0, and initial fraction of non-condensable gas Q n0 The initialization parameters on the container model parameter panel are displayed and updated.
[0029] The step 2 comprises:
[0030] Step 21: Treat each control volume of the pipeline model as a separate container. Take the control volume numbered i as an example. The initial liquid level H of the corresponding container i is i0 equal:
[0031] H i0 =L ci (1-xi0 ) (9)
[0032] Where i = 1, 2, .., N, N is the number of pipeline segments, L ci is the length of control volume i, x i0 is the initial mass vapor fraction of the control volume, when x i0 is equal to 0, container i is full, when x i0 is equal to 1, container i is at zero liquid level, and the initial pressure of container i is equal to the initial pressure P of control body i i0 , the initial temperature of container i is equal to the initial temperature T of control volume i i0 , the initial non-condensable gas fraction of container i is equal to the initial non-condensable gas fraction Q of control volume i in0 ;
[0033] Step 22: According to the initial liquid level H of container i i0 and initial pressure P i0 , through the initialization parameter calibration process of the container model, calibrate the initial temperature T of container i i0 , initial fraction of non-condensable gas Q in0 , and update the initial parameters corresponding to the control body i on the pipeline model parameter panel;
[0034] Step 23: Complete the initialization parameter verification of control bodies numbered i to N in sequence.
[0035] The beneficial effects of the present invention are as follows: the present invention can quickly realize the self-consistency of the initial pressure, initial temperature, initial liquid level and initial fraction of non-condensable gas of the container model in a physical sense, reduce the difficulty and workload of the user configuring the initial parameters of the container model, and avoid the influence of the unreasonable initial parameter configuration of the container model on the convergence of the thermal hydraulic system simulation model. The present invention can quickly realize the self-consistency of the initial pressure, initial temperature, initial mass vapor content and initial fraction of non-condensable gas of each node of the pipeline model in a physical sense, reduce the difficulty and workload of the user configuring the initial parameters of the pipeline model, and avoid the influence of the unreasonable initial parameter configuration of the pipeline model on the convergence of the thermal hydraulic system simulation model. DETAILED DESCRIPTION
[0036] The present invention is further described in detail below with reference to specific embodiments.
[0037] A method for automatically checking and calculating initialization parameters of a container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language includes the following steps:
[0038] Step 1: Calculation logic of the model initialization parameter verification process for the container model;
[0039] Step 11: Determine whether the initial liquid level H0 of the container is full. If it is full, proceed to step 12; if it is zero, proceed to step 3; otherwise, proceed to step 14;
[0040] Step 12: Check the initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 is not adjusted; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 .
[0041] Then check the initial fraction of non-condensable gas Q n0 for:
[0042]
[0043] Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0.
[0044] Step 13: First check the initial fraction of non-condensable gas Q n0 , Q n0 Should meet:
[0045]
[0046] Among them, P s (T env ) is the ambient temperature T env (generally 20℃) corresponds to the saturation pressure. When the initial non-condensable gas fraction Q n0 When formula (6) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (6) is not satisfied, Q n0 Automatically adjust to:
[0047]
[0048] Then check the defined initial temperature T0, which should satisfy:
[0049] T0≥T s (g s0 )=T s (P0(1-Q n0 )) (13)
[0050] Among them, P gs0 is the partial pressure of the container vapor, T s (P gs0 ) is the saturation temperature corresponding to the steam partial pressure. When the defined initial temperature T0 satisfies formula (8), that is, T0 is greater than or equal to the initial steam partial pressure P of the container, g0When the corresponding saturation temperature is reached, the defined initial temperature T0 is not adjusted; when the defined initial temperature T0 does not satisfy formula (8), T0 is automatically adjusted to:
[0051] T0=T s (P gs0 )=T s (P0(1-Q n0 )) (14)
[0052] Step 14: First check the defined initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 will not be adjusted temporarily; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 .
[0053] Then check the initial non-condensable gas fraction Q n0 , Q n0 Should meet:
[0054]
[0055] Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0. When the initial non-condensable gas fraction Q n0 When formula (10) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (10) is not satisfied, Q n0 Automatically adjust to:
[0056]
[0057] Finally, the defined initial temperature T0 is checked and automatically adjusted to:
[0058] T0=T s (P gs0 )=T s (P0(1-Q n0 )) (17)
[0059] Step 15: Set the verified initial pressure P0, initial temperature T0, initial mass vapor content x0, and initial fraction of non-condensable gas Q n0 The initialization parameters on the container model parameter panel are displayed and updated.
[0060] Step 2: Calculation logic of parameter panel calculator for pipeline model
[0061] Step 21: Consider each control volume of the pipeline model as a separate container. Take the control volume numbered i (i = 1, 2, .., N, where N is the number of pipeline segments) as an example. The initial liquid level H of the corresponding container i is i0 equal:
[0062] H i0 =L ci (1-x i0 ) (18)
[0063] Among them, L ci is the length of control volume i, x i0 is the initial mass vapor fraction of the control volume. i0 is equal to 0, container i is full, when x i0 is equal to 1, and the liquid level of container i is zero. The initial pressure of container i is equal to the initial pressure P of control volume i i0 , the initial temperature of container i is equal to the initial temperature T of control volume i i0 , the initial non-condensable gas fraction of container i is equal to the initial non-condensable gas fraction Q of control volume i in0 .
[0064] Step 22: According to the initial liquid level H of container i i0 and initial pressure P i0 , through the initialization parameter calibration process of the container model, calibrate the initial temperature T of container i i0 , initial fraction of non-condensable gas Q in0 , and update the initial parameters corresponding to control body i on the pipeline model parameter panel.
[0065] Step 23: Complete the initialization parameter verification of control bodies numbered i to N in sequence.
Claims
1. A method for automatically checking and calculating the initialization parameters of a container and pipeline parameter panel based on two-fluid six equations suitable for Modelica language, characterized in that: The steps include: Step 1: Calculation logic of the model initialization parameter verification process for the container model; Step 2: Calculation logic of the parameter panel calculator for the pipeline model.
2. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 1, characterized in that: The step 1 comprises: Step 11: Determine whether the initial liquid level H0 of the container is full. If it is full, proceed to step 12; if it is zero, proceed to step 13; otherwise, proceed to step 14.
3. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 2, characterized in that: The step 1 comprises: Step 12: Check the initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 is not adjusted; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 ; Then check the initial fraction of non-condensable gas Q n0 for: Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0.
4. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 3, characterized in that: The step 1 comprises: Step 13: First check the initial fraction of non-condensable gas Q n0 , Q n0 Should meet: Among them, P s (T env ) is the ambient temperature T env The corresponding saturation pressure is when the initial non-condensable gas fraction Q n0 When formula (6) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (6) is not satisfied, Q n0 Automatically adjust to: Then check the defined initial temperature T0, which should satisfy: T0≥T s (P gs0 )=T s (P0(1-Q n0 )) (4) Among them, P gs0 is the partial pressure of the container vapor, T s (P gs0 ) is the saturation temperature corresponding to the steam partial pressure. When the defined initial temperature T0 satisfies formula (8), that is, T0 is greater than or equal to the initial steam partial pressure P of the container, g0 When the corresponding saturation temperature is reached, the defined initial temperature T0 is not adjusted; when the defined initial temperature T0 does not satisfy formula (8), T0 is automatically adjusted to: T0=T s (P gs0 )=T s (P0(1-Q n0 )) (5)。 5. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 4, characterized in that: The step 1 comprises: Step 14: First check the defined initial temperature T0. If the defined initial temperature T0 is less than or equal to the saturation temperature T corresponding to the initial pressure P0 of the container, s0 , the initial temperature T0 will not be adjusted temporarily; if the defined initial temperature T0 is greater than the saturation temperature T corresponding to the container pressure s0 , it will automatically adjust to the saturation temperature T s0 ; Then check the initial fraction of non-condensable gas Q n0 , Q n0 Should meet: Among them, P s (T0) is the saturation pressure corresponding to the initial temperature T0. When the initial fraction of non-condensable gas Q n0 When formula (10) is satisfied, Q n0 No adjustment is made; when Q n0 When formula (10) is not satisfied, Q n0 Automatically adjust to: Finally, the defined initial temperature T0 is checked and automatically adjusted to: T0=T s (P gs0 )=T s (P0(1-Q n0 )) (8)。 6. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 5, characterized in that: The step 1 comprises: Step 15: Set the verified initial pressure P0, initial temperature T0, initial mass vapor content x0, and initial fraction of non-condensable gas Q n0 The initialization parameters on the container model parameter panel are displayed and updated.
7. The method for automatically checking and calculating the initialization parameters of the container and pipeline parameter panel based on two-fluid six equations applicable to Modelica language as claimed in claim 1, characterized in that: The step 2 comprises: Step 21: Treat each control volume of the pipeline model as a separate container. Take the control volume numbered i as an example. The initial liquid level H of the corresponding container i is i0 equal: H i0 =L ci (1-x i0 ) (9) Where i = 1, 2, .., N, N is the number of pipeline segments, L ci is the length of control volume i, x i0 is the initial mass vapor fraction of the control volume, when x i0 is equal to 0, container i is full, when x i0 is equal to 1, the liquid level of container i is zero, and the initial pressure of container i is equal to the initial pressure P of control body i i0 , the initial temperature of container i is equal to the initial temperature T of control volume i i0 , the initial non-condensable gas fraction of container i is equal to the initial non-condensable gas fraction Q of control volume i in0 ; Step 22: According to the initial liquid level H of container i i0 and initial pressure P i0 , through the initialization parameter calibration process of the container model, calibrate the initial temperature T of container i i0 , initial fraction of non-condensable gas Q in0 , and update the initial parameters corresponding to the control body i on the pipeline model parameter panel; Step 23: Complete the initialization parameter verification of control bodies numbered i to N in sequence.