12
SCIENTIFIC NOTEBOOK by Carol Scherer

Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

SCIENTIFIC NOTEBOOK

by

Carol Scherer

Page 2: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

C. Scherer

Printed: December 28,2007

SCIENTIFIC NOTEBOOK No. 603-e

SCIENTIFIC NOTEBOOK

by

Carol Scherer

Southwest Research Institute Center for Nuclear Waste Regulatory Analyses San Antonio, Texas

2

Page 3: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

INITIAL ENTRIES

Scientific Notebook: #603-e

Issued to: C. Scherer/Scott Painter

Issue Date: August 1,2003

Account Number: 20.006002.01.192

Title: XFLO 1.0

Participants: Carol Scherer

08/01/2003 - 03/08/2002 -

Met with Scott Painter to discuss the rewriting of the Multiflo code. xFlo will be written in Fortran 90/95 using the new object oriented structures available now. Starting w/ module to do table lookup and interpolation for pressure/temperature. Need to have a PC-based program (NIST - ASME Steam) installed on Guardian. Getting some reference books on FORTRAN 90/95 to act as a style guide. Have Scott's notes for doing 1-d (linear) and 2-d (bilinear and triangle) interpolation

Reference books:

FORTRAN 90/95 Explained by Michael Metcalf and John Reid, 2nd edition, Oxford University Press, 1999.

Object-Oriented Programming Via FORTRAN 90/95 by Ed Akin, Cambridge University Press, 2003.

3

Page 4: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

Numerical Recipes by William Press, Brian Flannery, Saul Teukolsky, and William Vetterling, Cambridge University Press, 1986.

Numerical Recipes in Fortran 77 Second Edition (Volume I of Fortran Numerical Recipes) by William Press, Saul Teukolsky, William Vetterling, and Brian P. Flannery, Cambridge University Press, 2001.

8-4-2003 -

Hollen installed NIST-ASME Steam Database, v2.2 last Friday. Tested it out.

8-7-2003 -

Started generating temperature-pressure tables. The NIST Steam program won’t let me calculate pressures greater than 22 MPa. I need up to 1 OOMPa. Once I get the necessary values, I’ll be able to generate the 4 lookup tables (.dat files) for xFlo. One is looking up Pressure given Temperature (1 -d interpolation). One is looking up Density given TemperaturePressure (2-d, triangular interpolation). One is looking up Viscosity given TemperaturePressure (2-d, triangular interpolation), and the last is looking up Internal Energy for liquid as a function of TemperaturePressure (2-d, triangular interpolation).

Working on algorithms for the interpolation algorithms (maybe from Numerical Recipes) and coding use of the tables using object-oriented FORTRAN 90/95. Use bilinear interpolation for the 2-d interpolation problem (pages 96-97 in Numerical Recipes, 1986); triangular is similar.

8-8-2003 - 8-15-2003 -

Looked at object-oriented version of FORTRAN and Numerical Recipes.

8-18-2003 - 8-19-2003 -

Spock down.

8-20-2003 -

Spock is back up with a lot more space available.

4

Page 5: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

Copied interpolation class.fP5, precision.f95, and test interpolation.f95 from Scott’s xflo/interpolation directory. Need to fill in details of type declarations and the methods for the class.

Got f95 to work (added alias for f95 to /solapps/SUNWspro6/bin to .cshrc). Can’t get a man page for f95. Did get one for BO. Started on makefile in cscherer/xFlo/working). The files don’t compile yet.

8-2 1-2003 -

Looked up standards for FORTRAN 90 and 95 for reference purposes. Researching new array functionality available in FORTRAN 95. Matrix math is built in.

8-27-2003 - 8-28-2003 -

Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 K. Max temp = 647.096., increment = (647.096 - 273.16) / 29 gives increment necessary to generate a 30-row table of values time and pressure that fall on Psat curve. NIST - Saturation tables - temperature independent variable; pressure dependent.

