UNIVERSITY OF PITTSBURGH Pressurizer (PPZ) Design Basis Document SIMULINKTM Thermal Hydraulic Model Thomas L Meikle V 3/28/2011 0 PPZ Model Table of Contents X.1 Model PPZ ........................................................................................................................................ 2 X.1.1 System Scope of Simulation ..................................................................................................... 2 X.1.1.1 Simulation Description ......................................................................................................... 2 X.1.1.2 Equipment and Functions Not Simulated ............................................................................. 2 X.1.2 Software Communication and Hierarchy Diagram ................................................................... 2 X.1.3 Mathematical Description ......................................................................................................... 2 X.1.3.1 Model Description................................................................................................................. 3 X.1.3.2 Assumptions and Approximations ........................................................................................ 3 X.1.3.3 Description of Equations ....................................................................................................... 3 X.1.3.4 Definition of Variables.......................................................................................................... 4 X.1.3.5 Malfunctions ......................................................................................................................... 4 X.1.4 Constants Derivation ................................................................................................................. 4 X.1.5 GUI Interfaces ........................................................................................................................... 4 X.1.5.1 Screen Displays ..................................................................................................................... 5 X.1.5.2 Screen Controls ..................................................................................................................... 6 X.1.6 Program Description and SIMULINKTM model ....................................................................... 6 X.1.6.1 SIMULINKTM Model ............................................................................................................ 6 X.1.6.2 MATLABTM Functions ......................................................................................................... 6 X.1.7 References ................................................................................................................................. 8 Appendix A………………………………………………………………………………………………9 Appendix B……………………………………………………………..………………………………10 Appendix C………………………………………………………………………..……………………11 1 PPZ Model X.1 Model PPZ This section documents the development of a SIMULINKTM based thermal hydraulic model for Pressurized Water Reactor (PWR) Pressurizer (PPZ). X.1.1 System Scope of Simulation The scope of the PPZ simulation includes the development of the physics involved in the simulation of pressurizer behavior to due to transient loading conditions. X.1.1.1 Simulation Description The PPZ model provides transient responses to changes in surge line mass flow rate and energy, spray line mass flow rate and enthalpy, pressurizer relief valve operation, as well as PPZ heater input. PPZ pressure and level are the corresponding outputs. X.1.1.2 Equipment and Functions Not Simulated The boundary conditions for the PPZ model are the inlets and outlets to the PPZ lower and upper heads. Therefore, the surge line, spray line, and safety relief piping are not included in this model. That also implies that spray line and relief line valve operations are not modeled as well. The inputs to the model are physical quantities like flow and enthalpy, the values of these inputs which include consideration of the appropriate valve statuses are calculated in other parts of the PANTHER simulation model. X.1.2 Software Communication and Hierarchy Diagram X.1.3 Mathematical Description The three governing equations for the PPZ model simulation include conservation of mass (1), conservation of energy (2), and the conservation of total volume (3). These equations are represented by the following mathematical expressions: π (π ) = πΜπ π’πππ + πΜπ ππππ¦ − πΜππππππ ππ‘ π‘ππ‘ππ (1) π π (ππ‘ππ‘ππ ) = πΜπ π’πππ βπ π’πππ + πΜπ ππππ¦ βπ ππππ¦ + πΜβ + π (ππ‘ππ‘ππ ) ππ‘ ππ‘ π π (ππ‘ππ‘ππ ) = (ππ£ + ππ ) = 0 ππ‘ ππ‘ (2) (3) Where, ππ‘ππ‘ππ = π‘ππ‘ππ πππ πππ π πΜπ π’πππ = π π’πππ ππππ πππ π ππππ€ πππ‘π πΜπ ππππ¦ = π ππππ¦ ππππ πππ π ππππ€ πππ‘π πΜππππππ = ππππππ ππππ πππ π ππππ€ πππ‘π ππ‘ππ‘ππ = π‘ππ‘ππ πππ ππππππ¦ βπ π’πππ = π π’πππ ππππ πππ‘βππππ¦ βπ ππππ¦ = π ππππ¦ ππππ πππ‘βππππ¦ πΜβ = πππ βπππ‘ππ ππππ’π‘ π = πππ ππππ π π’ππ ππ‘ππ‘ππ = π‘ππ‘ππ πππ π£πππ’ππ ππ = πππ ππππ’ππ π£πππ’ππ ππ£ = πππ π£ππππ π£πππ’ππ 2 PPZ Model X.1.3.1 Model Description The PPZ model uses a combination of MatLab functions, thermodynamic property lookup, and SIMULINKTM modeling to perform the required calculations to provide the PPZ transient response to various inputs. X.1.3.2 Assumptions and Approximations The PPZ model developed herein is single region equilibrium model. That implies that the PPZ conditions are always at saturation. X.1.3.3 Description of Equations The equations described in Section X.1.3 are the governing equations for the behavior of the PPZ model. In order to programmatically sole these equations, further simplification and analysis is required. Equation (3) can be written so that the change in PPZ liquid volume is equal and opposite to the PPZ vapor volume. This is shown below: π π (ππ‘ππ‘ππ ) = (ππ£ + ππ ) = 0 ππ‘ ππ‘ (3) πΜπ = −ππ£Μ (4) Equation (1) can be written in terms of density and volume as shown below, it is assumed that PPZ relief mass flow rate is assumed to be zero. π (π ) = πΜπ π’πππ + πΜπ ππππ¦ − πΜππππππ ππ‘ π‘ππ‘ππ (1) ππ‘ππ‘ππ = ππ ππ + ππ£ ππ£ π π π (ππ‘ππ‘ππ ) = ππ ππ + ππ πΜπ + ππ£ ππ£ + ππ£ ππ£Μ ππ‘ ππ‘ ππ‘ (5) The next step is to linearize the liquid and vapor density with respect to pressure. This allows the reduction of the unknown variables to the change in pressure and the change in PPZ liquid and vapor volume with respect to time. Also using equation (4), equation (5) can further be reduced to only functions of the change pressure and the change in PPZ liquid volume with respect to time. The linearization is shown below: πππ ππ‘ = πππ ππ ππ‘ ππ‘ = ππΜ πΜ & πππ£ ππ‘ = πππ£ ππ ππ‘ ππ‘ = ππ£Μ πΜ Where, πΜ π = π₯ππ /π₯π‘ πΜ π£ = π₯ππ£ /π₯π‘ πΜ = π₯π/π₯π‘ 3 PPZ Model Using the above equations and equation (4), the following conservation of mass equation can be derived. π (π ) = (πΜ π ππ + πΜ π£ ππ£ )πΜ + (ππ − ππ£ )πΜπ ππ‘ π‘ππ‘ππ (6) A similar derivation is repeated for the conservation of energy equation. The derivation is shown below: π π (ππ‘ππ‘ππ ) = πΜπ π’πππ βπ π’πππ + πΜπ ππππ¦ βπ ππππ¦ + πΜβ + π (ππ‘ππ‘ππ ) ππ‘ ππ‘ (2) ππ‘ππ‘ππ = ππ ππ βπ + ππ£ ππ£ βπ£ π (π ) = (πΜ π ππ βπ + πΜ π£ ππ£ βπ£ + ππ ππ βΜπ + ππ£ ππ£ βΜπ£ )πΜ + (ππ βπ − ππ£ βπ£ )πΜπ ππ‘ π‘ππ‘ππ (7) Where, βΜπ = π₯βπ /π₯π‘ βΜπ£ = π₯βπ£ /π₯π‘ Equations (6) and (7) now are functions of the two unknowns πΜ and πΜπ which can be solved simultaneously. X.1.3.4 Definition of Variables There are five input variables that are needed, these include: mΜsurge = surge line mass flow rate mΜspray = spray line mass flow rate hsurge = surge line enthalpy hspray = spray line enthalpy QΜ h = PPZ heater input The output variables include πΜ and πΜπ X.1.3.5 Malfunctions No known malfunctions exist. X.1.4 Constants Derivation The constants… X.1.5 GUI Interfaces The PPZ GUI is shown in the following figure. 4 X.1.5.1 Screen Displays The PPZ GUI is shown in the following figure. Figure X.1.5.1-1: PPZ GUI Screen 5 X.1.5.2 Screen Controls X.1.6 Program Description and SIMULINKTM model The PPZ model uses a combination of MatLab functions, thermodynamic property lookup, and SIMULINKTM modeling to perform the required calculations to provide the PPZ transient response to various inputs. The different aspects of the model are described in the following subsections X.1.6.1 SIMULINKTM Model The SIMULINKTM portion of the PPZ model includes the handling of the time dependent calculations and input/output variables. From Figure X.1.6.1-1, the inputs and outputs for the PPZ model can be seen. Figure X.1.6.1-1: SIMULINKTM PPZ Model Schematic The model receives the inputs on the left from the RCS and PPZ control models. These inputs are then multiplied by the pressurizer_gain transfer function. The resulting Δp/Δt and ΔV/Δt values are then integrated in Simulink to provide the desired current pressure and liquid volume. X.1.6.2 MATLABTM Functions The first function defined in MATLAB is called “pressurizer_gain”. This function is the primary driver for the PPZ simulation model. This function recalls the thermodynamic properties from the Xsteam file, calculates there derivatives for a specific pressure, defines the matrix to be solved, and calculates the transfer function for the system. The first section of coding calls the thermodynamic properties from Xsteam. This is done using a function handle command in MATLAB. The next series of commands calculates the derivative of each required thermodynamic property as a function of pressure. This is done using the “derive” function defined later in the file (explained below). function [B,Z] = pressurizer_gain(p,V1,Vtot,Ti,Ts) % define the functions for saturated steam XrhoL_p = @(p)XSteam('rhoL_p',p); XrhoV_p = @(p)XSteam('rhoV_p',p); XhL_p = @(p)XSteam('hL_p',p); 6 PPZ Model XhV_p = @(p)XSteam('hV_p',p); % note: a 1 indicates liquid and 2 indicates vapor % compute density, enthalpy, and steam derivatives dp = 5; [r1,r1p] = deriv(XrhoL_p,p,dp); [h1,h1p] = deriv(XhL_p,p,dp); [r2,r2p] = deriv(XrhoV_p,p,dp); [h2,h2p] = deriv(XhV_p,p,dp); hi = XSteam('h_pT',p,Ti); hs = XSteam('h_pT',p,Ts); Here PPZ vapor volume (V1) is calculated by subtracting the PPZ liquid volume (V2) from the total PPZ volume (Vtot). % compute mass and vapor volume V2 = Vtot - V1; Next the governing equation matrix (M) and the constant input matrix (N) are defined. % setup the matrices M = [ (r1p*V1+r2p*V2), r1-r2;... (r1p*V1*h1+r2p*V2*h2+r1*V1*h1p+r2*V2*h2p), (r1*h1-r2*h2) ]; N = [ 1 1 -1 0 ;... hi, hs, -h2 1 ]; The transfer function for the system (B) is then defined. B = M\N; return end The other function that is defined is the derivative function (derive) for computing the thermodynamic properties. The function calls the specific material property value at five psi before and after the specified pressure in time. The slope from these two points is then computed. function [y,y_] = deriv(func,x,h) y = func(x); y2 = func(x+h); y1 = func(x-h); y_ = (y2-y1)/2/h; return end 7 PPZ Model X.1.7 References 1. Matlab 2. Dan Cole 3. Nuclear Systems 1: Thermal Hydraulic Fundamentals 8 PPZ Model Appendix A 9 PPZ Model Appendix B 10 PPZ Model Appendix C 11