Top Banner
ASTEM-A COLLECTION OF FORTRAN SUBROUTINES TO EVALUATE THE 1967 ASME EQUATIONS OF STATE FOR WATERISTEAM AND DERIVATIVES OF THESE EQUATIONS by K.V. Moore nero~et nuclear Company NATIONAL REACTOR TESTING STATION ldaho Falls, ldaho - 83401 DATE PUBLISHED-OCTOBER 1971 PREPARED FOR THE . - ,;i U. S. ATOMIC ENERGY COMMISSION IDAHO OPERATIONS OFFICE UhlnED CAhlTDArT ATfln-11-i~ '
33

nuclear Company - digital.library.unt.edu

May 10, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: nuclear Company - digital.library.unt.edu

ASTEM-A COLLECTION OF FORTRAN SUBROUTINES TO EVALUATE THE 1967 ASME EQUATIONS OF STATE FOR WATERISTEAM AND DERIVATIVES OF THESE EQUATIONS

by

K.V. Moore

nero~et nuclear Company NATIONAL REACTOR TESTING STATION

ldaho Falls, ldaho - 83401

DATE PUBLISHED-OCTOBER 1971

PREPARED FOR THE . - ,;i U. S. ATOMIC ENERGY COMMISSION

IDAHO OPERATIONS OFFICE UhlnED CAhlTDArT A T f l n - 1 1 - i ~ '

Page 2: nuclear Company - digital.library.unt.edu

DISCLAIMER

This report was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor any agency Thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.

Page 3: nuclear Company - digital.library.unt.edu

DISCLAIMER

Portions of this document may be illegible in electronic image products. Images are produced from the best available original document.

Page 4: nuclear Company - digital.library.unt.edu

P r i n t e d in the United Statee of America Available from

National Technical Information Service U. S. Department o f Coarmerce

5285 por t myal Road Springfield, Vi rg in ia 22151

Price: Printed Copy $3.00; Microfiche $0.95

L E G A L N 0 T I C . E 1 T h i s r e p o r t was p r e p a r e d a s a n a c c o u n t o f work sponsored by t h e U n i t e d

S t a t e s Government. N e i t h e r t h e U n i t e d S t a t e s nor t h e U n i t e d S t a t e s A t o m i c Energy Commission, n o r any o f t h e i r employees, n o r any o f t h e i r c o n t r a c t o r s . s u b c o n t r a c t o r s , o r t h e i r emp loyees , makes any w a r r a n t y , e x p r e s s o r i m p l i e d , o r assumes a n y l e g a l l i a b i l i t y o r r e s p o n s i b i l i t y f o r t h e a c c u r a c y , c o m p l e t e - ness o r u s e f u l n e s s o f any i n f o r m a t i o n , a p p a r a t u s , p r o d u c t o r p r o c e s s d i s - c l o s e d , o r r e p r e s e n t s t h a t i t s use w o u l d n o t i n f r i n g e p r i v a t e l y owned r i g h t s .

Page 5: nuclear Company - digital.library.unt.edu

' ANCR-1026 Mathematics and Computers

TID-4500

ASTEM - A COLLECTION OF FORTRAN SUBROUTINES

TO EVALUATE THE 1 9 6 7 ASME EQUATIONS OF STATE FOR

WATER/STEAM A N D DERIVATIVES OF THESE EQUATIONS

by b '

K. V. Moore

' . .NU I I - C t

This .report was prepared as .an account of work sponsored by 'the United States Government ... Neither

. the United States.nor the,United States Atomic Energy Commission, nor a n y of their employees, nor any of their. contractors, subcontractors, or their employees, makes any warranty, express or-implied, or assumes any legal liability or responsibility .for the accuracy, com- pleteness .or. usefulness of any information, apparatus, product o r process disclosed, o r represents that , i t s use would not infringe privately owned.rights.

L

AEROJ E T NUCLEAR COMPANY

. D a t e P u b 1 i s h e d - O c t o b e r . j 9 7 1

PREPARED FOR THE U. S. ATOMIC ENERGY COMMISSION IDAHO OPERATIONS O F F I C E

UNDER CONTRACT NO. A T ( 1 0 - 1 ) - 1 3 7 5

plSlRlBlsTUlW OF THIS CNGUPlee.MT IS UNLIMITED 1

Page 6: nuclear Company - digital.library.unt.edu

ACKNOWLEDGMENTS

This work i s a por t ion of a more general p ro jec t t o develop an

e f f i c i e n t computer program of water proper t ies f o r use i n f u tu r e reac to r

sa fe ty analys is codes. Special thanks i s given t o D r . L. J. Ybarrondo

and M r . H. D. Curet of t h e Nuclear Safety Division f o r t h e i r sponsorsh5p

and he lp fu l support of t h i s phase of t h e overa l l r eac to r sa fe ty ana lys i s

e f f o r t within Aerojet Nuclear Company and t h e U . S. Atomic Energy Com-

mission.

Page 7: nuclear Company - digital.library.unt.edu

ABSTRACT

ASTEM i s a modular s e t of FORTRAN I V subroutines t o evaluate t h e

s t a t e equations of l i qu id water and steam as published by t h e American

Society of Mechanical ~ n g i n e e r s (1967). Any thermodynamic quanti ty in- - cluding der ivat ive proper t ies can be obtained from these rout ines by a

user supplied main program.

As provided t h e ASTEM package includes a sample main program and

requires 6 8 ~ bytes of core storage (double precision) on t h e IBM 360175.

iii

Page 8: nuclear Company - digital.library.unt.edu

CONTENTS

ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . ; . iii

. . . . . . . . . . . . . . . . . . . . . . . . . . I INTRODUCTION 1

I1 . SYMBOL DEFINITIONS . . . . . . . . . . . . . . . . . . . . . . 2

. . . . . . . . . . . . . . . . . . . . . . . . . I11 ASME SUBREGIONS 3

. . . . . . . . . . . . . . . . . . . . . . . . . IV THERMODYNAMICS 5

V . ASTEM ROUTINES AND COMMON BLOCKS . . . . . . . . . . . . . . . 8