liquid tables - max pressure 100 Mpa; same temperature values as Psat table. generate input file of temperature values for NIST Steam - start with Psat table. Add upper values. Need 40 rows for each temperature over all pressures; total of 1200 rows; NAME of NIST input file: 3 tables for density, internal energy, and viscosity; NAMES; NIST-Specified State Points - temperature and pressure independent variables

gas tables - min pressure 1 Pa (or 0.000001 MPa), same temperature values as Psat table. start with Psat table again to generate input file of temperature values for NIST. Need 50 rows for each temperature over all pressures; total of 1500 rows;

kept a combined gas-liquid input file containing 1800 rows - 60 rows at each temperature value over all pressures.

Finished tables: cscherer/xFlo/working/data: psat.dat, pt-liqden.dat, pt-liqien.dat, pt-liqvis.dat, pt - gasden.dat, pt-gasien.dat, and pt - gasvis.dat.

5

Page 6: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

C. Scherer

Printed: December 28,2007

SCIENTIFIC NOTEBOOK No. 603-e

9-3-2003 - 9-5-2003 -

Worked on implementing classes for interpolation tasks.

9-8-2003 - 9-12-2003 -

Worked in /net/spock/home/cscherer/xFlo/working and subdirectory data.

Finished code (class methods) for the interpolationld class. Updated source code for test-interpolation.fP5. Successhlly compiled although haven’t been able to get a makefile that works correctly. Using command file:

rm -f test-interpolation. e rm -f test-interpo1ation.o rm -f interpolation I d-class. o rm -fprecision.o p5 -L /solapps/SUNWspr06/WS61/2/lib test-interpolation.fl5 interpolation 1 d-cluss.p5 precision.fl5 -0 test-interpolation. e

The need to include the library depends on whether or not the Library Path environment variable is est correctly. May need one set for TPA code (v. 4.2 and 5.0) and one set of environment variables for xFlo (v. 6) so that I can’t “mix” compiler versions.

Scott wants the data in the data files to be stored as Pascals, not MPascals, and MJoules, not Kjoules. I’ll need to modify several files. Will also need to come up with different data storage scheme for the 2d data files, including mins and maxs as per Scott’s notes.

Thinking of adding error scheme with a table of error messages so that I call an error handling routine instead of putting out error messages in line. Will make go-path code shorter. Could make error log easily. Also, routines to read character lines or numbers that also checks error code for read with appropriate error handling instead of in-line. Also need to make sure headers for modules and files are there as per TOP-1 8.

9-1 5-2003 - 9- 19-2003 -

reformatted data file: pt-1iqden.dat - added

6

Page 7: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

reformatted data files ien: kJ to MJ; MPa to Pa;

NIST tables; critical pt temp 647.076 vs. 647.096; density, internal energy, and viscosity for psat pts on the curve - NIST some gas (vapor) some liquid: change all to liquid values

7

Page 8: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

Saturation table output from NIST: points on pressure-density curve.

