Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

A Set of Three Auxiliary Programs for the Preparation of Input Files for

Relap5/Mod3 Code

Luiz Carlos Martins Pereira


Comissão Nacional de Energia Nuclear (CNEN - RJ)
Rua General Severiano, 90 – Sala 419A
21945-970 Rio de Janeiro, RJ
lpereira@cnen.gov.br

ABSTRACT

This work aims at the presentation of a set of three new programs, which has the capability of turning simpler
and more automatic the production of the input files for Relap5 code. The first program reads the Relap5 input
file and generates a graphical tree of trips, which shows clearly the manner they are sequenced. The second
program reads a specific input file created by the user, where a sequence of trips is written in an extremely
compact form, and directly writes this sequence in the form of Relap5 input file. The last program aims at the
attainment of a quasi-stationary coolant flow distribution for multi-channel nodalizations, adjusting some
unknown local form loss coefficients. This program iteratively calls the execution of the Relap5 code, and it
reads the obtained values of flows in the Relap5 output file and updates the form loss coefficients in the Relap5
input file.

1. INTRODUCTION

The preparation and verification of the input files in the careful development of nodalizations
of large nuclear power plants (NPPs), for stationary and transient thermal hydraulics analysis,
with the use of the advanced thermal-hydraulic tools, such as Relap5Mod3.2.2G code [1],
may be a tedious and complex task. It’s particularly more difficult when trying to introduce
dynamic systems (as, for instance, the protection, control and limitation systems of a NPP) in
the nodalization or to use several hydraulic channels for reactor core representation.

The author has been involved recently in the creation of the input file of Angra 2 NPP reactor
[2, 3] for Relap5Mod3.2.2G. This new and independent nodalization is very large, including
all primary, secondary, ECCS, feedwater emergency, volumetric, borated and extra-borated
systems. Additionally, a multi-channel representation for the reactor core and the reactor
protection system actuation logic are included. There is the intention of including some parts
of the control and the limitation systems in the near future. During the development and
utilization of this nodalization, two important questions had to be faced.

The first one was the development and the comprehension of the trip cards set, and in order to
deal with it, two programs were developed: CONSTRIP e EXTRIP. The EXTRIP program
aims to provide the visualization of a complex sequence of trips. The program reads the
Relap5 input file and generates a graphical tree of a chosen trip, which shows clearly the
manner they are sequenced. The CONSTRIP program aims to provide the creation of a long
sequence of chained trips (several lines of input data, with an appropriate numeration), to be
inserted in the Relap5 input file. The program reads a specific input file created by the user,

INAC 2005, Santos, SP, Brazil.


where this sequence of trips is written in an extremely compact form, and directly writes this
sequence in the form of Relap5 input file.

The second question raised in the development of the nodalization was the initialization of
the stationary process, i. e., the achievement of the coolant flow distribution, suitable for a
given NPP (as specified, for instance, in the NPP design). This is particularly important
whenever local form loss coefficients are unknown in certain points, especially in regions
where there are one or more ramifications in coolant ducts with quite complex geometry. The
third program, DEPRESS, aims to automatize this initialization process. The program
iteratively calls the execution of the Relap5 code, and, in each iteration, it reads the obtained
values of flows in the Relap5 output file. Further on, from these data, it rewrites the local
form loss coefficients in the Relap5 input file. The iterative process stops when an adequate
flow distribution (in accordance with a specified precision given by the user) is achieved.
This program is currently being used in the development of Angra 2 nodalizations in Brazil,
when considering several flow channels in the core. In this case there is a complex bi-
dimensional flow network (with axial and crossflows), and this program is being useful for
the proper representation of the flows in this network.

The three programs were written in FORTRAN language, using the Microsoft Fortran Power
Station 4.0 Environment, and are described and exemplified in following sections. All
examples are extracted from Angra 2 nodalizaton studies [2-3].

2. EXTRIP PROGRAM

2.1. Description of EXTRIP

The Relap5 trip logic is sometimes too difficult to trace back. Thus, the task of finding out the
“starting trips” of a particular occurrence is often a hard one. The objective of EXTRIP
program is to trace back a specific trip up to the starting variable trips and to present these
paths in a clear and simple manner. It has the capability to deal with the logical operators
AND, OR and TIMEOF. The EXTRIP input file must contain only the name of RELAP5
input file and the trip to be traced and the EXTRIP output file will contain the structure with
the tree graphical representation of trip sequence, showing the antecedent trips of each trip.
This graphical representation makes easier the understanding and checking of the trip logic,
especially for the beginners.