1.1 CONA . 1.2 COW . 1.3 GIBBAB 1.4 HELMCU 1.5 IASME . 1.6 INDEX . 1.7 PSATK . 1.8 PSATL . 1.9 ROOT . 1.10 UNITS . 1.11 WR1T.U

2 . INTERNAL ROUTINES . . . . . . . . . . . . . . . . . . . . . 14 .

2.1 BINOMX . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 EDER . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3 FUNX . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 POLATT . . . . . . . . . . . . . . . . . . . . . . . . . 15 .. 2.5 POLYN . . . . . . . . . . . . . . . . . . . . . . . . 15

. . . . . . . . . . . . . . . . . . . . . . COMMON BLOCKS 16 3 . 1 /ASMCON/ . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 /ASMCOX/ . . . . . . . . . . . . . . . . . . . . . . 16 r" . . . . . . . . . . . . . . . . . . . . . . . 3.3 ASM ME^/ 16 . . . . . . . . . . . . . . . . . . . . . . . 3.4 AS ME^^/ 16 3.5 /ASMESL/ . . . . . . . . . . . . . . . . . . . . . . . 16 . . . . . . . . . . . . . . . . . . . . . . 3.6 IBINFACI 16 3 ~. 7 / D ~ Z Z Z / . . . . . . . . . . . . . . . . . . . . . . . 16 3.8 /ERRPVT/ . . . . . . . . . . . . . . . . . . . . . . . 17 3.9 /EUNITS/ CRP . CRT . CRV . CRH . CRS .TO. JC . GC . SQJC . SONIC2 . . 17 3.10 /MLJNITs/ CRPMyCRTM.CRVMyCRSM.TOMy JCM,GCM,SQJC.M,SONICM 17 . . . . . . . . . . . . . . . . . . . . . . 3.11 /ROOTLM/ 18

. . . . . . . . . . . . . . . . . . . . . . 3.12 /SATLIN/ 18

. . . . . . . . . . . . . . . . . . . . . . VI . . SAMPLE PROBLEMS ; 20

Page 9: nuclear Company - digital.library.unt.edu

V I I . REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . 24

L

F I G U R E S

1. A S M E S u b r e g i o n s . . . . . . . . . . . . . . . . . . . . . . . . 3

. TABLES

1. SYMBOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2. A S M E S T A T E E Q U A T I O N F O R M S . . . . . . . . . . . . . . . . . . . 4

3. ASMF: BOUNDARY VALUES FOR SUBREGIONS . . . . . . . . . . . . . . 5

4. THERMODYNAMIC VARIABLES EXPRESSED I N TERMS O F g , f , and P ' . . . 7

5 . SUBROUTINE ROOT ARGUMENTS . . . . . . . . . . . . . . . . . . . 12 6 . CROSS-REFERENCE O F SUBROUTINES, FUNCTIONS AND NAME COMMON

B L O C K S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Page 10: nuclear Company - digital.library.unt.edu

ASTEM - A COLLECTION,OF FORTRAN SUBROUTINES.

TO EVALUATE THE 1967 ASME EQUATIONS.OF STATE FOR

WATER/STEAM AND DERIVAT IVES OF THESE EQUATIONS

.I. INTRODUCTION

This co l lec t ion of subroutines ca l led ASTEM (ASME Steam ~ a b l e s ) f o m s

a self-contained modular s e t t o evaluate t h e Gibbs , Helmholtz and satura-

t i o n 1ine.f 'unctions a s published by t h e American Society of Mechanical