Temperature Pressure Density (L) Density (V) Int. Energy (L) Int. Energy (V) Viscosity (L) Viscosity (V) [Kj [MPa] [kg/mA3] Ikglm"31 [kJ/kgl [kJ/kg] [Pa-sl [Pa-s]

273.160000 0.000612 286.054344 0.001489 298.948688 0.003324 31 1.843032 0.006886 324.737376 0.013358 337.631720 0.024467 350.526064 0.042596 363.420408 0.070906 376.314752 0.113421 389.209096 0.175109 402.103440 0.261926 41 4.997784 0.380843 427.892128 0.539851 440.786472 0.747947 453.680816 1.015112 466.575160 1.352278 479.469504 1.771297 492.363848 2.284914 505.258192 2.906754 51 8.1 52536 3.651327 531.046880 4.534068 543.941224 5.571414 556.835568 6.780959 569.729912 8.181703 582.624256 9.794469

999.792520 999.345054 996.795604 992.668321 987.270474 980.797918 973.382096 965.113641 956.055192 946.248713 935.719807 924.480244 912.529339 899.854508 886.431159 872.221929 857.175209 841.222749 824.275999 806.220552 786.907594 766.140445 743.652639 7 19.070785 691.848295

0.004855 0.01 1288 0.024133 0.047972 0.089500 0.157980 0.265634 0.427987 0.664138 0.997009 1.453588 2.065230 2.868056 3.90351 7 5.219209 6.870047 8.919948 11.444269 14.533352 18.297758 22.876198 28.447918 35.252867 43.626296 54.062249

-0.000000 54.19892 1 108.165695 162.063060 215.967150 269.920360 323.954948 378.103652 432.403932 486.899249 541.639192 596.679390 652.081618 707.9 143 17 764.253621 821.184975 878.805503 937.227346 996.582397 1057.0291 58 11 18.762949 1182.031705 1247.161404 1314.598945 1384.988600

2374.919676 0.001791 9.2163-06 2392.626127 0.001204 9.5363-06 2410.214366 0.000874 9.8903-06 2427.637620 0.000669 0.00001027 2444.835809 0.000533 0.00001067 2461.736461 0.000436 0.00001 108 2478.255622 0.000366 0.00001 150 2494.297957 0.000313 0.00001 194

2524.513669 0.000241 0.00001282 2538.442671 0.000215 0.00001327 2551.411180 0.000194 0.00001371

2573.920915 0.000162 0.00001460 2583.179983 0.000150 0.00001504 2590.907338 0.000139 0.00001549 2596.933171 0.000130 0.00001593 2601.062840 0.000122 0.00001638 2603.066658 0.0001 15 0.00001684

2509.756569 0.000273 0.00001238

2563.283453 0.000176 0.00001416

2602.666636 0.000108 0.00001731 2599.517891 0.000103 0.00001780

0.00001831 2593.180798 0.000097 2583.076523 0.000092 0.00001886 2568.412061 0.000087 0.00001948 2548.046630 0.000082 0.00002018

595.518600 11.642591 661.137183 67.340956 1459.320198 2520.232575 0.000078 0.00002101 Temperature Pressure Density (L) Density (V) Int. Energy (L) Int. Energy (V) Viscosity (L) Viscosity (V)

[Kj [MPa] [kg/mA3j [kg/mA3] IkJ/kgl [kJ/kg] [Pa-sj [Pa-s]

Page 9: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

C. Scherer

Printed: December 28,2007

SCIENTIFIC NOTEBOOK No. 603-e

2482.043163 0.000072 0.00002208 608.412944 13.753125 625.494792 84.819340 1539.267670 2427.814777 0.000067 0.00002355 621.307288 16.159105 581.937783 109.240622 1628.262266

634.20 1 632 1 8.903893 52 1.5 19592 148.03071 3 1736.39761 8 2342.860086 0.000060 0.00002599 2016.999893 0.000055 0.00005424 647.095976 22.063994 322.799723 321.132064 2014.572248

Use L values for liguid tables and V values for gas (vapor) tables.

In the Specified State Points tables, NIST decided whether to use liquid or vapor values, but wasn’t always correct. .dat files corrected as per this table for points on the curve.

Page 10: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

C. Scherer

Printed: December 28,2007

SCIENTIFIC NOTEBOOK No. 603-e

9-23-2003 - 9-26-2003 -

By Friday, finish reformatting 4 remaining .dat files. Finish read routine for 2d. ?Work on interpolate routine if there is time. Friday is end of fiscal year and xFlo will go on hold pending funding.

3-29-2004 - 4-2-2004 -

Scott wanted me to redo 3 of the 6 property tables for liquid viscosity, gas viscosity, and gas internal energy. These tables contained values that were showing up as 0.0 because they were so small. So, he wanted them in scientific notation and showing more precision.

First, went to NIST Steam2.2 program; did the following:

1. Selected Options --> Properties and selected (or deselected everything else but) Temperature, Pressure, Density, and Internal Energy from the Thermodynamic tab and Viscosity from the Transport Misc. tab.

2. Selected Calculate --> Saturation Tables --> vapor-liquid saturation and Vary --> Temperature, init temp = 273.16 K, final temp = 647.096 K, and increment = .12.894344. Generated the same PSAT table as above, except more precision.

3. With PSAT table up, select Temperature and Pressure columns, one at a time, and then select Style --> Fixed Decimal --> 9 Digits. Save table (psat-fullrange-inp.txt) and use to determine whether values should be gas (vapor) or 1iquid.Copy file to tp-inp.txt. Open in Excel (TAB delimited). Delete all columns except Temperature and Pressure. Convert to 1800-row table (just the two columns) where each temperature has a row for each pressure (30 temperatures x 60 pressures, including the ones above and below the psat curve). See pttemp1ate.xls for formula to calculate the extra pressures. Save values as fixed decimal (Number) w/ 9 decimal places in text file. [NOTE: if you save them in scientific notation now, the file won’t work right in NIST.] Working directory was /net/spocWhom e/cscherer/xFlo/working 2004/data.

10

Page 11: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

Printed: December 28,2007

C. Scherer SCIENTIFIC NOTEBOOK No. 603-e

4. Go back to NIST Steam 2.2. Select Calculate --> Specified State Points --> Select 2 independent properties: Temperature [K] and Pressure [MPa] --> Select Data Source: Enter data from file. Select tp inp.txt. Press Calc. button. Select each column and set Style to float decimal w /9 digits (same as scientific notation). Save table as tempqress-l8OO.out. Open this file in Excel. Save as tempqress-1800-out.xls. Convert MPa to Pa (* by 1,000,000). Convert KJoules to Mjoules (/1,000). Save copies of tempqress~l8OO~out.xls as tp-liqvis2-dos.datY tp-gasvis2 dos.dat, and tp-gasien2-dos.dat.Go into each of these new files and delete the unnecessary rows and columns so that files contain only pressure rows for gas or liquid and the column for the property indicated in the file name. Set all cells to Scientific w / 9 decimal places. Using the PSAT table, modify values for the cells that fall on the curve so that only liquid values are in the liquid table and gas in the gas tables. IdentifL the cells that contain invalid data and replace values w/ -9.99999999B+OO (Scientific w/ 8 decimal places). Save files as text files. On spock, convert files to Unix format using dos2unix and rename files tp - liqvis2.datY tp - gasvis2.datY and tp-gasien2.dat. Format these files and add extra header information, etc.

Entries into Scientific Notebook #603-e for pages - I I i have been made by Carol S. Scherer. No original text entered into this Scientific Notebook has been removed.

11

Page 12: Scientific Notebook No. 603E: xFlo Version 1.0 (08/01/2003 ... · Nist gen Psat curve -input starting temp, ending temp, and increment. Min temp = 273.16 ... temperature and pressure

c 1 GEOSCIENCES AND ENGINEERING DIVISION

1 SCIENTIFIC NOTEBOOK REVIEW CHECKLIST RECORD

Scientific Notebook No. LO3 .e Project Numbers: oIbQaa .SI , 19 a Accomplished

-1

I I'k - PJ4L

1-W I

1. Initial entries per QAP-001

2. Dating of entries

3. Corrections (crossed out, one line through w/initials/date)

4. No White out used

5. Page number visible on copy or original notebook

6. In process entries per QAP-001

7. Figure information present

8. Text readable

9. Copyrighted material is identified

IO. Permanent ink or type only

11. Signing of entries (not required on each page)

12. Electronic media in the scientific notebook properly labeled

13. NRC Supplementary Scientific Notebook Questions are addressed.

14. The independent, two person verification required by AP-019, Section 5.2.1.2(b) is complete

Any discrepancies must be resolved before notebook closeout.

Attach this comDleted form to the last Daae of the notebook. Form QAP-01 (0312007)