2.2. Application Example

An example is presented below, where the trip 1152 indicates the signal for the residual heat
removal (RHR) pumps to start: The trip 1152 is dependent on several logical and variable
trips, like logical 1095 trip for the Emergency Core Cooling System System (ECCS), whose
actuation signal is proceeding from a 2/3 combination of variable trips 0070, 0079 and 0089;
logical trip 1133 indicating Emergency Power Mode (EPM), etc. In this example, the trip
0131, what represents external power loss, is always true. The trip 0087 indicates the second
signal for reactor scram.

INAC 2005, Santos, SP, Brazil.


Graphical Representation of 1152 Trip:

1152 = 1151 and 1150


|-1150 = 1095 and 0150
| |-0150 = p 200030000 lt null 0 10.0e+05
| |-1095 = 1093 or 1094
| |-1093 = 0079 and 0089
| | |-0079 = p 028010000 gt null 0 1.03e+05
| | |-0089 = p 200030000 lt null 0 110.0e+05
| |-1094 = 1091 or 1092
| |-1091 = 0070 and 0079
| | |-0079 = p 028010000 gt null 0 1.03e+05
| | |-0070 = cntrlvar 0010 lt null 0 2.28
| |-1092 = 0070 and 0089
| |-0089 = p 200030000 lt null 0 110.0e+05
| |-0070 = cntrlvar 0010 lt null 0 2.28
|-1151 = 0125 or 0131
|-0125 = time 0 gt null 0 1.0e+06
|-0131 = time 0 gt timeof 1133 37.0
|-1133 = 0087 and -0125
|-0125 = time 0 gt null 0 1.0e+06
|-0087 = time 0 gt timeof 0086 0.2
|-0086 = cntrlvar 0228 ge null 0 2.0

Figure 1. Extrip Output File

3. CONSTRIP PROGRAM

3.1. Description of CONSTRIP

The trip capability of Relap5 code includes variable and logical trips. The goal of CONSTRIP
program is to get an easy implementation of logical trips set, provided the variable trips set
has been already developed. It increases the binary capability of RELAP5 trip logic for an
unlimited capability. It’s possible to construct a complex logical statement with the desired
number of AND/OR operators. It's also possible to use several parenthesis levels to compact
the written logical statement. The CONSTRIP input file has to contain only the logical
statement in a compact form and the initial logical trip. The CONSTRIP output file will
contain the Relap5 logic trips, ready to be added to Relap5 input file.

3.2. Application Example

An example is presented below, where the shown trip logic indicates a simplified actuation
logic of Angra 2 Reactor Protection System (RPS): The numbers 0051 to 0079 indicate
variable trips which represent some of signal described in Angra 2 RFAS [4]. For example,
trips 0075, 0076, 0077 and 0078 indicate steam generators level below 9.0 meters, trips0055
represents hot leg pressure below 13.2 MPa and 0068 represents hot leg pressure above 16.7
MPa, which are some of the signals for RPS actuation.

INAC 2005, Santos, SP, Brazil.


Original Logical Trips:

0051 or 0052 or 0053 or 0054 or 0055 or 0056 or ( 0057 and 0058 ) or ( 0057
and 0059 ) or ( 0057 and 0060 ) or ( 0058 and 0059 ) or ( 0058 and 0060 ) or
( 0059 and 0060 ) or ( ( 0061 or 0062 or 0063 or 0064 ) and 0065 ) or 0066
or 0067 or 0068 or 0069 or 0070 or 0071 or 0072 or 0073 or 0074 or 0075 or
0076 or 0077 or 0078 or 0079

Initial Logical Trip

1001
________________________________________________________________________________

Logical Trips in RELAP5's Format:

20610010 0061 or 0062 n -1.0 20610190 1018 or 1007 n -1.0