Engineers[''. Any thermodynamic quanti ty can be computed by these rout ines

from a main program supplied by t h e user . The a b i l i t y t o obta in der ivat ives

of any order makes ASTEM somewhat'unique.

This package i s wr i t t en i n FORTRAN I B f o r t h e IBM 360/75 and requires

6 8 ~ bytes of storage. As progr&med,, all var iab les a r e double precisioned

for computing accuracy on t h e 360 system. Conversions t o other computers

and conversion t o s ing le precision can be easidy accomplished by t h e user .

Fundamental t o t h i s repor t i s t h e ASME publication "~hermodynamic and

Transport Propert ies of Steam" (1967 ASME Steam Tables) , t h e American

Society of Mechanical Engineers, 1967. The equations and constants from

t h i s book a r e not reproduced nor s t a t ed within t h i s report. because of t h e i r

ra ther complex form and t he pos s ib i l i t y of typographical e r ro rs . Also, a l l

symbols used i n t h i s repor t a r e t h e more standard English symbols fo r ther-

modynamic quan t i t i es whereas t h e . ASME uses a s e t of Greek symbols fo r t h e

reduc.ed dimensionless var iables . I n t h i s repor t a symbol i s used f o r a

par t i cu la r physical quanti ty imma.t e r i a l of u n i t s . Unless spec i f i c a l l y noted

or when numbers a r e quoted without u n i t s , they a r e assumed t o be "reduced

dimensionless" a s used by t h e ASME..

This report assumes t ha t t h e reader has a working knowledge of the r -

modynamics and t h e i r der ivat ive re la t ionships . A good c l a s s i ca l thermo-

dynamics textbook and t h e ASME Steam Tables a r e necessary references fo r

use i n conjunction with t h i s document.

Page 11: nuclear Company - digital.library.unt.edu

11. SYMBOL DEFINITIONS

The following t a b l e gives the symbol def in i t ions a s used i n t h i s

repor t a s well a s t h e corresponding ASME symbol.

TABLE 1

SYMBOLS

This Report ASME Quantity

P B Pressure

T 8 Temperature

v X Spec i f i c volume

h E Spec i f i c enthalpy

u - Specific in te rna l energy

s CI Specific entropy

x - Mass qual i ty

g 5 Gibbs function

f '4 Helmholtz mnct ion

B _ . Coeff f cient of thermal expansion

C - Specific heat capacity a t constant pressure P

( ah/aTIp

Cv - Specific heat capacity a t constant volume . .

( a u / a ~ lv

- $ ($)T isothermal c m p r e s s i b i l i t y

- a Isentropic sonic 'velocity S

- . d - - - ( 3 ~ 1 3 ~ ) ~

J

Y ' ' - Ratio of spec i f i c heat capaci t ies Cp/Cv

Page 12: nuclear Company - digital.library.unt.edu

111. ASME SUBREGIONS

The published ASME equations a r e def ined , fo r l imi ted ranges of pres-

sure and temperature. A l l thermodynamic quan t i t i es i n these equations

a r e expressed i n a normalized (reduced dimensionless) form such t h a t a t

t h e c r i t i c a l point pressure, spec i f i c volume and temperature a r e unity.'

The subregions f o r each equation i s shown i n Figure 1, t h e equation forms

a r e given i n Table 2 and boundary values are l i s t e d . in Table 3 .

Figure 1. ASME subregions.

i

Page 13: nuclear Company - digital.library.unt.edu

TABLE 2

ASME STATE EQUATION FORMS

2 (steam) 0 5 P < P ~ ( T ) , Tt 5 T I TI

o 5 P 5 P ~ ( T ) , T~ < T < T~

3 ( s t e a m ) pL < P < P ~ ( T ) , T~ < T < 1

5 ( t w o - p h a s e )

6 ( t w o - ~ h a s e )

B o u n d a r y b e t w e e n 2 a n d 3

Page 14: nuclear Company - digital.library.unt.edu

'TABU 3

ASME BOUNDARY VALUES FOR SUBREGIONS

Quanti ty ASME 'Normal i z ed Value Spec i f i c Value

T ( t r i p l e , point ) 27316/64730 z 0.421999 -32 .018~ t

I

P, ( t r i p l e point ) P ~ ( T ~ ) z 2.7633 x -0.08865 ps ia

1 pKO1 ' 0 -747519 -2398.2 p s i a

PC ( c r i t i c a l point) 1 22120000~/m~, -3208.23 p s i a

P2 U000/2212 = 4.52 14503.77 ps ia

I V . THERMODYNAMICS

Many excellent references ex i s t i n . t h e f i e l d of thermodynamics and

it i s not t h e purpose of t h i s repor t t o t abu l a t e a comprehensive review

of well known mater ia l . Within t h i s framework we s h a l l t abu la te several

of t h e more usefu.1 r e l a t i ons h d t h e i r der ivat ives . The four fundamental d i f f e r e n t i a l equations a r e :

du = Tds - Pdv

Page 15: nuclear Company - digital.library.unt.edu

dh = Tds + vdP

and i n two-phase h -h d P = I u dT T v -v

g f

and t h e general r e l a t i ons between these thermodynamic var iables a re :

Thermodynamic der ivat ives can be expressed i n terms of .any th ree

independent der ivat ives and an appropriate s e t of s t a t e proper t ies . The

generally accepted standard form i s t o express the . der ivat ives 5n terms

of B,, K , and C along with P, v , and T i n s ingle phase. For homogeneous P

two-phase mater ia l , ~ r i d g m a n ' ~ ] uses dP/dT P , Cv , vf , vg , s , v , T, P,

and 6 ( x , 1-x ) where

and

(subscr ipts g and f r e f e r t o gas and f l u i d , respect ively . )

Various thermodynamic quan t i t i es and standard der ivat ives a r e l i s t e d

i n Table 4 i n terms of ~ ( P , T ) , f ( v ,T ) , and t h e sa turat ion pressure P(T) .

This t ab l e along with der ivat ives a s tabulated by ~ r i d ~ m a n [ ~ ] form a

working se t with which any thermodynamic -quant i t y can be. calculated

' algebracia l ly .

To simplify wri t ing, a shorthand notation of t h e . exp l i c i t p a r t i a l ' . .

der ivat ives i s used i n Table 4. For instance, define g , t o be an exp l ic i t . function of (P ,T) , . .

then gp - ' and gpTE$[(%)P]+ * '

Page 16: nuclear Company - digital.library.unt.edu

TABLE 4.

THERMODYNAMIC VARIABLES EXPRESSED I N TERMS OF g , f , and P'

Single-Phase: @(P,T) and f ( v , ~ 1.; Two-Phase P(T)

Helmholtz Function

not defined '

not defined

not defined

not defined

* Subscripts g and' f mean t h a t t h e quant i ty ' i s evaluated on t h e gas and l i q u i d s i d e , respect ive ly .

Page 17: nuclear Company - digital.library.unt.edu

V. ASTEM ROUTINES AND COMMON BLOCKS

ASTEM. i s a package of 16 rout ines and 12 common blocks. Ten of t h e

common blocks a r e block data and t h e other two transmit information

between subroutines. Unless redimensioned by t h e user , t h e highest de-

r i v a t i v e allowed i s order 9 .

Since a l l a r rays within ASTEM a r e one-dimensional t o save s torage

area , t h e user must understand t h e equivalence of an "e f fec t ive two-

dimensional" a r ray a s explained i n INDEX.

1. USER ROUTINES

,

The rout ines normally ava i l ab le t o users a r e described i n alphabet-

i c a l order: CONA, COW, GIBBAB, HELMCD, IASME, INDEX, PSATK, PSATL, ROOT,

UNITS, and WRITEA.

1.1 CONA - Converts u n i t s of ar ray AA.

,Usage: CALL CONA(AA,IOA,A,IB,JB.,CA,.CI,CJ)

Input : AA, a s ing le dimensioned a r r ay equivalent t o M ( L ,L)

where L = IOA+1

I B and J B a r e index biases

IOA i s t he order of a r r ay AA

CA i s u n i t s conversion f o r numerator

C I i s u n i t s conversion f o r denominator I1

C J i s u n i t s conversion f o r denominator JJ

Output: Single dimensional a r r ay equivalent t o A(LA,LA)

where LA = IOA+l-IB-JB

Example: Let AA be a 4 x 4 a r ray of t h e Gibbs function and i t s I

(P ,T) der ivat ives t o t h i r d order.- Set up t h e v a r ray

t o second order.

CALL CONA (AA.,~,A,~,O,CRV,CRP,CRT)

Output: ~ ( 1 ) = M ( ~ ) * C R V = v

, . ~ ( 2 ) = M ( ~ ) * C R V / C ~ P = (E) T

Page 18: nuclear Company - digital.library.unt.edu

e t c . 1.2 corn -

Converts un i t s of up t o 10 var iables

Usage: CALL COW ( J ,C , ~ 1 , 1 1 , ~ 2 , 1 2 ,X3,13. . .~10 ,110)

J = Number of X arguments

C = Array of s i x conversion fac tors

~ ( 1 ) = c r i t i c a l pressure

~ ( 2 ) = c r i t i c a l zbsolute temperature

~ ( 3 ) = c r i t i c a l specif ic volume

~ ( 4 ) = enthalpy conversion fac tor

~ ( 5 ) = entropy conversion f ac to r

~ ( 6 ) = "zero" temperature

The array C can be obtained by a c a l l t o UNITS.

X's and 1 ' s a r e input var iables t o be converted where i f

I = 1, X = pressure

I = 2, X = change i n temperature

I = 3, X = spec i f ic volume

I = 4 , X = enthalpy, spec i f i c i n t e rna l energy, Gibbs o r Helmholtz

I = 5, X = entropy

I = 6, x = nonincrementd temperature.

I f I i s posi t ive , convert from reduced u n i t s t o u n i t s

defined by t h e C ar ray.

For I > 0, X i s returned a f t e r multiplying by ~ ( 1 ) .

I f I i s negative, convert from C ar ray un i t s t o reduced

un i t s .

For I < 0, X i s returned a f t e r dividing by C ( [ I ( ) . 1 . 3 GIBBAB

Gfpen (P,T) compute t h e Gibbs function and a l l der ivat ives t o order N.

Usage: CALL GIBBAB(G,P,T , N , I )

Input: P = pressure

T = temperature

Page 19: nuclear Company - digital.library.unt.edu

N = der ixat ives t o order N , 0 I N I 9

I = ASME subregion e i t he r 1 or 2.

Output : G array containing t h e Gibbs function and i t s der ivat ives

evaluated a t (P ,T) '

Dimension. G a t l e a s t ( ~ + 1 ) ( ~ + 2 ) / 2

(See INDEX f o r arrangement of output array. )

1 . 4 HELMCD

Given (v ,T) compute t h e Helmholtz function and all der ivat ives t o

order N , .

Usage: CALL HEIMCD(F,V,T,N,I)

Input: V = spec i f ic volume

T = temperature

N = der ivat ives t o order N , 0 5'N 2 9

Output: F array containing t h e Helmholtz function and i t s deriva-

t ives evaluated a t ( v ,T )

Dimension F a t l e a s t ( ~ + 1 ) ( ~ + 2 ) /2

( s ee INDEX f o r t h e arrangement of t h e output array. )

1 .5 IASME

I n i t i a l condition subroutine t h a t .must be ca l led once t o s e t values

of binomial coeff ic i .ents and f a c t o r i a l s into. /BINFAC/ and t o i n i t i a l i z e

computer dependent res idua l s u o and ul ['I i n /ASMCON/ . Usage: CALL IAsME(1)

where I i s t he maximum order of der ivat ives t o be calculated.

L i m i t : 1 1 1 5 9

1 .6 INDEX

Computes t h e FORTRAN locat ion index of a packed single-dimensioned

a r ray t h a t corresponds t o a double-dimensioned t r i angula r a r ray A ( I , J ) .

In .ASTEM, two-dimensional ( i;, functions of two independent var iab les )

quan t i t i es a r e used within t h i s program as packed, single-dimensioned

quan t i t i es . For example, l e t % b e t h e FORTRAN symbol t o denote t he Gibbs

function and i t s P and T der ivat ives , then i f we wish t o compute t h e

Gibbs der ivat ives t o order n, G would have t o be dimensioned (n+l ) (n+2) /2

f o r a packed array. For a numerical example say t h a t 'we require der i -

va t ives t o t h e t h i r d order , then (3+1)(4+1)/2 = 10.

Page 20: nuclear Company - digital.library.unt.edu

When calculated. by a c a l l t.o .GIBBAB, t h e a r ray G i s returned with

t h e following values,:

Rather than sketch t h i s type of a r ray t o obta in t h e equivalence, a

c a l l t o I F E X w i l l .compute t h e proper index value when supplied with t h e

a r r ay s i z e and t h e double FORTRAN index. For example, compute t h e index,

L, f o r g PPT

where 1 = 3

I M = JM-= 4

then L = I N D E X ( ~ , ~ , ~ , ~ , I D U M M Y ) = 7

and IDUMMY = IP = maximum number of elements i n t h e J t h Pow = 3.

1.7 PSATK

Computes sa tu ra t ion pressure and der iva t ives t o order n a s a funct ion

of temperature.

Usage: CALL PSATK(P,T,N)

Input: T = temperature .

N = der ivat ives t o order N , 0 6 N I 9

Output: ~ ( 1 ) = Psat

~ ( 2 ) = P' ( d ~ / d ~ )

~ ( 3 ) = P" (d2p/d~?.)

e t c . Dimension P a r ray a t l e a s t (N+l) .

Page 21: nuclear Company - digital.library.unt.edu

1.8 PSATL

Computes t h e pressure boundary, PL, between ASME regions 2 and 3

and i t s der ivat ives t o order n as a funct ion of T.

Usage: CALL PSATL(P ,T , N )

Input : T = temperature

N = der ivat ives t o order N , 0 < N 5 9

( ~ o t e : Derivatives of order 3 or higher a r e zero.)

( ~ o t e : Derivatives of order 3 o r higher a r e zero.)

output: ~ ( 1 ) = PL

1.9 ROOT

Computes i t e r a t i v e l y a roo t of t he Gihhs, Helmholtz, o r s a t w a t i o n

pressure function.

where I = type of ' root and NOGO = .TRUE. i f i t e r a t i o n f a i l u r e occurs.

I I I = ASME subregion number

TABLE 5

SUBROUTINE ROOT ARGUMENTS

Page 22: nuclear Company - digital.library.unt.edu

1.10 UNITS

A c a l l t o UNITS r e t u r n s t o t h e use r t h e conversion constants f o r

English o r metric (MKS) u n i t s .

Usage: CALL UNITS(C , I)

Input: I = 1, English constants from /EUNITS/

I = 2, MKS constants from /MUNITS/

Output,: Array C dimensioned by 10.

I 1.11 WRITEA

Write t h e a r ray ( o r por t ions t h e r e o f ) i n t r i a n g u l a r form when A i s

single-dimensioned.

Usage: CALL WRITE(A,I,J,IPAGE)

Input : ar ray A

1,J e f f e c t i v e dimensions of A

IPAGE i s t h e current page number (both input and ou tpu t ) .

I f 'negat ive , no paginating .

*

Output example: I = J = 4; I-B = J B = 0

~ ( 1 ) A ( 2 ) ~ ( 3 ) ~ ( 4 )

~ ( 5 ) A(6) ~ ( 7 )

~ ( 8 ) ~ ( 9 )

~ ( 1 0 )

c (1)

~ ( 2 )

c ( 3)

~ ( 4 )

c ( 5 )

~ ( 6 )

c (7)

~ ( 8 )

C(9)

English I Metric

C r i t i c a l pressure

C r i t i c a l temperature

C r i t i c a 1 spec i f i c volume

Enthalpy conversion

.Entropy conversion

"Zero" temperature

Mechanical equivalent t o heat energy

Gravi ta t ional conver- s iona l f a c t o r

Pressure conversion

CRP, l b f / i n z

CRT ,R

CRV, f t 3/lbm

CRH, Btu/lbm ( CRH=CRV*CRP*SQJC )

CRS , Btu/lbm-R ( CRS=CRH/CRT )

To, 459.67 R

J C , f t - lbf /Btu

GC, ft-lbm/sec2-lbf

, SQJC , ( i n 2 / f t 2 ) / ( f i - l b f / ~ t d .

CRPM, ~ / m ~

CRTM, K

CRVM, m3/kg

CRHM, J/kg ( CRHM=CRVM*CRPM )

CRSM, ~ / k g - K (CRSM=SRHM/CRTM)

~ 0 ~ ~ 2 7 4 . 1 5 K

J C M , Unity

GCM, m/sec2 ,

SQJCM, Unity b

' SONICM, Unity ~ ( 1 0 ) Conversion f o r normalized sonic v e l o c i t y squared

(SQJC = 1 4 4 / ~ c )

SONIC2, ( f t 2 / s e c 2 ) / ( l b f - f t 3/in2-lbm)

Page 23: nuclear Company - digital.library.unt.edu

Example: I = 4 , J = -4; I B = J B = 0

~ ( 1 )

~ ( 2 ) ~ ( 3 )

~ ( 4 ) ~ ( 5 ) A ( 6 )

~ ( 7 ) ~ ( 8 ) ~ ( 1 0 )

(1f J < 0 , t h e binomial a r ray i s wr i t t en . )

2. INTERNAL ROUTINES

The following subroutines are normally - not ca l l ed by t h e user:

Let ~ ( x , ~ ) H(x,y) = F(x ,y) , then given ( a ) H ( x , Y ) , F(x ,y) ; compute

G ( X , Y ) and i t s der ivat ives or (b ) H(x,y), ~ ( x , ~ ) ; compute F ( X , Y ) and i t s

der ivat ives . Usage: CALL B I N O M X ( G , I G X , I G Y , H , I H X , I H Y , F , I F X , I F Y , J I ~ , M G Y ,

MKX ,MHY ,MFX ,MFY ,LTYPE)

Input : A. LTYPE = 0, Compute G i\

H = ar ray i n packed s ing le dimensional form

equivalent t o double dimensions IHX , I H Y

~ ( 1 ) = H ( 1 , l ) = H

~ ( 2 ) = ~ ( 2 ~ 1 ) = aH/ax

~ ( 1 , 2 ) = aH/ay

e t c . F = ar ray F i n packed singTe dimension

F, aF/ax, aF/ay . . . . equivalent a r ray F(IHX,IHY)

JI = order of i n i t i a l computation

(JO = 0, compute G = F/H)

JF = highest order

( ~ x a m ~ l e : If JF = 2, compute der iva t ives t o

2nd order) MGX,MGY: MHX,MHY: MFX,MFY a r e

index biases f o r G , H , and F.

Example: For t h e a r ray F, elements a r e biased

F ( I+MFX , J+WY ) . B. LTYPE = 0, Compute F given G and H

(Input descr ipt ion s imilar t o A. )

Page 24: nuclear Company - digital.library.unt.edu

2.2 EDER

-Calculate t h& der ivat ives with respect t o t of

I Usage: CALL EDER(z,x,B,BL,M,M,Io)

I Input : I 0 = . highest order f o r der ivat ives ~ 5

. M = number of terms i n sum

(1 I. M 2 7 )

BL = A

X = .e A (1-t

N = n i (dimension M )

B = bi (dimension M )

Output: Z a r ray (dimension 10+1)

2.3 FUNX

Defines and computes t h e functions f o r subroutine ROOT described

i n Section 1'.9.

2.4 . POLATT

Interpola tes t h e s t r a igh t l i n e s i n a t a b l e of Y , X .

Usage: . Function POLATT (XY ,XX ,N , K )

Input: XY = Array of Y,X: ~ ( 1 ) ~ ~ ( l ) , ~ ( 2 ) ~ ~ ( 2 ) . . . . . where.X(N+l) > X ( N )

XX = input value of X .. . . t

N = number of pa i r s of X,Y i n XY a r ray

K = memory index

Output : Interpolated va lue of Y arid K., memory index.

. . - 2.5 POLYN

,. .

' Compute t he der ivat ives with respect t o X of .

Usage: CALL POLYN(X,Z ,A,NI ,M,L) '

Input: X = value of main var iab le

' 1 5

Page 25: nuclear Company - digital.library.unt.edu

M = number of terms i n sum

(1 I M 1 2 0 )

A = ai dimensioned M

N I = in teger niy dimensioned M

L = dimension of Z

(de r iva t ives computed t c ~ order L-1)

Output : Z ar ray .

COMMON BLOCKS

/ASMCON/ mst be i n i t i a l i z e d by a c a l l t o IASME.

(Note: /ASMCON/ appears i n block da ta DA12 with approximate values

which a r e reca lcu la ted i n IASME using p rec i se values from /ASMCOX/.)

3.2 ]ASMCOX/

Set i n block d a t a D A l l wi th values t o c a l c u l a t e /ASMCON/.

3.3 /ASMF;L/

Set i n block d a t a DAT2; contains constants f o r t h e Gibbs functions.

3.4 ASM ME^^/ Set i n block da ta DAT3; conta'ins t h e constants f o r t h e Helmholtz

funct ions .

3.5 /ASMESL/

Set i n block d a t a D A T ~ ; contains t h e constants f o r sa tu ra t ion pres-

sure l i n e and PL l i n e separat ing subregions 2 and 3.

3.6 /BINFAC/

Contains an a r ray of binomial c o e f f i c i e n t s and an a r r a y of f a c t o r i a l s

which a r e ca lcu la ted i n IASME.

( ~ o t e : The dimensions of t h i s a r r a y l i m i t t h e de r iva t ive ca lcula-

t i o n s t o 9 th order o r l e s s . ) -

3.7 /DUMZZZ/

An intermediate s torage area.

( ~ o t e : The dimensions of t h i s a r r a y l i m i t t h e de r iva t ive calcula-

t i o n s t o 9 t h order o r l e s s . ) I

Page 26: nuclear Company - digital.library.unt.edu

3.8 /ERRPVT/ i

Contains a r rays of it e ra t ion e r r o r requirements and search l i m i t s

f o r subroutine ROOT. Values s e t i n block da ta DAT7.

3.9 /EUNITS/ CRP ,CRT ,CRV,CRH ,CRS ,TO , J C ,GC ,SQJC ,SONIC2

Contains conversion constants s e t i n block d a t a f o r English u n i t s .

- This common block i s ava i l ab le t o use r s by c a l l i n g UNITS.

CRP = 3208 p s i a

P (reduced) = P ( ~ s ~ ~ ) / c R P

CRT = 1165.14 R

T (reduced) = [T(F)+TO]/CRT

CRV = 0.0578 ft 3/lbm

v (reduced) = v ( f t 3 /lbm) /CRV

CRH = 30.14 Btu/lbm .

g , f , h , o r u (reduced) = [h o r u ( ~ t u / l b m ) ] / ~ ~ ~

CRS = sent~opy norma.li zat ion

s (reduced) = s (~tu/ lbm-F) /CRS

TO = 459.67 R (d i f f e rence between absolute temperature)

.Scdle ( R ) and Fahrenheit (F)

.J,C ',7a .16 f t- lbf/Btu (mechanical equivalent t o heat energy)

GC = 32.174 ft-lbm/sec2-lbf

SQJC = 1 4 4 / ~ ~ , pressure conversion from l b f / i n 2 t o ~ t u / f t ~

SONIC2 = conversion f o r normalized sonic v e l o c i t y squared

a 2 ( f t 2 / s e c 2 ) = a: ( n o r m a l i z e d ) * ~ 0 ~ 1 ~ 2 S

~ . ~ O . / M U N I T S / CRPM,CRTM,CRVM,CRSM,TOM,JCM,GCM,SQJCM,SONICM

Contains conversion f o r metr ic (MKS) u n i t s . Available by c a l l i n g

UNITS.

CRPM = 2.212 x l o 7 ~ / m ~

CRTM = 647.3 K

CRVM = 0..00317 m3/kg

CRHM =' 70120.4 J /kg

CRSM = 108.3275 ~ / k g - ~

TOM = 273.15 K

JCM = 1. N-m2/5

GCM = 9.80665 m/sec2

SQJC = 1. N-m2/5

jjohnson
Rectangle
Page 27: nuclear Company - digital.library.unt.edu

3.11 /ROOTLM/

Contains p a i r s of ( v , ~ ) which def ine t h e approximate boundaries of

ASME subregions 3 and 4 o r f o r subroutine ROOT. Values s e t i n block d a t a

DAT 8.

3.12 /SATLIN/

Contains approximate values of Tsat a s 'a' funct ion of P f o r sub-

r o u t i n e ROOT. Values s'et i n block d a t a DAT9.

The following t a b l e i s a cross-reference Yor subruutlnes , . huc t iona +

and name common blocks within ASTEM.

Page 28: nuclear Company - digital.library.unt.edu

' TABLE 6

CROSS-REFERENCE OF SUBROUTINES, FUNCTIONS AND NAME COMMON BLOCKS

* Contains s. wri te statement and format.

** Contains dimensions t h a t r e s t r i c t maximum order .

*** Contains dimensions t h a t l i m i t number of summation terms.

Page 29: nuclear Company - digital.library.unt.edu

V I . SAMPLE PROBLEM

The following sample problem i s designed t o t e s t a l l rout ines i n

t h e ASTEM package.

3 P = ~ O O ' p s i a , T=150F

Page 30: nuclear Company - digital.library.unt.edu

LEVEL 1 8 ( SEPT 5 9 I 0 S / 3 5 5 FOPTRAN H

COMPILER OPTIONS - NAqE= ~ A I N ~ O P T = O 2 ~ L I Y E 3 N I = 5 8 t S I Z E = O D O O K ~ S O U R C E t E B C O I C t N O L I S T ~ N O 0 E C K ~ L O A O ~ M A P ~ N O E O I T ~ N ~ I D ~ X R E F

I S N 3 0 0 2 I M P L I C I T R E A L * 8 ( A - H . 0 - L I - I S N 0 0 0 3 OIMFYSION G 1 5 5 ) r G V ( 4 5 I I S V 0 0 0 4 OIMEYSION ~ ~ ( 1 0 ) . c ~ ( l 0 1 I S N 3 0 0 5 L O G I 2 4 L NOGO

C C I N I T I A L I Z E

1SN 0 0 0 6 CALL 14SME( 9 ) I S Y 0 0 0 7 CALL U V I T S ( C E I ~ ) I S N 0 0 0 8 CALL U V I T S ( C M 1 2 ) I S N 0 0 0 9 JPAGE = 1 I S Y 0 0 1 0 W R I T E ( 6 1 1 0 1 ) JPAGE 1SN 3 0 1 1 1 3 1 F O R W 4 T ~ l H l r 2 3 H A S T E ~ / M J I ) O 2 t O 6 / 2 5 / 7 l K V ~ ~ 1 O X l 0 i S A M P L E PROBLEMm

1 '70Xv5 iPAGE 1 1 3 ) I S N 0 0 1 2 U P I T E ( b v l 0 2 ) I S V 3 0 1 3 1 3 2 F O R W A T ( l H O ~ 6 X v 8 H P ( P S 1 4 ) 1 1 3 X 1 5 i r ( F ) * B X s l O H V ( F I 3 t L 3 ) l l 5 X l l H X 1

1 1 0 x 1 1 4 H I P I D T ( P S I A / F J r 5 X r 9 H P L I P S I A J J c C - CASE 1

I S U 0 0 1 4 L = 1 I S N 0 0 1 5 T = 250.00 I S V 0 0 1 6 X = .3DO I S N 0 0 1 7 PL = 0.00 I S N 0 0 1 8 5 CALL C O N U ( ~ ~ C E I T ~ - ~ ) I S V 0 0 1 9 CALL P S A T K ( G s l s 1 ) I S N 0 0 2 0 P = ; ( I ) I S N 0 0 2 1 DPDT = G ( Z ) * C E ( l ) / C E ( Z ) I S Y 3 0 2 2 I F ( L.EQ.2 I GO TO 1 0 I S N 0 0 2 4 CALL GIBBAB(G,P1T11,1) I S Y 0 0 2 5 -VF = G ( 2 ) I S N 0 0 2 6 CALL G I B B P B ( G , P ~ T 1 1 1 2 ) I S N 0 0 2 7 VG = G ( 2 ) I S V o o z e GO TJ 1s I S N 0 0 2 9 1 3 CALL R O O T ( V F , P V T ~ U F ~ S F ~ Q ~ N O G O ) I S Y 0 0 3 0 CALL R O O r ~ V G ~ P ~ T ~ U G ~ S G ~ 3 t N O G O I I S Y 0 0 3 1 CALL PSATL~PLITIO) I S N 0 0 3 2 1 5 V = X*(VG-VF) + VF I S V 0 0 3 3 CALL C O N U ( 4 1 C E t P t l r T r 6 1 V ~ 3 t P L t l l I S N 9 0 3 4 W R I T E ( 5 1 1 0 3 ) P ~ T ~ V ~ X I O P O T * P L I S N 0 0 3 5 1 0 3 FORMAT(1H r6E18.8) I S N 0 0 3 6 GO T I ( 2 0 1 3 0 ) l L

c C CASE 2

I S V 0 0 3 7 2 0 L . 2 I S N 0 0 3 8 I S M 0 0 3 9

I S V 0 0 0 0 1SN 0 0 4 1 I S q 0 0 4 2 I S Y 0 0 4 3 I S N 0 0 4 4 I S N 0 0 4 5 I S N 0 0 4 6

. I S N 0 0 4 7

. c C CASE 3

3 0 P = 900.00 T = 153.00 CALL C O N U ( Z ~ C E * P ~ - I s T s - 6 ) CALL G I B B A B ( G s P ~ T , 9 1 1 ) G.1 = G ( 1 ) v = ; (2 ) GK = - ~ ( 3 ) / ~ ( 2 ) I = I N O E X ( l 1 1 0 1 Z 1 1 0 1 I O )

jjohnson
Rectangle
Page 31: nuclear Company - digital.library.unt.edu

I S N 0 0 4 8 I S Y 0 0 4 9 I S N 0 0 5 0 I S V 0 0 5 1 I S V 0 0 5 2 I S M 3 0 5 3 I S N 0 0 5 4 I S N 0 0 5 5

I S N 0 0 5 6 I S N 0 0 5 7 I S N 0 0 5 8 I S Y 0 0 5 9 I S N 00'50 I SY 0 0 6 1 I S N 0 0 6 2 I S M 0 0 6 3 I SW 0 0 6 4 I S N 0 0 6 5 I S N 0 0 5 6 1SY 0 0 5 7 I S N 0 0 6 8 I S Y 0 0 5 9 I S Y 0 0 7 0 I S N 0 0 7 1 I S V 0 0 7 2

S = - G ( I ) €3 = ; ( I + l ) / G ( 2 ) I = INDEX( l r l O r 3 r l O r I D ) CP = - T * G ( I AS = DSQRTt CP*CE( lO) / (ZP*GK/V - T * B * B ) ) CALL CONU(8rCErGIr4rVr3rGKr-lrSr 5 r B r - 2 r C P r 5 r P r 1 9 T r 6 1 W R l T E ( 6 r 1 0 4 ) P r T r G I r V r G K r S r B r C P r A S

1 3 5 FORHAT( ~'HOI~HP = r E 1 8 o 8 9 5 H P S I A ~ 1 3 X p 3 4 1 ' = r E l $ o B r 2 H FpL6X*34 ; =r 1 E l 8 . B r 7H B T U / L B / l H r 3 H V = rE19 .8 r 7 H F T 3 / L B r l l X r 3 H < =rE18.81 2 7H P S I A - l r l l X r 3 H S = , E 1 8 * 8 r 9 H B T U / L B - F / l H 93HB = r E l 8 - 8 , 4 H , F - l r 3 ~ Q X , ~ H C P Z ~ ~ 1 8 . 8 ~ 9 ~ BTU/LB-Fr 9 x 1 3H4S=r E 18.8r 7Y F r f S E C )

1 0 5 FORMAT( l H O r l O X r 3 3 H G I B B S ARRAY I N ASME REDUCED U N I T S ) W R I T E ( 5 r 1 0 5 ) CALL WRITEA(Gr 1 0 1 1 0 1 - 1 )

1 0 6 FO%MbT( l H O r l O X r 4 3 H S P E C l F l C VOLUME ARRAY I N ASME REDJCED UY I T S ) U R I T E ( b r l O 6 ) CALL C O N A ( G r 9 ~ G V r l r O r l o D O r l o D ~ r 1 - 0 0 ) CALL W Q I T E A ( S V r S r 9 r - 1 )

1 3 7 FORMAT(lHOrlOXr38HSPECIFIC VOLJNE AQ%AY I N E N Z L I S i U h I T S ) W R I T E ( 6 r 1 0 7 ) CALL C O N A ( G r 9 r G V r l r O r C E ( 3 ) p C E I 1 J r C E ( 2 ) 1 CALL W R I T E A ( G V r 9 r 9 r - 1 )

1 0 8 FORM4T(liOrlOXr34HSPECIFIC VOLUME ARRAY I N MKS U N I T S 1 W R I l E ( 6 r 1 0 8 ) CALL C O N A I G v 9 r G V r l r O r C M ( 3 ) r C H ( 2 ) ) CALL W R I T E A ( G V r 9 r 9 r - 1 ) STOP E NO

Page 32: nuclear Company - digital.library.unt.edu

ASrEMIMOD02~06/25/71KVM SAMPLE PROBLEM

P = 0.40000000D 03 PSIA V = 0.163223530-01 FT3 ILB 8 = 0.311602050-03 F-1

1 = 0.150000000 0 3 F . G = -0 .119389880 02 BTUlLB K = 0.31038922D-0'5 PSTA-1 S = 0.21463864D DO RTUIL8-F CP= 0.998720700 0 0 BTUILB-F AS= 0.507957790 0 4 FTISEC

G I B l S AaRAY I N ASME PEOUCED UNITS J I 1 1 2 3 4 5 5 7 0 9 1 0 1 -3.9bO39D-01 3.21442)-01-3.207110-03 2.722289-09-6.01519D-05 1.857690-05-7.704890-05 4.050260-06-2.587710-06 1.955810-06 2 -8 .295579 00 1.16703)-31-5.334170-03 1.267481-03-3.737123-04 1.407300-00-7.291000-55 4.615333-05-3.469650-05 3 -7 .376880 01 8.51533)-01-1.031200-01 1.294670-02-4.555260-03 2.493000-03-1.429900-IYJ 9-957230-04 4 1 .349450 02-2.91838) 0 0 5 .857610-01 1.595299-01-8.944270-02 3.145010-02-2.294680-02 5 -6 .156115 02 5.99705) 31-2.664500 0 1 1.438860 0 1 3.132200-01 0.385140-01 6 2 .418580 03-3.24786) 0 2 4.717410 0 2 3.214160 01-8.948240 0 1 7 -5 .131970 09 3 .923943 '04 -1 .307200 0 9 1.201240 03 8 2.830380 06-6.897181 0 6 2.278880 05 9 -7 .493870 07 5.79291) 0 8

10 3 . 9 0 1 4 2 0 0 9

SPECIFIC VOLUME 4 R R A Y I N ASME REDUCED UNITS J f I 1 2 3 4 5 5 7 9 9 1 3.21442)-01-3.20711)-03 2.722280-04-6.015190-35 1.857690-05-7.704890-06 4.050260-06-2.587711-06 1.955810-06 2 1.16703)-01-5.33417)-03 1.267480-03-3.707120-39 1.43730D-04-7,29103D-05 4.61593D-05-3.469650-05 3 , 8.515330-01-1.031200-01 1.294670-02-4.555260-03 2.490800-03-1.42990D-03 9.957230-0a 4 -2.91838) 0 0 5 .857611-01 1.595290-01-9.864270-02 3.145010-02-2.29458D-32 5 6.997050 01-2.664509 0 1 1.438860 0 0 3.192200-01 8.385140-01 6 -3 .247850 02 4.717413 0 2 3.21415D 01-9.948240 0 1 7 3.923940 04-1.30728) 0 4 1 .201240 03 8 -5 .891180 06 2.278883 05 9 5 .792910 08 t

SPECIFIZ VOLUME 4RRAY I N ENGLISH UNITS I 1 2 3 4 5 6 7 8 9

1.632240-02-5.07608):08 1.343010-12-9.249770-17 0.914ObD-21-1.15111D-24 1.886100-20-3.756060-32 8.848650-36 5.08b090-05-7.24607)-11 5.366730-15-0.892600-19 5.789270-23-9.348050-27 1.844070-30-4.322330-34 3.185120-08-1.202263-12 4.704900-17-5.159870-21 8.734240-25-1.573620-28 3.415590-32

