181
JNC TN8400 200 2-024 熱力学データベースフォーマット変換 プログラムの作成 (研究報告) 2003 年 2月 核燃料サイクル開発機構 東 海 事 業 所

熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

JNC TN8400 2002-024

熱力学データベースフォーマット変換

プログラムの作成

(研究報告)

2003 年 2 月

核燃料サイクル開発機構

東 海 事 業 所

Page 2: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

本資料の全部または一部を複写・複製・転載する場合は、下記にお問い

合わせください。

〒319-1184 茨城県那珂郡東海村村松4番地 49

核燃料サイクル開発機構

技術展開部 技術協力課

電話:029-282-1122(代表)

ファックス:029-282-7980

電子メール:jserv@jnc.go.jp

Inquiries about copyright and reproduction should be addressed to:

Technical Cooperation Section,

Technology Management Division,

Japan Nuclear Cycle Development Institute

4-49 Muramatsu,Tokai-mura,Naka-gun,Ibaraki 319-1184,

Japan

○C 核燃料サイクル開発機構(Japan Nuclear Cycle Development Institute)

2003

○S

Page 3: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- i -

JNC TN8400 2002-024 2 0 0 3 年 2 月

熱力学データベースフォーマット変換プログラムの作成

(研究報告)

吉田 泰 ∗, 油井 三和**

要旨

地球化学計算コードPHREEQEコードからPHREEQCコード, EQ3/6コード

および Geochemist’s Workbench コードへのデータベースのフォーマット変換

を行うデータベースフォーマット変換プログラムの作成および品質の確認を行

った。本報告書では変換プログラムの機能および品質確認の結果を報告する。

品質確認の結果、データベースフォーマット変換プログラムによる熱力学デー

タベースの変換は、一部の変換条件を除いて、正しく行われていることがわか

った。

* 原子力システム株式会社 ** 核燃料サイクル開発機構 東海事業所 環境保全・研究開発センター 処分研究部 処分

バリア性能研究 Gr.

Page 4: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- ii -

JNC TN8400 2002-024

F e b r u a r y , 2 0 0 3

Development of Conversion Programs for Formats of Thermodynamic

Databases

(Research Document)

YOSHIDA, Yasushi ∗, YUI, Mikazu**

Abstract

Programs which enable to convert the database format from PHREEQE

code to PHREEQC, EQ3/6 and Geochemist’s Workbench code were developed

and quality of these programs was checked.

As a result, it was confirmed that these programs converted the database

format correctly except for specific conditions which lead errors.

∗ Nuclear Engineering System Incorporation (NESI) ** Barrier Performance Gr., Waste Isolation Research Division, Tokai Works, Japan Nuclear Cycle

Development Institute (JNC)

Page 5: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- iii -

目 次

1. はじめに ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・1

2. データベースフォーマット変換プログラムについて

2.1 対象地球化学計算コード・・・・・・・・・・・・・・・・・・・・・・・・・2

2.2 データベースフォーマット変換プログラム・・・・・・・・・・・・・・・・・2

2.3 データベースフォーマット変換プログラムによる変換方法・・・・・・・・・・2

3. データベースフォーマット変換プログラムの品質確認 ・・・・・・・・・・・・・・3

4. 今後の課題 ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・8

5. おわりに ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・9

6. 参考文献・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ ・10

別添-1.1 green.exe での変換に用いたファイル(atwtdat.txt)・・・・・・・・・・・・61

別添-1.2. green.exe での変換に用いたファイル(basisdat.txt)・・・・・・・・・・・ 62

別添-1.3 phgwb10 での変換で用いたファイル(HDR)・・・・・・・・・・・・・・・・64

別添-1.4 phgwb10 での変換で用いたファイル(ELEMS)・・・・・・・・・・・・・・66

別添-1.5 phgwb10 での変換で用いたファイル(ION_FILE)・・・・・・・・・・・・・ 68

別添-2 pqpcn14_5 のプログラムソース (pqpcn14_5.f) ・・・・・・・・・・・・・・・70

別添-3 green.exe のプログラムソース(green.for)・・・・・・・・・・・・・・・・・・92

別添-4.1 phgwb_10 のプログラムソース(Makefile) ・・・・・・・・・・・・・・・・125

別添-4.2 phgwb_10 のプログラムソース(checkn.f) ・・・・・・・・・・・・・・・・・127

別添-4.3 phgwb_10 のプログラムソース(choxid.f) ・・・・・・・・・・・・・・・・・128

別添-4.4 phgwb_10 のプログラムソース(edit.f) ・・・・・・・・・・・・・・・・・・129

別添-4.5 phgwb_10 のプログラムソース(edit1.f) ・・・・・・・・・・・・・・・・・130

別添-4.6 phgwb_10 のプログラムソース(elemnt.f) ・・・・・・・・・・・・・・・・・132

別添-4.7 phgwb_10 のプログラムソース(getelm.f) ・・・・・・・・・・・・・・・・・134

別添-4.8 phgwb_10 のプログラムソース(logkt.f) ・・・・・・・・・・・・・・・・・135

別添-4.9 phgwb_10 のプログラムソース(lwcase.f) ・・・・・・・・・・・・・・・・・137

別添-4.10 phgwb_10 のプログラムソース(main.f) ・・・・・・・・・・・・・・・・・138

別添-4.11 phgwb_10 のプログラムソース(minera.f) ・・・・・・・・・・・・・・・・148

別添-4.12 phgwb_10 のプログラムソース(readion.f) ・・・・・・・・・・・・・・・・159

倉林 はるみ
JNC TN8400 2002-024
Page 6: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- iv -

別添-4.13 phgwb_10 のプログラムソース(speci.f) ・・・・・・・・・・・・・・・・・160

別添-4.14 phgwb_10 のプログラムソース(substr.f) ・・・・・・・・・・・・・・・・170

別添-4.15 phgwb_10 のプログラムソース(subtre.f) ・・・・・・・・・・・・・・・・171

別添-4.16 phgwb_10 のプログラムソース(upcase.f) ・・・・・・・・・・・・・・・・172

別添-4.17 phgwb_10 のプログラムソース(wrtlin.f) ・・・・・・・・・・・・・・・・173

別添-4.18 phgwb_10 のプログラムソース(zcheck.f) ・・・・・・・・・・・・・・・・174

別添-4.19 phgwb_10 のプログラムソース(zchemi.f) ・・・・・・・・・・・・・・・・175

表目次

Table 1. 計算コード・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 11

Table 2. データベースフォーマット変換ツール・・・・・・・・・・・・・・・・・・ 11

Table 3. 変換前と変換後の溶存化学種データ比較・・・・・・・・・・・・・・・・・ 12

Table 4. 変換前と変換後の固相/気相データ比較・・・・・・・・・・・・・・・・・・34

JNC TN8400 2002-024
Page 7: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 1 -

1. はじめに

核燃料サイクル開発機構(以後 JNC とする)では放射性廃棄物の地層処分の安全評価で必

要となる熱力学データベースの開発を行っている。熱力学データとは、化学的平衡状態に

おける反応物と生成物の関係を示す定数であり、ギブスの自由エネルギー(ΔrG○), 平衡

定数(K), エンタルピー(ΔrH○)およびエントロピー(S○)等が対象のデータである。

これらの熱力学データは平衡状態における化学反応を計算する際に用いられる。

熱力学データを用いたより複雑な系における化学反応の計算には、地球化学計算コードが

用いられる。地球化学平衡計算コードとは、系のトータルマスバランスと反応定数に関す

る熱力学データを用いた連立方程式を解くことにより平衡状態における溶液中の化学状態

を求めるプログラムである。各地球化学計算コードは、各々独自のデータベースを計算に

用いている。このデータベースには計算に用いられるデータが指定の配列で格納されてお

り、このような熱力学データの計算用データファイルを熱力学データベース

(Thermodynamic Data Base, 以後 TDB とする)と呼んでいる。

一般に利用頻度の高い地球化学計算コードは複数存在し、基本的な原理は同じであるが、

強化されている計算機能が異なる。よって、対象としている系に対して、最適な解を求め

るには、いくつかの計算コードから適当な機能を有する地球化学計算コードを選択し計算

を行うこととなる。また、TDB においても対象となる系に最適なものを用いることとなる。

しかし、地球化学計算コードは、前述の通り、独自のフォーマットに対応した TDB のみ読

み込み可能であるため、計算対象の系に対して様々な地球化学計算コードと TDB の組み合

わせが存在する。よって、計算を行う環境を整備するには、計算に用いる全ての地球化学

計算コードのフォーマットに対応した TDB のデータ群を構築する必要がある。

JNC では、この多コード間におけるデータベース共有のためのシステム構築を行うため

にデータベースフォーマット変換プログラムの作成を行った。データベースフォーマット

変換プログラムとは、TDB に格納されている熱力学データ情報を異なるデータフォーマッ

トの TDB に変換するプログラムである。本報告書ではこのデータベースフォーマット変換

プログラムの機能の説明と、変換に関する品質確認の結果を示すものである。

JNC TN8400 2002-024
Page 8: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 2 -

2. データベースフォーマット変換プログラムについて

2.1 対象地球化学計算コード

今回の変換プログラム作成において対象とした地球化学計算コードは PHREEQE コード

(Parkhurst et al., 1980), PHREEQCコード(Parkhurst 1995), EQ3/6コード(Wolery 1992)

および Geochemist’s Workbench(以下 GWB とする, Bethke 1996)である。計算機能の

概要と格納している熱力学データの種類を Table 1 に示す。

2.2 データベースフォーマット変換プログラム

データベースフォーマットの変換のため、PHREEQE コードから PHREEQC コード,

PHREEQE コードから EQ3/6 コードおよび PHREEQE コードから GWB コードについて

フォーマット変換が行えるプログラムを作成した。変換プログラムを Table 2 に示す。

pqpcn14_5(PHREEQE→PHREEQC)は FORTRAN で作成されたアプリケーションであ

り、コンパイラーを利用することにより実行形式を作成することができる。phgwb10

(PHREEQE→GWB)は UNIX 環境で動作する FORTRAN で作成されたアプリケーショ

ンである。green.exe(PHREEQE→EQ3/6)は LLNL (Lawrence Livermore National

Laboratory)で作成された Windows 上で動作するアプリケーションである。pqpcn14_5,

phgwb10 および green.exe はソースプログラムを添付-2 から別添-4.19 に示す。また、各変

換プログラムで変換されるデータは以下の通りである。

(1) PHREEQE コードから PHREEQC コード(pqpcn14_5)

25℃における平衡定数(logK), イオンサイズパラメータ(ao), WATEQ Debye - Hückel

パラメータ(b)および解析的温度補正式の係数(analytical expression, A1 - A5)の変換が

行われる。

準親溶存化学種データを含む溶存化学種データに対するΔrH○の変換は正しく行われ

ず、また、全ての溶存化学種, 固相及び気相についても単位変換が正しく行われないた

め、pqpcn14_5 ではエンタルピーの変換は行うことができない。これらの不具合は

pqpcn14_5 の設計上のバグであり、今後改良を検討している。

(2) PHREEQE コードから EQ3/6 コード(green.exe)

各温度における平衡定数(K)およびイオンサイズパラメータ(ao)

(3) PHREEQE コードから GWB コード(phgwb10)

各温度における平衡定数(K)およびイオンサイズパラメータ(ao)

2.3 データベースフォーマット変換プログラムによる変換方法

各変換プログラムのよる変換方法を以下に示す。また、変換に用いたファイルを別添-1.1

から別添-1.5 に示す。

<PHREEQE コードから PHREEQC コード>

① 変換プログラムに読み込み可能な形に変換元 PHREEQE データベースの修正を行う

JNC TN8400 2002-024
Page 9: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 3 -

② pqpcn14_5 を起動

③ エンタルピーデータ(delta_h)をデータベースから削除

④ 変換終了

<PHREEQE コードから EQ3/6 コード>

① 変換プログラムに読み込み可能な形に変換元 PHREEQE データベースの修正を行う

② 各元素の原子量を定義するファイル(atwtdat.txt, 別添-1.1)と各親溶存化学種の構成元

素を定義するファイル(basisdat.txt, 別添-1.2)を作成

③ green.exe 起動

④ 変換終了

<PHREEQE コードから GWB コード>

① 変換プログラムに読み込み可能な形に変換元 PHREEQE データベースの修正を行う

② Header 情報を定義するファイル(HDR, 別添-1.3), 各親溶存化学種の分子量(または原

子量)と構成元素を定義するファイル(ELEMS, 別添-1.4)および各溶存化学種のイオンサイ

ズパラメータを定義するファイル(ION_FILES, 別添-1.5)を作成する。

③ phgwb10 起動

④ 変換終了

3. データベースフォーマット変換プログラムの品質確認

データベースフォーマット変換プログラムについての品質の確認を行った。確認の方法は、

TDB を各変換プログラムにより変換し、変換元と変換後のデータベースに格納されている

情報を比較し、データが正しく変換されていることを確認することにより行うこととした。

確認のために変換に用いた TDB は網羅的に多くの溶存化学種データおよび鉱物/ガスデー

タを格納している2000年版JNC溶解度計算用TDB (溶存化学種が約500個, 固相が約440

個, Yui et al., 1999)を用いた。

変換元(PHREEQE format)と変換先(PHREEQC, EQ3/6 and GWB format)のデータベー

ス情報について溶存化学種についての比較を行った項目のうち溶存化学種については、

Species Name : 溶存化学種名

Code : 計算コード略称(PE:PHREEQE, PHC:PHREEQC, EQ:EQ3/6,

GW:Geochemist’s Workbench)

logK 25℃ : 25℃における logK

logK analytic : 解析的温度補正式の係数より算出される 25℃の logK

a0 : Debye - Hückel 活量補正式イオンサイズパラメータ

ai : WATEQ Debye - Hückel 活量補正式イオンサイズパラメータ

bi : WATEQ Debye - Hückel 活量補正式の拡張項係数(b)

A1, A2, A3, A4, A5 : 解析的温度補正式の係数

ΔrH○ 25℃ : 25℃における反応のエンタルピー[kcal/mol]

JNC TN8400 2002-024
Page 10: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 4 -

ΔrH○ calc. : 60℃と 25℃における logK より算出した 25℃のエンタルピー

[kcal/mol]

となり、固/気相については

Solid/Gas Name : 固/気相名

Code : 計算コード略称(PE:PHREEQE, PHC:PHREEQC, EQ:EQ3/6,

GW:Geochemist’s Workbench)

logK 25℃ : 25℃における logK

logK analytic : 解析的温度補正式の係数より算出される 25℃の logK

A1, A2, A3, A4, A5 : 解析的温度補正式の係数

ΔrH○ 25℃ : 25℃における反応のエンタルピー[kcal/mol]

ΔrH○ calc. : 60℃と 25℃における logK より算出した 25℃のエンタルピー

[kcal/mol]

とした。以上の項目によりまとめた比較表を溶存化学種データについては Table 3 に固/気

相については Table 4 に示す。

(1) pqpcn14_5 を用いた PHREEQE から PHREEQC への変換について

1) 溶存化学種データ変換について

PHREEQE TDB から PHREEQC TDB への変換においては 25℃における logK, 及び、

PHREEQE TDB にデータが格納されていれば、Debye - Hückel 活量補正式のイオンサ

イズパラメータ, WATEQ Debye - Hückel活量補正式のイオンサイズパラメータ及び拡張

項の係数 b が変換される。Debye – Hückel 活量補正式のパラメータについては WATEQ

Debye - Hückel 活量補正式のイオンサイズパラメータ及び拡張項の係数 b が優先的に

PHREEQC に変換され、もし、このデータがない場合にはイオンサイズパラメータに

Debye - Hückel 活量補正式のイオンサイズパラメータが変換され WATEQ Debye -

Hückel 活量補正式の拡張項の係数 b が 0 となる。また、温度補正に関するパラメータで

ある解析的温度補正式の係数については、変換元の PHREEQE TDB にデータが格納され

ていれば PHREEQC TDB にデータの変換が行われる。25℃における反応のエンタルピ

ーは、pqpcn14_5 設計上のバグにより、正しく変換が行われないため、変換後データベ

ースから削除されており、Table 3 の変換後 PHREEQC フォーマットデータにはエンタ

ルピーの値は示されていない。

Table 3 より、25℃の logK 及び Debye - Hückel 活量補正式のパラメータが正しく変換

されているのがわかる。また、解析的温度補正式の係数については、pqpcn14_5 の入出

力桁数制限により桁数の長いデータに対して若干の違いが変換元 PHREEQE データと変

換後 PHREEQC データに見られるが、その差は小さく計算結果に影響を与えるほどでは

ない。よって PHREEQE から PHREEQC への溶存化学種データの変換は、エンタルピ

ーのデータの変換を除いて、正しく行われていると考えられる。

JNC TN8400 2002-024
Page 11: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 5 -

2) 固/気相データ変換について

PHREEQE TDB から PHREEQC TDB への変換においては 25℃における logK, およ

び、PHREEQE TDB にデータが格納されていれば、解析的温度補正式の係数が変換され

る。25℃における反応のエンタルピーは、pqpcn14_5 設計上のバグのため正しく変換が

行われておらず、変換後データベースから削除されており、Table 4 の変換後 PHREEQC

フォーマットデータにはエンタルピーの値は示されていない。

Table 4 の変換結果の比較より、25℃における logK は正しく変換されているのが分か

る。解析的温度補正式の係数については pqpcn14_5 の入出力桁数制限により桁数の長い

データに対して若干の違いが変換元 PHREEQE データと変換後 PHREEQC データに見

られるが、その差は小さく結果に影響を与えるほどではないため、変換は、エンタルピー

のデータの変換を除いて、正しく行われていると考えられる。

(2) green.exe を用いた PHREEQE から EQ3/6 への変換について

1) 溶存化学種データ変換について

PHREEQE TDB から EQ3/6 TDB への変換においては、各温度に対する logK および

Debye - Hückel 活量補正式のイオンサイズパラメータが変換される。各温度における

logK は、変換元の解析的温度補正式の係数または 25℃の logK とエンタルピーから求め

られる。変換元の TDB に解析的温度補正式の係数と 25℃の logK およびエンタルピーが

格納されている場合、各温度の logK は優先的に解析的温度補正式の係数により計算され

る。解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換

元に格納されていない場合は、25℃における logK のみが変換される。また、解析的温度

補正式の係数, 25℃における logK およびエンタルピーは、コメント文として変換先に表

示されており、これらのデータについても Table 3 の比較表に示した。

Table 3 より、Debye – Hückel 活量補正式のイオンサイズパラメータについては、変換

元のデータがすべて変換先に変換されているのがわかる。また、変換先でコメントとして

示されている 25℃の logK, 解析的温度補正式の係数およびエンタルピーについても、正

しくデータの移行が行われている。変換元において 25℃の logK の値のみ格納されている

ものについては、UO2(N3)4--を除き、データが変換先に正しく変換されている。

UO2(N3)4--については logK が 10 の 4 乗のオーダーで、green.exe の入出力制限を超え

るため変換が行われない。このため、UO2(N3)4--に限っては変換後手入力によりデータ

の移行を行った。また、変換元において解析的温度補正式の係数が示されている溶存化学

種については、変換後の 25℃における logK と変換元の解析的温度補正式の係数より算出

した 25℃の logK を比較した。比較の結果、green.exe の入出力制限により桁数の長いデ

ータに対しては若干の違いが見られるものの、同様の値となっていることを確認した。

2) 固/気相データ変換について

PHREEQE TDB から EQ3/6 TDB への変換においては、解析的温度補正式の係数また

は 25℃の logK とエンタルピーから求められる各温度における logK が変換される。解析

JNC TN8400 2002-024
Page 12: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 6 -

的温度補正式の係数により logK が計算でき、かつ 25℃の logK とエンタルピーからも

logK が計算できる場合は、解析的温度補正式の係数より求まる logK が優先的に移行され

る。解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換

元に格納されていない場合は、25℃における logK のみが変換される。また、解析的温度

補正式の係数, 25℃における logK およびエンタルピーは、コメント文として変換先に表

示されており、これらのデータについても Table 4 の比較表に示した。

解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換元

に格納されていない固/気相データに対しては、25℃における logK は全て正しく変換され

ている。解析的温度補正式の係数が変換元に示されているデータについては、green.exe

の入出力桁数制限により桁数の長いデータに対して若干の違いが変換元 PHREEQE デー

タと変換後 PHREEQC データに見られるが計算結果に大きな影響を与えるものではなく、

変換が正しく行われていると考えられる。また、25℃におけるエンタルピーについても変

換先にコメント文にデータが示されており、変換元と同じ値を示しているのがわかる。

(3) phgwb10 を用いた PHREEQE から GWB への変換について

1) 溶存化学種データ変換について

PHREEQE TDB から GWB TDB への変換においては、解析的温度補正式の係数または

25℃の logK とエンタルピーから求められる各温度における logK が変換される。解析的

温度補正式の係数により logK が計算できかつ、25℃の logK とエンタルピーからも logK

が計算できる場合は、解析的温度補正式の係数より求まる logK が優先的に移行される。

解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換元に

格納されていない場合は、25℃における logK のみが変換される。Debye - Hückel 活量補

正式のイオンサイズパラメータについてもデータの変換が行われる。

Debye - Hückel 活量補正式のイオンサイズパラメータについては、データの変換が正

しく行われている。解析的温度補正式の係数および 25℃におけるエンタルピーのどちら

のデータも変換元に格納されていないデータに対しては25℃における logKは全て正しく

変換されている。変換先において logK が解析的温度補正式の係数により計算されている

ものについては、変換元の解析的温度補正式の係数を使った計算結果と変換先の 25℃の

logK の比較を行った。比較の結果、phgwb10 の入出力制限により桁数の長いデータに対

して若干の違いが見られるが、計算に影響を与えるものではなく、変換は正しく行われて

いると考えられる。25℃における logK とエンタルピーにより各温度における logK が計

算されている場合には、変換先の温度 25℃と 60℃の logK より算出した 25℃のエンタル

ピーを変換元の値と比較した。比較の結果、解析的温度補正式の係数の場合と同様に

phgwb10 の入出力制限により桁数の長いデータに対して若干の違いが見られるが、計算

に影響を与えるものではなく、変換は正しく行われていると考えられる。

2) 固/気相データ変換について

PHREEQE TDB から GWB TDB への変換においては、解析的温度補正式の係数または

JNC TN8400 2002-024
Page 13: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 7 -

25℃の logK とエンタルピーから求められる各温度における logK が変換される。解析的

温度補正式の係数により logK が計算できかつ、25℃の logK とエンタルピーからも logK

が計算できる場合は、解析的温度補正式の係数より求まる logK が優先的に変換される。

解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換元に

格納されていない場合は、25℃における logK のみが変換される。

解析的温度補正式の係数および 25℃におけるエンタルピーのどちらのデータも変換元

に格納されていないデータに対しては、25℃における logKは全て正しく変換されている。

変換先において logK が解析的温度補正式の係数により計算されているものについては、

変換元の解析的温度補正式の係数を使った計算結果と変換先の25℃の logKの比較を行っ

た。比較の結果、phgwb10 の入出力制限により桁数の長いデータに対して若干の違いが

見られるが、計算に影響を与えるものではなく、変換は正しく行われていると考えられる。

25℃における logK とエンタルピーにより各温度における logK が計算されている場合に

は、変換先の温度 25℃と 60℃の logK より算出した 25℃のエンタルピーを変換元の値と

比較した。比較の結果、解析的温度補正式の係数の場合と同様に phgwb10 の入出力制限

により桁数の長いデータに対して若干の違いが見られるが、計算に影響を与えるものでは

なく、変換は正しく行われていると考えられる。

(4) 変換結果比較についてのまとめ

PHREEQE から PHREEQC フォーマットへ変換を行う pqpcn14_5 においては、設計上

のバグのため、準親溶存化学種データを含む溶存化学種データに対するΔrH○の変換は正し

く行われず、また、全ての溶存化学種, 固相及び気相についてもエンタルピーの単位変換が

正しく行われない。また、PHREEQE から EQ3/6 フォーマットへの変換を行う green.exe

では 10 の 4 乗オーダー以上のデータの変換ができない。これらの不具合点を除き

pqpcn14_5, green.exeおよびphgwb10においてデータベースフォーマットの変換が正しく

行われていることが確認できた。

JNC TN8400 2002-024
Page 14: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 8 -

4. 今後の課題

データベースフォーマット変換プログラムについての今後の課題を以下に示す。

- データベースフォーマット変換プログラムの操作性について

変換プログラムを用いた TDB の変換作業は、変換のための前処理や変換プログラム実

行時のユーザの操作が必要であり、一般に公開できるほど操作レベルは高くはない。マニ

ュアルなどの整備によりある程度の作業性の向上は図れると考えられるが、できるだけ自

動処理が行えるよう改良を行う必要がある。

- PHREEQE コードから PHREEQC コードへの変換

PHREEQE コードフォーマットから PHREEQC のコードフォーマットへの TDB 変換

は pqpcn14_5 により行った。この変換プログラムでは、酸化還元電位が親溶存化学種と

は異なる準親溶存化学種により構成される溶存化学種に対する変換において、エンタルピ

ーのデータを変換元(PHREEQE code format)から変換先(PHREEQC code format)へ変

換することができない。また、全ての溶存化学種, 固相及び気相についても PHREEQC

でのデフォルトフォーマットでは単位が KJ/mol であるのに対し、pqpcn14_5 での変換後

では kcal/mol で表記され、単位換算が正しく行われない。エンタルピーは Van’t Hoff の

式による平衡定数の温度補正に用いられるため、エンタルピーによる温度補正が必要な計

算に用いるデータベースの変換を pqpcn14_5 で行うことができず、今後エンタルピーも

取り扱うことができるように改良が必要である。

- PHREEQE コードフォーマット以外のコードフォーマットからの変換

今回報告したデータベースフォーマット変換プログラムはすべて PHREEQE コードフ

ォーマットからの変換を行うものである。これは、TDB 開発環境が世界的に見て

PHREEQE コードフォーマットが主流であったからである。しかし、利用頻度の高い地

球化学計算コードは、1980 年に開発された PHREEQE コードから最近開発され計算機能

が強化された熱力学計算コード(たとえば PHREEQC ver. 2.6 や EQ3/6 ver.7.2c)に移

行しており、今度これらの計算コードのフォーマットで熱力学データベースが開発されて

ゆくと考えられる。したがって、PHREEQC コードや EQ3/6 コードフォーマットからの

データ変換プログラムの開発も必要である。

JNC TN8400 2002-024
Page 15: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 9 -

5. おわりに

熱力学データベースのフォーマット変換を行うプログラムの作成を行った。フォーマット

変換は PHREEQEから PHREEQC, EQ3/6 及び GWB フォーマットに対して行うものであ

る。これらの変換プログラムについて、品質の確認を行った。品質確認の結果、PHREEQE

から PHREEQC にフォーマット変換する pqpcn14_5 においては、設計上のバグのため、

準親溶存化学種データを含む溶存化学種データに対するΔrH○の変換は正しく行われず、ま

た、全ての溶存化学種, 固相及び気相についてもエンタルピーの単位変換が正しく行われな

かったが、エンタルピーの情報以外は正しく変換されていることが確認された。PHREEQE

からEQ3/6の変換を行う green.exeでは 10の 4乗オーダー以上のデータの変換ができな点

を除き変換が正しく行われていることが確認された。PHREEQE から GWB への変換を行

う phgwb10 においては、変換が正しく行われていることが確認できた。

変換プログラムについては、今後不具箇所の修正を行うと共に操作性を向上させる改良が

必要であると考えられる。

JNC TN8400 2002-024
Page 16: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 10 -

6. 参考文献

Parkhurst, D. L., Thorstnsen, D. C. and Plummer, L. H. : “PHREEQE – A Computer

Program for Geochemical Calculations,” U.S. Geological Survey, Water –

Resources Investigations 80-96 (1980)

Parkhurst, D. L. : “PHREEQC - User's Guide to PHREEQC - A Computer Program

for Speciation, Reaction - Path, Advective - Transport, and Inverse

Geochemical Calculations,” U.S. Geological Survey, Water - Resources

Investigations Report 95-4227 (1995)

Bethke C : Geochemical Reaction Modeling, Oxford Univ. Press, New York, 397p

(1996)

Yui, M., Azuma, J. and Shibata, M : “JNC Thermodynamic Database for

Performance Assessment of High - level Radioactive Waste Disposal

System,” JNC Technical Report, JNC TN8400 99-070 (1999)

Wolery, T. J. : “EQ3/6, A Software Package for Geochemical Modeling of Aqueous

Systems : Package Overview and Installation Guide (versin 7.0),” Lawrence

Livermore National Laboratory, UCRL-MA-110662PT1 (1992)

Truesdell, A.H., and Jones, B.F. : “WATEQ, A Computer Program for Calculation

Chemical Equilibrist of Natural Waters.” U.S.Geol.Survey J. Research

2:233-48 (1974)

JNC TN8400 2002-024
Page 17: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 11 -

Table 1. 計算コード

コード名 概要 格納データ Reference

PHREEQE 1980 年に U.S.G.S.により開発された地

球化学計算コード。溶存化学種分配計算

や溶解度計算を取り扱うことができる。

25℃における平衡定数(K), エンタルピー

(ΔrH○), analytical expression (A1 - A5,

Parkhurst et al., 1980), イオンサイズパ

ラメータ (ao)および WATEQ Debye –

Hückel parameter (b, Truesdell and

Jones, 1974)

Parkhurst et

al. (1980)

PHREEQC U.S.G.S.により開発された地球化学平

衡計算コード。PHREEQE の計算機能

を強化しており PHREEQE の計算機能

に加えて、イオン交換反応, 表面錯体反

応 , 簡易的な速度論モデルおよび

reaction path 等を扱うことができる。

25℃における平衡定数(K), エンタルピー

(ΔHr○), analytical expression (A1 - A5),

イ オ ン サ イ ズ パ ラ メ ー タ (ao) お よ び

WATEQ Debye - Hückel parameter (b)

Parkhurst

(1995)

EQ3/6 LLNL により開発された地球化学計算

コードで溶存化学種分配計算や溶解度

計算に加え簡易的な速度論モデルや

reaction path 等を扱うことができる。

各温度における平衡定数(K)およびイオ

ンサイズパラメータ(ao)

Wolery (1992)

GWB Illinois 大学で開発された地球化学計算

コード。pH, Eh, activity および温度等

を軸とした安定相図や reaction path な

どを扱うことができる。

各温度における平衡定数(K)およびイオン

サイズパラメータ(ao)

Bethke

(1996)

Table 2. データベースフォーマット変換ツール

変換形式 変換ツール名 動作環境

PHREEQE→PHREEQC pqpcn14_5 Windows 95/98/2000

PHREEQE→EQ3/6 green.exe Windows 95/98/2000

PHREEQE→GWB phgwb10 Unix

JNC TN8400 2002-024
Page 18: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

Table 3. 変換前と変換後の化学種データ比較

Species Name CodelogK25℃

logKanalytic

ai0 ai bi A1 A2 A3 A4 A5ΔHr25℃

ΔHrcalc.

PE 1 9PC 1 9EQ 1 9GW 1 9PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1 6 5 0.165PC 1 5 0.165EQ 1 6GW 1 6PE 1 8 5.5 0.2PC 1 5.5 0.2EQ 1 8GW 1 8PE 1 4 4 0.075PC 1 4 0.075EQ 1 4GW 1 4PE 1 3 3.5 0.015PC 1 3.5 0.015EQ 1 3GW 1 3PE 1 6PC 1 6EQ 1 6GW 1 6PE 1 6PC 1 6EQ 1 6GW 1 6PE 1 9PC 1 9EQ 1 9GW 1 9PE 1 5PC 1 5EQ 1 5GW 1 5PE 1 5 5.26 0.121PC 1 5.26 0.121EQ 1 5GW 1 5PE 1PC 1EQ 1GW 1PE 1 3 3.5 0.015PC 1 3.5 0.015EQ 1 3GW 1 3PE 1 4.5 5.4 0PC 1 5.4EQ 1 4.5GW 1 4.5PE 1 4 5 -0.04PC 1 5 -0.04EQ 1 4GW 1 4PE 1 3 0 0PC 1 3EQ 1 3GW 1 3PE 1PC 1EQ 1GW 1PE 1 4PC 1 4EQ 1 4GW 1 4PE 1 3.5PC 1 3.5EQ 1 3.5GW 1 3.5PE 1 6PC 1 6EQ 1 6GW 1 6PE 1 3PC 1 3EQ 1 3GW 1 3PE 1

Li+

Br-

NO3-

B(OH)3(aq)

PO4---

F-

H4SiO4(aq)

Cl-

CO3--

SO4--

Mn++

Al+++

Ba++

SR++

Mg++

Na+

K+

Fe++

H+

e-

H2O(l)

Ca++

JNC TN8400 2002-024
情報共用11
- 12 -
Page 19: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1

Po++++

Pd++

Nd+++

Sb(OH)3(aq)

Bi+++ = Bi+++

Th++++

Pa++++

Np++++

Nb(OH)5(aq)

Sn(OH)4(aq)

Sm+++

Pb++

Ra++

Cs+

NI++

SeO4--

Zr(OH)4(aq)

U++++

Co++

Am+++

Pu++++

I-

TcO++

情報共用11
- 13 -
JNC TN8400 2002-024
Page 20: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE 1PC 1EQ 1GW 1PE -3.15PC -3.15EQ -3.15GW -3.15PE -14 3.5PC -14 3.5EQ -14 3.5GW -14 3.5PE -86.08PC -86.08EQ -86.08GW -86.08PE -12.598PC -12.598EQ -12.598GW -12.598PE -11.794PC -11.794EQ -11.794GW -11.794PE -9.5PC -9.5EQ -9.5GW -9.5PE -20.57PC -20.57EQ -20.57GW -20.57PE -31PC -31EQ -31GW -31PE -13.032 9PC -13.032 9EQ -13.032 9GW -13.032 9PE -15.22PC -15.22EQ -15.22GW -15.22PE -18.7PC -18.7EQ -18.7GW -18.7PE -26.63PC -26.63EQ -26.63GW -26.63PE -34.63PC -34.63EQ -34.63GW -34.63PE -29.01PC -29.01EQ -29.01GW -29.01PE -45.4PC -45.4EQ -45.4GW -45.4PE -10.59PC -10.59EQ -10.59GW -10.59PE -34.8PC -34.8EQ -34.8GW -34.8PE -25.507PC -25.507EQ -25.507GW -25.507PE -118.44PC -118.44EQ -118.44GW -118.44PE -127.824 3.5

Mn(OH)+

Mn(OH)3-

Mn+++

MnO4--

Fe(OH)3(aq)

Fe(OH)4-

Fe2(OH)2++++

Fe3(OH)4+++++

Fe(OH)3-

Fe+++

FeOH++

Fe(OH)2+

CaOH+

MGOH+

FeOH+

Fe(OH)2(aq)

Ag++

H2(aq)

OH-

O2(aq)

Ac+++

Cm+++

Tl+

情報共用11
- 14 -
JNC TN8400 2002-024
Page 21: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -127.824 3.5EQ -127.824 3.5GW -127.824 3.5PE -4.99PC -4.99EQ -4.99GW -4.99PE -10.1PC -10.1EQ -10.1GW -10.1PE -16PC -16EQ -16GW -16PE -23PC -23EQ -23GW -23PE -13.358PC -13.358EQ -13.358GW -13.358PE -13.178 5PC -13.178 5EQ -13.178 5GW -13.178 5PE -28.5PC -28.5EQ -28.5GW -28.5PE -23.141PC -23.141EQ -23.141GW -23.141PE -9.81PC -9.81EQ -9.81GW -9.81PE -19PC -19EQ -19GW -19PE -8.1PC -8.1EQ -8.1GW -8.1PE -28.601PC -28.601EQ -28.601GW -28.601PE -27.501PC -27.501EQ -27.501GW -27.501PE -36.301PC -36.301EQ -36.301GW -36.301PE -25.5PC -25.5EQ -25.5GW -25.5PE -34.901PC -34.901EQ -34.901GW -34.901PE -57.935PC -57.935EQ -57.935GW -57.935PE -107.877PC -107.877EQ -107.877GW -107.877PE -146.242PC -146.242EQ -146.242GW -146.242PE -187.791PC -187.791EQ -187.791GW -187.791PE -50.515PC -50.515EQ -50.515GW -50.515PE -105.916PC -105.916EQ -105.916GW -105.916PE -11.55

ClO4-

HClO(aq)

HClO2(aq)

Si4O3(OH)13---

ClO-

ClO2-

ClO3-

Si3O6(OH)3---

Si3O5(OH)5---

Si4O8(OH)4----

Si4O7(OH)5---

SiO2(OH)2--

SiO2(OH)3-

Si2O3(OH)4--

Si2O2(OH)5-

Al(OH)4-

BaOH+

SrOH+

Sr(OH)2(aq)

MnO4-

Al(OH)++

All(OH)2+

Al(OH)3(aq)

情報共用11
- 15 -
JNC TN8400 2002-024
Page 22: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -11.55EQ -11.55GW -11.55PE -10.9PC -10.9EQ -10.9GW -10.9PE -11.9PC -11.9EQ -11.9GW -11.9PE 0.607PC 0.607EQ 0.607GW 0.607PE 0.041PC 0.041EQ 0.041GW 0.041PE -0.305PC -0.305EQ -0.305GW -0.305PE -0.2PC -0.2EQ -0.2GW -0.2PE 0PC 0EQ 0GW 0PE 10.327 10.3288 4.5 5.4 0 107.8871 0.03252849 -5151.79 -38.92561 563713.9PC 10.327 5.4 0 107.8900 0.0325280 -5151.80 -38.92600 563710.0EQ 10.327 10.3289 4.5 107.8870 0.03252850 ー5151.79 ー38.9256 563714.0GW 10.3289 4.5PE 16.681PC 16.681EQ 16.681GW 16.681PE 41.071PC 41.071EQ 41.071GW 41.071PE 3.225 3.2254 -1228.732 -0.29944 35512.75 485.818 0PC 3.225 -1228.700 -0.29944 35513.00 485.820 0EQ 3.225 3.2253 -1228.730 -0.29944 35512.80 485.818 0GW 3.2252PE 11.435 11.4346 0 5.4 0 1317.0071 0.34546894 -39916.84 -517.70761 563713.9PC 11.435 5.4 0 1317.0000 0.34547000 -39917.00 -517.71000 563710.0EQ 11.435 11.4347 5.4 1317.0100 0.34546900 -39916.80 -517.70800 563714.0GW 11.4347PE 2.981 2.9812 -32.172 0 1093.486 12.72433 0PC 2.981 -32.172 0 1093.500 12.72400 0EQ 2.981 2.9811 -32.172 0 1093.490 12.72430 0GW 2.9811PE 11.397 11.3970 48.6721 0.03252849 -2614.335 -18.00263 563713.9PC 11.397 48.6720 0.03252800 -2614.300 -18.00300 563710.0EQ 11.397 11.3971 48.6721 0.03252850 -2614.340 -18.00260 563714.0GW 11.3971PE 1.268PC 1.268EQ 1.268GW 1.268PE 10.08PC 10.08EQ 10.08GW 10.08PE 11.6PC 11.6EQ 11.6GW 11.6PE 11.513 11.5133 5.4 104.6389 0.04739549 -5151.79 -38.92561 563713.9PC 11.513 5.4 0 104.6400 0.04739500 -5151.80 -38.92600 563710.0EQ 11.513 11.5133 5.4 104.6390 0.04739550 -5151.79 -38.92560 563714.0GW 11.5132 5.4PE 2.805 2.8052 -1.019 0.012826 0 0 0PC 2.805 -1.0 0.012826 0 0 0EQ 2.805 2.8051 1.0 -0.012826 0 0 0GW 2.8051PE 14.692 5PC 14.693 5EQ 14.692 5GW 14.692 5PE -3.397PC -3.397EQ -3.397GW -3.397PE 38.015PC 38.015EQ 38.015GW 38.015PE 33.693 3.5

SO3--

S2O3--

MnHCO3+

SrHCO3+

SrCO3(aq)

S--

MgCO3(aq)

MgHCO3+

NaCO3-

NaHCO3(aq)

CO2(aq)

CH4

CaCO3(aq)

CaHCO3+

MnCl3-

SrCl+

SrCl2

HCO3-

FeCl2+

FeCl3(aq)

MnCl+

MnCl2

FeCl++

情報共用11
- 16 -
JNC TN8400 2002-024
Page 23: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 33.693 3.5EQ 33.693 3.5GW 33.693 3.5PE 40.681PC 40.681EQ 40.681GW 40.681PE 3.823PC 3.823EQ 3.823GW 3.823PE 39.605PC 39.605EQ 39.605GW 39.605PE 5.663PC 5.6625EQ 5.663GW 5.663PE 1.982 1.9871 -5.3505 0.0183412 557.2461 0 0PC 1.982 -5.3505 0.0183410 557.2500 0 0EQ 1.982 1.9869 -5.3505 0.0183412 557.2460 0 0GW 1.9869PE 2.309PC 2.309EQ 2.309GW 2.309PE 2.25PC 2.25EQ 2.25GW 2.25PE 0.7PC 0.7EQ 0.7GW 0.7PE 0.85PC 0.85EQ 0.85GW 0.85PE 2.25PC 2.25EQ 2.25GW 2.25PE 76.25PC 76.25EQ 76.25GW 76.25PE 111.937PC 111.937EQ 111.937GW 111.937PE -9.11PC -9.11EQ -9.11GW -9.11PE -7.61PC -7.61EQ -7.61GW -7.61PE 2.26PC 2.26EQ 2.26GW 2.26PE 3.02PC 3.02EQ 3.02GW 3.02PE 4.92PC 4.92EQ 4.92GW 4.92PE 2.55PC 2.55EQ 2.55GW 2.55PE 109.901PC 109.901EQ 109.901GW 109.901PE 119.138 2.5PC 119.138 2.5EQ 119.138 2.5GW 119.138 2.5PE 28.57 3PC 28.57 3EQ 28.57 3GW 28.57 3PE 207.08PC 207.08EQ 207.08GW 207.08PE 120.19

N2(aq)

SrSO4(aq)

NH3(aq)

NH4+

NO2-

Fe(SO4)2-

MnSO4(aq)

AlSO4+

Al(SO4)2-

FeSO4(aq)

Fe(HS)2(aq)

Fe(HS)3-

FeSO4+

CaSO4(aq)

MgSO4(aq)

NaSO4-

KSO4-

HSO3-

HS2O3-

H2SO3(aq)

HSO4-

HS-

H2S(aq)

情報共用11
- 17 -
JNC TN8400 2002-024
Page 24: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 120.19EQ 120.19GW 120.19PE 0.6PC 0.6EQ 0.6GW 0.6PE 0.8PC 0.8EQ 0.8GW 0.8PE -9.24PC -9.24EQ -9.24GW -9.24PE 21.315PC 21.315EQ 21.315GW 21.315PE 12.35 4PC 12.35 4EQ 12.35 4GW 12.35 4PE 19.563 4.5PC 19.563 4.5EQ 19.563 4.5GW 19.563 4.5PE 21.703PC 21.703EQ 21.703GW 21.703PE 30.715PC 30.715EQ 30.715GW 30.715PE 37.365PC 37.365EQ 37.365GW 37.365PE 39.615PC 39.615EQ 39.615GW 39.615PE 40.615PC 40.615EQ 40.615GW 40.615PE 6.459PC 6.459EQ 6.459GW 6.459PE 15.085PC 15.085EQ 15.085GW 15.085PE 20.961PC 20.961EQ 20.961GW 20.961PE 6.589PC 6.589EQ 6.589GW 6.589PE 15.216PC 15.216EQ 15.216GW 15.216PE 21.066PC 21.066EQ 21.066GW 21.066PE 12.636PC 12.636EQ 12.636GW 12.636PE 12.636PC 12.636EQ 12.636GW 12.636PE 15.946PC 15.946EQ 15.946GW 15.946PE 22.253PC 22.253EQ 22.253GW 22.253PE 4.74PC 4.74EQ 4.74GW 4.74PE 11.95

KHPO4-

FeHPO4(aq)

FeH2PO4+

FeHPO4+

MgPO4-

MgHPO4(aq)

MgH2PO4+

NaHPO4-

H4P2O7(aq)

CaPO4-

CaHPO4(aq)

CaH2PO4+

H3PO4(aq)

HP2O7---

H2P2O7--

H3P2O7-

H2BO3-

P2O7----

HPO4--

H2PO4-

NH4SO4-

Mn(NO3)2(aq)

SrNO3+

情報共用11
- 18 -
JNC TN8400 2002-024
Page 25: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 11.95EQ 11.95GW 11.95PE 4.2PC 4.2EQ 4.2GW 4.2PE 3.18PC 3.18EQ 3.18GW 3.18PE 3.62PC 3.62EQ 3.62GW 3.62PE -0.4PC -0.4EQ -0.4GW -0.4PE 7.628PC 7.628EQ 7.628GW 7.628PE 13.666PC 13.666EQ 13.666GW 13.666PE 20.274PC 20.274EQ 20.274GW 20.274PE 0.94PC 0.94EQ 0.94GW 0.94PE 1.82PC 1.82EQ 1.82GW 1.82PE -6.8PC -6.8EQ -6.8GW -6.8PE -2.2PC -2.2EQ -2.2GW -2.2PE 0.97PC 0.97EQ 0.97GW 0.97PE 0.85PC 0.85EQ 0.85GW 0.85PE 7.01PC 7.01EQ 7.01GW 7.01PE 12.75PC 12.75EQ 12.75GW 12.75PE 17.02PC 17.02EQ 17.02GW 17.02PE 19.72PC 19.72EQ 19.72GW 19.72PE 30.18PC 30.18EQ 30.18GW 30.18PE 0.64PC 0.64EQ 0.64GW 0.64PE -37.247PC -37.247EQ -37.247GW -37.247PE 0PC 0EQ 0GW 0PE -54.109PC -54.109EQ -54.109GW -54.109PE -146.173

Br2(aq)

Br2(l)

BrO-

AlF3(aq)

AlF4-

SiF6--

LiSO4-

FeF3(aq)

MnF+

AlF++

AlF2+

CaF+

MgF+

FeF++

FeF2+

BF(OH)3-

BF2(OH)2-

BF3OH-

BF4-

FeH2PO4++

SrPO4-

HF(aq)

HF2-

情報共用11
- 19 -
JNC TN8400 2002-024
Page 26: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -146.173EQ -146.173GW -146.173PE -45.487PC -45.487EQ -45.487GW -45.487PE -111.566PC -111.566EQ -111.566GW -111.566PE -110.778PC -110.778EQ -110.778GW -110.778PE -18.3PC -18.3EQ -18.3GW -18.3PE -0.051PC -0.051EQ -0.051GW -0.051PE -44PC -44EQ -44GW -44PE -165PC -165EQ -165GW -165PE -45.3PC -45.3EQ -45.3GW -45.3PE -33.3PC -33.3EQ -33.3GW -33.3PE -32.1PC -32.1EQ -32.1GW -32.1PE -19.4PC -19.4EQ -19.4GW -19.4PE -20.8PC -20.8EQ -20.8GW -20.8PE -29PC -29EQ -29GW -29PE -26.9PC -26.9EQ -26.9GW -26.9PE -18.18PC -18.18EQ -18.18GW -18.18PE -19PC -19EQ -19GW -19PE -30PC -30EQ -30GW -30PE -9.9PC -9.9EQ -9.9GW -9.9PE -10.7PC -10.7EQ -10.7GW -10.7PE -27.7PC -27.7EQ -27.7GW -27.7PE 2.3PC 2.3EQ 2.3GW 2.3PE 4PC 4EQ 4GW 4PE 66.3

NiSO4(aq)

NiCO3(aq)

Ni(OH)3-

NiOH+

Ni2(OH)+++

Ni4(OH)4++++

ICl-

ICl2-

I2(aq)

Ni(OH)2(aq)

HIO(aq)

H2OI-

I2OH-

I2Cl-

HI(aq)

IO-

IO4-

I2O--

HBrO(aq)

IO3-

HIO3(aq)

I3-

BrO3-

情報共用11
- 20 -
JNC TN8400 2002-024
Page 27: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 66.3EQ 66.3GW 66.3PE 81.2PC 81.2EQ 81.2GW 81.2PE 85.1PC 85.1EQ 85.1GW 85.1PE 27.578PC 27.578EQ 27.578GW 27.578PE 35.978PC 35.978EQ 35.978GW 35.978PE 38.783PC 38.783EQ 38.783GW 38.783PE 1.9PC 1.9EQ 1.9GW 1.9PE -10PC -10EQ -10GW -10PE -6.6PC -6.6EQ -6.6GW -6.6PE -1.5PC -1.5EQ -1.5GW -1.5PE -4PC -4EQ -4GW -4PE -14.9PC -14.9EQ -14.9GW -14.9PE 15.25PC 15.25EQ 15.25GW 15.25PE 6.95PC 6.95EQ 6.95GW 6.95PE -44.229PC -44.229EQ -44.229GW -44.229PE -33.429PC -33.429EQ -33.429GW -33.429PE 5.1PC 5.1EQ 5.1GW 5.1PE 8.3PC 8.3EQ 8.3GW 8.3PE 10.9PC 10.9EQ 10.9GW 10.9PE 11.7PC 11.7EQ 11.7GW 11.7PE 2.5PC 2.5EQ 2.5GW 2.5PE -7PC -7EQ -7GW -7PE 119.501PC 119.501EQ 119.501GW 119.501PE 238.302

Pd(NH3)++

PdCl3-

PdCl4--

PdCl3OH--

PdCl2(OH)2--

TcO4--

TcO4-

PdCl+

PdCl2(aq)

TcO(OH)2(aq)

TcO(OH)3-

TcCO3(OH)2(AQ)

TcCO3(OH)3-

HSeO4-

Zr(OH)5-

Nb(OH)6-

TcO(OH)+

H2Se(aq)

SeO3--

HSeO3-

H2SeO3(aq)

Se--

HSe-

情報共用11
- 21 -
JNC TN8400 2002-024
Page 28: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 238.302EQ 238.302GW 238.302PE 355.703PC 355.703EQ 355.703GW 355.703PE 472.404PC 472.404EQ 472.404GW 472.404PE 1.65PC 1.65EQ 1.65GW 1.65PE -2.31PC -2.31EQ -2.31GW -2.31PE -12.14PC -12.14EQ -12.14GW -12.14PE 9.69PC 9.69EQ 9.69GW 9.69PE 7.05PC 7.05EQ 7.05GW 7.05PE 7.71PC 7.71EQ 7.71GW 7.71PE 7.49PC 7.49EQ 7.49GW 7.49PE 3.13PC 3.13EQ 3.13GW 3.13PE 9.86PC 9.86EQ 9.86GW 9.86PE 13.14PC 13.14EQ 13.14GW 13.14PE 15.01PC 15.01EQ 15.01GW 15.01PE 6.65PC 6.65EQ 6.65GW 6.65PE 7.14PC 7.14EQ 7.14GW 7.14PE 6.77PC 6.77EQ 6.77GW 6.77PE 5.7PC 5.7EQ 5.7GW 5.7PE 8.31PC 8.31EQ 8.31GW 8.31PE 8.23PC 8.23EQ 8.23GW 8.23PE 5.4PC 5.4EQ 5.4GW 5.4 6PE -7.97PC -7.97EQ -7.97GW -7.97PE -18.4PC -18.4EQ -18.4GW -18.4PE 0.4

Sn(SO4)2--

Sn++

Sn(OH)5-

Sn(OH)6--

Sn(NO3)2(aq)

Sn(NO3)3-

Sn(NO3)4--

Sn(SO4)(aq)

SnF+

SnF2(aq)

SnF3-

SnNO3+

SnCl+

SnCl2(aq)

SnCl3-

SnOHCl(aq)

SnOH+

Sn(OH)2(aq)

Sn(OH)3-

Sn3(OH)4++

Pd(NH3)2++

Pd(NH3)3++

Pd(NH3)4++

情報共用11
- 22 -
JNC TN8400 2002-024
Page 29: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 0.4EQ 0.4GW 0.4PE -0.73PC -0.73EQ -0.73GW -0.73PE 0.83PC 0.83EQ 0.83GW 0.83PE 1.3PC 1.3EQ 1.3GW 1.3PE -11.93PC -11.93EQ -11.93GW -11.93PE 177.302PC 177.302EQ 177.302GW 177.302PE 186.952PC 186.952EQ 186.952GW 186.952PE 191.772PC 191.772EQ 191.772GW 191.772PE 0.08PC 0.08EQ 0.08GW 0.08PE 2.78PC 2.78EQ 2.78GW 2.78PE 3.27PC 3.27EQ 3.27GW 3.27PE 6.48PC 6.48EQ 6.48GW 6.48PE 12.65PC 12.65EQ 12.65GW 12.65PE 18.36PC 18.36EQ 18.36GW 18.36PE -21.84PC -21.84EQ -21.84GW -21.84PE -24.56PC -24.56EQ -24.56GW -24.56PE -241.74PC -241.74EQ -241.74GW -241.74PE -245.36PC -245.36EQ -245.36GW -245.36PE -250.19PC -250.19EQ -250.19GW -250.19PE -256.01PC -256.01EQ -256.01GW -256.01PE -6.4PC -6.4EQ -6.4GW -6.4PE -14.1PC -14.1EQ -14.1GW -14.1PE -28.6PC -28.6EQ -28.6GW -28.6PE 7.6

SmOH++

Sm(OH)2+

Sm(OH)3

Sb12(OH)64----

Sb12(OH)65-----

Sb12(OH)66------

Sb12(OH)67-------

SbF2+

SbF3

Sb(OH)5(aq)

Sb(OH)6-

Sb2(OH)6(aq)

SbCl++

SbCl2+

SbF++

Sb(OH)4-

Sb2S4--

HSb2S4-

H2Sb2S4(aq)

Sn++++

Sb+++

SbOH++

Sb(OH)2+

情報共用11
- 23 -
JNC TN8400 2002-024
Page 30: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 7.6EQ 7.6GW 7.6PE 12.3PC 12.3EQ 12.3GW 12.3PE 15.2PC 15.2EQ 15.2GW 15.2PE 3.4PC 3.4EQ 3.4GW 3.4PE 5.8PC 5.8EQ 5.8GW 5.8PE 11.2PC 11.2EQ 11.2GW 11.2PE 22.303PC 22.303EQ 22.303GW 22.303PE -7.51PC -7.51EQ -7.51GW -7.51PE -16.95PC -16.95EQ -16.95GW -16.95PE -28.02PC -28.02EQ -28.02GW -28.02PE -7.18PC -7.18EQ -7.18GW -7.18PE -20.63PC -20.63EQ -20.63GW -20.63PE -22.48PC -22.48EQ -22.48GW -22.48PE -30.72PC -30.72EQ -30.72GW -30.72PE -42.68PC -42.68EQ -42.68GW -42.68PE 7.3PC 7.3EQ 7.3GW 7.3PE 10.13PC 10.13EQ 10.13GW 10.13PE 1.06PC 1.06EQ 1.06GW 1.06PE 1.48PC 1.48EQ 1.48GW 1.48PE 0.76PC 0.76EQ 0.76GW 0.76PE 15.45PC 15.45EQ 15.45GW 15.45PE 21.05PC 21.05EQ 21.05GW 21.05PE 2.82PC 2.82EQ 2.82GW 2.82PE 2.37

PbH2PO4+

PbSO4(aq)

PbNO3+

Pb(NO3)2(aq)

Pb(NO3)3-

PbHPO4(aq)

Pb3(OH)5+

Pb6(OH)8++++

PbCO3(aq)

Pb(CO3)2--

Pb(OH)3-

Pb2(OH)+++

Pb4(OH)4++++

Pb3(OH)4++

SmF3(aq)

SmH2PO4++

PbOH+

Pb(OH)2(aq)

Sm(CO3)2-

Sm(CO3)3---

SmF++

SmF2+

SmCO3+

情報共用11
- 24 -
JNC TN8400 2002-024
Page 31: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 2.37EQ 2.37GW 2.37PE 79.726PC 79.726EQ 79.726GW 79.726PE 114.669PC 114.669EQ 114.669GW 114.669PE 1.55PC 1.55EQ 1.55GW 1.55PE 2PC 2EQ 2GW 2PE 2.01PC 2.01EQ 2.01GW 2.01PE 1.35PC 1.35EQ 1.35GW 1.35PE 2.27PC 2.27EQ 2.27GW 2.27PE 3.01PC 3.01EQ 3.01GW 3.01PE 3.55PC 3.55EQ 3.55GW 3.55PE -0.92PC -0.92EQ -0.92GW -0.92PE -2.56PC -2.56EQ -2.56GW -2.56PE -5.31PC -5.31EQ -5.31GW -5.31PE -18.71PC -18.71EQ -18.71GW -18.71PE 1.34PC 1.34EQ 1.34GW 1.34PE -1.36PC -1.36EQ -1.36GW -1.36PE -3.25PC -3.25EQ -3.25GW -3.25PE -4.86PC -4.86EQ -4.86GW -4.86PE -0.8PC -0.8EQ -0.8GW -0.8PE 3.65PC 3.65EQ 3.65GW 3.65PE 5.85PC 5.85EQ 5.85GW 5.85PE 7.62PC 7.62EQ 7.62GW 7.62PE 9.06PC 9.06EQ 9.06GW 9.06PE 8.33

BiCl4-

Bi3(OH)4+++++

BiCl++

BiCl2+

BiCl3(aq)

Bi6(OH)12++++++

Bi9(OH)20+++++++

Bi9(OH)21++++++

Bi9(OH)22+++++

BiOH++

Bi(OH)2+

Bi(OH)3(aq)

Bi(OH)4-

PbCl4--

PbF+

PbF2(aq)

PbFCl(aq)

Pb(HS)3-

PbCl+

PbCl2(aq)

PbCl3-

Pb(SO4)2--

Pb(HS)2(aq)

情報共用11
- 25 -
JNC TN8400 2002-024
Page 32: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 8.33EQ 8.33GW 8.33PE 7.64PC 7.64EQ 7.64GW 7.64PE 1.97PC 1.97EQ 1.97GW 1.97PE 2.95PC 2.95EQ 2.95GW 2.95PE 3.62PC 3.62EQ 3.62GW 3.62PE 3.09PC 3.09EQ 3.09GW 3.09PE 5.16PC 5.16EQ 5.16GW 5.16PE 5.28PC 5.28EQ 5.28GW 5.28PE 6.86PC 6.86EQ 6.86GW 6.86PE 5.75PC 5.75EQ 5.75GW 5.75PE 8.09PC 8.09EQ 8.09GW 8.09PE -13.6PC -13.6EQ -13.6GW -13.6PE 0.022PC 0.022EQ 0.022GW 0.022PE -6.4PC -6.4EQ -6.4GW -6.4PE -14.1PC -14.1EQ -14.1GW -14.1PE -28.6PC -28.6EQ -28.6GW -28.6PE 7.6PC 7.6EQ 7.6GW 7.6PE 12.3PC 12.3EQ 12.3GW 12.3PE 15.2PC 15.2EQ 15.2GW 15.2PE 3.4PC 3.4EQ 3.4GW 3.4PE 5.8PC 5.8EQ 5.8GW 5.8PE 11.2PC 11.2EQ 11.2GW 11.2PE 22.303PC 22.303EQ 22.303GW 22.303PE -3.72

AcF++

AcF2+

AcF3(aq)

AcH2PO4++

Ac(OH)3(aq)

AcCO3+

Ac(CO3)2-

Ac(CO3)3---

RaOH+

RaSO4(aq)

AcOH++

Ac(OH)2+

BiCl(NO3)2(aq)

BiCl2NO3(aq)

BiCl2(NO3)2-

BiCl3NO3-

Bi(NO3)2+

Bi(NO3)3(aq)

Bi(NO3)4-

BiClNO3+

BiCl5--

BiCl6---

BiNO3++

情報共用11
- 26 -
JNC TN8400 2002-024
Page 33: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -3.72EQ -3.72GW -3.72PE 27.1PC 27.1EQ 27.1GW 27.1PE -19.7PC -19.7EQ -19.7GW -19.7PE 12.42PC 12.42EQ 12.42GW 12.42PE 18.89PC 18.89EQ 18.89GW 18.89PE 22.33PC 22.33EQ 22.33GW 22.33PE 24.76PC 24.76EQ 24.76GW 24.76PE 25.56PC 25.56EQ 25.56GW 25.56PE 2.5PC 2.5EQ 2.5GW 2.5PE 0.84PC 0.84EQ 0.84GW 0.84PE -0.02PC -0.02EQ -0.02GW -0.02PE -1.5PC -1.5EQ -1.5GW -1.5PE -3.6PC -3.6EQ -3.6GW -3.6PE 0.85PC 0.85EQ 0.85GW 0.85PE 1.86PC 1.86EQ 1.86GW 1.86PE -9.353PC -9.353EQ -9.353GW -9.353PE -0.5PC -0.5EQ -0.5GW -0.5PE -11.25PC -11.25EQ -11.25GW -11.25PE 9PC 9EQ 9GW 9PE 11.7PC 11.7EQ 11.7GW 11.7PE 9.28PC 9.28EQ 9.28GW 9.28PE 16.23PC 16.23EQ 16.23GW 16.23PE 21.6PC 21.6EQ 21.6GW 21.6PE 25.6

UF+++

UF2++

UF3+

UOH+++

U(OH)4(aq)

USO4++

U(SO4)2(aq)

PaO(OH)3(aq)

PaO(OH)2+

PaOOH++

U+++

Th(NO3)+++

PaOH+++

Pa(OH)2++

Pa(OH)3+

ThF3+

ThF4

ThF5-

ThF6--

Th(OH)3CO3-

Th(CO3)5------

Th(OH)4(aq)

Th(SO4)3--

情報共用11
- 27 -
JNC TN8400 2002-024
Page 34: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC 25.6EQ 25.6GW 25.6PE 27.01PC 27.01EQ 27.01GW 27.01PE 29.08PC 29.08EQ 29.08GW 29.08PE 1.47PC 1.47EQ 1.47GW 1.47PE 2.3PC 2.3EQ 2.3GW 2.3PE 13.33PC 13.33EQ 13.33GW 13.33PE 31.29PC 31.29EQ 31.29GW 31.29PE -7.554PC -7.554EQ -7.554GW -7.554PE -9.038PC -9.038EQ -9.038GW -9.038PE -28.238PC -28.238EQ -28.238GW -28.238PE -42.038PC -42.038EQ -42.038GW -42.038PE -20.776PC -20.776EQ -20.776GW -20.776PE -23.696PC -23.696EQ -23.696GW -23.696PE -39.014PC -39.014EQ -39.014GW -39.014PE -42.664PC -42.664EQ -42.664GW -42.664PE -58.114PC -58.114EQ -58.114GW -58.114PE -58.052PC -58.052EQ -58.052GW -58.052PE -3.948PC -3.948EQ -3.948GW -3.948PE -0.418PC -0.418EQ -0.418GW -0.418PE 1.862PC 1.862EQ 1.862GW 1.862PE 2.662PC 2.662EQ 2.662GW 2.662PE -8.868PC -8.868EQ -8.868GW -8.868PE -10.138PC -10.138EQ -10.138GW -10.138PE -154.78

UO2Cl+

UO2Cl2(aq)

UO2F+

UO2F2(aq)

UO2F3-

UO2F4--

(UO2)3(OH)4++

(UO2)3(OH)5+

(UO2)3(OH)7-

(UO2)4(OH)7+

UO2(OH)3-

UO2(OH)4--

(UO2)2OH+++

(UO2)2(OH)2++

U(OH)2(CO3)2--

U(CO3)5------

UO2+

UO2++

UF5-

UF6-2

U(NO3)+++

U(NO3)2++

UF4(aq)

情報共用11
- 28 -
JNC TN8400 2002-024
Page 35: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -154.78EQ -154.78GW -154.78PE -8.818PC -8.818EQ -8.818GW -8.818PE -154.581PC -154.581EQ -154.581GW -154.581PE -118.604PC -118.604EQ -118.604GW -118.604PE -228.58PC -228.58EQ -228.58GW -228.58PE -5.835PC -5.835EQ -5.835GW -5.835PE 31.777PC 31.777EQ 31.777GW 31.777PE -5.888PC -5.888EQ -5.888GW -5.888PE -4.898PC -4.898EQ -4.898GW -4.898PE -8.738PC -8.738EQ -8.738GW -8.738PE 4.192PC 4.192EQ 4.192GW 4.192PE 10.552PC 10.552EQ 10.552GW 10.552PE 13.785PC 13.785EQ 13.785GW 13.785PE 13.425PC 13.425EQ 13.425GW 13.425PE 35.008PC 35.008EQ 35.008GW 35.008PE 36.018PC 36.018EQ 36.018GW 36.018PE 0.632PC 0.632EQ 0.632GW 0.632PE 7.902PC 7.902EQ 7.902GW 7.902PE 12.562PC 12.562EQ 12.562GW 12.562PE 26.886PC 26.886EQ 26.886GW 26.886PE -18.934PC -18.934EQ -18.934GW -18.934PE -26.462PC -26.462EQ -26.462GW -26.462PE -62.991PC -62.991EQ -62.991GW -62.991PE -14.238 187.033

(UO2)11(CO3)6(OH)12--

UO2(CO3)3----

(UO2)3(CO3)6------

(UO2)2CO3(OH)3-

(UO2)3O(OH)2(HCO3)+

UO2(H2PO4)2(aq)

UO2(H2PO4)(H3PO4)+

UO2CO3(aq)

UO2(CO3)2--

UO2PO4-

UO2HPO4(aq)

UO2H2PO4+

UO2H3PO4++

UO2S2O3(aq)

UO2SO4(aq)

UO2(SO4)2--

UO2NO3+

UO2BrO3+

UO2IO3+

UO2(IO3)2(aq)

UO2SO3(aq)

UO2ClO3+

UO2Br+

情報共用11
- 29 -
JNC TN8400 2002-024
Page 36: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -14.238EQ -14.238 187.033GW -14.238 187.033 187.035PE -19.338PC -19.338EQ -19.338GW -19.338PE 248.221PC 248.221EQ 248.221GW 248.221PE 504.65PC 504.65EQ 504.65GW 504.65PE 760.74PC 760.74EQ 760.74GW 760.74PE 1014.599PC 1014.599EQ 1014.599GW 1014.599PE -0.306PC -0.306EQ -0.306GW -0.306PE 2.49PC 2.49EQ 2.49GW 2.49PE -0.5PC -0.5EQ -0.5GW -0.5PE 9PC 9EQ 9GW 9PE 11.7PC 11.7EQ 11.7GW 11.7PE 33.37PC 33.37EQ 33.37GW 33.37PE 14.746PC 14.746EQ 14.746GW 14.746PE -10.89PC -10.89EQ -10.89GW -10.89PE -22.192PC -22.192EQ -22.192GW -22.192PE -34.544PC -34.544EQ -34.544GW -34.544PE -5.99PC -5.99EQ -5.99GW -5.99PE -10.96PC -10.96EQ -10.96GW -10.96PE -9.79PC -9.79EQ -9.79GW -9.79PE -8.99PC -8.99EQ -8.99GW -8.99PE 4.86PC 4.86EQ 4.86GW 4.86PE 10.173PC 10.173EQ 10.173GW 10.173PE -8.89PC -8.89EQ -8.89GW -8.89PE -31.78

NpO2F(aq)

NpO2HPO4-

NpO2H2PO4(aq)

NpO2SO4-

NpO2(OH)2-

NpO2CO3-

NpO2Cl(aq)

NpO2NO3(aq)

Np(CO3)5------

Np(OH)2(CO3)2--

NpO2+

NpO2OH(aq)

Np+3

NpOH+++

NpSO4++

Np(SO4)2(aq)

UO2(N3)2(aq)

UO2(N3)3-

UO2(N3)4--

(UO2)2(PUO2)(CO3)6------

UO2OH+

UO2(OH)2(aq)

UO2N3+

情報共用11
- 30 -
JNC TN8400 2002-024
Page 37: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -31.78EQ -31.78GW -31.78PE 16.99PC 16.99EQ 16.99GW 16.99PE 10.59PC 10.59EQ 10.59GW 10.59PE 2.89PC 2.89EQ 2.89GW 2.89PE -11.61PC -11.61EQ -11.61GW -11.61PE 24.59PC 24.59EQ 24.59GW 24.59PE 29.29PC 29.29EQ 29.29GW 29.29PE 32.19PC 32.19EQ 32.19GW 32.19PE 20.39PC 20.39EQ 20.39GW 20.39PE 22.79PC 22.79EQ 22.79GW 22.79PE 28.19PC 28.19EQ 28.19GW 28.19PE 39.293PC 39.293EQ 39.293GW 39.293PE -9.15PC -9.15EQ -9.15GW -9.15PE -0.5PC -0.5EQ -0.5GW -0.5PE 9PC 9EQ 9GW 9PE 11.7PC 11.7EQ 11.7GW 11.7PE 16.76PC 16.76EQ 16.76GW 16.76PE 34.18PC 34.18EQ 34.18GW 34.18PE -18.6PC -18.6EQ -18.6GW -18.6PE -29.9PC -29.9EQ -29.9GW -29.9PE -13.7PC -13.7EQ -13.7GW -13.7PE -42.25PC -42.25EQ -42.25GW -42.25PE -17.9PC -17.9EQ -17.9GW -17.9PE -17.5

PuO2CO3-

PuO2(OH)2-

PuO2Cl(aq)

Pu(OH)2(CO3)2--

Pu(CO3)5------

PuO2+

PuO2OH(aq)

Pu(OH)4(aq)

PuOH+++

PuSO4++

Pu(SO4)2(aq)

PuF++

PuF2+

PuF3(aq)

PuH2PO4++

Pu(OH)3(aq)

PuCO3+

Pu(CO3)2-

Pu(CO3)3---

NPO2++

Pu+++

PuOH++

Pu(OH)2+

情報共用11
- 31 -
JNC TN8400 2002-024
Page 38: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -17.5EQ -17.5GW -17.5PE -16.7PC -16.7EQ -16.7GW -16.7PE -2.85PC -2.85EQ -2.85GW -2.85PE 2.463PC 2.463EQ 2.463GW 2.463PE -16.6PC -16.6EQ -16.6GW -16.6PE -34.76PC -34.76EQ -34.76GW -34.76PE -40.03PC -40.03EQ -40.03GW -40.03PE -47.22PC -47.22EQ -47.22GW -47.22PE -59.52PC -59.52EQ -59.52GW -59.52PE -25.2PC -25.2EQ -25.2GW -25.2PE -19.76PC -19.76EQ -19.76GW -19.76PE -17.23PC -17.23EQ -17.23GW -17.23PE -31.61PC -31.61EQ -31.61GW -31.61PE -30.62PC -30.62EQ -30.62GW -30.62PE -15.17PC -15.17EQ -15.17GW -15.17PE -11.937PC -11.937EQ -11.937GW -11.937PE -34.46PC -34.46EQ -34.46GW -34.46PE -30.19PC -30.19EQ -30.19GW -30.19PE -26.52PC -26.52EQ -26.52GW -26.52PE -24.96PC -24.96EQ -24.96GW -24.96PE -34.66PC -34.66EQ -34.66GW -34.66PE -6.4PC -6.4EQ -6.4GW -6.4PE -14.1PC -14.1EQ -14.1GW -14.1PE -28.6

AmOH++

Am(OH)2+

PuO2F+

PuO2F2(aq)

PuO2F3-

PuO2Cl+

PuO2(SO4)2--

PuO2HPO4(aq)

PuO2H2PO4+

PuO2NO3+

PuO2CO3(aq)

PuO2(CO3)2--

PuO2(CO3)3----

PuO2SO4(aq)

PuO2++

PuO2OH+

PUO2(OH)2(aq)

PuO2(OH)3-

PuO2F(aq)

PuO2HPO4-

PuO2H2PO4(aq)

PuO2SO4-

PuO2NO3(aq)

情報共用11
- 32 -
JNC TN8400 2002-024
Page 39: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PC -28.6EQ -28.6GW -28.6PE 7.6PC 7.6EQ 7.6GW 7.6PE 12.3PC 12.3EQ 12.3GW 12.3PE 15.2PC 15.2EQ 15.2GW 15.2PE 3.4PC 3.4EQ 3.4GW 3.4PE 5.8PC 5.8EQ 5.8GW 5.8PE 11.2PC 11.2EQ 11.2GW 11.2PE 22.303PC 22.303EQ 22.303GW 22.303PE -6.4PC -6.4EQ -6.4GW -6.4PE -14.1PC -14.1EQ -14.1GW -14.1PE -28.6PC -28.6EQ -28.6GW -28.6PE 7.6PC 7.6EQ 7.6GW 7.6PE 12.3PC 12.3EQ 12.3GW 12.3PE 15.2PC 15.2EQ 15.2GW 15.2PE 3.4PC 3.4EQ 3.4GW 3.4PE 5.8PC 5.8EQ 5.8GW 5.8PE 11.2PC 11.2EQ 11.2GW 11.2PE 22.303PC 22.303EQ 22.303GW 22.303

CmF++

CmF2+

CmF3(aq)

CmH2PO4++

Cm(OH)3(aq)

CmCO3+

Cm(CO3)2-

Cm(CO3)3---

AmF3(aq)

AmH2PO4++

CmOH++

Cm(OH)2+

Am(CO3)2-

Am(CO3)3---

AmF++

AmF2+

Am(OH)3(aq)

AmCO3+

情報共用11
- 33 -
JNC TN8400 2002-024
Page 40: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

Table 4. 変換前と変換後の固相/気相データ比較Solid/GasName

CodelogK25℃

logKanalytic

A1 A2 A3 A4 A5ΔHr25℃

ΔHrcalc.

PE -8.48 -8.4835 -171.91 -0.077993 2839.3 71.595 0PC -8.48 -171.91 -0.077993 2839.3 71.595 0EQ -8.48 -8.4834 -171.91 -0.077993 2839.3 71.595 0GW -8.4834PE -8.34 -8.3388 -171.98 -0.077993 2903.3 71.595 0PC -8.34 -171.98 -0.07799 2903.3 71.595 0EQ -8.34 -8.3387 -171.98 -0.077993 2903.3 71.595 0GW -8.3387PE -17.09PC -17.09EQ -17.09GW -17.09PE -10.57PC -10.57EQ -10.57GW -10.57PE -9.27 -9.2701 155.03 0 -7239.6 -56.586 0PC -9.27 155.03 0 -7239.6 -56.586 0EQ -9.27 -9.2701 155.03 0 -7239.6 -56.586 0GW -9.2701PE -4.6 -4.6039 82.09 0 -3853.9 -29.812 0PC -4.6 82.09 0 -3853.9 -29.812 0EQ -4.6 -4.6039 82.09 0 -3853.9 -29.812 0GW -4.6039PE -4.38PC -4.38EQ -4.38GW -4.38PE -6.58PC -6.58EQ -6.58GW -6.58PE -9.98PC -9.98EQ -9.98GW -9.98PE -40.47PC -40.47EQ -40.47GW -40.47PE -36PC -36EQ -36GW -36PE -10.96PC -10.96EQ -10.96GW -10.96PE 4.89PC 4.89EQ 4.89GW 4.89PE 8.77PC 8.77EQ 8.77GW 8.77PE -36.92PC -36.92EQ -36.92GW -36.92PE -37.603PC -37.603

FEOH3A

GIBBSITE

KAOLINIT

FES PPT

BARITE

HYDROXAP

VIVIANIT

FLUORITE

STRONTIT

GYPSUM

ANHYDRIT

CELESTIT

CALCITE

ARAGONIT

DOLOMITE

SIDERITE

情報共用11
- 34 -
JNC TN8400 2002-024
Page 41: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -37.603GW -37.603PE 18.09PC 18.09EQ 18.09GW 18.09PE -0.24PC -0.24EQ -0.24GW -0.24PE -2.7PC -2.7EQ -2.7GW -2.7PE -3.02PC -3.02EQ -3.02GW -3.02PE -37.21PC -37.21EQ -37.21GW -37.21PE -38.323PC -38.323EQ -38.323GW -38.323PE 14.6PC 14.6EQ 14.6GW 14.6PE 43.61PC 43.61EQ 43.61GW 43.61PE 45.43PC 45.43EQ 45.43GW 45.43PE 57.7PC 57.7EQ 57.7GW 57.7PE 55.1PC 55.1EQ 55.1GW 55.1PE 41.88PC 41.88EQ 41.88GW 41.88PE 26.7PC 26.7EQ 26.7GW 26.7PE 26.37PC 26.37EQ 26.37GW 26.37PE 32.7PC 32.7EQ 32.7GW 32.7PE 67.15PC 67.15EQ 67.15GW 67.15

ANORTHHE

ANORTHTR

LIME, QU

ILLITEK3

EPIDOTE,

TREMOLIT

ANDRADIT

MONTMOCA

SEP PPT

MACKINIT

MUSCOVIT

CLINOZOI

BIRNESIT

MANGANIT

SIL GEL

SIL GLAS

情報共用11
- 35 -
JNC TN8400 2002-024
Page 42: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 36.33PC 36.33EQ 36.33GW 36.33PE 447.61PC 447.61EQ 447.61GW 447.61PE 23.26PC 23.26EQ 23.26GW 23.26PE 20.6PC 20.6EQ 20.6GW 20.6PE 546.83PC 546.83EQ 546.83GW 546.83PE 32.83PC 32.83EQ 32.83GW 32.83PE 178.37PC 178.37EQ 178.37GW 178.37PE 57.04PC 57.04EQ 57.04GW 57.04PE 42.82PC 42.82EQ 42.82GW 42.82PE 21.58PC 21.58EQ 21.58GW 21.58PE 58.54PC 58.54EQ 58.54GW 58.54PE 18.87PC 18.87EQ 18.87GW 18.87PE 3.54PC 3.54EQ 3.54GW 3.54PE 28.54PC 28.54EQ 28.54GW 28.54PE 57.51PC 57.51EQ 57.51GW 57.51PE 1.61PC 1.61EQ 1.61GW 1.61PE 1.78PC 1.78MICROCLI

ALBITE

ILLITEK2

MONTMOK

ALUNITE

MAGNESIO

PERICLAS

MONTMONA

PARAGONI

CLINOC40

SEPIOLIT

CLINOCH8

MONTMOMG

PHLOGOPI

CLINOC26

MG2SI2O6

TALC

情報共用11
- 36 -
JNC TN8400 2002-024
Page 43: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 1.78GW 1.78PE 0.86PC 0.86EQ 0.86GW 0.86PE 22.33PC 22.33EQ 22.33GW 22.33PE 22.4PC 22.4EQ 22.4GW 22.4PE 10.6PC 10.6EQ 10.6GW 10.6PE 33.41PC 33.41EQ 33.41GW 33.41PE 30.65PC 30.65EQ 30.65GW 30.65PE -321.28PC -321.28EQ -321.28GW -321.28PE 6.82PC 6.82EQ 6.82GW 6.82PE 24.56PC 24.56EQ 24.56GW 24.56PE 11.29PC 11.29EQ 11.29GW 11.29PE -85.95PC -85.95EQ -85.95GW -85.95PE -10.54PC -10.54EQ -10.54GW -10.54PE 41.55PC 41.55EQ 41.55GW 41.55PE -34.11PC -34.11EQ -34.11GW -34.11PE 12.81PC 12.81EQ 12.81GW 12.81PE -3.49PC -3.49EQ -3.49GW -3.49

CHALCEDO

RHODOCHR

PYROLUSI

ALABANDI

TOPAZ, O

LAWRENCI

MOLYSITE

GOETHITE

PYRITE

FE2SI2O6

ALMANDIN

MAGNETIT

PYRRHOTI

ORTHOCLA

ANNITE

HEMATITE

情報共用11
- 37 -
JNC TN8400 2002-024
Page 44: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE -3.78PC -3.78EQ -3.78GW -3.78PE -2.47PC -2.47EQ -2.47GW -2.47PE 8.79PC 8.79EQ 8.79GW 8.79PE 13.44PC 13.44EQ 13.44GW 13.44PE -43.931PC -43.931EQ -43.931GW -43.931PE 7.42PC 7.42EQ 7.42GW 7.42PE 22.59PC 22.59EQ 22.59GW 22.59PE 19.05PC 19.05EQ 19.05GW 19.05PE -27.8PC -27.8EQ -27.8GW -27.8PE -19.31PC -19.31EQ -19.31GW -19.31PE 24.98PC 24.98EQ 24.98GW 24.98PE -6.42PC -6.42EQ -6.42GW -6.42PE -9.25PC -9.25EQ -9.25GW -9.25PE 18.18PC 18.18EQ 18.18GW 18.18PE 0.0832PC 0.0832EQ 0.0832GW 0.0832PE -2.71PC -2.71EQ -2.71GW -2.71PE 35.61PC 35.61

SILI(AM)

H(G)

SRSO4

SRCO3

I2

K-FELDSP

FAYALITE

SR3PO42

SRHPO4

SROH2

COBALTO2

CH4 GAS

FERROSIL

GREENALI

QUARTZ

SILICA H

COBALTO1

情報共用11
- 38 -
JNC TN8400 2002-024
Page 45: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 35.61GW 35.61PE 0PC 0EQ 0GW 0PE 82.15PC 82.15EQ 82.15GW 82.15PE 83.09PC 83.09EQ 83.09GW 83.09PE 1.5PC 1.5EQ 1.5GW 1.5PE 96.85PC 96.85EQ 96.85GW 96.85PE 122.08PC 122.08EQ 122.08GW 122.08PE 32.7PC 32.7EQ 32.7GW 32.7PE 45.89PC 45.89EQ 45.89GW 45.89PE 59.38PC 59.38EQ 59.38GW 59.38PE 49.49PC 49.49EQ 49.49GW 49.49PE 60.09PC 60.09EQ 60.09GW 60.09PE 97.7PC 97.7EQ 97.7GW 97.7PE 48.07PC 48.07EQ 48.07GW 48.07PE 98.79PC 98.79EQ 98.79GW 98.79PE 42.23PC 42.23EQ 42.23GW 42.23PE 62.93PC 62.93EQ 62.93GW 62.93

SRO(CR)

SI(CR)

K(G)

BA(CR)

BAO(CR)

SR(CR)

CAO(CR)

NA(CR)

NA(G)

K(CR)

O2(G)

H2O(G)

CA(CR)

CA(G)

H2(G)

O(G)

情報共用11
- 39 -
JNC TN8400 2002-024
Page 46: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 133.97PC 133.97EQ 133.97GW 133.97PE -4PC -4EQ -4GW -4PE 41.44PC 41.44EQ 41.44GW 41.44PE 45.98PC 45.98EQ 45.98GW 45.98PE 6.29PC 6.29EQ 6.29GW 6.29PE 7.24PC 7.24EQ 7.24GW 7.24PE 2.3PC 2.3EQ 2.3GW 2.3PE -32.15PC -32.15EQ -32.15GW -32.15PE 85.45PC 85.45EQ 85.45GW 85.45PE -14.64PC -14.64EQ -14.64GW -14.64PE -18.15PC -18.15EQ -18.15GW -18.15PE -35.84PC -35.84EQ -35.84GW -35.84PE 5.63PC 5.63EQ 5.63GW 5.63PE -57.71PC -57.71EQ -57.71GW -57.71PE -478.35PC -478.35EQ -478.35GW -478.35PE -41.7PC -41.7EQ -41.7GW -41.7PE -25.42PC -25.42

SO2(G)

H2S(G)

N(G)

CO2(G)

S(CR)

S(G)

S2(G)

BACL2(CR

C(CR)

C(G)

CO(G)

CL(G)

CL2(G)

HCL(G)

SRCL2(CR

SI(G)

SIO2(QUA

情報共用11
- 40 -
JNC TN8400 2002-024
Page 47: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -25.42GW -25.42PE -210.46PC -210.46EQ -210.46GW -210.46PE -108.1PC -108.1EQ -108.1GW -108.1PE 0.4PC 0.4EQ 0.4GW 0.4PE 45.17PC 45.17EQ 45.17GW 45.17PE 136.45PC 136.45EQ 136.45GW 136.45PE 5.75PC 5.75EQ 5.75GW 5.75PE -0.07PC -0.07EQ -0.07GW -0.07PE 13.48PC 13.48EQ 13.48GW 13.48PE 13.48PC 13.48EQ 13.48GW 13.48PE 62.55PC 62.55EQ 62.55GW 62.55PE 45.08PC 45.08EQ 45.08GW 45.08PE 58.19PC 58.19EQ 58.19GW 58.19PE 60.23PC 60.23EQ 60.23GW 60.23PE 98.64PC 98.64EQ 98.64GW 98.64PE 1.07PC 1.07EQ 1.07GW 1.07PE -15.33PC -15.33EQ -15.33GW -15.33

F2(G)

HF(G)

SIF4(G)

P(G)

P2(G)

P4(G)

F(G)

B2O3(CR)

B(OH)3(C

P(AM)

P(CR)

NH3(G)

SR(NO3)2

B(CR)

B(G)

N2(G)

情報共用11
- 41 -
JNC TN8400 2002-024
Page 48: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE -2.98PC -2.98EQ -2.98GW -2.98PE 32.63PC 32.63EQ 32.63GW 32.63PE 36.93PC 36.93EQ 36.93GW 36.93PE 8.85PC 8.85EQ 8.85GW 8.85PE 21.36PC 21.36EQ 21.36GW 21.36PE 18.12PC 18.12EQ 18.12GW 18.12PE 21.51PC 21.51EQ 21.51GW 21.51PE 9.36PC 9.36EQ 9.36GW 9.36PE 12.73PC 12.73EQ 12.73GW 12.73PE -6.97PC -6.97EQ -6.97GW -6.97PE 12.44PC 12.44EQ 12.44GW 12.44PE -42.83PC -42.83EQ -42.83GW -42.83PE -29.59PC -29.59EQ -29.59GW -29.59PE -33.57PC -33.57EQ -33.57GW -33.57PE 18.84PC 18.84EQ 18.84GW 18.84PE 20.24PC 20.24EQ 20.24GW 20.24PE -2.28PC -2.28

NI2P2O7

OLIVINE

SPINEL

NISIO3

NICO3(s)

NIO(cr)

NIS

NI3(PO4)2

I2(CR)

I2(G)

HI(G)

NI(OH)2

BR(G)

BR2(G)

HBR(G)

I(G)

BF3(G)

情報共用11
- 42 -
JNC TN8400 2002-024
Page 49: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -2.28GW -2.28PE -82 0.53PC -82EQ -82 0.53GW -82 0.53PE -88.92PC -88.92EQ -88.92GW -88.92PE -35.82PC -35.82EQ -35.82GW -35.82PE -19.6PC -19.6EQ -19.6GW -19.6PE 19.2PC 19.2EQ 19.2GW 19.2PE -181.1PC -181.1EQ -181.1GW -181.1PE -84.78PC -84.78EQ -84.78GW -84.78PE -8PC -8EQ -8GW -8PE -16PC -16EQ -16GW -16PE 34.219PC 34.219EQ 34.219GW 34.219PE 29.779PC 29.779EQ 29.779GW 29.779PE -22.951PC -22.951EQ -22.951GW -22.951PE -3.9624PC -3.962EQ -3.9624GW -3.9624PE -4.4PC -4.4EQ -4.4GW -4.4PE -86.619PC -86.619EQ -86.619GW -86.619PE 89.396PC 89.396EQ 89.396GW 89.396

TCO2�

TCO216H2

NH4TCO4C

TC(G)

NB2O5

NATCO44W

CSTCO4(C

TC(CR)

SEO3

FESE2

FESE

ZRO2(am)

NI3S2

SE

SEO2

SE2O5

情報共用11
- 43 -
JNC TN8400 2002-024
Page 50: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 83.077PC 83.077EQ 83.077GW 83.077PE 82.153PC 82.153EQ 82.153GW 82.153PE 90.116PC 90.116EQ 90.116GW 90.116PE 80.949PC 80.949EQ 80.949GW 80.949PE 29.257PC 29.257EQ 29.257GW 29.257PE 80.878PC 80.878EQ 80.878GW 80.878PE 28.104PC 28.104EQ 28.104GW 28.104PE 30.153PC 30.153EQ 30.153GW 30.153PE 31.145PC 31.145EQ 31.145GW 31.145PE -32.9PC -32.9EQ -32.9GW -32.9PE -0.77PC -0.77EQ -0.77GW -0.77PE -2.58PC -2.58EQ -2.58GW -2.58PE -2.99PC -2.99EQ -2.99GW -2.99PE -7.82PC -7.82EQ -7.82GW -7.82PE -7.46PC -7.46EQ -7.46GW -7.46PE -8PC -8EQ -8GW -8PE 17PC 17SM(OH)3A

SNO(CR)

SNOHCL(S

SNO2(AM)

SNO2(CAS

KTCO4(CR

PD(CR)

SN(CR)

SNOH2(S)

TCS(G)

TCC(G)

TLTCO4(C

AGTCO4(C

TCO(G)

TC2O7(CR

TC2O7(G)

TC2O7H2O

情報共用11
- 44 -
JNC TN8400 2002-024
Page 51: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 17GW 17PE 15.2PC 15.2EQ 15.2GW 15.2PE -33.4PC -33.4EQ -33.4GW -33.4PE -8.5PC -8.5EQ -8.5GW -8.5PE -21.4PC -21.4EQ -21.4GW -21.4PE -24.79PC -24.79EQ -24.79GW -24.79PE -19.5PC -19.5EQ -19.5GW -19.5PE -11.99PC -11.99EQ -11.99GW -11.99PE -8.72PC -8.72EQ -8.72GW -8.72PE -156.219PC -156.219EQ -156.219GW -156.219PE 36.28PC 36.28EQ 36.28GW 36.28PE 51.06PC 51.06EQ 51.06GW 51.06PE 59.74PC 59.74EQ 59.74GW 59.74PE -0.41PC -0.41EQ -0.41GW -0.41PE 89.89PC 89.89EQ 89.89GW 89.89PE 27.42PC 27.42EQ 27.42GW 27.42PE 0.87PC 0.87EQ 0.87GW 0.87

CS2SO4

CS(G)

CSNO3

CS2O

CSOH

VALENTIN

STIBNITE

SB2O5

CS(CR)

NASMCO32

SMPO4

SMF3(cr)

SB(CR

SM(OH)3C

SM2(CO3)

SMOHCO3

情報共用11
- 45 -
JNC TN8400 2002-024
Page 52: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 10.07PC 10.07EQ 10.07GW 10.07PE 4.25PC 4.25EQ 4.25GW 4.25PE 12.68PC 12.68EQ 12.68GW 12.68PE 12.96PC 12.96EQ 12.96GW 12.96PE 13.05PC 13.05EQ 13.05GW 13.05PE -7.81PC -7.81EQ -7.81GW -7.81PE -4.81PC -4.81EQ -4.81GW -4.81PE 0.62PC 0.62EQ 0.62GW 0.62PE -7.52PC -7.52EQ -7.52GW -7.52PE -8.82PC -8.82EQ -8.82GW -8.82PE -13.23PC -13.23EQ -13.23GW -13.23PE -17.64PC -17.64EQ -17.64GW -17.64PE -41.21PC -41.21EQ -41.21GW -41.21PE 2.94PC 2.94EQ 2.94GW 2.94PE -23.78PC -23.78EQ -23.78GW -23.78PE -48.94PC -48.94EQ -48.94GW -48.94PE -44.4PC -44.4

PB(H2PO4

PB3PO42

PB3(CO3

PB10(CO

PBOHNO3

PBHPO4(S

PBOHCL(S

PBF2(S)

PBFCL(S)

PBCO3(S

PBO(YELL

PB(OH)2

PBSO4(S)

PBCL2(S)

CS2CO3

PB(CR)

PBO(RED)

情報共用11
- 46 -
JNC TN8400 2002-024
Page 53: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -44.4GW -44.4PE -37.09PC -37.09EQ -37.09GW -37.09PE -62.8PC -62.8EQ -62.8GW -62.8PE -84.4PC -84.4EQ -84.4GW -84.4PE -71.6PC -71.6EQ -71.6GW -71.6PE -45.863PC -45.863EQ -45.863GW -45.863PE 48.98PC 48.98EQ 48.98GW 48.98PE 70.98PC 70.98EQ 70.98GW 70.98PE -16.74PC -16.74EQ -16.74GW -16.74PE 0.76PC 0.76EQ 0.76GW 0.76PE -8.47PC -8.47EQ -8.47GW -8.47PE -14.27PC -14.27EQ -14.27GW -14.27PE -8.68PC -8.68EQ -8.68GW -8.68PE -2.75PC -2.75EQ -2.75GW -2.75PE 19.52PC 19.52EQ 19.52GW 19.52PE -10.4PC -10.4EQ -10.4GW -10.4PE -7PC -7EQ -7GW -7

RASO4

RACO3

(BIO)2CO

(BIO)4OH

BIONO3(S

PO(OH)4

PB3O4(S)

BI(CR

BI2O3

BIOCL(S)

PB5PO43C

PB5PO43F

PBS(S)

PBO2(S)

PB4PO42O

PB5PO43O

情報共用11
- 47 -
JNC TN8400 2002-024
Page 54: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 17PC 17EQ 17GW 17PE 15.2PC 15.2EQ 15.2GW 15.2PE -33.4PC -33.4EQ -33.4GW -33.4PE -8.5PC -8.5EQ -8.5GW -8.5PE -21.4PC -21.4EQ -21.4GW -21.4PE -24.79PC -24.79EQ -24.79GW -24.79PE -19.5PC -19.5EQ -19.5GW -19.5PE 10.5PC 10.5EQ 10.5GW 10.5PE 1.8PC 1.8EQ 1.8GW 1.8PE -34.13PC -34.13EQ -34.13GW -34.13PE -29.01PC -29.01EQ -29.01GW -29.01PE -33.99PC -33.99EQ -33.99GW -33.99PE 0.6PC 0.6EQ 0.6GW 0.6PE 24.01PC 24.01EQ 24.01GW 24.01PE -8.72PC -8.72EQ -8.72GW -8.72PE 32.85PC 32.85EQ 32.85GW 32.85PE 2.56PC 2.56

PA2O5

PACL5

UO2(AM)

THF4.H2O

THF4NH4F

PAO2

PACL4

ACF3(cr)

THO2(AM)

THO2(CR)

THF4NAFH

AC2(CO3)

ACOHCO3

NAACCO32

ACPO4

AC(OH)3A

AC(OH)3C

情報共用11
- 48 -
JNC TN8400 2002-024
Page 55: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 2.56GW 2.56PE 17.63 -55.28PC 17.63EQ 17.63 -55.28GW 17.63 -55.28PE 17.3 -54.61PC 17.3EQ 17.3 -54.61GW 17.3 -54.61PE 16.69 -53.78PC 16.69EQ 16.69 -53.78GW 16.69 -53.78PE -23.4 13.78PC -23.4EQ -23.4 13.78GW -23.4 13.78PE 13.85PC 13.85EQ 13.85GW 13.85PE 26.24PC 26.24EQ 26.24GW 26.24PE 224.29PC 224.29EQ 224.29GW 224.29PE 7.449PC 7.449EQ 7.449GW 7.449PE -17.9PC -17.9EQ -17.9GW -17.9PE 13.97PC 13.97EQ 13.97GW 13.97PE -5.43 -148.44PC -5.43EQ -5.43 -148.44GW -5.43 -148.44PE 1.51PC 1.51EQ 1.51GW 1.51PE 16.1PC 16.1EQ 16.1GW 16.1PE -0.11PC -0.11EQ -0.11GW -0.11PE -3.43PC -3.43EQ -3.43GW -3.43PE 92.83PC 92.83EQ 92.83GW 92.83

NANPO2C

NA3NPO2C

U(CR)

UO2(OH)2

UO2CO3(C

NPO2(AM)

NPO2OH(A

UF6(CR)

UO2(IO3)

UO2SO4.2

NA4UO2(C

UO3(BETA

UO3(GAMM

UO3.0.9H

UO3.2H2O

UO3(ALPH

情報共用11
- 49 -
JNC TN8400 2002-024
Page 56: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 178.4 -1124.2PC 178.4EQ 178.4 -1124.2GW 178.4 -1124.2PE 134.7 -907.53PC 134.7EQ 134.7 -907.53GW 134.7 -907.54PE -4.85 -77.86PC -4.85EQ -4.85 -77.86GW -4.85 -77.86PE 91.64 -685.06PC 91.64EQ 91.64 -685.06GW 91.64 -685.07PE -0.99 -106.92PC -0.99EQ -0.99 -106.92GW -0.99 -106.92PE -1 -106.32PC -1EQ -1 -106.32GW -1 -106.32PE 0.46 -116.13PC 0.46EQ 0.46 -116.13GW 0.48 -116.13PE 6.85 -161.82PC 6.85EQ 6.85 -161.82GW 6.83 -161.82PE 79.98 -649.49PC 79.98EQ 79.98 -649.49GW 79.98 -649.50PE 80.12 -464.22PC 80.12EQ 80.12 -464.22GW 80.12 -464.22PE 127.8 -874.55PC 127.8EQ 127.8 -874.55GW 127.8 -874.56PE 95.33 -731.9PC 95.33EQ 95.33 -731.9GW 95.33 -731.9PE -10.18 -95.85PC -10.18EQ -10.18 -95.85GW -10.18 -95.85PE 56.49 -543.05PC 56.49EQ 56.49 -543.05GW 56.49 -543.06PE -29.36 -18.4PC -29.36EQ -29.36 -18.4GW -29.36 -18.4PE 14.44 -331.4PC 14.44EQ 14.44 -331.4GW 14.44PE -5.47 -192.65PC -5.47

UF3(G)

UF4(CR)

UF4(G)

UF5(ALPH

UH3(BETA

UF(G)

UF2(G)

UF3(CR)

UO2.25(C

UO2.3333

UO2.6667

UO3(G)

UO(G)

UO2(CR)

UO2(G)

UO2.25(B

U(G)

情報共用11
- 50 -
JNC TN8400 2002-024
Page 57: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -5.47 -192.65GW -5.47 -192.65PE -5.8 -184.75PC -5.8EQ -5.8 -184.75GW -5.8 -184.75PE 13.75 -357.95PC 13.75EQ 13.75 -357.95GW 13.75 -357.95PE 27.07 -454.7PC 27.07EQ 27.07 -454.7GW 27.07 -454.7PE -38.29 -184.63PC -38.29EQ -38.29 -184.63GW -38.29 -184.63PE 2.45 -514.9PC 2.45EQ 2.45 -514.9GW 2.45 -514.9PE -97.88 -216.09PC -97.88EQ -97.88 -216.09GW -97.88 -216.09PE -18.23 -43.13PC -18.23EQ -18.23 -43.13GW -18.23 -43.13PE 13.46 -293.83PC 13.46EQ 13.46 -293.83GW 13.46 -293.83PE 33.17 -456.43PC 33.17EQ 33.17 -456.43GW 33.17 -456.43PE 1.73 -180.06PC 1.73EQ 1.73 -180.06GW 1.73 -180.06PE 43.63 -481.06PC 43.63EQ 43.63 -481.06GW 43.63 -481.07PE 15.34 -472.79PC 15.34EQ 15.34 -472.79GW 15.34 -472.79PE 24.06 -692.6PC 24.06EQ 24.06 -692.6GW 24.06 -692.6PE -8.98 -71.51PC -8.98EQ -8.98 -71.51GW -8.98 -71.51PE -9.44 -65.03PC -9.44EQ -9.44 -65.03GW -9.44 -65.03PE -18.8 -31.56PC -18.8EQ -18.8 -31.56GW -18.8 -31.56

U3O5F8(C

UOFOH(CR

UOFOH.0.

UOF2.H2O

UOF4(G)

UO2F2(CR

UO2F2(G)

U2O3F6(C

U2F10(G)

U4F17(CR

UOF2(CR)

UOF4(CR)

UF5(BETA

UF5(G)

UF6(G)

U2F9(CR)

情報共用11
- 51 -
JNC TN8400 2002-024
Page 58: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE -33.55 24.3PC -33.55EQ -33.55 24.3GW -33.55 24.3PE 6.7 -175.37PC 6.7EQ 6.7 -175.37GW 6.7 -175.37PE 6.32 -165.69PC 6.32EQ 6.32 -165.69GW 6.32 -165.69PE 1.57 -156.66PC 1.57EQ 1.57 -156.66GW 1.57 -156.66PE 143.34 -946.48PC 143.34EQ 143.34 -946.48GW 143.34 -946.49PE 106.82 -762.36PC 106.82EQ 106.82 -762.36GW 106.82 -762.37PE 22.32 -228.74PC 22.32EQ 22.32 -228.74GW 22.32 -228.74PE 67.95 -555.34PC 67.95EQ 67.95 -555.34GW 67.95 -555.35PE 21.93 -240.72PC 21.93EQ 21.93 -240.72GW 21.93 -240.72PE 46.35 -441.42PC 46.35EQ 46.35 -441.42GW 46.35 -441.42PE 44.82 -387.6PC 44.82EQ 44.82 -387.6GW 44.82 -387.6PE 62.04 -544.1PC 62.04EQ 62.04 -544.1GW 62.04 -544.1PE 66.57 -527.18PC 66.57EQ 66.57 -527.18GW 66.57 -527.19PE 72.46 -606.18PC 72.46EQ 72.46 -606.18GW 72.46 -606.19PE 82.31 -769.44PC 82.31EQ 82.31 -769.44GW 82.31 -769.45PE 97.77 -885.3PC 97.77EQ 97.77 -885.3GW 97.77 -885.3PE 19.72 -210.21PC 19.72UOCL(CR)

UCL6(CR)

UCL6(G)

U2CL8(G)

U2CL10(G

UCL4(CR)

UCL4(G)

UCL5(CR)

UCL5(G)

UCL(G)

UCL2(G)

UCL3(CR)

UCL3(G)

UF4.2.5H

UO2FOH.H

UO2FOH.2

UO2F2.3H

情報共用11
- 52 -
JNC TN8400 2002-024
Page 59: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 19.72 -210.21GW 19.72 -210.21PE 5.42 -141.89PC 5.42EQ 5.42 -141.89GW 5.42 -141.89PE 20.16 -238.27PC 20.16EQ 20.16 -238.27GW 20.16 -238.27PE 7.03 -158.84PC 7.03EQ 7.03 -158.84GW 7.03 -158.84PE 21.15 -253.42PC 21.15EQ 21.15 -253.42GW 21.15 -253.42PE 56.98 -525.42PC 56.98EQ 56.98 -525.42GW 56.98 -525.43PE 26.77 -392.06PC 26.77EQ 26.77 -392.06GW 26.77 -392.06PE 29.29 -422.46PC 29.29EQ 29.29 -422.46GW 29.29 -422.46PE 18.96 -698.64PC 18.96EQ 18.96 -698.64GW 18.96 -698.65PE 17.29 -223.05PC 17.29EQ 17.29 -223.05GW 17.29 -223.05PE 11.31 -177.03PC 11.31EQ 11.31 -177.03GW 11.31 -177.03PE 14.61 -189.71PC 14.61EQ 14.61 -189.71GW 14.61 -189.71PE 10.24 -184.79PC 10.24EQ 10.24 -184.79GW 10.24 -184.79PE -3.61 -130.06PC -3.61EQ -3.61 -130.06GW -3.61 -130.06PE -17.64 -74.33PC -17.64EQ -17.64 -74.33GW -17.64 -74.33PE 146.37 -959.61PC 146.37EQ 146.37 -959.61GW 146.37 -959.62PE 115.61 -803.02PC 115.61EQ 115.61 -803.02GW 115.61 -803.03

UBR2(G)

UCL3F(CR

UCL2F2(C

UCLF3(CR

UBR(G)

U5O12CL(

UO2CL2.H

UO2CLOH.

UO2CL2.3

UO2CL2(C

UO2CL2(G

U2O2CL5(

(UO2)2CL

UOCL2(CR

UOCL3(CR

UO2CL(CR

情報共用11
- 53 -
JNC TN8400 2002-024
Page 60: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 29.47 -256.73PC 29.47EQ 29.47 -256.73GW 29.47 -256.73PE 77.14 -591.43PC 77.14EQ 77.14 -591.43GW 77.14 -591.44PE 31.15 -274.74PC 31.15EQ 31.15 -274.74GW 31.15 -274.74PE 54.15 -466.74PC 54.15EQ 54.15 -466.74GW 54.15 -466.75PE 49.02 -387.85PC 49.02EQ 49.02 -387.85GW 49.02 -387.85PE 68.82 -560.51PC 68.82EQ 68.82 -560.51GW 68.82 -560.52PE 7.89 -146.25PC 7.89EQ 7.89 -146.25GW 7.89 -146.25PE 31.02 -287.26PC 31.02EQ 31.02 -287.26GW 31.02 -287.26PE 25.48 -268.28PC 25.48EQ 25.48 -268.28GW 25.48 -268.28PE 21.08 -235.61PC 21.08EQ 21.08 -235.61GW 21.08 -235.61PE 13.18 -183.56PC 13.18EQ 13.18 -183.56GW 13.18 -183.56PE 18.36 -205.17PC 18.36EQ 18.36 -205.17GW 18.36 -205.17PE 27.05 -250.5PC 27.05EQ 27.05 -250.5GW 27.05 -250.5PE 29 -270.21PC 29EQ 29 -270.21GW 29 -270.21PE 23.8 -234.67PC 23.8EQ 23.8 -234.67GW 23.8 -234.67PE 26.12 -260.28PC 26.12EQ 26.12 -260.28GW 26.12 -260.28PE 23.45 -246.55PC 23.45

UBR2CL2(

UBRCL3(C

UO2BR2.3

UBR2CL(C

UBR3CL(C

UBRCL2(C

UOBR3(CR

UO2BR2(C

UO2BR2.H

UO2BROH.

UBR4(G)

UBR5(CR)

UBR5(G)

UOBR2(CR

UBR3(CR)

UBR3(G)

UBR4(CR)

情報共用11
- 54 -
JNC TN8400 2002-024
Page 61: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 23.45 -246.55GW 23.45 -246.55PE 152.35 -988.98PC 152.35EQ 152.35 -988.98GW 152.35 -988.99PE 117.52 -804.76PC 117.52EQ 117.52 -804.76GW 117.52 -804.77PE 38.26 -294.14PC 38.26EQ 38.26 -294.14GW 38.26 -294.14PE 84.85 -621.54PC 84.85EQ 84.85 -621.54GW 84.85 -621.55PE 39.17 -299.52PC 39.17EQ 39.17 -299.52GW 39.17 -299.52PE 64.19 -509.52PC 64.19EQ 64.19 -509.52GW 64.19 -509.53PE 35.12 -284.82PC 35.12EQ 35.12 -284.82GW 35.12 -284.82PE 30.2 -270.12PC 30.2EQ 30.2 -270.12GW 30.2 -270.12PE 25.47 -250.92PC 25.47EQ 25.47 -250.92GW 25.47 -250.92PE 0.77 -35.02PC 0.77EQ 0.77 -35.02GW 0.77 -35.02PE -64.52 363.26PC -64.52EQ -64.52 363.26GW -64.52 363.26PE -69.81 397.16PC -69.81EQ -69.81 397.16GW -69.81 397.16PE -108.81 650.34PC -108.81EQ -108.81 650.34GW -108.81 650.35PE -75.99 398.54PC -75.99EQ -75.99 398.54GW -75.99 398.54PE -150.37 827.3PC -150.37EQ -150.37GW -150.37 827.3PE -3.39 -125.37PC -3.39EQ -3.39 -125.37GW -3.39 -125.37

U3S5(CR)

UO2SO3(C

US1.90(C

US2(CR)

US3(CR)

U2S3(CR)

UCLI3(CR

UCL2I2(C

UCL3I(CR

US(CR)

UI3(CR)

UI3(G)

UI4(CR)

UI4(G)

UI(G)

UI2(G)

情報共用11
- 55 -
JNC TN8400 2002-024
Page 62: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 10.93 -227.06PC 10.93EQ 10.93 -227.06GW 10.93 -227.06PE -29.65 44.78PC -29.65EQ -29.65 44.78GW -29.65 44.78PE -11.68 -100.28PC -11.68EQ -11.68 -100.28GW -11.68 -100.28PE -3.17PC -3.17EQ -3.17GW -3.17PE 7.53 -178.19PC 7.53EQ 7.53 -178.19GW 7.53 -178.19PE 7.45 -171PC 7.45EQ 7.45 -171GW 7.45 -171PE -11.72 -70PC -11.72EQ -11.72 -70GW -11.72 -70PE -12.77 -33.92PC -12.77EQ -12.77 -33.92GW -12.77 -33.92PE -58.84 349.44PC -58.84EQ -58.84 349.44GW -58.84 349.44PE -133.73 822.52PC -133.73EQ -133.73 822.52GW -133.69 822.53PE -151.19 932.91PC -151.19EQ -151.19 932.91GW -151.15 932.92PE 20.96 -225.56PC 20.96EQ 20.96 -225.56GW 20.96 -225.56PE 17.5 -198.39PC 17.5EQ 17.5 -198.39GW 17.5 -198.39PE 13.93 -169.52PC 13.93EQ 13.93 -169.52GW 13.93 -169.52PE 12.69 -153.65PC 12.69EQ 12.69 -153.65GW 12.69 -153.65PE 11.27 -124.04PC 11.27EQ 11.27 -124.04GW 11.27 -124.04PE 59.72 -462.48PC 59.72

UO2NO323

UO2NO326

UP(CR)

UN1.73(A

UO2NO32(

UO2NO32H

UO2NO322

USO42.4H

USO42.8H

UN(CR)

UN1.59(A

U(SO4)2(

U(OH)2SO

UO2SO43H

UO2SO435

UO2SO4(C

U(SO3)2(

情報共用11
- 56 -
JNC TN8400 2002-024
Page 63: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ 59.72 -462.48GW 59.72 -462.48PE 68.18 -569.36PC 68.18EQ 68.18 -569.36GW 68.18 -569.37PE 187.61 -1494.92PC 187.61EQ 187.61 -1494.92GW 187.61 -1494.94PE -23.16 -97.43PC -23.16EQ -23.16 -97.43GW -23.16 -97.43PE -55.29 -22.17PC -55.29EQ -55.29 -22.17GW -55.29 -22.17PE -18.9 -376.09PC -18.9EQ -18.9 -376.09GW -18.9 -376.09PE -9.21 -566.08PC -9.21EQ -9.21 -566.08GW -9.21 -566.09PE -15.16 -120.61PC -15.16EQ -15.16 -120.61GW -15.16 -120.61PE -55.2 31.5PC -55.2EQ -55.2 31.5GW -55.2 31.5PE -22.25 -461.6PC -22.25EQ -22.25 -461.6GW -22.25 -461.6PE -23.08PC -23.08EQ -23.08GW -23.08PE 43.35 -311.04PC 43.35EQ 43.35 -311.04GW 43.35 -311.04PE 15.14 -152.29PC 15.14EQ 15.14 -152.29GW 15.14 -152.29PE 56.03 -452.32PC 56.03EQ 56.03 -452.32GW 56.03 -452.32PE -8.06 -56.83PC -8.06EQ -8.06 -56.83GW -8.06 -56.83PE 24.97 -275.22PC 24.97EQ 24.97 -275.22GW 24.97 -275.22PE 28.19 -295.82PC 28.19EQ 28.19 -295.82GW 28.19 -295.82

USIO4(CR

CAUO4(CR

SRUO4(AL

UO23P_6H

UC(CR)

UC1.94(A

U2C3(CR)

UO23P_(C

UO2HPO4.

U(HPO4)2

UO23P_4H

U3P4(CR)

UPO5(CR)

UP2O7(CR

(UO2)2P2

UP2(CR)

情報共用11
- 57 -
JNC TN8400 2002-024
Page 64: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 26.68 -275.52PC 26.68EQ 26.68 -275.52GW 26.68 -275.52PE 101.74 -700.18PC 101.74EQ 101.74 -700.18GW 101.74 -700.19PE 39.47 -480.81PC 39.47EQ 39.47 -480.81GW 39.47 -480.82PE 50.46 -512.81PC 50.46EQ 50.46 -512.81GW 50.46 -512.82PE 15.9 -194.13PC 15.9EQ 15.9 -194.13GW 15.9 -194.13PE 39.07 -317.5PC 39.07EQ 39.07 -317.5GW 39.07 -317.5PE 63.84 -431.54PC 63.84EQ 63.84 -431.54GW 63.84 -431.55PE 40.67 -460.09PC 40.67EQ 40.67 -460.09GW 40.67 -460.10PE 42.91 -318.1PC 42.91EQ 42.91 -318.1GW 42.91 -318.1PE 44.84 -322.52PC 44.84EQ 44.84 -322.52GW 44.84 -322.52PE 49.01 -479.21PC 49.01EQ 49.01 -479.21GW 49.01 -479.22PE 52.03 -738.96PC 52.03EQ 52.03 -738.96GW 52.03 -738.97PE -44.55 827.82PC -44.55EQ -44.55 827.82GW -44.55 827.83PE -159.73 2122.44PC -159.73EQ -159.73 2122.44GW -159.73 2122.46PE -159.89 2122.44PC -159.89EQ -159.89 2122.44GW -159.89 2122.46PE -252.97 3290.76PC -252.97EQ -252.97 3290.76GW -252.97 3290.80PE -207.3 2958.56PC -207.3

USE2(ALP

USE2(BET

USE3(CR)

U2SE3(CR

CS2UO4(C

CS2U2O7(

CS2U4O12

USE(CR)

NA2UO4(A

NA3UO4(C

NA2U2O7(

K2UO4(CR

BA3UO6(C

BAU2O7(C

BA2U2O7(

NAUO3(CR

BAUO4(CR

情報共用11
- 58 -
JNC TN8400 2002-024
Page 65: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

EQ -207.3 2958.56GW -207.3 2958.59PE -250.22 3782.68PC -250.22EQ -250.22 3782.68GW -250.22 3782.72PE -363.94 5073PC -363.94EQ -363.94 5073GW -363.94 5073.1PE 32.26 -344.22PC 32.26EQ 32.26 -344.22GW 32.26 -344.22PE 36.971 -323.26PC 36.971EQ 36.971 -323.26GW 36.971 -323.26PE 0.01PC 0.01EQ 0.01GW 0.01PE -25.49PC -25.49EQ -25.49GW -25.49PE -1.79PC -1.79EQ -1.79GW -1.79PE -67.38PC -67.38EQ -67.38GW -67.38PE -41.78PC -41.78EQ -41.78GW -41.78PE -38.39PC -38.39EQ -38.39GW -38.39PE -36.49PC -36.49EQ -36.49GW -36.49PE -0.85PC -0.85EQ -0.85GW -0.85PE 23.81PC 23.81EQ 23.81GW 23.81PE -11PC -11EQ -11GW -11PE -14.32PC -14.32EQ -14.32GW -14.32PE 17PC 17EQ 17GW 17

PUO2OH

NAPUO2CO

NA3PUO2C

AM(OH)3A

PUPO4(A)

NAPUCO32

PUF3(cr)

PUO2(AM)

PU(OH)3A

PUOHCO3

PU(OH)3C

PU2(CO3)

U3SE4(CR

U3SE5(CR

MGUO4(CR

LI2UO4(C

情報共用11
- 59 -
JNC TN8400 2002-024
Page 66: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

PE 15.2PC 15.2EQ 15.2GW 15.2PE -33.4PC -33.4EQ -33.4GW -33.4PE -8.5PC -8.5EQ -8.5GW -8.5PE -21.4PC -21.4EQ -21.4GW -21.4PE -24.79PC -24.79EQ -24.79GW -24.79PE -19.5PC -19.5EQ -19.5GW -19.5PE 17PC 17EQ 17GW 17PE 15.2PC 15.2EQ 15.2GW 15.2PE -33.4PC -33.4EQ -33.4GW -33.4PE -8.5PC -8.5EQ -8.5GW -8.5PE -21.4PC -21.4EQ -21.4GW -21.4PE -24.79PC -24.79EQ -24.79GW -24.79PE -19.5PC -19.5EQ -19.5GW -19.5

CMF3(cr)

CM2(CO3)

CMOHCO3

NACMCO32]

CMPO4

AMPO4

AMF3(cr)

CM(OH)3A

CM(OH)3C

AM(OH)3C

AM2(CO3)

AMOHCO3

NAAMCO32

JNC TN8400 2002-024
情報共用11
- 60 -
Page 67: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 61 -

別添-1.1 green.exe での変換に用いたファイル(atwtdat.txt)

Atomic weights of the chemical elements. ---------------------------------------- O 15.99940 Ac 227.028 Ag 107.86820 Al 26.98154 Am 243.00000 B 10.81100 Ba 137.32700 Bi 208.980 Br 79.90400 C 12.01100 Ca 40.07800 Cl 35.45270 Cm 247.070 Co 58.93320 Cs 132.90543 F 18.99840 Fe 55.84700 H 1.00794 I 126.90447 K 39.09830 Li 6.94100 Mg 24.30500 Mn 54.93805 N 14.00674 Na 22.98977 Nb 92.906 Nd 144.24000 Ni 58.69000 Np 237.04800 P 30.97376 Pa 231.036 Pb 207.20000 Pd 106.42000 Po 208.982 Pu 244.00000 Ra 226.02500 S 32.06600 Sb 121.75000 Se 78.96000 Si 28.08550 Sm 150.36000 Sn 118.71000 Sr 87.62000 Tc 98.00000 Th 232.03810 Tl 204.38330 U 238.02890 Zr 91.22400 End

JNC TN8400 2002-024
Page 68: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 62 -

別添-1.2 green.exe での変換に用いたファイル(basisdat.txt)

BASIS SPECIES COMPOSIIONS H2O 2.00 H 1.00 O H+ 1.00 H Ca++ 1.00 Ca Mg++ 1.00 Mg Na+ 1.00 Na K+ 1.00 K Fe++ 1.00 Fe Mn++ 1.00 Mn Al+++ 1.00 Al Ba++ 1.00 Ba Sr++ 1.00 Sr H4SiO4 4.00 H 1.00 Si 4.00 O Cl- 1.00 Cl CO3-- 1.00 C 3.00 O SO4-- 1.00 S 4.00 O NO3- 1.00 N 3.00 O B(OH)3 1.00 B 3.00 O 3.00 H PO4--- 1.00 P 4.00 O F- 1.00 F Li+ 1.00 Li Br- 1.00 Br I- 1.00 I TcO++ 1.00 Tc 1.00 O U++++ 1.00 U Co++ 1.00 Co Am+++ 1.00 Am Pu++++ 1.00 Pu Cs+ 1.00 Cs Ni++ 1.00 Ni

JNC TN8400 2002-024
Page 69: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 63 -

SeO4-- 1.00 Se 4.00 O Zr(OH)4 1.00 Zr 4.00 O 4.00 H Sn(OH)4 1.00 Sn 4.00 O 4.00 H Sm+++ 1.00 Sm Pb++ 1.00 Pb Ra++ 1.00 Ra Th++++ 1.00 Th Pa++++ 1.00 Pa Np++++ 1.00 Np Nb(OH)5 1.00 Nb 5.00 O 5.00 H Pd++ 1.00 Pd Nd+++ 1.00 Nd Sb(OH)3 1.00 Sb 3.00 O 3.00 H Bi+++ 1.00 Bi Po++++ 1.00 Po Ac+++ 1.00 Ac Cm+++ 1.00 Cm Tl+ 1.00 Tl Ag+ 1.00 Ag End

JNC TN8400 2002-024
Page 70: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 64 -

別添-1.3 phgwb10 での変換で用いたファイル(HDR)

data0 * * NCT = no. of elements, NSQ = no. of basis (strict + auxiliary) species *->> Check next line: NCT in columns 4-5, NSQ in columns 9-10 46 61 * Data File TDB.EQ36 (for EQ3/6 Version 3245) 1 atm Steam Saturation Curve data Created 1991/01/01 from PHREEQE data base TDB.PHREEQE * ******************************************************************************* ** This file is to be used with the program PHR-EQ36 to help you to ** ** convert an input PHREEQE data base to an DATA0-format output file ** ** (EQ3/6 version 3245) which after some changes may be used as input ** ** to the program EQPT of the EQ3/6 package. ** ** ** ** Once you have made a run with the program PHR-EQ36, you must do the ** ** following changes to the output data file: ** ** - check for any "?" ** ** - change the lines indicated by the comments beginning with "*->>" ** ******************************************************************************* * * ELEMENTS: *->> Check the following: * - Strict aqueous basis species must have a one to one correlation * with the chemical elements listed below (except basis species * "O2(G)" which ends the strict basis species set) * - You must rearrange the elements below to be in the same order as * the strict basis species * elements, atomic weights, oxides, and gravimetric factors o 15.99940 none 0.00000 h 1.00790 h2o 8.93645 * * temperatures 0.0000 25.0000 60.0000 100.0000 150.0000 200.0000 250.0000 300.0000 * pressures 1.0134 1.0134 1.0134 1.0134 4.7600 15.5490 39.7760 85.9270 * debye huckel a (adh) .4913 .5092 .5450 .5998 .6898 .8099 .9785 1.2555 * debye huckel b (bdh) .3247 .3283 .3343 .3422 .3533 .3655 .3792 .3965 * bdot .0174 .0410 .0440 .0460 .0470 .0470 .0340 0.0000 * c co2 1 1.224e-1 1.127e-1 9.341e-2 8.018e-2 8.427e-2 9.892e-2 1.371e-1 1.967e-1 * c co2 2 -4.679e-3 -1.049e-2 -3.600e-3 -1.503e-3 -1.184e-2 -1.040e-2 -7.086e-3 -1.809e-2 * c co2 3 -4.114e-4 1.545e-3 9.609e-5 5.009e-4 3.118e-3 1.386e-3 -2.887e-3 -2.497e-3 * c co2 4 0. 0. 0. 0. 0. 0. 0. 0. * c h2o 1 500. 1.45397 500. 1.55510 1.6225 500. 500. 500. * c h2o 2 500. 2.2357e-2 500. 3.6478e-2 4.5891e-2 500. 500. 500. * c h2o 3

JNC TN8400 2002-024
Page 71: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 65 -

500. 9.3804e-3 500. 6.4366e-3 4.5221e-3 500. 500. 500. * c h2o 4 500. -5.362e-4 500. -7.132e-4 -8.312e-4 500. 500. 500. * log k for eh reaction revised -83.1028 -> -86.08 at 25 ** 2 H2O = O2(aq) + 4 H+ + 4 E- -91.0454 -86.0800 -74.0521 -65.8632 -57.8929 -51.6850 -46.7266 -42.6842 * log k for o2 gas solubility revised -2.899 -> -2.99 -2.6610 -2.9900 -3.0580 -3.1250 -3.0630 -2.9140 -2.6600 -2.4100 * log k for h2 gas solubility -3.0240 -3.1120 -3.1440 -3.1120 -3.0520 -2.9420 -2.7300 -2.4400 * log k for n2 gas solubility -2.9740 -3.1830 -3.3210 -3.3330 -3.1740 -2.9960 -2.7480 -2.4530 * log k for h2(aq) reaction ** h2(aq) -3.0240 -3.1120 -3.1440 -3.1120 -3.0520 -2.9419 -2.7300 -2.4399 * log k for o2(aq) reaction ** o2(aq) revised -2.899 -> -2.99 at 25 -2.6610 -2.9900 -3.0580 -3.1250 -3.0630 -2.9140 -2.6600 -2.4100 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *->> Check the following: * - Strict aqueous basis species listed below must have a one to one * correlation with the chemical elements listed below (except basis * species "O2(G)") * - You must rearrange the elements below to be in the same order as * the strict basis species * - 1st strict basis aqueous species must be "H2O" * - Last strict basis aqueous species must be "O2(G)" * - There must be one (and only one) strict basis species for * each element listed in the table at the beginning of the file. * The remaining basis species must be considered as "auxiliary". * Auxiliary basis species usually (but not necessarily) have a * different oxidation state than the strict basis species for * that element. * - Auxiliary basis species have to be moved to their place * (see below). Examples of auxiliary basis species are: * OH-, O2(AQ), H2(AQ), CH4(AQ), FE+++, HS-, NO2-, NH4+, etc * - The number of (strict + auxiliary) basis species must be * equal to the value of "NSQ" in line 5 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Beginning of STRICT AQUEOUS BASIS SPECIES

JNC TN8400 2002-024
Page 72: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 66 -

別添-1.4 phgwb10 での変換で用いたファイル(ELEMS) this file is to be used with the program phr-eq36 (phreeqe to eq3/6 thermodynamic data base conversion) file contents: - what elements of the eq3/6-data-base are in each of the master species of the phreeqe-data-base. format: - master species name, and number of elements in the master species (format = a8,12x,i2) - what are the names of the elements in the eq3/6-data-base, and how many of each (format = 20x,6(a2,f2.0,2x)) h+ 1 h 1 e- 0 h2o 2 h 2 o 1 ca+2 1 ca 1 mg+2 1 mg 1 na+ 1 na 1 k+ 1 k 1 fe+2 1 fe 1 mn+2 1 mn 1 al+3 1 al 1 ba+2 1 ba 1 sr+2 1 sr 1 h4sio4 3 si 1 h 4 o 4 cl- 1 cl 1 co3-2 2 c 1 o 3 so4-2 2 s 1 o 4 no3- 2 n 1 o 3 h3bo3 3 b 1 o 3 h 3 po4-3 2 p 1 o 4 f- 1 f 1 li+ 1 li 1 br- 1 br 1 i- 1 i 1 tco+2 2 tc 1 o 1 u+4 1 u 1 co+2 1 co 1 am+3 1 am 1 pu+4 1 pu 1 cs+ 1

JNC TN8400 2002-024
Page 73: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 67 -

cs 1 ni+2 1 ni seo4-2 2 se 1 o 4 zro4h4 3 zr 1 o 4 h 4 sno4h4 3 sn 1 o 4 h 4 sm+3 1 sm 1 pb+2 1 pb 1 ra+2 1 ra 1 th+4 1 th 1 pa+4 1 pa 1 np+4 1 np 1 nbo5h5 3 nb 1 o 5 h 5 pd+2 1 pd 1 nd+3 1 nd 1 sbo3h3 3 sb 1 o 3 h 3 bi+3 1 bi 1 po+4 1 po 1 ac+3 1 ac 1 cm+3 1 cm 1 tl+ 1 tl 1 ag+ 1 ag 1

JNC TN8400 2002-024
Page 74: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 68 -

別添-1.5. phgwb10 での変換で用いたファイル(ION_FILE)

ION_SIZE h+ 9. li+ 6. Rb+ 2.5 Cs+ 2.5 NH4+ 2.5 Tl+ 2.5 Ag+ 2.5 K+ 3.0 CL- 3.0 Br- 3.0 I- 3.0 Cn- 3.0 NO2- 3.0 NO3- 3.0 OH- 3.5 F- 3.5 NCS- 3.5 NCO- 3.5 HS- 3.5 ClO3- 3.5 ClO4- 3.5 BrO3- 3.5 IO4- 3.5 MnO4- 3.5 NA+ 4.0 CdCl+ 4.0 ClCo3- 4.0 IO3- 4.0 HCO3- 4.0 H3PO4- 4.0 HSO3- 4.0 H2AsO4- 4.0 Hg2+2 4.0 SO4-2 4.0 S2O3-2 4.0 S2O6-2 4.0 S2O8-2 4.0 SeO4-2 4.0 CrO4-2 4.0 HPO4-2 4.0 PB+2 4.5 CO3-2 4.5 SO3-2 4.5 MOO4-2 4.5 CO(NH3)2CL 4.5 FE(CN)3NO-2 4.5 SR+2 5.0 BA+2 5.0 Ra+2 5.0 Cd+2 5.0 Hg+2 5.0 S-2 5.0 S2O4-2 5.0 WO4-2 5.0 CAHCO3+1 5.4 CA+2 6.0 Cu+2 6.0 Zn+2 6.0 Sn+2 6.0 Mn+2 6.0 Fe+2 6.0 Ni+2 6.0 Co+2 6.0 Mg+2 8.0 Be+2 8.0 PO4-3 4.0 FE(CN)6-3 4.0 Cr(NH3)6+3 4.0

JNC TN8400 2002-024
Page 75: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 69 -

CO(NH3)6+3 4.0 AL+3 9.0 FE+3 9.0 CR+2 9.0 Sc+3 9.0 Y+3 9.0 LA+3 9.0 In+3 9.0 Ce+3 9.0 Pr+3 9.0 Nd+3 9.0 Sm+3 9.0 Fe(CN)6-4 5.0 TH+4 11.0 Zr+4 11.0 Ce+4 11.0 Sn+4 11.0

JNC TN8400 2002-024
Page 76: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 70 -

別添-2 pqpcn14_5 のプログラムソース(pqpcn14_5.f)

CC SUBROUTINE READ CC CHANGE............NEA DB. 17/12/1984 Y.YAMAGUCHI IMPLICIT REAL*8 (A-H,O-Z) CC INTEGER (I-N) REAL*8 LKT0SP,LKT0M,LK0LK REAL*8 NUMB,NH,NO,NHSUM,NOSUM,NHSUM2,NOSUM2 REAL*8 MCLOOK,NHS,NOS,NH2,NO2 REAL*8 LLOOK3,N1SUM,N2SUM,N3SUM INTEGER GFLAG,IZSP CHARACTER *12 DELETE,SPN3,SPN4 CHARACTER *1 ALF,ALF2,ANUM CHARACTER *12 MNG,MNG2,AN,AN2,TCN,TCN2,PUL,PUL2,NPT,NPT2 CHARACTER *4 FMT0(8),FMT01(8),FMT(9),FMT1(6),FMT2(8),FMT3(11) CHARACTER *1 PLUS,MINUS,FUGOU(10000,6),FUGOU2(10000) CHARACTER *1 CHA1 C+2000ts CHARACTER *15 SNAME0(10000),SNAM00,SNAM01,SNAME(10000), + SNAMEX(10000) CHARACTER *300 TLNAME2(10000),TLNAME3 CHARACTER *1 FUGOU0(100),FUGOU00(100,20),ENUM(10), + TLNAME4(50),TLNAME5(20) CHARACTER *12 TNAM(100),NAMELK,TNAM2(100),SPN,SPN2, + TNAME(500),TNAM0(100),TNAM20(100), + SPN5,SPN6,SPN7,SNAME2(10000) CHARACTER *12 ENAME(100) DIMENSION EGFW(100),LFLAG(10000),LFLAG2(10000),LFLAG3(10000), + LFLAG4(10000),LFLAG5(10000),MSP(10000,3,3), + NELT(100),TGFW(100),TGFW2(100),MFLAG1(10000), + JJN(100),TGFW0(100),ISEC(10000,100),NRD(10000), + CSP0(10000,6),NRD0(10000),CSPX(10000,6), + JZSP(10000),VALN(100,10000),VMAX(100),VMIN(100), + ISC(100,20),IVFLAG(100),LFLAG6(100),IV2(100), + IXFLAG(100,20),VALN2(100,20),ISEC2(100,20), + LFLAG22(10000),NRD2(10000),NRD20(10000),NRD21(10000), + NRFLAG(10000),JVALN2(100,20),JSCSP(10000,10), + DSCSP(10000,10),JJN2(100),CSP00(10000),NCH(100), + TGFW3(100),TGFW4(100,10000),TGFW5(100,20),NCHX(10000) C+2000ts DIMENSION ALF(26),ALF2(26) DIMENSION ZSP(10000),THSP(10000), 1 DHA(10000),ASP(10000,5),ADHSP(10000,2),ALKSP(10000), 2 CSP(10000,6),GFW(500),SCSP(10000,10),INSF(10000), 3 ISP(10000,6),ISCSP(10000,10) DIMENSION NSP(10000),LSP(10000,10),KFLAG(10000),GFLAG(10000), + LKT0SP(10000),DHSP(10000),L2(10000),IZSP(10000), + NLOOK(1000),LK0LK(1000),L1(1000),LL(1000), + DHLOOK(1000),LOOKFL(1000),LLOOK(1000,10), + ALOOK(1000,10),CLOOK(1000,10),NUMB(6,10000), + NHSUM(10000),NOSUM(10000),CLOOK2(60,10), + NHSUM2(10000),NOSUM2(10000),LLOOK2(1000,10), + NT(10000),MLOOK(10000,10),MCLOOK(10000,10), + NHS(10000,10),NOS(10000,10),SLSP(10000,10), + LLOOK3(10000,10),CLOOK3(1000,10),LBOOK(10000,10), + N1SUM(10000),N2SUM(10000),N3SUM(10000) DIMENSION NAMELK(1000),ISOF(10000),JSOF(10000) DIMENSION MNG(2),MNG2(2),AN(4),AN2(4),TCN(2),TCN2(2),PUL(4), + PUL2(4),NPT(4),NPT2(4),ANUM(9) CC DATA NLKS,NSMS /0,0/ DATA DELETE /'DELETE '/ DATA PLUS/'+'/,MINUS/'-'/ DATA (ALF(I),I=1,26)/'A','B','C','D','E','F','G','H','I','J','K', + 'L','M','N','O','P','Q','R','S','T','U','V', + 'W','X','Y','Z'/ DATA (ALF2(I),I=1,26)/'a','b','c','d','e','f','g','h','i','j','k', + 'l','m','n','o','p','q','r','s','t','u','v', + 'w','x','y','z'/ C+2000ts DATA (ENUM(I),I=1,10)/'0','1','2','3','4','5','6','7','8','9'/

JNC TN8400 2002-024
Page 77: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 71 -

DATA (ENAME(I),I=1,95)/'Li','Be','B','N','F','Na','Mg','Al','Si', + 'P','S','Cl','K','Ca','Sc','Ti','V','Cr','Mn','Fe','Co','Ni', + 'Cu','Zn','Ga','Ge','As','Se','Br','Rb','Sr','Y','Zr','Nb', + 'Mo','Tc','Ru','Rh','Pd','Ag','Cd','In','Sn','Sb','Te','I', + 'Cs','Ba','La','Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy', + 'Ho','Er','Tm','Yb','Lu','Hf','Ta','W','Re','Os','Ir','Pt', + 'Au','Hg','Tl','Pb','Bi','Po','At','Fr','Ra','Ac','Th','Pa', + 'U','Np','Pu','Am','Cm','Bk','Cf','Es','Fm','Md','No','Lr', + 'C'/ DATA (EGFW(I),I=1,95) /6.9,9.0,10.8,14.0,19.0,23.0,24.3,27.0,28.1, + 31.0,32.0,35.5,39.1,40.1,45.0,47.9,51.0,52.0,54.9,55.9,58.9, + 58.7,63.6,65.4,69.7,72.6,74.9,79.0,79.9,85.5,87.6,88.9,91.2, + 92.9,95.9,99.0,101.1,102.9,106.4,107.9,112.4,114.8,118.7,121.8, + 127.6,126.9,132.9,137.3,138.9,140.1,140.9,144.2,145.0,150.4, + 152.0,157.3,158.9,162.5,164.9,167.3,168.9,173.0,175.0,178.5, + 181.0,183.8,186.2,190.2,192.2,195.1,197.0,200.6,204.4,207.2, + 209.0,210.0,210.0,223.0,226.0,227.0,232.0,231.0,238.0,237.0, + 239.0,243.0,247.0,247.0,252.0,252.0,257.0,256.0,259.0,260.0, + 12.011/ C+2000ts DATA (ANUM(I),I=1,9)/'1','2','3','4','5','6','7','8','9'/ DATA FMT0/' (1X',',SP,',' ','(F5.','1,A7','),''','='',', + 'A8) '/ DATA FMT01/'(1X,',' ','(A1,','F6.1',',A8)',',''=',' '',', + 'A12)' / DATA FMT/'(1X,',' ','(A1,','F6.1',',A15','),''','= ''', + ',A15',') ' / DATA FMT1/' 1',' 2',' 3',' 4',' 5',' 6'/ DATA FMT2/' 1',' 2',' 3',' 4',' 5',' 6', + ' 7',' 8'/ DATA FMT3/'(1X,',' ','(A3,','F8.3','),''','='',','SP, ',' ', C + '(F8.','3,A9',')) '/ + '(F8.','3,A1','5)) '/ C OPEN(UNIT=11,FILE='jnc-tdb_h11a21sep2.dat',STATUS='OLD') C OPEN(UNIT=11,FILE='jnc-jun.txt',STATUS='OLD') C OPEN(UNIT=11,FILE='jnc-tdb2.dat',STATUS='OLD') C OPEN(UNIT=11,FILE='jnc-tdb_h11a31dec.txt',STATUS='OLD') C OPEN(UNIT=11,FILE='supcrit2.txt',STATUS='OLD') OPEN(UNIT=11,FILE='hat.dat',STATUS='OLD') OPEN(UNIT=10,FILE='echo7-2.dat',STATUS='UNKNOWN') OPEN(UNIT=12,FILE='echo71-2.dat',STATUS='UNKNOWN') OPEN(UNIT=13,FILE='echo72-2.dat',STATUS='UNKNOWN') OPEN(UNIT=14,FILE='echo73-2.dat',STATUS='UNKNOWN') OPEN(UNIT=15,FILE='echo74-2.dat',STATUS='UNKNOWN') CC C& MAXT=60 MAXT=100 MAXS=10000 C READ ELEMENT CARDS C READ (11,720) C I0=3 190 CONTINUE I0=I0+1 READ (11,730) TNAM0(I0),NELT(I0),TGFW0(I0),TNAM20(I0) IE=NELT(I0) C WRITE(10,*) 'IE=',IE TNAM(IE)=TNAM0(I0) TGFW(IE)=TGFW0(I0) TNAM2(IE)=TNAM20(I0) CC* READ (11,*) TNAM,NELT,TGFW,TNAM2 IF(TNAM2(IE).EQ. 'CO2') THEN ALKK=2.0 ELSE ALKK=0.0 ENDIF CCC DO 10 II=1,26 IF(TNAM(IE)(2:2).EQ.ALF(II)) THEN TNAM(IE)(2:2)=ALF2(II) TNAM2(IE)(4:4)=ALF2(II) ENDIF

JNC TN8400 2002-024
Page 78: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 72 -

10 CONTINUE CCC DO 15 II2=6,11 IF(TNAM2(IE)(II2:II2).EQ.'('. + OR.TNAM2(IE)(II2:II2).EQ.' ') + TNAM2(IE)=TNAM2(IE)(:II2-1) 15 CONTINUE IF(TNAM(IE).EQ.'Si') THEN TNAM2(IE)='H4SiO4' ENDIF IF(TNAM(IE).EQ.'C') THEN ALKK=2.0 ENDIF IF (TGFW(IE).EQ.0) GO TO 210 IF(TNAM(IE).EQ.'C') TGFW(IE)=12.0111 C+2000ts DO 17 I=1,95 IF(TNAM(IE) .EQ. ENAME(I)) + TGFW2(IE)=EGFW(I) 17 CONTINUE CC IF (NELT(I0).GT.3.AND.NELT(I0).LE.MAXT) GO TO 200 ENDFILE (UNIT=6) STOP 200 CONTINUE TNAME(NELT(I0))=TNAM(IE) GFW(NELT(I0))=TGFW(IE) GO TO 190 CC C 210 WRITE(6,*) ' ' 210 CONTINUE C READ SPECIES CARDS C READ (11,760) C WRITE (6,765) C READ SPECIES CARDS UNTIL BLANK CARD 230 CONTINUE READ (11,770) I C WRITE (10,*) I TNAME(1)='H' TNAME(2)='O' C READ SPECIES NAME ETC. IF (I.EQ.0) GO TO 250 IF (I.GT.0.AND.I.LE.MAXS) GO TO 240 CC READ (11,790) TNAM CC WRITE (6,750) I,TNAM,SUBS(7) ENDFILE (UNIT=6) STOP 240 CONTINUE READ (11,790) SNAME(I),NSP(I),KFLAG(I),GFLAG(I),ZSP(I),THSP(I), 1DHA(I),(ADHSP(I,J),J=1,2),ALKSP(I) CC C WRITE(10,790) SNAME(I),NSP(I),KFLAG(I),GFLAG(I),ZSP(I),THSP(I), C 1DHA(I),(ADHSP(I,J),J=1,2),ALKSP(I) SNAME2(I)=SNAME(I) SPN=SNAME2(I) C DO 50 IIJ=1,26 C+TS2001 C DO 51 LN0=1,10 DO 52 LN=1,8 IF(SPN(LN:LN).NE.ALF(2) + .AND.SPN(LN:LN).NE.ALF(3) + .AND.SPN(LN:LN).NE.ALF(6) + .AND.SPN(LN:LN).NE.ALF(8) + .AND.SPN(LN:LN).NE.ALF(9) + .AND.SPN(LN:LN).NE.ALF(14) + .AND.SPN(LN:LN).NE.ALF(15) + .AND.SPN(LN:LN).NE.ALF(16) + .AND.SPN(LN:LN).NE.ALF(19) + .AND.SPN(LN:LN).NE.'(') THEN C DO 48 IIJ=1,26 IF(SPN(LN:LN).EQ.ALF(21)

JNC TN8400 2002-024
Page 79: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 73 -

+ .OR.SPN(LN:LN).EQ.ALF(11) + .OR.SPN(LN:LN).EQ.ALF(22) + .OR.SPN(LN:LN).EQ.ALF(23) + .OR.SPN(LN:LN).EQ.ALF(25)) THEN C WRITE(10,*) SPN(LN+1:LN+1),ALF(IIJ) IF(SPN(LN+1:LN+1).EQ.ALF(IIJ)) + SPN(LN+1:LN+1)=ALF(IIJ) GO TO 53 C WRITE(10,*) SPN ENDIF 48 CONTINUE C DO 49 IIJ=1,26 DO 51 LN0=1,10 IF(SPN(LN:LN).EQ.ENUM(LN0) + .AND.SPN(LN+1:LN+1).EQ.ALF(IIJ)) THEN SPN(LN+1:LN+1)=ALF(IIJ) GO TO 53 ENDIF 51 CONTINUE DO 54 IIK=1,26 IF(SPN(LN:LN).EQ.ALF2(IIK) + .AND.SPN(LN+1:LN+1).EQ.ALF(IIJ)) THEN SPN(LN+1:LN+1)=ALF(IIJ) GO TO 53 ENDIF 54 CONTINUE 49 CONTINUE DO 50 IIJ=1,26 C WRITE(10,*) SPN(LN:LN),SPN(LN+1:LN+1),ALF(IIJ) IF(SPN(LN+1:LN+1).EQ.ALF(IIJ)) THEN SPN(LN+1:LN+1)=ALF2(IIJ) ENDIF 50 CONTINUE 53 CONTINUE C WRITE(10,*) SPN C ENDIF ENDIF DO 56 IIJ=1,26 IF(SPN(LN:LN).EQ.ALF(5). + AND.SPN(LN+1:LN+1).EQ.'-') + SPN(LN:LN)=ALF2(5) IF(SPN(LN:LN).EQ.ALF(2). + AND.SPN(LN+1:LN+1).EQ.ALF(1)) + SPN(LN+1:LN+1)=ALF2(1) IF(SPN(LN:LN).EQ.ALF(2). + AND.SPN(LN+1:LN+1).EQ.ALF(5)) + SPN(LN+1:LN+1)=ALF2(5) IF(SPN(LN:LN).EQ.ALF(2). + AND.SPN(LN+1:LN+1).EQ.ALF(9)) + SPN(LN+1:LN+1)=ALF2(9) IF(SPN(LN:LN).EQ.ALF(2). + AND.SPN(LN+1:LN+1).EQ.ALF(11)) + SPN(LN+1:LN+1)=ALF2(11) IF(SPN(LN:LN).EQ.ALF(2). + AND.SPN(LN+1:LN+1).EQ.ALF(18)) + SPN(LN+1:LN+1)=ALF2(18) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(1)) + SPN(LN+1:LN+1)=ALF2(1) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(4)) + SPN(LN+1:LN+1)=ALF2(4) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(5)) + SPN(LN+1:LN+1)=ALF2(5) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(6)) + SPN(LN+1:LN+1)=ALF2(6) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(12)) + SPN(LN+1:LN+1)=ALF2(12) IF(SPN(LN:LN).EQ.ALF(3).

JNC TN8400 2002-024
Page 80: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 74 -

+ AND.SPN(LN+1:LN+1).EQ.ALF(13)) + SPN(LN+1:LN+1)=ALF2(13) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(15). + AND.SPN(LN+2:LN+2).EQ.ALF(IIJ)) + SPN(LN+1:LN+1)=ALF2(15) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(15). + AND.SPN(LN+2:LN+2).EQ.'+') + SPN(LN+1:LN+1)=ALF2(15) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(18)) + SPN(LN+1:LN+1)=ALF2(18) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(19)) + SPN(LN+1:LN+1)=ALF2(19) IF(SPN(LN:LN).EQ.ALF(3). + AND.SPN(LN+1:LN+1).EQ.ALF(21)) + SPN(LN+1:LN+1)=ALF2(21) IF(SPN(LN:LN).EQ.ALF(6). + AND.SPN(LN+1:LN+1).EQ.ALF(5)) + SPN(LN+1:LN+1)=ALF2(5) IF(SPN(LN:LN).EQ.ALF(6). + AND.SPN(LN+1:LN+1).EQ.ALF(13)) + SPN(LN+1:LN+1)=ALF2(13) IF(SPN(LN:LN).EQ.ALF(6). + AND.SPN(LN+1:LN+1).EQ.ALF(18)) + SPN(LN+1:LN+1)=ALF2(18) IF(SPN(LN:LN).EQ.ALF(8). + AND.SPN(LN+1:LN+1).EQ.ALF(6). + AND.SPN(LN+2:LN+2).EQ.ALF(IIJ)) + SPN(LN+1:LN+1)=ALF2(6) IF(SPN(LN:LN).EQ.ALF(8). + AND.SPN(LN+1:LN+1).EQ.ALF(7)) + SPN(LN+1:LN+1)=ALF2(7) IF(SPN(LN:LN).EQ.ALF(9). + AND.SPN(LN+1:LN+1).EQ.ALF(14)) + SPN(LN+1:LN+1)=ALF2(14) IF(SPN(LN:LN).EQ.ALF(9). + AND.SPN(LN+1:LN+1).EQ.ALF(18)) + SPN(LN+1:LN+1)=ALF2(18) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(1)) + SPN(LN+1:LN+1)=ALF2(1) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(2)) + SPN(LN+1:LN+1)=ALF2(2) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(4)) + SPN(LN+1:LN+1)=ALF2(4) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(9)) + SPN(LN+1:LN+1)=ALF2(9) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(15). + AND.SPN(LN+2:LN+2).EQ.ALF(IIJ)) + SPN(LN+1:LN+1)=ALF2(15) IF(SPN(LN:LN).EQ.ALF(14). + AND.SPN(LN+1:LN+1).EQ.ALF(16)) + SPN(LN+1:LN+1)=ALF2(16) IF(SPN(LN:LN).EQ.ALF(15). + AND.SPN(LN+1:LN+1).EQ.ALF(19)) + SPN(LN+1:LN+1)=ALF2(19) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(1)) + SPN(LN+1:LN+1)=ALF2(1) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(2)) + SPN(LN+1:LN+1)=ALF2(2) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(4)) + SPN(LN+1:LN+1)=ALF2(4) IF(SPN(LN:LN).EQ.ALF(16).

JNC TN8400 2002-024
Page 81: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 75 -

+ AND.SPN(LN+1:LN+1).EQ.ALF(13)) + SPN(LN+1:LN+1)=ALF2(13) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(15). + AND.SPN(LN+2:LN+2).EQ.ALF(IIJ)) + SPN(LN+1:LN+1)=ALF2(15) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(15). + AND.SPN(LN+2:LN+2).EQ.'+') + SPN(LN+1:LN+1)=ALF2(15) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(20)) + SPN(LN+1:LN+1)=ALF2(20) IF(SPN(LN:LN).EQ.ALF(16). + AND.SPN(LN+1:LN+1).EQ.ALF(21)) + SPN(LN+1:LN+1)=ALF2(21) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(2)) + SPN(LN+1:LN+1)=ALF2(2) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(3)) + SPN(LN+1:LN+1)=ALF2(3) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(5)) + SPN(LN+1:LN+1)=ALF2(5) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(9)) + SPN(LN+1:LN+1)=ALF2(9) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(13)) + SPN(LN+1:LN+1)=ALF2(13) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(14)) + SPN(LN+1:LN+1)=ALF2(14) IF(SPN(LN:LN).EQ.ALF(19). + AND.SPN(LN+1:LN+1).EQ.ALF(18)) + SPN(LN+1:LN+1)=ALF2(18) 56 CONTINUE 52 CONTINUE C DO 58 N=1,5 IF(SPN(N+1:N+1).EQ.'('.AND. + SPN(N+2:N+2).EQ.ALF2(1).AND. + SPN(N+3:N+3).EQ.ALF2(17)) SPN=SPN(:N) IF(SPN(N+1:N+1).EQ.'('.AND. + SPN(N+2:N+2).EQ.ALF(12).AND. + SPN(N+3:N+3).EQ.')') SPN=SPN(:N) IF(SPN(N+1:N+1).EQ.'('.AND. + SPN(N+2:N+2).EQ.ALF(1)) SPN=SPN(:N) IF(SPN(N+1:N+1).EQ.ALF(1).AND. + SPN(N+2:N+2).EQ.ALF2(17)) SPN=SPN(:N) IF(SPN(N+1:N+1).EQ.ALF2(1).AND. + SPN(N+2:N+2).EQ.ALF(17)) SPN=SPN(:N) 58 CONTINUE IF(SPN(8:8).EQ.'(') SPN=SPN(:7) IF(SPN(7:7).EQ.'('.AND.SPN(8:8).EQ.ALF(1)) SPN=SPN(:6) IF(SPN(7:7).EQ.ALF(1).AND. + SPN(8:8).EQ.ALF2(17)) SPN=SPN(:6) C WRITE(10,*) SPN SNAME(I)=SPN IF(SNAME(I).EQ.'E-') SNAME(I)='e-' C IF(SNAME(I).EQ.'H4SIO4') SNAME(I)='H4SiO4' C IF(SNAME(I).EQ.'AlOH4-') SNAME(I)='Al1H4O4-1' CC++ IF (NSP(I).EQ.0) GO TO 230 C READ LOG K DATA FOR SPECIES READ (11,810) LKT0SP(I),DHSP(I),(ASP(I,J),J=1,5) C READ COEFFICIENTS K=NSP(I) READ (11,830) (LSP(I,J),CSP(I,J),J=1,K) CC C+2000ts C+ADD

JNC TN8400 2002-024
Page 82: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 76 -

DO 500 J9=1,K IF(NSP(I) .EQ. 1 .AND. CSP(I,J9) .EQ. 1 ) THEN JSOF(I)=1 ENDIF 500 CONTINUE C+ADD NHSUM2(I)=0 NOSUM2(I)=0 ICO2=0 DO 940 J=1,K CC+ IF(LSP(I,J).GT.100) GO TO 230 CC+ SPN2=SNAME(LSP(I,J)) C IP2=0 CC!! DO 55 NI=1,26 DO 60 NN=1,8 IF(SPN2(NN:NN).EQ.')') THEN DO 62 NN1=1,9 IF(SPN2(NN+1:NN+1).EQ.ANUM(NN1)) IP2=NN1 62 CONTINUE ENDIF INAL=8 CALL COUNT(SPN2,ALF,ANUM,NN,NI,I,J,INAL,IP2,NHS,CSP) INAL=15 CALL COUNT(SPN2,ALF,ANUM,NN,NI,I,J,INAL,IP2,NOS,CSP) 60 CONTINUE 55 CONTINUE C 8000 CONTINUE SNAME(LSP(I,J))=SPN2 C NHSUM2(I)=NHSUM2(I)+NHS(I,J) NOSUM2(I)=NOSUM2(I)+NOS(I,J) IF(LSP(I,J).GE.4) THEN ICO2=ICO2+1 SLSP(I,ICO2)=LSP(I,J) SCSP(I,ICO2)=CSP(I,J) ENDIF 940 CONTINUE IF(NHSUM2(I).GT.0) THEN ICO2=ICO2+1 SLSP(I,ICO2)=1 SCSP(I,ICO2)=NHSUM2(I) ENDIF IF(NOSUM2(I).GT.0) THEN ICO2=ICO2+1 SLSP(I,ICO2)=2 SCSP(I,ICO2)=NOSUM2(I) ENDIF L2(I)=ICO2 C+2000ts DO 71 JC=1,L2(I) JSCSP(I,JC)=DINT(SCSP(I,JC)) DSCSP(I,JC)=SCSP(I,JC)-JSCSP(I,JC) 71 CONTINUE C+2001ts IF(ZSP(I) .GE. 0.0) FUGOU2(I)='+' IF(ZSP(I) .LT. 0.0) FUGOU2(I)=' ' IZSP(I)=ZSP(I) WRITE(10,*) I WRITE(10,*) (TNAME(SLSP(I,ICO2)),JSCSP(I,ICO2),ICO2=1,L2(I)) + ,FUGOU2(I),IZSP(I) C+2001ts LFLAG4(I)=0 DO 73 J=1,K IF(I .GT. 3 .AND. LSP(I,J) .EQ. 1) LFLAG(I)=1 IF(I .GT. 3 .AND. LSP(I,J) .EQ. 2) LFLAG2(I)=1 IF(I .GT. 3 .AND. LSP(I,J) .EQ. 3) LFLAG3(I)=1 IF(I .GT. 3 .AND. LSP(I,J) .GE. 4) LFLAG4(I)=LFLAG4(I)+1 IF(I .GT. 3 .AND. LSP(I,J) .EQ. 2) LFLAG22(I)=CSP(I,J)

JNC TN8400 2002-024
Page 83: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 77 -

73 CONTINUE J0=I C+2000ts GO TO 230 250 CONTINUE WRITE(10,*) '0' C CLOSE(10) REWIND(10) C OPEN(UNIT=10,FILE='echo4.dat',STATUS='UNKNOWN') 450 CONTINUE READ (10,*) I WRITE(12,*) I IF(I .EQ. 0 ) THEN CLOSE(10) GOTO 455 ENDIF READ(10,'(A200)') TLNAME2(I) C WRITE(12,'(A200)') TLNAME2(I) TLNAME3=TLNAME2(I) LMM=0 DO 265 LM=1,200 IF(TLNAME3(LM:LM).NE.' ') THEN C IF(TLNAME3(LM:LM).NE.'1'.AND. C + TLNAME3(LM+1:LM+1).NE.' ') THEN LMM=LMM+1 TLNAME4(LMM)=TLNAME3(LM:LM) C ENDIF ENDIF 265 CONTINUE C DO LM0=1,LMM WRITE(12,*)(TLNAME4(LM0),LM0=1,LMM) GOTO 450 455 CONTINUE REWIND(12) 460 CONTINUE READ (12,*) I WRITE(13,*) I IF(I .EQ. 0 ) THEN CLOSE(12) GOTO 465 ENDIF READ(12,*) SNAME0(I) IF(I.EQ.2) SNAME0(I)='e-' WRITE(13,*) SNAME0(I) GOTO 460 465 CONTINUE REWIND(13) 470 CONTINUE READ(13,*) I WRITE(14,*) I IF(I .EQ. 0 ) THEN CLOSE(13) GOTO 485 ENDIF READ(13,*) SNAME0(I) C WRITE(14,*) SNAME0(I) SNAM00=SNAME0(I) LLL=0 DO 475 LI=1,15 IF(SNAM00(LI:LI).NE.'1') THEN LLL=LLL+1 TLNAME5(LLL)=SNAM00(LI:LI) ENDIF DO 480 IL=1,10 IF(SNAM00(LI:LI).EQ.'1' + .AND.SNAM00(LI+1:LI+1).EQ.ENUM(IL))THEN LLL=LLL+1 TLNAME5(LLL)=SNAM00(LI:LI) ENDIF 480 CONTINUE DO 483 IL0=1,10 IF(SNAM00(LI:LI).EQ.'1' + .AND.SNAM00(LI-1:LI-1).EQ.ENUM(IL0))THEN

JNC TN8400 2002-024
Page 84: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 78 -

LLL=LLL+1 TLNAME5(LLL)=SNAM00(LI:LI) ENDIF 483 CONTINUE 475 CONTINUE WRITE(14,*) (TLNAME5(LL0),LL0=1,LLL) GOTO 470 485 CONTINUE REWIND(14) 490 CONTINUE READ(14,*) I WRITE(15,*) I IF(I .EQ. 0 ) THEN CLOSE(14) GOTO 260 ENDIF READ(14,*) SNAMEX(I) SNAM01=SNAMEX(I) DO 495 LI2=1,15 IF(SNAM01(LI2:LI2).EQ.'+' + .AND.SNAM01(LI2+1:LI2+1).EQ.'0') SNAM01=SNAM01(:LI2-1) 495 CONTINUE DO 497 KM0=1,15 NCHX(I)=INDEX(SNAM01(KM0:),' ') 497 CONTINUE IF(JSOF(I).NE.1) SNAME(I)=SNAM01 WRITE(15,*) SNAME(I) GOTO 490 C READ MINERALS TO LOOK AT C 260 CONTINUE READ (11,850) CC WRITE (6,*) ' ' I=NLKS 270 CONTINUE I=I+1 C IF (I.LT.501) GO TO 280 IF (I.LT.1001) GO TO 280 C WRITE (6,860) C&& I=40 C&&& I=500 I=1000 280 CONTINUE C READ NAME ETC. READ (11,870) NAMELK(I),NLOOK(I),LK0LK(I),DHLOOK(I),LOOKFL(I) CC WRITE(6,870) NAMELK(I),NLOOK(I),LK0LK(I),DHLOOK(I),LOOKFL(I) C IF (NAMELK(I).NE.DELETE) GO TO 290 I=0 NLOOKS=I GO TO 270 290 CONTINUE IF (NLOOK(I).EQ.0) GO TO 340 C CHECK TO SEE IF MINERAL IS ALREADY IN THE LIST IF (I.LE.1) GO TO 310 L=I-1 DO 300 N=1,L IF (NAMELK(I).NE.NAMELK(N)) GO TO 300 NLOOK(N)=NLOOK(I) LK0LK(N)=LK0LK(I) DHLOOK(N)=DHLOOK(I) LOOKFL(N)=LOOKFL(I) I=I-1 GO TO 320 300 CONTINUE 310 CONTINUE N=I NLOOKS=I C N IS THE NUMBER FOR THE MINERAL BEING READ. 320 CONTINUE C READ COEFFICIENTS K=NLOOK(N) READ (11,550) (LLOOK(N,J),CLOOK(N,J),J=1,K)

JNC TN8400 2002-024
Page 85: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 79 -

C+2000ts NHSUM(N)=0 NOSUM(N)=0 NT(N)=0 ICO=0 ICO3=0 DO 910 IJ=1,K NO=0 NH=0 K2=NSP(LLOOK(N,IJ)) IF(K2 .GE. 2) THEN LBOOK(N,IJ)=LLOOK(N,IJ) ENDIF DO 77 IJ2=1,K2 NH2=0 NO2=0 C SPN3=SNAME(LSP(LLOOK(N,IJ),IJ2)) IP3=0 C DO 80 MI=1,26 DO 85 MM=1,8 IF(SPN3(MM:MM).EQ.')') THEN DO 87 MM1=1,9 IF(SPN3(MM+1:MM+1).EQ.ANUM(MM1)) IP3=MM1 87 CONTINUE ENDIF INAL2=8 CALL COUNT2(SPN3,ALF,ALF2,ANUM,MM,MI,N,IJ,IJ2, + INAL2,IP3,NH2,CSP,CLOOK,LLOOK) C INAL2=15 CALL COUNT2(SPN3,ALF,ALF2,ANUM,MM,MI,N,IJ,IJ2, + INAL2,IP3,NO2,CSP,CLOOK,LLOOK) 85 CONTINUE 80 CONTINUE C NH=NH+NH2 NO=NO+NO2 C SNAME(LSP(LLOOK(N,IJ),IJ2))=SPN3 IF(LSP(LLOOK(N,IJ),IJ2).GT.3.AND + .LLOOK(N,IJ).GE.64 ) THEN LLOOK2(N,IJ)=LSP(LLOOK(N,IJ),IJ2) CLOOK2(N,IJ)=CSP(LLOOK(N,IJ),IJ2)*CLOOK(N,IJ) ENDIF 77 CONTINUE CCC NHSUM(N)=NHSUM(N)+NH NOSUM(N)=NOSUM(N)+NO CXXX--MODIFIED BY HASHI A IFLAG = 0 DO 100 IJ2=1,K2 IF(LSP(LLOOK(N,IJ),IJ2) .LE. 3) THEN IFLAG = IFLAG + 1 END IF 100 CONTINUE CXXX--------------------B IF(LLOOK(N,IJ) .GE. 4 ) THEN CXXX--MODIFIED BY HASHI A IF(IFLAG .EQ. K2) THEN GO TO 105 END IF CXXX--------------------B ICO=ICO+1 MLOOK(N,ICO)=LLOOK(N,IJ) MCLOOK(N,ICO)=CLOOK(N,IJ) CXXX--MODIFIED BY HASHI A 105 CONTINUE CXXX--------------------B ENDIF C IF(LLOOK(N,IJ) .GE.64) THEN

JNC TN8400 2002-024
Page 86: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 80 -

MLOOK(N,ICO)=LLOOK2(N,IJ) MCLOOK(N,ICO)=CLOOK2(N,IJ) ENDIF LLOOK3(N,IJ)=LLOOK(N,IJ) CLOOK3(N,IJ)=CLOOK(N,IJ) 910 CONTINUE IF(NHSUM(N).GT.0) THEN ICO=ICO+1 MLOOK(N,ICO)=1 MCLOOK(N,ICO)=NHSUM(N) ENDIF IF(NOSUM(N).GT.0) THEN ICO=ICO+1 MLOOK(N,ICO)=2 MCLOOK(N,ICO)=NOSUM(N) ENDIF C GO TO 1100 CC IF(N1SUM(N).NE.0) THEN ICO3=ICO3+1 LLOOK3(N,ICO3)=1 CLOOK3(N,ICO3)=N1SUM(N) ENDIF IF(N2SUM(N).NE.0) THEN ICO3=ICO3+1 LLOOK3(N,ICO3)=2 CLOOK3(N,ICO3)=N2SUM(N) ENDIF IF(N3SUM(N).NE.0) THEN ICO3=ICO3+1 LLOOK3(N,ICO3)=3 CLOOK3(N,ICO3)=N3SUM(N) ENDIF 1100 CONTINUE C ICO3=K CC L1(N)=ICO LL(N)=ICO3 C READ ANALYTIC EXPRESSION IF (LOOKFL(N).EQ.0) GO TO 330 READ (11,570) (ALOOK(N,J),J=1,5) 330 CONTINUE CC CC GO TO 270 340 CONTINUE C C+2000ts NM=N C WRITE(6,*) 'NM= ',NM C WRITE(6,*) 'J0!!=',J0 C CLOSE(5) DO 79 JN=4,I0-1 C DO 279 I=1,3000 DO 279 I=1,J0 IF(LFLAG2(I) .EQ. 1) THEN C IF(LFLAG(I).EQ.1. OR . LFLAG3(I).EQ.1) THEN K=NSP(I) DO 178 J=1,K IF( LSP(I,J).EQ.JN )THEN C IF(NSP(I).GE.2.AND.NSP(I).LE.4.AND.JJN(JN).EQ.0. + AND.LFLAG4(I).EQ.1.AND.JJN2(JN).EQ.0) THEN VALN(JN,I)=(ZSP(I)-NHSUM2(I)+2.0D0*NOSUM2(I))/CSP(I,J) TGFW4(JN,I)=TGFW2(JN)*CSP(I,J)+16.0*NOSUM2(I)+NHSUM2(I) LFLAG5(I)=1 LFLAG6(JN)=1 ENDIF ENDIF 178 CONTINUE ENDIF

JNC TN8400 2002-024
Page 87: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 81 -

C ENDIF 279 CONTINUE 79 CONTINUE C+2000t DO 81 JN=4,I0-1 VMAX(JN)=0.0D0 VMIN(JN)=0.0D0 C DO 313 I=1,3000 DO 313 I=1,J0 K=NSP(I) DO 311 J=1,K IF( LSP(I,J).EQ.JN )THEN IF(VALN(JN,I).GT.VMAX(JN)) THEN VMAX(JN)=VALN(JN,I) ELSE IF(VALN(JN,I).GE.VMIN(JN)) THEN CONTINUE ELSE VMIN(JN)=VALN(JN,I) ENDIF ENDIF 311 CONTINUE 313 CONTINUE 81 CONTINUE C IZ=0 DO 321 JN=4,I0-1 IV=0 DO 327 IX=VMIN(JN),VMAX(JN) IZ=IZ+1 IY=0 C DO 323 I=1,3000 DO 323 I=1,J0 K=NSP(I) DO 325 J=1,K IF( LSP(I,J).EQ.JN .AND.LFLAG5(I).EQ.1 )THEN IF(VALN(JN,I).EQ.IX) THEN IY=IY+1 C IF(VB .NE. VALN(JN,I)) IV=IV+1 VB=VALN(JN,I) ISC(JN,IY)=I IVFLAG(JN)=1 IXFLAG(JN,IX)=1 WRITE(*,*) JN,'V= ',VALN(JN,I),SNAME2(I),' IY=',IY OPEN(UNIT=7,FILE='log72.dat',STATUS='UNKNOWN') WRITE(7,*) JN,'V= ',VALN(JN,I),SNAME2(I),' IY=',IY C WRITE(*,*) NOSUM2(I),NHSUM2(I),TGFW4(JN,I) ENDIF ENDIF 325 CONTINUE 323 CONTINUE IF(IVFLAG(JN).EQ.1 .AND.IXFLAG(JN,IX).EQ.1) THEN WRITE(*,*) 'do not select = 0,select=IY' READ(*,*) MS2 WRITE(7,*) 'do not select = 0,select=IY' WRITE(7,*) MS2 C MS2=1 IF(MS2 .EQ. 0) THEN IY=MS2 MFLAG1(ISC(JN,IY))=2 NRD0(JN)=JN C WRITE(*,*) 'do not select = 0',SNAME(ISC(JN,IY)) ENDIF C IF(MS2 .EQ. 1) THEN IF(MS2 .GE. 1) THEN IY=MS2 IV=IV+1 MFLAG1(ISC(JN,IY))=1 C WRITE(*,*)'select=IY',SNAME(ISC(JN,IY)), C + LFLAG(ISC(JN,IY)),LFLAG2(ISC(JN,IY)),LFLAG3(ISC(JN,IY)) JJN(JN)=JN ISEC2(JN,IV)=ISC(JN,IY) C VALN2(JN,IV)=VALN(JN,ISEC(JN)) VALN2(JN,IV)=VALN(JN,ISEC2(JN,IV))

JNC TN8400 2002-024
Page 88: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 82 -

TGFW5(JN,IV)=TGFW4(JN,ISEC2(JN,IV)) C WRITE(6,*) 'V0=',VALN(JN,ISEC(JN)),VALN2(JN,IV) ENDIF ENDIF 327 CONTINUE IV2(JN)=IV C WRITE(6,*)JN,' IV2=',IV2(JN) 321 CONTINUE DO 83 JN=4,I0-1 C DO 315 I=1,3000 DO 315 I=1,J0 IF(LFLAG2(I) .EQ. 1) THEN C IF(MFLAG1(I).EQ.2) GOTO 83 IF(MFLAG1(I).EQ.2) GOTO 315 K=NSP(I) DO 317 J=1,K C WRITE(*,*)I,LFLAG(I),LFLAG2(I),LFLAG3(I),SNAME(I) IF( LSP(I,J).EQ.JN )THEN IF(LFLAG(I).EQ.1. OR . LFLAG3(I).EQ.1.OR. + LFLAG2(I).EQ.1) THEN IF(MFLAG1(I).EQ.0) THEN IF(IV2(JN).GT.0) THEN C WRITE(6,*) '!!!', JN,SNAME(ISEC2(JN,IV)) WRITE(*,*) SNAME2(I), + ( IV,SNAME2(ISEC2(JN,IV)),IV=1,IV2(JN)) WRITE(*,*) 'Do you select number ? ' READ(*,*) MS4 C MS4=1 OPEN(UNIT=7,FILE='log72.dat',STATUS='UNKNOWN') WRITE(7,*) SNAME2(I), + ( IV,SNAME2(ISEC2(JN,IV)),IV=1,IV2(JN)) WRITE(7,*) 'Do you select number ? ' WRITE(7,*) MS4 C IF(MS4 .EQ. 1 .AND.NRD20(I).EQ.0) THEN IF(MS4 .GE. 1 .AND.NRD20(I).EQ.0) THEN IV=MS4 ISEC(I,JN)=ISEC2(JN,IV) NRD20(I)=JN ENDIF IF(NRD20(I).GT.0 .AND.NRD20(I).NE.JN) THEN NRD21(I)=JN IV=MS4 ISEC(I,JN)=ISEC2(JN,IV) ENDIF ENDIF C WRITE(7,*) 'NRD=',JN,NRD0(JN),NRD(I),NRD20(I),NRD21(I),JJN(JN) C IF(NRD(I).EQ.0 .AND.NRD20(I).EQ.0) NRD(I)=JN IF(NRD(I).EQ.0 .AND.NRD20(I).NE.JN.AND.NRD0(JN).NE.JN + .AND.JJN(JN).EQ.JN.AND.NRD20(I).NE.0 ) NRD(I)=JN WRITE(7,*) LFLAG2(I),'NRD',NRD(I),'I',I,SNAME(I), + ZSP(LSP(I,J)),DIF01,'ISEC= ',ISEC(I,JN), SNAME(ISEC(I,JN)) ENDIF ENDIF ENDIF 317 CONTINUE ENDIF 315 CONTINUE 83 CONTINUE C DO 415 I=1,J0 IF(NRD(I).GT.0) NRFLAG(I)=NRFLAG(I)+1 IF(NRD20(I).GT.0) NRFLAG(I)=NRFLAG(I)+1 IF(NRD21(I).GT.0) NRFLAG(I)=NRFLAG(I)+1 415 CONTINUE C C DO 410 INS=1,3000 DO 410 INS=1,J0 K2=NSP(INS) DO 412 IMS=1,K2 IF(LSP(INS,IMS).GT.50) GOTO 400 412 CONTINUE IF(K2.EQ.0) GOTO 400

JNC TN8400 2002-024
Page 89: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 83 -

C+2000ts WRITE(7,*)'NRD',INS,NRD(INS),NRD20(INS),NRD21(INS) C IF(LFLAG2(INS).EQ.1.AND.NRD(INS).GT.0) THEN IF(NRD(INS).EQ.NRD21(INS)) NRD21(INS)=0 IF(LFLAG2(INS).EQ.1.AND. + (NRD(INS).GT.0 .OR. NRD20(INS).GT.0)) THEN IF(ISEC(INS,NRD(INS)).GT.0 .OR. ISEC(INS,NRD20(INS)).GT.0. + OR.ISEC(INS,NRD21(INS)).GT.0) THEN C WRITE(6,*) 'NSP(INS)= ',INS,NSP(INS),NRD(INS) C WRITE(6,*)'NRD',NRD(INS),NRD2(INS) WRITE(*,*)SNAME2(INS) WRITE(*,*)'Do you replace A,B?' WRITE(7,*)SNAME2(INS) WRITE(7,*)'Do you replace A,B?' IF(NRD(INS).GT.0 .AND.ISEC(INS,NRD(INS)).GT.0) THEN WRITE(*,*)'A ',SNAME2(NRD(INS)), + 'B ',SNAME2(ISEC(INS,NRD(INS))) WRITE(*,*) 'yes =1, no=0 ' READ(*,*) MT WRITE(7,*)'A ',SNAME2(NRD(INS)), + 'B ',SNAME2(ISEC(INS,NRD(INS))) WRITE(7,*) 'yes =1, no=0 ' WRITE(7,*) MT ENDIF IF(NRD(INS).EQ.0.AND.NRD20(INS).GT.0 ) THEN WRITE(*,*)'A ',SNAME2(NRD20(INS)), + 'B ',SNAME2(ISEC(INS,NRD20(INS))) WRITE(*,*) 'yes =1, no=0 ' READ(*,*) MT WRITE(7,*)'A ',SNAME2(NRD20(INS)), + 'B ',SNAME2(ISEC(INS,NRD20(INS))) WRITE(7,*) 'yes =1, no=0 ' WRITE(7,*) MT ENDIF C MT=1 IF(NRD(INS).GT.0.AND.NRD20(INS).GT.0 ) THEN WRITE(*,*)'A ',SNAME2(NRD20(INS)), + 'B ',SNAME2(ISEC(INS,NRD20(INS))) WRITE(*,*) 'yes =1, no=0 ' READ(*,*) MT2 WRITE(7,*)'A ',SNAME2(NRD20(INS)), + 'B ',SNAME2(ISEC(INS,NRD20(INS))) WRITE(7,*) 'yes =1, no=0 ' WRITE(7,*) MT2 ENDIF C MT2=1 IF(NRD20(INS).GT.0.AND.NRD21(INS).GT.0 ) THEN WRITE(*,*)'A ',SNAME2(NRD21(INS)), + 'B ',SNAME2(ISEC(INS,NRD21(INS))) WRITE(*,*) 'yes =1, no=0 ' READ(*,*) MT2 WRITE(7,*)'A ',SNAME2(NRD21(INS)), + 'B ',SNAME2(ISEC(INS,NRD21(INS))) WRITE(7,*) 'yes =1, no=0 ' WRITE(7,*) MT2 ENDIF C MT2=1 C WRITE(7,*) 'MT0=',MT,'MT02=',MT2 IF(MT.EQ.0) GOTO 400 MRD=0 MRD2=0 219 CONTINUE MRD2=MRD2+1 C MRD3=0 WRITE(7,*) 'MT=',MT,'MT2=',MT2 IF(MT.EQ.1) THEN IF(NRD(INS).EQ.0) THEN NRD(INS)=NRD20(INS) NRD20(INS)=NRD21(INS) NRD21(INS)=0 ENDIF C WRITE(7,*) 'NSP(INS)',NSP(INS)

JNC TN8400 2002-024
Page 90: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 84 -

DO 119 JR=1,NSP(INS) WRITE(7,*) NRD(INS),LSP(INS,JR) IF(NRD(INS).EQ.LSP(INS,JR) + .AND.ISEC(INS,NRD(INS)).NE.0 ) THEN WRITE(7,*) JR,'ISEC=',ISEC(INS,NRD(INS)),NSP(ISEC(INS,NRD(INS))) C LSP(INS,JR)=ISEC(LSP(INS,JR)) LSP(INS,JR)=ISEC(INS,NRD(INS)) DO 116 KR=1,NSP(LSP(INS,JR)) IF(LSP(LSP(INS,JR),KR).EQ.NRD(INS)) THEN CSP00(INS)=CSP(LSP(INS,JR),KR) C WRITE(*,*)'CSP00=',CSP00(INS) ENDIF 116 CONTINUE DO 117 KR=1,NSP(LSP(INS,JR)) CSP0(INS,KR)=(CSP(INS,JR)*CSP(LSP(INS,JR),KR)) + /CSP00(INS) WRITE(7,*) LSP(INS,KR),LSP(ISEC(INS,NRD(INS)),KR), + 'CSP0=',CSP0(INS,KR) 117 CONTINUE DO 217 KR=1,NSP(LSP(INS,JR)) IF(LSP(LSP(INS,JR),KR).EQ.NRD(INS)) THEN C CSP(INS,JR)=CSP0(INS,KR) CSP(INS,JR)=CSP(INS,JR)/CSP00(INS) CSPX(INS,JR)=CSP(INS,JR) WRITE(7,*) 'CSP(INS,JR)',CSP(INS,JR) JJR=JR ENDIF 217 CONTINUE ENDIF 119 CONTINUE C MRD3=0 201 CONTINUE MRD4=0 C DO 205 JR=1,NSP(INS) JR=0 205 CONTINUE JR=JR+1 IF(MRD4.GT.0.AND.MRD5.GT.0 ) JR=JR-1 WRITE(7,*) 'NSP0=',NSP(ISEC(INS,NRD(INS))),'NSP1=', + NSP(INS),'MRD! =',MRD3,'MRD4!=',MRD4,MRD5 IF(NSP(ISEC(INS,NRD(INS))).GT.NSP(INS) .AND.MRD3.EQ.0 C + .AND.MRD.EQ.1 .AND.MRD4.EQ.0.0) THEN + .AND.MRD4.EQ.0.0) THEN NSP(INS)=NSP(ISEC(INS,NRD(INS)))+1 C IF(MT2.EQ.0) K2=NSP(INS) IF(MRD.EQ.0) K2=NSP(INS) MRD3=MRD3+1 GOTO 201 ENDIF C MRD5=0 DO 118 KR=1,NSP(ISEC(INS,NRD(INS))) C 122 CONTINUE WRITE(7,*)'LSP!!!',LSP(INS,JR),CSP(INS,JR),CSP0(INS,KR),JR WRITE(7,*)'LSP!!!!',LSP(ISEC(INS,NRD(INS)),KR) WRITE(7,*)'NSP(INS)',NSP(INS),K2,KR,MRD5 IF(MRD.GT.0.AND.CSP(INS,JR).EQ.0.0 + .AND.NRD(INS).NE.LSP(ISEC(INS,NRD(INS)),KR) + .AND.MRD5.EQ.0 + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-1) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-2) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-3) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,1) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,2) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,3)) THEN CSP(INS,JR)=CSP(INS,JR)-CSP0(INS,KR) WRITE(7,*) '$$$$$' LSP(INS,JR)=LSP(ISEC(INS,NRD(INS)),KR) C K2=K2+1 IF(MRD3.EQ.0) K2=K2+1 IF(MRD3.GT.0 .AND.MRD.GT.0) K2=K2+1 GOTO 118

JNC TN8400 2002-024
Page 91: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 85 -

ENDIF IF(LSP(ISEC(INS,NRD(INS)),KR).EQ.LSP(INS,JR) + .AND.CSP(INS,JR).NE.0.0) THEN C + .AND.MRD5.EQ.0) THEN CSP(INS,JR)=CSP(INS,JR)-CSP0(INS,KR) WRITE(7,*)'CSP(INS,JR)=',CSP(INS,JR) IF(CSP(INS,JR).EQ.0.0.AND.MRD4.LE.2.0 ) THEN MRD4=MRD4+1 MRD5=MRD5+1 MSP(INS,MRD,MRD4)=LSP(INS,JR) IF(NRD20(INS).EQ.0 ) NSP(INS)=NSP(INS)-1 C NSP(INS)=NSP(INS)-1 K2=K2-1 LSP(INS,JR)=LSP(INS,JR+1) CSP(INS,JR)=CSP(INS,JR+1) IF(LSP(INS,JR).EQ.0) CSP(INS,JR)=0.0 WRITE(7,*) 'LSP(INS,JR)',CSP(INS,JR),LSP(INS,JR) CSP(INS,JR+1)=CSP(INS,JR+2) LSP(INS,JR+1)=LSP(INS,JR+2) C+ts2001 CSP(INS,JR+2)=CSP(INS,JR+3) LSP(INS,JR+2)=LSP(INS,JR+3) CSP(INS,JR+3)=0.0 LSP(INS,JR+3)=0.0 GOTO 205 C+ts2001 ENDIF ENDIF C 118 CONTINUE WRITE(7,*) 'MRD3! =',MRD3,CSP(INS,JR) WRITE(7,*)'MRD41=',MRD4,MSP(INS,MRD,1), + MSP(INS,MRD,2),MSP(INS,MRD,3) C WRITE(*,*)'MRD5=',MRD5 C DO 218 KR=1,NSP(ISEC(NRD(INS))) IF(LSP(INS,JR).EQ.0 .AND. + LSP(ISEC(INS,NRD(INS)),KR).LE.3 .AND. + LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-1) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-2) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.LSP(INS,JR-3) C + .AND.MRD4.EQ.0 + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,1) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,2) + .AND.LSP(ISEC(INS,NRD(INS)),KR).NE.MSP(INS,MRD,3)) THEN C + .AND.MRD3.GT.0 ) THEN LSP(INS,JR)=LSP(ISEC(INS,NRD(INS)),KR) CSP(INS,JR)=-1.0D0*CSP0(INS,KR) IF(MRD3 .EQ. 0 ) K2=K2+1 C K2=K2+1 C LSP(ISEC(NRD(INS)),KR)=0 C WRITE(6,*) 'CSP2! =',CSP(INS,JR) ENDIF 118 CONTINUE IF(JR.LT.NSP(INS)) GOTO 205 WRITE(7,*) 'NSP!!!',NSP(INS),'K2=',K2 WRITE(7,*)'CSP(INS,JJR)',CSP0(INS,JJR) C NSP(INS)=K2 C IF(MRD.GT.0) NSP(INS)=K2 C 205 CONTINUE C LKT0SP(INS)=LKT0SP(INS)-CSPX(INS,JJR)*LKT0SP(ISEC(INS,NRD(INS))) DO 121 JA=1,5 ASP(INS,JA)=ASP(INS,JA)-CSPX(INS,JJR)*ASP(ISEC(INS,NRD(INS)),JA) 121 CONTINUE ENDIF C IF(NRD20(INS).GT.0 .AND.MRD.EQ.0 .AND.MT2.EQ.1) THEN NRD(INS)=NRD20(INS) MRD=MRD+1 GOTO 219 ENDIF NSP(INS)=K2 ENDIF ENDIF

JNC TN8400 2002-024
Page 92: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 86 -

400 CONTINUE 410 CONTINUE C+2000ts 89 CONTINUE OPEN(UNIT=6,FILE='testmc86.dat',STATUS='UNKNOWN') WRITE(6,*) 'SOLUTION_MASTER_SPECIES ' WRITE(6,*) '#' WRITE(6,725) WRITE(6,*) '#' WRITE (6,741) 'H','H+','-1.0','H','1.008' WRITE (6,741) 'H(0)','H2','0.0','H',' ' WRITE (6,741) 'H(1)','H+','-1.0','0.0',' ' WRITE (6,740) 'E','e-',ALKK,'0.0','0.0' WRITE (6,740) 'O','H2O',ALKK,'O','16.0' WRITE (6,740) 'O(0)','O2',ALKK,'O',' ' WRITE (6,740) 'O(-2)','H2O',ALKK,'0.0',' ' DO 345 I00=4,I0-1 IE=NELT(I00) WRITE (6,745) TNAM(IE),TNAM2(IE),ALKK, + TGFW(IE),TGFW2(IE) C IF(TNAM(IE).EQ.'C') THEN C WRITE (6,740) C + 'C(+4)','CO3-2',ALKK,'HCO3',' ' C IF(TNAM(IE).EQ.'C') C WRITE (6,741) C + 'C(-4)','CH4','0.0','CH4',' ' C IF(TNAM(IE).EQ.'C') THEN C WRITE (6,742) 'Alkalinity','CO3-2', C +'1.0','Ca0.5(CO3)0.5','50.05' C GOTO 345 C ENDIF C C WRITE(6,*) 'IE=',IE SPN6=TNAM(IE) DO 82 KM=1,2 NCH(IE)=INDEX(SPN6(KM:),' ') 82 CONTINUE C WRITE(6,*) 'NC=',NCH(IE) IF(JJN(IE).EQ. IE ) THEN JZSP(IE)=ZSP(IE) C JZSP(ISEC(IE))=ZSP(ISEC(IE)) C WRITE(6,*) 'NHSUM2',NHSUM2(IE),'NOSUM2',NOSUM2(IE) TGFW3(IE)=TGFW2(IE)+16.0*NOSUM2(IE)+NHSUM2(IE) IF(NOSUM2(IE).GT.0) THEN JZSP(IE)=ZSP(IE)+2*NOSUM2(IE)-NHSUM2(IE) ENDIF IF(JZSP(IE).GT.0.0) THEN FUGOU0(IE)='+' IF(NCH(IE).EQ.2) THEN WRITE(6,743) + TNAM(IE),'(',FUGOU0(IE),JZSP(IE),')',TNAM2(IE),ALKK, + TGFW3(IE) ENDIF IF(NCH(IE).EQ.1) THEN WRITE(6,753) + TNAM(IE),'(',FUGOU0(IE),JZSP(IE),')',TNAM2(IE),ALKK, + TGFW3(IE) ENDIF ENDIF IF(JZSP(IE).EQ.0.0) THEN IF(NCH(IE).EQ.2) THEN WRITE(6,764) + TNAM(IE),'(',JZSP(IE),')',TNAM2(IE),ALKK,TGFW3(IE) ENDIF IF(NCH(IE).EQ.1) THEN WRITE(6,774) + TNAM(IE),'(',JZSP(IE),')',TNAM2(IE),ALKK,TGFW3(IE) ENDIF ENDIF IF(JZSP(IE).LT.0.0) THEN IF(NCH(IE).EQ.2) THEN WRITE(6,744) + TNAM(IE),'(',JZSP(IE),')',TNAM2(IE),ALKK,TGFW3(IE)

JNC TN8400 2002-024
Page 93: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 87 -

ENDIF IF(NCH(IE).EQ.1) THEN WRITE(6,754) + TNAM(IE),'(',JZSP(IE),')',TNAM2(IE),ALKK,TGFW3(IE) ENDIF ENDIF C WRITE(6,*) FUGOU0(IE),JZSP(IE) C WRITE(6,*) 'L6 = ',LFLAG6(IE),' IV2=',IV2(IE) IF(LFLAG6(IE).EQ.1) THEN DO 350 KE=1,IV2(IE) SPN5=SNAME(ISEC2(IE,KE)) SPN6=SNAME(ISEC2(IE,KE)) DO 57 JN=1,26 DO 135 JM=2,8 IF(SPN5(JM:JM).EQ.' ') SPN5=SPN5(:JM-1) C+TS2001 IF(SPN5(JM:JM).EQ. ALF(5). + AND.SPN5(JM-1:JM-1).EQ.ALF(19)) + SPN5(JM:JM)=ALF2(5) C+TS2001 135 CONTINUE 57 CONTINUE SNAME(ISEC2(IE,KE))=SPN5 C WRITE(6,*) VALN2(IE,KE),ISEC2(IE,KE) JVALN2(IE,KE)=VALN2(IE,KE) IF(VALN2(IE,KE).GT.0.0) THEN FUGOU00(IE,KE)='+' IF(NCH(IE).EQ.2) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,743) C + TNAM(IE),'(',FUGOU00(IE,KE),JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,743) + TNAM(IE),'(',FUGOU00(IE,KE),JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF IF(NCH(IE).EQ.1) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,753) C + TNAM(IE),'(',FUGOU00(IE,KE),JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,753) + TNAM(IE),'(',FUGOU00(IE,KE),JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF ENDIF IF(VALN2(IE,KE).EQ.0.0) THEN IF(NCH(IE).EQ.2) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,764) C + TNAM(IE),'(',JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,764) + TNAM(IE),'(',JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF IF(NCH(IE).EQ.1) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,774) C + TNAM(IE),'(',JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,774)

JNC TN8400 2002-024
Page 94: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 88 -

+ TNAM(IE),'(',JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF ENDIF IF(VALN2(IE,KE).LT.0.0) THEN C IF(SNAME(ISEC2(IE,KE)).EQ.'CH4') GOTO 58 C FUGOU00(IE,KE)='-' IF(NCH(IE).EQ.2) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,744) C + TNAM(IE),'(',JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,744) + TNAM(IE),'(',JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF IF(NCH(IE).EQ.1) THEN C IF(NCHX(IE).GE.8) C + WRITE(6,754) C + TNAM(IE),'(',JVALN2(IE,KE),')', C + SNAMEX(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), C + TGFW5(IE,KE) C IF(NCHX(IE).LT.8) WRITE(6,754) + TNAM(IE),'(',JVALN2(IE,KE),')', + SNAME(ISEC2(IE,KE)),ALKSP(ISEC2(IE,KE)), + TGFW5(IE,KE) ENDIF C 58 CONTINUE ENDIF 350 CONTINUE ENDIF C ENDIF 345 CONTINUE WRITE(6,*) ' ' WRITE(6,765) C+2000ts C C DO 110 INS=1,3000 DO 110 INS=1,J0 K2=NSP(INS) IF(K2.EQ.0) GOTO 140 DO 115 INM1=1,NM C+2000ts C DO 115 INM1=1,300 DO 120 INM2=1,10 IF( INS.EQ.LBOOK(INM1,INM2)) INSF(INS)=1 120 CONTINUE 115 CONTINUE CC IF(INSF(INS).EQ.1 .OR.NSP(INS).EQ.1 CCC IF(INSF(INS).EQ.1 .OR.JSOF(INS).EQ.1 C +.OR. ISOF(INS).EQ.1 ) THEN CCC +.OR. MFLAG1(INS).EQ.1 ) THEN IF(JSOF(INS).EQ.1) THEN SPN4=SNAME(INS) DO 125 JN=1,26 DO 130 JM=2,8 IF(SPN4(JM:JM).EQ.' ') SPN4=SPN4(:JM-1) 130 CONTINUE 125 CONTINUE SNAME(INS)=SPN4 WRITE(6,*) ' ' FMT0(3)=FMT2(K2) WRITE(6,FMT0) +(CSP(INS,J2),SNAME(LSP(INS,J2)),J2=1,K2) + ,SNAME(INS) ELSE WRITE(6,*) ' '

JNC TN8400 2002-024
Page 95: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 89 -

DO 555 JJ2=1,K2 IF(CSP(INS,JJ2) .GE. 0) FUGOU(INS,JJ2)='+' IF(CSP(INS,JJ2) .LT.0) FUGOU(INS,JJ2)=' ' CC IF(ZSP(INS) .GE. 0) FUGOU2=PLUS CC IF(ZSP(INS) .LT.0) FUGOU2=MINUS 555 CONTINUE IF(ZSP(INS) .GE. 0.0) FUGOU2(INS)='+' IF(ZSP(INS) .LT. 0.0) FUGOU2(INS)=' ' IZSP(INS)=ZSP(INS) FMT(2)=FMT2(K2) FMT01(2)=FMT2(K2) C FMT(8)=FMT2(L2(INS)) C FMT01(8)=FMT2(L2(INS)) C IF(NCHX(INS).GE.8) WRITE(6,FMT) +(FUGOU(INS,J2),CSP(INS,J2),SNAME(LSP(INS,J2)),J2=1,K2), +SNAME(INS) C IF(NCHX(INS).LT.8) C + WRITE(6,FMT01) C +(FUGOU(INS,J2),CSP(INS,J2),SNAME(LSP(INS,J2)),J2=1,K2), C +SNAME(INS) C +(TNAME(SLSP(INS,ICO2)),JSCSP(INS,ICO2),ICO2=1,L2(INS)) C + ,FUGOU2(INS),IZSP(INS) C +(TNAME(SLSP(INS,ICO2)),SCSP(INS,ICO2),ICO2=1,8),ZSP(INS) ENDIF WRITE(6,825) LKT0SP(INS) WRITE(6,827) DHSP(INS) WRITE(6,824) (ASP(INS,J),J=1,5) IF(GFLAG(INS).EQ.1) THEN WRITE(6,806) (ADHSP(INS,J),J=1,2) ELSEIF (GFLAG(INS).EQ.0 .AND. DHA(INS).GT.0.0) THEN WRITE(6,807) DHA(INS),(ADHSP(INS,J),J=1,2) ENDIF 140 CONTINUE 110 CONTINUE CC WRITE (6,*) ' ' WRITE (6,855) C DO 145 MK1=1,300 DO 145 MK1=1,NM IF(NLOOK(MK1) .EQ. 0) GOTO 150 WRITE(6,*) ' ' WRITE(6,885) NAMELK(MK1) CC FMT3(2)=FMT2(L1(MK1)) FMT3(8)=FMT2(LL(MK1)) WRITE(6,FMT3) +(TNAME(MLOOK(MK1,ICO)),MCLOOK(MK1,ICO),ICO=1,L1(MK1)), +(CLOOK3(MK1,ICO3),SNAME(LLOOK3(MK1,ICO3)),ICO3=1,LL(MK1)) WRITE(6,825) LK0LK(MK1) WRITE(6,827) DHLOOK(MK1) WRITE(6,824) (ALOOK(MK1,J),J=1,5) 150 CONTINUE 145 CONTINUE CCC NLKS=NLOOKS WRITE(6,*) ' ' WRITE(6,*) 'END' 550 FORMAT ((5(I4,F11.3))) 560 FORMAT ((1X,5(I4,G11.3))) 570 FORMAT (5E12.5) 580 FORMAT (1X,1P5E12.4) 720 FORMAT (1X,'ELEMENTS') 725 FORMAT ('#element species',5X,'alk',3X,'gfw_formula', + 3X,'element_gfw') CC730 FORMAT (A9,1X,I2,3X,F10.0) 730 FORMAT (A9,1X,I2,3X,F10.0,3X,A9) CC740 FORMAT (1X,A12,2X,I2,3X,E16.5) 740 FORMAT (A9,1X,A12,3X,F3.1,2X,A9,2X,A9) 741 FORMAT (A9,1X,A9,3X,A9,2X,A9,2X,A9) 742 FORMAT (A10,1X,A9,3X,A9,2X,A13,2X,A9) C+2000ts 743 FORMAT (A2,A1,A1,I1,A1,3X,A12,2X,E16.5,E16.5)

JNC TN8400 2002-024
Page 96: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 90 -

753 FORMAT (A1,A1,A1,I1,A1,3X,A12,2X,E16.5,E16.5) 744 FORMAT (A2,A1,I2,A1,3X,A12,2X,E16.5,E16.5) 754 FORMAT (A1,A1,I2,A1,3X,A12,2X,E16.5,E16.5) 764 FORMAT (A2,A1,I1,A1,3X,A12,2X,E16.5,E16.5) 774 FORMAT (A1,A1,I1,A1,3X,A12,2X,E16.5,E16.5) C+2000ts 745 FORMAT (A9,1X,A9,3X,F3.1,2X,E16.5,1X,E16.5) 750 FORMAT (1X,I4,2X,A8,5X,A8,' INDEX NUMBER IS OUT OF RANGE.'//1X,'CA 1LCULATION TERMINATED.') 760 FORMAT (1X,'SPECIES') 765 FORMAT ('SOLUTION_SPECIES') 770 FORMAT (I4) 780 FORMAT (1X,I4) 790 FORMAT (A8,2X,I3,I1,I1,6F10.3) 800 FORMAT (1X,A8,2X,I3,I1,I1,6F10.3) 805 FORMAT (1X,A8,'=',A8) 806 FORMAT (5X,'-gamma',F10.3,3X,F10.3) 807 FORMAT (5X,'-gamma',F10.3,3X,F10.3,3X,F10.3) CC809 FORMAT (1X,6(I3,F7.3),'=',A8) 810 FORMAT (2F10.3,5E12.5) 820 FORMAT (1X,2F10.3,5G12.5) 825 FORMAT (5X,'log_k',5X,F10.3) 827 FORMAT (5X,'delta_h',5X,F10.3) 824 FORMAT (5X,'-analytic',5G12.5) 830 FORMAT (6(I3,F7.3)) 840 FORMAT ((1X,6(I3,F7.3))) 850 FORMAT (1X,'LOOK MIN') 855 FORMAT ('PHASES') 860 FORMAT (1X,'***** LOOK MIN ARRAY ALREADY HAS 500 MINERALS. *****') 870 FORMAT (A8,2X,I2,13X,2F10.2,5X,I1) 880 FORMAT (1X,A8,2X,I2,13X,2G10.3,5X,I1) 885 FORMAT (1X,A8) STOP END CC CC SUBROUTINE COUNT(SPN2,ALF,ANUM,NN,NI,I,J,INAL,IP2,NS,CSP) IMPLICIT REAL*8 (A-H,O-Z) REAL*8 NS CHARACTER *12 SPN2 CHARACTER *1 ALF,ANUM DIMENSION ALF(26),CSP(10000,6),NS(10000,10),ANUM(9) CC IF(SPN2(NN:NN).EQ.ALF(INAL)) THEN IF(SPN2(NN+1:NN+1).EQ.ALF(NI) + .OR.SPN2(NN+1:NN+1).EQ.'+' + .OR.SPN2(NN+1:NN+1).EQ.'-' + .OR.SPN2(NN+1:NN+1).EQ.' ' + .OR.SPN2(NN+1:NN+1).EQ.')' + .OR.SPN2(NN+1:NN+1).EQ.'(') THEN IF(IP2 .EQ. 0) IP2=1 NS(I,J)=IP2*CSP(I,J) ELSE DO 10 NN2=1,9 IF(IP2 .EQ. 0) IP2=1 IF(SPN2(NN+1:NN+1).EQ.ANUM(NN2)) NS(I,J)=IP2*NN2*CSP(I,J) 10 CONTINUE ENDIF ENDIF RETURN END CC SUBROUTINE COUNT2(SPN3,ALF,ALF2,ANUM,MM,MI,N,IJ,IJ2,INAL2,IP3,N2, + CSP,CLOOK,LLOOK) IMPLICIT REAL*8 (A-H,O-Z) REAL*8 N2 CHARACTER *12 SPN3 CHARACTER *1 ALF,ALF2,ANUM DIMENSION ALF(26),ALF2(26),ANUM(9),CLOOK(1000,10),CSP(10000,6), + LLOOK(1000,10) IF(SPN3(MM:MM).EQ.ALF(INAL2)) THEN IF(SPN3(MM+1:MM+1).EQ.ALF(MI) + .OR.SPN3(MM+1:MM+1).EQ.ALF2(MI)

JNC TN8400 2002-024
Page 97: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 91 -

+ .OR.SPN3(MM+1:MM+1).EQ.'+' + .OR.SPN3(MM+1:MM+1).EQ.'-' + .OR.SPN3(MM+1:MM+1).EQ.' ' + .OR.SPN3(MM+1:MM+1).EQ.')' + .OR.SPN3(MM+1:MM+1).EQ.'(') THEN IF(IP3 .EQ. 0) IP3=1 N2=IP3*1.0*CLOOK(N,IJ)*CSP(LLOOK(N,IJ),IJ2) ELSE DO 20 MM2=1,9 IF(IP3 .EQ. 0) IP3=1 IF(SPN3(MM+1:MM+1).EQ.ANUM(MM2)) + N2=IP3*MM2*CLOOK(N,IJ)*CSP(LLOOK(N,IJ),IJ2) 20 CONTINUE ENDIF ENDIF RETURN END

C+2000ts

JNC TN8400 2002-024
Page 98: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 92 -

別添-3 green.exe のプログラムソース(green.for)

program green c c Last revised 02/09/01 by TJW c c This program is a utility for converting a PHREEQE data file c files into a form that resembles an EQ3/6 data file. Species c indices are replaced entirely by names. c c The source files is phrqdat.txt. The output file is named output. c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c integer natwtw,nbaspc,nphrqd,nttyo,noutpt c integer nbct_asv,nbt_asv,ndrs_asv,ness_asv,nct_asv,ncwt_asv, $ nat_asv,ngt_asv,nmt_asv,nst_asv integer i,ios,is,itype,j2,j3,j4,ker,kflagx,n,nc,ncc,ncw,nerr, $ ng,nm,ns,nsc,nspx,nss c integer ilnobl,nsphrq c character(len=80) uline character(len=24) uspeca,uspecb character(len=8) uelema,uelemb,ux8 c real(8) altx,al10,a1,a2,a3,a4,a5,crx,rconst,rx,tx,xiti,xiti2, $ xit298,x10 c c----------------------------------------------------------------------- c integer, dimension(:,:), allocatable :: isp,ndrsr,nessr integer, dimension(:), allocatable :: isphrq,kbasis,kflag,nsp, $ ndrs,ness c character(len=24), dimension(:), allocatable :: ubasis,ubaspc, $ urefsp,uspec character(len=8), dimension(:,:), allocatable :: uessc character(len=8), dimension(:), allocatable :: uelem,uelemw c real(8), dimension(:,:), allocatable :: axlksp,cessc,csp,xlks real(8), dimension(:), allocatable :: atwt,atwtw,azero, $ cess,cdrs,tgridc,tgridk,titr,xhrs25,xlks25,zchar c c----------------------------------------------------------------------- c data nttyo /6/ data natwtw,nbaspc,nphrqd /10,11,12/ data noutpt /20/ c rconst = 1.98726 c c----------------------------------------------------------------------- c c Open the phrqdat.txt file. c open(nphrqd,file='phrqdat.txt',status='old',err=110) go to 120 c 110 write (nttyo,1010) 1010 format(" * Error - (green) Can't open the source file", $ ' phrqdat.txt.') go to 999 120 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

JNC TN8400 2002-024
Page 99: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 93 -

c c Open the atomic weights file. c open(natwtw,file='atwtdat.txt',status='old',err=130) go to 140 c 130 write (nttyo,1020) 1020 format(" * Error - (green) Can't open the atomic weights data", $ ' file',/7x,'(atwtdat.txt).') go to 999 140 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Open the special composition file for basis species. c open(nbaspc,file='basisdat.txt',status='old',err=150) go to 160 c 150 write (nttyo,1025) 1025 format(" * Error - (green) Can't open the special composition", $ ' file',/7x,'for basis species (basisdat.txt).') go to 999 160 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Open the output file. If one already exists, write over it. c If not, open a new one. c open(noutpt,file='output',iostat=ios,status='old',err=170) if (ios .gt. 0) go to 170 go to 190 c 170 open(noutpt,file='output',iostat=ios,status='new',err=180) if (ios .gt. 0) go to 180 go to 190 c 180 write (nttyo,1030) 1030 format(" * Error - (green) Can't open the output file", $ ' (output).') go to 999 c 190 continue c write (nttyo,'(1x," Done opening files.")') c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Read the atomic weights file. The atomic weights here will c replace those read from the phrqdat.txt file. c c Skip the header. c do n = 1,2 read (natwtw,1100,end=230) uline 1100 format(a) enddo c c Make a first pass to find the number of elements present. c ncwt_asv = 0 210 read (natwtw,1100,end=230) uline call locase(uline) if (uline(1:3) .eq. 'end') go to 220 ncwt_asv = ncwt_asv + 1 go to 210 220 continue c c Allocate arrays. c ALLOCATE(uelemw(ncwt_asv)) ALLOCATE(atwtw(ncwt_asv))

JNC TN8400 2002-024
Page 100: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 94 -

c c Rewind the file. c rewind (natwtw) c c Skip the header. c do n = 1,2 read (natwtw,1100,end=230) uline enddo c c Make a second pass to read the list of elements. c do ncw = 1,ncwt_asv read (natwtw,1100,end=230) uline read (uline,'(a8,1x,f9.5)') uelemw(ncw),atwtw(ncw) enddo c write (nttyo,'(1x," Done reading atwtdat.txt.")') go to 240 c 230 j2 = ilnobl(uline) j2 = min(j2,70) if (ncw .gt. 0) then uelema = uelemw(ncw) else uelema = '<none>' endif j3 = ilnobl(uelema) if (ncw .gt. 1) then uelemb = uelemw(ncw - 1) else uelemb = '<none>' endif j4 = ilnobl(uelemb) write (noutpt,1110) uline(1:j2),uelema(1:j3),uelemb(1:j4) write (nttyo,1110) uline(1:j2),uelema(1:j3),uelemb(1:j4) 1110 format(' * Error - (green) Had a read error while reading', $ ' the special atomic',/7x,'weights data file atwtdat.txt. The', $ ' last line read was:',/7x,'"',a,'".',/7x,'The current element', $ ' name is "',a,'".',/7x,'The preceding element name is "',a,'".') stop c 240 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Read the special composition data file for basis species. c This is necessary to compute the compositions of the non-basis c species. c c Skip the header. c read (nbaspc,1100,end=255) uline c c Make a first pass to find the number of basis species present c on this file. c nbct_asv = 0 245 read (nbaspc,1100,end=255) uline call locase(uline) if (uline(1:3) .eq. 'end') go to 250 if (uline(1:2) .ne. ' ') nbct_asv = nbct_asv + 1 go to 245 250 continue c c Allocate arrays. c ALLOCATE(ubaspc(nbct_asv)) ALLOCATE(uessc(3,nbct_asv)) ALLOCATE(cessc(3,nbct_asv)) c do nsc = 1,nbct_asv

JNC TN8400 2002-024
Page 101: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 95 -

do ncc = 1,3 uessc(ncc,nsc) = ' ' cessc(ncc,nsc) = 0. enddo enddo c c Rewind the file. c rewind (nbaspc) c c Skip the header. c read (nbaspc,1100,end=255) uline c c Make a second pass to read the basis species name and c composition data. c do nsc = 1,nbct_asv read (nbaspc,1100,end=255) uline read (uline,'(a)') ubaspc(nsc) n = 0 252 read (nbaspc,1100,end=255) uline if (uline(1:2) .ne. ' ') then backspace(nbaspc) else n = n + 1 if (n .le. 3) then read (uline,'(2x,f4.1,1x,a)',err=255) $ cessc(n,nsc),uessc(n,nsc) go to 252 else j2 = ilnobl(ubaspc(nsc)) write (noutpt,1120) ubaspc(nsc)(1:j2) write (nttyo,1120) ubaspc(nsc)(1:j2) 1120 format(' * Error - (green) The basis species ',a,' on the', $ ' special',/7x,'composition data file basisdat.txt is', $ ' composed of more than three chemical elements.') stop endif endif enddo c write (nttyo,'(1x," Done reading basisdat.txt.")') go to 260 c 255 j2 = ilnobl(uline) j2 = min(j2,70) if (nsc .gt. 0) then uspeca = ubaspc(nsc) else uspeca = '<none>' endif j3 = ilnobl(uspeca) if (nsc .gt. 1) then uspecb = ubaspc(nsc - 1) else uspecb = '<none>' endif j4 = ilnobl(uspecb) write (noutpt,1130) uline(1:j2),uspeca(1:j3),uspecb(1:j4) write (nttyo,1130) uline(1:j2),uspeca(1:j3),uspecb(1:j4) 1130 format(' * Error - (green) Had a read error while reading', $ ' the special basis',/7x,'species composition data file', $ ' basisdat.txt. The last line read was:',/7x,'"',a,'"', $ /7x,'The current species name is "',a,'".', $ /7x,'The preceding species name is "',a,'".') stop c 260 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Scan the phrqdat.txt data file to determine needed dimensioning.

JNC TN8400 2002-024
Page 102: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 96 -

c A second pass will subsequently be made to actually read the c data. c c Scan the elements block header. c read (nphrqd,1100,end=280) uline c call locase(uline) if (uline(1:8) .ne. 'elements') then j2 = ilnobl(uline) j2 = min(j2,72) write (noutpt,1140) uline(1:j2) write (nttyo,1140) uline(1:j2) 1140 format(' * Error - (green) The chemical elements block of', $ ' the phrqdat.txt file',/7x,'does not have a header of', $ '"ELEMENTS" as expected. Instead found',/7x,'the following', $ ' line:',/7x,a,/) go to 999 endif c c Scan the rest of the elements block. This is terminated by a c blank line. Note that O and H are not listed in the elements c block of the phreeqe data file. They are implicit. c nct_asv = 2 uelema = '<none>' uelemb = '<none>' 270 read (nphrqd,1100,end=280) uline j2 = ilnobl(uline) if (j2 .ne. 0) then nct_asv = nct_asv + 1 uelemb = uelema read (uline,'(a)') uelema go to 270 endif nbt_asv = nct_asv + 1 go to 290 c 280 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uelema) j4 = ilnobl(uelemb) write (noutpt,1150) uline(1:j2),uelema(1:j3),uelemb(1:j4) write (nttyo,1150) uline(1:j2),uelema(1:j3),uelemb(1:j4) 1150 format(' * Error - (green) Had a read error while scanning', $ ' the chemical elements',/7x,'block of data file', $ ' phrqdat.txt. The last line read was:',/7x,'"',a,'".', $ /7x,'The current element name is "',a,'".', $ /7x,'The preceding element name is "',a,'".') stop c 290 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Scan the aqueous species superblock header. c read (nphrqd,1100,end=310) uline c call locase(uline) if (uline(1:7) .ne. 'species') then j2 = ilnobl(uline) j2 = min(j2,72) write (noutpt,1160) uline(1:j2) write (nttyo,1160) uline(1:j2) 1160 format(' * Error - (green) The aqueous species superblock of', $ ' the phrqdat.txt file',/7x,'does not have a header of', $ '"SPECIES" as expected. Instead found',/7x,'the following', $ ' line:',/7x,a,/) go to 999 endif c c Scan the rest of the aqueous species superblock. This is

JNC TN8400 2002-024
Page 103: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 97 -

c terminated by a blank line. Note that the basis species come first. c The first three basis species on the PHREEQE data file are H+, e-, c and H2O. For EQ3/6, H2O must come first and e- last. H+ can come c second. c nat_asv = 0 uspeca = '<none>' uspecb = '<none>' 300 read (nphrqd,1100,end=310) uline j2 = ilnobl(uline) if (j2 .gt. 0) then nat_asv = nat_asv + 1 uspecb = uspeca read (uline,'(a12)',err=310) uspeca read (nphrqd,1100,end=310) uline read (nphrqd,1100,end=310) uline read (nphrqd,1100,end=310) uline go to 300 endif go to 320 c 310 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uspeca) j4 = ilnobl(uspecb) write (noutpt,1170) uline(1:j2),uspeca(1:j3),uspecb(1:j4) write (nttyo,1170) uline(1:j2),uspeca(1:j3),uspecb(1:j4) 1170 format(' * Error - (green) Had a read error while scanning', $ ' the aqueous species',/7x,'superblock of data file', $ ' phrqdat.txt. The last line read was:',/7x,'"',a,'".', $ /7x,'The current species name is "',a,'".', $ /7x,'The preceding species name is "',a,'".') stop c 320 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Scan the mineral/gas species superblock header. c read (nphrqd,1100,end=340) uline call locase(uline) if (uline(1:8) .ne. 'look min') then j2 = ilnobl(uline) j2 = min(j2,72) write (noutpt,1180) uline(1:j2) write (nttyo,1180) uline(1:j2) 1180 format(' * Error - (green) The mineral/gas species', $ ' superblock of the',/7x,'phrqdat.txt file does not have', $ ' a header of "LOOK MIN" as expected.',/7x,'Instead found', $ ' the following line:',/7x,a,/) go to 999 endif c c Scan the rest of the mineral/gas species superblock. This is c terminated by a blank line. Note that gas species are identified c by "(g)" at the end of the name. c nmt_asv = 0 ngt_asv = 0 uspeca = '<none>' uspecb = '<none>' 330 read (nphrqd,1100,end=340) uline j2 = ilnobl(uline) if (j2 .gt. 0) then uspecb = uspeca read (uline,'(a10)',end=340) uspeca j3 = ilnobl(uspeca) if (j3 .gt. 2) then if (uspeca(j3 - 2:j3) .eq. '(g)') then ngt_asv = ngt_asv + 1 else nmt_asv = nmt_asv + 1

JNC TN8400 2002-024
Page 104: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 98 -

endif else nmt_asv = nmt_asv + 1 endif read (uline,'(10x,i2,38x,i1)',err=340) nspx,kflagx read (nphrqd,1100,end=340) uline if (nspx .gt. 5) read (nphrqd,1100,end=340) uline if (kflagx .gt. 0) read (nphrqd,1100,end=340) uline go to 330 endif c nst_asv = nat_asv + nmt_asv + ngt_asv go to 350 c 340 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uspeca) j4 = ilnobl(uspecb) write (noutpt,1190) uline(1:j2),uspeca(1:j3),uspecb(1:j4) write (nttyo,1190) uline(1:j2),uspeca(1:j3),uspecb(1:j4) 1190 format(' * Error - (green) Had a read error while scanning', $ ' the mineral/gas',/7x,'species superblock of data file', $ ' phrqdat.txt. The last line read was:',/7x,'"',a,'".', $ /7x,'The current species name is "',a,'".', $ /7x,'The preceding species name is "',a,'".') stop c 350 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c write (noutpt,1200) nct_asv,nbt_asv write (nttyo,1200) nct_asv,nbt_asv 1200 format(/2x,'Elements= ',i5,/2x,'Basis= ',i5) write (noutpt,1205) nat_asv,ngt_asv,nmt_asv,nst_asv write (nttyo,1205) nat_asv,ngt_asv,nmt_asv,nst_asv 1205 format(/2x,'Aqueous= ',i5,/2x,'Gases= ',i5,/2x, $ 'Minerals= ',i5,/2x,'Total species= ',i5) c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Allocate arrays. c ALLOCATE(uelem(nct_asv)) ALLOCATE(atwt(nct_asv)) ALLOCATE(ubasis(nbt_asv)) c ALLOCATE(uspec(nst_asv)) ALLOCATE(urefsp(nst_asv)) ALLOCATE(isphrq(nst_asv)) c ALLOCATE(zchar(nst_asv)) ALLOCATE(azero(nat_asv)) ALLOCATE(titr(nat_asv)) ALLOCATE(kbasis(nat_asv)) c c Note: the kflag, xhrs25, xlks25, and axlksp arrays store c thermoynamic data in PHREEQE format. These arrays are used c here for all species types, whereas in PHREEQE one set of c arrays is used for aqueous species and another for minerals c and gases. Thus, kflag subsumes "mflag" of PHREEQE. c ALLOCATE(kflag(nst_asv)) ALLOCATE(xhrs25(nst_asv)) ALLOCATE(xlks25(nst_asv)) ALLOCATE(axlksp(5,nst_asv)) c ALLOCATE(tgridc(8)) ALLOCATE(tgridk(8)) ALLOCATE(xlks(8,nst_asv)) c c Note: the nsp, isp, and csp arrays store reactions in PHREEQE c format. These arrays are here used to store reactions for

JNC TN8400 2002-024
Page 105: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 99 -

c all species types. PHREEQE uses one set of arrays for aqueous c species and another for minerals and gases. The maximum nsp c value for aqueous species is 6, the maximum for minerals/gases c is 10. The larger dimension is thus required here. c ALLOCATE(nsp(nst_asv)) ALLOCATE(isp(10,nst_asv)) ALLOCATE(csp(10,nst_asv)) c ALLOCATE(ndrsr(2,nst_asv)) ndrs_asv = 7*nst_asv ALLOCATE(ndrs(ndrs_asv)) ALLOCATE(cdrs(ndrs_asv)) c ALLOCATE(nessr(2,nst_asv)) ness_asv = 8*nst_asv ALLOCATE(ness(ness_asv)) ALLOCATE(cess(ness_asv)) c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Rewind the file and read the data. c rewind (nphrqd) c c Skip the chemical elements block header. c read (nphrqd,1100,end=410) uline c c Read the elements and associated data. c uelem(1) = 'O' ubasis(1) = 'H2O' c uelem(2) = 'H' ubasis(2) = 'H+' c uelemb = uelem(2) do nc = 3,nct_asv read (nphrqd,1100,end=410) uline uelemb = uelema read (uline,'(a8)',err=410,end=410) uelema read (uline,1210,err=410,end=410) uelem(nc),atwt(nc),ubasis(nc) 1210 format(a8,7x,e10.3,5x,a24) enddo c c Replace the atomic weights with those from the atwtdat.txt file. c This is done because the atomic weights in the JNC PHREEQE file c are too heavily rounded. Some of the atomic weights from the c JNC file may be retained. These will generally be for the c heavier elements for which defining the atomic weight requires c picking an isotope. c do nc = 1,nct_asv do ncw = 1,ncwt_asv if (uelem(nc)(1:8) .eq. uelemw(ncw)(1:8)) then atwt(nc) = atwtw(ncw) go to 400 endif enddo 400 continue enddo c c Add the fictive aqueous species e- to the basis species. c ubasis(nbt_asv) = 'e-' c c Skip the blank line terminator. c read (nphrqd,1100,end=410) uline c go to 420 c

JNC TN8400 2002-024
Page 106: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 100 -

410 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uelema) j4 = ilnobl(uelemb) write (noutpt,1220) uline(1:j2),uelema(1:j3),uelemb(1:j4) write (nttyo,1220) uline(1:j2),uelema(1:j3),uelemb(1:j4) 1220 format(' * Error - (green) Had a read error while reading', $ ' the chemical elements',/7x,'block of data file', $ ' phrqdat.txt. The last line read was:',/7x,'"',a,'".', $ /7x,'The current element name is "',a,'".', $ /7x,'The preceding element name is "',a,'".') stop c 420 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Skip the aqeuous species superblock header. c read (nphrqd,1100,end=440) uline c c Read the aqueous species and associated data. The first three c species should be H+, e-, and H2O, in that order. The order for c these must be rearranged for EQ3/6 so that H2O is first, H+ is c second, and e- is the last basis species (doing that for e- will c reposition the rest of the basis species). c ns = 2 call rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) if (uspec(ns)(1:3) .ne. 'H+ ') then j2 = ilnobl(uspec(ns)) write (noutpt,1240) uspec(ns)(1:j2) write (nttyo,1240) uspec(ns)(1:j2) 1240 format(/' * Error - (green) Found a data block for ',a, $ ' where',/7x,'one was expected for H+.') go to 999 endif c ns = nbt_asv call rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) if (uspec(ns)(1:3) .ne. 'e- ') then j2 = ilnobl(uspec(ns)) write (noutpt,1250) uspec(ns)(1:j2) write (nttyo,1250) uspec(ns)(1:j2) 1250 format(/' * Error - (green) Found a data block for ',a, $ ' where',/7x,'one was expected for e-.') go to 999 endif c ns = 1 call rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) if (uspec(ns)(1:4) .ne. 'H2O ') then j2 = ilnobl(uspec(ns)) write (noutpt,1260) uspec(ns)(1:j2) write (nttyo,1260) uspec(ns)(1:j2) 1260 format(/' * Error - (green) Found a data block for ',a, $ ' where',/7x,'one was expected for H2O.') go to 999 endif c do ns = 3,nbt_asv - 1 call rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) enddo c do ns = nbt_asv + 1,nat_asv

JNC TN8400 2002-024
Page 107: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 101 -

call rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) enddo c c Skip the blank line terminator. c read (nphrqd,1100,end=440) uline c go to 450 c 440 write (noutpt,1270) write (nttyo,1270) 1270 format(' * Error - (green) Had a read error while reading the', $ ' aqueous species',/7x,'superblock of phrqdat.txt. This', $ ' occurred while reading either',/7x,'the header or the', $ ' terminator line for the superblock.') stop c 450 continue c c Repair sign convention for aqueous species thermodynamic data. c Even though the corresponding reactions are written as c dissociation reactions (matching EQ3/6 convention), the c thermodynamic data that go with these are for the case of c the reactions written as association reactions (the opposite of c the EQ3/6 convention). Flip the signs of the thermodynamic data. c do ns = nct_asv + 1, nat_asv xlks25(ns) = -xlks25(ns) xhrs25(ns) = -xhrs25(ns) if (kflag(ns) .gt. 0) then do i = 1,5 axlksp(i,ns) = -axlksp(i,ns) enddo endif enddo c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Skip the mineral/gas species superblock header ("LOOK MIN"). c read (nphrqd,1100,end=540) uline c c Read the mineral/gas species and associated data. The gas species c will have names ending in "(g)". First read in only the mineral c species. c ns = nat_asv itype = 0 nm = 0 c 510 nm = nm + 1 ns = ns + 1 call rdmngs(axlksp,csp,isp,itype,kflag,nat_asv,noutpt, $ nphrqd,ns,nsp,nttyo,nst_asv,urefsp,uspec,xhrs25,xlks25,zchar) if (nm .lt. nmt_asv) go to 510 c rewind (nphrqd) 520 read (nphrqd,'(a)') uline call locase(uline) if (uline(1:8) .ne. 'look min') go to 520 c c Now read the gas species. c ns = nat_asv + nmt_asv itype = 1 ng = 0 c 530 ng = ng + 1 ns = ns + 1 call rdmngs(axlksp,csp,isp,itype,kflag,nat_asv,noutpt, $ nphrqd,ns,nsp,nttyo,nst_asv,urefsp,uspec,xhrs25,xlks25,zchar)

JNC TN8400 2002-024
Page 108: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 102 -

if (ng .lt. ngt_asv) go to 530 c c Skip the blank line terminator. c read (nphrqd,1100,end=540) uline c go to 550 c 540 write (noutpt,1280) write (nttyo,1280) 1280 format(' * Error - (green) Had a read error while reading the', $ ' mineral/gas species',/7x,'superblock of phrqdat.txt. This', $ ' occurred while reading either',/7x,'the header or the', $ ' terminator line for the superblock.') stop c 550 continue c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c write (nttyo,'(1x," Done reading phrqdat.txt.")') c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Check atomic weights. c do nc = 1,nct_asv if (atwt(nc) .eq. 0.) then nerr = nerr + 1 j2 = ilnobl(uelem(nc)) write (noutpt,1510) uelem(nc)(1:j2) write (nttyo,1510) uelem(nc)(1:j2) 1510 format(' * Error - (green) The atomic weight of ',a,' was', $ ' not found on',/7x,'either atwtdat.txt or phrqdat.txt.') endif enddo c c Check basis species specified for the chemical elements. c do nc = 1,nct_asv if (ubasis(nc)(1:1) .eq. ' ') then nerr = nerr + 1 j2 = ilnobl(uelem(nc)) write (noutpt,1520) uelem(nc)(1:j2) write (nttyo,1520) uelem(nc)(1:j2) 1520 format(' * Error - (green) No basis species was', $ ' defined for ',a,/7x,' in the elements block of the', $ ' phrqdat.txt file.') endif enddo c if (nerr .gt. 0) stop c c Check for 1:1 matching of intended and actual basis species. c do nc = 1,nct_asv ns = nc if (ubasis(nc) .ne. uspec(ns)) then nerr = nerr + 1 j2 = ilnobl(uelem(nc)) j3 = ilnobl(ubasis(nc)) j4 = ilnobl(uspec(ns)) write (noutpt,1530) uelem(nc)(1:j2),ubasis(nc)(1:j3), $ uspec(ns)(1:j4) write (nttyo,1530) uelem(nc)(1:j2),ubasis(nc)(1:j3), $ uspec(ns)(1:j4) 1530 format(' * Error - (green) Element ',a,' has ',a, $ ' specified as the',/7x,'corresponding basis species, ', $ 'but it is positionally matched',/7x,'with ',a,' on the', $ ' phrqdat.txt data file.') endif enddo c

JNC TN8400 2002-024
Page 109: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 103 -

if (nerr .gt. 0) stop c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Translate PHREEQE reaction arrays to EQ3/6 arrays. Note that c here it will be necessary to map PHREEQE species indices c of basis species to EQ3/6 species indices. Note that the PHREEQE c species indices are numbers read from the phrqdat.txt file, not c numbers determined by the position of the basis species on c that file. It is common for numbers to be skipped, so that c some indices may have values greater than the number of basis c species. Here a function is used that accomplishes the c necessary mapping. An array to provide direct mapping might c be insufficient owing to the lack of dimensional correspondence c with the isphrq array, which gives PHREEQE species indices c for the corresponding EQ3/6 species indices. c c Here the kbasis array is used to track which species are basis c species. In particlar, it is intended to facilitate dealing c with "unintended" basis species. These will be trapped and c later set up as auxiliary basis species. c do ns = 1,nbt_asv kbasis(ns) = 1 enddo do ns = nbt_asv + 1,nat_asv kbasis(ns) = 0 enddo c n = 0 do ns = 1,nst_asv n = n + 1 ndrsr(1,ns) = n ndrs(n) = ns if (nsp(ns) .gt. 0) then cdrs(n) = -1.0 else cdrs(n) = 0.0 endif do i = 1,nsp(ns) is = isp(i,ns) n = n + 1 nss = nsphrq(is,isphrq,ker,nat_asv,nbt_asv,nst_asv) if (ker .eq. 1) then c c Have an "unintended" basis species. c kbasis(nss) = 1 elseif (ker .eq. 2) then c c Have a reaction with a bad PHREEQE species index number. c nerr = nerr + 1 j2 = ilnobl(uspec(ns)) write (ux8,'(i5)') is call lejust(ux8) j3 = ilnobl(ux8) write (noutpt,1550) uspec(ns)(1:j2),ux8(1:j3) write (nttyo,1550) uspec(ns)(1:j2),ux8(1:j3) 1550 format(' * Error - (green) The reaction associated with ', $ a,/7x,'is written in terms of illegal PHREEQE species', $ ' index "',a,'".',/7x,'Fix this on the phrqdat.txt file', $ ' and try again.') endif ndrs(n) = nss cdrs(n) = csp(i,ns) enddo ndrsr(2,ns) = n enddo c if (nerr .gt. 0) stop c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

JNC TN8400 2002-024
Page 110: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 104 -

c c Construct chemical compositions for the species. c call makcmp(cdrs,cess,cessc,nbct_asv,nct_asv,ndrs, $ ndrs_asv,ndrsr,ness,ness_asv,nessr,noutpt,nst_asv, $ nttyo,ubaspc,uelem,uessc,uspec) c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Calculate the log K grids for the reactions. c tgridc(1) = 0. tgridc(2) = 25. tgridc(3) = 60. tgridc(4) = 100. tgridc(5) = 150. tgridc(6) = 200. tgridc(7) = 250. tgridc(8) = 300. c do i = 1,8 tgridk(i) = tgridc(i) + 273.15 enddo c xit298 = 1./298.15 rx = rconst*1.e-3 x10 = 10. al10 = log(x10) crx = al10*rx c do ns = nct_asv + 1,nst_asv if (kflag(ns) .le. 0) then c c van't Hoff equation with constant enthalpy. c do i = 1,8 tx = tgridk(i) xiti = 1./tx xlks(i,ns) = xlks25(ns) - xhrs25(ns)*(xiti - xit298)/crx enddo else c c Five parameter temperature function. c a1 = axlksp(1,ns) a2 = axlksp(2,ns) a3 = axlksp(3,ns) a4 = axlksp(4,ns) a5 = axlksp(5,ns) do i = 1,8 tx = tgridk(i) altx = log10(tx) xiti = 1./tx xiti2 = xiti*xiti xlks(i,ns) = a1 + a2*tx + a3*xiti + a4*altx + a5*xiti2 enddo endif enddo c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c c Write the output data in a form similar to DATA0 format. c write (noutpt,'("bdot parameters")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') write (noutpt,'("* species name azer0", $ " neutral ion type")') do ns = 2,nat_asv write (noutpt,'(a24,7x,f7.4,4x," 0")') uspec(ns),azero(ns) enddo write (noutpt,'("+--------------------------------------------", $ "------------------------")')

JNC TN8400 2002-024
Page 111: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 105 -

c write (noutpt,'("elements")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do nc = 1,nct_asv write (noutpt,'(a7,2x,f9.5)') uelem(nc),atwt(nc) enddo write (noutpt,'("+--------------------------------------------", $ "------------------------")') c write (noutpt,'("basis species")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do nc = 1,nct_asv ns = nc j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2) write (noutpt,'(5x,"sp.type = basis")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c write (noutpt,'("+--------------------------------------------", $ "------------------------")') enddo c ns = nct_asv + 1 j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2) write (noutpt,'(5x,"sp.type = basis")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c write (noutpt,'("+--------------------------------------------", $ "------------------------")') c write (noutpt,'("auxiliary basis species")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do ns = nct_asv + 2,nat_asv if (kbasis(ns) .gt. 0) then j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2) write (noutpt,'(5x,"sp.type = aux")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c call wrreac(cdrs,ndrs,ndrs_asv,ndrsr,noutpt,ns, $ nst_asv,uspec,xlks) c call wrrefd(axlksp,kflag,noutpt,ns,nst_asv,urefsp, $ uspec,xhrs25,xlks25) c write (noutpt,'("+----------------------------------------", $ "----------------------------")') endif enddo c write (noutpt,'("aqueous")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do ns = nct_asv + 2,nat_asv if (kbasis(ns) .le. 0) then j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2)

JNC TN8400 2002-024
Page 112: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 106 -

write (noutpt,'(5x,"sp.type = aqueous")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c call wrreac(cdrs,ndrs,ndrs_asv,ndrsr,noutpt,ns, $ nst_asv,uspec,xlks) c call wrrefd(axlksp,kflag,noutpt,ns,nst_asv,urefsp, $ uspec,xhrs25,xlks25) c write (noutpt,'("+----------------------------------------", $ "----------------------------")') endif enddo c write (noutpt,'("solids")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do ns = nat_asv + 1,nat_asv + nmt_asv j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2) write (noutpt,'(5x,"sp.type = solid")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c call wrreac(cdrs,ndrs,ndrs_asv,ndrsr,noutpt,ns, $ nst_asv,uspec,xlks) c call wrrefd(axlksp,kflag,noutpt,ns,nst_asv,urefsp, $ uspec,xhrs25,xlks25) c write (noutpt,'("+------------------------------------------", $ "--------------------------")') enddo c write (noutpt,'("liquids")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') c write (noutpt,'("gases")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') do ns = nat_asv + nmt_asv + 1,nat_asv + nmt_asv + ngt_asv j2 = ilnobl(uspec(ns)) write (noutpt,'(a)') uspec(ns)(1:j2) write (noutpt,'(5x,"sp.type = gas")') write (noutpt,'(5x,"revised = ")') write (noutpt,'(5x,"charge = ",f5.1)') zchar(ns) c call wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c call wrreac(cdrs,ndrs,ndrs_asv,ndrsr,noutpt,ns, $ nst_asv,uspec,xlks) c call wrrefd(axlksp,kflag,noutpt,ns,nst_asv,urefsp, $ uspec,xhrs25,xlks25) c write (noutpt,'("+------------------------------------------", $ "--------------------------")') enddo c write (noutpt,'("solid solutions")') write (noutpt,'("+--------------------------------------------", $ "------------------------")') c write (noutpt,'("references")')

JNC TN8400 2002-024
Page 113: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 107 -

write (noutpt,'("+------------------------------------------", $ "--------------------------")') write (noutpt,'("None")') c write (nttyo,'(1x," Done writing the output file.")') c c- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - c go to 999 c 999 continue end integer function ifnobl(ustr) c c This subroutine finds the position of the first non-blank c character in the string ustr. c c----------------------------------------------------------------------- c c Principal input: c c ustr = the input string variable c c Principal output: c c ifnobl = the position of the first non-blank character c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c character*(*) ustr c c----------------------------------------------------------------------- c c Local variable declarations. c integer j,nchars c c----------------------------------------------------------------------- c c Get the length of the string variable. c nchars = len(ustr) c c Find the first non-blank character. c ifnobl = 0 do j = 1,nchars if (ustr(j:j) .ne. ' ') then ifnobl = j go to 999 endif enddo c 999 continue end integer function ilnobl(ustr) c c This subroutine finds the position of the first non-blank c character in the string ustr. c c----------------------------------------------------------------------- c c Principal input: c c ustr = the input string variable c c Principal output:

JNC TN8400 2002-024
Page 114: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 108 -

c c ilnobl = the position of the first non-blank character c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c character*(*) ustr c c----------------------------------------------------------------------- c c Local variable declarations. c integer j,nchars c c----------------------------------------------------------------------- c c Get the length of the string variable. c nchars = len(ustr) c c Find the first non-blank character. c ilnobl = 0 do j = nchars,1,-1 if (ustr(j:j) .ne. ' ') then ilnobl = j go to 999 endif enddo c 999 continue end subroutine lejust(ustr) c c This subroutine left-justifies the non-blank portion of the string c ustr. c c This subroutine is called by: c c Any c c----------------------------------------------------------------------- c c Input: c c ustr = the input string variable c c Output: c c ustr = the output string variable c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c character*(*) ustr c c----------------------------------------------------------------------- c c Local variable declarations. c integer j,jj,jbl,j1,nchars c integer ifnobl

JNC TN8400 2002-024
Page 115: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 109 -

c c----------------------------------------------------------------------- c c Get the length of the string variable. c nchars = len(ustr) c c Get the position of the first non-blank character and the number c of blanks on the left-hand-side. c j1 = ifnobl(ustr) jbl = j1 - 1 c if (jbl .gt. 0) then do jj = j1,nchars j = jj - jbl ustr(j:j) = ustr(jj:jj) enddo do j = nchars - jbl,nchars ustr(j:j) = ' ' enddo endif c end subroutine locase(ustr) c c This subroutine converts a string from upper case to lower case. c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c character*(*) ustr c c----------------------------------------------------------------------- c c Local variable declarations. c integer idel,j,nchars c character*1 u1 c c----------------------------------------------------------------------- c idel = ichar('A') - ichar('a') if (idel .ne. 0) then nchars = len(ustr) do j = 1,nchars u1 = ustr(j:j) if (u1.ge.'A' .and. u1.le.'Z') $ ustr(j:j) = char(ichar(u1) - idel) enddo endif c end subroutine makcmp(cdrs,cess,cessc,nbct_asv,nct_asv,ndrs, $ ndrs_asv,ndrsr,ness,ness_asv,nessr,noutpt,nst_asv, $ nttyo,ubaspc,uelem,uessc,uspec) c c This subroutine makes a chemical composition for each species c from the associated reaction. This requires a special data base c (ubaspc-uessc-cessc) giving the compositions of the basis c species. c c This subroutine is called by: c c green.f c c-----------------------------------------------------------------------

JNC TN8400 2002-024
Page 116: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 110 -

c c Principal input: c c cdrs = array of coefficients for chemical reactions c cessc = array of coefficients corresponding to the c uessc array of chemical element names; part of c a special compositional data base for basis c species (see ubaspc) c nbct_asv = the maximum number of basis species in a special c compositional data base c nct_asv = the maximum number of chemical elements c ndrs = array of indices of species appearing in reactions c ndrs_asv = the maximum number of entries in the cdrs or ndrs c array c ndrsr = pointer array giving the ranges in the cdrs and ndrs c arrays giving the reactions for corresponding c species c ness_asv = the maximum number of entries in the cess or ness c array c nst_asv = the maximum number of chemical species c ubaspc = array of names of basis species in a special c compositional data base c uelem = array of names of chemical elements c uessc = array of chemical element names in a special c compositional data base c uspec = array of names of species c c Principal output: c c cess = array of coefficients for chemical elements c ness = array of indices of chemical elements composing c species c nessr = pointer array giving the ranges in the cess and ness c arrays giving the compositions of species c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nbct_asv,nct_asv,ndrs_asv,ness_asv,nst_asv c integer noutpt,nttyo c integer ndrs(ndrs_asv),ndrsr(2,nst_asv),ness(ness_asv), $ nessr(2,nst_asv) c character(len=24) uspec(nst_asv),ubaspc(nbct_asv) character(len=8) uelem(nct_asv),uessc(3,nbct_asv) c real(8) cdrs(ndrs_asv),cess(ness_asv),cessc(3,nbct_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer j2,j3,n,nc,ncc,nn,nnn,nrr1,nrr2,nr1,nr2,ns,nsc,nss c integer ilnobl c real(8) cx,cxs,cxx c c----------------------------------------------------------------------- c c Local allocatable array declarations. c real(8), dimension(:), allocatable :: cessx c c----------------------------------------------------------------------- c

JNC TN8400 2002-024
Page 117: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 111 -

c Process the strict basis species. This requires matching the c names with those from the ubaspc array. c n = 0 do ns = 1,nct_asv nessr(1,ns) = n + 1 do nsc = 1,nbct_asv if (uspec(ns) .eq. ubaspc(nsc)) then do ncc = 1,3 j2 = ilnobl(uessc(ncc,nsc)) if (j2 .gt. 0) then do nc = 1,nct_asv if (uessc(ncc,nsc) .eq. uelem(nc)) then n = n + 1 ness(n) = nc cess(n) = cessc(ncc,nsc) go to 110 endif enddo c j2 = ilnobl(uspec(ns)) j3 = ilnobl(uessc(ncc,nsc)) write (noutpt,1020) uspec(ns)(1:j2),uessc(ncc,nsc)(1:j3) write (nttyo,1020) uspec(ns)(1:j2),uessc(ncc,nsc)(1:j3) 1010 format(/' * Error - (makcmp) The basis species ',a, $ ' is listed as being',/7x,'composed of unknown', $ ' chemical element ',a,' in the special', $ /7x,'compositional data base read from the', $ ' basisdat.txt file.') stop c 110 continue endif enddo if (n .lt. nessr(1,ns)) then n = n + 1 ness(n) = 0 cess(n) = 0.0 endif go to 115 endif enddo c j2 = ilnobl(uspec(ns)) write (noutpt,1020) uspec(ns)(1:j2) write (nttyo,1020) uspec(ns)(1:j2) 1020 format(/' * Error - (makcmp) Could not find the basis', $ ' species ',a,' in the',/7x,'special compositional', $ ' data base read from the basisdat.txt file.') stop c 115 continue nessr(2,ns) = n enddo c c Here e- is the last basis species. c n = n + 1 ns = nct_asv + 1 nessr(1,ns) = n nessr(2,ns) = n ness(n) = 0 cess(n) = 0.0 c c Process all remaining species. c ALLOCATE(cessx(nct_asv)) c do ns = nct_asv + 2,nst_asv do nc = 1,nct_asv cessx(nc) = 0. enddo nrr1 = ndrsr(1,ns)

JNC TN8400 2002-024
Page 118: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 112 -

nrr2 = ndrsr(2,ns) cxs = cdrs(nrr1) do nn = nrr1 + 1,nrr2 nss = ndrs(nn) cXXX if (nss .le. 0) then continue endif if (nss .gt. nst_asv) then continue endif cXXX cxx = -cdrs(nn)/cxs nr1 = nessr(1,nss) nr2 = nessr(2,nss) do nnn = nr1,nr2 nc = ness(nnn) cx = cess(nnn) if (nc .gt. 0) cessx(nc) = cessx(nc) + cxx*cx enddo enddo c nessr(1,ns) = n + 1 do nc = nct_asv,1,-1 if (cessx(nc) .ne. 0.) then n = n + 1 ness(n) = nc cess(n) = cessx(nc) endif enddo c if (n .ge. nessr(1,ns)) then nessr(2,ns) = n else nessr(2,ns) = nessr(1,ns) n = n + 1 ness(n) = 0 cess(n) = 0. j2 = ilnobl(uspec(ns)) write (noutpt,1050) uspec(ns)(1:j2) write (nttyo,1050) uspec(ns)(1:j2) 1050 format(/' * Error - (makcmp) Could not compute a valid', $ ' composition for',/7x,'the non-basis species ',a,'.', $ ' Check the associated reaction.') stop endif enddo c DEALLOCATE(cessx) c end integer function nsphrq(is,isphrq,ker,nat_asv,nbt_asv,nst_asv) c c This subroutine finds the local (GREEN) index of a species, c given the corresponding index defined on the PHREEQE data file. c c----------------------------------------------------------------------- c c Principal input: c c is = a PHREEQE species index c isphrq = array mapping EQ3/6 species indices to PHREEQE species c indices c c Principal output: c c ker = error flag c = 0: no error, species found c = 1: the species found is an aqueous species outside c the declared basis set c = 2: species not found; nsphrq is returned with c a value of 0 c nsphrq = the EQ3/6 species index corresponding to the PHREEQE

JNC TN8400 2002-024
Page 119: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 113 -

c species index is c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nat_asv,nbt_asv,nst_asv c integer is,ker c integer isphrq(nst_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer ns c c----------------------------------------------------------------------- c ker = 0 c c Search the isphrq array for a result that gives is. c c First try H2O. c ns = 1 if (isphrq(ns) .eq. is) then nsphrq = ns go to 999 endif c c Then try H+. c ns = 2 if (isphrq(ns) .eq. is) then nsphrq = ns go to 999 endif c c Then try e-. c ns = nbt_asv if (isphrq(ns) .eq. is) then nsphrq = ns go to 999 endif c c Then try the other basis species. c do ns = 3,nbt_asv - 1 if (isphrq(ns) .eq. is) then nsphrq = ns go to 999 endif enddo c c Theoretically, "is" might not designate a basis species. c However, this index is only used to write reactions, not c using the associated species. So if it does not designate c a basis species, that in itself is an error. c c But, people do strange things. First try to see if "is" c denotes an "unintended" basis species. c do ns = nbt_asv + 1,nat_asv if (isphrq(ns) .eq. is) then nsphrq = ns ker = 1

JNC TN8400 2002-024
Page 120: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 114 -

go to 999 endif enddo c c Nothing found. c nsphrq = 0 ker = 2 c 999 continue end subroutine rdaqsp(axlksp,azero,csp,isp,isphrq,kflag,nat_asv, $ noutpt,nphrqd,ns,nsp,nttyo,nst_asv,titr,urefsp,uspec,xhrs25, $ xlks25,zchar) c c This subroutine reads a data block for the ns-th aqueous c species from a PHREEQE data file (phrqdat.txt). c c This subroutine is called by: c c green.f c c----------------------------------------------------------------------- c c Principal input: c c nat_asv = number of aqueous species c nphrqd = unit number of the PHREEQE data file (phrqdat.txt) c ns = species index (ns = na, the aqueous species index) c nst_asv = total number of species c c Principal output: c c axlksp = array of coefficients for computing log K as a c function of temperature using the formula c log K = a1 + a2*T + a3/T + a4*T**2 + a5/T**2 c azero = array of ion sizes c csp = array of coefficients for chemical reactions c isp = array of PHREEQE indices of master species appearing c in reactions c isphrq = array of PHREEQE species numbers (these are used c only for master species); the argument is the c corresponding EQ3/6 species number c kflag = array of flags denoting temperature dependency of log K c nsp = array of numbers of master species appearing in c chemical reactions c titr = array of titration factors c urefsp = array of reference identifiers c uspec = array of names of species c xhrs25 = array of 25C enthalpy values for chemical reactions c xlks25 = array of 25C log K values for chemical reactions c zchar = array of electrical charge numbers c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nat_asv,nst_asv c integer noutpt,nphrqd,nttyo c integer isp(10,nst_asv),isphrq(nst_asv),kflag(nst_asv), $ nsp(nst_asv) c integer ns c character(len=24) urefsp(nst_asv),uspec(nst_asv) c real(8) axlksp(5,nst_asv),azero(nat_asv),csp(10,nst_asv),

JNC TN8400 2002-024
Page 121: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 115 -

$ titr(nat_asv),xhrs25(nst_asv),xlks25(nst_asv),zchar(nst_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer i,j2,j3,j4,n c integer ilnobl c character(len=80) uline character(len=24) unamsp,uspeca,uspecb,ux24 c real(8) adhsp1,adhsp2,gflag,thsp c c----------------------------------------------------------------------- c SAVE uspeca c c----------------------------------------------------------------------- c if (ns .le. 1) uspeca = '<none>' c read (nphrqd,'(a)',end=120) uline read (uline,'(i4)',err=120) isphrq(ns) unamsp = ' ' c c Check for alternate (full-length) name. c j2 = index(uline,'FOR') if (j2 .gt. 0) then j3 = index(uline,'FROM') - 1 if (j3 .lt. 0) j3 = ilnobl(uline) j2 = j2 + 3 if (j2 .lt. j3) then unamsp = uline(j2:j3) call lejust(unamsp) endif endif c c Check for a reference string. c ux24 = 'None' j2 = index(uline,'FROM') if (j2 .gt. 0) then j3 = ilnobl(uline) j2 = j2 + 4 if (j2 .lt. j3) then ux24 = uline(j2:j3) call lejust(ux24) c c Remove any surrounding square brackets. c j3 = ilnobl(ux24) if (ux24(1:1) .eq. '[') ux24(1:1) = ' ' if (ux24(j3:j3) .eq. ']') ux24(j3:j3) = ' ' call lejust(ux24) j3 = ilnobl(ux24) if (j3 .le. 0) ux24 = 'None' endif endif urefsp(ns) = ux24 c c Notes: c nsp = number of species in reaction, not counting the c associated species, which always has a reaction coefficient c of -1 c kflag = flag denoting temperature dependency of log K c 0 = van't Hoff equation with constant enthalpy c 1 = analytical expression requiring ASP values c gflag = flag for activity coefficient models; not usable in c EQ3/6 c thsp = operational valence; not used in EQ3/6

JNC TN8400 2002-024
Page 122: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 116 -

c adhsp1, adhsp2 = activity coefficient parameters; not usable c in EQ3/6 c read (nphrqd,'(a)',end=120) uline uspecb = uspeca read (uline,'(a12)',err=120) uspeca read (uline,'(a12,i1,2i1,6f10.3)',err=120) uspec(ns),nsp(ns), $ kflag(ns),gflag,zchar(ns),thsp,azero(ns),adhsp1,adhsp2, $ titr(ns) c read (nphrqd,'(a)',end=120) uline read (uline,'(2f10.3,5e12.5)',err=120) xlks25(ns),xhrs25(ns), $ (axlksp(i,ns), i = 1,5) c read (nphrqd,'(a)',end=120) uline read (uline,'(6(i3,f7.3))',err=120) $ (isp(n,ns),csp(n,ns), n = 1,nsp(ns)) c c Replace the species name if a longer name was specified. c This longer name is not a standard part of a PHREEQE data file. c j2 = ilnobl(unamsp) if (j2 .gt. 0) then uspec(ns) = unamsp uspeca = unamsp endif c c Nonsense to avoid compiler warnings that these variables are c not used. c gflag = thsp thsp = adhsp1 adhsp1 = adhsp2 adhsp2 = gflag c go to 999 c 120 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uspeca) j4 = ilnobl(uspecb) write (noutpt,1010) uline(1:j2),uspeca(1:j3),uspecb(1:j4) write (nttyo,1010) uline(1:j2),uspeca(1:j3),uspecb(1:j4) 1010 format(' * Error - (rdmngs) Had a read error while reading', $ ' an aqueous species',/7x,'block on phrqdat.txt. The', $ ' last line read was:',/7x,'"',a,'".',/7x,'The current species', $ ' name is "',a,'".',/7x,'The preceding species name is "',a,'".') stop c 999 continue c end subroutine rdmngs(axlksp,csp,isp,itype,kflag,nat_asv,noutpt, $ nphrqd,ns,nsp,nttyo,nst_asv,urefsp,uspec,xhrs25,xlks25,zchar) c c This subroutine reads a data block for the ns-th species c (mineral or gas) from a PHREEQE data file (phrqdat.txt). c c This subroutine is called by: c c green.f c c----------------------------------------------------------------------- c c Principal input: c c itype = flag to return only a species of a given type c = 0: Return a mineral (skip any gases) c = 1: Return a gas (skip any minerals) c nat_asv = number of aqueous species c nphrqd = unit number of the PHREEQE data file (phrqdat.txt) c ns = species index (ns = na, the aqueous species index) c nst_asv = total number of species

JNC TN8400 2002-024
Page 123: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 117 -

c c Principal output: c c axlksp = array of coefficients for computing log K as a c function of temperature using the formula c log K = a1 + a2*T + a3/T + a4*T**2 + a5/T**2 c csp = array of coefficients for chemical reactions c isp = array of PHREEQE indices of master species appearing c in reactions c kflag = array of flags denoting temperature dependency of log K c nsp = array of numbers of master species appearing in c chemical reactions c urefsp = array of reference identifiers c uspec = array of names of species c xhrs25 = array of 25C enthalpy values for chemical reactions c xlks25 = array of 25C log K values for chemical reactions c zchar = array of electrical charge numbers c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nat_asv,nst_asv c integer noutpt,nphrqd,nttyo c integer isp(10,nst_asv),kflag(nst_asv),nsp(nst_asv) c integer itype,ns c character(len=24) urefsp(nst_asv),uspec(nst_asv) c real(8) axlksp(5,nst_asv),csp(10,nst_asv),xhrs25(nst_asv), $ xlks25(nst_asv),zchar(nst_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer i,j2,j3,j4,k,kflagx,n,nn,nspx c integer ilnobl c logical qskip c character(len=80) uline character(len=24) uspeca,uspecb,ux24 c real(8) simin,thsp c c----------------------------------------------------------------------- c SAVE uspeca c c----------------------------------------------------------------------- c if (ns .le. (nat_asv + 1)) uspeca = '<none>' c 110 read (nphrqd,'(a)',end=120) uline c c Notes: c nsp = number of species in reaction, not counting the c associated species, which always has a reaction coefficient c of -1 c thsp = operational valence; not used in EQ3/6 c kflag = flag denoting temperature dependency of log K c 0 = van't Hoff equation with constant enthalpy c 1 = analytical expression requiring ASP values c simin = desired saturation index (SI) value; not used in EQ3/6

JNC TN8400 2002-024
Page 124: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 118 -

c uspecb = uspeca uspeca = uline(1:10) k = 0 j3 = ilnobl(uspeca) if (j3 .gt. 2) then if (uspeca(j3 - 2:j3) .eq. '(g)') k = 1 endif c if (itype.le.0 .and. k.gt.0) then c c Looking for a mineral, but have a gas. c qskip = .true. elseif (itype.gt.0 .and. k.le.0) then c c Looking for a gas, but have a mineral. c qskip = .true. else c c Found a species of the desired type. c qskip = .false. endif c if (.not.qskip) then read (uline,'(a10,i2,3x,3f10.2,5x,i1,9x,f10.3,a24)',err=120) $ uspec(ns),nsp(ns),thsp,xlks25(ns),xhrs25(ns),kflag(ns), $ simin,ux24 uspeca = uspec(ns) nspx = nsp(ns) kflagx = kflag(ns) zchar(ns) = 0. call lejust(ux24) c c Remove any square brackets surrounding the reference string. c j3 = ilnobl(ux24) if (j3 .gt. 0) then if (ux24(1:1) .eq. '[') ux24(1:1) = ' ' if (ux24(j3:j3) .eq. ']') ux24(j3:j3) = ' ' call lejust(ux24) j3 = ilnobl(ux24) endif if (j3 .le. 0) ux24 = 'None' urefsp(ns) = ux24 c else read (uline,'(a10,i2,38x,i1)',err=120) uspeca,nspx,kflagx endif c c The specified reaction may requires a second line if nspx c is greater than 5. It may be as great as 10. c read (nphrqd,'(a)',end=120) uline if (.not.qskip) then nn = min(5,nsp(ns)) read (uline,'(5(i4,f11.3))',err=120) $ (isp(n,ns),csp(n,ns), n = 1,nn) endif c if (nspx .gt. 5) then read (nphrqd,'(a)',end=120) uline if (.not.qskip) then read (uline,'(5(i4,f11.3))',err=120) $ (isp(n,ns),csp(n,ns), n = 6,nsp(ns)) endif endif c if (kflagx .gt. 0) then read (nphrqd,'(a)',end=120) uline if (.not.qskip) then

JNC TN8400 2002-024
Page 125: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 119 -

read (uline,'(5e12.5)',err=120) (axlksp(i,ns), i = 1,5) endif endif c if (qskip) go to 110 c c Nonsense to avoid compiler warnings that these variables are c not used. c thsp = simin simin = thsp c go to 999 c 120 j2 = ilnobl(uline) j2 = min(j2,70) j3 = ilnobl(uspeca) j4 = ilnobl(uspecb) write (noutpt,1010) uline(1:j2),uspeca(1:j3),uspecb(1:j4) write (nttyo,1010) uline(1:j2),uspeca(1:j3),uspecb(1:j4) 1010 format(' * Error - (rdmngs) Had a read error while reading', $ ' a mineral/gas species',/7x,'block on phrqdat.txt. The', $ ' last line read was:',/7x,'"',a,'".',/7x,'The current species', $ ' name is "',a,'".',/7x,'The preceding species name is "',a,'".') stop c 999 continue c end subroutine rijust(ustr) c c This subroutine right-justifies the non-blank portion of the c string ustr. c c This subroutine is called by: c c Any c c----------------------------------------------------------------------- c c Input: c c ustr = the input string variable c c Output: c c ustr = the output string variable c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c character*(*) ustr c c----------------------------------------------------------------------- c c Local variable declarations. c integer j,jj,jbl,j2,nchars c integer ilnobl c c----------------------------------------------------------------------- c c Get the length of the string variable. c nchars = len(ustr) c c Get the position of the last non-blank character and the number

JNC TN8400 2002-024
Page 126: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 120 -

c of blanks on the right-hand-side. c j2 = ilnobl(ustr) jbl = nchars - j2 c if (jbl .gt. 0) then do jj = j2,1,-1 j = jj + jbl ustr(j:j) = ustr(jj:jj) enddo do j = 1,jbl ustr(j:j) = ' ' enddo endif c end subroutine wrcomp(cess,nct_asv,ness,ness_asv,nessr,noutpt, $ ns,nst_asv,uelem,uspec) c c This subroutine writes the elemental composition of a species c in the format found in a species block on a DATA0 file. c c This subroutine is called by: c c green.f c c----------------------------------------------------------------------- c c Principal input: c c cess = array of coefficients for chemical elements c nct_asv = the maximum number of chemical elements c ness = array of indices of chemical elements composing c species c ness_asv = the maximum number of entries in the cess or ness c array c nessr = pointer array giving the ranges in the cess and ness c ns = index of species whose composition is to be written c nst_asv = the maximum number of chemical species c uelem = array of names of chemical elements c uspec = array of names of species c c Principal output: c c None c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nct_asv,ness_asv,nst_asv c integer noutpt c integer ness(ness_asv),nessr(2,nst_asv) c integer ns c character(len=24) uspec(nst_asv) character(len=8) uelem(nct_asv) c real(8) cess(ness_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer j2,k,n,ncts,nc1,nc2,nc3,nlim,nr1,nr2 c

JNC TN8400 2002-024
Page 127: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 121 -

integer ilnobl c character(len=4) ux4 c c----------------------------------------------------------------------- c nr1 = nessr(1,ns) nr2 = nessr(2,ns) if (nr2 .gt. nr1) then ncts = nr2 - nr1 + 1 elseif (ness(nr1) .gt. 0) then ncts = nr2 - nr1 + 1 else ncts = 0 endif write (ux4,'(i4)') ncts call rijust(ux4) write (noutpt,'(2x,a4," element(s):")') ux4 c if (ncts .gt. 0) then nlim = nr2 k = mod(ncts,3) nlim = nr2 - k c c Write three elements to a line. c do n = nr1,nlim,3 nc1 = ness(n) nc2 = ness(n + 1) nc3 = ness(n + 2) j2 = ilnobl(uelem(nc3)) write (noutpt,'(3x,f9.4,1x,a8,4x,f9.4,1x,a8,4x,f9.4,1x,a)') $ cess(n),uelem(nc1),cess(n + 1),uelem(nc2), $ cess(n + 2),uelem(nc3)(1:j2) enddo c c Write any remaining elements to a final line. c if (k .eq. 1) then n = nr2 nc1 = ness(n) j2 = ilnobl(uelem(nc1)) write (noutpt,'(3x,f9.4,1x,a)') cess(n),uelem(nc1)(1:j2) elseif (k .eq. 2) then n = nr2 - 1 nc1 = ness(n) nc2 = ness(n + 1) j2 = ilnobl(uelem(nc2)) write (noutpt,'(3x,f9.4,1x,a8,4x,f9.4,1x,a)') $ cess(n),uelem(nc1),cess(n + 1),uelem(nc2)(1:j2) endif endif c end subroutine wrreac(cdrs,ndrs,ndrs_asv,ndrsr,noutpt,ns, $ nst_asv,uspec,xlks) c c This subroutine writes the associated reaction of a species c and the corresponding log K grid in the format found in a c species block on a DATA0 file. c c This subroutine is called by: c c green.f c c----------------------------------------------------------------------- c c Principal input: c c cdrs = array of coefficients for chemical reactions c ndrs = array of indices of species appearing in reactions c ndrs_asv = the maximum number of entries in the cdrs or ndrs c array

JNC TN8400 2002-024
Page 128: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 122 -

c ndrsr = pointer array giving the ranges in the cdrs and ndrs c arrays giving the reactions for corresponding c species c ns = index of species whose reaction is to be written c nst_asv = the maximum number of chemical species c uspec = array of names of species c xlks = array of log K values for chemical reactions c c Principal output: c c None c c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer ndrs_asv,nst_asv c integer noutpt c integer ndrs(ndrs_asv),ndrsr(2,nst_asv) c integer ns c character(len=24) uspec(nst_asv) c real(8) cdrs(ndrs_asv),xlks(8,nst_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer i,j2,k,n,ndrsts,nlim,nrr1,nrr2,ns1,ns2 c integer ilnobl c character(len=4) ux4 c c----------------------------------------------------------------------- c nrr1 = ndrsr(1,ns) nrr2 = ndrsr(2,ns) ndrsts = nrr2 - nrr1 + 1 write (ux4,'(i4)') ndrsts call rijust(ux4) write (noutpt,'(2x,a4," species in reaction:")') ux4 nlim = nrr2 k = mod(ndrsts,2) if (k .gt. 0) nlim = nrr2 - 1 c c Write two species to a line. c do n = nrr1,nlim,2 ns1 = ndrs(n) ns2 = ndrs(n + 1) j2 = ilnobl(uspec(ns2)) write (noutpt,'(2x,f9.4,2x,a24,2x,f9.4,2x,a)') $ cdrs(n),uspec(ns1),cdrs(n + 1),uspec(ns2)(1:j2) enddo c c Write any remaining species to a final line. c if (nlim .lt. nrr2) then n = nrr2 ns1 = ndrs(n) j2 = ilnobl(uspec(ns1)) write (noutpt,'(2x,f9.4,2x,a)') cdrs(n),uspec(ns1)(1:j2) endif

JNC TN8400 2002-024
Page 129: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 123 -

c c Write the associated log K grid. c write (noutpt,'("**** logK grid [0-25-60-100C @1.0132bar;", $ " 150-200-250-300C @Psat-H2O]:")') write (noutpt,'(5x,4(1x,f9.4))') (xlks(i,ns), i = 1,4) write (noutpt,'(5x,4(1x,f9.4))') (xlks(i,ns), i = 5,8) end subroutine wrrefd(axlksp,kflag,noutpt,ns,nst_asv,urefsp, $ uspec,xhrs25,xlks25) c c This subroutine writes the reference data associated with c a species in the format found in a species block on a DATA0 file. c c This subroutine is called by: c c green.f c c----------------------------------------------------------------------- c c Principal input: c c axlksp = array of coefficients for computing log K as a c function of temperature using the formula c log K = a1 + a2*T + a3/T + a4*T**2 + a5/T**2 c kflag = array of flags denoting temperature dependency of log K c nst_asv = the maximum number of chemical species c urefsp = array of reference identifiers c uspec = array of names of species c xhrs25 = array of 25C enthalpy values for chemical reactions c xlks25 = array of 25C log K values for chemical reactions c c Principal output: c c None c c c----------------------------------------------------------------------- c implicit none c c----------------------------------------------------------------------- c c Calling sequence variable declarations. c integer nst_asv c integer noutpt c integer kflag(nst_asv) c integer ns c character(len=24) urefsp(nst_asv),uspec(nst_asv) c real(8) axlksp(5,nst_asv),xhrs25(nst_asv),xlks25(nst_asv) c c----------------------------------------------------------------------- c c Local variable declarations. c integer j2 c integer ilnobl c character(len=24) ux24 c c----------------------------------------------------------------------- c if (kflag(ns) .le. 0) then write (noutpt,1020) kflag(ns) 1020 format('* kflag = ',i1,' [reported logK and Delh0r data', $ ' used]')

JNC TN8400 2002-024
Page 130: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 124 -

else write (noutpt,1030) kflag(ns) 1030 format('* kflag = ',i1,' [PHREEQE T function', $ ' used]') endif c ux24 = urefsp(ns) j2 = ilnobl(ux24) if (kflag(ns) .le. 0) then write (noutpt,1040) 1040 format('* ref-state data:') write (noutpt,1050) xlks25(ns),ux24(1:j2),xhrs25(ns),ux24(1:j2) 1050 format('* logK = ',f10.3,14x,'[source: ',a,' ]', $ /'* DelH0r = ',f10.3,' kcal/mol',5x,'[source: ',a,' ]') else write (noutpt,1040) write (noutpt,1070) xlks25(ns),xhrs25(ns) 1070 format('* logK = ',f10.3,14x, $ '*** Not used ***', $ /'* DelH0r = ',f10.3,' kcal/mol',5x, $ '*** Not used ***') write (noutpt,1090) ux24(1:j2),axlksp(1,ns),axlksp(2,ns), $ axlksp(3,ns),axlksp(4,ns),axlksp(5,ns) 1090 format('* T coefficients [source: ',a,' ]:', $ /'* a1 = ',1pe12.5,' a1', $ /'* a2 = ',1pe12.5,' a2*T', $ /'* a3 = ',1pe12.5,' a3/T', $ /'* a4 = ',1pe12.5,' a4*log10(T)', $ /'* a5 = ',1pe12.5,' a5*T**-2') endif c end

JNC TN8400 2002-024
Page 131: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 125 -

別添-4.1 phgwb_10 のプログラムソース(Makefile)

FFLAGS = DEST = . EXTHDRS = HDRS = INSTALL = /usr/sbin/install LD = f77 LDFLAGS = LIBS = MAKEFILE = Makefile OBJS = checkn.o ¥ choxid.o ¥ edit.o ¥ edit1.o ¥ elemnt.o ¥ getelm.o ¥ logkt.o ¥ lwcase.o ¥ main.o ¥ minera.o ¥ readion.o ¥ speci.o ¥ substr.o ¥ subtre.o ¥ upcase.o ¥ wrtlin.o ¥ zcheck.o ¥ zchemi.o PRINT = pr PROGRAM = phgwb10 SHELL = /usr/bin/csh SRCS = checkn.f ¥ choxid.f ¥ edit.f ¥ edit1.f ¥ elemnt.f ¥ getelm.f ¥ logkt.f ¥ lwcase.f ¥ main.f ¥ minera.f ¥ readion.f ¥ speci.f ¥ substr.f ¥ subtre.f ¥ upcase.f ¥ wrtlin.f ¥ zcheck.f ¥ zchemi.f SYSHDRS = all: $(PROGRAM) $(PROGRAM): $(OBJS) $(LIBS) echo "Linking $(PROGRAM) ..." @$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)

JNC TN8400 2002-024
Page 132: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 126 -

@echo "done" clean:; @rm -f $(OBJS) core clobber:; @rm -f $(OBJS) $(PROGRAM) core tags depend:; @mkmf -f $(MAKEFILE) ROOT=$(ROOT) echo:; @echo $(HDRS) $(SRCS) index:; @ctags -wx $(HDRS) $(SRCS) install: $(PROGRAM) @echo Installing $(PROGRAM) in $(DEST) @-strip $(PROGRAM) @if [ $(DEST) != . ]; then ¥ (rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi print:; @$(PRINT) $(HDRS) $(SRCS) tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS) update: $(DEST)/$(PROGRAM) $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS) @$(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install ###

JNC TN8400 2002-024
Page 133: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 127 -

別添-4.2 phgwb_10 のプログラムソース(checkn.f)

Subroutine CheckN : (name,ierr,mxi,mastr,naq,mxaq,master,aqu,minerl) C C--------------------------------------------------------------------- C Check for repeated names C--------------------------------------------------------------------- C character*10 name, master(mastr), aqu(naq), minerl(mxaq) C C---- Initial set ---------------------------------------------------- C ierr = 0 C--------------------------------------------------------------------- C do 10 i =1,mastr if (name.eq.master(i)) ierr=1 10 continue C do 20 i =1,mxi if (name.eq.aqu(i)) ierr=1 20 continue C do 30 i =1,mxi if (name.eq.minerl(i)) ierr=1 30 continue C return end

JNC TN8400 2002-024
Page 134: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 128 -

別添-4.3 phgwb_10 のプログラムソース(choxid.f)

subroutine choxid(ioxis,nsp) C C---------------------------------------------------------------------- C check oxides in LOOK MIN C---------------------------------------------------------------------- C include 'phreqt.h' dimension table(mastr) C C---- Initial set ------------------------------------------------------ C do 10 i=1,mastr table(i) = 0.0 10 continue C isw = 0 ioxis = 0 C C------------------------------------------------------------------------ C do 30 j=1,nsp do 20 ij=1,elem(lsp(j)) count = 0. if(welem(lsp(j),ij).eq.'h') then count = nelem(lsp(j),ij) * csp(j) table(1) = table(1) + count elseif(welem(lsp(j),ij).eq.'o') then count = nelem(lsp(j),ij) * csp(j) table(2) = table(2) + count else count = nelem(lsp(j),ij) * csp(j) table(lsp(j)) = table(lsp(j)) + count endif 20 continue 30 continue C do 40 i=4,mastr if(table(i).ne.0) isw=1 40 continue C if(isw.eq.1.and.table(1).eq.0.and.table(2).ne.0) ioxis=1 C return end

JNC TN8400 2002-024
Page 135: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 129 -

別添-4.4 phgwb_10 のプログラムソース(edit.f)

subroutine edit c c--------------------------------------------------------------------+ c move H2O at top of basis species | c unit11 : temporary gwb format (IN) | c unit23 : final - 1 gwb format (OUT) | c unit40 : temporary file | c unit41 : temporary file | c--------------------------------------------------------------------+ c character*80 rec character*10 h2o c data h2o/'H2O '/ c c c---- write data on final-1 gwb fotmat (PART 1) -------------------------- c rewind 11 100 read (11,9000) rec write(23,9000) rec if(rec(7:19).eq.'basis species') go to 500 go to 100 c---------------------------------------------------------------------- 500 read (11,9000) rec write(23,9000) rec c---- write basis species before H2O on 40 ---------------------------- 1000 read (11,9000) rec if(rec(1:10).eq.'H2O ') go to 2000 write(40,9000) rec go to 1000 c---- write H2O on 41-------------------------------------------------- 2000 write(41,9000) rec do 2500 icnt=1, 4 read (11,9000) rec write(41,9000) rec 2500 continue c c---- write basis species on final-1 gwb format (PART2)----------------- c rewind 41 do 3000 icnt=1,5 read (41,9000) rec write(23,9000) rec 3000 continue c rewind 40 4000 read (40,9000,end=5000) rec write(23,9000) rec go to 4000 c 5000 read (11,9000,end=8000) rec write(23,9000) rec go to 5000 c 8000 write(12,*) 'at Basis species H2O is top position ' return 9000 format(a80) end

JNC TN8400 2002-024
Page 136: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 130 -

別添-4.5 phgwb_10 のプログラムソース(edit1.f)

subroutine edit1 c c--------------------------------------------------------------------+ c move basis species to Lwcase | c unit23 : final - 1 gwd format (IN) | c unit13 : final gwd format (OUT) | c--------------------------------------------------------------------+ c character*80 rec character*10 uname(47), lname(47) c data uname : /'CA+2 ','MG+2 ','NA+ ','K+ ' : ,'FE+2 ','MN+2 ','AL+3 ','BA+2 ' : ,'SR+2 ','H4SIO4(A ','CL- ','CO3-2 ' : ,'SO4-2 ','NO3- ','B(OH)3(A ','PO4-3 ' : ,'F- ','LI+ ','BR- ','I- ' : ,'TCO+2 ','U+4 ','CO+2 ','AM+3 ' : ,'PU+4 ','CS+ ','NI+2 ','SEO4-2 ' : ,'ZR(OH)4 ','SN(OH)4 ','SM+3 ','PB+2 ' : ,'RA+2 ','TH+4 ','PA+4 ','NP+4 ' : ,'NB(OH)5 ','PD+2 ','ND+3 ','SB(OH)3 ' : ,'BI+3 ','PO+4 ','AC+3 ','CM+3 ' : ,'H4SIO4 ','SN+2 ','ZR+4 '/ c data lname : /'Ca++ ','Mg++ ','Na+ ','K+ ' : ,'Fe++ ','Mn++ ','Al+++ ','Ba++ ' : ,'Sr++ ','H4SiO4 ','Cl- ','CO3-- ' : ,'SO4-- ','NO3- ','B(OH)3 ','PO4--- ' : ,'F- ','Li+ ','Br- ','I- ' : ,'TcO++ ','U++++ ','Co++ ','Am+++ ' : ,'Pu++++ ','Cs+ ','Ni++ ','SeO4-- ' : ,'Zr(OH)4 ','Sn(OH)4 ','Sm+++ ','Pb++ ' : ,'Ra++ ','Th++++ ','Pa++++ ','Np++++ ' : ,'Nb(OH)5 ','Pd++ ','Nd+++ ','Sb(OH)3 ' : ,'Bi+++ ','Po++++ ','Ac+++ ','Cm+++ ' : ,'H4SiO4 ','Sn++ ','Zr++++ '/ c ncnt = 47 c c---- write data on final gwb fotmat (PART 1) -------------------------- c rewind 23 100 read (23,9000) rec write(13,9000) rec if(rec(7:19).eq.'basis species') go to 500 go to 100 c 500 read (23,9000) rec write(13,9000) rec c 1000 read (23,9000) rec if(rec(1:5).eq.'-end-') go to 3000 do 2000 icnt=1,ncnt if(rec(1:10).ne.uname(icnt)) go to 2000 write(13,9100) lname(icnt) go to 2500 2000 continue write(13,9100) rec 2500 read (23,9000) rec write(13,9000) rec c read (23,9000) rec write(13,9000) rec c read (23,9000) rec write(13,9000) rec c

JNC TN8400 2002-024
Page 137: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 131 -

read (23,9000) rec write(13,9000) rec c go to 1000 c 3000 write(13,9000) rec 4000 read (23,9000,end=8000) rec write(13,9000) rec go to 4000 c 8000 write(12,*) 'at Basis species Upcase name --> Lpcase name' stop 9000 format(a80) 9100 format(a10) end

JNC TN8400 2002-024
Page 138: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 132 -

別添-4.6 phgwb_10 のプログラムソース(elemnt.f)

subroutine Elemnt (mastr,index,name,elem,nelem,welem) C C------------------------------------------------------------------------- C find what elements of GWB are in each of the master species of PHREEQE C C elems = number of elements in master species of file "ELEMS" C nelems(i,j) = how many of element "welems(j)" are there C in master species of file "ELEMS" C C elem(i) = number of elements in master species "i" C nelem(i,j) = how many of element "welem(j)" are there C in master species "i" C------------------------------------------------------------------------- C integer elem(mastr), elems real nelem(mastr,6), nelems(3) character*2 welem(mastr,6), welems(3) character*10 name, basis, nname save C C if (index.le.0 .or. index.gt.mastr) go to 1500 if (index.eq.mastr) go to 100 C rewind 20 C C---- read master species name, number of elements in the master species, C what are the names of the elements in the GWB data base, C and how many of each C 10 read (20,9000,err=30,end=1100) basis,elems C if (elems.lt.0 .or. elems.gt.3) go to 1000 if (elems.gt.0) read (20,9100) (welems(i),nelems(i), i=1,elems) C do 20 i=1,elems call LwCase (welems(i),2) 20 continue C 30 continue nname = name call UpCase (nname,10) call UpCase (basis,20) if (nname.ne.basis) go to 10 elem(index)=elems do 40 i=1,elems welem(index,i)=welems(i) nelem(index,i)=nelems(i) 40 continue return C 100 if (index.ne.mastr) go to 1100 C << o2(g) >> elem(mastr)=1 welem(mastr,1)='o' nelem(mastr,1)=2. return C C---- ERROR ---------------------------------------------------------- C csd70 write (*,9200) basis,elems 1000 write (12,9200) basis,elems stop C csd70 write (*,9300) index,nname 1100 write (12,9300) index,nname csd7 write (*,9400) write (12,9400) stop

JNC TN8400 2002-024
Page 139: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 133 -

C csd70 write (*,9300) index,nname 1500 write (12,9300) index,nname csd7 write (*,9500) mastr write (12,9500) mastr stop C 9000 format(a10,10x,i2) 9100 format(20x,6(a2,F2.0,2x)) 9200 format(1x,'-- Error in auxiliary file "ELEMS", ', :'master species: ',a,', nr of elements=',I2,/11x, :'number of elements for each master species must be >=0 and <=3', :/11x,'(only one element (with H and/or O))') 9300 format(1x,'-- Error: master species in PHREEQE data base: ',/11x, : 'index=',i3,', name=',a) 9400 format(11x,'(master species name not found in file "ELEMS")') 9500 format(11x,'(index should be >0 and <=',I2, : ' in subroutine "Elemnt")') end

JNC TN8400 2002-024
Page 140: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 134 -

別添-4.7 phgwb_10 のプログラムソース(getelm.f)

subroutine GetElm : (mastr,nsp,lsp,csp,elm,elem,nelem,nelm,welem,welm) C C---------------------------------------------------------------------- C get the species' elements C C elm = number of elements in species C nelm(j) = how many of element "welm(j)" are there in species C elem(i) = number of elements in master species "i" C nelem(i,j) = how many of element "welem(j)" are there C in master species "i" C----------------------------------------------------------------------- C integer elem(mastr), elm, lsp(20 ) real nelem(mastr,6), nelm(20), csp(20 ) character*2 welem(mastr,6), welm(20) C------------------------------------------------------------------------- C if (nsp.le.0 .or. nsp.gt.20) go to 1000 C elm=elem(lsp(1)) do 100 i=1,elm welm(i)=welem(lsp(1),i) nelm(i)=nelem(lsp(1),i)*csp(1) 100 continue C iadd=0 do 400 i=2,nsp do 300 ij=1,elem(lsp(i)) ifound=0 do 200 j=1,elm if (welem(lsp(i),ij) .ne. welm(j)) go to 200 nelm(j)=nelm(j)+(nelem(lsp(i),ij)*csp(i)) ifound=1 200 continue C if (ifound.eq.1) go to 300 welm(elm+1)=welem(lsp(i),ij) nelm(elm+1)=nelem(lsp(i),ij)*csp(i) elm=elm+1 300 continue 400 continue return C C---- ERROR -------------------------------------------------------------- C csd70 write (*,*) 'Fatal error, NSP=',nsp csd7 write (*,*) '(should be >0 and <=20) in routine "GetElm"' 1000 write (12,*) 'Fatal error, NSP=',nsp write (12,*) '(should be >0 and <=20) in routine "GetElm"' stop end

JNC TN8400 2002-024
Page 141: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 135 -

別添-4.8 phgwb_10 のプログラムソース(logkt.f)

csd subroutine logKt (kflag,lkt0sp,lkt,dHsp,asp,iaqmin) subroutine logKt (kflag,lkt0sp,lkt,dHsp,asp,iaqmin,iswlog) C C------------------------------------------------------------------- C get logKeq versus temperature C------------------------------------------------------------------- C csd6 real lkt0sp, lkt(8), dHsp, asp(6), temp(6) real lkt0sp, lkt(8), dHsp, asp(6), temp(8) save C csd6 data temp/0.,25.,60.,100.,150.,200./ data temp/0.,25.,60.,100.,150.,200.,250.,300./ C 1/298.15 data temp1/3.3540164E-3/ C Rln10= 4.57565106 C C---- initial set --------------------------------------------------- C iswlog = 0 C-------------------------------------------------------------------- C if( kflag.eq.0 ) then C if( dHsp.eq.0 ) then C +-----------------------------+ C | constant value | C +-----------------------------+ csd4 do 100 i=1,6 do 100 i=1,8 lkt(i)=lkt0sp 100 continue csd4 lkt(7)=500.0 csd4 lkt(8)=500.0 ccc write(6,*) 'CONST' return else C +-----------------------------+ C | use Van't Hoff expresion | C +-----------------------------+ csd6 do 200 i = 1, 6 do 200 i = 1, 8 temp2 = 1. / (273.15 + temp(i)) lkt(i) = lkt0sp - 1000.*((dHsp/Rln10)*(temp1-temp2)) 200 continue csd6 lkt(7)=500.0 csd6 lkt(8)=500.0 ccc write(6,*) 'VAN ' return endif elseif( kflag.eq.1 ) then C +-----------------------------+ C | use polynomial expresion | C +-----------------------------+ csd6 do 400 i=1,6 do 400 i=1,8 tempe = 273.15 + temp(i) lkt(i) = asp(1) + (asp(2)*tempe) + (asp(3)/tempe) : + (asp(4)*alog10(tempe)) + (asp(5)/(tempe*tempe)) if (iaqmin.eq.1) lkt(i) = -lkt(i) ccc write(6,*) 'LOGKT:400:i,lkt(i)=',i,lkt(i) 400 continue csd6 lkt(7)=500.0 csd6 lkt(8)=500.0 ccc write(6,*) 'POLI ' c if (abs(lkt(2)-lkt0sp) .lt. 0.01) return iswlog = 1

JNC TN8400 2002-024
Page 142: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 136 -

return else return endif C C----------------------------------------------------------------------- C C end

JNC TN8400 2002-024
Page 143: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 137 -

別添-4.9 phgwb_10 のプログラムソース(lwcase.f)

Subroutine LwCase (i1,nchr) C character i1*(*), ch*1 C do 10 i=1,nchr ch=i1(i:i) if ((ch.ge.'A') .and. (ch.le.'Z')) i1(i:i)=char(ichar(ch)+32) 10 continue C return end

JNC TN8400 2002-024
Page 144: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 138 -

別添-4.10 phgwb_10 のプログラムソース(main.f)

C------------------------------------------------------------------- C program phrgwb C PHREEQE TYPE LIBRALY ----> GWB TYPE LIBRARY C MODIFY by C C by: I.Puigdomenech C Studsvik AB C 611 82 Nykoping, Sweden C C for: Swedish Nuclear Power Inspectorate C Report SKI-TR-89:13 C------------------------------------------------------------------- include 'phreqt.h' C------------------------------------------------------------------- c parameter (mxaq=1000,mstr=120) c parameter (naq=mxaq-mstr,mastr=mstr+1) c character*40 infil,utfil, line*80 c character*80 line,datac c character*40 formda, modelt,datana c character*8 keywrd c character*10 name, nul,elektr,h2o,hpl,oxg,h2ol,h2olc c character blank*1,cdate*10,author*20 C C lkt = log equilibrium constant for the dissociation reaction C csp = stoichiometric coeffs for association reactions for an aqueous species C = stoichiometric coeffs for dissociation reactions for a mineral C c real lkt0sp,lkt(8),lkEh(8),dhsp,zsp,alksp,asp(6),csp(20) c integer inlin,index,nsp,kflag,lsp(20) C C aqucsp = stoichiometric coeffs for association reactions C for the aqueous species C c character*10 aqu(naq), minerl(mxaq), master(mastr) c integer aqunsp(naq), aqulsp(naq,20) c real aqucsp(naq,20),aqulk0(naq,6), aquzsp(naq) c : ,mstzsp(mastr) c integer elem(mastr), elm c real nelem(mastr,6), nelm(20) c real zmolw(80) c character*2 welem(mastr,6), welm(20) c logical lhpl, lh2o, first C------------------------------------------------------------------- C csd7.add character*80 rec csd7.end character*3 yna character*5 csions character*2 weleml(mastr,6) character*80 linec character*8 elemna1 character*8 elemna2 csd.mod by neyama integer*4 ihizuk(3) external idate C data cdate/'2000/03/01'/ data blank/' '/ data first/.true./ data nul /'*?*?*?*?*?'/ data elektr/'e- '/ data elektb/'E- '/ data h2o,h2ol,h2olc/'h2o ','h2o(l) ','h2o '/ data h2ob,h2olb,h2olcb/'H2O ','H2O(L) ','H2O '/ data hplb,oxg /'H+ ','O2(aq) '/ c data zmolw(1),zmolw(2)/ 1.00791, 15.9994 / data keyele(1),keyele(2),keyele(3)/'h', 'o', ' '/

JNC TN8400 2002-024
Page 145: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 139 -

data elemna1/'Hydrogen'/ data elemna2/'Oxygen '/ csd1.add data line/'dataset of thermodynamic data for gwb programs'/ data formda/'oct94'/ data modelt/'debye-huckel'/ csd1.end cmod by neyama C C log k for Eh reaction: C 2 H2O = O2(G) + 4 H+ + 4 E- C data lkEh/-91.0454,-83.1028,-74.0521,-65.8632, C + -57.8929,-51.6850,-46.7266,-42.6842/ c lkEh(2) = 500. C C---- get date (VAX) ------------------------------------------------- C call idate(ihizuk) write(cdate(1:4),'(i4)') ihizuk(3) write(cdate(6:7),'(i2)') ihizuk(2) write(cdate(9:10),'(i2)') ihizuk(1) write (*,9000) cdate C C---- get command line and open files ------------------------------- C infil=blank utfil=blank C write(*,9010) read(*,9040,err=7100) infil if (infil.eq. '?' .or. infil.eq.blank) go to 7100 write(*,9020) read(*,9040,err=7100) utfil if (utfil.eq.blank) go to 7100 C C---- open file ------------------------------------------------------ C C unit = 1 : phreeqe format (IN) CSD10 unit = 11 : gwb format (temp_OUT) csd10.add C unit = 40 : temp file (temp_out) C unit = 41 : temp file (temp_out) C unit = 23 : temp file (temp_out) C unit = 13 : final gwb format (OUT) csd10.end c unit = 12 : message.out (OUT) C unit = 15 : HDR (IN) C unit = 20 : ELEMS (IN) C unit = 30 : ION_FILE (IN) OPEN(1,FILE=INFIL,STATUS='OLD',IOSTAT=IOERR) IF (IOERR.NE.0) GO TO 7700 csd10 OPEN(11,FILE=UTFIL,STATUS='UNKNOWN',IOSTAT=IOERR, csd10: carriagecontrol='LIST') OPEN(13,FILE=UTFIL,STATUS='UNKNOWN',IOSTAT=IOERR, : carriagecontrol='LIST') IF (I.NE.0) GO TO 7800 OPEN(12,FILE='message.out',STATUS='UNKNOWN',IOSTAT=IOERR) OPEN(15,FILE='HDR',STATUS='OLD',IOSTAT=IOERR) IF (IOERR.NE.0) GO TO 7900 OPEN(20,FILE='ELEMS',STATUS='OLD',IOSTAT=IOERR) IF (IOERR.NE.0) GO TO 8000 OPEN(30,FILE='ION_FILE',STATUS='OLD',IOSTAT=IOERR) IF (IOERR.NE.0) GO TO 8050 C C---- UpCase of phreeqe.tdb ---------------------------------------- C 10 read(1,'(a80)',end=11) rec C call UpCase(rec,80) C write(10,'(a80)') rec go to 10 C

JNC TN8400 2002-024
Page 146: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 140 -

C---- Initial set ----------------------------------------------------- C C 11 do 15 i=1,mstr master(i)=nul 15 continue C master(mastr)=oxg index=mastr call Elemnt (mastr,index,oxg,elem,nelem,welem) C do 20 i=1,naq aqu(i)=nul aqunsp(i)=-1 20 continue C do 30 i=1,mxaq minerl(i)=nul 30 continue C NSQ=0 C C*********************************************************************** c Header line write C*********************************************************************** c c datana = infil c 50 author=blank write (*,9030) read (*,9040,err=50) author if (author.eq.blank) go to 50 C write(11,9040) line write(11,9050) formda write(11,9060) modelt write(11,9070) datana write(11,9080) datac write(11,9090) cdate write(11,9100) author write(11,9110) c C*********************************************************************** c Read HDR tape and write C*********************************************************************** c write(11,9140) blank 100 read (15,9140,end=1000) line if (line(1:10) .eq. '* temperat') go to 110 go to 100 C 110 continue Call WrtLin (line) 120 read (15,9140,end=1000) line if (line(1: 3) .eq. '* -') go to 900 if (line(1:14) .eq. '* log k for eh') go to 130 Call WrtLin (line) go to 120 C C---- read log K for reaction ----------------------------------------- C 2 H2O = O2(G) + 4 H+ + 4 E- C 130 continue call WrtLin (line) i=99 ii=99 i2=99 140 read (15,9140,end=1000) line if (line(1: 3) .eq. '* -') go to 900 if (line(1:18) .eq. '* log k for h2(aq)') go to 150 call WrtLin (line) if (i.eq.1) read(line,9190) (lkEh(j),j=1,4)

JNC TN8400 2002-024
Page 147: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 141 -

if (i.eq.2) read(line,9190) (lkEh(j),j=5,8) if (i.eq.2) i=0 if (i.eq.1) i=2 if(line(1:2) .eq. '**') i=1 go to 140 c 150 continue c call WrtLin (line) 160 continue read (15,9140,end=1000) line if (line(1: 3) .eq. '* -') go to 900 if (line(1:18) .eq. '* log k for o2(aq)') go to 170 c call WrtLin (line) if (ii.eq.1) read(line,9190) (lkEhaq(j),j=1,4) if (ii.eq.2) read(line,9190) (lkEhaq(j),j=5,8) if (ii.eq.2) ii=0 if (ii.eq.1) ii=2 if(line(1:2) .eq. '**') ii=1 go to 160 c 170 continue c call WrtLin (line) 180 continue read (15,9140,end=1000) line if (line(1: 3) .eq. '* -') go to 900 c call WrtLin (line) if (i2.eq.1) read(line,9190) (lkEhoa(j),j=1,4) if (i2.eq.2) read(line,9190) (lkEhoa(j),j=5,8) if (i2.eq.2) i2=0 if (i2.eq.1) i2=2 if(line(1:2) .eq. '**') i2=1 go to 180 c 900 continue C************************************************************************* c Elements write C************************************************************************* C C---- calc. count of Elements ------------------------------------------ C 1000 continue c rewind 10 c inlin=1 read(10,9140,err=8100,end=8200) keywrd if (keywrd.ne.'elements'.and.keywrd.ne.'ELEMENTS') go to 7300 write(12,9150) NCT2=2 C 1100 inlin=inlin+1 read(10,9160,err=8100,end=8200) keywrd,i,zsp if (keywrd.eq.blank) go to 1200 if (i.ge.4) NCT2=NCT2+1 go to 1100 C C---- read & write ELEMENTS infomation ----------------------------------- C 1200 NSQ2=NCT2+1 rewind 10 read(10,9140) keywrd C C write(11,9140) blank write(11,9170) NCT2 write(11,9140) blank c << element h o >> keywrd= 'H' write(11,9180) elemna1,keywrd,zmolw(1) keywrd= 'O' write(11,9180) elemna2,keywrd,zmolw(2) C << other elements >>

JNC TN8400 2002-024
Page 148: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 142 -

1300 read(10,9160) keywrd,i,zmolw(i) keyele(i) = keywrd if (keywrd.eq.blank) go to 1400 write(*,9140) keywrd if (i.lt.4) go to 1300 call LwCase (keyele(i),8) write(11,9180) keywrd,keywrd,zmolw(i) go to 1300 C - end - 1400 write(11,9430) C C************************************************************************ c Basis species write C************************************************************************ C C---- calc. count of basic species ------------------------------------- C NMaster = mstr nct3=0 mxi=0 inlin=inlin+1 C read(10,9140,err=8100,end=8200) keywrd if (keywrd.ne.'species'.and.keywrd.ne.'SPECIES') go to 7500 write(12,9200) C 2000 inlin=inlin+1 csd11 read(10,9230,err=8100,end=8200) index read(10,9910,err=8100,end=8200) rec csd11.add if (rec(4:4).eq.' ') then read(rec,9920) index else read(rec,9930) index endif csd11.end if (index.eq.0.or.index.gt.60 ) go to 2100 read(10,9240,err=8100,end=8200) name,nsp,kflag,zsp,sions : ,alksp read(10,9250,err=8100,end=8200) lkt0sp,dHsp,(asp(i),i=1,6) read(10,9290,err=8100,end=8200) (lsp(i),csp(i),i=1,nsp) if(name.eq.elektr.or.name.eq.elektb) go to 2000 nct3=nct3 + 1 go to 2000 c << appendent o2(g) ---> nct3 + 1 >> 2100 continue nct3 = nct3 + 1 write(11,9140) blank write(11,9220) nct3 write(11,9140) blank c C------------------------------------------------------------------------ c rewind 10 2200 read(10,9140,err=8100,end=8200) keywrd if (keywrd.ne.'species'.and.keywrd.ne.'SPECIES') go to 2200 c c---- read ion size or not ? ------------------------------------------- c call readion : ( name_ion, size_ion, max_ion, naq ) ccc write(6,*) ' READION ended' C------------------------------------------------------------------------- c 2400 continue inlin=inlin+1 csd11 read(10,9230,err=8100,end=8200) index read(10,9910,err=8100,end=8200) rec csd11.add if (rec(4:4).eq.' ') then read(rec,9920) index else read(rec,9930) index

JNC TN8400 2002-024
Page 149: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 143 -

endif csd11.end if (index.lt.0 .or. index.gt.mxaq) go to 7400 if (index.eq.0.or.index.gt.60 ) go to 2900 inlin=inlin+1 read(10,9240,err=8100,end=8200) name,nsp,kflag,zsp,sions : ,alksp if (nsp.le.0 .or. nsp.gt.20) go to 7600 c if (name.eq.'OH-' .or. name.eq.'oh-') NMaster = index - 1 Call CheckN (name,ierr,mxi,mastr,naq,mxaq,master,aqu,minerl) if (index.gt.NMaster) go to 2500 C C---- master species C if (name.eq.h2o .or. name.eq.h2ol) name=h2olc if (name.eq.h2ob .or. name.eq.h2olb) name=h2olcb master(index) = name master(mastr) = oxg if (index.gt.3) go to 2450 if (index.eq.1.and.name.ne.hpl.and.name.ne.hplb) go to 7200 if (index.eq.2.and.name.ne.elektr.and.name.ne.elektb) go to 7200 if (index.eq.3.and.name.ne.h2olc.and.name.ne.h2olcb) go to 7200 C 2450 call Elemnt (mastr,index,name,elem,nelem,welem) C 2500 inlin=inlin+1 read(10,9250,err=8100,end=8200) lkt0sp,dHsp,(asp(i),i=1,6) inlin=inlin+1 read(10,9290,err=8100,end=8200) (lsp(i),csp(i),i=1,nsp) C C---- check that the species in the reaction are "master" species C iadd=0 do 2600 i=1,nsp if (lsp(i).le.NMaster .and. master(lsp(i)).ne.nul) goto 2600 if (lsp(i) .gt. NMaster) iadd=1 if (master(lsp(i)) .eq. nul) iadd=2 j=i write (12,9260) name, nsp, (lsp(j),j=1,nsp) if (iadd.eq.1) write(12,9510) if (iadd.eq.2) write (12,9520) lsp(j),master(lsp(j)) write (12,9530) name if (index.le.mstr) master(lsp(j)) = nul go to 2400 2600 continue c c if(index.le.NMaster) mstzsp(index) = zsp if(name.eq.elektr.or.name.eq.elektb ) go to 2400 write (11,9310) name Call ZCheck(mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp : ,iswzch,ztot,index) if(iswzch.eq.1) then write(11,9490) ztot endif nsq = nsq + 1 c c---- mol weight calculate -------------------------------------------- c wmol = 0.0 do 2700 i =1,elem(index) numb = index if(welem(index,i).eq.'h') numb=1 if(welem(index,i).eq.'o') numb=2 wmol = wmol+nelem(index,i)*zmolw(numb ) 2700 continue c c---- read ion size ----------------------------------------------------- C if( sions.eq.0.0 ) then c do 2800 io = 1, max_ion if( name.ne.name_ion(io)) go to 2800

JNC TN8400 2002-024
Page 150: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 144 -

sions = size_ion(io) go to 2850 2800 continue c endif c c 2850 continue c c---- write Basic species ---------------------------------------------- c write (11,9320) zsp,sions, wmol if(name(1:1).ge.'A'.and.name(1:1).le.'Z') then do i=1,elem(index) weleml(index,i) = welem(index,i) call UpCase(weleml(index,i),2) enddo endif write (11,9330) elem(index) : ,(nelem(index,i),weleml(index,i),i=1,elem(index)) write(11,9140) blank go to 2400 C c c << append O2(g) >> 2900 continue wmol = 31.9988 sions = 0.0 write(11,9340) oxg write(11,9350) sions,wmol write(11,9140) blank C - end - write(11,9430) C************************************************************************* c Redox couples & Aqueous species write C************************************************************************* C call speci C C************************************************************************** c mineral & gases & oxides write C************************************************************************** C C---- read LOOK MIN C call minera C C************************************************************************** C END C************************************************************************** C 3000 continue inlin=inlin+1 read(10,9140,err=8100,end=8200) keywrd if (keywrd.ne.'END'.and.keywrd.ne.'end') go to 3000 C C************************************************************************** C COMMENT C************************************************************************** C 4000 continue read(10,9140,err=8100,end= 4200) line do 4100 i=1,79 linec(1:1) = '*' linec(i+1:i+1) = line(i:i) 4100 continue call WrtLin(linec) go to 4000 C 4200 continue csd10.add c

JNC TN8400 2002-024
Page 151: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 145 -

c---- move H2O at top of basis species ------------------------------ c call edit c c---- Lwcase basis species-------------------------------------------- c call edit1 c csd10.end close unit=11 close unit=10 stop C C C---- error reporting ------------------------------------------------- C 7100 write(12,9540) stop C 7200 write(12,9590) inlin write(12,9550) index,name stop C 7300 write(12,9590) inlin write(12,*) : '-- Error: 1st keyword must be "ELEMENTS" in PHREEQE-data-base' go to 8200 c 7400 write(12,9590) inlin write(12,*) : '-- Error: Aqueous species index=',index,' in PHREEQE-data-base' write(12,9560) mxaq stop C 7500 write(12,9590) inlin write(12,*) : '-- Error: 2nd keyword must be "SPECIES" in PHREEQE-data-base' stop C 7600 write(12,*) 'Input line=',inlin write(12,*) 'Aqueous species or mineral=',name write(12,*) : '-- Error: Number of reaction species=',nsp : ,' in PHREEQE-data-base' write(12,*) ' (must be >0 and <=20)' stop C 7700 write(12,9580) I,INFIL write(12,9540) stop C 7800 write(12,9580) I,UTFIL write(12,9540) stop C 7900 write(12,9580) I,'HDR' write(12,9540) stop C 8000 write(12,9580) I,'ELEMS' write(12,9540) stop C 8050 write(12,9585) I,'ION_FILE' write(12,9540) stop C 8100 write(12,9590) inlin write(12,*) 'Current species name is=',name write(12,*) 'FORTRAN-Read-Error in PHREEQE-data-base' stop C

JNC TN8400 2002-024
Page 152: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 146 -

8200 write(12,9590) inlin write(12,*) : '-- Error: unexpected end-of-file, in PHREEQE-data-base' stop C 9000 format('+PHREEQE to GWB thermodynamic data base conversion', : T70,A10,/) 9010 format(' Please enter INPUT (PHREEQE-data-base) file name: ',$) 9020 format(' Please enter OUTPUT (GWB) file name: ',$) 9030 format(' Please enter your name (max. 20 letters): ',$) 9040 format(a) 9050 format('dataset format: ',40a) 9060 format('activity model: ',40a) 9070 format('*'/'* -- based on the data0 dataset of woley et al.:'/ : '* data file ',40a) 9080 format('* ',40a) 9090 format('* last modified ',40a) 9100 format('* entered by ',40a) 9110 format('*') 9120 format(3x,I2,3x,I2) 9130 format('Data File ',A,2X,'(for EQ3/6 Version 3245)'/10x, : '1 atm Steam Saturation Curve data',/,'Created ',A, : /5x,'from PHREEQE data base ',A) 9140 format(a) 9150 format('=================== ELEMENTS =======================') 9160 format(A8,2X,I2,3X,F10.0) 9170 format(3x,i2,' elements') 9180 format(a8,8x,'(',a2,')',10x,'mole wt.='f10.4) 9190 format(6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9200 format('=================== BASIS SPECIES ===================') 9220 format(3x,i2' basis species') 9230 format(i3) c9240 format(a10,i3,i1,1x,f10.3,40x,f10.3) 9240 format(a10,i3,i1,1x,f10.3,10x,f10.3,20x,f10.3) 9250 format(2f10.3,6e12.5) 9260 format(2x,'Aqueous species=',a,', species in reaction=', : i4,/5x,'master-species number(s) in reaction=',7i5, : /10x,13i5) 9270 format('Do you input ion size of each basis species by yourself?:' : ,$) 9280 format('Please input ion size of Basis species:',$ ) 9290 format(6(I3,f7.3)) 9300 format('*->> ?? Move this species. It must appear before', : ' species "O2(G)" in the',/, : '* section for strict basis aqueous species') 9310 format(a) 9320 format(5x,'charge=',f5.1, 6x,'ion size=',f5.1,1x,'A',6x, : 'mole wt.=',f10.4) 9330 format(4x,i2,' elements in species'/ : (5x,f7.3,1x,a2,12x,f7.3,1x,a2,12x,f7.3,1x,a2)) 9340 format(a) 9350 format(5x,'charge= 0.0', 6x,'ion size=',f5.1,1x,'A',6x, csd1 : 'mol wt.=',f10.4/ : 'mole wt.=',f10.4/ : 5x,'1 elements in species'/ : 5x,' 2.000 O') 9360 format('*->> ?? Duplicate name: ',A) 9370 format('+Name duplicated error : ',A,/) 9380 format(4x,i2,1x,'species in reaction=') 9390 format(5x,' -1.000',1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9400 format(5x,f7.2,1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9410 format('*',4x,'log k grid (0-25-60-100/150-200-250-300 ', : 'c) =', : /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4, : /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9420 format('*',4x,'delvr grid (0-25-60-100/150-200-250-300 ', : 'c) =',/9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /,'*',1x,'input PHREEQE data-base file: ',a) 9430 format('-end-') 9440 format('endit.',/,'minerals',/,'*',38(' -'),/,'*->> Gas Species', :' should be moved and placed after label "GASES" below',/,'*->> ', :'NOTE - EQ6 needs gasses "o2(g)" and "h2(g)"',/,'*',38(' -'))

JNC TN8400 2002-024
Page 153: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 147 -

9450 format('================== LOOK MIN ===========================') 9460 format(5(i4,f11.3)) 9470 format(2x,'Mineral=',a,', species in reaction=',i4,/12x, : 'species numbers in reaction=',7i5, : :/10x,13i5) 9480 format(8x,'volume=',4x,'0.',4x,'cc/mol') 9490 format(1x,'?? Serious error, ', : 'electric charge inbalance =',3x,1pE15.5,/) 9500 format('+No. of elements (NCT) =',I3,/1x, : 'No. of GWB "strict" aqueous basis species (NSQ) =',I3, : //1x,'All Done') 9510 format(6x, '(master-species numbers must be <= index for OH-)') 9520 format(6x,'(unknown master species nr.',I2, ', name:',A,')') 9530 format(1x,'Aqueous species ',A,'not written to EQ3/6-file',/) 9540 FORMAT(1x,'Usage:',/5X, : 'PHR-GWB PHREEQE-data-base-name GWB-data-base-name',//1X :,'Auxiliary input files are:',/10x,'ELEMS',2X,'(elements ', :'contained in each master species)',/10x,'HDR',4X,'(header info ' :,'for GWB DATA 0-file)' : ,//1x,'VAX-info: make $assign NEA0:[Puigdomenech]HDR. HDR' : , /12x,'and $assign NEA0:[Puigdomenech]ELEMS. ELEMS') 9550 format(/1x,'-- Error in PHREEQE-data-base:',5x,'species',i3, : 5x,'name=',a,/1x, :'(1st species must be H+, 2nd must be E-, and 3rd must be H2O)') 9560 format(10x,'(must be >0 and <=',i4,')') 9570 format(/1x,'log K for Eh reaction:',3x, : '2 H2O = O2(G) + 4 H+ + 4 E-',/1x, : 'not found in file "HDR"') 9580 format(1x,'-- Error #',I5,/4x, : 'opening file: ',A,/4X,'(or file not found)',/) 9585 format(1x,'-- Error #',I5,/4x, : 'opening file: ',A,/4X,'(or file not found)',/) 9590 format(1x,'Input line=',I6) 9910 format(a80) 9920 format(i3) 9930 format(i4) end

JNC TN8400 2002-024
Page 154: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 148 -

別添-4.11 phgwb_10 のプログラムソース(minera.f)

subroutine minera C C---------------------------------------------------------------------- C mineral gases oxides select C---------------------------------------------------------------------- C include'phreqt.h' C character*3 yna character*10 namem(naq),nameg(naq),nameo(naq),typem(naq) character*10 namedd character*10 oxide dimension wmolm(naq),nelemm(naq,6), : wmolg(naq) ,nelemg(naq,6), : wmolo(naq) ,nelemo(naq,6), : cspm(naq,20),cspg(naq,20),cspo(naq,20), : tlktm(naq,8),tlktg(naq,8) integer elmsm(naq) ,elmsg(naq),elmso(naq) dimension idumem(naq) ,isub1m(naq) ,isub2m(naq) ,isubsm(naq) : ,idumeg(naq) ,isub1g(naq) ,isub2g(naq) ,isubsg(naq) : ,idumeo(naq) ,isub1o(naq) ,isub2o(naq) ,isubso(naq) : ,keepim(naq) ,keepig(naq) ,keepio(naq) character*2 welemm(naq,6), welemg(naq,6),welemo(naq,6) : ,welmm(naq),welmg(naq),welmo(naq),welmk real nelmm(naq),nelmg(naq),nelmo(naq), nelmk dimension inspo(naq),inspm(naq),inspg(naq) dimension lspo(naq,20),lspm(naq,20),lspg(naq,20) dimension islogm(naq),islogg(naq),islogo(naq) : ,elkt0m(naq),elkt0g(naq),elkt0o(naq) : ,elkt2m(naq),elkt2g(naq),elkt2o(naq) : ,isztm(naq),isztg(naq),iszto(naq) : ,ztotm(naq),ztotg(naq),ztoto(naq) dimension ieoxid(40) c data oxide /'oxide '/ C C C C---- Initial set ------------------------------------------------------ C NMaster = mstr nctm = 0 nctg = 0 ncto = 0 mxi = 0 index= 0 zsp = 0 C C---- read LOOK MIN ----------------------------------------------------- C read(10,9020,err=7200,end=7300) keywrd if (keywrd.ne.'look min'.and.keywrd.ne.'LOOK MIN') go to 7000 csd7 write(*,9330) csd7 write(*,9340) write(12,9330) write(12,9340) C 10 continue yna=blank do i=1,40 ieoxid(i) = 0 enddo write(*,9350) read(*,9000,err=10 )yna if(yna.eq.blank) go to 10 if(yna.eq.'y'.or.yna.eq.'yes') then write(*,9360) read(*,9370,err=10) ieoxid do i=1,40

JNC TN8400 2002-024
Page 155: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 149 -

if(ieoxid(i).lt.0.or.ieoxid(i).ge.61) then write(*,9380) go to 10 endif enddo endif C 20 inlin=inlin+1 read(10,9390,err=7200,end=7300) name,nsp,zspdum,lkt0sp,dhsp,kflag if(name.eq.blank) go to 3000 write(*,9040) name csd if (name.eq.'o2(g)' .or. name.eq.'h2(g)') call LwCase(name,5) csd Call CheckN (name,ierr,mxi,mastr,naq,mxaq,master,aqu,minerl) C ierr=0 do 30 i=1,mxi if(name.eq.minerl(i)) ierr=1 30 continue C index=index+1 minerl(index)=name mxi=max(index,mxi) if (nsp.le.0 .or. nsp.gt.20) go to 7100 C inlin=inlin+1 read(10,9400,err=7200,end=7300) (lsp(i),csp(i),i=1,nsp) if (kflag.ne.1) go to 40 inlin=inlin+1 read(10,9410,err=7200,end=7300) (asp(i),i=1,6 ) c c---- name check XX GAS--> XX(g) , XX YY--> error message c 40 continue iswbl = 0 do 60 i=2,7 if(name(i:i).eq.blank) then do 50 j=i+1,8 if(name(j:j).ne.blank) then if(name(j:j+2).eq.'gas'.or.name(j:j+2).eq.'GAS') then name(i:i+2) ='(g)' name(i+3:10) = blank else iswbl = 1 endif go to 70 endif 50 continue endif 60 continue c if(name(8:8).eq.blank.and.name(9:9).ne.blank) iswbl =1 if(name(8:8).ne.blank.and.name(9:9).eq.blank.and. : name(10:10).ne.blank) iswbl=1 c 70 continue if(iswbl.eq.1) then csd7 write(*,9260) name csd7 write(*,9920) name write(12,9260) name write(12,9920) name go to 20 endif csd Call ZCheck (mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp) Call zchemi(NMaster,nsp,iswzch,ztot) C C---- get logKeq versus temperature for mineral -------------------------- C call logKt (kflag,lkt0sp,lkt,dHsp,asp,2,iswlog) C if(iswlog.eq.1) then erlkt0 = lkt0sp erlkt2 = lkt(2)

JNC TN8400 2002-024
Page 156: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 150 -

endif C C---- non-master-species in PHREEQE mineral reaction C get new equilibrium constant ---------------------- C nsp1=nsp do 300 i=1,nsp if(lsp(i).le.NMaster.and.master(lsp(i)).ne.nul) go to 300 if(lsp(i).le.NMaster.and.master(lsp(i)).eq.nul) go to 400 iaqu=lsp(i)-NMaster if (aqu(iaqu).eq.nul) go to 400 C csd4 do 100 ij=1,6 do 100 ij=1,8 if (lkt(ij).eq.500.) go to 100 lkt(ij) = lkt(ij) + (aqulk0(iaqu,ij)*csp(i)) if (aqulk0(iaqu,ij).eq.500.) lkt(ij)=500. 100 continue C get new stoichiometric coefficients do 200 ij=1,aqunsp(iaqu) ifound=0 do 150 j=1,nsp1 if (aqulsp(iaqu,ij).ne.lsp(j)) go to 150 if (aqulsp(iaqu,ij).eq.61) go to 150 csp(j)=csp(j)+(aqucsp(iaqu,ij)*csp(i)) ifound=1 150 continue if (ifound.eq.1) go to 200 lsp(nsp1+1)=aqulsp(iaqu,ij) csp(nsp1+1)=aqucsp(iaqu,ij)*csp(i) nsp1=nsp1+1 200 continue C get rid off the non-master species csp(i)=0. 300 continue C C---- check if there has been changes (i.e., any non-master species?) C if (nsp.eq.nsp1) go to 500 nsp=nsp1 C C---- substract aqueous species with zero stoichiometric coeff C csd call Substr (nsp,csp,lsp) call Substr (nsp,csp,lsp,iswstr) go to 500 C C---- erroneous species in reaction ------------------------------------ C 400 j=i csd7 write (*,9420) name, nsp, (lsp(i),i=1,nsp) csd7 write (*,*) ' (unknown species:',lsp(j),')' csd7 write (*,*) 'Mineral Gas Oxide ',name,' not written to GWS-file' csd7 write (*,*) write (12,9420) name, nsp, (lsp(i),i=1,nsp) write (12,*) ' (unknown species:',lsp(j),')' write (12,*) 'Mineral Gas Oxide ',name,' not written to GWS-file' write (12,*) C C C 500 continue C C---- duplicate name check -------------------------------------------- C idusw = 0 if(ierr.gt.0) then idusw = 1 csd7 write(*,9250) name write(12,9260) name write(12,9240) name endif

JNC TN8400 2002-024
Page 157: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 151 -

C C---- get the mineral's elements ---------------------------------------- C call GetElm (mastr,nsp,lsp,csp,elm,elem,nelem,nelm,welem,welm) C C---- substract elements with zero coefficient -------------------------- C csd call SubtrE (elm,nelm,welm) call SubtrE (elm,nelm,welm,keepi,nelmk,welmk,iswse1,iswse2) C C---- find E- -------------------------------------------------------- C do 600 i=1,nsp if (lsp(i).eq.2) go to 700 600 continue go to 1500 C C---- find if there is already H2O or H+ in the reaction C 700 iel=i lh2o=.false. lhpl=.false. do 800 i=1,nsp c << H2O >> if (lsp(i).eq.3) csp(i)=csp(i)+0.50*csp(iel) c << H+ >> if (lsp(i).eq.1) csp(i)=csp(i)-1.00*csp(iel) if (lsp(i).eq.3) lh2o=.true. if (lsp(i).eq.1) lhpl=.true. 800 continue C iadd=0 if(.not.lh2o) then iadd=iadd+1 csp(nsp+iadd)=+0.50*csp(iel) lsp(nsp+iadd)= 3 endif if (.not.lhpl) then iadd=iadd+1 csp(nsp+iadd)=-1.00*csp(iel) lsp(nsp+iadd)= 1 endif nsp=nsp+iadd C C---- add the reaction: 1/4 O2(G) + H+ + E- = 1/2 H2O C (reaction: 1/2 H2O = 1/4 O2(G) + H+ + E- for association) C for each +1 E- in the dissociation reaction C (i.e., 1 E- in the right of the reaction) C add: -1 H+ C -0.25 O2(G) C +0.5 H2O csd6 do 900 i=1,6 do 900 i=1,8 if (lkt(i).eq.500.) go to 900 lkt(i)= lkt(i) + (-lkEh(i)*0.25*csp(iel)) 900 continue C C---- check if there is already "O2(G)" (from a non-master species) C do 1000 i=1,nsp if (lsp(i).eq.mastr) go to 1100 1000 continue csp(iel)=-0.25*csp(iel) go to 1200 C 1100 csp(i)=csp(i)-(0.25*csp(iel)) csp(iel)=0. C 1200 lsp(iel)=mastr C C---- substract species with zero stoichiometric coefficient C

JNC TN8400 2002-024
Page 158: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 152 -

csd call Substr (nsp,csp,lsp) call Substr (nsp,csp,lsp,iswstr) c C C---- mol weight calculation ------------------------------------------ C 1500 continue wmol = 0.0 do 1700 i=1,elm do 1600 ji=1,mastr if(welm(i).eq.keyele(ji)) ikeyn=ji 1600 continue wmol=wmol+nelm(i)*zmolw(ikeyn ) 1700 continue c C---- mineral gases oxides select check ------------------------------- C mineral --- isw = 0 C gasses --- isw = 1 C oxides --- isw = 2 C isw=0 do 2000 I=1,8 if(name(i:i+2).eq.'gas'.or.name(i:i+2).eq.'(g)') isw = 1 if(name(i:i+2).eq.'GAS'.or.name(i:i+2).eq.'(G)') isw = 1 2000 continue C if(isw.eq.0) then do 2300 i=1,nsp do 2200 j=1,40 if(lsp(i).eq.ieoxid(j)) go to 2500 2200 continue 2300 continue C call choxid(ioxis,nsp) if(ioxis.eq.1) isw =2 endif C C---- selected data set table -------------------------------------------- C 2500 continue C << mineral & oxides >> if(isw.eq.0.or.isw.eq.2) then nctm=nctm + 1 namem(nctm) = name if(isw.eq.2) then typem(nctm) = oxide else typem(nctm) = blank endif wmolm(nctm) = wmol elmsm(nctm) = elm do i=1,elm nelemm(nctm,i) = nelm(i) welemm(nctm,i) = welm(i) enddo inspm(nctm) = nsp do i=1,nsp lspm(nctm,i) = lsp(i) enddo do i=1,nsp cspm(nctm,i) = csp(i) enddo do i=1,8 tlktm(nctm,i) = lkt(i) enddo c---- error message check if(idusw.eq.1) then idumem(nctm) = 1 else idumem(nctm) = 0 endif if(iswse1.eq.1) then isub1m(nctm) = 1

JNC TN8400 2002-024
Page 159: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 153 -

keepim(nctm) = keepi welmm(nctm) = welmk nelmm(nctm) = nelmk else isub1m(nctm) = 0 endif if(iswse2.eq.1) then isub2m(nctm) = 1 else isub2m(nctm) = 0 endif if(iswstr.eq.1) then isubsm(nctm) = 1 else isubsm(nctm) = 0 endif if(iswlog.eq.1) then islogm(nctm) = 1 elkt0m(nctm) = erlkt0 elkt2m(nctm) = erlkt2 else islogm(nctm) = 0 endif if(iswzch.eq.1) then isztm(nctm) = 1 ztotm(nctm) = ztot else isztm(nctm) = 0 endif C << gases >> elseif(isw.eq.1) then nctg=nctg + 1 nameg(nctg) = name wmolg(nctg) = wmol elmsg(nctg) = elm do i=1,elm nelemg(nctg,i) = nelm(i) welemg(nctg,i) = welm(i) enddo inspg(nctg) = nsp do i=1,nsp lspg(nctg,i) = lsp(i) enddo do i=1,nsp cspg(nctg,i) = csp(i) enddo do i=1,8 tlktg(nctg,i) = lkt(i) enddo c---- error message check if(idusw.eq.1) then idumeg(nctg) = 1 else idumeg(nctg) = 0 endif if(iswse1.eq.1) then isub1g(nctg) = 1 keepig(nctg) = keepi welmg(nctg) = welmk nelmg(nctg) = nelmk else isub1g(nctg) = 0 endif if(iswse2.eq.1) then isub2g(nctg) = 1 else isub2g(nctg) = 0 endif if(iswstr.eq.1) then isubsg(nctg) = 1 else isubsg(nctg) = 0 endif

JNC TN8400 2002-024
Page 160: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 154 -

if(iswlog.eq.1) then islogg(nctg) = 1 elkt0g(nctg) = erlkt0 elkt2g(nctg) = erlkt2 else islogg(nctg) = 0 endif if(iswzch.eq.1) then isztg(nctg) = 1 ztotg(nctg) = ztot else isztg(nctg) = 0 endif c endif C------------------------------------------------------------------------- C << oxides >> if(isw.eq.2) then ncto=ncto + 1 nameo(ncto) = name wmolo(ncto) = wmol elmso(ncto) = elm do i=1,elm nelemo(ncto,i) = nelm(i) welemo(ncto,i) = welm(i) enddo inspo(ncto) = nsp do i=1,nsp lspo(ncto,i) = lsp(i) enddo do i=1,nsp cspo(ncto,i) = csp(i) enddo endif c error message check if(idusw.eq.1) then idumeo(ncto) = 1 else idumeo(ncto) = 0 endif if(iswse1.eq.1) then isub1o(ncto) = 1 keepio(ncto) = keepi welmo(ncto) = welmk nelmo(ncto) = nelmk else isub1o(ncto) = 0 endif if(iswse2.eq.1) then isub2o(ncto) = 1 else isub2o(ncto) = 0 endif if(iswstr.eq.1) then isubso(ncto) = 1 else isubso(ncto) = 0 endif if(iswlog.eq.1) then islogo(ncto) = 1 elkt0o(ncto) = erlkt0 elkt2o(ncto) = erlkt2 else islogo(ncto) = 0 endif if(iswzch.eq.1) then iszto(ncto) = 1 ztoto(ncto) = ztot else iszto(ncto) = 0 endif go to 20 C

JNC TN8400 2002-024
Page 161: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 155 -

C************************************************************************* c mineral write C************************************************************************* C 3000 continue write (11,9020) blank write (11,9050) nctm write (11,9020) blank do 3500 i=1,nctm write (11,9060) namem(i),typem(i) write (11,9070) wmolm(i) write (11,9080) inspm(i) write (11,9090) (cspm(i,ij),master(lspm(i,ij)), ij=1,inspm(i)) write (11,9100) (tlktm(i,ij), ij=1,8) if(idumem(i) .eq. 1) write(11,9240) namem(i) if(isub1m(i).eq.1) write(11,9440) keepim(i),welmm(i),nelmm(i) if(isub2m(i).eq.1) write(11,9450) if(isubsm(i).eq.1) write(11,9430) if(islogm(i).eq.1) write(11,9460) elkt0m(i),elkt2m(i) if(isztm(i).eq.1) write(11,9640) ztotm(i) csd.neya add if(idumem(i) .eq. 1) write(12,9240) namem(i) if(isub1m(i).eq.1) write(12,9440) keepim(i),welmm(i),nelmm(i) if(isub2m(i).eq.1) write(12,9450) if(isubsm(i).eq.1) write(12,9430) if(islogm(i).eq.1) write(12,9460) elkt0m(i),elkt2m(i) csd7 if(isztm(i).eq.1) write(12,9640) ztotm(i) if(isztm(i).eq.1) write(12,9645) namem(i),ztotm(i) csd.neya add write (11,9020) blank 3500 continue write(11,9320) c C************************************************************************* c gases write C************************************************************************* C write (11,9020) blank write (11,9130) nctg write (11,9020) blank do 4000 i=1,nctg c << H2(g) >> if(nameg(i).eq.'H2 GAS'.or.nameg(i).eq.'H2(G)'.or. : nameg(i).eq.'H2(GAS)'.or.nameg(i).eq.'H2(g)'.or. : nameg(i).eq.'h2 gas'.or.nameg(i).eq.'h2(gas)') then nameg(i) = 'H2(g) ' inspg(i) = 1 cspg(i,1) = 1.000 namedd = 'H2(aq) ' write (11,9040) nameg(i) write (11,9110) wmolg(i) write (11,9080) inspg(i) write (11,9090) (cspg(i,ij),namedd, ij=1,inspg(i)) write (11,9100) (lkEhaq(ij), ij=1,8) if(idumeg(i) .eq. 1) write(11,9240) nameg(i) if(isub1g(i).eq.1) write(11,9440) keepig(i),welmg(i) : ,nelmg(i) if(isub2g(i).eq.1) write(11,9450) if(isubsg(i).eq.1) write(11,9430) if(islogg(i).eq.1) write(11,9460) elkt0g(i),elkt2g(i) if(isztg(i).eq.1) write(11,9640) ztotg(i) csd.neyama add if(idumeg(i) .eq. 1) write(12,9240) nameg(i) if(isub1g(i).eq.1) write(12,9440) keepig(i),welmg(i) : ,nelmg(i) if(isub2g(i).eq.1) write(12,9450) if(isubsg(i).eq.1) write(12,9430) if(islogg(i).eq.1) write(12,9460) elkt0g(i),elkt2g(i) csd7 if(isztg(i).eq.1) write(12,9640) ztotg(i) if(isztg(i).eq.1) write(12,9645) nameg(i),ztotg(i) csd.neyama add write (11,9020) blank go to 4000

JNC TN8400 2002-024
Page 162: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 156 -

endif c << O2(g) >> if(nameg(i).eq.'O2 GAS'.or.nameg(i).eq.'O2(G)'.or. : nameg(i).eq.'O2(GAS)'.or. : nameg(i).eq.'o2 gas'.or.nameg(i).eq.'o2(gas)') then nameg(i) = 'O2(g) ' c do ij=1,8 tlktg(i,ij) = lkEhoa(ij) enddo c endif c write (11,9040) nameg(i) write (11,9110) wmolg(i) write (11,9080) inspg(i) write (11,9090) (cspg(i,ij),master(lspg(i,ij)), ij=1,inspg(i)) write (11,9100) (tlktg(i,ij), ij=1,8) if(idumeg(i) .eq. 1) write(11,9240) nameg(i) if(isub1g(i).eq.1) write(11,9440) keepig(i),welmg(i),nelmg(i) if(isub2g(i).eq.1) write(11,9450) if(isubsg(i).eq.1) write(11,9430) if(islogg(i).eq.1) write(11,9460) elkt0g(i),elkt2g(i) if(isztg(i).eq.1) write(11,9640) ztotg(i) csd.neyama add if(idumeg(i) .eq. 1) write(12,9240) nameg(i) if(isub1g(i).eq.1) write(12,9440) keepig(i),welmg(i),nelmg(i) if(isub2g(i).eq.1) write(12,9450) if(isubsg(i).eq.1) write(12,9430) if(islogg(i).eq.1) write(12,9460) elkt0g(i),elkt2g(i) csd7 if(isztg(i).eq.1) write(12,9640) ztotg(i) if(isztg(i).eq.1) write(12,9645) nameg(i),ztotg(i) csd.neyama add write (11,9020) blank 4000 continue write(11,9320) C C************************************************************************ c oxides write C************************************************************************ C write (11,9020) blank write (11,9140) ncto write (11,9020) blank do 5000 i=1,ncto write (11,9040) nameo(i) write (11,9110) wmolo(i) write (11,9080) inspo(i) write (11,9090) (cspo(i,ij),master(lspo(i,ij)), ij=1,inspo(i)) if(idumeo(i) .eq. 1) write(11,9240) nameo(i) if(isub1o(i).eq.1) write(11,9440) keepio(i),welmo(i),nelmo(i) if(isub2o(i).eq.1) write(11,9450) if(isubso(i).eq.1) write(11,9430) if(islogo(i).eq.1) write(11,9460) elkt0o(i),elkt2o(i) if(iszto(i).eq.1) write(11,9640) ztoto(i) csd.neyama addi if(idumeg(i) .eq. 1) write(12,9240) nameo(i) if(isub1g(i).eq.1) write(12,9440) keepio(i),welmo(i),nelmo(i) if(isub2g(i).eq.1) write(12,9450) if(isubsg(i).eq.1) write(12,9430) if(islogg(i).eq.1) write(12,9460) elkt0o(i),elkt2o(i) csd7 if(isztg(i).eq.1) write(12,9640) ztoto(i) if(isztg(i).eq.1) write(12,9645) nameo(i),ztoto(i) csd.neyama add write (11,9020) blank 5000 continue write(11,9320) return C C---- ERROR ------------------------------------------------------------- C c7000 write(*,9960) inlin csd7 write(*,*)

JNC TN8400 2002-024
Page 163: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 157 -

csd7 : '-- Error: 3rd keyword must be "LOOK MIN" in PHREEQE-data-base' 7000 write(12,9960) inlin write(12,*) : '-- Error: 3rd keyword must be "LOOK MIN" in PHREEQE-data-base' return C c7100 write(*,*) 'Input line=',inlin csd7 write(*,*) 'Redox couples or Aqueous species =',name csd7 write(*,*) csd7 : '-- Error: Number of reaction species=',nsp csd7 : ,' in PHREEQE-data-base' csd7 write(*,*) ' (must be >0 and <=20)' 7100 write(12,*) 'Input line=',inlin write(12,*) 'Redox couples or Aqueous species =',name write(12,*) : '-- Error: Number of reaction species=',nsp : ,' in PHREEQE-data-base' write(12,*) ' (must be >0 and <=20)' return C c7200 write(*,9960) inlin csd7 write(*,*) 'Current species name is=',name csd7 write(*,*) 'FORTRAN-Read-Error in PHREEQE-data-base' 7200 write(12,9960) inlin write(12,*) 'Current species name is=',name write(12,*) 'FORTRAN-Read-Error in PHREEQE-data-base' return C c7300 write(*,9960) inlin csd7 write(*,*) csd7 : '-- Error: unexpected end-of-file, in PHREEQE-data-base' 7300 write(12,9960) inlin write(12,*) : '-- Error: unexpected end-of-file, in PHREEQE-data-base' return C 9000 format(a) 9010 format(3x,I2,3x,I2) 9020 format(a) 9030 format(A8,2X,I2,3X,F10.0) 9040 format(a) 9050 format(1x,i4,' minerals') 9060 format(a10,22x,'type=',a10 /5x,'formula=') 9070 format(5x,'mole vol.=',' 0 cc ',7x,'mole wt.=',f10.4,' g') 9080 format(4x,i2,' species in reaction') 9090 format(4x,f8.3,1x,a10,3x,f8.3,1x,a10,3x,f8.3,1x,a10) 9100 format(5x,4f10.4) 9110 format(5x,'mole wt.=',f10.4,' g') 9130 format(1x,i4,' gase') 9140 format(1x,i4,' oxides') 9150 format(6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9160 format(i3) 9170 format(a10,i3,i1,1x,f10.3,40x,f10.3) 9180 format(2f10.3,6e12.5) 9190 format(6(I3,f7.3)) 9200 format('*->> ?? Move this species. It must appear before', : ' species "O2(G)" in the',/, : '* section for strict basis aqueous species') 9210 format(a) 9220 format(5x,'charge=',f5.1, 6x,'ion size=',f5.1,1x,'A',/6x, : 'mol wt.=',f10.4) 9230 format(4x,i2,' elements in species'/ : 5(/5x,f7.3,1x,a2,12x,f7.3,1x,a2,12x,f7.3,1x,a2,:) : /5x,f7.3,1x,a2,12x,f7.3,1x,a2,12x,f7.3,1x,a2) 9240 format('*->> ?? Duplicate name error : ',A,/) 9250 format('+Name duplicated error : ',A,/) 9260 format('+Name error: ',A,/) 9270 format(4x,i2,1x,'species in reaction=') 9280 format(5x,' -1.000',1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9290 format(5x,f7.2,1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9300 format('*',4x,'log k grid (0-25-60-100/150-200-250-300 ', : 'c) =', : /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4,

JNC TN8400 2002-024
Page 164: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 158 -

: /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9310 format('*',4x,'delvr grid (0-25-60-100/150-200-250-300 ', : 'c) =',/9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /,'*',1x,'input PHREEQE data-base file: ',a) 9320 format('-end-') 9330 format('=================== LOOK MIN ===========================') 9340 format('========= Minerals & Gases & Oxides ==================') 9350 format('If you have suppressing master species for oxides,'/ : 'Please input master species ID. of Phreeqe TDB.'/ : 'Do you need this option?:',$) 9360 format('Please input master species ID. of Phreeqe(max = 40):',/$) 9370 format(40i3) 9380 format('Master species ID.(0<ID<=60): Please enter one more:'/) 9390 format(a10,i2,3x,f10.2,2f10.2,5x,i1) 9400 format(5(i4,f11.3)) 9410 format(6e12.5) 9420 format(2x,'Mineral=',a,', species in reaction=',i4,/12x, : 'species numbers in reaction=',7i5, : :/10x,13i5) 9430 format('* ?? Serious error, nr of species', : ' in reaction <=0') 9440 format('* ?? Serious error,',3x, :'Element=',i3,' (',a2,'), stoichiometry=',F6.1,/) 9450 format('* ?? Serious error, nr of elements <=0') 9460 format('*->> ?? ERROR:',1x, : 'log K (25"C) =',F8.3,' in input PHREEQE-file',/, : '*',22x,'and =',F8.3,' from polynomial eqn.') 9640 format('* ?? Serious error, ', : 'electric charge inbalance =',3x,1pE15.5,/) 9645 format('* ?? Serious error, ','NAME = ',a10,2x, : 'electric charge inbalance =',3x,1pE15.5,/) 9900 format(6x, '(master-species numbers must be <= index for OH-)') 9910 format(6x,'(unknown master species nr.',I2, ', name:',A,')') 9920 format('*->> ?? look min data ',A,'not written to GWB-file' : /8x,'Blank ha ikemasen'/) 9930 format(10x,'(must be >0 and <=',i4,')') 9940 format(/1x,'log K for Eh reaction:',3x, : '2 H2O = O2(G) + 4 H+ + 4 E-',/1x, : 'not found in file "HDR"') 9950 format(1x,'-- Error #',I5,/4x, : 'opening file: ',A,/4X,'(or file not found)',/) 9960 format(1x,'Input line=',I6) end

JNC TN8400 2002-024
Page 165: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 159 -

別添-4.12 phgwb_10 のプログラムソース(readion.f)

subroutine readion : ( name_ion, size_ion, max_ion, naq ) C C----------------------------------------------------------------------- C READ ION SIZE C----------------------------------------------------------------------- C character*10 cname character*10 name_ion(naq), title real*4 size_ion(naq) C icnt = 1 read(30,9000) title write(12,9000) title 10 read(30,9100,end=1000) cname, size_ion(icnt) csd7.add call UpCase(cname,10) name_ion(icnt) = cname csd7.end write(12,9100) name_ion(icnt), size_ion(icnt) icnt = icnt + 1 go to 10 C 1000 max_ion = icnt -1 C return 9000 format(a10) 9100 format(a10,f10.4) end

JNC TN8400 2002-024
Page 166: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 160 -

別添-4.13 phgwb_10 のプログラムソース(speci.f)

subroutine speci C C------------------------------------------------------------------- C Redox couples & Aqueous species select C and write to GWB file C------------------------------------------------------------------- C include 'phreqt.h' C logical firsts character*3 yna character*5 csions character*10 namer(naq),namea(naq),namedd dimension chargr(naq),sionr(naq),wmolr(naq) : ,charga(naq),siona(naq),wmola(naq) : ,cspr(naq,20),cspa(naq,20),tlktr(naq,8),tlkta(naq,8) integer elmsr(naq) ,elmsa(naq) dimension idumer(naq) ,isub1r(naq) ,isub2r(naq) ,isubsr(naq) : ,idumea(naq) ,isub1a(naq) ,isub2a(naq) ,isubsa(naq) : ,keepir(naq) ,keepia(naq) character*2 welemr(naq,6), welema(naq,6),welmr(naq),welma(naq) : ,welmk real nelmr(naq),nelma(naq),nelmk dimension inspr(naq),inspa(naq),lspr(naq,20),lspa(naq,20) dimension islogr(naq),elkt0r(naq),elkt2r(naq) : ,isloga(naq),elkt0a(naq),elkt2a(naq) : ,isztr(naq),ztotr(naq) : ,iszta(naq),ztota(naq) c c data blank/' '/ c data first/.true./ c data nul /'*?*?*?*?*?'/ c data elektr/'e- '/ c data h2o,h2ol,h2olc/'h2o ','h2o(l) ','h2o '/ c data hpl,oxg /'h+ ','o2(g) '/ C csd5.add character*4 record csd5.end C C---- Initial set ---------------------------------------------------- C NMaster = mstr nctr = 0 ncta = 0 mxi = 0 C C---------------------------------------------------------------------- C ccc write(*,9010) write(12,9010) C C---- read ion size or not --------------------------------------------- C csd3 iswion = 0 csd10 yna=blank csd3 write(*,9200) csd3 read(*, 9020,err=10 )yna csd3 if(yna.eq.blank) go to 10 csd3 if(yna.eq.'y'.or.yna.eq.'yes') then csd3 iswion =1 csd3 endif C---------------------------------------------------------------------- if(index.eq.0) then firsts = .false. else firsts = .true. endif C

JNC TN8400 2002-024
Page 167: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 161 -

C---- read SPECIES ----------------------------------------------------- C 20 continue if(.not.firsts) then csd5 read(10,9160,err=7100,end=7200) index read(10,9155,err=7100,end=7200) record csd5.add if(record(4:4).eq.' ') then read(record,9160) index else read(record,9165) index endif csd5.end if (index.eq.0) go to 400 inlin=inlin+1 endif C firsts = .false. inlin=inlin+1 csd3 read(10,9170,err=7100,end=7200) name,nsp,kflag,zsp,alksp read(10,9170,err=7100,end=7200) name,nsp,kflag,zsp,sions : ,alksp if (nsp.le.0 .or. nsp.gt.20) go to 7000 csd56 Call CheckN (name,ierr,mxi,mastr,naq,mxaq,master,aqu,minerl) C ierr=0 do 30 i=1,mxi if(name.eq.aqu(i)) ierr=1 30 continue C inlin=inlin+1 read(10,9180,err=7100,end=7200) lkt0sp,dHsp,(asp(i),i=1,6) inlin=inlin+1 read(10,9220,err=7100,end=7200) (lsp(i),csp(i),i=1,nsp) c C C---- check that the species in the reaction are "master" species C iadd=0 do 40 i=1,nsp if (lsp(i).le.NMaster .and. master(lsp(i)).ne.nul) goto 40 if (lsp(i) .gt. NMaster) iadd=1 if (master(lsp(i)) .eq. nul) iadd=2 j=i ccc write (*,9190) name, nsp, (lsp(j),j=1,nsp) ccc if (iadd.eq.1) write(*,9440) ccc if (iadd.eq.2) write (*,9450) lsp(j),master(lsp(j)) ccc write (*,9460) name write (12,9190) name, nsp, (lsp(j),j=1,nsp) if (iadd.eq.1) write(12,9440) if (iadd.eq.2) write (12,9450) lsp(j),master(lsp(j)) write (12,9460) name if (index.le.mstr) master(lsp(j)) = nul go to 20 40 continue C C---- name check XX AQ--> XX(aq) ,XX YY --> error messege C iswbl =0 do 60 i=2,8 if(name(i:i).eq.blank) then do 50 j=i+1,9 if(name(j:j).ne.blank) then if(name(j:j+1).eq.'aq'.or.name(j:j+1).eq.'AQ') then name(i:i+3) = '(aq)' else iswbl = 1 endif go to 70 endif 50 continue endif 60 continue

JNC TN8400 2002-024
Page 168: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 162 -

C if(name(9:9).eq.blank.and.name(10:10).ne.blank) iswbl=1 C 70 continue if(iswbl.eq.1) then ccc write(*,9290) name ccc write(*,9460) name write(12,9290) name write(12,9460) name go to 20 endif C C--- duplicate name check ---------------------------------------------- C idusw = 0 if (ierr.gt.0) then do 80 i=1,mxi if(name.eq.aqu(i).and.zsp.eq.aquzsp(i)) then idusw = 1 ccc write(*,9280) name write(12,9280) name else ierr = 0 endif 80 continue endif C C---- get logKeq versus temperature for aqueous species ---------------- C lkt0sp=-lkt0sp csd call logKt (kflag,lkt0sp,lkt,dHsp,asp,1) call logKt (kflag,lkt0sp,lkt,dHsp,asp,1,iswlog) C if(iswlog.eq.1) then erlkt0 = lkt0sp erlkt2 = lkt(2) endif c if(zsp.ne.0.) then csd Call ZCheck(mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp) Call ZCheck(mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp csd7 : ,csp,iswzch,ztot) : ,csp,iswzch,ztot,index) endif C C---- get species elements --------------------------------------------- C call GetElm (mastr,nsp,lsp,csp,elm,elem,nelem,nelm,welem,welm) C C---- substract elements with zero coefficient ------------------------- C csd call SubtrE (elm,nelm,welm) call SubtrE (elm,nelm,welm,keepi,nelmk,welmk,iswse1,iswse2) C C---- mol weight calculation ------------------------------------------ C c zmolw(1) ---> H c zmolw(2) ---> O c zmolw(1) = 1.0079 c zmolw(2) = 15.9994 c wmol = 0.0 do 110 i=1,elm do 100 ij=1,mastr if(welm(i).eq.keyele(ij)) ikeyn=ij 100 continue wmol=wmol+nelm(i)*zmolw(ikeyn) 110 continue C C---- read ion size --------------------------------------------------- C csd3 if(iswion.eq.1) then cs120 sions=0.0

JNC TN8400 2002-024
Page 169: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 163 -

csd3 write(*,9210) csd3 read(*,9020,err=120 ) csions csd3 read(csions,'(f5.1)') sions csd3 else csd3 sions=0.0 csd3 endif C csd3.add C---- ion size ---------------------------------------------------------- C csd7.add if( sions.eq.0.0 ) then csd7.end do 120 io = 1, max_ion if( name.ne.name_ion(io)) go to 120 sions = size_ion(io) go to 125 120 continue csd7.add endif csd7.end c 125 continue csd3.end C C---- find E- -------------------------------------------------------- C isw=0 do 130 i=1,nsp if(lsp(i).EQ.2) then isw=1 iel=i endif 130 continue C C---- find if there is already H2O or H+ in the reaction C if(isw.eq.1) then C << E- ari >> C lh2o=.false. lhpl=.false. do 140 i=1,nsp if (lsp(i).eq.3) csp(i)=csp(i)+0.50*csp(iel) if (lsp(i).eq.1) csp(i)=csp(i)-1.00*csp(iel) if (lsp(i).eq.3) lh2o=.true. if (lsp(i).eq.1) lhpl=.true. 140 continue C iadd=0 if (.not.lh2o) then iadd=iadd+1 csp(nsp+iadd)=+0.50*csp(iel) lsp(nsp+iadd)= 3 endif C if (.not.lhpl) then iadd=iadd+1 csp(nsp+iadd)=-1.00*csp(iel) lsp(nsp+iadd)= 1 endif C nsp=nsp+iadd C C---- add the reaction: 1/2 H2O = 1/4 O2(G) + H+ + E- C for each +1 E- in the association reaction C (i.e., 1 E- in the left of the reaction) C add: -1 H+ C -0.25 O2(G) C +0.5 H2O C csd6 do 150 i=1,6 do 150 i=1,8

JNC TN8400 2002-024
Page 170: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 164 -

if (lkt(i).eq.500.) go to 150 C minus: lkt = log(Keq) for dissociation reaction lkt(i)= lkt(i) - (lkEh(i)*0.25*csp(iel)) 150 continue c csp(iel)=-0.25*csp(iel) lsp(iel)=mastr C C---- substract species with zero stoichiometric coefficient C csd call Substr (nsp,csp,lsp) call Substr (nsp,csp,lsp,iswstr) c nctr=nctr + 1 namer(nctr) = name chargr(nctr) = zsp sionr(nctr) = sions wmolr(nctr) = wmol elmsr(nctr) = elm inspr(nctr) = nsp do i=1,nsp lspr(nctr,i) = lsp(i) enddo do i=1,nsp cspr(nctr,i) = csp(i) enddo do i=1,8 tlktr(nctr,i) = lkt(i) enddo C C---- error message check C if(idusw.eq.1) then idumer(nctr) = 1 else idumer(nctr) = 0 endif C if(iswse1.eq.1) then isub1r(nctr) = 1 keepir(nctr) = keepi welmr(nctr) = welmk nelmr(nctr) = nelmk else isub1r(nctr) = 0 endif C if(iswse2.eq.1) then isub2r(nctr) = 1 else isub2r(nctr) = 0 endif C if(iswstr.eq.1) then isubsr(nctr) = 1 else isubsr(nctr) = 0 endif C if(iswlog.eq.1) then islogr(nctr) = 1 elkt0r(nctr) = erlkt0 elkt2r(nctr) = erlkt2 else islogr(nctr) = 0 endif C if(iswzch.eq.1) then isztr(nctr) = 1 ztotr(nctr) = ztot else isztr(nctr) = 0

JNC TN8400 2002-024
Page 171: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 165 -

endif C C----- aqueous --------------------------------------------------------- C else C << E- nashi >> ncta=ncta + 1 namea(ncta) = name charga(ncta) = zsp siona(ncta) = sions wmola(ncta) = wmol elmsa(ncta) = elm inspa(ncta) = nsp C do i=1,nsp lspa(ncta,i) = lsp(i) enddo C do i=1,nsp cspa(ncta,i) = csp(i) enddo C do i=1,8 tlkta(ncta,i) = lkt(i) enddo C C---- error message check C if(idusw.eq.1) then idumea(ncta) = 1 else idumea(ncta) = 0 endif C if(iswse1.eq.1) then isub1a(ncta) = 1 keepia(ncta) = keepi welma(ncta) = welmk nelma(ncta) = nelmk else isub1a(ncta) = 0 endif C if(iswse2.eq.1) then isub2a(ncta) = 1 else isub2a(ncta) = 0 endif C if(iswstr.eq.1) then isubsa(ncta) = 1 else isubsa(ncta) = 0 endif C if(iswlog.eq.1) then isloga(ncta) = 1 elkt0a(ncta) = erlkt0 elkt2a(ncta) = erlkt2 else isloga(ncta) = 0 endif C if(iswzch.eq.1) then iszta(ncta) = 1 ztota(ncta) = ztot else iszta(ncta) = 0 endif C endif C C---- write species in reaction, etc -------------------------------------

JNC TN8400 2002-024
JNC TN8400 2002-024
Page 172: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 166 -

c j=index-NMaster mxi=max(mxi,j) aqu(j) = name aqunsp(j)=nsp aquzsp(j)=zsp C csd6 do 160 i=1,6 do 160 i=1,8 aqulk0(j,i)=lkt(i) 160 continue C do 170 i=1,nsp aqulsp(j,i)=lsp(i) aqucsp(j,i)=csp(i) 170 continue C go to 20 C C******************************************************************** c Redox couples write C******************************************************************* C 400 continue C C-------------------------------------------------------------------- C nctrk =nctr do 500 i=1,nctrk if(namer(i) .eq.'O2 AQ'.or.namer(i).eq.'O2 aq'.or. : namer(i).eq.'O2(AQ)'.or.namer(i).eq.'O2(aq)'.or. : namer(i).eq.'o2 aq'.or.namer(i).eq.'o2(aq)') then nctrk = nctr-1 endif 500 continue write (11,9040) blank write (11,9070) nctrk write (11,9040) blank C C---- H2 AQ--> H2(aq) ------------------------------------------------ C---- O2(aq) data cut ------------------------------------------------- C do 1000 i=1,nctr c if(namer(i) .eq.'H2 AQ'.or.namer(i).eq.'H2 aq'.or. : namer(i).eq.'h2 aq'.or.namer(i).eq.'H2(AQ)') then namer(i) = 'H2(aq) ' endif c C if(namer(i) .eq.'O2 AQ'.or.namer(i).eq.'O2 aq'.or. : namer(i).eq.'O2(AQ)'.or.namer(i).eq.'O2(aq)') go to 1000 if(namer(i).eq.'o2 aq'.or.namer(i).eq.'o2(aq)') go to 1000 c write (11,9080) namer(i) write (11,9090) chargr(i),sionr(i),wmolr(i) write (11,9100) inspr(i) write (11,9110) (cspr(i,ij),master(lspr(i,ij)), ij=1,inspr(i)) write (11,9120) (tlktr(i,ij), ij=1,8) if(idumer(i).eq.1) write(11,9270) namer(i) if(isub1r(i).eq.1) write(11,9400) keepir(i),welmr(i),nelmr(i) if(isub2r(i).eq.1) write(11,9410) if(isubsr(i).eq.1) write(11,9390) if(islogr(i).eq.1) write(11,9420) elkt0r(i),elkt2r(i) if(isztr(i).eq.1) write(11,9430) ztotr(i) csd.neya add if(idumer(i).eq.1) write(12,9270) namer(i) if(isub1r(i).eq.1) write(12,9400) keepir(i),welmr(i),nelmr(i) if(isub2r(i).eq.1) write(12,9410) if(isubsr(i).eq.1) write(12,9390) if(islogr(i).eq.1) write(12,9420) elkt0r(i),elkt2r(i) if(isztr(i).eq.1) write(12,9430) ztotr(i) csd.neya add

JNC TN8400 2002-024
Page 173: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 167 -

write (11,9040) blank 1000 continue write(11,9350) C C************************************************************************ c aquares species write C************************************************************************* C write (11,9040) blank write (11,9130) ncta write (11,9040) blank do 1500 i=1,ncta write (11,9080) namea(i) write (11,9090) charga(i),siona(i),wmola(i) write (11,9100) inspa(i) write (11,9110) (cspa(i,ij),master(lspa(i,ij)), ij=1,inspa(i)) write (11,9120) (tlkta(i,ij), ij=1,8) if(idumea(i) .eq. 1) write(11,9270) namea(i) if(isub1a(i).eq.1) write(11,9400) keepia(i),welma(i),nelma(i) if(isub2a(i).eq.1) write(11,9410) if(isubsa(i).eq.1) write(11,9390) if(isloga(i).eq.1) write(11,9420) elkt0a(i),elkt2a(i) if(iszta(i).eq.1) write(11,9430) ztota(i) csd.neyama add if(idumea(i) .eq. 1) write(12,9270) namea(i) if(isub1a(i).eq.1) write(12,9400) keepia(i),welma(i),nelma(i) if(isub2a(i).eq.1) write(12,9410) if(isubsa(i).eq.1) write(12,9390) if(isloga(i).eq.1) write(12,9420) elkt0a(i),elkt2a(i) if(iszta(i).eq.1) write(12,9430) ztota(i) csd.neyama add write (11,9040) blank 1500 continue write(11,9350) C return C C---- ERROR ----------------------------------------------------------- C c7000 write(*,*) 'Input line=',inlin csd7 write(*,*) 'Redox couples or Aqueous species =',name csd7 write(*,*) csd7 : '-- Error: Number of reaction species=',nsp csd7 : ,' in PHREEQE-data-base' csd7 write(*,*) ' (must be >0 and <=20)' 7000 write(12,*) 'Input line=',inlin write(12,*) 'Redox couples or Aqueous species =',name write(12,*) : '-- Error: Number of reaction species=',nsp : ,' in PHREEQE-data-base' write(12,*) ' (must be >0 and <=20)' return C c7100 write(*,9730) inlin csd7 write(*,*) 'Current species name is=',name csd7 write(*,*) 'FORTRAN-Read-Error in PHREEQE-data-base' 7100 write(12,9730) inlin write(12,*) 'Current species name is=',name write(12,*) 'FORTRAN-Read-Error in PHREEQE-data-base' return C c7200 write(*,9730) inlin csd7 write(*,*) csd7 : '-- Error: unexpected end-of-file, in PHREEQE-data-base' 7200 write(12,9730) inlin write(12,*) : '-- Error: unexpected end-of-file, in PHREEQE-data-base' return C 9010 format('==================== REDOX & AQUEOUS =================') 9020 format(a) 9030 format(3x,I2,3x,I2) 9040 format(a)

JNC TN8400 2002-024
Page 174: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 168 -

9050 format(A8,2X,I2,3X,F10.0) 9060 format(a) 9070 format(2x,i3,' redox couples') 9080 format(a) 9090 format(5x,'charge=',f5.1,6x,'ion size=',f5.1,' A',6x, : 'mole wt.=',f10.4,' g') 9100 format(4x,i2,' species in reaction') 9110 format(5x,f7.3,1x,a10,4x,f7.3,1x,a10,4x,f7.3,1x,a10) c9110 format(3(4x,f7.3,1x,a10)) 9120 format(5x,4f10.4) 9130 format(2x,i3,' aqueous species') 9140 format(6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9150 format(3x,i2' basis species') 9155 format(a4) 9160 format(i3) 9165 format(i4) c9170 format(a10,i3,i1,1x,f10.3,40x,f10.3) 9170 format(a10,i3,i1,1x,f10.3,10x,f10.3,20x,f10.3) 9180 format(2f10.3,6e12.5) 9190 format(2x,'Aqueous species=',a,', species in reaction=', : i4,/5x,'master-species number(s) in reaction=',7i5, : /10x,13i5) 9200 format('Do you input ion size of each Redox & Aqueous species by :yourself?:',$ ) 9210 format('Please input ion size of Redox & Aqueous:',$ ) 9220 format(6(I3,f7.3)) 9230 format('*->> ?? Move this species. It must appear before', : ' species "O2(G)" in the',/, : '* section for strict basis aqueous species') 9240 format(a) 9250 format(5x,'charge=',f5.1, 6x,'ion size=',f5.1,1x,'A',/6x, : 'mol wt.=',f10.4) 9260 format(4x,i2,' elements in species'/ : 5(/5x,f7.3,1x,a2,12x,f7.3,1x,a2,12x,f7.3,1x,a2,:) : /5x,f7.3,1x,a2,12x,f7.3,1x,a2,12x,f7.3,1x,a2) 9270 format('*->> ?? Duplicate name error : ',A) 9280 format('+Name error : ',A,/) 9290 format('+Name error : ',A,/) 9300 format(4x,i2,1x,'species in reaction=') 9310 format(5x,' -1.000',1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9320 format(5x,f7.2,1x,a10,4x,f7.2,1x,a10,4x,f7.2,1x,a10) 9330 format('*',4x,'log k grid (0-25-60-100/150-200-250-300 ', : 'c) =', : /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4, : /6x,f9.4,1x,f9.4,1x,f9.4,1x,f9.4) 9340 format('*',4x,'delvr grid (0-25-60-100/150-200-250-300 ', : 'c) =',/9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /9x,'0.',8x,'0.',8x,'0.',8x,'0.', : /,'*',1x,'input PHREEQE data-base file: ',a) c9250 format('+',72('-')) 9350 format('-end-') 9360 format(a10,i2,13x,2f10.2,5x,i1) 9370 format(5(i4,f11.3)) 9380 format(6e12.5) 9390 format('* ?? Serious error, nr of species', : ' in reaction <=0') 9400 format('* ?? Serious error,',3x, :'Element=',i3,' (',a2,'), stoichiometry=',F6.1,/) 9410 format('* ?? Serious error, nr of elements <=0') 9420 format('*->> ?? ERROR:',1x, : 'log K (25"C) =',F8.3,' in input PHREEQE-file',/, : '*',22x,'and =',F8.3,' from polynomial eqn.') 9430 format('* ?? Serious error, ', : 'electric charge inbalance =',3x,1pE15.5,/) 9440 format(6x, '(master-species numbers must be <= index for OH-)') 9450 format(6x,'(unknown master species nr.',I2, ', name:',A,')') 9460 format('*->> ?? Aqueous species ',A,'not written to GWB-file',/) 9700 format(10x,'(must be >0 and <=',i4,')') 9710 format(/1x,'log K for Eh reaction:',3x, : '2 H2O = O2(G) + 4 H+ + 4 E-',/1x, : 'not found in file "HDR"') 9720 format(1x,'-- Error #',I5,/4x, : 'opening file: ',A,/4X,'(or file not found)',/)

JNC TN8400 2002-024
Page 175: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 169 -

9730 format(1x,'Input line=',I6) end

JNC TN8400 2002-024
JNC TN8400 2002-024
Page 176: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 170 -

別添-4.14 phgwb_10 のプログラムソース(substr.f)

csd subroutine Substr (nsp,csp,lsp) subroutine Substr (nsp,csp,lsp,iswstr) C C---------------------------------------------------------------------- C substract aqueous species with zero stoichiometric coeff C---------------------------------------------------------------------- C integer lsp(20 ) real csp(20 ) C C---- Initial set ---------------------------------------------------- C iswstr = 0 i = 0 newsp = nsp C---------------------------------------------------------------------- if (nsp.le.1) return if (nsp.gt.20) go to 1000 C C 100 i=i+1 C 200 if (csp(i).ne.0. .or. i.gt.newsp) go to 400 newsp=newsp-1 if (newsp.le.0) go to 400 j=i C 300 csp(j)=csp(j+1) lsp(j)=lsp(j+1) j=j+1 if (j.le.nsp-1) go to 300 go to 200 C 400 if (i.le.newsp) go to 100 nsp=newsp if (nsp.gt.0) return write(*,9000) write(12,9000) write(11,9000) iswstr = 1 return C C---- ERROR ----------------------------------------------------------- C 1000 write (*,*) 'Fatal error, NSP=',nsp write (*,*) '(NSP should be <=20 in routine "Substr")' write (12,*) 'Fatal error, NSP=',nsp write (12,*) '(NSP should be <=20 in routine "Substr")' stop C 9000 format(1x,'?? Serious error, nr of species', : ' in reaction <=0') end

JNC TN8400 2002-024
Page 177: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 171 -

別添-4.15 phgwb_10 のプログラムソース(subtre.f)

csd subroutine SubtrE (elm,nelm,welm) subroutine SubtrE (elm,nelm,welm,keepi,nelmk,welmk,iswse1,iswse2) C C------------------------------------------------------------------------ C substract elements with zero coefficient C elm = number of elements in species C nelm(j) = how many of element "welm(j)" are there in species C------------------------------------------------------------------------ C integer elm real nelm(elm),nelmk character*2 welm(elm),welmk C C---- Initial set -------------------------------------------------------- C iswse1 = 0 iswse2 = 0 keepi = 0 i = 0 newelm = elm C-------------------------------------------------------------------------- C if (elm.le.1) return if (elm.gt.20) go to 1000 C C 100 i=i+1 C 200 if (nelm(i).lt.0.) write(*,9000) i,welm(i),nelm(i) if (nelm(i).lt.0.) write(12,9000) i,welm(i),nelm(i) if (nelm(i).lt.0.) write(11,9000) i,welm(i),nelm(i) if (nelm(i).lt.0.) then keepi = i nelmk = nelm(i) welmk = welm(i) iswse1 = 1 endif if (nelm(i).gt.0. .or. i.gt.newelm) go to 400 newelm=newelm-1 if (newelm.le.0) go to 400 j=i C 300 welm(j)=welm(j+1) nelm(j)=nelm(j+1) j=j+1 if (j.le.elm-1) go to 300 go to 200 C 400 if (i.le.newelm) go to 100 elm=newelm if (elm.gt.0) return write(*,9100) write(12,9100) write(11,9100) iswse2 = 1 return C C---- ERROR -------------------------------------------------------------------- C 1000 write (*,*) 'Fatal error, ELM=',elm write (*,*) '(ELM should be <=20 in routine "SubtrE")' write (12,*) 'Fatal error, ELM=',elm write (12,*) '(ELM should be <=20 in routine "SubtrE")' stop C 9000 format(1x,'?? Serious error,',3x, : 'Element=',i3,' (',a2,'), stoichiometry=',F6.1,/) 9100 format(1x,'?? Serious error, nr of elements <=0') end

JNC TN8400 2002-024
Page 178: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 172 -

別添-4.16 phgwb_10 のプログラムソース(upcase.f)

Subroutine UpCase (i1,nchr) C character i1*(*), ch*1 C do 10 i=1,nchr ch=i1(i:i) if ((ch.ge.'a').and.(ch.le.'z')) i1(i:i)=char(ichar(ch)-32) 10 continue C return end

JNC TN8400 2002-024
Page 179: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 173 -

別添-4.17 phgwb_10 のプログラムソース(wrtlin.f)

subroutine WrtLin (line) C character*80 line C do 10 i=1,80 k=81-i if (line(k:k) .ne. ' ') go to 20 10 continue C 20 if (k.eq.1) go to 30 write(11,9000) line(1:k) return C 30 if (line(1:1).ne.' ') write(11,9000) line(1:1) if (line(1:1).eq.' ') write(11,*) return 9000 format(a) end

JNC TN8400 2002-024
Page 180: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 174 -

別添-4.18 phgwb_10 のプログラムソース(zcheck.f)

subroutine ZCheck csd : (mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp) csd7 :(mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp,iswzch,ztot) :(mastr,mstzsp,naq,aquzsp,NMaster,zsp,nsp,lsp,csp,iswzch,ztot :,index) C C--------------------------------------------------------------------- C check charge balance in species reaction C--------------------------------------------------------------------- C integer lsp(20 ) real mstzsp(mastr),aquzsp(naq), csp(20 ) C C---- Initial set ---------------------------------------------------- C iswzch = 0 ztot = -zsp C--------------------------------------------------------------------- C if (nsp.le.0 .or. nsp.gt.20) go to 1000 C do 300 i=1,nsp if (lsp(i).le.NMaster) go to 100 iaqu = lsp(i) - NMaster zzz = aquzsp(iaqu) go to 200 c 100 zzz = mstzsp(lsp(i)) 200 ztot = ztot + (csp(i) * zzz) 300 continue C C if (abs(ztot) .lt. 5.e-4) return csd write(11,9000) ztot write( *,9000) index, ztot write(12,9000) index, ztot iswzch = 1 return C C---- ERROR ------------------------------------------------------------ C 1000 write (*,*) 'Fatal error, NSP=',nsp write (*,*) '(should be >0 and <=20) in routine "ZCheck"' write (12,*) 'Fatal error, NSP=',nsp write (12,*) '(should be >0 and <=20) in routine "ZCheck"' stop C 9000 format(1x,'?? Serious error, ','INDEX=',i4,2x, : 'electric charge inbalance =',3x,1pE15.5,/) end

JNC TN8400 2002-024
Page 181: 熱力学データベースフォーマット変換 プログラムの作成- i - JNC TN8400 2002-024 2003年 2 月 熱力学データベースフォーマット変換プログラムの作成

- 175 -

別添-4.19 phgwb_10 のプログラムソース(zchemi.f)

subroutine zchemi(NMaster,nsp,iswzch,ztot) C C-------------------------------------------------------------------- C check charge balance in species reaction C-------------------------------------------------------------------- C include'phreqt.h' C C---- Initial set ---------------------------------------------------- C iswzch = 0 ztot = -zsp C--------------------------------------------------------------------- C if (nsp.le.0 .or. nsp.gt.20) go to 1000 C do 300 i=1,nsp if (lsp(i).le.NMaster) go to 100 iaqu = lsp(i) - NMaster zzz = aquzsp(iaqu) go to 200 C 100 zzz = mstzsp(lsp(i)) 200 ztot = ztot + (csp(i) * zzz) 300 continue C if (abs(ztot) .lt. 5.e-4) return csd write(11,9000) ztot write( *,9000) name,ztot write(12,9000) name,ztot iswzch = 1 return C C---- ERROR -------------------------------------------------------------- C 1000 write (*,*) 'Fatal error, NSP=',nsp write (*,*) '(should be >0 and <=20) in routine "ZCheck"' write (12,*) 'Fatal error, NSP=',nsp write (12,*) '(should be >0 and <=20) in routine "ZCheck"' stop C 9000 format(1x,'?? Serious error, ','MINERALS=',a10,2x, : 'electric charge inbalance =',3x,1pE15.5,/) end

JNC TN8400 2002-024
JNC TN8400 2002-024