20610020 1001 or 0063 n -1.0 20610200 1019 or 1008 n -1.0
20610030 1002 or 0064 n -1.0 20610210 1020 or 1009 n -1.0
20610040 0057 and 0058 n -1.0 20610220 1021 or 1010 n -1.0
20610050 0057 and 0059 n -1.0 20610230 1022 or 0066 n -1.0
20610060 0057 and 0060 n -1.0 20610240 1023 or 0067 n -1.0
20610070 0058 and 0059 n -1.0 20610250 1024 or 0068 n -1.0
20610080 0058 and 0060 n -1.0 20610260 1025 or 0069 n -1.0
20610090 0059 and 0060 n -1.0 20610270 1026 or 0070 n -1.0
20610100 1003 and 0065 n -1.0 20610280 1027 or 0071 n -1.0
20610110 0051 or 0052 n -1.0 20610290 1028 or 0072 n -1.0
20610120 1011 or 0053 n -1.0 20610300 1029 or 0073 n -1.0
20610130 1012 or 0054 n -1.0 20610310 1030 or 0074 n -1.0
20610140 1013 or 0055 n -1.0 20610320 1031 or 0075 n -1.0
20610150 1014 or 0056 n -1.0 20610330 1032 or 0076 n -1.0
20610160 1015 or 1004 n -1.0 20610340 1033 or 0077 n -1.0
20610170 1016 or 1005 n -1.0 20610350 1034 or 0078 n -1.0
20610180 1017 or 1006 n -1.0 20610360 1035 or 0079 n -1.0

Figure 2. Constrip Input and Output Files

4. DEPRESS PROGRAM

4.1. Description of DEPRESS

The DEPRESS program aims at the attainment of a quasi-stationary coolant flow distribution
for multi-channel nodalizations, by adjusting some local (forward or reverse) form loss
coefficients in particular regions, in agreement with a previously known flow distribution (for
example, design flow distribution). This is important in duct regions where the hydraulic flow
is split into several parts and these coefficients are unknown. Often it's not an easy task to
estimate their values due to, for instance, a very complex geometry of the respective
singularities.

The basic idea behind this program is simple. Whenever there was a split into N flow paths,
one adds (N-1) unknowns, representing each a local form loss coefficients, to a nonlinear
system. Obviously, in one of these N paths, it's necessary to know all the form loss
coefficients in order to have a well-specified pressure drop (as a function of mass flow) and a
well-posed nonlinear system. The program runs automatically. It writes the unknowns as
words of Relap5 input file, calls a RELAP5 execution and reads the mass flow values in
Relap5 output file. The process goes on until a desirable mass flow distribution is achieved.
The program uses a modification of M.J.D. Powell's hybrid algorithm, what is a variation of
Newton's method, which takes precautions to avoid large step sizes or increasing residuals
[5]. Also there is option of using a Broyden method, with a factored secant update [6]. In its

INAC 2005, Santos, SP, Brazil.


current state of development, the program has the capability of handling the following Relap5
hydrodynamic components: branch, single junction and multiple junctions.

4.2. Application Example: Multi-channel of Angra 2 Reactor Pressure Vessel (RPV)

Figure 1 presents a Angra 2 RPV nodalization, which has seven parallel flow in the core: a
hot channel (ECQ), containing 1 fuel assembly; a channel surrounding the hot channel
(VECQ), containing 8 fuel assemblies, four breakthrough channels (BTCs), containing each
one 20 fuel assemblies, and a medium channel (CM), containing 104 fuel assemblies.
Additionally, there is a bypass channel (BYP). There are crossflow communications in all
axial levels between the following pair of channels: ECQ-VECQ; CM-VECQ, CM- BTC1,
CM-BTC2, CM-BTC3, CM-BTC4, BTC1-BTC2 and BTC3-BTC4. There is no
communications from BYP to the other channels.

086

005 088

4 1 1

3 090 2 2 PQ

2 3 3 MJ - 079
100
1 4 4

PF MJ - 077 eccs10 eccs20 eccs30 eccs40 200


MJ - 011
300
095
160
260 400
010 066 076
MJ - 075

360 4 5
4
460 3 3 6

1 2 2 7

2 1 1 8
MJ - 097
013
MJ - 053 MJ - 037
3

4 12 12 12 12 12 12 12 12
VECQ

BTC4
BTC1

BTC2

BTC3
ECQ

BYP
CM

5 11 11 11 11 11 11 11 11

6 10 10 10 10 10 10 10 10

7 9 9 9 9 9 9 9 9

8 8 8 8 8 8 8 8 8
038

040

042

044

046

048

050