-9.3688bD-11 5.861383-15 4.975690-19-8.598240-23 9.530230-27-2.157390-30 1.927890-12-2.288330-16 3.851120-21 2.663540-25 2.100790-28

-7 .680460-15 3.477181-19 7.38457D-23-6.408090-25 7.964050-16-8.270161-20 2.368690-24

-1.201450-15 1 .?37343-21 8.660690- 18

SPECIFIC VOLUME 4RRAY I N MKS UNIYS 1 1 2 3 4 5 6 7 8 9

1.018970-03-0.596099-13 1.763693-21-1.761790-29 2.459750-37-Q.617110-45 1.09605D-52-3.16577)-60 1 .081690-67 5.715240-07-1.18096)-15 1 . 2 6 8 6 0 0 - 2 3 - 1 . 6 7 7 3 Q M 2.878720-39-6.74241D-47 1.929760-54-6.557570-62 5.44242D-03-3.5269Q)-17 2.001070-25-3.18424D-33 7.871310-41-2.042810-48 6.430960-5b

-3 .411010-11 3.09512D-19 3.810760-27-9.55101D-35 1.535410-42-5.06452D-50 1.263430-12-2.175043-20 5.309890-29 5.32564D-37 6.324220-44

-9.060020-15 5.949083-22 1.832440-30-2.306290-37 1.691020-15-2.596883-23 1.05800D-31

-4.59189D-16 6.858943-25 5.958150-17

jjohnson
Rectangle
Page 33: nuclear Company - digital.library.unt.edu

VII. REFERENCES

1. C. A. Meyer, R . B. McClintock, G. J . S i l v e s t r i , R. C . Spencer, J r . , 1967 ASME Steam ~ a b l e s -- Thermodynamic and Transport Proper t ies of Steam, New York: The American Society of Mechanical Engineers (1967).

2. P. W. Bridgmen, The Thermodynamics of E l e c t r i c a l Phenomena i n Metals and a Condensed Collect ion of Thermodynamic Formulas, New York: Dover Publ ica t ions , Inc. (1961).