036
MJ - 051

10 6 6 6 6 6 6 6 6
11 5 5 5 5 5 5 5 5

12 4 4 4 4 4 4 4 4

13 3 3 3 3 3 3 3 3

14 2 2 2 2 2 2 2 2

15 1 1 1 1 1 1 1 1

16 020

17 017

015

038 - 040 038 - 048 044 - 046


MJ - 051 038 - 044 038 - 050 048 - 050
038 - 046 040 - 042 a2nb06

Figura 3 – Angra 2 RPV Multi-channel Nodalization

INAC 2005, Santos, SP, Brazil.


In this nodalization, it's necessary to take in account the split of coolant flow in three regions:
(i) at downcomer entry (010): from the coolant flow that comes to RPV, a fraction f1 goes to
upper downcomer (005) and a f2 fraction goes to the RPV exit (076); (ii) at upper head (088):
from the flow that come to this component, a fraction f3 goes to upper bypass (095) and a
fraction f4 goes to the upper plenum (090); (iii) at upper plenum(090): from the coolant flow
that comes to this component, a fraction f5 goes to upper plenum over CM (066) and a
fraction f6 goes to the upper plenum over BTCs (076); (iv) at core channels entry (020): the
coolant axial flows at entry of each core channels are specified and so are the global coolant
mass transference between two adjacent channels.

At the boundary line between two adjacent channels, there are 12 communications paths (one
per axial level) and consequently 12 local form loss coefficients to be estimated. In order to
simplify the problem, all these coefficients are considered as being equal. Obviously, the
coolant crossflow values at each axial node will be different and in order to close the
nonlinear system, the global flow from one channel to the other (including all axial levels)
will be the flow to be achieved. By symmetry, the BTCs are considered equal, and the axial
and lateral form loss coefficients are taken as the same. The crossflows between two BTCs
are not considered as a part of the problem. Therefore there are four axial and three lateral
local form loss coefficients to be estimated at the multi-channel representation of the core
(item iv above). Table 1 summarizes the users’ options and numerical values involved in this
problem solution.

Table 1. Option and Numerical Value for Nonlinear System Solution

Solution Method Newton


Number of Unknowns/Equations 11
Simulation Time 1000s
Relative Error of Solution 10-5
Number of Iterations 23
Finite Difference “h” for Jacobian Matrix 0.01

5. CONCLUSIONS

The examples presented show the utility of programs in handling of RELAP5 input files.
These three programs were useful in the development and understanding of a complex
nodalization. They are especially important for the beginners and in some particular tasks like
the migration of data from an old nodalization to a new one. However it's important to test
these programs in new configurations to investigate their limitations and try to improve their
capability.

INAC 2005, Santos, SP, Brazil.


ACKNOWLEDGMENTS

I would like to acknowledge the valuable insights and observations contributed by my


colleagues Alzira Abrantes Madeira and Ronaldo Célem Borges.

REFERENCES

1. The RELAP5 Development Team, “Relap5Mod3.2 Code Manual,” NUREG/CR-5535


Report, Vols 1-5, Idaho National Engineering Laboratory, Idaho, USA, INEL-95/0174
(1995).
2. Grupo de Trabalho da CNEN, “Simulação de Angra 2 com o código
Relap5/Mod3.2.2Gamma, Sessão Técnica Especial, XII ENFIR, Rio de Janeiro, RJ,
Brazil, October 15-20, 2000.
3. Grupo de Trabalho da CNEN, “Simulação de Angra 2 com o código
Relap5/Mod3.2.2Gamma, Sessão Técnica Especial, XIII ENFIR, Rio de Janeiro, RJ,
Brazil, August 11-16, 2002.
4. ELETRONUCLEAR/Siemmens, “Final Safety Analysis Report – Central Nuclear
Almirante Álvaro Alberto – Unit 2”, Rev 8, Brazil, July, 2004;
5. More, J.J., B.S. Garbow, and K. E. Hillstrom, “User Guide for MINPACK-1”, Argonne
National Labs Report ANL-80-74, Argonne, Ill, 1980.
6. Dennis Jr., J. E., Schnabel, R. B., “Numerical Methods for Unconstrained Optimization
and Nonlinear Equations - Classic in Applied Mathematics 16”, SIAM, 1996.

INAC 2005, Santos, SP, Brazil.

You might also like