Created
February 10, 2011 22:28
-
-
Save rwest/821491 to your computer and use it in GitHub Desktop.
Differences between before and after my merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index 1084fa7..d70dfbd 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -16,21 +16,40 @@ BINDIR=$(CURDIR)/bin | |
# The directory in which to run RMG (used for the test) | |
RUNDIR=$(CURDIR)/run | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fbounds-check -ftrace=full -fmod=$(BUILDDIR) -Wall -O3 | |
-F90FLAGS_NDEBUG=-fmod=$(BUILDDIR) -ftrace=full | |
-# these are added to the LDFLAGS of the subsidiary makefiles | |
-#F90_EXTRA_LDFLAGS = -L/home/local/lib -lg2c # required for Monch | |
-#F90_EXTRA_LDFLAGS = -framework vecLIB # for optimized blas and lapack on MacOS X, if they're not found automatically | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fbounds-check -ftrace=full -fmod=$(BUILDDIR) -Wall -O3 | |
+F90FLAGS_NDEBUG = -fmod=$(BUILDDIR) -ftrace=full # used for dassl and daspk | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+endif ###### END OF gfortran SETTINGS | |
-#F90=gfortran | |
-#F90FLAGS=-fbounds-check -fbacktrace -Wall -O3 | |
-#F90FLAGS_NDEBUG=-fbacktrace | |
-#F90=gfortran | |
-#F90FLAGS = -ffpe-trap=invalid,zero,overflow -ftrapv -fbounds-check -ggdb -J""$(BUILDDIR)"" -Wall -O3 | |
+# these are added to the LDFLAGS of the subsidiary makefiles | |
+#F90_EXTRA_LDFLAGS = -L/home/local/lib -lg2c # required for Monch | |
################################################################################ | |
@@ -67,9 +86,6 @@ daspk: dirs | |
GATPFit: dirs | |
make -C $(SOURCEDIR)/GATPFit SOURCEDIR=$(SOURCEDIR)/GATPFit BUILDDIR=$(BUILDDIR)/GATPFit BINDIR=$(BINDIR) F90=$(F90) F90FLAGS="$(F90FLAGS)" F90_EXTRA_LDFLAGS="$(F90_EXTRA_LDFLAGS)" | |
- | |
- | |
- | |
dirs: | |
mkdir -p $(BUILDDIR) | |
mkdir -p $(BINDIR) | |
@@ -89,7 +105,8 @@ clean: | |
test: | |
mkdir -p $(RUNDIR) | |
cp examples/RMG/1,3-hexadiene/condition.txt $(RUNDIR) | |
- export RMG=$(CURDIR); cd $(RUNDIR); java -jar $(BINDIR)/RMG.jar condition.txt | tee RMG.log | |
+ export RMG=$(CURDIR); cd $(RUNDIR); java -jar $(BINDIR)/RMG.jar condition.txt 2>&1 | tee RMG.log | |
+ echo "Results saved to $(RUNDIR)/RMG.log" | |
help: | |
@echo "" | |
diff --git a/README.rst b/README.rst | |
new file mode 100644 | |
index 0000000..642405c | |
--- /dev/null | |
+++ b/README.rst | |
@@ -0,0 +1,49 @@ | |
+==================================== | |
+RMG - Reaction Mechanism Generator | |
+==================================== | |
+ | |
+.. image:: https://github.com/GreenGroup/RMG-Java/raw/master/web/source/_static/rmg_logo.png | |
+ :align: right | |
+ | |
+RMG is an automatic chemical reaction mechanism generator that constructs | |
+kinetic models composed of elementary chemical reaction steps using a general | |
+understanding of how molecules react. | |
+ | |
+The easiest way to get started on Windows is to download the complete installer package | |
+from over at http://rmg.sourceforge.net/, and read the documentation_ that's also hosted there. | |
+If you want to use the cutting-edge development version that is hosted here at GitHub, | |
+then you'll have to compile it yourself. | |
+ | |
+.. _documentation: http://rmg.sourceforge.net/documentation/ | |
+ | |
+Compiling from source | |
+----------------------------- | |
+ | |
+Linux | |
+~~~~~ | |
+ | |
+Mac | |
+~~~~~ | |
+ | |
+You will need the Java compiler, Apache ant, and GNU Make, but these are all provided by MacOS. | |
+If you're missing these `developer tools <http://developer.apple.com/technologies/tools/>`_ you can download them from Apple. | |
+You will also need a Fortran compiler. | |
+We recommend gfortran_, but g95 can be used if you add the option `F90=g95` to the `make` command. | |
+On MacOS X 10.6 (Snow Leopard) the gfortran compiler flags can be optimized with the make option `MACOS=true`. | |
+One nice way to get gfortran is to install homebrew_ then then type `brew install gfortran`. | |
+ | |
+.. _gfortran: http://r.research.att.com/tools/ | |
+.. _homebrew: http://mxcl.github.com/homebrew/ | |
+ | |
+The quick-start instructions in full: | |
+ | |
+#. git clone git://github.com/GreenGroup/RMG-Java.git | |
+#. cd RMG-Java | |
+#. make MACOS=true | |
+#. make test | |
+ | |
+For more, refer to the documentation_. | |
+ | |
+ | |
+Windows | |
+~~~~~~~~ | |
diff --git a/RMG-gui.bat b/RMG-gui.bat | |
index 3bd84bb..4bb123b 100755 | |
--- a/RMG-gui.bat | |
+++ b/RMG-gui.bat | |
@@ -4,13 +4,13 @@ if not defined RMG ( | |
echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist %RMG%\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
echo Starting RMG GUI... | |
-java -Xmx500m -classpath %RMG%\bin\RMG.jar GUI | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" GUI | |
:end | |
pause | |
diff --git a/build.xml b/build.xml | |
index 1f2c962..030d5c7 100755 | |
--- a/build.xml | |
+++ b/build.xml | |
@@ -16,7 +16,7 @@ | |
</target> | |
<target name="clean" description="delete all compiled classes"> | |
- <delete> | |
+ <delete failonerror="false"> | |
<fileset dir="${build}"> | |
<include name="**/*.class"/> | |
<include name="*.class"/> | |
diff --git a/databases/RMG_database/ForbiddenStructures.txt b/databases/RMG_database/ForbiddenStructures.txt | |
index 50eafd0..da3901a 100644 | |
--- a/databases/RMG_database/ForbiddenStructures.txt | |
+++ b/databases/RMG_database/ForbiddenStructures.txt | |
@@ -43,18 +43,24 @@ Carbene_D | |
1 C 2T {2,D} | |
2 C 0 {1,D} | |
-CO3 | |
-1 C 0 {2,D} {3,S} {4,S} | |
-2 O 0 {1,D} | |
-3 O 0 {1,S} | |
-4 O 0 {1,S} | |
- | |
- | |
-CO3. | |
-1 C 0 {2,D} {3,S} {4,S} | |
-2 O 0 {1,D} | |
-3 O 1 {1,S} | |
-4 O 0 {1,S} | |
+// Cyclic C3O is a saddle point and immediately becomes | |
+// linear C3O according to http://dx.doi.org/10.1039/b718817j | |
+cyclic-C3O | |
+1 C 0 {2,D} {3,S} {4,S} | |
+2 O 0 {1,D} | |
+3 C 0 {4,T} {1,S} | |
+4 C 0 {3,T} {1,S} | |
+ | |
+// Cyclopropyne is unstable according to http://dx.doi.org/10.1021/ja960762n | |
+// but note that cyclopropene-1,2-diyl, which is the same geometry but with a | |
+// double bond and 2 radicals instead of a triple bond, is stable and now in | |
+// the primaryThermoLibrary. | |
+cyclopropyne | |
+1 C 0 {2,T} {3,S} | |
+2 C 0 {1,T} {3,S} | |
+3 C 0 {2,S} {4,S} {5,S} {1,S} | |
+4 H 0 {3,S} | |
+5 H 0 {3,S} | |
//gmagoon 2/22/10: forbid physically unlikely cyclic cumulenic C3 species to prevent infinite recursion error in getToEndOfAxis; UPDATE: this issue should be fixed by my updates to ChemGraph, so we don't need to make this a forbiddenStructure | |
//cC3 | |
diff --git a/databases/RMG_database/frequencies_groups/Dictionary.txt b/databases/RMG_database/frequencies_groups/Dictionary.txt | |
index c838492..5a83d17 100644 | |
--- a/databases/RMG_database/frequencies_groups/Dictionary.txt | |
+++ b/databases/RMG_database/frequencies_groups/Dictionary.txt | |
@@ -1,6 +1,7 @@ | |
//Frequency dictionary: devised by Franklin Goldsmith | |
//implemented by Greg Magoon: 11/13/08 (based off Group_Dictionary.txt for Thermo) | |
//"counting nodes" (those that are counted by Franklin's code) denoted by ### | |
+//"potential counting nodes" (not currently handled by frankie, cf. https://github.com/GreenGroup/RMG-Java/commit/a171151e334dfa563f97632cb687347e314f8f9b) denoted by *** | |
//modified 11/18/08 since {} notation for radicals doesn't seem to work | |
R!H //L0 | |
@@ -656,7 +657,7 @@ | |
2 R!H 2 {1,D} | |
3 H 0 {1,S} | |
- CtCr //L2 Node: triple-bonded to one heavy atom (carbon) ### | |
+ CtCr //L2 Node: triple-bonded to one heavy atom (carbon) *** | |
Union {CtCrx0, CtCrx1} | |
CtCrx0 | |
@@ -838,7 +839,7 @@ | |
C_R2 // L1 Node: carbon, double radical | |
1 * C 2 | |
- RsCHrr // L2 Node: single-bonded to exactly one heavy atom ### | |
+ RsCHrr // L2 Node: single-bonded to exactly one heavy atom *** | |
Union {RsCHrrx0,RsCHrrx1,RsCHrrx2} | |
RsCHrrx0 | |
@@ -856,7 +857,7 @@ | |
2 R!H 2 {1,S} | |
3 H 0 {1,S} | |
- RdCrr //L2 Node: double-bonded to one heavy atom (vinylic) ### | |
+ RdCrr //L2 Node: double-bonded to one heavy atom (vinylic) *** | |
Union {RdCrrx0,RdCrrx1,RdCrrx2} | |
RdCrrx0 | |
@@ -871,7 +872,7 @@ | |
1 * C 2 {2,D} | |
2 R!H 2 {1,D} | |
- RsCrrsR // L2 Node: single-bonded to exactly two heavy atoms ### | |
+ RsCrrsR // L2 Node: single-bonded to exactly two heavy atoms *** | |
Union {RsCrrsRx00,RsCrrsRx01,RsCrrsRx11,RsCrrsRx02,RsCrrsRx12,RsCrrsRx22} | |
RsCrrsRx00 | |
@@ -1040,7 +1041,7 @@ | |
1 * O 1 | |
- Oxy // L2 Node: bound to carbon ### | |
+ Oxy // L2 Node: bound to carbon *** | |
Union {Oxyx0,Oxyx1,Oxyx2} | |
Oxyx0 | |
diff --git a/databases/RMG_database/frequencies_groups/Tree.txt b/databases/RMG_database/frequencies_groups/Tree.txt | |
index fc1ed6c..93a4e32 100644 | |
--- a/databases/RMG_database/frequencies_groups/Tree.txt | |
+++ b/databases/RMG_database/frequencies_groups/Tree.txt | |
@@ -27,7 +27,7 @@ L0: R!H | |
L2: OdCrsR | |
L2: CdCrsR | |
L2: RsCrsR2 | |
- L2: C_R2 | |
+ L1: C_R2 | |
L2: RsCHrr | |
L2: RdCrr | |
L2: RsCrrsR | |
diff --git a/databases/RMG_database/kinetics_groups/H_Abstraction/rateLibrary.txt b/databases/RMG_database/kinetics_groups/H_Abstraction/rateLibrary.txt | |
old mode 100644 | |
new mode 100755 | |
index b801731..42918cc | |
--- a/databases/RMG_database/kinetics_groups/H_Abstraction/rateLibrary.txt | |
+++ b/databases/RMG_database/kinetics_groups/H_Abstraction/rateLibrary.txt | |
@@ -1,361 +1,358 @@ | |
-// rate library for f01: HAbstraction reaction | |
-// original from rate library.txt, CDW 03/08/01 | |
-// SR and JS rename some nodes according to the tree and dictionary correction, Nov., 20, 2002 | |
-// JS, comment out 10th, change XH in 23 from C/Cd/H3 to C/H3/Cd | |
-// JS, remove CO_birad to form a new family later: CO + RH -> HCO + R. Aug, 26, 2003 | |
- | |
-// JS, define key word for format of the rate: either Arrhenius or Arrhenius_EP | |
-Arrhenius_EP | |
- | |
-// Catherina Wijaya thesis, pg 151 -154. | |
- | |
-//f01_intermolecular_HA | |
-//No. XH Y_rad Temp. A n a E0 DA Dn Da DE0 Rank Comments | |
-0. X_H_or_Xrad_H Y_rad_birad 300-1500 1E+05 0 0 10 0 0 0 0 0 Default | |
-1. X_H Y_rad_birad 300-1500 1E+05 0 0 10 0 0 0 0 0 Default | |
-2. X_H H_rad 300-1500 2.4E+08 1.5 0.65 9.4 0 0 0 0 5 Dean, A. M. [118] | |
-3. X_H O_atom_triplet 300-1500 1.7E+08 1.5 0.75 6.6 0 0 0 0 5 Dean, A. M. [118] | |
-4. X_H O_pri_rad 300-1500 1.2E+06 2.0 0.50 10.1 0 0 0 0 5 Dean, A. M. [118] | |
-5. X_H O_sec_rad 300-1500 1.4E+04 2.69 0.60 11.3 0 0 0 0 5 Dean, A. M. [118] | |
-6. X_H C_methyl 300-1500 8.1E+05 1.87 0.65 13.0 0 0 0 0 5 Dean, A. M. [118] | |
-7. C/H/Cs3 C_rad/Cs3 300-1500 1.30E-01 3.71 0 6.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-8. C/H2/NonDeC C_rad/Cs3 300-1500 1.26E+00 3.55 0 8.31 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-9. C/H3/Cs C_rad/Cs3 300-1500 2.85E+00 3.62 0 11.20 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-10. C/H/Cs3 C_rad/H/NonDeC 300-1500 5.58E+01 3.01 0 7.34 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-11. C/H2/NonDeC C_rad/H/NonDeC 300-1500 1.52E+01 3.19 0 10.31 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-12. C/H3/Cs C_rad/H/NonDeC 300-1500 4.71E+01 3.23 0 12.27 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-13. C/H/Cs3 C_rad/H2/Cs 300-1500 4.22E+03 2.51 0 8.06 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-14. C/H2/NonDeC C_rad/H2/Cs 300-1500 1.54E+03 2.66 0 10.10 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-15. C/H3/Cs C_rad/H2/Cs 300-1500 6.59E+02 2.71 0 12.92 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-16. C/H/Cs3 C_methyl 300-1500 5.74E+05 1.83 0 6.94 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-17. C/H2/NonDeC C_methyl 300-1500 1.45E+06 1.77 0 8.53 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-18. C/H3/Cs C_methyl 300-1500 2.78E+05 1.9 0 11.05 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-19. C_methane C_methyl 300-1500 1.01E+04 2.47 0 13.96 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-20. C/H/Cs3 H_rad 300-1500 4.83E+08 1.54 0 2.98 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-21. C/H2/NonDeC H_rad 300-1500 1.30E+08 1.69 0 4.78 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-22. C/H3/Cs H_rad 300-1500 6.28E+07 1.75 0 7.51 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-23. C_methane H_rad 300-1500 3.06E+07 1.87 0 10.59 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-24. O/H/NonDeC H_rad 300-1500 8.70E+08 1.39 0 10.07 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-25. CO_pri H_rad 300-1500 5.48E+07 1.82 0 2.44 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-26. CO/H/NonDe H_rad 300-1500 8.07E+07 1.76 0 0.67 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-27. Cd_pri H_rad 300-1500 2.53E+07 1.98 0 11.78 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary vinylic {Cd/H2} | |
-28. Cd_pri H_rad 300-1500 4.53E+03 2.43 0 8.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Ketene hydrogen {CCO/H2} | |
-29. Cd_pri H_rad 300-1500 1.46E+07 2.09 0 5.49 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Allene hydrogen {Cd/H2/Ca} | |
-30. Cd/H/NonDeC H_rad 300-1500 2.98E+07 1.95 0 8.65 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-31. C/H3/Cd H_rad 300-1500 4.33E+05 2.38 0 2.80 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-32. C/H2/OneDeC H_rad 300-1500 6.99E+05 2.36 0 1.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary allylic hydrogen {C/Cd/C/H2} | |
-33. C/H2/OneDeC H_rad 300-1500 7.79E+07 1.78 0 2.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary propergylic {C/Ct/C/H2} | |
-34. C/H/Cs2 H_rad 300-1500 3.02E+06 2.16 0 -0.45 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Secondary allylic hydrogen {C/Cd/C2/H} | |
-35. C/H/Cs2 H_rad 300-1500 1.21E+08 1.72 0 -0.73 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Secondary propergylic {C/Ct/C2/H} | |
-36. C/H2/TwoDe H_rad 300-1500 7.09E+03 2.85 0 -1.90 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-37. Cd/H/OneDe H_rad 300-1500 1.93E+08 1.74 0 10.28 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Dienylic {Cd/Cd/H} | |
-38. Cd/H/OneDe H_rad 300-1500 2.18E+06 2.4 0 6.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Eneynic {Cd/Ct/H} | |
-39. Ct_H H_rad 300-1500 1.65E+08 1.85 0 26.52 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-40. C/H3/Ct H_rad 300-1500 2.70E+07 1.91 0 5.99 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-41. Cd/H/NonDeO H_rad 300-1500 9.67E+09 1.23 0 11.69 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-42. O/H/OneDe H_rad 300-1500 1.30E+11 0.82 0 7.75 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-43. Cd_pri C_methyl 300-1500 3.24E+03 2.58 0 14.04 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-44. C/H3/Cd C_methyl 300-1500 8.04E+01 2.92 0 7.16 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-45. O/H/NonDeC C_methyl 300-1500 2.54E+05 1.89 0 8.97 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-46. CO/H/NonDe C_methyl 300-1500 2.92E+04 2.29 0 5.44 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-47. O/H/OneDe C_methyl 300-1500 9.07E+04 2.04 0 10.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Olefinic alcohol {O/Cd/H} | |
-48. O/H/OneDe H_rad 300-1500 3.30E+08 1.56 0 13.94 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Acid O-H {O/CO/H} | |
-49. CO/H/NonDe C_methyl 300-1500 4.53E+03 2.43 0 8.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
-50. C_methane C_methyl 300-1500 6.03E+13 0 0 19.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-51. C/H3/Cs C_methyl 300-1500 2.80E+14 0 0 16.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-52. C/H3/Cs C_methyl 300-1500 6.15E+13 0 0 15.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-53. C/H3/Cs C_methyl 300-1500 7.71E+12 0 0 13.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-54. C/H2/NonDeC C_methyl 300-1500 5.02E+13 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-55. C/H/Cs3 C_methyl 300-1500 5.02E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-56. C/H/Cs3 C_methyl 300-1500 4.42E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-57. C/H3/Cd C_methyl 300-1500 2.62E+13 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-58. C/H2/OneDeC C_methyl 300-1500 2.73E+13 0 0 10.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-59. C/H/Cs2 C_methyl 300-1500 2.73E+13 0 0 8.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-60. C/H2/TwoDe C_methyl 300-1500 7.54E+13 0 0 8.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-61. C/H/Cs C_methyl 300-1500 9.32E+12 0 0 7.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-62. C/H3/Cb C_methyl 300-1500 4.90E+12 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-63. C/H2/OneDeC C_methyl 300-1500 1.70E+13 0 0 11.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-64. C/H/Cs2 C_methyl 300-1500 1.17E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-65. C/H3/Ct C_methyl 300-1500 6.60E+13 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-66. C/H2/OneDeC C_methyl 300-1500 2.81E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-67. C/H2/TwoDe C_methyl 300-1500 1.38E+14 0 0 8.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-68. C/H/Cs C_methyl 300-1500 3.43E+13 0 0 7.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-69. C/H/Cs2 C_methyl 300-1500 5.03E+13 0 0 9.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-70. Cd_pri C_methyl 300-1500 1.88E+14 0 0 18.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-71. Cd/H/NonDeC C_methyl 300-1500 4.43E+13 0 0 16.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-72. Cd/H/OneDe C_methyl 300-1500 5.78E+13 0 0 16.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-73. Cd/H/OneDe C_methyl 300-1500 2.26E+13 0 0 15.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-74. Cd/H/OneDe C_methyl 300-1500 4.37E+13 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-75. Ct_H C_methyl 300-1500 3.33E+18 0 0 28.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-76. Cb_H C_methyl 300-1500 1.17E+15 0 0 19.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-77. C/H2/NonDeC C_methyl 300-1500 9.87E+14 0 0 13.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-78. C/H2/NonDeC C_methyl 300-1500 4.51E+12 0 0 12.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-79. C/H/Cs3 C_methyl 300-1500 2.46E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-80. C/H2/OneDeC C_methyl 300-1500 5.98E+13 0 0 9.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-81. C_methane H_rad 300-1500 1.87E+14 0 0 14.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-82. C_methane C_methyl 300-1500 6.03E+13 0 0 19.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-83. C_methane C_rad/H2/Cd 300-1500 1.53E+14 0 0 30.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-84. C_methane Cd_pri_rad 300-1500 1.59E+14 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-85. C_methane C_rad/Cs3 300-1500 1.86E+13 0 0 20.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-86. C/H/Cs3 H_rad 300-1500 5.31E+13 0 0 5.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-87. C/H/Cs3 C_methyl 300-1500 5.02E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-88. C/H/Cs3 C_rad/H2/Cd 300-1500 5.02E+13 0 0 20.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-89. C/H/Cs3 Cd_pri_rad 300-1500 8.95E+13 0 0 6.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-90. C/H/Cs3 C_rad/Cs3 300-1500 5.43E+11 0 0 11.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-91. C/H/Cs3 C_rad/H2/Cs 300-1500 3.03E+12 0 0 12.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-92. C/H/Cs3 C_rad/H/NonDeC 300-1500 2.44E+12 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-93. C/H/Cs3 C_rad/H/OneDeC 300-1500 5.46E+12 0 0 21.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-94. C/H/Cs3 C_rad/Cs2 300-1500 1.10E+12 0 0 21.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-95. C/H/Cs3 Cd_rad/NonDeC 300-1500 1.02E+11 0 0 5.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-96. C/H/Cs3 Cd_rad/OneDe 300-1500 4.16E+12 0 0 13.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-97. C/H/Cs3 C_rad/H2/Ct 300-1500 3.14E+13 0 0 17.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-98. C/H/Cs3 C_rad/H/OneDeC 300-1500 2.53E+12 0 0 18.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-99. C/H/Cs3 C_rad/Cs2 300-1500 9.78E+11 0 0 18.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-100. Cd_pri H_rad 300-1500 3.39E+14 0 0 15.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-101. Cd_pri C_methyl 300-1500 1.88E+14 0 0 18.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-102. Cd_pri C_rad/H2/Cd 300-1500 5.36E+13 0 0 30.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-103. Cd_pri Cd_pri_rad 300-1500 1.47E+13 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-104. Cd_pri C_rad/Cs3 300-1500 3.93E+13 0 0 20.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-105. Cd_pri C_rad/H2/Cs 300-1500 7.82E+12 0 0 19.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-106. Cd_pri C_rad/H/NonDeC 300-1500 3.25E+12 0 0 20.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-107. Cd_pri C_rad/H/OneDeC 300-1500 1.51E+13 0 0 31.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-108. Cd_pri C_rad/Cs2 300-1500 3.39E+12 0 0 38.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-109. Cd_pri Cd_rad/NonDeC 300-1500 6.04E+13 0 0 14.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-110. Cd_pri Cd_rad/OneDe 300-1500 1.30E+13 0 0 20.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-111. Cd_pri C_rad/H2/Ct 300-1500 2.55E+13 0 0 26.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-112. Cd_pri C_rad/H/OneDeC 300-1500 4.41E+12 0 0 28.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-113. Cd_pri C_rad/Cs2 300-1500 3.59E+12 0 0 35.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-114. C/H3/Cd H_rad 300-1500 3.13E+13 0 0 7.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-115. C/H3/Cd C_methyl 300-1500 2.62E+13 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-116. C/H3/Cd C_rad/H2/Cd 300-1500 5.78E+12 0 0 21.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-117. C/H3/Cd Cd_pri_rad 300-1500 7.73E+12 0 0 7.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-118. C/H3/Cd C_rad/Cs3 300-1500 3.18E+12 0 0 11.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-119. C/H3/Cd C_rad/H2/Cs 300-1500 5.60E+11 0 0 12.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-120. C/H3/Cd C_rad/H/NonDeC 300-1500 2.87E+11 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-121. C/H3/Cd C_rad/H/OneDeC 300-1500 1.52E+12 0 0 21.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-122. C/H3/Cd C_rad/Cs2 300-1500 4.13E+11 0 0 21.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-123. C/H3/Cd Cd_rad/NonDeC 300-1500 5.52E+12 0 0 7.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-124. C/H3/Cd Cd_rad/OneDe 300-1500 1.95E+12 0 0 14.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-125. C/H3/Cd C_rad/H2/Ct 300-1500 7.58E+12 0 0 18.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-126. C/H3/Cd C_rad/H/OneDeC 300-1500 5.09E+11 0 0 18.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-127. C/H3/Cd C_rad/Cs2 300-1500 3.32E+11 0 0 18.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-128. H2 H_rad 300-1500 2.37E+13 0 0 9.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-129. H2 C_methyl 300-1500 2.95E+12 0 0 14.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-130. H2 C_rad/H2/Cd 300-1500 2.87E+12 0 0 25.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-131. H2 Cd_pri_rad 300-1500 4.49E+12 0 0 10.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-132. H2 C_rad/Cs3 300-1500 3.08E+11 0 0 14.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-133. H2 C_rad/H2/Cs 300-1500 4.57E+11 0 0 14.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-134. H2 C_rad/H/NonDeC 300-1500 3.04E+11 0 0 15.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-135. H2 C_rad/H/OneDeC 300-1500 1.82E+12 0 0 27.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-136. H2 C_rad/Cs2 300-1500 4.30E+11 0 0 27.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-137. H2 Cd_rad/NonDeC 300-1500 3.01E+12 0 0 10.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-138. H2 Cd_rad/OneDe 300-1500 2.37E+12 0 0 18.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-139. H2 C_rad/H2/Ct 300-1500 2.91E+12 0 0 23.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-140. H2 C_rad/H/OneDeC 300-1500 5.34E+11 0 0 24.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-141. H2 C_rad/Cs2 300-1500 4.20E+11 0 0 24.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
-142. C/H3/Cs O_pri_rad 300-1500 5.93E+06 1.80 0 1.431 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. Fixed by RWest (changed to per H) | |
-//142. C/H3/Cs O_pri_rad 300-1500 2.92E+06 1.80 0 0.278 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-143. C/H2/NonDeC O_pri_rad 300-1500 4.50E+05 2.00 0 -1.133 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-144. C/H/Cs3 O_pri_rad 300-1500 1.70E+06 1.90 0 -1.451 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
-145. C/H3/Cs O_atom_triplet 300-1500 9.50E+02 3.05 0 3.123 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-146. C/H2/NonDeC O_atom_triplet 300-1500 2.39E+04 2.71 0 2.106 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-147. C/H/Cs3 O_atom_triplet 300-1500 3.83E+05 2.41 0 1.140 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
-148. C/H3/Cs O_rad/NonDeO 300-1500 2.80E+12 0 0 20.435 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-149. C/H2/NonDeC O_rad/NonDeO 300-1500 2.80E+12 0 0 17.686 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-150. C/H/Cs3 O_rad/NonDeO 300-1500 2.80E+12 0 0 16.013 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
-151. C/H3/Cs O_rad/NonDeC 300-1500 5.27E+10 0 0 7.000 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-152. C/H2/NonDeC O_rad/NonDeC 300-1500 5.50E+10 0 0 5.000 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-153. C/H/Cs3 O_rad/NonDeC 300-1500 1.90E+10 0 0 2.800 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
-154. C/H3/Cs O2b 300-1500 7.00E+12 0 0 50.76 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-155. C/H2/NonDeC O2b 300-1500 7.00E+12 0 0 48.21 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
-156. C/H/Cs3 O2b 300-1500 7.00E+12 0 0 46.06 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
-157. H2 O2b 300-800 7.25E+13 0 0 56.64 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-158. H2 Cd_pri_rad 200-3000 4.73E+03 2.56 0 5.03 0 0 0 0 3 Knyazev et al. [119] Transition state theory. | |
-159. H2 Cd_pri_rad 300-3500 1.11E+04 2.48 0 7.13 0 0 0 0 3 Mebel et al. [120] Transition state theory. | |
-160. H2 Cd_pri_rad 300-1500 1.58E+09 0.70 0 5.11 0 0 0 0 3 Weissman et al. [121] Transition state theory. | |
-161. H2 Ct_rad 300-2500 5.4E+12 0 0 2.17 *3.16 0 0 0 4 Baulch et al. [94] literature review. | |
-162. H2 Cb_rad 300-5000 2.86E+04 2.43 0 6.28 0 0 0 0 3 Mebel et al. [122] Transition state theory. | |
-163. H2 CO_pri_rad 300-2500 9.0E+05 2.00 0 17.83 *5 0 0 0 4 Tsang et al. [89] literature review. | |
-164. H2 CO_rad/NonDe 300-2500 2.06E+06 1.82 0 17.61 *3.0 0 0 0 4 Tsang et al. [89] literature review. | |
-165. H2 O_pri_rad 200-2400 9.10E+08 1.21 0 4.71 0 0 0 0 3 Isaacson [123] Transition state theory. | |
-166. H2 O_rad/NonDeC 300-2000 6.32E-02 4.00 0 4.91 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-167. C_methane O2b 500-2000 9.925E+12 0 0 56.83 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
-168. C_methane C_rad/H2/Cs 300-2500 2.16E-02 4.14 0 12.56 *2.0 0 0 0 4 Tsang et al. [89] literature review. | |
-169. C_methane C_rad/H/NonDeC 300-2500 1.81E-04 4.40 0 10.79 *2.0 0 0 0 4 Tsang et al. [91] literature review. | |
-170. C_methane Ct_rad 300-2500 4.53E+11 0 0 0.50 *10.0 0 0 0 4 Tsang et al. [89] literature review. | |
-171. C_methane Cb_rad 560-1410 5.0E+11 0 0 8.60 0 0 0 0 2 Heckmann et al. [124] | |
-172. C_methane CO_pri_rad 300-2500 1.82E+03 2.85 0 22.46 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-173. C_methane CO_rad/NonDe 300-2500 5.43E+02 2.88 0 21.46 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-174. C_methane O_pri_rad 223-2400 3.85E-01 3.95 0 0.55 0 0 0 0 3 Melissas and Truhlar [125] Transition state theory. | |
-175. C_methane O_pri_rad 240-2500 3.93E+06 1.83 0 2.78 *1.41 0 0 0 4 Baulch et al. [95] literature review. | |
-176. C_methane O_pri_rad 298-1510 2.55E+07 1.60 0 3.12 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
-177. C_methane O_rad/NonDeC 300-2000 1.55E-04 5.00 0 5.58 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-178. C_methane O_rad/NonDeO 300-2500 4.53E+10 0 0 18.58 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-179. C/H3/Cs O2b 500-2000 1.005E+13 0 0 51.87 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
-180. C/H3/Cs Ct_rad 300-1500 6.02E+11 0 0 0 *3 0 0 0 4 Tsang et al. [89] literature review. | |
-181. C/H3/Cs Cb_rad 565-1000 3.48E+10 0 0 4.44 *2.35 0 0 0.18 2 Park et al. [126] | |
-182. C/H3/Cs CO_pri_rad 300-2500 7.82E+03 2.72 0 18.24 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-183. C/H3/Cs CO_rad/NonDe 300-2500 3.02E+03 2.75 0 17.53 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
-184. C/H3/Cs O_pri_rad 250-2000 1.20E+06 2.00 0 0.86 *1.41 0 0 0 4 Baulch et al. [95] literature review. | |
-185. C/H3/CO O_pri_rad 295-600 5.17E+05 2.20 0 1.00 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
-186. C/H3/O C_methyl 300-2000 2.05E-04 4.90 0 6.72 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-187. C/H3/O O_pri_rad 300-2000 8.14E+03 2.80 0 -0.42 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-100_R2 C/H3/O H_rad 300-2000 4.51E+02 3.20 0 3.49 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. added by Greg Magoon 08/25/09 | |
-188. C/H2/NonDeC O2b 300-2500 1.985E+13 0 0 47.69 *10.0 0 0 0 4 Tsang [91] literature review. | |
-189. C/H2/NonDeC CH2_triplet 300-2500 7.55E-01 3.46 0 7.47 *10.0 0 0 0 4 Tsang [91] literature review. | |
-190. C/H2/NonDeC O_atom_triplet 300-2500 2.39E+04 2.71 0 2.11 *2.0 0 0 0 4 Tsang [91] literature review. | |
-191. C/H2/NonDeC C_rad/H2/O 300-2500 3.02E+01 2.95 0 11.98 *5.0 0 0 0 4 Tsang [91] literature review. | |
-192. C/H2/NonDeC Cd_pri_rad 300-2500 5.10E+02 3.10 0 8.82 *10.0 0 0 0 4 Tsang [91] literature review. | |
-193. C/H2/NonDeC Ct_rad 300-2500 6.05E+11 0 0 0 *3.0 0 0 0 4 Tsang [91] literature review. | |
-194. C/H2/NonDeC CO_pri_rad 300-2500 5.4E+06 1.90 0 17.01 *3.0 0 0 0 4 Tsang [91] literature review. | |
-195. C/H2/NonDeC CO_rad/NonDe 300-2500 2.65E+06 2.00 0 16.24 *3.0 0 0 0 4 Tsang [91] literature review. | |
-196. C/H2/NonDeC O_pri_rad 295-1220 3.95E+06 1.90 0 0.16 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
-197. C/H2/NonDeC O_rad/NonDeC 300-2500 7.25E+10 0 0 4.57 *5.0 0 0 0 4 Tsang [91] literature review. | |
-198. C/H/Cs3 O2b 300-2500 3.97E+13 0 0 43.92 *3.0 0 0 0 4 Tsang [92] literature review. | |
-199. C/H/Cs3 O_atom_triplet 300-2500 1.57E+05 2.50 0 1.11 *2.0 0 0 0 4 Tsang [92] literature review. | |
-200. C/H/Cs3 CH2_triplet 300-2500 1.09E+12 0 0 4.91 *5.0 0 0 0 4 Tsang [92] literature review. | |
-201. C/H/Cs3 Cd_pri_rad 300-2500 9.04E-01 3.46 0 2.60 *5.0 0 0 0 4 Tsang [92] literature review. | |
-202. C/H/Cs3 Ct_rad 300-2500 6.62E+11 0 0 0 *3.0 0 0 0 4 Tsang [92] literature review. | |
-203. C/H/Cs3 CO_pri_rad 300-2500 3.43E+04 2.50 0 13.51 *5.0 0 0 0 4 Tsang [92] literature review. | |
-204. C/H/Cs3 CO_rad/NonDe 300-2500 3.43E+04 2.50 0 13.51 *10.0 0 0 0 4 Tsang [92] literature review. | |
-205. C/H/Cs3 O_pri_rad 298-1150 2.57E+06 1.90 0 1.45 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
-206. C/H/Cs3 O_rad/NonDeC 300-2500 2.29E+10 0 0 2.88 *10.0 0 0 0 4 Tsang [92] literature review. | |
-207. Cd_pri O2b 300-2500 1.792E+13 0 0 60.01 0 0 0 0 4 Hua, Ruscic, and Wang 2005, transition state theory. | |
-//208. Cd_pri CO_birad 300-2500 3.78E+13 0 0 90.62 *5.0 0 0 0 4 Tsang [89] literature review. | |
-209. Cd_pri O_atom_triplet 290-1510 3.78E+06 1.91 0 3.74 0 0 0 0 3 Mahmud et al. [128] Transition state theory | |
-210. Cd_pri C_rad/H2/Cs 300-2500 1.58E+02 3.13 0 18.00 *10.0 0 0 0 4 Tsang [89] literature review. | |
-211. Cd_pri O_pri_rad 650-1500 5.13E+12 0 0 5.94 *3.16 0 0 0 4 Baulch et al. [95] literature review. | |
-212. Cd/H/NonDeC O_atom_triplet 300-2500 6.02E+10 0.70 0 7.63 *3.0 0 0 0 4 Tsang [93] literature review. | |
-//213. Cd/H/NonDeC H_rad 300-2500 2.37E+00 0 0 7.31 *5.0 0 0 0 4 Tsang [93] literature review. | |
-213. Cd/H/NonDeC H_rad 300-2500 4.09e+05 2.5 0 9.79 *4.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
-//214. Cd/H/NonDeC C_methyl 300-2500 3.8E-01 0 0 5.98 *100.0 0 0 0 4 Tsang [93] literature review. | |
-214. Cd/H/NonDeC C_methyl 300-2500 0.842 3.5 0.0 11.66 *6.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
-//215. Cd/H/NonDeC Cd_pri_rad 300-2500 3.8E-01 0 0 4.99 *10.0 0 0 0 4 Tsang [93] literature review. | |
-215. Cd/H/NonDeC Cd_pri_rad 300-2500 0.842 3.5 0.0 9.67 *6.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
-216. Cd/H/NonDeC Ct_rad 300-2500 1.21E+12 0 0 0 *5.0 0 0 0 4 Tsang [93] literature review. | |
-//217. Cd/H/NonDeC O_pri_rad 300-2500 1.11E+06 2.00 0 1.45 0 0 0 0 4 Tsang [93] literature review. | |
-217. Cd/H/NonDeC O_pri_rad 300-2500 1.11E+06 2.00 0 1.45 *2 0.0 0.0 0.0 4 Tsang [93] literature review. | |
-218. Ct_H O2b 300-2500 6.05E+12 0 0 74.52 *10.0 0 0 0 4 Tsang [89] literature review. | |
-//219. Ct_H CO_birad 300-2500 2.41E+14 0 0 107 *10.0 0 0 0 4 Tsang [89] literature review. | |
-220. Ct_H C_rad/H2/Cs 300-2500 1.36E+11 0 0 23.45 *5.0 0 0 0 4 Tsang [89] literature review. | |
-221. Ct_H O_pri_rad 300-2500 7.25E+03 2.68 0 12.04 *10.0 0 0 0 4 Tsang [89] literature review. | |
-222. Cb_H O2b 1200-1700 1.052E+13 0 0 60.01 0 0 0 0 4 Asaba et al. [129]. Data are estimated. | |
-223. Cb_H H_rad 500-800 1.00E+08 1.80 0 16.35 0 0 0 0 4 Mebel et al. [122] RRK(M) extrapolation. | |
-224. Cb_H H_rad 298-1000 5.02E+11 0 0 8.11 0 0 0 0 5 Nicovich et al. [130] | |
-225. Cb_H C_rad/H2/Cs 650-770 1.05E+11 0 0 14.86 *2.0 0 0 1.19 5 Zhang et al. [131] | |
-226. Cb_H O_pri_rad 400-1500 2.72E+07 1.42 0 1.45 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
-227. CO_pri O2b 300-2200 2.34E+07 2.05 0 37.93 0 0 0 0 3 Michael et al. [132] Transition state theory. | |
-228. CO_pri O_atom_triplet 250-2200 2.08E+11 0.57 0 2.76 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
-229. CO_pri CH2_triplet 300-2500 3.02E+09 0 0 0 0 0 0 0 4 Tsang [89] literature review. | |
-230. CO_pri C_methyl 300-2000 3.89E-08 6.10 0 1.97 *1.58 0 0 0 4 Baulch et al. [94] literature review. | |
-231. CO_pri C_rad/H2/Cs 300-2500 2.75E+03 2.81 0 5.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
-232. CO_pri C_rad/H/NonDeC 300-2500 5.40E+10 0 0 6.96 *2.5 0 0 0 4 Tsang [91] literature review. | |
-233. CO_pri C_rad/Cs3 300-2500 1.63E+09 0 0 3.56 *5.0 0 0 0 4 Tsang [92] literature review. | |
-234. CO_pri Cd_pri_rad 300-2500 2.71E+03 2.81 0 5.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
-235. CO_pri CO_rad/NonDe 300-2500 9.05E+10 0 0 12.92 *10.0 0 0 0 4 Tsang [89] literature review. | |
-236. CO_pri O_pri_rad 300-3000 1.72E+09 1.18 0 -0.45 *5.0 0 0 0 4 Baulch et al. [95] literature review. | |
-237. CO_pri O_rad/NonDeC 300-2500 5.10E+10 0 0 2.98 *3.0 0 0 0 4 Tsang [89] literature review. | |
-238. CO_pri O_rad/NonDeO 641-1600 2.06E+04 2.50 0 10.21 0 0 0 0 4 Eiteneer et al. [133] literature review. | |
-239. CO/H/NonDe O2b 600-1100 3.01E+13 0 0 39.15 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
-240. CO/H/NonDe O_atom_triplet 300-2000 5.0E+12 0 0 1.79 *2.0 0 0 0 4 Warnatz [134] literature review | |
-241. CO/H/NonDe H_rad 300-2000 4.0E+13 0 0 4.21 *2.0 0 0 0 4 Warnatz [134] literature review | |
-242. CO/H/NonDe C_methyl 300-1250 1.99E-06 5.64 0 2.46 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
-243. CO/H/NonDe C_rad/H2/Cd 790-810 3.8E+11 0 0 7.21 0 0 0 0 5 Loser et al. [135] bond strength-bond length method. | |
-244. CO/H/NonDe Cd_pri_rad 480-520 8.13E+10 0 0 3.68 0 0 0 0 5 Scherzer et al. [136] bond energy-bond order method. | |
-//245. CO/H/NonDe O_pri_rad 295-600 2.0E+06 1.80 0 1.30 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
-245. CO/H/NonDe O_pri_rad 295-600 2.0E+06 1.80 0 -1.30 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
-246. CO/H/NonDe O_pri_rad 300-2000 1.0E+13 0 0 0 *2.51 0 0 0 4 Warnatz [134] literature review | |
-247. CO/H/NonDe O_rad/NonDeO 900-1200 3.01E+12 0 0 11.92 *5.0 0 0 0 4 Baulch et al. [95] literature review. | |
-248. O_pri O2b 300-1000 2.325E+12 0 0 74.12 0 0 0 0 5 Mayer et al. [137] Bond energy-bond order. | |
-249. O_pri O_atom_triplet 298-1000 2.63E+09 1.20 0 17.83 0 0 0 0 3 Karach et al. [138] Transition state theory. | |
-250. O_pri O_atom_triplet 300-2000 7.40E+04 2.60 0 15.18 0 0 0 0 3 Harding et al. [139] Transition state theory. | |
-251. O_pri H_rad 300-2500 2.26E+08 1.60 0 19.32 *1.6 0 0 0 4 Baulch et al. [95] literature review. | |
-252. O_pri C_methyl 300-1500 3.20E+00 3.31 0 12.56 0 0 0 0 3 Ma et al. [140] Transition state theory. | |
-253. O_pri C_methyl 300-2500 2.42E+02 2.90 0 14.86 *1.6 0 0 0 4 Tsang [89] literature review. | |
-254. O_pri C_rad/H2/Cs 300-2500 1.70E+06 1.44 0 20.27 *2.0 0 0 0 4 Tsang [89] literature review. | |
-255. O_pri Cd_pri_rad 300-2500 2.42E+02 2.90 0 14.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
-256. O_pri CO_pri_rad 300-2500 1.18E+08 1.35 0 26.03 *5.0 0 0 0 4 Tsang [89] literature review. | |
-//257. O_pri O_pri_rad 200-700 6.45E-06 5.01 0 0.61 0 0 0 0 3 Masgrau et al. [141] Transition state theory w/tunneling correction. | |
-257. O_pri O_pri_rad 200-700 2.417E-07 5.48 0 0.274 0.0 0.0 0.0 0.0 3 Masgrau et al. [141] Transition state theory. | |
-258. O_pri O_rad/NonDeC 300-2000 1.74E-01 3.80 0 11.49 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-259. O/H/NonDeC O_atom_triplet 300-1000 1.0E+13 0 0 4.69 *2.51 0 0 0 4 Warnatz [134] literature review | |
-260. O/H/NonDeC CH2_triplet 300-2500 1.44E+01 3.10 0 6.94 *3.0 0 0 0 4 Tsang [90] literature review. | |
-261. O/H/NonDeC C_methyl 300-2000 3.70E-04 4.70 0 5.78 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-262. O/H/NonDeC C_rad/H2/Cs 300-2500 1.44E+01 3.10 0 8.94 *3.0 0 0 0 4 Tsang [90] literature review. | |
-//263. O/H/NonDeC C_rad/H/NonDeC 300-2500 1.45E+01 3.10 0 10.33 *5.0 0 0 0 4 Tsang [90] literature review. | |
-263. O/H/NonDeC C_rad/H/NonDeC 300-2500 1.45E+01 3.10 0 10.33 *5.0 0 0 0 4 Tsang [91] literature review. | |
-//264. O/H/NonDeC C_rad/Cs3 300-2500 1.51E+03 1.80 0 9.36 *10.0 0 0 0 4 Tsang [90] literature review. | |
-264. O/H/NonDeC C_rad/Cs3 300-2500 1.51E+03 1.80 0 9.36 *10.0 0 0 0 4 Tsang [92] literature review. | |
-265. O/H/NonDeC Cd_pri_rad 300-2500 1.44E+01 3.10 0 6.94 *10.0 0 0 0 4 Tsang [90] literature review. | |
-266. O/H/NonDeC Ct_rad 300-2500 1.21E+12 0 0 0 *5.0 0 0 0 4 Tsang [90] literature review. | |
-267. O/H/NonDeC O_pri_rad 300-2000 1.73E+01 3.40 0 -1.14 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
-268. O/H/NonDeC O_pri_rad 300-2000 1.0E+13 0 0 1.70 *3.16 0 0 0 4 Warnatz [134] literature review | |
-// (Reverse) Rates for nButanol+HO2=H2O2+radicals | |
-301. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h5H,1-4H2 600-2000 2.88E+00 3.16 0.0 0.75 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-302. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h2,5H,3-4H2,1H3 600-2000 6.75E-01 3.42 0.0 1.43 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-303. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h3,5H,2,4H2,1H3 600-2000 3.145E-01 3.52 0.0 1.61 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-304. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h4-5H,2-3H2,1H3 600-2000 1.485E+00 3.39 0.0 1.40 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-// (Reverse) Rates for sButanol+HO2=H2O2+radicals | |
-305. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h4-5H,1,3H2,2H3 600-2000 5.75E+00 2.94 0.0 0.46 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-306. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h3-5H,1-2H3 600-2000 8.75E-01 2.91 0.0 -0.41 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-307. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h5H,3H2,1-2H3 600-2000 1.73E+01 3.05 0.0 1.02 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-308. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h4-5H,2-3H2,1H3 600-2000 3.055E-01 3.53 0.0 1.52 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-// (Reverse) Rates for tButanol+HO2=H2O2+radicals | |
-309. H2O2 InChI=1/C4H9O/c1-4(2,3)5/h5H,1H2,2-3H3 600-2000 2.100E-01 3.53 0.0 1.56 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-310. Cd_pri O2b 300-1500 7.00E+12 0 0 60.36 0 0 0 0 5 Increased rate 154 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
-311. Cd_pri O2b 500-2000 1.005E+13 0 0 61.47 *10.0 0 0 0 4 Increased rate 179 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
-312. Cd/H/NonDeC O2b 300-1500 7.00E+12 0 0 57.81 0 0 0 0 5 Increased rate 155 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
-313. Cd/H/NonDeC O2b 300-2500 1.985E+13 0 0 57.29 *10.0 0 0 0 4 Increased rate 188 Ea by 9.6 kcal/mol (vinyl versus methyl)486. Orad_O_H O_rad/NonDeO 300-1500 1.75E+10 0 0 -3.275 0 0 0 0 5 [8] Curran's estimation in reaction type 13, RO2 + HO2 --> RO2H + O2 | |
-486. Orad_O_H O_rad/NonDeO 300-1500 1.75E+10 0 0 -3.275 0 0 0 0 5 [8] Curran's estimation in reaction type 13, RO2 + HO2 --> RO2H + O2 | |
-500. CO_pri InChI=1/C4H7/c1-4(2)3/h1-2H2,3H3 600-2000 3.065e-02 3.95 0.0 12.22 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-501. InChI=1/C3H8/c1-3-2/h3H2,1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 9.11e-07 5.11 0 5.69 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-501R. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C3H7/c1-3-2/h3H,1-2H3 300-2000 2.35e-06 4.84 0 4.27 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-502. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H7/c1-3-2/h3H,1-2H3 300-2000 1.06e-06 5.06 0 4.89 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-503. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 8.39e-06 4.89 0 4.32 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-504. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 1.44e-05 4.52 0 1.46 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-505. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h3-5H,1-2H3 300-2000 4.91e-06 5.07 0 3.66 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-506. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 5.83e-01 3.74 0 1.45 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-507. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 3.36e-05 4.75 0 4.13 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-508. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 1.64e-06 4.98 0 3.18 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-509. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h3-5H,1-2H3 300-2000 3.11e-06 4.97 0 3.64 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-510. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 1.19e-01 3.90 0 1.81 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-511. InChI=1/C2H6/c1-2/h1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 3.21e-06 5.28 0 7.78 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-512. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C2H5/c1-2/h1H2,2H3 300-2000 1.41e-05 4.83 0 4.37 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-513. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C2H5/c1-2/h1H2,2H3 300-2000 4.25e-06 5.01 0 5.01 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-514. InChI=1/C2H6/c1-2/h1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 5.07e-03 4.52 0 2.34 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-515. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C2H3/c1-2/h1H,2H2 300-2000 5.49e+00 3.33 0 0.63 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-516. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/gamma InChI=1/C3H5/c1-3-2/h1H2,2H3 300-2000 3.11e-05 4.87 0 3.50 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-517. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H5/c1-3-2/h1H2,2H3 300-2000 1.28e-02 4.09 0 1.31 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-518. InChI=1/C3H6O/c1-2-3-4/h3H,2H2,1H3/beta InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 1.56e-04 4.31 0 3.39 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-519. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/c 300-2000 4.85e-04 4.37 0 9.66 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-520. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/c 300-2000 1.84e-03 4.02 0 7.92 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-521. InChI=1/C4H8O/c1-4(2)3-5/h3-4H,1-2H3 H_rad 300-2000 2.08e+07 1.84 0 3.03 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-522. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/o 300-2000 7.52e-08 5.77 0 12.04 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
-523. O/H/NonDeC O2b 300-2000 5e+10 0.0 1 0.0 0 0 0 0 1 Estimate [W.H. Green] | |
- | |
-// Added by AJ for autoxidation simulations | |
-487. C/H2/NonDeC O2b 378-433 3.16E+14 0 0 43.30 0 0 0 0 4 ET Denisov, LN Denisova. Int J Chem Kinet 8:123-130, 1975 for BuCH2(CH-H)Me in benzene | |
-//488. C/H3/Cs O_rad/NonDeO 300-1500 8.60E+3 0 0 16.02 0 0 0 0 4 Landolt Bornstein estimates for C16H33O2J + C16H34 | |
-//489. C/H2/NonDeC O_rad/NonDeO 300-1500 8.60E+3 0 0 16.02 0 0 0 0 4 Landolt Bornstein estimates for C16H33O2J + C16H34 | |
- | |
-524. C/H3/Cd O_rad/NonDeO 300-1500 0.57833e-03 4.65 0 9.78 0 0 0 0 5 SSM due to lack of better value ref rate rule 525 | |
-525. InChI=1/C4H8/c1-3-4-2/h3-4H,1-2H3/b4-3+ O_rad/NonDeO 300-1500 0.57833e-03 4.65 0 9.78 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
-526. H2O2 Cd_rad/NonDeC 300-1500 4.375e-01 3.59 0 -4.03 0 0 0 0 5 SSM due to lack of better value ref rate rule 527 | |
-527. H2O2 InChI=1/C4H7/c1-3-4-2/h3H,1-2H3 300-1500 4.375e-01 3.59 0 -4.03 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
-528. C/H2/OneDeC O_rad/NonDeO 300-1500 2.54e-04 4.59 0 7.16 0 0 0 0 5 SSM due to lack of better value ref rate rule 529 | |
-529. InChI=1/C4H8/c1-3-4-2/h3H,1,4H2,2H3 O_rad/NonDeO 300-1500 2.54e-04 4.59 0 7.16 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
-530. H2O2 Cd_pri_rad 300-1500 1.00e+00 3.52 0 -7.48 0 0 0 0 5 SSM due to lack of better value ref rate rule 531 | |
-531. H2O2 InChI=1/C4H7/c1-3-4-2/h1,3H,4H2,2H3 300-1500 1.00e+00 3.52 0 -7.48 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
-532. X_H O2b 300-2000 5e+10 0.0 1 0.0 0 0 0 0 1 Estimate [W.H. Green] | |
- | |
-//Added by AJ for low temperature aromatic oxidation (given rank 1 so that RMG will presumably prefer these rates to others that it makes up) | |
-//Notes: AJ did not find data for ethylbenzene + O2 or ethylbenzene + OH on the NIST Kinetics databasa, so values for toluene (per H) were used instead | |
-533. C/H3/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
-534. C/H2/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
-535. C/H/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
-536. C/H3/Cb O_rad/NonDeO 600-1000 1.32e+11 0.0 0.0 14.08 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene) (changed to per H) | |
-537. C/H2/Cb O_rad/NonDeO 600-1000 1.33e+11 0.0 0.0 11.30 0 0 0 0 1 Baulch et al. literature review (value for HO2 + ethylbenzene) (changed to per H) | |
-538. C/H/Cb O_rad/NonDeO 600-1000 1.33e+11 0.0 0.0 11.30 0 0 0 0 1 Baulch et al. literature review (value for HO2 + ethylbenzene) (changed to per H) | |
-539. C/H3/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
-540. C/H2/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
-541. C/H/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
\ No newline at end of file | |
+// rate library for f01: HAbstraction reaction | |
+// original from rate library.txt, CDW 03/08/01 | |
+// SR and JS rename some nodes according to the tree and dictionary correction, Nov., 20, 2002 | |
+// JS, comment out 10th, change XH in 23 from C/Cd/H3 to C/H3/Cd | |
+// JS, remove CO_birad to form a new family later: CO + RH -> HCO + R. Aug, 26, 2003 | |
+ | |
+// JS, define key word for format of the rate: either Arrhenius or Arrhenius_EP | |
+Arrhenius_EP | |
+ | |
+// Catherina Wijaya thesis, pg 151 -154. | |
+ | |
+//f01_intermolecular_HA | |
+//No. XH Y_rad Temp. A n a E0 DA Dn Da DE0 Rank Comments | |
+0. X_H_or_Xrad_H Y_rad_birad 300-1500 1E+05 0 0 10 0 0 0 0 0 Default | |
+1. X_H Y_rad_birad 300-1500 1E+05 0 0 10 0 0 0 0 0 Default | |
+2. X_H H_rad 300-1500 2.4E+08 1.5 0.65 9.4 0 0 0 0 5 Dean, A. M. [118] | |
+3. X_H O_atom_triplet 300-1500 1.7E+08 1.5 0.75 6.6 0 0 0 0 5 Dean, A. M. [118] | |
+4. X_H O_pri_rad 300-1500 1.2E+06 2.0 0.50 10.1 0 0 0 0 5 Dean, A. M. [118] | |
+5. X_H O_sec_rad 300-1500 1.4E+04 2.69 0.60 11.3 0 0 0 0 5 Dean, A. M. [118] | |
+6. X_H C_methyl 300-1500 8.1E+05 1.87 0.65 13.0 0 0 0 0 5 Dean, A. M. [118] | |
+7. C/H/Cs3 C_rad/Cs3 300-1500 1.30E-01 3.71 0 6.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+8. C/H2/NonDeC C_rad/Cs3 300-1500 1.26E+00 3.55 0 8.31 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+9. C/H3/Cs C_rad/Cs3 300-1500 2.85E+00 3.62 0 11.20 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+10. C/H/Cs3 C_rad/H/NonDeC 300-1500 5.58E+01 3.01 0 7.34 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+11. C/H2/NonDeC C_rad/H/NonDeC 300-1500 1.52E+01 3.19 0 10.31 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+12. C/H3/Cs C_rad/H/NonDeC 300-1500 4.71E+01 3.23 0 12.27 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+13. C/H/Cs3 C_rad/H2/Cs 300-1500 4.22E+03 2.51 0 8.06 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+14. C/H2/NonDeC C_rad/H2/Cs 300-1500 1.54E+03 2.66 0 10.10 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+15. C/H3/Cs C_rad/H2/Cs 300-1500 6.59E+02 2.71 0 12.92 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+16. C/H/Cs3 C_methyl 300-1500 5.74E+05 1.83 0 6.94 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+17. C/H2/NonDeC C_methyl 300-1500 1.45E+06 1.77 0 8.53 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+18. C/H3/Cs C_methyl 300-1500 2.78E+05 1.9 0 11.05 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+19. C_methane C_methyl 300-1500 1.01E+04 2.47 0 13.96 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+20. C/H/Cs3 H_rad 300-1500 4.83E+08 1.54 0 2.98 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+21. C/H2/NonDeC H_rad 300-1500 1.30E+08 1.69 0 4.78 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+22. C/H3/Cs H_rad 300-1500 6.28E+07 1.75 0 7.51 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+23. C_methane H_rad 300-1500 3.06E+07 1.87 0 10.59 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+24. O/H/NonDeC H_rad 300-1500 8.70E+08 1.39 0 10.07 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+25. CO_pri H_rad 300-1500 5.48E+07 1.82 0 2.44 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+26. CO/H/NonDe H_rad 300-1500 8.07E+07 1.76 0 0.67 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+27. Cd_pri H_rad 300-1500 2.53E+07 1.98 0 11.78 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary vinylic {Cd/H2} | |
+28. Cd_pri H_rad 300-1500 4.53E+03 2.43 0 8.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Ketene hydrogen {CCO/H2} | |
+29. Cd_pri H_rad 300-1500 1.46E+07 2.09 0 5.49 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Allene hydrogen {Cd/H2/Ca} | |
+30. Cd/H/NonDeC H_rad 300-1500 2.98E+07 1.95 0 8.65 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+31. C/H3/Cd H_rad 300-1500 4.33E+05 2.38 0 2.80 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+32. C/H2/OneDeC H_rad 300-1500 6.99E+05 2.36 0 1.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary allylic hydrogen {C/Cd/C/H2} | |
+33. C/H2/OneDeC H_rad 300-1500 7.79E+07 1.78 0 2.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Primary propergylic {C/Ct/C/H2} | |
+34. C/H/Cs2 H_rad 300-1500 3.02E+06 2.16 0 -0.45 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Secondary allylic hydrogen {C/Cd/C2/H} | |
+35. C/H/Cs2 H_rad 300-1500 1.21E+08 1.72 0 -0.73 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Secondary propergylic {C/Ct/C2/H} | |
+36. C/H2/TwoDe H_rad 300-1500 7.09E+03 2.85 0 -1.90 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+37. Cd/H/OneDe H_rad 300-1500 1.93E+08 1.74 0 10.28 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Dienylic {Cd/Cd/H} | |
+38. Cd/H/OneDe H_rad 300-1500 2.18E+06 2.4 0 6.11 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Eneynic {Cd/Ct/H} | |
+39. Ct_H H_rad 300-1500 1.65E+08 1.85 0 26.52 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+40. C/H3/Ct H_rad 300-1500 2.70E+07 1.91 0 5.99 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+41. Cd/H/NonDeO H_rad 300-1500 9.67E+09 1.23 0 11.69 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+42. O/H/OneDe H_rad 300-1500 1.30E+11 0.82 0 7.75 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+43. Cd_pri C_methyl 300-1500 3.24E+03 2.58 0 14.04 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+44. C/H3/Cd C_methyl 300-1500 8.04E+01 2.92 0 7.16 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+45. O/H/NonDeC C_methyl 300-1500 2.54E+05 1.89 0 8.97 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+46. CO/H/NonDe C_methyl 300-1500 2.92E+04 2.29 0 5.44 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+47. O/H/OneDe C_methyl 300-1500 9.07E+04 2.04 0 10.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Olefinic alcohol {O/Cd/H} | |
+48. O/H/OneDe H_rad 300-1500 3.30E+08 1.56 0 13.94 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. Acid O-H {O/CO/H} | |
+49. CO/H/NonDe C_methyl 300-1500 4.53E+03 2.43 0 8.85 0 0 0 0 2 Sumathy CBS-Q calculations. Rate expression per H atom. | |
+50. C_methane C_methyl 300-1500 6.03E+13 0 0 19.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+51. C/H3/Cs C_methyl 300-1500 2.80E+14 0 0 16.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+52. C/H3/Cs C_methyl 300-1500 6.15E+13 0 0 15.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+53. C/H3/Cs C_methyl 300-1500 7.71E+12 0 0 13.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+54. C/H2/NonDeC C_methyl 300-1500 5.02E+13 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+55. C/H/Cs3 C_methyl 300-1500 5.02E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+56. C/H/Cs3 C_methyl 300-1500 4.42E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+57. C/H3/Cd C_methyl 300-1500 2.62E+13 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+58. C/H2/OneDeC C_methyl 300-1500 2.73E+13 0 0 10.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+59. C/H/Cs2 C_methyl 300-1500 2.73E+13 0 0 8.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+60. C/H2/TwoDe C_methyl 300-1500 7.54E+13 0 0 8.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+61. C/H/Cs C_methyl 300-1500 9.32E+12 0 0 7.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+62. C/H3/Cb C_methyl 300-1500 4.90E+12 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+63. C/H2/OneDeC C_methyl 300-1500 1.70E+13 0 0 11.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+64. C/H/Cs2 C_methyl 300-1500 1.17E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+65. C/H3/Ct C_methyl 300-1500 6.60E+13 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+66. C/H2/OneDeC C_methyl 300-1500 2.81E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+67. C/H2/TwoDe C_methyl 300-1500 1.38E+14 0 0 8.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+68. C/H/Cs C_methyl 300-1500 3.43E+13 0 0 7.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+69. C/H/Cs2 C_methyl 300-1500 5.03E+13 0 0 9.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+70. Cd_pri C_methyl 300-1500 1.88E+14 0 0 18.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+71. Cd/H/NonDeC C_methyl 300-1500 4.43E+13 0 0 16.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+72. Cd/H/OneDe C_methyl 300-1500 5.78E+13 0 0 16.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+73. Cd/H/OneDe C_methyl 300-1500 2.26E+13 0 0 15.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+74. Cd/H/OneDe C_methyl 300-1500 4.37E+13 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+75. Ct_H C_methyl 300-1500 3.33E+18 0 0 28.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+76. Cb_H C_methyl 300-1500 1.17E+15 0 0 19.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+77. C/H2/NonDeC C_methyl 300-1500 9.87E+14 0 0 13.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+78. C/H2/NonDeC C_methyl 300-1500 4.51E+12 0 0 12.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+79. C/H/Cs3 C_methyl 300-1500 2.46E+13 0 0 11.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+80. C/H2/OneDeC C_methyl 300-1500 5.98E+13 0 0 9.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+81. C_methane H_rad 300-1500 1.87E+14 0 0 14.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+82. C_methane C_methyl 300-1500 6.03E+13 0 0 19.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+83. C_methane C_rad/H2/Cd 300-1500 1.53E+14 0 0 30.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+84. C_methane Cd_pri_rad 300-1500 1.59E+14 0 0 13.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+85. C_methane C_rad/Cs3 300-1500 1.86E+13 0 0 20.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+86. C/H/Cs3 H_rad 300-1500 5.31E+13 0 0 5.9 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+87. C/H/Cs3 C_methyl 300-1500 5.02E+13 0 0 11.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+88. C/H/Cs3 C_rad/H2/Cd 300-1500 5.02E+13 0 0 20.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+89. C/H/Cs3 Cd_pri_rad 300-1500 8.95E+13 0 0 6.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+90. C/H/Cs3 C_rad/Cs3 300-1500 5.43E+11 0 0 11.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+91. C/H/Cs3 C_rad/H2/Cs 300-1500 3.03E+12 0 0 12.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+92. C/H/Cs3 C_rad/H/NonDeC 300-1500 2.44E+12 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+93. C/H/Cs3 C_rad/H/OneDeC 300-1500 5.46E+12 0 0 21.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+94. C/H/Cs3 C_rad/Cs2 300-1500 1.10E+12 0 0 21.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+95. C/H/Cs3 Cd_rad/NonDeC 300-1500 1.02E+11 0 0 5.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+96. C/H/Cs3 Cd_rad/OneDe 300-1500 4.16E+12 0 0 13.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+97. C/H/Cs3 C_rad/H2/Ct 300-1500 3.14E+13 0 0 17.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+98. C/H/Cs3 C_rad/H/OneDeC 300-1500 2.53E+12 0 0 18.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+99. C/H/Cs3 C_rad/Cs2 300-1500 9.78E+11 0 0 18.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+100. Cd_pri H_rad 300-1500 3.39E+14 0 0 15.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+101. Cd_pri C_methyl 300-1500 1.88E+14 0 0 18.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+102. Cd_pri C_rad/H2/Cd 300-1500 5.36E+13 0 0 30.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+103. Cd_pri Cd_pri_rad 300-1500 1.47E+13 0 0 13.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+104. Cd_pri C_rad/Cs3 300-1500 3.93E+13 0 0 20.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+105. Cd_pri C_rad/H2/Cs 300-1500 7.82E+12 0 0 19.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+106. Cd_pri C_rad/H/NonDeC 300-1500 3.25E+12 0 0 20.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+107. Cd_pri C_rad/H/OneDeC 300-1500 1.51E+13 0 0 31.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+108. Cd_pri C_rad/Cs2 300-1500 3.39E+12 0 0 38.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+109. Cd_pri Cd_rad/NonDeC 300-1500 6.04E+13 0 0 14.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+110. Cd_pri Cd_rad/OneDe 300-1500 1.30E+13 0 0 20.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+111. Cd_pri C_rad/H2/Ct 300-1500 2.55E+13 0 0 26.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+112. Cd_pri C_rad/H/OneDeC 300-1500 4.41E+12 0 0 28.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+113. Cd_pri C_rad/Cs2 300-1500 3.59E+12 0 0 35.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+114. C/H3/Cd H_rad 300-1500 3.13E+13 0 0 7.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+115. C/H3/Cd C_methyl 300-1500 2.62E+13 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+116. C/H3/Cd C_rad/H2/Cd 300-1500 5.78E+12 0 0 21.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+117. C/H3/Cd Cd_pri_rad 300-1500 7.73E+12 0 0 7.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+118. C/H3/Cd C_rad/Cs3 300-1500 3.18E+12 0 0 11.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+119. C/H3/Cd C_rad/H2/Cs 300-1500 5.60E+11 0 0 12.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+120. C/H3/Cd C_rad/H/NonDeC 300-1500 2.87E+11 0 0 12.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+121. C/H3/Cd C_rad/H/OneDeC 300-1500 1.52E+12 0 0 21.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+122. C/H3/Cd C_rad/Cs2 300-1500 4.13E+11 0 0 21.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+123. C/H3/Cd Cd_rad/NonDeC 300-1500 5.52E+12 0 0 7.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+124. C/H3/Cd Cd_rad/OneDe 300-1500 1.95E+12 0 0 14.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+125. C/H3/Cd C_rad/H2/Ct 300-1500 7.58E+12 0 0 18.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+126. C/H3/Cd C_rad/H/OneDeC 300-1500 5.09E+11 0 0 18.5 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+127. C/H3/Cd C_rad/Cs2 300-1500 3.32E+11 0 0 18.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+128. H2 H_rad 300-1500 2.37E+13 0 0 9.4 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+129. H2 C_methyl 300-1500 2.95E+12 0 0 14.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+130. H2 C_rad/H2/Cd 300-1500 2.87E+12 0 0 25.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+131. H2 Cd_pri_rad 300-1500 4.49E+12 0 0 10.3 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+132. H2 C_rad/Cs3 300-1500 3.08E+11 0 0 14.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+133. H2 C_rad/H2/Cs 300-1500 4.57E+11 0 0 14.8 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+134. H2 C_rad/H/NonDeC 300-1500 3.04E+11 0 0 15.1 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+135. H2 C_rad/H/OneDeC 300-1500 1.82E+12 0 0 27.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+136. H2 C_rad/Cs2 300-1500 4.30E+11 0 0 27.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+137. H2 Cd_rad/NonDeC 300-1500 3.01E+12 0 0 10.6 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+138. H2 Cd_rad/OneDe 300-1500 2.37E+12 0 0 18.2 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+139. H2 C_rad/H2/Ct 300-1500 2.91E+12 0 0 23.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+140. H2 C_rad/H/OneDeC 300-1500 5.34E+11 0 0 24.0 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+141. H2 C_rad/Cs2 300-1500 4.20E+11 0 0 24.7 0 0 0 0 3 Mark Saeys, CBS-QB3 calculations, without hindered rotor treatment. Rate expression per H atom. | |
+142. C/H3/Cs O_pri_rad 300-1500 5.93E+06 1.80 0 1.431 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. Fixed by RWest (changed to per H) | |
+//142. C/H3/Cs O_pri_rad 300-1500 2.92E+06 1.80 0 0.278 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+143. C/H2/NonDeC O_pri_rad 300-1500 4.50E+05 2.00 0 -1.133 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+144. C/H/Cs3 O_pri_rad 300-1500 1.70E+06 1.90 0 -1.451 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
+145. C/H3/Cs O_atom_triplet 300-1500 9.50E+02 3.05 0 3.123 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+146. C/H2/NonDeC O_atom_triplet 300-1500 2.39E+04 2.71 0 2.106 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+147. C/H/Cs3 O_atom_triplet 300-1500 3.83E+05 2.41 0 1.140 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
+148. C/H3/Cs O_rad/NonDeO 300-1500 2.80E+12 0 0 20.435 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+149. C/H2/NonDeC O_rad/NonDeO 300-1500 2.80E+12 0 0 17.686 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+150. C/H/Cs3 O_rad/NonDeO 300-1500 2.80E+12 0 0 16.013 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
+151. C/H3/Cs O_rad/NonDeC 300-1500 5.27E+10 0 0 7.000 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+152. C/H2/NonDeC O_rad/NonDeC 300-1500 5.50E+10 0 0 5.000 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+153. C/H/Cs3 O_rad/NonDeC 300-1500 1.90E+10 0 0 2.800 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
+154. C/H3/Cs O2b 300-1500 7.00E+12 0 0 50.76 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+155. C/H2/NonDeC O2b 300-1500 7.00E+12 0 0 48.21 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. (changed to per H) | |
+156. C/H/Cs3 O2b 300-1500 7.00E+12 0 0 46.06 0 0 0 0 5 Curran et al. [8] Rate expressions for H atom abstraction from fuels. | |
+157. H2 O2b 300-800 7.25E+13 0 0 56.64 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+158. H2 Cd_pri_rad 200-3000 4.73E+03 2.56 0 5.03 0 0 0 0 3 Knyazev et al. [119] Transition state theory. | |
+159. H2 Cd_pri_rad 300-3500 1.11E+04 2.48 0 7.13 0 0 0 0 3 Mebel et al. [120] Transition state theory. | |
+160. H2 Cd_pri_rad 300-1500 1.58E+09 0.70 0 5.11 0 0 0 0 3 Weissman et al. [121] Transition state theory. | |
+161. H2 Ct_rad 300-2500 5.4E+12 0 0 2.17 *3.16 0 0 0 4 Baulch et al. [94] literature review. | |
+162. H2 Cb_rad 300-5000 2.86E+04 2.43 0 6.28 0 0 0 0 3 Mebel et al. [122] Transition state theory. | |
+163. H2 CO_pri_rad 300-2500 9.0E+05 2.00 0 17.83 *5 0 0 0 4 Tsang et al. [89] literature review. | |
+164. H2 CO_rad/NonDe 300-2500 2.06E+06 1.82 0 17.61 *3.0 0 0 0 4 Tsang et al. [89] literature review. | |
+165. H2 O_pri_rad 200-2400 9.10E+08 1.21 0 4.71 0 0 0 0 3 Isaacson [123] Transition state theory. | |
+166. H2 O_rad/NonDeC 300-2000 6.32E-02 4.00 0 4.91 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+167. C_methane O2b 500-2000 9.925E+12 0 0 56.83 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
+168. C_methane C_rad/H2/Cs 300-2500 2.16E-02 4.14 0 12.56 *2.0 0 0 0 4 Tsang et al. [89] literature review. | |
+169. C_methane C_rad/H/NonDeC 300-2500 1.81E-04 4.40 0 10.79 *2.0 0 0 0 4 Tsang et al. [91] literature review. | |
+170. C_methane Ct_rad 300-2500 4.53E+11 0 0 0.50 *10.0 0 0 0 4 Tsang et al. [89] literature review. | |
+171. C_methane Cb_rad 560-1410 5.0E+11 0 0 8.60 0 0 0 0 2 Heckmann et al. [124] | |
+172. C_methane CO_pri_rad 300-2500 1.82E+03 2.85 0 22.46 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+173. C_methane CO_rad/NonDe 300-2500 5.43E+02 2.88 0 21.46 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+174. C_methane O_pri_rad 223-2400 3.85E-01 3.95 0 0.55 0 0 0 0 3 Melissas and Truhlar [125] Transition state theory. | |
+175. C_methane O_pri_rad 240-2500 3.93E+06 1.83 0 2.78 *1.41 0 0 0 4 Baulch et al. [95] literature review. | |
+176. C_methane O_pri_rad 298-1510 2.55E+07 1.60 0 3.12 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
+177. C_methane O_rad/NonDeC 300-2000 1.55E-04 5.00 0 5.58 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+178. C_methane O_rad/NonDeO 300-2500 4.53E+10 0 0 18.58 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+179. C/H3/Cs O2b 500-2000 1.005E+13 0 0 51.87 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
+180. C/H3/Cs Ct_rad 300-1500 6.02E+11 0 0 0 *3 0 0 0 4 Tsang et al. [89] literature review. | |
+181. C/H3/Cs Cb_rad 565-1000 3.48E+10 0 0 4.44 *2.35 0 0 0.18 2 Park et al. [126] | |
+182. C/H3/Cs CO_pri_rad 300-2500 7.82E+03 2.72 0 18.24 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+183. C/H3/Cs CO_rad/NonDe 300-2500 3.02E+03 2.75 0 17.53 *5.0 0 0 0 4 Tsang et al. [89] literature review. | |
+184. C/H3/Cs O_pri_rad 250-2000 1.20E+06 2.00 0 0.86 *1.41 0 0 0 4 Baulch et al. [95] literature review. | |
+185. C/H3/CO O_pri_rad 295-600 5.17E+05 2.20 0 1.00 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
+186. C/H3/O C_methyl 300-2000 2.05E-04 4.90 0 6.72 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+187. C/H3/O O_pri_rad 300-2000 8.14E+03 2.80 0 -0.42 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+100_R2 C/H3/O H_rad 300-2000 4.51E+02 3.20 0 3.49 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. added by Greg Magoon 08/25/09 | |
+188. C/H2/NonDeC O2b 300-2500 1.985E+13 0 0 47.69 *10.0 0 0 0 4 Tsang [91] literature review. | |
+189. C/H2/NonDeC CH2_triplet 300-2500 7.55E-01 3.46 0 7.47 *10.0 0 0 0 4 Tsang [91] literature review. | |
+190. C/H2/NonDeC O_atom_triplet 300-2500 2.39E+04 2.71 0 2.11 *2.0 0 0 0 4 Tsang [91] literature review. | |
+191. C/H2/NonDeC C_rad/H2/O 300-2500 3.02E+01 2.95 0 11.98 *5.0 0 0 0 4 Tsang [91] literature review. | |
+192. C/H2/NonDeC Cd_pri_rad 300-2500 5.10E+02 3.10 0 8.82 *10.0 0 0 0 4 Tsang [91] literature review. | |
+193. C/H2/NonDeC Ct_rad 300-2500 6.05E+11 0 0 0 *3.0 0 0 0 4 Tsang [91] literature review. | |
+194. C/H2/NonDeC CO_pri_rad 300-2500 5.4E+06 1.90 0 17.01 *3.0 0 0 0 4 Tsang [91] literature review. | |
+195. C/H2/NonDeC CO_rad/NonDe 300-2500 2.65E+06 2.00 0 16.24 *3.0 0 0 0 4 Tsang [91] literature review. | |
+196. C/H2/NonDeC O_pri_rad 295-1220 3.95E+06 1.90 0 0.16 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
+197. C/H2/NonDeC O_rad/NonDeC 300-2500 7.25E+10 0 0 4.57 *5.0 0 0 0 4 Tsang [91] literature review. | |
+198. C/H/Cs3 O2b 300-2500 3.97E+13 0 0 43.92 *3.0 0 0 0 4 Tsang [92] literature review. | |
+199. C/H/Cs3 O_atom_triplet 300-2500 1.57E+05 2.50 0 1.11 *2.0 0 0 0 4 Tsang [92] literature review. | |
+200. C/H/Cs3 CH2_triplet 300-2500 1.09E+12 0 0 4.91 *5.0 0 0 0 4 Tsang [92] literature review. | |
+201. C/H/Cs3 Cd_pri_rad 300-2500 9.04E-01 3.46 0 2.60 *5.0 0 0 0 4 Tsang [92] literature review. | |
+202. C/H/Cs3 Ct_rad 300-2500 6.62E+11 0 0 0 *3.0 0 0 0 4 Tsang [92] literature review. | |
+203. C/H/Cs3 CO_pri_rad 300-2500 3.43E+04 2.50 0 13.51 *5.0 0 0 0 4 Tsang [92] literature review. | |
+204. C/H/Cs3 CO_rad/NonDe 300-2500 3.43E+04 2.50 0 13.51 *10.0 0 0 0 4 Tsang [92] literature review. | |
+205. C/H/Cs3 O_pri_rad 298-1150 2.57E+06 1.90 0 1.45 0 0 0 0 3 Cohen et al. [101] Transition state theory. | |
+206. C/H/Cs3 O_rad/NonDeC 300-2500 2.29E+10 0 0 2.88 *10.0 0 0 0 4 Tsang [92] literature review. | |
+207. Cd_pri O2b 300-2500 1.792E+13 0 0 60.01 0 0 0 0 4 Hua, Ruscic, and Wang 2005, transition state theory. | |
+//208. Cd_pri CO_birad 300-2500 3.78E+13 0 0 90.62 *5.0 0 0 0 4 Tsang [89] literature review. | |
+209. Cd_pri O_atom_triplet 290-1510 3.78E+06 1.91 0 3.74 0 0 0 0 3 Mahmud et al. [128] Transition state theory | |
+210. Cd_pri C_rad/H2/Cs 300-2500 1.58E+02 3.13 0 18.00 *10.0 0 0 0 4 Tsang [89] literature review. | |
+211. Cd_pri O_pri_rad 650-1500 5.13E+12 0 0 5.94 *3.16 0 0 0 4 Baulch et al. [95] literature review. | |
+212. Cd/H/NonDeC O_atom_triplet 300-2500 6.02E+10 0.70 0 7.63 *3.0 0 0 0 4 Tsang [93] literature review. | |
+//213. Cd/H/NonDeC H_rad 300-2500 2.37E+00 0 0 7.31 *5.0 0 0 0 4 Tsang [93] literature review. | |
+213. Cd/H/NonDeC H_rad 300-2500 4.09e+05 2.5 0 9.79 *4.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
+//214. Cd/H/NonDeC C_methyl 300-2500 3.8E-01 0 0 5.98 *100.0 0 0 0 4 Tsang [93] literature review. | |
+214. Cd/H/NonDeC C_methyl 300-2500 0.842 3.5 0.0 11.66 *6.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
+//215. Cd/H/NonDeC Cd_pri_rad 300-2500 3.8E-01 0 0 4.99 *10.0 0 0 0 4 Tsang [93] literature review. | |
+215. Cd/H/NonDeC Cd_pri_rad 300-2500 0.842 3.5 0.0 9.67 *6.0 0.0 0.0 0.0 4 Tsang [93] literature review. | |
+216. Cd/H/NonDeC Ct_rad 300-2500 1.21E+12 0 0 0 *5.0 0 0 0 4 Tsang [93] literature review. | |
+//217. Cd/H/NonDeC O_pri_rad 300-2500 1.11E+06 2.00 0 1.45 0 0 0 0 4 Tsang [93] literature review. | |
+217. Cd/H/NonDeC O_pri_rad 300-2500 1.11E+06 2.00 0 1.45 *2 0.0 0.0 0.0 4 Tsang [93] literature review. | |
+218. Ct_H O2b 300-2500 6.05E+12 0 0 74.52 *10.0 0 0 0 4 Tsang [89] literature review. | |
+//219. Ct_H CO_birad 300-2500 2.41E+14 0 0 107 *10.0 0 0 0 4 Tsang [89] literature review. | |
+220. Ct_H C_rad/H2/Cs 300-2500 1.36E+11 0 0 23.45 *5.0 0 0 0 4 Tsang [89] literature review. | |
+221. Ct_H O_pri_rad 300-2500 7.25E+03 2.68 0 12.04 *10.0 0 0 0 4 Tsang [89] literature review. | |
+222. Cb_H O2b 1200-1700 1.052E+13 0 0 60.01 0 0 0 0 4 Asaba et al. [129]. Data are estimated. | |
+223. Cb_H H_rad 500-800 1.00E+08 1.80 0 16.35 0 0 0 0 4 Mebel et al. [122] RRK(M) extrapolation. | |
+224. Cb_H H_rad 298-1000 5.02E+11 0 0 8.11 0 0 0 0 5 Nicovich et al. [130] | |
+225. Cb_H C_rad/H2/Cs 650-770 1.05E+11 0 0 14.86 *2.0 0 0 1.19 5 Zhang et al. [131] | |
+226. Cb_H O_pri_rad 400-1500 2.72E+07 1.42 0 1.45 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
+227. CO_pri O2b 300-2200 2.34E+07 2.05 0 37.93 0 0 0 0 3 Michael et al. [132] Transition state theory. | |
+228. CO_pri O_atom_triplet 250-2200 2.08E+11 0.57 0 2.76 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
+229. CO_pri CH2_triplet 300-2500 3.02E+09 0 0 0 0 0 0 0 4 Tsang [89] literature review. | |
+230. CO_pri C_methyl 300-2000 3.89E-08 6.10 0 1.97 *1.58 0 0 0 4 Baulch et al. [94] literature review. | |
+231. CO_pri C_rad/H2/Cs 300-2500 2.75E+03 2.81 0 5.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
+232. CO_pri C_rad/H/NonDeC 300-2500 5.40E+10 0 0 6.96 *2.5 0 0 0 4 Tsang [91] literature review. | |
+233. CO_pri C_rad/Cs3 300-2500 1.63E+09 0 0 3.56 *5.0 0 0 0 4 Tsang [92] literature review. | |
+234. CO_pri Cd_pri_rad 300-2500 2.71E+03 2.81 0 5.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
+235. CO_pri CO_rad/NonDe 300-2500 9.05E+10 0 0 12.92 *10.0 0 0 0 4 Tsang [89] literature review. | |
+236. CO_pri O_pri_rad 300-3000 1.72E+09 1.18 0 -0.45 *5.0 0 0 0 4 Baulch et al. [95] literature review. | |
+237. CO_pri O_rad/NonDeC 300-2500 5.10E+10 0 0 2.98 *3.0 0 0 0 4 Tsang [89] literature review. | |
+238. CO_pri O_rad/NonDeO 641-1600 2.06E+04 2.50 0 10.21 0 0 0 0 4 Eiteneer et al. [133] literature review. | |
+239. CO/H/NonDe O2b 600-1100 3.01E+13 0 0 39.15 *10.0 0 0 0 4 Baulch et al. [95] literature review. | |
+240. CO/H/NonDe O_atom_triplet 300-2000 5.0E+12 0 0 1.79 *2.0 0 0 0 4 Warnatz [134] literature review | |
+241. CO/H/NonDe H_rad 300-2000 4.0E+13 0 0 4.21 *2.0 0 0 0 4 Warnatz [134] literature review | |
+242. CO/H/NonDe C_methyl 300-1250 1.99E-06 5.64 0 2.46 *2.0 0 0 0 4 Baulch et al. [95] literature review. | |
+243. CO/H/NonDe C_rad/H2/Cd 790-810 3.8E+11 0 0 7.21 0 0 0 0 5 Loser et al. [135] bond strength-bond length method. | |
+244. CO/H/NonDe Cd_pri_rad 480-520 8.13E+10 0 0 3.68 0 0 0 0 5 Scherzer et al. [136] bond energy-bond order method. | |
+//245. CO/H/NonDe O_pri_rad 295-600 2.0E+06 1.80 0 1.30 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
+245. CO/H/NonDe O_pri_rad 295-600 2.0E+06 1.80 0 -1.30 0 0 0 0 3 Taylor et al. [127] Transition state theory. | |
+246. CO/H/NonDe O_pri_rad 300-2000 1.0E+13 0 0 0 *2.51 0 0 0 4 Warnatz [134] literature review | |
+247. CO/H/NonDe O_rad/NonDeO 900-1200 3.01E+12 0 0 11.92 *5.0 0 0 0 4 Baulch et al. [95] literature review. | |
+248. O_pri O2b 300-1000 2.325E+12 0 0 74.12 0 0 0 0 5 Mayer et al. [137] Bond energy-bond order. | |
+249. O_pri O_atom_triplet 298-1000 2.63E+09 1.20 0 17.83 0 0 0 0 3 Karach et al. [138] Transition state theory. | |
+250. O_pri O_atom_triplet 300-2000 7.40E+04 2.60 0 15.18 0 0 0 0 3 Harding et al. [139] Transition state theory. | |
+251. O_pri H_rad 300-2500 2.26E+08 1.60 0 19.32 *1.6 0 0 0 4 Baulch et al. [95] literature review. | |
+252. O_pri C_methyl 300-1500 3.20E+00 3.31 0 12.56 0 0 0 0 3 Ma et al. [140] Transition state theory. | |
+253. O_pri C_methyl 300-2500 2.42E+02 2.90 0 14.86 *1.6 0 0 0 4 Tsang [89] literature review. | |
+254. O_pri C_rad/H2/Cs 300-2500 1.70E+06 1.44 0 20.27 *2.0 0 0 0 4 Tsang [89] literature review. | |
+255. O_pri Cd_pri_rad 300-2500 2.42E+02 2.90 0 14.86 *5.0 0 0 0 4 Tsang [89] literature review. | |
+256. O_pri CO_pri_rad 300-2500 1.18E+08 1.35 0 26.03 *5.0 0 0 0 4 Tsang [89] literature review. | |
+//257. O_pri O_pri_rad 200-700 6.45E-06 5.01 0 0.61 0 0 0 0 3 Masgrau et al. [141] Transition state theory w/tunneling correction. | |
+257. O_pri O_pri_rad 200-700 2.417E-07 5.48 0 0.274 0.0 0.0 0.0 0.0 3 Masgrau et al. [141] Transition state theory. | |
+258. O_pri O_rad/NonDeC 300-2000 1.74E-01 3.80 0 11.49 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+259. O/H/NonDeC O_atom_triplet 300-1000 1.0E+13 0 0 4.69 *2.51 0 0 0 4 Warnatz [134] literature review | |
+260. O/H/NonDeC CH2_triplet 300-2500 1.44E+01 3.10 0 6.94 *3.0 0 0 0 4 Tsang [90] literature review. | |
+261. O/H/NonDeC C_methyl 300-2000 3.70E-04 4.70 0 5.78 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+262. O/H/NonDeC C_rad/H2/Cs 300-2500 1.44E+01 3.10 0 8.94 *3.0 0 0 0 4 Tsang [90] literature review. | |
+//263. O/H/NonDeC C_rad/H/NonDeC 300-2500 1.45E+01 3.10 0 10.33 *5.0 0 0 0 4 Tsang [90] literature review. | |
+263. O/H/NonDeC C_rad/H/NonDeC 300-2500 1.45E+01 3.10 0 10.33 *5.0 0 0 0 4 Tsang [91] literature review. | |
+//264. O/H/NonDeC C_rad/Cs3 300-2500 1.51E+03 1.80 0 9.36 *10.0 0 0 0 4 Tsang [90] literature review. | |
+264. O/H/NonDeC C_rad/Cs3 300-2500 1.51E+03 1.80 0 9.36 *10.0 0 0 0 4 Tsang [92] literature review. | |
+265. O/H/NonDeC Cd_pri_rad 300-2500 1.44E+01 3.10 0 6.94 *10.0 0 0 0 4 Tsang [90] literature review. | |
+266. O/H/NonDeC Ct_rad 300-2500 1.21E+12 0 0 0 *5.0 0 0 0 4 Tsang [90] literature review. | |
+267. O/H/NonDeC O_pri_rad 300-2000 1.73E+01 3.40 0 -1.14 0 0 0 0 2 Jodkowski et al. [100] ab initio calculations. | |
+268. O/H/NonDeC O_pri_rad 300-2000 1.0E+13 0 0 1.70 *3.16 0 0 0 4 Warnatz [134] literature review | |
+// (Reverse) Rates for nButanol+HO2=H2O2+radicals | |
+301. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h5H,1-4H2 600-2000 2.88E+00 3.16 0.0 0.75 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+302. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h2,5H,3-4H2,1H3 600-2000 6.75E-01 3.42 0.0 1.43 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+303. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h3,5H,2,4H2,1H3 600-2000 3.145E-01 3.52 0.0 1.61 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+304. H2O2 InChI=1/C4H9O/c1-2-3-4-5/h4-5H,2-3H2,1H3 600-2000 1.485E+00 3.39 0.0 1.40 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+// (Reverse) Rates for sButanol+HO2=H2O2+radicals | |
+305. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h4-5H,1,3H2,2H3 600-2000 5.75E+00 2.94 0.0 0.46 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+306. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h3-5H,1-2H3 600-2000 8.75E-01 2.91 0.0 -0.41 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+307. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h5H,3H2,1-2H3 600-2000 1.73E+01 3.05 0.0 1.02 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+308. H2O2 InChI=1/C4H9O/c1-3-4(2)5/h4-5H,2-3H2,1H3 600-2000 3.055E-01 3.53 0.0 1.52 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+// (Reverse) Rates for tButanol+HO2=H2O2+radicals | |
+309. H2O2 InChI=1/C4H9O/c1-4(2,3)5/h5H,1H2,2-3H3 600-2000 2.100E-01 3.53 0.0 1.56 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+310. Cd_pri O2b 300-1500 7.00E+12 0 0 60.36 0 0 0 0 5 Increased rate 154 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
+311. Cd_pri O2b 500-2000 1.005E+13 0 0 61.47 *10.0 0 0 0 4 Increased rate 179 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
+312. Cd/H/NonDeC O2b 300-1500 7.00E+12 0 0 57.81 0 0 0 0 5 Increased rate 155 Ea by 9.6 kcal/mol (vinyl versus methyl) | |
+313. Cd/H/NonDeC O2b 300-2500 1.985E+13 0 0 57.29 *10.0 0 0 0 4 Increased rate 188 Ea by 9.6 kcal/mol (vinyl versus methyl)486. Orad_O_H O_rad/NonDeO 300-1500 1.75E+10 0 0 -3.275 0 0 0 0 5 [8] Curran's estimation in reaction type 13, RO2 + HO2 --> RO2H + O2 | |
+486. Orad_O_H O_rad/NonDeO 300-1500 1.75E+10 0 0 -3.275 0 0 0 0 5 [8] Curran's estimation in reaction type 13, RO2 + HO2 --> RO2H + O2 | |
+500. CO_pri InChI=1/C4H7/c1-4(2)3/h1-2H2,3H3 600-2000 3.065e-02 3.95 0.0 12.22 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+501. InChI=1/C3H8/c1-3-2/h3H2,1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 9.11e-07 5.11 0 5.69 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+501R. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C3H7/c1-3-2/h3H,1-2H3 300-2000 2.35e-06 4.84 0 4.27 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+502. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H7/c1-3-2/h3H,1-2H3 300-2000 1.06e-06 5.06 0 4.89 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+503. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 8.39e-06 4.89 0 4.32 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+504. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 1.44e-05 4.52 0 1.46 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+505. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h3-5H,1-2H3 300-2000 4.91e-06 5.07 0 3.66 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+506. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 5.83e-01 3.74 0 1.45 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+507. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 3.36e-05 4.75 0 4.13 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+508. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h5H,3H2,1-2H3 300-2000 1.64e-06 4.98 0 3.18 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+509. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h3-5H,1-2H3 300-2000 3.11e-06 4.97 0 3.64 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+510. InChI=1/C3H6/c1-3-2/h3H,1H2,2H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 1.19e-01 3.90 0 1.81 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+511. InChI=1/C2H6/c1-2/h1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 3.21e-06 5.28 0 7.78 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+512. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C2H5/c1-2/h1H2,2H3 300-2000 1.41e-05 4.83 0 4.37 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+513. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C2H5/c1-2/h1H2,2H3 300-2000 4.25e-06 5.01 0 5.01 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+514. InChI=1/C2H6/c1-2/h1-2H3 InChI=1/C4H9O/c1-4(2)3-5/h4H,3H2,1-2H3 300-2000 5.07e-03 4.52 0 2.34 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+515. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C2H3/c1-2/h1H,2H2 300-2000 5.49e+00 3.33 0 0.63 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+516. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/gamma InChI=1/C3H5/c1-3-2/h1H2,2H3 300-2000 3.11e-05 4.87 0 3.50 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+517. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H5/c1-3-2/h1H2,2H3 300-2000 1.28e-02 4.09 0 1.31 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+518. InChI=1/C3H6O/c1-2-3-4/h3H,2H2,1H3/beta InChI=1/C4H9O/c1-4(2)3-5/h4-5H,1,3H2,2H3 300-2000 1.56e-04 4.31 0 3.39 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+519. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/beta InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/c 300-2000 4.85e-04 4.37 0 9.66 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+520. InChI=1/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3/alpha InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/c 300-2000 1.84e-03 4.02 0 7.92 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+521. InChI=1/C4H8O/c1-4(2)3-5/h3-4H,1-2H3 H_rad 300-2000 2.08e+07 1.84 0 3.03 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+522. InChI=1/C4H8/c1-4(2)3/h1H2,2-3H3 InChI=1/C3H5O/c1-2-3-4/h2-3H,1H3/o 300-2000 7.52e-08 5.77 0 12.04 0 0 0 0 3 MRH CBS-QB3 calculations w/o HR corrections | |
+523. O/H/NonDeC O2b 300-2000 5e+10 0.0 1 0.0 0 0 0 0 1 Estimate [W.H. Green] | |
+524. C/H3/Cd O_rad/NonDeO 300-1500 0.57833e-03 4.65 0 9.78 0 0 0 0 5 SSM due to lack of better value ref rate rule 525 | |
+525. InChI=1/C4H8/c1-3-4-2/h3-4H,1-2H3/b4-3+ O_rad/NonDeO 300-1500 0.57833e-03 4.65 0 9.78 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
+526. H2O2 Cd_rad/NonDeC 300-1500 4.375e-01 3.59 0 -4.03 0 0 0 0 5 SSM due to lack of better value ref rate rule 527 | |
+527. H2O2 InChI=1/C4H7/c1-3-4-2/h3H,1-2H3 300-1500 4.375e-01 3.59 0 -4.03 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
+528. C/H2/OneDeC O_rad/NonDeO 300-1500 2.54e-04 4.59 0 7.16 0 0 0 0 5 SSM due to lack of better value ref rate rule 529 | |
+529. InChI=1/C4H8/c1-3-4-2/h3H,1,4H2,2H3 O_rad/NonDeO 300-1500 2.54e-04 4.59 0 7.16 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
+530. H2O2 Cd_pri_rad 300-1500 1.00e+00 3.52 0 -7.48 0 0 0 0 5 SSM due to lack of better value ref rate rule 531 | |
+531. H2O2 InChI=1/C4H7/c1-3-4-2/h1,3H,4H2,2H3 300-1500 1.00e+00 3.52 0 -7.48 0 0 0 0 5 SSM CBS-QB3 calculations w/o HR corrections | |
+532. X_H O2b 300-2000 5e+10 0.0 1 0.0 0 0 0 0 1 Estimate [W.H. Green] | |
+// Added by AJ for autoxidation simulations | |
+487. C/H2/NonDeC O2b 378-433 3.16E+14 0 0 43.30 0 0 0 0 4 ET Denisov, LN Denisova. Int J Chem Kinet 8:123-130, 1975 for BuCH2(CH-H)Me in benzene | |
+//488. C/H3/Cs O_rad/NonDeO 300-1500 8.60E+3 0 0 16.02 0 0 0 0 4 Landolt Bornstein estimates for C16H33O2J + C16H34 | |
+//489. C/H2/NonDeC O_rad/NonDeO 300-1500 8.60E+3 0 0 16.02 0 0 0 0 4 Landolt Bornstein estimates for C16H33O2J + C16H34 | |
+//Added by AJ for low temperature aromatic oxidation (given rank 1 so that RMG will presumably prefer these rates to others that it makes up) | |
+//Notes: AJ did not find data for ethylbenzene + O2 or ethylbenzene + OH on the NIST Kinetics databasa, so values for toluene (per H) were used instead | |
+533. C/H3/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
+534. C/H2/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
+535. C/H/Cb O_pri_rad 500-1000 0.42e+13 0.0 0.0 2.59 0 0 0 0 1 Tully et al. experimental data (changed to per H) | |
+536. C/H3/Cb O_rad/NonDeO 600-1000 1.32e+11 0.0 0.0 14.08 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene) (changed to per H) | |
+537. C/H2/Cb O_rad/NonDeO 600-1000 1.33e+11 0.0 0.0 11.30 0 0 0 0 1 Baulch et al. literature review (value for HO2 + ethylbenzene) (changed to per H) | |
+538. C/H/Cb O_rad/NonDeO 600-1000 1.33e+11 0.0 0.0 11.30 0 0 0 0 1 Baulch et al. literature review (value for HO2 + ethylbenzene) (changed to per H) | |
+539. C/H3/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
+540. C/H2/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
+541. C/H/Cb O2b 700-1200 0.6e+12 0.0 0.0 39.71 0 0 0 0 1 Baulch et al. literature review (value for HO2 + toluene entered here) (changed to per H) | |
diff --git a/databases/RMG_database/thermo_libraries/QMcorrections/Dictionary.txt b/databases/RMG_database/thermo_libraries/QMcorrections/Dictionary.txt | |
deleted file mode 100644 | |
index a940962..0000000 | |
--- a/databases/RMG_database/thermo_libraries/QMcorrections/Dictionary.txt | |
+++ /dev/null | |
@@ -1,7 +0,0 @@ | |
-O2 | |
-1 O 1 {2,S} | |
-2 O 1 {1,S} | |
- | |
-OH | |
-1 O 1 {2,S} | |
-2 H 0 {1,S} | |
\ No newline at end of file | |
diff --git a/databases/RMG_database/thermo_libraries/QMcorrections/Library.txt b/databases/RMG_database/thermo_libraries/QMcorrections/Library.txt | |
deleted file mode 100644 | |
index 713cfcd..0000000 | |
--- a/databases/RMG_database/thermo_libraries/QMcorrections/Library.txt | |
+++ /dev/null | |
@@ -1,2 +0,0 @@ | |
-O2 -0.0010244 49.0236 7.0233 7.1986 7.4285 7.6673 8.0656 8.3363 8.7407 0.0 0.0 0.0 "gmagoon 072009: molecular oxygen (triplet) thermo data taken from GRI-Mech species s00010295 (RMG was considering at a singlet, which produced incorrect thermochemistry results when using quantum chemistry)" | |
-OH 9.4021 43.9063 7.1402 7.0675 7.0458 7.0581 7.1493 7.3353 7.8741 0.0 0.0 0.0 "gmagoon 072509: OH thermo data taken from GRI-Mech species s00010102 (RMG would be off by factor of R*ln2 for entropy due to electronic degeneracy of 4 rather than 2 (due to spatial degeneracy in addition to spin degeneracy))" | |
\ No newline at end of file | |
diff --git a/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Dictionary.txt b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Dictionary.txt | |
index 50f1442..322cdcd 100644 | |
--- a/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Dictionary.txt | |
+++ b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Dictionary.txt | |
@@ -5,6 +5,54 @@ H2 | |
H | |
1 H 1 | |
+OCCO(S) | |
+1 O 0 {2,D} | |
+2 C 0 {1,D} {3,D} | |
+3 C 0 {2,D} {4,D} | |
+4 O 0 {3,D} | |
+ | |
+OCCO | |
+1 O 1 {2,S} | |
+2 C 0 {1,S} {3,T} | |
+3 C 0 {2,T} {4,S} | |
+4 O 1 {3,S} | |
+ | |
O2 | |
1 O 1 {2,S} | |
2 O 1 {1,S} | |
+ | |
+OH | |
+1 O 1 {2,S} | |
+2 H 0 {1,S} | |
+ | |
+CO3s1 | |
+1 C 0 {2,D} {3,S} {4,S} | |
+2 O 0 {1,D} | |
+3 O 0 {4,S} {1,S} | |
+4 O 0 {3,S} {1,S} | |
+ | |
+CO3t1 | |
+1 C 0 {2,D} {3,S} {4,S} | |
+2 O 0 {1,D} | |
+3 O 1 {1,S} | |
+4 O 1 {1,S} | |
+ | |
+CO3t2 | |
+1 C 1 {2,D} {3,S} | |
+2 O 0 {1,D} | |
+3 O 0 {4,S} {1,S} | |
+4 O 1 {3,S} | |
+ | |
+cyclopropene12diyl | |
+1 C 1 {2,D} {3,S} | |
+2 C 1 {1,D} {3,S} | |
+3 C 0 {1,S} {2,S} {4,S} {5,S} | |
+4 H 0 {3,S} | |
+5 H 0 {3,S} | |
+ | |
+cyclopropynylidyne | |
+1 C 0 {2,T} {3,S} | |
+2 C 0 {1,T} {3,S} | |
+3 C 1 {1,S} {2,S} {4,S} | |
+4 H 0 {3,S} | |
+ | |
diff --git a/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Library.txt b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Library.txt | |
index 835d8c5..f20ca5e 100644 | |
--- a/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Library.txt | |
+++ b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/Library.txt | |
@@ -1,4 +1,12 @@ | |
//Name H298 S298 Cp300 Cp400 Cp500 Cp600 Cp800 Cp1000 Cp1500 dH dS dCp Comments | |
H2 0.000 31.233 6.895 6.975 6.994 7.009 7.081 7.219 7.720 0 0.0007 0 "library value for H2" | |
-H 52.103 27.419 4.968 4.968 4.968 4.968 4.968 4.968 4.968 0.001 0.0005 0 "library value for H radical" | |
+H 52.103 27.419 4.968 4.968 4.968 4.968 4.968 4.968 4.968 0.001 0.0005 0 "library value for H radical" | |
O2 -0.0010244 49.0236 7.0233 7.1986 7.4285 7.6673 8.0656 8.3363 8.7407 0.0 0.0 0.0 "from GRI-Mech 3.0" | |
+OH 9.4021 43.9063 7.1402 7.0675 7.0458 7.0581 7.1493 7.3353 7.8741 0.0 0.0 0.0 "taken from GRI-Mech 3.0 species s00010102" | |
+CO3s1 -37.90 61.28 11.82 13.53 14.80 15.76 17.05 17.85 18.84 0.0 0.0 0.0 "Mebel et al (2004) http://dx.doi.org/10.1021/jp049315h" | |
+CO3t1 -11.50 64.53 12.43 14.02 15.23 16.16 17.40 18.14 19.01 0.0 0.0 0.0 "Mebel et al (2004) http://dx.doi.org/10.1021/jp049315h" | |
+CO3t2 28.70 67.06 13.48 14.83 15.83 16.59 17.62 18.26 19.05 0.0 0.0 0.0 "Mebel et al (2004) http://dx.doi.org/10.1021/jp049315h" | |
+cyclopropene12diyl 188.13 59.26 11.32 13.42 15.16 16.58 18.74 20.29 22.63 0.0 0.0 0.0 "doi:10.1016/j.chemphys.2008.01.057 and doi:10.1021/jp003224c" | |
+cyclopropynylidyne 169.80 57.47 10.43 11.93 13.18 14.18 15.61 16.59 17.99 0.0 0.0 0.0 "doi:10.1016/j.chemphys.2008.01.057 and doi:10.1021/jp003224c" | |
+OCCO(S) 18.31 90.63 13.66 14.78 15.66 16.41 17.57 18.39 19.53 0.0 0.0 0.0 "QCI//DFT calculation by CFGoldsmith; Copied from DFT_QCI_thermo library" | |
+OCCO 5.60 61.18 14.21 15.20 15.98 16.65 17.72 18.49 19.58 0.0 0.0 0.0 "QCI//DFT calculation by CFGoldsmith; Copied from DFT_QCI_thermo library" | |
diff --git a/databases/RMG_database/thermo_libraries/primaryThermoLibrary/README.txt b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/README.txt | |
new file mode 100644 | |
index 0000000..9ee1b13 | |
--- /dev/null | |
+++ b/databases/RMG_database/thermo_libraries/primaryThermoLibrary/README.txt | |
@@ -0,0 +1,56 @@ | |
+primaryThermoLibrary | |
+==================== | |
+ | |
+This thermochemistry library contains thermochemistry of a few small | |
+molecules. Some of them, RMG may otherwise estimate poorly. In some instances | |
+it would be OK estimating via group additivity, but if running with automatic | |
+quantum calculations the calculations are likely to fail. | |
+ | |
+It is recommended that this library is included in all calculations. (It is | |
+advisable to use a much larger library, as many other small molecules will be | |
+poorly estimated by RMG. This should be considered a bare minimum.) | |
+ | |
+-------- | |
+Sources: | |
+-------- | |
+ | |
+For CO3 isomers: | |
+Data is from the paper by Mebel et al. [1]. | |
+Geometries are from Figure 1. | |
+Vibrational frequencies from the supplementary material. | |
+H298 values are derived from the relative energies given in the paper. | |
+ | |
+For C3Hn species: | |
+Geometries from Aguilera-Iparraguirre [2] and frequencies from Nguyen [3]. | |
+H298 values from a mixture of the two. | |
+ | |
+For OCCO species: | |
+QCI//DFT calculation by C.F. Goldsmith (2010): The lowest energy conformer | |
+using CBS-QB3 method was selected, and this geometry was re-optimized using | |
+the B3LYP functional with the larger 6-311++G(d,p) basis set. the DFT | |
+equilibrium geometries were used for RQCISD(T)/cc-pVTZ and RQCISD(T)/cc-pVQZ | |
+energies. To avoid spin contamination, all calculations were spin restricted. | |
+The RQCISD(T) complete basis set limit was extrapolated from the triple and | |
+quadruple zeta basis set calculations assuming an inverse power law. | |
+Manuscript in preparation. | |
+ | |
+ | |
+---------- | |
+References | |
+---------- | |
+ | |
+[1] A. M. Mebel, M. Hayashi, V. V. Kislov, and S. H. Lin. Theoretical Study of | |
+Oxygen Isotope Exchange and Quenching in the O(1D) + CO2 Reaction. The Journal | |
+of Physical Chemistry A, 108(39):7983–7994, September 2004. | |
+http://dx.doi.org/10.1021/jp049315h | |
+ | |
+[2] J. Aguilera-Iparraguirre, A. Daniel Boese, W. Klopper, and B. Ruscic. | |
+Accurate ab initio computation of thermochemical data for C3Hx | |
+(x=0,...,4)(x=0,...,4) species. Chemical Physics, 346(1-3):56–68, May 2008. | |
+http://dx.doi.org/10.1016/j.chemphys.2008.01.057 | |
+ | |
+[3] T. L. Nguyen, A. M. Mebel, and R. I. Kaiser. A Theoretical Investigation | |
+of the Triplet Carbon Atom C(3P) + Vinyl Radical C2H3(2A’) Reaction and | |
+Thermochemistry of C3Hn (n = 14) Species. The Journal of Physical Chemistry A, | |
+105(13):3284–3299, April 2001. | |
+http://dx.doi.org/10.1021/jp003224c | |
diff --git a/examples/CheckForwardAndReverseRateCoefficients/CheckForwardAndReverseRateCoefficients.bat b/examples/CheckForwardAndReverseRateCoefficients/CheckForwardAndReverseRateCoefficients.bat | |
new file mode 100644 | |
index 0000000..a93e934 | |
--- /dev/null | |
+++ b/examples/CheckForwardAndReverseRateCoefficients/CheckForwardAndReverseRateCoefficients.bat | |
@@ -0,0 +1,28 @@ | |
+@echo off | |
+ | |
+REM RMG 3.2 Windows batch script for CheckForwardAndReverseRateCoefficient execution | |
+REM Put me in the directory containing the chem.inp file and double-click to run. | |
+REM This assumes that the input file is called chem.inp. | |
+REM This script will check that the necessary setup has been done before running class. | |
+REM Output from class will be logged to the file RMG.log. | |
+ | |
+if not defined RMG ( | |
+echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
+echo Error: RMG.jar not found; please compile using ant. | |
+goto end | |
+) | |
+ | |
+if not exist chem.inp ( | |
+echo Error: chem.inp not found. Please create an input file before running. | |
+goto end | |
+) | |
+ | |
+echo Running CheckForwardAndReverseRateCoefficients... | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" CheckForwardAndReverseRateCoefficients chem.inp > RMG.log 2>&1 & | |
+echo Job completed. | |
+ | |
+:end | |
+pause | |
diff --git a/examples/PopulateReactions/PopulateReactions.bat b/examples/PopulateReactions/PopulateReactions.bat | |
index 760edfe..34cca24 100755 | |
--- a/examples/PopulateReactions/PopulateReactions.bat | |
+++ b/examples/PopulateReactions/PopulateReactions.bat | |
@@ -4,7 +4,7 @@ if not defined RMG ( | |
echo Error: RMG variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
@@ -15,7 +15,7 @@ goto end | |
) | |
echo Running PopulateReactions... | |
-java -Xmx500m -classpath "%RMG%"\bin\RMG.jar PopulateReactions input.txt > RMG.log 2>&1 & | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" PopulateReactions input.txt > RMG.log 2>&1 & | |
echo PopulateReactions job completed. | |
:end | |
diff --git a/examples/PopulateReactions/input.txt b/examples/PopulateReactions/input.txt | |
index ea397d4..dec373c 100644 | |
--- a/examples/PopulateReactions/input.txt | |
+++ b/examples/PopulateReactions/input.txt | |
@@ -1,51 +1,53 @@ | |
-// Sample input file for PopulateReactions module | |
- | |
-PrimaryThermoLibrary: | |
-Name: RMG_Default | |
-Location: primaryThermoLibrary | |
-//Name: GRI-Mech3.0 | |
-//Location: GRI-Mech3.0 | |
-END | |
- | |
-PrimaryTransportLibrary: | |
-Name: GRI-Mech-3 | |
-Location: GRI-Mech3.0 | |
-END | |
- | |
-TemperatureModel: Constant (K) 1200 | |
-PressureModel: Constant (atm) 1 | |
- | |
-//Solvation: off | |
- | |
-SpeciesStatus: | |
- | |
-nButanol (molecule/cm3) 0.01 | |
-1 C 0 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-CH3 (molecule/cm3) 0.01 | |
-1 C 1 | |
- | |
-END | |
- | |
-BathGas: | |
-N2 (molecule/cm3) 0.99 | |
-END | |
- | |
-SpectroscopicDataEstimator: FrequencyGroups | |
-PressureDependence: ReservoirState off ModifiedStrongCollision | |
-PDepKineticsModel: Chebyshev | |
-//DecreaseGrainSize: yes | |
- | |
+// Sample input file for PopulateReactions module | |
+ | |
+Database: RMG_database | |
+ | |
+PrimaryThermoLibrary: | |
+Name: RMG_Default | |
+Location: primaryThermoLibrary | |
+//Name: GRI-Mech3.0 | |
+//Location: GRI-Mech3.0 | |
+END | |
+ | |
+PrimaryTransportLibrary: | |
+Name: GRI-Mech-3 | |
+Location: GRI-Mech3.0 | |
+END | |
+ | |
+TemperatureModel: Constant (K) 1200 | |
+PressureModel: Constant (atm) 1 | |
+ | |
+//Solvation: off | |
+ | |
+SpeciesStatus: | |
+ | |
+nButanol (molecule/cm3) 0.01 | |
+1 C 0 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+CH3 (molecule/cm3) 0.01 | |
+1 C 1 | |
+ | |
+END | |
+ | |
+BathGas: | |
+N2 (molecule/cm3) 0.99 | |
+END | |
+ | |
+SpectroscopicDataEstimator: FrequencyGroups | |
+PressureDependence: ReservoirState off ModifiedStrongCollision | |
+PDepKineticsModel: Chebyshev | |
+//DecreaseGrainSize: yes | |
+ | |
PrimaryKineticLibrary: | |
-//Name: PrIMe-recommended | |
+//Name: PrIMe-recommended | |
//Location: GRI-Mech3.0 | |
-END | |
- | |
-ReactionLibrary: | |
-END | |
- | |
+END | |
+ | |
+ReactionLibrary: | |
+END | |
+ | |
//Verbose: off | |
\ No newline at end of file | |
diff --git a/examples/RMG/1,3-hexadiene/RMG.bat b/examples/RMG/1,3-hexadiene/RMG.bat | |
index bb76ff8..3c1adb7 100755 | |
--- a/examples/RMG/1,3-hexadiene/RMG.bat | |
+++ b/examples/RMG/1,3-hexadiene/RMG.bat | |
@@ -10,31 +10,31 @@ if not defined RMG ( | |
echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\blas.dll ( | |
+if not exist "%RMG%\bin\blas.dll" ( | |
echo Error: blas.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\lapack.dll ( | |
+if not exist "%RMG%\bin\lapack.dll" ( | |
echo Error: lapack.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\dasslAUTO.exe ( | |
+if not exist "%RMG%\bin\dasslAUTO.exe" ( | |
echo Error: dasslAUTO.exe not found. Please run make.bat to compile DASSL. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\GATPFit.exe ( | |
+if not exist "%RMG%\bin\GATPFit.exe" ( | |
echo Error: GATPFit.exe not found. Please run make.bat to compile GATPFit. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\fame.exe ( | |
+if not exist "%RMG%\bin\fame.exe" ( | |
echo Error: fame.exe not found. Please run make.bat to compile fame. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\frankie.exe ( | |
+if not exist "%RMG%\bin\frankie.exe" ( | |
echo Error: frankie.exe not found. Please run make.bat to compile frankie. | |
goto end | |
) | |
@@ -45,7 +45,7 @@ goto end | |
) | |
echo Running RMG... | |
-java -Xmx500m -classpath "%RMG%"\bin\RMG.jar RMG condition.txt > RMG.log 2>&1 & | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" RMG condition.txt > RMG.log 2>&1 & | |
echo RMG job completed. | |
:end | |
diff --git a/examples/RMG/1,3-hexadiene/condition-wAllOptions.txt b/examples/RMG/1,3-hexadiene/condition-wAllOptions.txt | |
index 66f8617..ed5e5d2 100644 | |
--- a/examples/RMG/1,3-hexadiene/condition-wAllOptions.txt | |
+++ b/examples/RMG/1,3-hexadiene/condition-wAllOptions.txt | |
@@ -20,7 +20,7 @@ Database: RMG_database | |
PrimaryThermoLibrary: | |
Name: GRIMech3.0 | |
Location: GRI-Mech3.0 | |
-Name: RMG old | |
+Name: RMG-minimal | |
Location: primaryThermoLibrary | |
END | |
@@ -47,6 +47,7 @@ ReadRestart: no yes | |
WriteRestart: no yes | |
// Only temperature/pressure model currently supported is "Constant" | |
+// Several temperatures and pressures may be specified. | |
// Units for temperature: K, C, F | |
// Units for pressure: atm, bar, Pa, torr | |
TemperatureModel: Constant (K) 1350 | |
@@ -74,13 +75,14 @@ InitialStatus: | |
// A species' name cannot begin with a number | |
// Concentration units available: mol/cm3, mol/m3, mol/l | |
+// Several concentrations may be specified, but all species must have the same number. | |
// The following options may follow a species' concentration units: | |
// Unreactive: This species will not react against RMG's rxn families. | |
// Furthermore, a file named IncludeSpecies.txt must be supplied by the user | |
// ConstantConcentration: This species concentration will remain fixed throughout the simulation | |
// *** This option is still under construction *** | |
-HXD13 (mol/cm3) 6.829e-4 | |
+HXD13 (mol/cm3) 6.829e-4 | |
1 C 0 {2,D} | |
2 C 0 {1,D} {3,S} | |
3 C 0 {2,S} {4,D} | |
@@ -88,10 +90,10 @@ HXD13 (mol/cm3) 6.829e-4 | |
5 C 0 {4,S} {6,S} | |
6 C 0 {5,S} | |
-CH4 (mol/cm3) 0.104 | |
+CH4 (mol/cm3) 0.104 | |
1 C 0 | |
-H2 (mol/cm3) 1.56e-2 | |
+H2 (mol/cm3) 1.56e-2 | |
1 H 0 {2,S} | |
2 H 0 {1,S} | |
@@ -101,10 +103,11 @@ END | |
// However, RMG only has the Lennard-Jones parameters for N2, Ar, and He | |
// hard-coded into BathGas.java. Furthermore, RMG only reports the | |
// thermo for N2, Ar, and Ne in the chem.inp file | |
-// The concentration units available are the same as before | |
+// The concentration units available are the same as before. | |
+// The number of concentrations must match the reactant species in the previous section. | |
InertGas: | |
-N2 (mol/cm3) 0.8797 | |
-Ar (mol/cm3) 0.0e-6 | |
+N2 (mol/cm3) 0.8797 | |
+Ar (mol/cm3) 0.0e-6 | |
END | |
SpectroscopicDataEstimator: off/frequencygroups | |
diff --git a/examples/RMG/1,3-hexadiene/condition.txt b/examples/RMG/1,3-hexadiene/condition.txt | |
index b1a1704..754e3f5 100644 | |
--- a/examples/RMG/1,3-hexadiene/condition.txt | |
+++ b/examples/RMG/1,3-hexadiene/condition.txt | |
@@ -3,7 +3,7 @@ | |
//a oxidation mechanism. Also the sensitivity analysis section is missing | |
//because we are using the dassl solver. | |
-//This example should take roughly 15-20 minutes to run to completion. | |
+//This example should take roughly 2-3 minutes to run to completion. | |
Database: RMG_database | |
@@ -18,7 +18,7 @@ Database: RMG_database | |
PrimaryThermoLibrary: | |
Name: GRIMech3.0 | |
Location: GRI-Mech3.0 | |
-Name: RMG-old | |
+Name: RMG-minimal | |
Location: primaryThermoLibrary | |
END | |
diff --git a/examples/RMG/butane_pruning/RMG.bat b/examples/RMG/butane_pruning/RMG.bat | |
new file mode 100644 | |
index 0000000..3c1adb7 | |
--- /dev/null | |
+++ b/examples/RMG/butane_pruning/RMG.bat | |
@@ -0,0 +1,52 @@ | |
+@echo off | |
+ | |
+REM RMG 3.2 Windows batch script for RMG execution | |
+REM Put me in the directory containing the condition file and double-click to run RMG. | |
+REM This assumes that the condition file is called condition.txt. | |
+REM This script will check that the necessary setup has been done before running RMG. | |
+REM Output from RMG will be logged to the file RMG.log. | |
+ | |
+if not defined RMG ( | |
+echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
+echo Error: RMG.jar not found; please compile using ant. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\blas.dll" ( | |
+echo Error: blas.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\lapack.dll" ( | |
+echo Error: lapack.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\dasslAUTO.exe" ( | |
+echo Error: dasslAUTO.exe not found. Please run make.bat to compile DASSL. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\GATPFit.exe" ( | |
+echo Error: GATPFit.exe not found. Please run make.bat to compile GATPFit. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\fame.exe" ( | |
+echo Error: fame.exe not found. Please run make.bat to compile fame. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\frankie.exe" ( | |
+echo Error: frankie.exe not found. Please run make.bat to compile frankie. | |
+goto end | |
+) | |
+ | |
+if not exist condition.txt ( | |
+echo Error: condition.txt not found. Please create an RMG condition file before running. | |
+goto end | |
+) | |
+ | |
+echo Running RMG... | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" RMG condition.txt > RMG.log 2>&1 & | |
+echo RMG job completed. | |
+ | |
+:end | |
+pause | |
diff --git a/examples/RMG/butane_pruning/condition.txt b/examples/RMG/butane_pruning/condition.txt | |
index f2e9563..cd99cbd 100644 | |
--- a/examples/RMG/butane_pruning/condition.txt | |
+++ b/examples/RMG/butane_pruning/condition.txt | |
@@ -17,7 +17,7 @@ Database: RMG_database | |
PrimaryThermoLibrary: | |
Name: GRIMech3.0 | |
Location: GRI-Mech3.0 | |
-Name: RMG-old | |
+Name: RMG-minimal | |
Location: primaryThermoLibrary | |
END | |
@@ -39,21 +39,21 @@ PressureModel: Constant (atm) 20 30 40 | |
InitialStatus: | |
-(1) C4H10 1 (mol/cm3) | |
+C4H10 (mol/cm3) 1 2 | |
1 C 0 {2,S} | |
2 C 0 {1,S} {3,S} | |
3 C 0 {2,S} {4,S} | |
4 C 0 {3,S} | |
-(2) O2 6.5 (mol/cm3) | |
+O2 (mol/cm3) 6.5 5.5 | |
1 O 1 {2,S} | |
2 O 1 {1,S} | |
END | |
InertGas: | |
-N2 24.399 (mol/cm3) | |
-Ar 0 (mol/cm3) | |
+N2 (mol/cm3) 24.399 24.399 | |
+Ar (mol/cm3) 0 0 | |
END | |
SpectroscopicDataEstimator: off | |
diff --git a/examples/RMG/cyclopropane_QM/RMG.bat b/examples/RMG/cyclopropane_QM/RMG.bat | |
index bb76ff8..3c1adb7 100755 | |
--- a/examples/RMG/cyclopropane_QM/RMG.bat | |
+++ b/examples/RMG/cyclopropane_QM/RMG.bat | |
@@ -10,31 +10,31 @@ if not defined RMG ( | |
echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\blas.dll ( | |
+if not exist "%RMG%\bin\blas.dll" ( | |
echo Error: blas.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\lapack.dll ( | |
+if not exist "%RMG%\bin\lapack.dll" ( | |
echo Error: lapack.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\dasslAUTO.exe ( | |
+if not exist "%RMG%\bin\dasslAUTO.exe" ( | |
echo Error: dasslAUTO.exe not found. Please run make.bat to compile DASSL. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\GATPFit.exe ( | |
+if not exist "%RMG%\bin\GATPFit.exe" ( | |
echo Error: GATPFit.exe not found. Please run make.bat to compile GATPFit. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\fame.exe ( | |
+if not exist "%RMG%\bin\fame.exe" ( | |
echo Error: fame.exe not found. Please run make.bat to compile fame. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\frankie.exe ( | |
+if not exist "%RMG%\bin\frankie.exe" ( | |
echo Error: frankie.exe not found. Please run make.bat to compile frankie. | |
goto end | |
) | |
@@ -45,7 +45,7 @@ goto end | |
) | |
echo Running RMG... | |
-java -Xmx500m -classpath "%RMG%"\bin\RMG.jar RMG condition.txt > RMG.log 2>&1 & | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" RMG condition.txt > RMG.log 2>&1 & | |
echo RMG job completed. | |
:end | |
diff --git a/examples/RMG/cyclopropane_QM/condition.txt b/examples/RMG/cyclopropane_QM/condition.txt | |
index 77e34f3..c378ff1 100644 | |
--- a/examples/RMG/cyclopropane_QM/condition.txt | |
+++ b/examples/RMG/cyclopropane_QM/condition.txt | |
@@ -21,7 +21,7 @@ Database: RMG_database | |
PrimaryThermoLibrary: | |
Name: GRIMech3.0 | |
Location: GRI-Mech3.0 | |
-Name: RMG-old | |
+Name: RMG-minimal | |
Location: primaryThermoLibrary | |
END | |
@@ -42,7 +42,7 @@ MaxRadNumForQM: 0 | |
InitialStatus: | |
-(1) Cyclopropane 6.829e-4 (mol/cm3) | |
+Cyclopropane (mol/cm3) 6.829e-4 | |
1 C 0 {2,S} {3,S} | |
2 C 0 {1,S} {3,S} | |
3 C 0 {1,S} {2,S} | |
@@ -50,13 +50,12 @@ InitialStatus: | |
END | |
InertGas: | |
-N2 0.8797 (mol/cm3) | |
-Ar 0.0e-6 (mol/cm3) | |
+N2 (mol/cm3) 0.8797 | |
+Ar (mol/cm3) 0.0e-6 | |
END | |
-SpectroscopicDataEstimator: off FrequencyGroups | |
-PressureDependence: off ModifiedStrongCollision | |
-//PDepKineticsModel: Chebyshev | |
+SpectroscopicDataEstimator: off | |
+PressureDependence: off | |
FinishController: | |
(1) Goal Conversion: Cyclopropane 0.9 | |
@@ -68,22 +67,12 @@ Atol: 1e-18 | |
Rtol: 1e-8 | |
PrimaryKineticLibrary: | |
-//Name: RMG-example | |
-//Location: Example | |
END | |
ReactionLibrary: | |
-//Name: RMG-example | |
-//Location: RMG_database/primaryReactionLibrary/Example | |
END | |
SeedMechanism: | |
-//Name: Leeds | |
-//Location: RMG_database/SeedMechanisms/combustion_core/version5 | |
-//GenerateReactions: yes | |
-//Name: GRIMech3.0 | |
-//Location: RMG_database/SeedMechanisms/GRI-Mech3.0 | |
-//GenerateReactions: yes | |
END | |
ChemkinUnits: | |
diff --git a/examples/RMG/minimal/RMG.bat b/examples/RMG/minimal/RMG.bat | |
new file mode 100644 | |
index 0000000..3c1adb7 | |
--- /dev/null | |
+++ b/examples/RMG/minimal/RMG.bat | |
@@ -0,0 +1,52 @@ | |
+@echo off | |
+ | |
+REM RMG 3.2 Windows batch script for RMG execution | |
+REM Put me in the directory containing the condition file and double-click to run RMG. | |
+REM This assumes that the condition file is called condition.txt. | |
+REM This script will check that the necessary setup has been done before running RMG. | |
+REM Output from RMG will be logged to the file RMG.log. | |
+ | |
+if not defined RMG ( | |
+echo Error: RMG environment variable not defined; please set to the location of your RMG installation. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
+echo Error: RMG.jar not found; please compile using ant. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\blas.dll" ( | |
+echo Error: blas.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\lapack.dll" ( | |
+echo Error: lapack.dll not found. A 32-bit version can be downloaded from http://github.com/GreenGroup/RMG-Java/downloads. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\dasslAUTO.exe" ( | |
+echo Error: dasslAUTO.exe not found. Please run make.bat to compile DASSL. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\GATPFit.exe" ( | |
+echo Error: GATPFit.exe not found. Please run make.bat to compile GATPFit. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\fame.exe" ( | |
+echo Error: fame.exe not found. Please run make.bat to compile fame. | |
+goto end | |
+) | |
+if not exist "%RMG%\bin\frankie.exe" ( | |
+echo Error: frankie.exe not found. Please run make.bat to compile frankie. | |
+goto end | |
+) | |
+ | |
+if not exist condition.txt ( | |
+echo Error: condition.txt not found. Please create an RMG condition file before running. | |
+goto end | |
+) | |
+ | |
+echo Running RMG... | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" RMG condition.txt > RMG.log 2>&1 & | |
+echo RMG job completed. | |
+ | |
+:end | |
+pause | |
diff --git a/examples/RMG/minimal/condition.txt b/examples/RMG/minimal/condition.txt | |
index 2c07e4b..eca82df 100644 | |
--- a/examples/RMG/minimal/condition.txt | |
+++ b/examples/RMG/minimal/condition.txt | |
@@ -20,15 +20,15 @@ PressureModel: Constant (atm) 1 | |
InitialStatus: | |
-(1) C2H6 1.0 (mol/cm3) | |
+C2H6 (mol/cm3) 1.0 | |
1 C 0 {2,S} | |
2 C 0 {1,S} | |
END | |
InertGas: | |
-N2 0.0 (mol/cm3) | |
-Ar 0.0 (mol/cm3) | |
+N2 (mol/cm3) 0.0 | |
+Ar (mol/cm3) 0.0 | |
END | |
SpectroscopicDataEstimator: off | |
diff --git a/examples/ThermoDataEstimator/ThermoDataEstimator.bat b/examples/ThermoDataEstimator/ThermoDataEstimator.bat | |
index 36e6d84..5da3d98 100755 | |
--- a/examples/ThermoDataEstimator/ThermoDataEstimator.bat | |
+++ b/examples/ThermoDataEstimator/ThermoDataEstimator.bat | |
@@ -4,7 +4,7 @@ if not defined RMG ( | |
echo Error: RMG variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
@@ -15,7 +15,7 @@ goto end | |
) | |
echo Running ThermoDataEstimator... | |
-java -Xmx500m -classpath "%RMG%"\bin\RMG.jar ThermoDataEstimator input.txt > RMG.log 2>&1 & | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" ThermoDataEstimator input.txt > RMG.log 2>&1 & | |
echo ThermoDataEstimator job completed. | |
:end | |
diff --git a/examples/ThermoDataEstimator/ThermoDataEstimator.sh b/examples/ThermoDataEstimator/ThermoDataEstimator.sh | |
new file mode 100755 | |
index 0000000..08e9f87 | |
--- /dev/null | |
+++ b/examples/ThermoDataEstimator/ThermoDataEstimator.sh | |
@@ -0,0 +1,23 @@ | |
+#! /bin/bash | |
+ | |
+if ($RMG) | |
+ then | |
+ echo "Environment variable \$RMG is not defined. Please set to the location of your RMG installation." | |
+ exit | |
+fi | |
+ | |
+if [ ! -e "$RMG/bin/RMG.jar" ] | |
+then | |
+ echo "$RMG/bin/RMG.jar not found; please compile using ant."; | |
+ exit | |
+fi | |
+ | |
+if [ ! -e "input.txt" ] | |
+then | |
+ echo "Error: input.txt not found. Please create an ThermoDataEstimator input file before running."; | |
+ exit | |
+fi | |
+ | |
+echo "Running TransportDataEstimator..." | |
+java -Xmx500m -classpath $RMG/bin/RMG.jar ThermoDataEstimator input.txt 2>&1 | tee RMG.log | |
+echo "TransportDataEstimator job completed." | |
diff --git a/examples/ThermoDataEstimator/input.txt b/examples/ThermoDataEstimator/input.txt | |
index 98773bd..37b38cf 100644 | |
--- a/examples/ThermoDataEstimator/input.txt | |
+++ b/examples/ThermoDataEstimator/input.txt | |
@@ -1,68 +1,70 @@ | |
-PrimaryThermoLibrary: | |
-//Name: | |
-//Location: | |
-END | |
- | |
-1 C 0 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-1 C 0 {2,S} | |
-2 C 1 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-1 C 0 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 1 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-1 C 0 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 1 {3,S} {5,S} | |
-5 O 0 {4,S} | |
- | |
-1 C 0 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} {5,S} | |
-5 O 1 {4,S} | |
- | |
-1 C 1 | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 O 0 {3,S} | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 O 0 {2,S} | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} | |
- | |
-1 C 1 {2,S} | |
-2 O 0 {1,S} | |
- | |
-1 C 1 {2,S} | |
-2 C 0 {1,S} {3,S} | |
-3 C 0 {2,S} {4,S} | |
-4 C 0 {3,S} | |
+Database: RMG_database | |
+PrimaryThermoLibrary: | |
+Name: RMG-minimal | |
+Location: primaryThermoLibrary | |
+END | |
+ | |
+1 C 0 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+1 C 0 {2,S} | |
+2 C 1 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+1 C 0 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 1 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+1 C 0 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 1 {3,S} {5,S} | |
+5 O 0 {4,S} | |
+ | |
+1 C 0 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} {5,S} | |
+5 O 1 {4,S} | |
+ | |
+1 C 1 | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 O 0 {3,S} | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 O 0 {2,S} | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} | |
+ | |
+1 C 1 {2,S} | |
+2 O 0 {1,S} | |
+ | |
+1 C 1 {2,S} | |
+2 C 0 {1,S} {3,S} | |
+3 C 0 {2,S} {4,S} | |
+4 C 0 {3,S} | |
+ | |
1 O 1 | |
\ No newline at end of file | |
diff --git a/examples/TransportDataEstimator/TransportDataEstimator.bat b/examples/TransportDataEstimator/TransportDataEstimator.bat | |
index df8df60..53847d7 100644 | |
--- a/examples/TransportDataEstimator/TransportDataEstimator.bat | |
+++ b/examples/TransportDataEstimator/TransportDataEstimator.bat | |
@@ -4,18 +4,18 @@ if not defined RMG ( | |
echo Error: RMG variable not defined; please set to the location of your RMG installation. | |
goto end | |
) | |
-if not exist "%RMG%"\bin\RMG.jar ( | |
+if not exist "%RMG%\bin\RMG.jar" ( | |
echo Error: RMG.jar not found; please compile using ant. | |
goto end | |
) | |
if not exist input.txt ( | |
-echo Error: input.txt not found. Please create an ThermoDataEstimator input file before running. | |
+echo Error: input.txt not found. Please create an TransportDataEstimator input file before running. | |
goto end | |
) | |
echo Running TransportDataEstimator... | |
-java -Xmx500m -classpath "%RMG%"\bin\RMG.jar TransportDataEstimator input.txt > RMG.log 2>&1 & | |
+java -Xmx500m -classpath "%RMG%\bin\RMG.jar" TransportDataEstimator input.txt > RMG.log 2>&1 & | |
echo TransportDataEstimator job completed. | |
:end | |
diff --git a/examples/TransportDataEstimator/TransportDataEstimator.sh b/examples/TransportDataEstimator/TransportDataEstimator.sh | |
new file mode 100755 | |
index 0000000..01b9a27 | |
--- /dev/null | |
+++ b/examples/TransportDataEstimator/TransportDataEstimator.sh | |
@@ -0,0 +1,23 @@ | |
+#! /bin/bash | |
+ | |
+if ($RMG) | |
+ then | |
+ echo "Environment variable \$RMG is not defined. Please set to the location of your RMG installation." | |
+ exit | |
+fi | |
+ | |
+if [ ! -e "$RMG/bin/RMG.jar" ] | |
+then | |
+ echo "$RMG/bin/RMG.jar not found; please compile using ant."; | |
+ exit | |
+fi | |
+ | |
+if [ ! -e "input.txt" ] | |
+then | |
+ echo "Error: input.txt not found. Please create an TransportDataEstimator input file before running."; | |
+ exit | |
+fi | |
+ | |
+echo "Running TransportDataEstimator..." | |
+java -Xmx500m -classpath $RMG/bin/RMG.jar TransportDataEstimator input.txt 2>&1 | tee RMG.log | |
+echo "TransportDataEstimator job completed." | |
diff --git a/examples/TransportDataEstimator/input.txt b/examples/TransportDataEstimator/input.txt | |
index ed7f346..092305e 100644 | |
--- a/examples/TransportDataEstimator/input.txt | |
+++ b/examples/TransportDataEstimator/input.txt | |
@@ -1,6 +1,8 @@ | |
+Database: RMG_database | |
+ | |
PrimaryTransportLibrary: | |
-//Name: GRI-Mech-3.0 | |
-//Location: GRI-Mech3.0 | |
+Name: RMG-minimal | |
+Location: primaryTransportLibrary | |
END | |
Allene | |
diff --git a/source/GATPFit/Makefile b/source/GATPFit/Makefile | |
index 11201e9..35772b0 100644 | |
--- a/source/GATPFit/Makefile | |
+++ b/source/GATPFit/Makefile | |
@@ -13,14 +13,40 @@ BUILDDIR=../../build/GATPFit | |
# The directory in which to place compiled executables and JAR files | |
BINDIR=../../bin | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fmod=$(BUILDDIR) -ftrace=full | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fbounds-check -ftrace=full -fmod=$(BUILDDIR) -Wall -O3 | |
+F90FLAGS_NDEBUG = -fmod=$(BUILDDIR) -ftrace=full # used for dassl and daspk | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+endif ###### END OF gfortran SETTINGS | |
LDFLAGS= $(F90_EXTRA_LDFLAGS) -lblas -llapack | |
-OBJ0=lsfp_chem1.o lsfp.f lsfp_nasa.f lsfp_nist1.f lsfp_wilh1.f | |
+OBJ0=lsfp_chem1.o lsfp.o lsfp_nasa.o lsfp_nist1.o lsfp_wilh1.o | |
OBJ=$(patsubst %.o,$(BUILDDIR)/%.o,$(OBJ0)) | |
diff --git a/source/GATPFit/lsfp.f b/source/GATPFit/lsfp.f | |
index 59e6191..cb0ec1e 100644 | |
--- a/source/GATPFit/lsfp.f | |
+++ b/source/GATPFit/lsfp.f | |
@@ -25,37 +25,37 @@ C: M_in: the number of input thermo data, use 'DATAGROUP' to read the input data | |
C*********************************************************************************** | |
PROGRAM LSAP | |
C | |
- implicit none | |
+ implicit none | |
C | |
- INTEGER LIN,LOUT,I,J,J_elem,IJ | |
+ INTEGER LIN,LOUT,I,J,J_elem,IJ | |
C max atoms number allowed in a species is 999 | |
C max number of different atoms is 5 | |
- integer indc_elno(5,3) | |
- PARAMETER (LIN=5,LOUT=6) ! 5 is STDIN and 6 is STDOUT | |
+ integer indc_elno(5,3) | |
+ PARAMETER (LIN=5,LOUT=6) ! 5 is STDIN and 6 is STDOUT | |
C For input file | |
- CHARACTER(LEN=4) MARK, DATATYPE | |
- CHARACTER(LEN=48) TEXT, SNAM ! beware truncation! | |
- CHARACTER(LEN=9) STRUC_MOL | |
- CHARACTER(LEN=3) ELNO(5) | |
- CHARACTER(LEN=2) ENAM(5) | |
- DOUBLE PRECISION ROL,H_298,DLTH,S_298,MW,T_int,TINT | |
- DOUBLE PRECISION T_min,T_max,T_int1,TINT1,ATOMS,ROTORS | |
+ CHARACTER(LEN=4) MARK, DATATYPE | |
+ CHARACTER(LEN=48) TEXT, SNAM ! beware truncation! | |
+ CHARACTER(LEN=9) STRUC_MOL | |
+ CHARACTER(LEN=3) ELNO(5) | |
+ CHARACTER(LEN=2) ENAM(5) | |
+ DOUBLE PRECISION ROL,H_298,DLTH,S_298,MW,T_int,TINT | |
+ DOUBLE PRECISION T_min,T_max,T_int1,TINT1,ATOMS,ROTORS | |
C | |
C: 'M' is the size of sample dataset | |
- INTEGER M_in | |
-! PARAMETER (M_in=59) | |
- PARAMETER (M_in=7) | |
- DOUBLE PRECISION TEMP,CPT,CH,CS,TEMF,CPF,CHF,CSF | |
- DIMENSION TEMP(M_in),CPT(M_in),CH(M_in),CS(M_in) | |
- DIMENSION TEMF(101),CPF(101),CHF(101),CSF(101) | |
+ INTEGER M_in | |
+! PARAMETER (M_in=59) | |
+ PARAMETER (M_in=7) | |
+ DOUBLE PRECISION TEMP,CPT,CH,CS,TEMF,CPF,CHF,CSF | |
+ DIMENSION TEMP(M_in),CPT(M_in),CH(M_in),CS(M_in) | |
+ DIMENSION TEMF(101),CPF(101),CHF(101),CSF(101) | |
C | |
C: THERMs contain the coefficients in different temperature ranges | |
DOUBLE PRECISION THERM1,THERM2,THERM3 | |
- DIMENSION THERM1(20),THERM2(20),THERM3(20) | |
+ DIMENSION THERM1(20),THERM2(20),THERM3(20) | |
C | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
- COMMON /INDICTOR/INDC_ELNO | |
- DATA ROL/1.9872D0/ | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+ COMMON /INDICTOR/INDC_ELNO | |
+ DATA ROL/1.9872D0/ | |
C | |
C: For the format of input file, please ref. a sample file. | |
C This now commented out because LIN=5 is standard input | |
@@ -65,1064 +65,1061 @@ C 1 FILE='INPUT.txt') | |
C OPEN (LOUT, FORM='FORMATTED', STATUS='UNKNOWN', | |
C 1 FILE='OUTPUT.txt') | |
C | |
- MARK='' | |
- DATATYPE='' | |
- TEXT='' | |
- STRUC_MOL='' | |
- DO I=1,5 | |
- ENAM(I)='' | |
- ELNO(I)='' | |
- ENDDO | |
+ MARK='' | |
+ DATATYPE='' | |
+ TEXT='' | |
+ STRUC_MOL='' | |
+ DO I=1,5 | |
+ ENAM(I)='' | |
+ ELNO(I)='' | |
+ ENDDO | |
C | |
- IJ=0 | |
+ IJ=0 | |
J_elem=0 | |
- do i=1,5 | |
- do j=1,3 | |
- indc_elno(i,j)=0 | |
- enddo | |
- enddo | |
+ do i=1,5 | |
+ do j=1,3 | |
+ indc_elno(i,j)=0 | |
+ enddo | |
+ enddo | |
c | |
- DO I=1,8 | |
- IJ=IJ+1 | |
- READ (LIN, 100) MARK, TEXT | |
- IF (MARK .EQ. 'SPEC') THEN | |
-! WRITE(*,*) MARK | |
-! WRITE(*,*) TEXT | |
- SNAM=TEXT(1:16) | |
-! WRITE(*,103) MARK,SNAM | |
- ELSE IF (MARK .EQ. 'ELEM') THEN | |
- J_elem=J_elem+1 | |
-! WRITE(*,*) TEXT | |
- ENAM(J_elem)=TEXT(1:(INDEX(TEXT,' ')-1)) | |
- do J=1,3 | |
- if (TEXT(INDEX(TEXT,' ')+J:INDEX(TEXT,' ')+J) .EQ. ' ') then | |
- indc_elno(j_elem,J)=1 | |
- endif | |
- enddo | |
+ DO I=1,8 | |
+ IJ=IJ+1 | |
+ READ (LIN, 100) MARK, TEXT | |
+ IF (MARK .EQ. 'SPEC') THEN | |
+! WRITE(*,*) MARK | |
+! WRITE(*,*) TEXT | |
+ SNAM=TEXT(1:16) | |
+! WRITE(*,103) MARK,SNAM | |
+ ELSE IF (MARK .EQ. 'ELEM') THEN | |
+ J_elem=J_elem+1 | |
+! WRITE(*,*) TEXT | |
+ ENAM(J_elem)=TEXT(1:(INDEX(TEXT,' ')-1)) | |
+ do J=1,3 | |
+ if (TEXT(INDEX(TEXT,' ')+J:INDEX(TEXT,' ')+J) .EQ. ' ') then | |
+ indc_elno(j_elem,J)=1 | |
+ endif | |
+ enddo | |
! | |
- ELNO(J_elem)=TEXT(INDEX(TEXT,' ')+1:INDEX(TEXT,' ')+4) | |
-! WRITE(*,102) MARK,ENAM(J_ELEM),ELNO(J_ELEM) | |
- ELSE IF (MARK .EQ. 'H298') THEN | |
+ ELNO(J_elem)=TEXT(INDEX(TEXT,' ')+1:INDEX(TEXT,' ')+4) | |
+! WRITE(*,102) MARK,ENAM(J_ELEM),ELNO(J_ELEM) | |
+ ELSE IF (MARK .EQ. 'H298') THEN | |
! We've read beyond the end of the elements, so read TEXT | |
! as a double into H_298 and exit the loop | |
! WARNING: if the number in the input spans beyond the end of TEXT | |
! then it will be truncated, eg: 1.345678901234567E+012 | |
! ---------------####### | |
! this number could be read in as 10^12 too small! | |
- READ(TEXT,*) H_298 | |
- GOTO 200 | |
- ENDIF | |
- ENDDO | |
- 100 FORMAT (A4,1X,A48) ! beware truncation | |
- 200 CONTINUE | |
-C | |
- DO I=1,5 | |
- IF (ELNO(I) .EQ. '') THEN | |
- ELNO(I)='0' | |
- ENDIF | |
- ENDDO | |
+ READ(TEXT,*) H_298 | |
+ GOTO 200 | |
+ ENDIF | |
+ ENDDO | |
+ 100 FORMAT (A4,1X,A48) ! beware truncation | |
+ 200 CONTINUE | |
+C | |
+ DO I=1,5 | |
+ IF (ELNO(I) .EQ. '') THEN | |
+ ELNO(I)='0' | |
+ ENDIF | |
+ ENDDO | |
C | |
! We have already read H_298 line, so continue with S_298 | |
-! READ (LIN, *) MARK, H_298 | |
-! WRITE(*,*) MARK, H_298 | |
- READ (LIN, *) MARK, S_298 | |
-! WRITE(*,*) MARK, S_298 | |
- READ (LIN, *) MARK, DLTH | |
-! WRITE(*,*) 'HEAT OF FORMATION at 298K', DLTH | |
- READ (LIN, *) MARK, MW | |
-! WRITE(*,*) 'MOLAR WEIGHT', MW | |
- READ (LIN, *) MARK, T_int | |
-! WRITE(*,*) MARK, T_int | |
- READ (LIN, *) MARK, T_min | |
-! WRITE(*,*) MARK, T_min | |
- READ (LIN, *) MARK, T_max | |
-! WRITE(*,*) MARK, T_max | |
- if (T_max .gt. 6000.0) then | |
- write(*,*) 'Warning!!!' | |
- write(*,*) 'The maximum T should be no greater than 6000K!' | |
- endif | |
- 101 FORMAT (A4,1X,F8.1) | |
+! READ (LIN, *) MARK, H_298 | |
+! WRITE(*,*) MARK, H_298 | |
+ READ (LIN, *) MARK, S_298 | |
+! WRITE(*,*) MARK, S_298 | |
+ READ (LIN, *) MARK, DLTH | |
+! WRITE(*,*) 'HEAT OF FORMATION at 298K', DLTH | |
+ READ (LIN, *) MARK, MW | |
+! WRITE(*,*) 'MOLAR WEIGHT', MW | |
+ READ (LIN, *) MARK, T_int | |
+! WRITE(*,*) MARK, T_int | |
+ READ (LIN, *) MARK, T_min | |
+! WRITE(*,*) MARK, T_min | |
+ READ (LIN, *) MARK, T_max | |
+! WRITE(*,*) MARK, T_max | |
+ if (T_max .gt. 6000.0) then | |
+ write(*,*) 'Warning!!!' | |
+ write(*,*) 'The maximum T should be no greater than 6000K!' | |
+ endif | |
+ 101 FORMAT (A4,1X,F8.1) | |
102 FORMAT (A5,1X,A2,1X,A4) | |
103 FORMAT (A5,1X,A8) | |
- READ (LIN, *) DATATYPE | |
-! WRITE(*,*) 'DATA FORMAT: ', DATATYPE | |
-C | |
- IF (DATATYPE .EQ. 'NASA') THEN | |
- READ (LIN, *) MARK, T_int1 | |
-! WRITE(*,*) MARK, T_int1 | |
- ELSE | |
- READ (LIN, 101) | |
- T_int1=0.D0 | |
- ENDIF | |
-C | |
- READ (LIN, *) STRUC_MOL | |
-! WRITE(*,*) STRUC_MOL | |
- READ (LIN, *) ATOMS | |
-! WRITE(*,*) 'NO. OF ATOMS', ATOMS | |
- READ (LIN, *) ROTORS | |
-! WRITE(*,*) 'NO. OF ROTORS', ROTORS | |
- 104 FORMAT(F8.1) | |
+ READ (LIN, *) DATATYPE | |
+! WRITE(*,*) 'DATA FORMAT: ', DATATYPE | |
+C | |
+ IF (DATATYPE .EQ. 'NASA') THEN | |
+ READ (LIN, *) MARK, T_int1 | |
+! WRITE(*,*) MARK, T_int1 | |
+ ELSE | |
+ READ (LIN, 101) | |
+ T_int1=0.D0 | |
+ ENDIF | |
+C | |
+ READ (LIN, *) STRUC_MOL | |
+! WRITE(*,*) STRUC_MOL | |
+ READ (LIN, *) ATOMS | |
+! WRITE(*,*) 'NO. OF ATOMS', ATOMS | |
+ READ (LIN, *) ROTORS | |
+! WRITE(*,*) 'NO. OF ROTORS', ROTORS | |
+ 104 FORMAT(F8.1) | |
! CLOSE(LIN) | |
-! PAUSE | |
+! PAUSE | |
C | |
C: Keywords input over | |
C | |
C: INPUT the Cp, H, and S sample dataset | |
-C: | |
+C: | |
C | |
- DO I=1,M_in | |
- TEMP(I)=0.D0 | |
- CPT(I) =0.D0 | |
- CH(I) =0.D0 | |
- CS(I) =0.D0 | |
- ENDDO | |
+ DO I=1,M_in | |
+ TEMP(I)=0.D0 | |
+ CPT(I) =0.D0 | |
+ CH(I) =0.D0 | |
+ CS(I) =0.D0 | |
+ ENDDO | |
C | |
! CALL DATAINPUT (M_in,TEMP,CPT,CH,CS) | |
CALL DATAGROUP (M_in,TEMP,CPT,CH,CS,LIN) | |
C | |
- TINT = 0.D0 | |
- TINT1 = 0.D0 | |
+ TINT = 0.D0 | |
+ TINT1 = 0.D0 | |
C | |
! SWILT uses the enthalpy in: cal/mol | |
- DO I=1,M_in | |
- CH(I) = CH(I)*1.D3 | |
- ENDDO | |
+ DO I=1,M_in | |
+ CH(I) = CH(I)*1.D3 | |
+ ENDDO | |
C | |
! First fit SWILT because it takes into account limits at 0 and infinite T | |
- CALL SWILT(SNAM,ENAM,ELNO,STRUC_MOL,ATOMS,ROTORS,THERM1, | |
- & TEMP,CPT,CH,CS,M_in) | |
+ CALL SWILT(SNAM,ENAM,ELNO,STRUC_MOL,ATOMS,ROTORS,THERM1, | |
+ & TEMP,CPT,CH,CS,M_in) | |
C | |
- IF (DATATYPE .EQ. 'WILH') GOTO 3000 | |
+ IF (DATATYPE .EQ. 'WILH') GOTO 3000 | |
C | |
C: INTERPOLATE ACCORDING TO THE SWILHOIT FORMAT | |
C | |
- DO I=1,11 | |
+ DO I=1,11 | |
! 10 points between 1 and 298 | |
- TEMF(I) = 29.815D0*DFLOAT(I-1) | |
- IF (TEMF(I) .EQ. 0.D0) TEMF(I)=1.0D0 | |
+ TEMF(I) = 29.815D0*DFLOAT(I-1) | |
+ IF (TEMF(I) .EQ. 0.D0) TEMF(I)=1.0D0 | |
CALL DATAFIND(THERM1,TEMF(I),CPF(I),CHF(I),CSF(I)) | |
- CHF(I) = CHF(I)/1.D3 | |
- ENDDO | |
+ CHF(I) = CHF(I)/1.D3 | |
+ ENDDO | |
! | |
- DO I=12,101 | |
+ DO I=12,101 | |
! 90 points between 298 and 6000 | |
- TEMF(I)=298.15D0+(6000.D0-298.15D0)*DFLOAT(I-11)/90.D0 | |
- CALL DATAFIND(THERM1,TEMF(I),CPF(I),CHF(I),CSF(I)) | |
- CHF(I)=CHF(I)/1.D3 | |
- ENDDO | |
+ TEMF(I)=298.15D0+(6000.D0-298.15D0)*DFLOAT(I-11)/90.D0 | |
+ CALL DATAFIND(THERM1,TEMF(I),CPF(I),CHF(I),CSF(I)) | |
+ CHF(I)=CHF(I)/1.D3 | |
+ ENDDO | |
C | |
! Then re-fit the other formats to these data points | |
C | |
- IF (DATATYPE .EQ. 'CHEM') THEN | |
- CALL CHEM(T_int,TINT,THERM1,THERM2,TEMF,CPF,CHF,CSF) | |
- IF (TINT .NE. 0.D0 ) T_int =TINT | |
+ IF (DATATYPE .EQ. 'CHEM') THEN | |
+ CALL CHEM(T_int,TINT,THERM1,THERM2,TEMF,CPF,CHF,CSF) | |
+ IF (TINT .NE. 0.D0 ) T_int =TINT | |
C | |
- ELSEIF (DATATYPE .EQ. 'NASA') THEN | |
- CALL NASA(T_int,TINT,T_int1,TINT1,THERM1,THERM2, | |
- & THERM3,TEMF,CPF,CHF,CSF) | |
- IF (TINT .NE. 0.D0 ) T_int =TINT | |
- IF (TINT1 .NE. 0.D0 ) T_int1=TINT1 | |
+ ELSEIF (DATATYPE .EQ. 'NASA') THEN | |
+ CALL NASA(T_int,TINT,T_int1,TINT1,THERM1,THERM2, | |
+ & THERM3,TEMF,CPF,CHF,CSF) | |
+ IF (TINT .NE. 0.D0 ) T_int =TINT | |
+ IF (TINT1 .NE. 0.D0 ) T_int1=TINT1 | |
C | |
- ELSEIF (DATATYPE .EQ. 'NIST') THEN | |
- CALL NIST(T_int,TINT,THERM1,THERM2,TEMF,CPF,CHF,CSF) | |
- IF (TINT .NE. 0.D0 ) T_int =TINT | |
+ ELSEIF (DATATYPE .EQ. 'NIST') THEN | |
+ CALL NIST(T_int,TINT,THERM1,THERM2,TEMF,CPF,CHF,CSF) | |
+ IF (TINT .NE. 0.D0 ) T_int =TINT | |
C | |
- ENDIF | |
+ ENDIF | |
C | |
- 3000 CONTINUE | |
+ 3000 CONTINUE | |
C | |
- CALL PRINT_THERM(T_int,T_int1,SNAM,ENAM,ELNO,MW,H_298,DLTH, | |
- & DATATYPE,LOUT,THERM1,THERM2,THERM3,J_elem, | |
+ CALL PRINT_THERM(T_int,T_int1,SNAM,ENAM,ELNO,MW,H_298,DLTH, | |
+ & DATATYPE,LOUT,THERM1,THERM2,THERM3,J_elem, | |
& T_min,T_max) | |
C | |
- CLOSE(LOUT) | |
+ CLOSE(LOUT) | |
C | |
- END | |
- | |
+ END | |
C*********************************************************************** | |
C | |
SUBROUTINE DATAINPUT(M,TEMP,CPT,CH,CS) | |
C | |
- INTEGER M,I,LIN,IJ,IK,IM | |
- CHARACTER(LEN=4) MARK | |
- CHARACTER(LEN=40) TEXT | |
- DOUBLE PRECISION TEMP,CPT,CH,CS | |
- DIMENSION TEMP(*),CPT(*),CH(*),CS(*) | |
- DOUBLE PRECISION TEMP1,C1,CH1,CS1 | |
- DIMENSION TEMP1(7),C1(7),CH1(7),CS1(7) | |
+ INTEGER M,I,LIN,IJ,IK,IM | |
+ CHARACTER(LEN=4) MARK | |
+ CHARACTER(LEN=40) TEXT | |
+ DOUBLE PRECISION TEMP,CPT,CH,CS | |
+ DIMENSION TEMP(*),CPT(*),CH(*),CS(*) | |
+ DOUBLE PRECISION TEMP1,C1,CH1,CS1 | |
+ DIMENSION TEMP1(7),C1(7),CH1(7),CS1(7) | |
C | |
- DATA TEMP1/290.262D0, 393.258D0, 496.255D0, 589.888D0, 795.88D0, | |
+ DATA TEMP1/290.262D0, 393.258D0, 496.255D0, 589.888D0, 795.88D0, | |
& 1001.87D0, 1488.76D0/ | |
C | |
- DATA C1/17.7725D0, 22.4645D0, 27.0142D0, 30.7109D0, 36.9668D0, | |
- & 41.8009D0, 49.3365D0/ | |
+ DATA C1/17.7725D0, 22.4645D0, 27.0142D0, 30.7109D0, 36.9668D0, | |
+ & 41.8009D0, 49.3365D0/ | |
C | |
- DATA CH1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
+ DATA CH1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
C | |
- DATA CS1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
+ DATA CS1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
C | |
- DO I=1,M | |
- TEMP(I)= TEMP1(I) | |
- CPT(I) = C1(I) | |
- CH(I) = CH1(I) | |
- CS(I) = CS1(I) | |
- ENDDO | |
- RETURN | |
+ DO I=1,M | |
+ TEMP(I)= TEMP1(I) | |
+ CPT(I) = C1(I) | |
+ CH(I) = CH1(I) | |
+ CS(I) = CS1(I) | |
+ ENDDO | |
+ RETURN | |
C | |
- END | |
- | |
+ END | |
C*********************************************************************** | |
C | |
- SUBROUTINE PRINT_THERM(Tint,Tint1,SNAM,ENAM,ELNO,MW,H298,DLTH, | |
+ SUBROUTINE PRINT_THERM(Tint,Tint1,SNAM,ENAM,ELNO,MW,H298,DLTH, | |
& DATATYPE,LOUT,THERM1,THERM2,THERM3,J_elem, | |
& T_min,T_max) | |
C | |
- implicit none | |
-C | |
- INTEGER LOUT,J_elem | |
- integer indc_elno(5,3) | |
- CHARACTER(LEN=4) DATATYPE | |
- CHARACTER(LEN=16) SNAM | |
- CHARACTER(LEN=3) ELNO(5) | |
- CHARACTER(LEN=2) ENAM(5) | |
- DOUBLE PRECISION THERM1,THERM2,THERM3,Tint,Tint1,H298,DLTH,MW | |
- DOUBLE PRECISION DLTH298,T_min,T_max | |
- DIMENSION THERM1(*),THERM2(*),THERM3(*) | |
- EXTERNAL DLTH298 | |
- COMMON /INDICTOR/INDC_ELNO | |
-C | |
- IF (DATATYPE .EQ. 'WILH') THEN | |
-! write(*,*) 'THE COEFFICIENTS OF WILHOIT FORM' | |
-! write(*,*) THERM1(1:6) | |
- WRITE(LOUT,*) 'The Wilhoit polynomial coefficients calculated:' | |
- WRITE(LOUT,200) | |
- WRITE(LOUT,201) THERM1(1:6) | |
- 200 FORMAT(10X,'a1',15X,'a2',15X,'a3',15X,'a4',15X,'I',15X,'J') | |
+ implicit none | |
+C | |
+ INTEGER LOUT,J_elem | |
+ integer indc_elno(5,3) | |
+ CHARACTER(LEN=4) DATATYPE | |
+ CHARACTER(LEN=16) SNAM | |
+ CHARACTER(LEN=3) ELNO(5) | |
+ CHARACTER(LEN=2) ENAM(5) | |
+ DOUBLE PRECISION THERM1,THERM2,THERM3,Tint,Tint1,H298,DLTH,MW | |
+ DOUBLE PRECISION DLTH298,T_min,T_max | |
+ DIMENSION THERM1(*),THERM2(*),THERM3(*) | |
+ EXTERNAL DLTH298 | |
+ COMMON /INDICTOR/INDC_ELNO | |
+C | |
+ IF (DATATYPE .EQ. 'WILH') THEN | |
+! write(*,*) 'THE COEFFICIENTS OF WILHOIT FORM' | |
+! write(*,*) THERM1(1:6) | |
+ WRITE(LOUT,*) 'The Wilhoit polynomial coefficients calculated:' | |
+ WRITE(LOUT,200) | |
+ WRITE(LOUT,201) THERM1(1:6) | |
+ 200 FORMAT(10X,'a1',15X,'a2',15X,'a3',15X,'a4',15X,'I',15X,'J') | |
201 FORMAT(1X,E15.6,2X,E15.6,2X,E15.6,2X,E15.6,2X,E15.6,2X,E15.6) | |
C | |
- ELSEIF (DATATYPE .EQ. 'CHEM') THEN | |
-! write(*,*) SNAM | |
+ ELSEIF (DATATYPE .EQ. 'CHEM') THEN | |
+! write(*,*) SNAM | |
C | |
- WRITE(LOUT,*) 'The Chemkin polynomial coefficients calculated:' | |
- if (J_elem .eq. 2) then | |
+ WRITE(LOUT,*) 'The Chemkin polynomial coefficients calculated:' | |
+ if (J_elem .eq. 2) then | |
IF (INDC_ELNO(1,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- WRITE(LOUT,330) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- WRITE(LOUT,331) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,332) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(1,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- WRITE(LOUT,333) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- WRITE(LOUT,334) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,335) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- WRITE(LOUT,336) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- WRITE(LOUT,337) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,338) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & 'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
-C | |
- if (J_elem .eq. 3) then | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ WRITE(LOUT,330) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ WRITE(LOUT,331) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,332) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(1,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ WRITE(LOUT,333) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ WRITE(LOUT,334) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,335) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ WRITE(LOUT,336) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ WRITE(LOUT,337) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,338) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & 'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
+C | |
+ if (J_elem .eq. 3) then | |
IF (INDC_ELNO(1,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,340) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,341) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,342) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,343) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,344) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,345) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,346) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,347) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,348) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSEIF (INDC_ELNO(1,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,350) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,351) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,352) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,353) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,354) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,355) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,356) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,357) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,358) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,360) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,361) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,362) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,363) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,364) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,365) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- WRITE(LOUT,366) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- WRITE(LOUT,367) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,368) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,340) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,341) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,342) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,343) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,344) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,345) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,346) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,347) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,348) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(1,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,350) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,351) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,352) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,353) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,354) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,355) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,356) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,357) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,358) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,360) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,361) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,362) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,363) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,364) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,365) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ WRITE(LOUT,366) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ WRITE(LOUT,367) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,368) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
ENDIF | |
if (J_elem .eq. 4) then | |
IF (INDC_ELNO(1,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,370) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,371) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,372) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,373) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,374) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,375) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,376) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,377) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,378) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,380) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,381) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,382) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,383) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,384) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,385) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,386) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,387) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,388) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,390) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,391) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,392) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,393) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,394) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,395) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,396) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,397) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,398) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,370) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,371) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,372) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,373) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,374) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,375) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,376) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,377) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,378) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,380) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,381) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,382) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,383) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,384) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,385) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,386) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,387) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,388) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,390) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,391) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,392) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,393) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,394) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,395) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,396) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,397) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,398) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
ELSEIF (INDC_ELNO(1,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,470) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,471) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,472) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,473) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,474) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,475) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,476) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,477) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,478) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,480) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,481) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,482) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,483) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,484) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,485) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,486) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,487) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,488) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,490) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,491) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,492) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,493) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,494) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,495) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,496) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,497) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,498) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,470) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,471) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,472) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,473) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,474) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,475) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,476) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,477) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,478) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,480) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,481) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,482) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,483) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,484) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,485) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,486) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,487) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,488) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,490) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,491) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,492) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,493) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,494) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,495) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,496) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,497) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,498) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
ELSE | |
- IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,570) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,571) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,572) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,573) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,574) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,575) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,576) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,577) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,578) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,580) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,581) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,582) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,583) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,584) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,585) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,586) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,587) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,588) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,590) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,591) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,592) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,593) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,594) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,595) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ELSE | |
- IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
- WRITE(LOUT,596) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
- WRITE(LOUT,597) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ELSE | |
- WRITE(LOUT,598) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
- ENDIF | |
- IF (J_elem .eq. 5) THEN | |
- WRITE(LOUT,601) SNAM,T_min,T_max,Tint | |
- WRITE(LOUT,602) ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
- & ENAM(3),ELNO(3),ENAM(4),ELNO(4),ENAM(5),ELNO(5) | |
- ENDIF | |
- WRITE(LOUT,301) THERM2(1),THERM2(2),THERM2(3),THERM2(4),THERM2(5) | |
+ IF (INDC_ELNO(2,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,570) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,571) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,572) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,573) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,574) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,575) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,576) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,577) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,578) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(2,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,580) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,581) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,582) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,583) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,584) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,585) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,586) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,587) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,588) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(3,2) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,590) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,591) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,592) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSEIF (INDC_ELNO(3,3) .EQ. 1) THEN | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,593) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,594) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,595) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ELSE | |
+ IF (INDC_ELNO(4,2) .EQ. 1) THEN | |
+ WRITE(LOUT,596) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSEIF (INDC_ELNO(4,3) .EQ. 1) THEN | |
+ WRITE(LOUT,597) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ELSE | |
+ WRITE(LOUT,598) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),'G',T_min,T_max,Tint | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
+ ENDIF | |
+ IF (J_elem .eq. 5) THEN | |
+ WRITE(LOUT,601) SNAM,T_min,T_max,Tint | |
+ WRITE(LOUT,602) ENAM(1),ELNO(1),ENAM(2),ELNO(2), | |
+ & ENAM(3),ELNO(3),ENAM(4),ELNO(4),ENAM(5),ELNO(5) | |
+ ENDIF | |
+ WRITE(LOUT,301) THERM2(1),THERM2(2),THERM2(3),THERM2(4),THERM2(5) | |
WRITE(LOUT,302) THERM2(6),THERM2(7),THERM1(1),THERM1(2),THERM1(3) | |
WRITE(LOUT,303) THERM1(4),THERM1(5),THERM1(6),THERM1(7) | |
C | |
- 330 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 330 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 331 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 331 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 332 FORMAT(A16,8X,A2,2X,A1,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 332 FORMAT(A16,8X,A2,2X,A1,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 333 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 333 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 334 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
- & '1') | |
- 335 FORMAT(A16,8X,A2,1X,A2,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 334 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 336 FORMAT(A16,8X,A2,A3,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 335 FORMAT(A16,8X,A2,1X,A2,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 337 FORMAT(A16,8X,A2,A3,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
- & '1') | |
- 338 FORMAT(A16,8X,A2,A3,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ 336 FORMAT(A16,8X,A2,A3,A2,2X,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
& '1') | |
- 340 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 337 FORMAT(A16,8X,A2,A3,A2,1X,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ & '1') | |
+ 338 FORMAT(A16,8X,A2,A3,A3,A2,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X, | |
+ & '1') | |
+ 340 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 341 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 341 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 342 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 342 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 343 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 343 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 344 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 344 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 345 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 345 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 346 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 346 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 347 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 347 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 348 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 348 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 350 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 350 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
351 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 352 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 352 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 353 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 353 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 354 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 354 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 355 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 355 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 356 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 356 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 357 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 357 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 358 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 358 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 360 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 360 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
361 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 362 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 362 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 363 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 363 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 364 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 364 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 365 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 365 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 366 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 366 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 367 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 367 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 368 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
+ 368 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,5X,A1,3X,F7.3,2X,F8.3,2X, | |
& F8.3,4X,'1') | |
- 370 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 370 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 371 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 371 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 372 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 372 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 373 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 373 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 374 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 374 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 375 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 375 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 376 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 376 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 377 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 377 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 378 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 378 FORMAT(A16,8X,A2,2X,A1,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 380 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 380 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 381 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 381 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 382 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 382 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 383 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 383 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 384 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 384 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 385 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 385 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 386 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 386 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 387 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 387 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 388 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 388 FORMAT(A16,8X,A2,2X,A1,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 390 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 390 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 391 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 391 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 392 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 392 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 393 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 393 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 394 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 394 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 395 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 395 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 396 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 396 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 397 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 397 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 398 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 398 FORMAT(A16,8X,A2,2X,A1,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 470 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 470 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 471 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 471 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 472 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 472 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 473 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 473 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 474 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 474 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 475 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 475 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 476 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 476 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 477 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 477 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 478 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 478 FORMAT(A16,8X,A2,1X,A2,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 480 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 480 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 481 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 481 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 482 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 482 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 483 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 483 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 484 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 484 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 485 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 485 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 486 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 486 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 487 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 487 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 488 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 488 FORMAT(A16,8X,A2,1X,A2,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 490 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 490 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 491 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 491 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 492 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 492 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 493 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 493 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 494 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 494 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 495 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 495 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 496 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 496 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 497 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 497 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 498 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 498 FORMAT(A16,8X,A2,1X,A2,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 570 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 570 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 571 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 571 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 572 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 572 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 573 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 573 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 574 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 574 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 575 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 575 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 576 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 576 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 577 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 577 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 578 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 578 FORMAT(A16,8X,A2,A3,A2,2X,A1,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 580 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 580 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 581 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 581 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 582 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 582 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 583 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 583 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 584 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 584 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 585 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 585 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 586 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 586 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 587 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 587 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 588 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 588 FORMAT(A16,8X,A2,A3,A2,1X,A2,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 590 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 590 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 591 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 591 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 592 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 592 FORMAT(A16,8X,A2,A3,A2,A3,A2,2X,A1,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 593 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 593 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 594 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 594 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 595 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 595 FORMAT(A16,8X,A2,A3,A2,A3,A2,1X,A2,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 596 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
+ 596 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,2X,A1,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 597 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
+ 597 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,1X,A2,A1,3X,F7.3,2X, | |
& F8.3,2X,F8.3,4X,'1') | |
- 598 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
+ 598 FORMAT(A16,8X,A2,A3,A2,A3,A2,A3,A2,A3,A1,3X,F7.3,2X,F8.3, | |
& 2X,F8.3,4X,'1') | |
- 601 FORMAT(A16,28X,'G',3X,F7.3,2X,F8.3,2X,F8.3,4X,'1&') | |
+ 601 FORMAT(A16,28X,'G',3X,F7.3,2X,F8.3,2X,F8.3,4X,'1&') | |
!' | |
- 602 FORMAT(A2,1X,A3,A2,1X,A3,A2,1X,A3,A2,1X,A3,A2,1X,A3) | |
- 300 FORMAT(A16,8X,A4,A1,A4,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X,'1') | |
+ 602 FORMAT(A2,1X,A3,A2,1X,A3,A2,1X,A3,A2,1X,A3,A2,1X,A3) | |
+ 300 FORMAT(A16,8X,A4,A1,A4,A1,10X,A1,3X,F7.3,2X,F8.3,2X,F8.3,4X,'1') | |
301 FORMAT(ES15.8,ES15.8,ES15.8,ES15.8,ES15.8,4X,'2') | |
302 FORMAT(ES15.8,ES15.8,ES15.8,ES15.8,ES15.8,4X,'3') | |
303 FORMAT(ES15.8,ES15.8,ES15.8,ES15.8,15X,4X,'4') | |
C | |
- ELSEIF (DATATYPE .EQ. 'NIST') THEN | |
-! write(*,*) 'THE COEFFICIENTS OF NIST FORM' | |
-! write(*,*) THERM1(1:7) | |
-! write(*,*) THERM2(1:7) | |
-C | |
- WRITE(LOUT,*) 'The NIST polynomial coefficients calculated:' | |
- WRITE(LOUT,*) 'H0-H0_298=A*t+B*t*t/2+C*t*t*t/3+D*t*t*t*t/4' | |
- WRITE(LOUT,*) ' -E/t+F-H' | |
- WRITE(LOUT,*) 'H=DLTH_formation=',DLTH | |
- WRITE(LOUT,300) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2),'G', | |
- & T_min,T_max,Tint | |
- WRITE(LOUT,301) THERM1(1),THERM1(2),THERM1(3),THERM1(4),THERM1(5) | |
+ ELSEIF (DATATYPE .EQ. 'NIST') THEN | |
+! write(*,*) 'THE COEFFICIENTS OF NIST FORM' | |
+! write(*,*) THERM1(1:7) | |
+! write(*,*) THERM2(1:7) | |
+C | |
+ WRITE(LOUT,*) 'The NIST polynomial coefficients calculated:' | |
+ WRITE(LOUT,*) 'H0-H0_298=A*t+B*t*t/2+C*t*t*t/3+D*t*t*t*t/4' | |
+ WRITE(LOUT,*) ' -E/t+F-H' | |
+ WRITE(LOUT,*) 'H=DLTH_formation=',DLTH | |
+ WRITE(LOUT,300) SNAM,ENAM(1),ELNO(1),ENAM(2),ELNO(2),'G', | |
+ & T_min,T_max,Tint | |
+ WRITE(LOUT,301) THERM1(1),THERM1(2),THERM1(3),THERM1(4),THERM1(5) | |
WRITE(LOUT,302) THERM1(6),THERM1(7),THERM2(1),THERM2(2),THERM2(3) | |
WRITE(LOUT,303) THERM2(4),THERM2(5),THERM2(6),THERM2(7) | |
C | |
- ELSE IF (DATATYPE .EQ. 'NASA') THEN | |
-! write(*,*) 'THE COEFFICIENTS OF NASA FORM' | |
-! write(*,*) THERM1(1:9) | |
-! write(*,*) THERM2(1:9) | |
-! write(*,*) THERM3(1:9) | |
+ ELSE IF (DATATYPE .EQ. 'NASA') THEN | |
+! write(*,*) 'THE COEFFICIENTS OF NASA FORM' | |
+! write(*,*) THERM1(1:9) | |
+! write(*,*) THERM2(1:9) | |
+! write(*,*) THERM3(1:9) | |
C | |
- WRITE(LOUT,*) 'The NASA polynomial coefficients calculated:' | |
- WRITE(LOUT,399) SNAM | |
+ WRITE(LOUT,*) 'The NASA polynomial coefficients calculated:' | |
+ WRITE(LOUT,399) SNAM | |
! HF_298 in 'J/mol' in NASA format: 1 cal = 4.184 J | |
-! WRITE(*,*) MW | |
-! WRITE(*,*) DLTH*4.184D0 | |
- WRITE(LOUT,400) 3,ENAM(1),ELNO(1),'.00',ENAM(2),ELNO(2),'.00', | |
- & ENAM(3),ELNO(3),'.00',ENAM(4),ELNO(4),'.00', | |
+! WRITE(*,*) MW | |
+! WRITE(*,*) DLTH*4.184D0 | |
+ WRITE(LOUT,400) 3,ENAM(1),ELNO(1),'.00',ENAM(2),ELNO(2),'.00', | |
+ & ENAM(3),ELNO(3),'.00',ENAM(4),ELNO(4),'.00', | |
& ENAM(5),ELNO(5),'.00',MW,DLTH*4.184D0 | |
- WRITE(LOUT,401) T_min,Tint,7,'-2.0','-1.0','0.0','1.0','2.0', | |
- & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
- WRITE(LOUT,404) THERM1(1),THERM1(2),THERM1(3),THERM1(4),THERM1(5) | |
+ WRITE(LOUT,401) T_min,Tint,7,'-2.0','-1.0','0.0','1.0','2.0', | |
+ & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
+ WRITE(LOUT,404) THERM1(1),THERM1(2),THERM1(3),THERM1(4),THERM1(5) | |
WRITE(LOUT,404) THERM1(6),THERM1(7),0.D0,THERM1(8),THERM1(9) | |
- WRITE(LOUT,402) Tint,Tint1,7,'-2.0','-1.0','0.0','1.0','2.0', | |
- & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
- WRITE(LOUT,404) THERM2(1),THERM2(2),THERM2(3),THERM2(4),THERM2(5) | |
+ WRITE(LOUT,402) Tint,Tint1,7,'-2.0','-1.0','0.0','1.0','2.0', | |
+ & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
+ WRITE(LOUT,404) THERM2(1),THERM2(2),THERM2(3),THERM2(4),THERM2(5) | |
WRITE(LOUT,404) THERM2(6),THERM2(7),0.D0,THERM2(8),THERM2(9) | |
- WRITE(LOUT,403) Tint1,T_max,7,'-2.0','-1.0','0.0','1.0','2.0', | |
- & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
- WRITE(LOUT,404) THERM3(1),THERM3(2),THERM3(3),THERM3(4),THERM3(5) | |
+ WRITE(LOUT,403) Tint1,T_max,7,'-2.0','-1.0','0.0','1.0','2.0', | |
+ & '3.0','4.0','0.0',DLTH298(THERM1(1:7))*4.184D0 | |
+ WRITE(LOUT,404) THERM3(1),THERM3(2),THERM3(3),THERM3(4),THERM3(5) | |
WRITE(LOUT,404) THERM3(6),THERM3(7),0.D0,THERM3(8),THERM3(9) | |
C | |
- ENDIF | |
+ ENDIF | |
C | |
- 399 FORMAT(A16) | |
- 400 FORMAT(1X,I1,8X,A4,A1,A3,A4,A1,A3,A4,A1,A3,A4,A1,A3,A4,A1,A3, | |
+ 399 FORMAT(A16) | |
+ 400 FORMAT(1X,I1,8X,A4,A1,A3,A4,A1,A3,A4,A1,A3,A4,A1,A3,A4,A1,A3, | |
& 1X,'0',2X,F11.7,4X,F11.3) | |
- 401 FORMAT(4X,F7.3,3X,F7.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
+ 401 FORMAT(4X,F7.3,3X,F7.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
& 2X,A3,2X,A3,6X,F11.3) | |
- 402 FORMAT(4X,F7.3,2X,F8.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
+ 402 FORMAT(4X,F7.3,2X,F8.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
& 2X,A3,2X,A3,6X,F11.3) | |
- 403 FORMAT(3X,F8.3,2X,F8.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
+ 403 FORMAT(3X,F8.3,2X,F8.3,1X,I1,1X,A4,1X,A4,2X,A3,2X,A3,2X,A3,2X,A3, | |
& 2X,A3,2X,A3,6X,F11.3) | |
404 FORMAT(5ES16.9) | |
C | |
- RETURN | |
+ RETURN | |
C | |
- END | |
- | |
+ END | |
C*********************************************************************** | |
C | |
SUBROUTINE DATAGROUP(M_in,TEMP,CPT,CH,CS,LIN) | |
C | |
- INTEGER M_in,I,LIN,IJ,IK,IM | |
- CHARACTER(LEN=4) MARK | |
- CHARACTER(LEN=40) TEXT | |
- DOUBLE PRECISION TEMP,CPT,CH,CS | |
- DIMENSION TEMP(*),CPT(*),CH(*),CS(*) | |
- DOUBLE PRECISION TEMP1,C1,CH1,CS1 | |
-! DIMENSION TEMP1(50),C1(50),CH1(50),CS1(50) | |
+ INTEGER M_in,I,LIN,IJ,IK,IM | |
+ CHARACTER(LEN=4) MARK | |
+ CHARACTER(LEN=40) TEXT | |
+ DOUBLE PRECISION TEMP,CPT,CH,CS | |
+ DIMENSION TEMP(*),CPT(*),CH(*),CS(*) | |
+ DOUBLE PRECISION TEMP1,C1,CH1,CS1 | |
+! DIMENSION TEMP1(50),C1(50),CH1(50),CS1(50) | |
C | |
-! DATA TEMP1/290.262D0, 393.258D0, 496.255D0, 589.888D0, 795.88D0, | |
+! DATA TEMP1/290.262D0, 393.258D0, 496.255D0, 589.888D0, 795.88D0, | |
! & 1001.87D0, 1488.76D0/ | |
C | |
-! DATA C1/17.7725D0, 22.4645D0, 27.0142D0, 30.7109D0, 36.9668D0, | |
-! & 41.8009D0, 49.3365D0/ | |
+! DATA C1/17.7725D0, 22.4645D0, 27.0142D0, 30.7109D0, 36.9668D0, | |
+! & 41.8009D0, 49.3365D0/ | |
C | |
-! DATA CH1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
+! DATA CH1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
C | |
-! DATA CS1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
+! DATA CS1/0.D0,0.D0,0.D0,0.D0,0.D0,0.D0,0.D0/ | |
C | |
- MARK='' | |
- TEXT='' | |
- 100 FORMAT (A4,1X,A40) | |
- 101 FORMAT (A4,1X,F4.0,1X,F8.1) | |
+ MARK='' | |
+ TEXT='' | |
+ 100 FORMAT (A4,1X,A40) | |
+ 101 FORMAT (A4,1X,F4.0,1X,F8.1) | |
C | |
C | |
- DO I=1,M_in | |
- READ(LIN, *) MARK, TEMP(I), CPT(I) | |
- CH(I) = 0.0D0 | |
- CS(I) = 0.0D0 | |
- IF (MARK .NE. 'TECP') THEN | |
- write(*,*) 'Error. Need more TECP' | |
- GOTO 250 | |
- ENDIF | |
- ENDDO | |
+ DO I=1,M_in | |
+ READ(LIN, *) MARK, TEMP(I), CPT(I) | |
+ CH(I) = 0.0D0 | |
+ CS(I) = 0.0D0 | |
+ IF (MARK .NE. 'TECP') THEN | |
+ write(*,*) 'Error. Need more TECP' | |
+ GOTO 250 | |
+ ENDIF | |
+ ENDDO | |
C | |
250 CONTINUE | |
- RETURN | |
+ RETURN | |
C | |
- END | |
\ No newline at end of file | |
+ END | |
\ No newline at end of file | |
diff --git a/source/GATPFit/lsfp_chem1.f b/source/GATPFit/lsfp_chem1.f | |
index 6b9d183..4ecdb00 100644 | |
--- a/source/GATPFit/lsfp_chem1.f | |
+++ b/source/GATPFit/lsfp_chem1.f | |
@@ -1,616 +1,599 @@ | |
-C: Add the constrains to the first and second derivatives | |
-C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
-C: -------------------------------------------------------------- | |
-C: For CHEMKIN | |
-C: Use a single matrix to calculate all 10 coefficients | |
-C: [A]: M x 10 | |
-C: [X]: 10 x 1 (alpha1_low,alpha2_low,alpha3_low,alpha4_low,alpha5_low, | |
-C: alpha1_hig,alpha2_hig,alpha3_hig,alpha4_hig,alpha5_hig) | |
-C: [C]: M x 1 | |
-C: Contrains: CP, dCP/dT, and d2CP/d2T | |
-C: at the intermediate temperature Tint | |
-C: [B]: 3 x 10 | |
-C: [D]: 3 x 1 | |
-C---------------------------------------------------------------- | |
-C FOR CHEMKIN CHEMTHERMO DATA FORMAT | |
-C number of coefficients: N=5 x 2 | |
-C number of discrete data point: M>=N, i.e., M=102 | |
-C | |
-C use the DGGLSE to solve the linear least squares equality-constrained | |
-C (LlSE) problem. | |
-C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
-C: Need to change the value of M according to the size of sample data | |
-!******************************************************************** | |
-! Programmed by John Z. Wen, MIT, June 2005 | |
-!******************************************************************** | |
-C | |
- SUBROUTINE CHEM(Tint,TNEW,THERM1,THERM2,TEMP1,C1,CH1,CS1) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION Tint,TNEW,THERM1,THERM2 | |
- DOUBLE PRECISION H_298,S_298,DLTH | |
-C | |
- INTEGER M,N,P,LDA,LDB,LWORK,INFO,M1 | |
- INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
- INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
- DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
- DOUBLE PRECISION TEMP1,PHI_CHEM1,PHI_CHEM2,PHI_CHEM3, | |
- & PHI_CHEM4,PHI_CHEM5,ROL | |
- DOUBLE PRECISION PHI_CHEM_DCP1,PHI_CHEM_DCP2,PHI_CHEM_DCP3, | |
- & PHI_CHEM_DCP4,PHI_CHEM_DCP5,PHI_CHEM_D2CP1, | |
- & PHI_CHEM_D2CP2,PHI_CHEM_D2CP3,PHI_CHEM_D2CP4, | |
- & PHI_CHEM_D2CP5 | |
- DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2 | |
- DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
- DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
- DOUBLE PRECISION PHI_CHEM_H,PHI_CHEM_S | |
- INTEGER MARK1 | |
- DOUBLE PRECISION TEMP,C | |
-C | |
-C Required by LSEC solver: | |
-! LDA >= MAX(1,M) | |
-! LDB >= MAX(1,P) | |
-! LWORK >= max(1,M+N+P) | |
-! P=1 for only one constrain at the intermediate temp. | |
-! P=3 for three constrains at the intermediate temp. | |
-C | |
-C CHANGE 'LWORK' if NECESSARY | |
- PARAMETER (M=102) | |
- PARAMETER (LDB=3,P=3) | |
- PARAMETER (N=10) | |
- DIMENSION A1(M,N),B1(LDB,N),C1(M-1),D1(P),X1(N),WORK1(M+N+P), | |
- & Bk(LDB,N) | |
- PARAMETER (LDBH=2,PH=2) | |
- PARAMETER (NH=2) | |
- PARAMETER (LDBS=2,PS=2) | |
- PARAMETER (NS=2) | |
- DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-1),DH1(PH),XH1(NH), | |
- & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
- DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-1),DS1(PS),XS1(NS), | |
- & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
- DIMENSION TEMP1(M-1),THERM1(7),THERM2(7) | |
- DIMENSION TEMP(M),C(M) | |
- INTEGER I,J | |
-C | |
-! GAS CONSTANT | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- EXTERNAL PHI_CHEM1,PHI_CHEM2,PHI_CHEM3,PHI_CHEM4,PHI_CHEM5, | |
- & PHI_CHEM_DCP1,PHI_CHEM_DCP2,PHI_CHEM_DCP3, | |
- & PHI_CHEM_DCP4,PHI_CHEM_DCP5,PHI_CHEM_D2CP1, | |
- & PHI_CHEM_D2CP2,PHI_CHEM_D2CP3,PHI_CHEM_D2CP4, | |
- & PHI_CHEM_D2CP5,PHI_CHEM_H,PHI_CHEM_S | |
-C | |
-! WRITE(*,*) 'CALLED CHEM' | |
-C | |
- LDA = M | |
- LWORK = M+N+P | |
- MH = M | |
- LDAH = MH | |
- LWORKH= MH+NH+PH | |
- MS = M | |
- LDAS = MS | |
- LWORKS= MS+NS+PS | |
-C | |
-C FIND 'Tint' and 'Tint1' in sample data | |
-C | |
- DO I=1,M-1 | |
- IF (TEMP1(I) .GT. Tint) THEN | |
- MARK1=I-1 | |
- IF (Tint .NE. TEMP1(I-1)) THEN | |
- Tint=TEMP1(I-1) | |
- TNEW=Tint | |
-! WRITE(*,*) 'Tint has been replaced!' | |
- ENDIF | |
- GOTO 995 | |
- ENDIF | |
- ENDDO | |
- 995 CONTINUE | |
-! WRITE(*,*) 'MARK1=',MARK1 | |
-C | |
-C Rearrange the matrics | |
-C | |
- DO I=1,M | |
- TEMP(I)=0.D0 | |
- C (I)=0.D0 | |
- CH (I)=0.D0 | |
- CS (I)=0.D0 | |
- CH2 (I)=0.D0 | |
- CS2 (I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- TEMP(I)=TEMP1(I) | |
- C (I)=C1(I) | |
- CH(I)=CH1(I) | |
- CS(I)=CS1(I) | |
- ENDDO | |
- TEMP(MARK1+1)=TEMP(MARK1) | |
- C (MARK1+1)=C (MARK1) | |
- CH(MARK1+1)=CH(MARK1) | |
- CS(MARK1+1)=CS(MARK1) | |
- DO I=MARK1+2,M | |
- TEMP(I)=TEMP1(I-1) | |
- C (I)=C1 (I-1) | |
- CH(I)=CH1(I-1) | |
- CS(I)=CS1(I-1) | |
- ENDDO | |
-C | |
-! WRITE(*,*) 'Tint=', Tint | |
-! WRITE(*,*) TEMP | |
-! WRITE(*,*) C | |
-! WRITE(*,*) CH | |
-! WRITE(*,*) CS | |
-! PAUSE | |
-C | |
- DO I=1,N | |
- X1(I)=0.D0 | |
- ENDDO | |
- DO I=1,N | |
- DO J=1,LDA | |
- A1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDB | |
- B1(J,I)=0.D0 | |
- Bk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORK | |
- WORK1(I)=0.D0 | |
- ENDDO | |
-C | |
-! For PHI matrix, first temperature range | |
- DO I=1,MARK1 | |
- A1(I,1)=PHI_CHEM1(TEMP(I)) | |
- A1(I,2)=PHI_CHEM2(TEMP(I)) | |
- A1(I,3)=PHI_CHEM3(TEMP(I)) | |
- A1(I,4)=PHI_CHEM4(TEMP(I)) | |
- A1(I,5)=PHI_CHEM5(TEMP(I)) | |
- ENDDO | |
-! For PHI matrix, second temperature range | |
- DO I=MARK1+1,M | |
- A1(I,6) =PHI_CHEM1(TEMP(I)) | |
- A1(I,7) =PHI_CHEM2(TEMP(I)) | |
- A1(I,8) =PHI_CHEM3(TEMP(I)) | |
- A1(I,9) =PHI_CHEM4(TEMP(I)) | |
- A1(I,10)=PHI_CHEM5(TEMP(I)) | |
- ENDDO | |
-C | |
-! WRITE(*,*) TEMP1 | |
-! WRITE(*,*) C1 | |
-! PAUSE | |
-C | |
-C For Constrains at Tint ------------------------ | |
-C | |
-! For CP values | |
- Bk(1,1) = PHI_CHEM1(Tint) | |
- Bk(1,2) = PHI_CHEM2(Tint) | |
- Bk(1,3) = PHI_CHEM3(Tint) | |
- Bk(1,4) = PHI_CHEM4(Tint) | |
- Bk(1,5) = PHI_CHEM5(Tint) | |
- Bk(1,6) =-PHI_CHEM1(Tint) | |
- Bk(1,7) =-PHI_CHEM2(Tint) | |
- Bk(1,8) =-PHI_CHEM3(Tint) | |
- Bk(1,9) =-PHI_CHEM4(Tint) | |
- Bk(1,10)=-PHI_CHEM5(Tint) | |
- D1(1)=0.D0 | |
-C For DCp values | |
- Bk(2,1) = PHI_CHEM_DCP1(Tint) | |
- Bk(2,2) = PHI_CHEM_DCP2(Tint) | |
- Bk(2,3) = PHI_CHEM_DCP3(Tint) | |
- Bk(2,4) = PHI_CHEM_DCP4(Tint) | |
- Bk(2,5) = PHI_CHEM_DCP5(Tint) | |
- Bk(2,6) =-PHI_CHEM_DCP1(Tint) | |
- Bk(2,7) =-PHI_CHEM_DCP2(Tint) | |
- Bk(2,8) =-PHI_CHEM_DCP3(Tint) | |
- Bk(2,9) =-PHI_CHEM_DCP4(Tint) | |
- Bk(2,10)=-PHI_CHEM_DCP5(Tint) | |
- D1(2)=0.D0 | |
-C For D2Cp values | |
- Bk(3,1) = PHI_CHEM_D2CP1(Tint) | |
- Bk(3,2) = PHI_CHEM_D2CP2(Tint) | |
- Bk(3,3) = PHI_CHEM_D2CP3(Tint) | |
- Bk(3,4) = PHI_CHEM_D2CP4(Tint) | |
- Bk(3,5) = PHI_CHEM_D2CP5(Tint) | |
- Bk(3,6) =-PHI_CHEM_D2CP1(Tint) | |
- Bk(3,7) =-PHI_CHEM_D2CP2(Tint) | |
- Bk(3,8) =-PHI_CHEM_D2CP3(Tint) | |
- Bk(3,9) =-PHI_CHEM_D2CP4(Tint) | |
- Bk(3,10)=-PHI_CHEM_D2CP5(Tint) | |
- D1(3)=0.D0 | |
-C | |
- DO I=1,N | |
- DO J=1,LDB | |
- B1(J,I)=Bk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
-! CHEM FORMAT----------------------------------------- | |
-C | |
- call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
-! WRITE(*,*) 'X1=',X1(1:10) | |
-! pause | |
-C | |
-C For enthalpy, NEED define 2 coeffs, N=2 | |
-C | |
- DO I=1,NH | |
- XH1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NH | |
- DO J=1,LDAH | |
- AH1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBH | |
- BH1(J,I)=0.D0 | |
- BHk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKH | |
- WORKH(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CH2(I)=CH(I) - PHI_CHEM_H(TEMP(I),X1(1:5)) | |
- ENDDO | |
- DO I=MARK1+1,MH | |
- CH2(I)=CH(I) - PHI_CHEM_H(TEMP(I),X1(6:10)) | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- AH1(I,1)=ROL/1000.d0 | |
- ENDDO | |
- DO I=MARK1+1,MH | |
- AH1(I,2)=ROL/1000.d0 | |
- ENDDO | |
-C | |
-C Contrain for H at Tint | |
-C | |
- BHk(1,1)=ROL/1000.d0 | |
- BHk(1,2)=-ROL/1000.d0 | |
- DH1(1)=PHI_CHEM_H(Tint,X1(6:10)) | |
- & -PHI_CHEM_H(Tint,X1(1:5)) | |
-C | |
-C Contrain for H at 298.15K | |
-C | |
- BHk(2,1)=ROL/1000.d0 | |
- BHk(2,2)=0.D0 | |
- DH1(2)=DLTH - PHI_CHEM_H(298.15D0,X1(1:5)) | |
-C | |
- DO I=1,NH | |
- DO J=1,LDBH | |
- BH1(J,I)=BHk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
- & LWORKH,INFO) | |
-! WRITE(*,*) 'H_CONST1=',XH1(1) | |
-! WRITE(*,*) 'H_CONST2=',XH1(2) | |
-C | |
- A_H1=XH1(1) | |
- A_H2=XH1(2) | |
-C | |
-C For entropy, NEED define 2 coeffs, N=2 | |
- DO I=1,NS | |
- XS1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NS | |
- DO J=1,LDAS | |
- AS1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBS | |
- BS1(J,I)=0.D0 | |
- BSk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKS | |
- WORKS(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CS2(I)=CS(I) - PHI_CHEM_S(TEMP(I),X1(1:5)) | |
- ENDDO | |
- DO I=MARK1+1,MS | |
- CS2(I)=CS(I) - PHI_CHEM_S(TEMP(I),X1(6:10)) | |
- ENDDO | |
- DO I=1,MARK1 | |
- AS1(I,1)=ROL | |
- ENDDO | |
- DO I=MARK1+1,MS | |
- AS1(I,2)=ROL | |
- ENDDO | |
-C | |
-C Contrain for S at Tint | |
-C | |
- BSk(1,1)=ROL | |
- BSk(1,2)=-ROL | |
- DS1(1)=PHI_CHEM_S(Tint,X1(6:10)) | |
- & -PHI_CHEM_S(Tint,X1(1:5)) | |
-C | |
-C Contrain for S at 298.15K | |
-C | |
- BSk(2,1)=ROL | |
- BSk(2,2)=0.D0 | |
- DS1(2)=S_298 - PHI_CHEM_S(298.15D0,X1(1:5)) | |
-C | |
- DO I=1,NS | |
- DO J=1,LDBS | |
- BS1(J,I)=BSk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
- & LWORKS,INFO) | |
-! WRITE(*,*) XS1 | |
-! WRITE(*,*) 'S_CONST1=',XS1(1) | |
-! WRITE(*,*) 'S_CONST2=',XS1(2) | |
-C | |
- A_S1=XS1(1) | |
- A_S2=XS1(2) | |
-C | |
-C | |
- DO I=1,5 | |
- THERM1(I)=X1(I) | |
- ENDDO | |
- THERM1(5+1)=A_H1 | |
- THERM1(5+2)=A_S1 | |
- DO I=1,5 | |
- THERM2(I)=X1(I+5) | |
- ENDDO | |
- THERM2(5+1)=A_H2 | |
- THERM2(5+2)=A_S2 | |
-C | |
-! WRITE(*,*) 'CHEM OVER' | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM1=ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM2=ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM3=ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM4=ROL*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM5=ROL*TEM*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_DCP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_DCP1=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_DCP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_DCP2=ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_DCP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_DCP3=2.D0*ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_DCP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_DCP4=3.D0*ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_DCP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_DCP5=4.D0*ROL*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_D2CP1=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_D2CP2=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_D2CP3=2.D0*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_D2CP4=6.D0*ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_D2CP5=12.D0*ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_H(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
- DIMENSION alpha(5) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_CHEM_H=(alpha(1)*TEM+alpha(2)*TEM*TEM/2.D0 | |
- & +alpha(3)*TEM*TEM*TEM/3.D0+alpha(4)*TEM*TEM*TEM*TEM/4.D0 | |
- & +alpha(5)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL/1000.d0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_CHEM_S(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
- DIMENSION alpha(5) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
-! WRITE(*,*) ALPHA(1:5) | |
-! WRITE(*,*) TEM | |
- PHI_CHEM_S=(alpha(1)*DLOG(TEM)+alpha(2)*TEM | |
- & +alpha(3)*TEM*TEM/2.D0+alpha(4)*TEM*TEM*TEM/3.D0 | |
- & +alpha(5)*TEM*TEM*TEM*TEM/4.D0)*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
+C: Add the constrains to the first and second derivatives | |
+C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
+C: -------------------------------------------------------------- | |
+C: For CHEMKIN | |
+C: Use a single matrix to calculate all 10 coefficients | |
+C: [A]: M x 10 | |
+C: [X]: 10 x 1 (alpha1_low,alpha2_low,alpha3_low,alpha4_low,alpha5_low, | |
+C: alpha1_hig,alpha2_hig,alpha3_hig,alpha4_hig,alpha5_hig) | |
+C: [C]: M x 1 | |
+C: Contrains: CP, dCP/dT, and d2CP/d2T | |
+C: at the intermediate temperature Tint | |
+C: [B]: 3 x 10 | |
+C: [D]: 3 x 1 | |
+C---------------------------------------------------------------- | |
+C FOR CHEMKIN CHEMTHERMO DATA FORMAT | |
+C number of coefficients: N=5 x 2 | |
+C number of discrete data point: M>=N, i.e., M=102 | |
+C | |
+C use the DGGLSE to solve the linear least squares equality-constrained | |
+C (LlSE) problem. | |
+C%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
+C: Need to change the value of M according to the size of sample data | |
+!******************************************************************** | |
+! Programmed by John Z. Wen, MIT, June 2005 | |
+!******************************************************************** | |
+C | |
+ SUBROUTINE CHEM(Tint,TNEW,THERM1,THERM2,TEMP1,C1,CH1,CS1) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION Tint,TNEW,THERM1,THERM2 | |
+ DOUBLE PRECISION H_298,S_298,DLTH | |
+C | |
+ INTEGER M,N,P,LDA,LDB,LWORK,INFO,M1 | |
+ INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
+ INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
+ DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
+ DOUBLE PRECISION TEMP1,PHI_CHEM1,PHI_CHEM2,PHI_CHEM3, | |
+ & PHI_CHEM4,PHI_CHEM5,ROL | |
+ DOUBLE PRECISION PHI_CHEM_DCP1,PHI_CHEM_DCP2,PHI_CHEM_DCP3, | |
+ & PHI_CHEM_DCP4,PHI_CHEM_DCP5,PHI_CHEM_D2CP1, | |
+ & PHI_CHEM_D2CP2,PHI_CHEM_D2CP3,PHI_CHEM_D2CP4, | |
+ & PHI_CHEM_D2CP5 | |
+ DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2 | |
+ DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
+ DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
+ DOUBLE PRECISION PHI_CHEM_H,PHI_CHEM_S | |
+ INTEGER MARK1 | |
+ DOUBLE PRECISION TEMP,C | |
+C | |
+C Required by LSEC solver: | |
+! LDA >= MAX(1,M) | |
+! LDB >= MAX(1,P) | |
+! LWORK >= max(1,M+N+P) | |
+! P=1 for only one constrain at the intermediate temp. | |
+! P=3 for three constrains at the intermediate temp. | |
+C | |
+C CHANGE 'LWORK' if NECESSARY | |
+ PARAMETER (M=102) | |
+ PARAMETER (LDB=3,P=3) | |
+ PARAMETER (N=10) | |
+ DIMENSION A1(M,N),B1(LDB,N),C1(M-1),D1(P),X1(N),WORK1(M+N+P), | |
+ & Bk(LDB,N) | |
+ PARAMETER (LDBH=2,PH=2) | |
+ PARAMETER (NH=2) | |
+ PARAMETER (LDBS=2,PS=2) | |
+ PARAMETER (NS=2) | |
+ DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-1),DH1(PH),XH1(NH), | |
+ & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
+ DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-1),DS1(PS),XS1(NS), | |
+ & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
+ DIMENSION TEMP1(M-1),THERM1(7),THERM2(7) | |
+ DIMENSION TEMP(M),C(M) | |
+ INTEGER I,J | |
+C | |
+! GAS CONSTANT | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ EXTERNAL PHI_CHEM1,PHI_CHEM2,PHI_CHEM3,PHI_CHEM4,PHI_CHEM5, | |
+ & PHI_CHEM_DCP1,PHI_CHEM_DCP2,PHI_CHEM_DCP3, | |
+ & PHI_CHEM_DCP4,PHI_CHEM_DCP5,PHI_CHEM_D2CP1, | |
+ & PHI_CHEM_D2CP2,PHI_CHEM_D2CP3,PHI_CHEM_D2CP4, | |
+ & PHI_CHEM_D2CP5,PHI_CHEM_H,PHI_CHEM_S | |
+C | |
+! WRITE(*,*) 'CALLED CHEM' | |
+C | |
+ LDA = M | |
+ LWORK = M+N+P | |
+ MH = M | |
+ LDAH = MH | |
+ LWORKH= MH+NH+PH | |
+ MS = M | |
+ LDAS = MS | |
+ LWORKS= MS+NS+PS | |
+C | |
+C FIND 'Tint' and 'Tint1' in sample data | |
+C | |
+ MARK1 = 0 | |
+ DO I=1,M-1 | |
+ IF (TEMP1(I) .GT. Tint) THEN | |
+ MARK1=I-1 | |
+ IF (Tint .NE. TEMP1(I-1)) THEN | |
+ Tint=TEMP1(I-1) | |
+ TNEW=Tint | |
+! WRITE(*,*) 'Tint has been replaced!' | |
+ ENDIF | |
+ GOTO 995 | |
+ ENDIF | |
+ ENDDO | |
+ 995 CONTINUE | |
+! WRITE(*,*) 'MARK1=',MARK1 | |
+C | |
+C Rearrange the matrics | |
+C | |
+ DO I=1,M | |
+ TEMP(I)=0.D0 | |
+ C (I)=0.D0 | |
+ CH (I)=0.D0 | |
+ CS (I)=0.D0 | |
+ CH2 (I)=0.D0 | |
+ CS2 (I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ TEMP(I)=TEMP1(I) | |
+ C (I)=C1(I) | |
+ CH(I)=CH1(I) | |
+ CS(I)=CS1(I) | |
+ ENDDO | |
+ TEMP(MARK1+1)=TEMP(MARK1) | |
+ C (MARK1+1)=C (MARK1) | |
+ CH(MARK1+1)=CH(MARK1) | |
+ CS(MARK1+1)=CS(MARK1) | |
+ DO I=MARK1+2,M | |
+ TEMP(I)=TEMP1(I-1) | |
+ C (I)=C1 (I-1) | |
+ CH(I)=CH1(I-1) | |
+ CS(I)=CS1(I-1) | |
+ ENDDO | |
+C | |
+! WRITE(*,*) 'Tint=', Tint | |
+! WRITE(*,*) TEMP | |
+! WRITE(*,*) C | |
+! WRITE(*,*) CH | |
+! WRITE(*,*) CS | |
+! PAUSE | |
+C | |
+ DO I=1,N | |
+ X1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,N | |
+ DO J=1,LDA | |
+ A1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDB | |
+ B1(J,I)=0.D0 | |
+ Bk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORK | |
+ WORK1(I)=0.D0 | |
+ ENDDO | |
+C | |
+! For PHI matrix, first temperature range | |
+ DO I=1,MARK1 | |
+ A1(I,1)=PHI_CHEM1(TEMP(I)) | |
+ A1(I,2)=PHI_CHEM2(TEMP(I)) | |
+ A1(I,3)=PHI_CHEM3(TEMP(I)) | |
+ A1(I,4)=PHI_CHEM4(TEMP(I)) | |
+ A1(I,5)=PHI_CHEM5(TEMP(I)) | |
+ ENDDO | |
+! For PHI matrix, second temperature range | |
+ DO I=MARK1+1,M | |
+ A1(I,6) =PHI_CHEM1(TEMP(I)) | |
+ A1(I,7) =PHI_CHEM2(TEMP(I)) | |
+ A1(I,8) =PHI_CHEM3(TEMP(I)) | |
+ A1(I,9) =PHI_CHEM4(TEMP(I)) | |
+ A1(I,10)=PHI_CHEM5(TEMP(I)) | |
+ ENDDO | |
+C | |
+! WRITE(*,*) TEMP1 | |
+! WRITE(*,*) C1 | |
+! PAUSE | |
+C | |
+C For Constrains at Tint ------------------------ | |
+C | |
+! For CP values | |
+ Bk(1,1) = PHI_CHEM1(Tint) | |
+ Bk(1,2) = PHI_CHEM2(Tint) | |
+ Bk(1,3) = PHI_CHEM3(Tint) | |
+ Bk(1,4) = PHI_CHEM4(Tint) | |
+ Bk(1,5) = PHI_CHEM5(Tint) | |
+ Bk(1,6) =-PHI_CHEM1(Tint) | |
+ Bk(1,7) =-PHI_CHEM2(Tint) | |
+ Bk(1,8) =-PHI_CHEM3(Tint) | |
+ Bk(1,9) =-PHI_CHEM4(Tint) | |
+ Bk(1,10)=-PHI_CHEM5(Tint) | |
+ D1(1)=0.D0 | |
+C For DCp values | |
+ Bk(2,1) = PHI_CHEM_DCP1(Tint) | |
+ Bk(2,2) = PHI_CHEM_DCP2(Tint) | |
+ Bk(2,3) = PHI_CHEM_DCP3(Tint) | |
+ Bk(2,4) = PHI_CHEM_DCP4(Tint) | |
+ Bk(2,5) = PHI_CHEM_DCP5(Tint) | |
+ Bk(2,6) =-PHI_CHEM_DCP1(Tint) | |
+ Bk(2,7) =-PHI_CHEM_DCP2(Tint) | |
+ Bk(2,8) =-PHI_CHEM_DCP3(Tint) | |
+ Bk(2,9) =-PHI_CHEM_DCP4(Tint) | |
+ Bk(2,10)=-PHI_CHEM_DCP5(Tint) | |
+ D1(2)=0.D0 | |
+C For D2Cp values | |
+ Bk(3,1) = PHI_CHEM_D2CP1(Tint) | |
+ Bk(3,2) = PHI_CHEM_D2CP2(Tint) | |
+ Bk(3,3) = PHI_CHEM_D2CP3(Tint) | |
+ Bk(3,4) = PHI_CHEM_D2CP4(Tint) | |
+ Bk(3,5) = PHI_CHEM_D2CP5(Tint) | |
+ Bk(3,6) =-PHI_CHEM_D2CP1(Tint) | |
+ Bk(3,7) =-PHI_CHEM_D2CP2(Tint) | |
+ Bk(3,8) =-PHI_CHEM_D2CP3(Tint) | |
+ Bk(3,9) =-PHI_CHEM_D2CP4(Tint) | |
+ Bk(3,10)=-PHI_CHEM_D2CP5(Tint) | |
+ D1(3)=0.D0 | |
+C | |
+ DO I=1,N | |
+ DO J=1,LDB | |
+ B1(J,I)=Bk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+! CHEM FORMAT----------------------------------------- | |
+C | |
+ call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
+! WRITE(*,*) 'X1=',X1(1:10) | |
+! pause | |
+C | |
+C For enthalpy, NEED define 2 coeffs, N=2 | |
+C | |
+ DO I=1,NH | |
+ XH1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NH | |
+ DO J=1,LDAH | |
+ AH1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBH | |
+ BH1(J,I)=0.D0 | |
+ BHk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKH | |
+ WORKH(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CH2(I)=CH(I) - PHI_CHEM_H(TEMP(I),X1(1:5)) | |
+ ENDDO | |
+ DO I=MARK1+1,MH | |
+ CH2(I)=CH(I) - PHI_CHEM_H(TEMP(I),X1(6:10)) | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ AH1(I,1)=ROL/1000.d0 | |
+ ENDDO | |
+ DO I=MARK1+1,MH | |
+ AH1(I,2)=ROL/1000.d0 | |
+ ENDDO | |
+C | |
+C Contrain for H at Tint | |
+C | |
+ BHk(1,1)=ROL/1000.d0 | |
+ BHk(1,2)=-ROL/1000.d0 | |
+ DH1(1)=PHI_CHEM_H(Tint,X1(6:10)) | |
+ & -PHI_CHEM_H(Tint,X1(1:5)) | |
+C | |
+C Contrain for H at 298.15K | |
+C | |
+ BHk(2,1)=ROL/1000.d0 | |
+ BHk(2,2)=0.D0 | |
+ DH1(2)=DLTH - PHI_CHEM_H(298.15D0,X1(1:5)) | |
+C | |
+ DO I=1,NH | |
+ DO J=1,LDBH | |
+ BH1(J,I)=BHk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
+ & LWORKH,INFO) | |
+! WRITE(*,*) 'H_CONST1=',XH1(1) | |
+! WRITE(*,*) 'H_CONST2=',XH1(2) | |
+C | |
+ A_H1=XH1(1) | |
+ A_H2=XH1(2) | |
+C | |
+C For entropy, NEED define 2 coeffs, N=2 | |
+ DO I=1,NS | |
+ XS1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NS | |
+ DO J=1,LDAS | |
+ AS1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBS | |
+ BS1(J,I)=0.D0 | |
+ BSk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKS | |
+ WORKS(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CS2(I)=CS(I) - PHI_CHEM_S(TEMP(I),X1(1:5)) | |
+ ENDDO | |
+ DO I=MARK1+1,MS | |
+ CS2(I)=CS(I) - PHI_CHEM_S(TEMP(I),X1(6:10)) | |
+ ENDDO | |
+ DO I=1,MARK1 | |
+ AS1(I,1)=ROL | |
+ ENDDO | |
+ DO I=MARK1+1,MS | |
+ AS1(I,2)=ROL | |
+ ENDDO | |
+C | |
+C Contrain for S at Tint | |
+C | |
+ BSk(1,1)=ROL | |
+ BSk(1,2)=-ROL | |
+ DS1(1)=PHI_CHEM_S(Tint,X1(6:10)) | |
+ & -PHI_CHEM_S(Tint,X1(1:5)) | |
+C | |
+C Contrain for S at 298.15K | |
+C | |
+ BSk(2,1)=ROL | |
+ BSk(2,2)=0.D0 | |
+ DS1(2)=S_298 - PHI_CHEM_S(298.15D0,X1(1:5)) | |
+C | |
+ DO I=1,NS | |
+ DO J=1,LDBS | |
+ BS1(J,I)=BSk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
+ & LWORKS,INFO) | |
+! WRITE(*,*) XS1 | |
+! WRITE(*,*) 'S_CONST1=',XS1(1) | |
+! WRITE(*,*) 'S_CONST2=',XS1(2) | |
+C | |
+ A_S1=XS1(1) | |
+ A_S2=XS1(2) | |
+C | |
+C | |
+ DO I=1,5 | |
+ THERM1(I)=X1(I) | |
+ ENDDO | |
+ THERM1(5+1)=A_H1 | |
+ THERM1(5+2)=A_S1 | |
+ DO I=1,5 | |
+ THERM2(I)=X1(I+5) | |
+ ENDDO | |
+ THERM2(5+1)=A_H2 | |
+ THERM2(5+2)=A_S2 | |
+C | |
+! WRITE(*,*) 'CHEM OVER' | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM1=ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM2=ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM3=ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM4=ROL*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM5=ROL*TEM*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_DCP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_DCP1=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_DCP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_DCP2=ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_DCP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_DCP3=2.D0*ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_DCP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_DCP4=3.D0*ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_DCP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_DCP5=4.D0*ROL*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_D2CP1=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_D2CP2=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_D2CP3=2.D0*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_D2CP4=6.D0*ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_D2CP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_D2CP5=12.D0*ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_H(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
+ DIMENSION alpha(5) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_CHEM_H=(alpha(1)*TEM+alpha(2)*TEM*TEM/2.D0 | |
+ & +alpha(3)*TEM*TEM*TEM/3.D0+alpha(4)*TEM*TEM*TEM*TEM/4.D0 | |
+ & +alpha(5)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL/1000.d0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_CHEM_S(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
+ DIMENSION alpha(5) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+! WRITE(*,*) ALPHA(1:5) | |
+! WRITE(*,*) TEM | |
+ PHI_CHEM_S=(alpha(1)*DLOG(TEM)+alpha(2)*TEM | |
+ & +alpha(3)*TEM*TEM/2.D0+alpha(4)*TEM*TEM*TEM/3.D0 | |
+ & +alpha(5)*TEM*TEM*TEM*TEM/4.D0)*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
diff --git a/source/GATPFit/lsfp_nasa.f b/source/GATPFit/lsfp_nasa.f | |
index 6081d16..0775c88 100644 | |
--- a/source/GATPFit/lsfp_nasa.f | |
+++ b/source/GATPFit/lsfp_nasa.f | |
@@ -1,889 +1,866 @@ | |
-C: Add the constrains to the first and second derivatives | |
-C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
-C: at each intermediate temperature | |
-C: -------------------------------------------------------------- | |
-C: For NASA | |
-C: Use a single matrix to calculate all 21 coefficients | |
-C: [A]: M x 21 | |
-C: [X]: 21 x 1 | |
-C: [alpha1_l,alpha2_l,alpha3_l,alpha4_l,alpha5_l,alpha6_l,alpha7_l, | |
-C: [alpha1_m,alpha2_m,alpha3_m,alpha4_m,alpha5_m,alpha6_m,alpha7_m, | |
-C: [alpha1_h,alpha2_h,alpha3_h,alpha4_h,alpha5_h,alpha6_h,alpha7_h] | |
-C: [C]: M x 1 | |
-C: Contrains at both temperatures: | |
-C: [B]: 6 x 21 | |
-C: [D]: 6 x 1 | |
-C---------------------------------------------------------------- | |
-C FOR NASA CHEMTHERMO DATA FORMAT | |
-C number of coefficients: N=7 x 3 | |
-C number of discrete data point: M>=N, i.e., M=103 | |
-C | |
-C use the DGGLSE to solve the linear least squares equality-constrained | |
-C (LLSE) problem. | |
-!**************************************************************** | |
-! Programmed by John Z. Wen, MIT, June 2005 | |
-!**************************************************************** | |
-C | |
- SUBROUTINE NASA(Tint,TNEW,Tint1,T1NEW, | |
- & THERM1,THERM2,THERM3,TEMP1,C1,CH1,CS1) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION Tint,Tint1,THERM1,THERM2,THERM3,TNEW,T1NEW | |
- DOUBLE PRECISION H_298,S_298,DLTH,ROL | |
-C | |
- INTEGER M,N,P,LDA,LDB,LWORK,INFO | |
- INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
- INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
- DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
- DOUBLE PRECISION TEMP1,PHI_NASA1,PHI_NASA2,PHI_NASA3, | |
- & PHI_NASA4,PHI_NASA5,PHI_NASA6,PHI_NASA7 | |
- DOUBLE PRECISION PHI_NASA_DCP1,PHI_NASA_DCP2,PHI_NASA_DCP3, | |
- & PHI_NASA_DCP4,PHI_NASA_DCP5,PHI_NASA_DCP6,PHI_NASA_DCP7, | |
- & PHI_NASA_D2CP1,PHI_NASA_D2CP2,PHI_NASA_D2CP3, | |
- & PHI_NASA_D2CP4,PHI_NASA_D2CP5,PHI_NASA_D2CP6, | |
- & PHI_NASA_D2CP7 | |
- DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2,A_H3,A_S3 | |
- DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
- DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
- DOUBLE PRECISION PHI_NASA_H,PHI_NASA_S | |
- INTEGER MARK1,MARK2 | |
- DOUBLE PRECISION TEMP,C | |
-C: Required by llse solver: | |
-! LDA >= MAX(1,M) | |
-! LDB >= MAX(1,P) | |
-! LWORK >= max(1,M+N+P) | |
-! P=1 for only one constrain at the intermediate temp. | |
-! P=3 for three constrains at the intermediate temp. | |
- PARAMETER (M=103) | |
- PARAMETER (LDB=6,P=6) | |
- PARAMETER (N=21) | |
- DIMENSION A1(M,N),B1(LDB,N),C1(M-2),D1(P),X1(N),WORK1(M+N+P), | |
- & Bk(LDB,N) | |
- PARAMETER (LDBH=3,PH=3) | |
- PARAMETER (NH=3) | |
- PARAMETER (LDBS=3,PS=3) | |
- PARAMETER (NS=3) | |
- DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-2),DH1(PH),XH1(NH), | |
- & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
- DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-2),DS1(PS),XS1(NS), | |
- & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
- DIMENSION TEMP1(M-2),THERM1(20),THERM2(20),THERM3(20) | |
- DIMENSION TEMP(M),C(M) | |
- INTEGER I,J | |
-C | |
-! GAS CONSTANT | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- EXTERNAL PHI_NASA1,PHI_NASA2,PHI_NASA3,PHI_NASA4,PHI_NASA5, | |
- & PHI_NASA6,PHI_NASA7, | |
- & PHI_NASA_DCP1,PHI_NASA_DCP2,PHI_NASA_DCP3, | |
- & PHI_NASA_DCP4,PHI_NASA_DCP5,PHI_NASA_DCP6, | |
- & PHI_NASA_DCP7, | |
- & PHI_NASA_D2CP1,PHI_NASA_D2CP2,PHI_NASA_D2CP3, | |
- & PHI_NASA_D2CP4,PHI_NASA_D2CP5,PHI_NASA_D2CP6, | |
- & PHI_NASA_D2CP7, | |
- & PHI_NASA_H,PHI_NASA_S | |
-C | |
-! WRITE(*,*) 'CALLED NASA' | |
-C | |
- LDA = M | |
- LWORK = M+N+P | |
- MH = M | |
- LDAH = MH | |
- LWORKH= MH+NH+PH | |
- MS = M | |
- LDAS = MS | |
- LWORKS= MS+NS+PS | |
-C | |
-C FIND 'Tint' and 'Tint1' in sample data | |
-C | |
- DO I=1,M-2 | |
- IF (TEMP1(I) .GT. Tint) THEN | |
- MARK1=I-1 | |
- IF (Tint .NE. TEMP1(I-1)) THEN | |
- Tint=TEMP1(I-1) | |
- TNEW=Tint | |
-! WRITE(*,*) 'Tint has been replaced!' | |
- ENDIF | |
- GOTO 995 | |
- ENDIF | |
- ENDDO | |
- 995 CONTINUE | |
-! WRITE(*,*) 'MARK1=',MARK1 | |
-C | |
- DO I=1,M-2 | |
- IF (TEMP1(I) .GT. Tint1) THEN | |
- MARK2=I-1 | |
- IF (Tint1 .NE. TEMP1(I-1)) THEN | |
- Tint1=TEMP1(I-1) | |
- T1NEW=Tint1 | |
-! WRITE(*,*) 'Tint1 has been replaced!' | |
- ENDIF | |
- GOTO 996 | |
- ENDIF | |
- ENDDO | |
- 996 CONTINUE | |
-! WRITE(*,*) 'MARK2=',MARK2 | |
-C | |
-C Rearrange the matrics | |
-C | |
- DO I=1,M | |
- TEMP(I)=0.D0 | |
- C (I)=0.D0 | |
- CH (I)=0.D0 | |
- CS (I)=0.D0 | |
- CH2 (I)=0.D0 | |
- CS2 (I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- TEMP(I)=TEMP1(I) | |
- C (I)=C1 (I) | |
- CH (I)=CH1 (I) | |
- CS (I)=CS1 (I) | |
- ENDDO | |
- TEMP(MARK1+1)=TEMP(MARK1) | |
- C (MARK1+1)=C (MARK1) | |
- CH (MARK1+1)=CH (MARK1) | |
- CS (MARK1+1)=CS (MARK1) | |
- DO I=MARK1+2,MARK2+1 | |
- TEMP(I)=TEMP1(I-1) | |
- C (I)=C1 (I-1) | |
- CH (I)=CH1 (I-1) | |
- CS (I)=CS1 (I-1) | |
- ENDDO | |
- TEMP(MARK2+2)=TEMP(MARK2+1) | |
- C (MARK2+2)=C (MARK2+1) | |
- CH (MARK2+2)=CH (MARK2+1) | |
- CS (MARK2+2)=CS (MARK2+1) | |
- DO I=MARK2+3,M | |
- TEMP(I)=TEMP1(I-2) | |
- C (I)=C1 (I-2) | |
- CH (I)=CH1 (I-2) | |
- CS (I)=CS1 (I-2) | |
- ENDDO | |
-! WRITE(*,*) 'Tint =', Tint | |
-! WRITE(*,*) 'Tint1=', Tint1 | |
-! WRITE(*,*) TEMP | |
-! WRITE(*,*) C | |
-! WRITE(*,*) CH | |
-! WRITE(*,*) CS | |
-C | |
-C: Redefine the MARKS | |
-C | |
- DO I=1,M | |
- IF (TEMP(I) .EQ. Tint ) THEN | |
- MARK1=I | |
- GOTO 997 | |
- ENDIF | |
- ENDDO | |
- 997 CONTINUE | |
- DO I=1,M | |
- IF (TEMP(I) .EQ. Tint1) THEN | |
- MARK2=I | |
- GOTO 998 | |
- ENDIF | |
- ENDDO | |
- 998 CONTINUE | |
-! WRITE(*,*) 'MARK1 =', MARK1 | |
-! WRITE(*,*) 'MARK2 =', MARK2 | |
-! PAUSE | |
-C | |
- DO I=1,N | |
- X1(I)=0.D0 | |
- ENDDO | |
- DO I=1,N | |
- DO J=1,LDA | |
- A1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDB | |
- B1(J,I)=0.D0 | |
- Bk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORK | |
- WORK1(I)=0.D0 | |
- ENDDO | |
-C | |
-C For PHI matrix in FIRST temp range | |
-C | |
- DO I=1,MARK1 | |
- A1(I,1)=PHI_NASA1(TEMP(I)) | |
- A1(I,2)=PHI_NASA2(TEMP(I)) | |
- A1(I,3)=PHI_NASA3(TEMP(I)) | |
- A1(I,4)=PHI_NASA4(TEMP(I)) | |
- A1(I,5)=PHI_NASA5(TEMP(I)) | |
- A1(I,6)=PHI_NASA6(TEMP(I)) | |
- A1(I,7)=PHI_NASA7(TEMP(I)) | |
- ENDDO | |
-C | |
-C For PHI matrix in SECOND temp range | |
-C | |
- DO I=MARK1+1,MARK2 | |
- A1(I,8) =PHI_NASA1(TEMP(I)) | |
- A1(I,9) =PHI_NASA2(TEMP(I)) | |
- A1(I,10)=PHI_NASA3(TEMP(I)) | |
- A1(I,11)=PHI_NASA4(TEMP(I)) | |
- A1(I,12)=PHI_NASA5(TEMP(I)) | |
- A1(I,13)=PHI_NASA6(TEMP(I)) | |
- A1(I,14)=PHI_NASA7(TEMP(I)) | |
- ENDDO | |
-C | |
-C For PHI matrix in THIRD temp range | |
-C | |
- DO I=MARK2+1,M | |
- A1(I,15)=PHI_NASA1(TEMP(I)) | |
- A1(I,16)=PHI_NASA2(TEMP(I)) | |
- A1(I,17)=PHI_NASA3(TEMP(I)) | |
- A1(I,18)=PHI_NASA4(TEMP(I)) | |
- A1(I,19)=PHI_NASA5(TEMP(I)) | |
- A1(I,20)=PHI_NASA6(TEMP(I)) | |
- A1(I,21)=PHI_NASA7(TEMP(I)) | |
- ENDDO | |
-C | |
-C For Constrains at Tint------------------------- | |
-C | |
-C For CP values | |
- Bk(1,1) = PHI_NASA1(Tint) | |
- Bk(1,2) = PHI_NASA2(Tint) | |
- Bk(1,3) = PHI_NASA3(Tint) | |
- Bk(1,4) = PHI_NASA4(Tint) | |
- Bk(1,5) = PHI_NASA5(Tint) | |
- Bk(1,6) = PHI_NASA6(Tint) | |
- Bk(1,7) = PHI_NASA7(Tint) | |
- Bk(1,8) =-PHI_NASA1(Tint) | |
- Bk(1,9) =-PHI_NASA2(Tint) | |
- Bk(1,10)=-PHI_NASA3(Tint) | |
- Bk(1,11)=-PHI_NASA4(Tint) | |
- Bk(1,12)=-PHI_NASA5(Tint) | |
- Bk(1,13)=-PHI_NASA6(Tint) | |
- Bk(1,14)=-PHI_NASA7(Tint) | |
- D1(1)=0.D0 | |
-C For DCp values | |
- Bk(2,1) = PHI_NASA_DCP1(Tint) | |
- Bk(2,2) = PHI_NASA_DCP2(Tint) | |
- Bk(2,3) = PHI_NASA_DCP3(Tint) | |
- Bk(2,4) = PHI_NASA_DCP4(Tint) | |
- Bk(2,5) = PHI_NASA_DCP5(Tint) | |
- Bk(2,6) = PHI_NASA_DCP6(Tint) | |
- Bk(2,7) = PHI_NASA_DCP7(Tint) | |
- Bk(2,8) =-PHI_NASA_DCP1(Tint) | |
- Bk(2,9) =-PHI_NASA_DCP2(Tint) | |
- Bk(2,10)=-PHI_NASA_DCP3(Tint) | |
- Bk(2,11)=-PHI_NASA_DCP4(Tint) | |
- Bk(2,12)=-PHI_NASA_DCP5(Tint) | |
- Bk(2,13)=-PHI_NASA_DCP6(Tint) | |
- Bk(2,14)=-PHI_NASA_DCP7(Tint) | |
- D1(2)=0.D0 | |
-C For D2Cp values | |
- Bk(3,1) = PHI_NASA_D2CP1(Tint) | |
- Bk(3,2) = PHI_NASA_D2CP2(Tint) | |
- Bk(3,3) = PHI_NASA_D2CP3(Tint) | |
- Bk(3,4) = PHI_NASA_D2CP4(Tint) | |
- Bk(3,5) = PHI_NASA_D2CP5(Tint) | |
- Bk(3,6) = PHI_NASA_D2CP6(Tint) | |
- Bk(3,7) = PHI_NASA_D2CP7(Tint) | |
- Bk(3,8) =-PHI_NASA_D2CP1(Tint) | |
- Bk(3,9) =-PHI_NASA_D2CP2(Tint) | |
- Bk(3,10)=-PHI_NASA_D2CP3(Tint) | |
- Bk(3,11)=-PHI_NASA_D2CP4(Tint) | |
- Bk(3,12)=-PHI_NASA_D2CP5(Tint) | |
- Bk(3,13)=-PHI_NASA_D2CP6(Tint) | |
- Bk(3,14)=-PHI_NASA_D2CP7(Tint) | |
- D1(3)=0.D0 | |
-C | |
-C For Constrains at Tint1---------------------------- | |
-C | |
-C For CP values | |
- Bk(4,8) = PHI_NASA1(Tint1) | |
- Bk(4,9) = PHI_NASA2(Tint1) | |
- Bk(4,10)= PHI_NASA3(Tint1) | |
- Bk(4,11)= PHI_NASA4(Tint1) | |
- Bk(4,12)= PHI_NASA5(Tint1) | |
- Bk(4,13)= PHI_NASA6(Tint1) | |
- Bk(4,14)= PHI_NASA7(Tint1) | |
- Bk(4,15)=-PHI_NASA1(Tint1) | |
- Bk(4,16)=-PHI_NASA2(Tint1) | |
- Bk(4,17)=-PHI_NASA3(Tint1) | |
- Bk(4,18)=-PHI_NASA4(Tint1) | |
- Bk(4,19)=-PHI_NASA5(Tint1) | |
- Bk(4,20)=-PHI_NASA6(Tint1) | |
- Bk(4,21)=-PHI_NASA7(Tint1) | |
- D1(4)=0.D0 | |
-C For DCp values | |
- Bk(5,8) = PHI_NASA_DCP1(Tint1) | |
- Bk(5,9) = PHI_NASA_DCP2(Tint1) | |
- Bk(5,10)= PHI_NASA_DCP3(Tint1) | |
- Bk(5,11)= PHI_NASA_DCP4(Tint1) | |
- Bk(5,12)= PHI_NASA_DCP5(Tint1) | |
- Bk(5,13)= PHI_NASA_DCP6(Tint1) | |
- Bk(5,14)= PHI_NASA_DCP7(Tint1) | |
- Bk(5,15)=-PHI_NASA_DCP1(Tint1) | |
- Bk(5,16)=-PHI_NASA_DCP2(Tint1) | |
- Bk(5,17)=-PHI_NASA_DCP3(Tint1) | |
- Bk(5,18)=-PHI_NASA_DCP4(Tint1) | |
- Bk(5,19)=-PHI_NASA_DCP5(Tint1) | |
- Bk(5,20)=-PHI_NASA_DCP6(Tint1) | |
- Bk(5,21)=-PHI_NASA_DCP7(Tint1) | |
- D1(5)=0.D0 | |
-C For D2Cp values | |
- Bk(6,8) = PHI_NASA_D2CP1(Tint1) | |
- Bk(6,9) = PHI_NASA_D2CP2(Tint1) | |
- Bk(6,10)= PHI_NASA_D2CP3(Tint1) | |
- Bk(6,11)= PHI_NASA_D2CP4(Tint1) | |
- Bk(6,12)= PHI_NASA_D2CP5(Tint1) | |
- Bk(6,13)= PHI_NASA_D2CP6(Tint1) | |
- Bk(6,14)= PHI_NASA_D2CP7(Tint1) | |
- Bk(6,15)=-PHI_NASA_D2CP1(Tint1) | |
- Bk(6,16)=-PHI_NASA_D2CP2(Tint1) | |
- Bk(6,17)=-PHI_NASA_D2CP3(Tint1) | |
- Bk(6,18)=-PHI_NASA_D2CP4(Tint1) | |
- Bk(6,19)=-PHI_NASA_D2CP5(Tint1) | |
- Bk(6,20)=-PHI_NASA_D2CP6(Tint1) | |
- Bk(6,21)=-PHI_NASA_D2CP7(Tint1) | |
- D1(6)=0.D0 | |
-C | |
- DO I=1,N | |
- DO J=1,LDB | |
- B1(J,I)=Bk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
-! NASA FORMAT | |
-C | |
- call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
-! WRITE(*,*) 'X1=',X1(1:21) | |
-! pause | |
-C | |
-C For enthalpy, NEED define 2 coeffs, N=3 | |
- DO I=1,NH | |
- XH1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NH | |
- DO J=1,LDAH | |
- AH1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBH | |
- BH1(J,I)=0.D0 | |
- BHk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKH | |
- WORKH(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(1:7)) | |
- ENDDO | |
-C | |
- DO I=MARK1+1,MARK2 | |
- CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(8:14)) | |
- ENDDO | |
-C | |
- DO I=MARK2+1,MH | |
- CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(15:21)) | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- AH1(I,1)=ROL | |
- ENDDO | |
- DO I=MARK1+1,MARK2 | |
- AH1(I,2)=ROL | |
- ENDDO | |
- DO I=MARK2+1,MH | |
- AH1(I,3)=ROL | |
- ENDDO | |
-C | |
-C Contrain for H at Tint | |
- BHk(1,1)=ROL | |
- BHk(1,2)=-ROL | |
- DH1(1)=PHI_NASA_H(Tint,X1(8:14)) | |
- & -PHI_NASA_H(Tint,X1(1:7)) | |
-C | |
-C Contrain for H at 298.15K | |
- BHk(2,1)=ROL | |
- BHk(2,2)=0.D0 | |
-! DH1(2)=CH(1) - PHI_NASA_H(298.D0,X1(1:7)) | |
- DH1(2)=DLTH - PHI_NASA_H(298.15D0,X1(1:7)) | |
-C | |
-C Contrain for H at Tint1 | |
- BHk(3,2)=ROL | |
- BHk(3,3)=-ROL | |
- DH1(3)=PHI_NASA_H(Tint1,X1(15:21)) | |
- & -PHI_NASA_H(Tint1,X1(8:14)) | |
-C | |
- DO I=1,NH | |
- DO J=1,LDBH | |
- BH1(J,I)=BHk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
- & LWORKH,INFO) | |
-! WRITE(*,*) 'H_CONST1=',XH1(1) | |
-! WRITE(*,*) 'H_CONST2=',XH1(2) | |
-! WRITE(*,*) 'H_CONST3=',XH1(3) | |
-C | |
- A_H1=XH1(1) | |
- A_H2=XH1(2) | |
- A_H3=XH1(3) | |
-C | |
-C For entropy, NEED define 2 coeffs, N=2 | |
- DO I=1,NS | |
- XS1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NS | |
- DO J=1,LDAS | |
- AS1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBS | |
- BS1(J,I)=0.D0 | |
- BSk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKS | |
- WORKS(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(1:7)) | |
- ENDDO | |
- DO I=MARK1+1,MARK2 | |
- CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(8:14)) | |
- ENDDO | |
- DO I=MARK2+1,MS | |
- CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(15:21)) | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- AS1(I,1)=ROL | |
- ENDDO | |
- DO I=MARK1+1,MARK2 | |
- AS1(I,2)=ROL | |
- ENDDO | |
- DO I=MARK2+1,MS | |
- AS1(I,3)=ROL | |
- ENDDO | |
-C | |
-C Contrain for S at Tint | |
- BSk(1,1)=ROL | |
- BSk(1,2)=-ROL | |
- DS1(1)=PHI_NASA_S(Tint,X1(8:14)) | |
- & -PHI_NASA_S(Tint,X1(1:7)) | |
-C | |
-C Contrain for S at 298.15K | |
- BSk(2,1)=ROL | |
- BSk(2,2)=0.D0 | |
-! DS1(2)=CS(1) - PHI_NASA_S(298.D0,X1(1:7)) | |
- DS1(2)=S_298 - PHI_NASA_S(298.15D0,X1(1:7)) | |
-C | |
-C Contrain for S at Tint1 | |
- BSk(3,2)=ROL | |
- BSk(3,3)=-ROL | |
- DS1(3)=PHI_NASA_S(Tint1,X1(15:21)) | |
- & -PHI_NASA_S(Tint1,X1(8:14)) | |
-C | |
- DO I=1,NS | |
- DO J=1,LDBS | |
- BS1(J,I)=BSk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
- & LWORKS,INFO) | |
-! WRITE(*,*) XS1 | |
-! WRITE(*,*) 'S_CONST1=',XS1(1) | |
-! WRITE(*,*) 'S_CONST2=',XS1(2) | |
-! WRITE(*,*) 'S_CONST3=',XS1(3) | |
-C | |
- A_S1=XS1(1) | |
- A_S2=XS1(2) | |
- A_S3=XS1(3) | |
-C | |
-C | |
-C | |
- DO I=1,7 | |
- THERM1(I)=X1(I) | |
- ENDDO | |
- THERM1(7+1)=A_H1 | |
- THERM1(7+2)=A_S1 | |
- DO I=1,7 | |
- THERM2(I)=X1(I+7) | |
- ENDDO | |
- THERM2(7+1)=A_H2 | |
- THERM2(7+2)=A_S2 | |
- DO I=1,7 | |
- THERM3(I)=X1(I+7*2) | |
- ENDDO | |
- THERM3(7+1)=A_H3 | |
- THERM3(7+2)=A_S3 | |
-! write(*,*) therm1(1:9) | |
-! write(*,*) therm2(1:9) | |
-! write(*,*) therm3(1:9) | |
-C | |
-! write(*,*) 'NASA OVER!' | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA1=ROL/(TEM*TEM) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA2=ROL/TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA3=ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA4=ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA5=ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA6(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA6=ROL*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA7(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA7=ROL*TEM*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP1=-2.D0*ROL/(TEM*TEM*TEM) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP2=-ROL/(TEM*TEM) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP3=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP4=ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP5=2.D0*ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP6(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP6=3.D0*ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_DCP7(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_DCP7=4.D0*ROL*TEM*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP1=6.D0*ROL/(TEM*TEM*TEM*TEM) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP2=2.D0*ROL/(TEM*TEM*TEM) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP3=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP4=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP5=2.D0*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP6(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP6=6.D0*ROL*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_D2CP7(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NASA_D2CP7=12.D0*ROL*TEM*TEM | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_H(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
- DIMENSION alpha(7) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
-! WRITE(*,*) ALPHA | |
-! WRITE(*,*) TEM | |
-! WRITE(*,*) PHI_NASA_H | |
- PHI_NASA_H=((-1.0D0)*alpha(1)/TEM+alpha(2)*DLOG(TEM)+alpha(3)*TEM | |
- & +alpha(4)*TEM*TEM/2.D0+alpha(5)*TEM*TEM*TEM/3.D0 | |
- & +alpha(6)*TEM*TEM*TEM*TEM/4.D0 | |
- & +alpha(7)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NASA_S(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
- DIMENSION alpha(7) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
-! WRITE(*,*) ALPHA(1:7) | |
-! WRITE(*,*) TEM | |
- PHI_NASA_S=(-alpha(1)/TEM/TEM/2.D0-alpha(2)/TEM | |
- & +alpha(3)*DLOG(TEM)+alpha(4)*TEM | |
- & +alpha(5)*TEM*TEM/2.D0+alpha(6)*TEM*TEM*TEM/3.D0 | |
- & +alpha(7)*TEM*TEM*TEM*TEM/4.D0)*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION DLTH298(alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
- DIMENSION alpha(7) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- TEM=298.15D0 | |
- DLTH298=((-1.0D0)*alpha(1)/TEM+alpha(2)*DLOG(TEM)+alpha(3)*TEM | |
- & +alpha(4)*TEM*TEM/2.D0+alpha(5)*TEM*TEM*TEM/3.D0 | |
- & +alpha(6)*TEM*TEM*TEM*TEM/4.D0 | |
- & +alpha(7)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
+C: Add the constrains to the first and second derivatives | |
+C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
+C: at each intermediate temperature | |
+C: -------------------------------------------------------------- | |
+C: For NASA | |
+C: Use a single matrix to calculate all 21 coefficients | |
+C: [A]: M x 21 | |
+C: [X]: 21 x 1 | |
+C: [alpha1_l,alpha2_l,alpha3_l,alpha4_l,alpha5_l,alpha6_l,alpha7_l, | |
+C: [alpha1_m,alpha2_m,alpha3_m,alpha4_m,alpha5_m,alpha6_m,alpha7_m, | |
+C: [alpha1_h,alpha2_h,alpha3_h,alpha4_h,alpha5_h,alpha6_h,alpha7_h] | |
+C: [C]: M x 1 | |
+C: Contrains at both temperatures: | |
+C: [B]: 6 x 21 | |
+C: [D]: 6 x 1 | |
+C---------------------------------------------------------------- | |
+C FOR NASA CHEMTHERMO DATA FORMAT | |
+C number of coefficients: N=7 x 3 | |
+C number of discrete data point: M>=N, i.e., M=103 | |
+C | |
+C use the DGGLSE to solve the linear least squares equality-constrained | |
+C (LLSE) problem. | |
+!**************************************************************** | |
+! Programmed by John Z. Wen, MIT, June 2005 | |
+!**************************************************************** | |
+C | |
+ SUBROUTINE NASA(Tint,TNEW,Tint1,T1NEW, | |
+ & THERM1,THERM2,THERM3,TEMP1,C1,CH1,CS1) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION Tint,Tint1,THERM1,THERM2,THERM3,TNEW,T1NEW | |
+ DOUBLE PRECISION H_298,S_298,DLTH,ROL | |
+C | |
+ INTEGER M,N,P,LDA,LDB,LWORK,INFO | |
+ INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
+ INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
+ DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
+ DOUBLE PRECISION TEMP1,PHI_NASA1,PHI_NASA2,PHI_NASA3, | |
+ & PHI_NASA4,PHI_NASA5,PHI_NASA6,PHI_NASA7 | |
+ DOUBLE PRECISION PHI_NASA_DCP1,PHI_NASA_DCP2,PHI_NASA_DCP3, | |
+ & PHI_NASA_DCP4,PHI_NASA_DCP5,PHI_NASA_DCP6,PHI_NASA_DCP7, | |
+ & PHI_NASA_D2CP1,PHI_NASA_D2CP2,PHI_NASA_D2CP3, | |
+ & PHI_NASA_D2CP4,PHI_NASA_D2CP5,PHI_NASA_D2CP6, | |
+ & PHI_NASA_D2CP7 | |
+ DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2,A_H3,A_S3 | |
+ DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
+ DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
+ DOUBLE PRECISION PHI_NASA_H,PHI_NASA_S | |
+ INTEGER MARK1,MARK2 | |
+ DOUBLE PRECISION TEMP,C | |
+C: Required by llse solver: | |
+! LDA >= MAX(1,M) | |
+! LDB >= MAX(1,P) | |
+! LWORK >= max(1,M+N+P) | |
+! P=1 for only one constrain at the intermediate temp. | |
+! P=3 for three constrains at the intermediate temp. | |
+ PARAMETER (M=103) | |
+ PARAMETER (LDB=6,P=6) | |
+ PARAMETER (N=21) | |
+ DIMENSION A1(M,N),B1(LDB,N),C1(M-2),D1(P),X1(N),WORK1(M+N+P), | |
+ & Bk(LDB,N) | |
+ PARAMETER (LDBH=3,PH=3) | |
+ PARAMETER (NH=3) | |
+ PARAMETER (LDBS=3,PS=3) | |
+ PARAMETER (NS=3) | |
+ DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-2),DH1(PH),XH1(NH), | |
+ & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
+ DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-2),DS1(PS),XS1(NS), | |
+ & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
+ DIMENSION TEMP1(M-2),THERM1(20),THERM2(20),THERM3(20) | |
+ DIMENSION TEMP(M),C(M) | |
+ INTEGER I,J | |
+C | |
+! GAS CONSTANT | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ EXTERNAL PHI_NASA1,PHI_NASA2,PHI_NASA3,PHI_NASA4,PHI_NASA5, | |
+ & PHI_NASA6,PHI_NASA7, | |
+ & PHI_NASA_DCP1,PHI_NASA_DCP2,PHI_NASA_DCP3, | |
+ & PHI_NASA_DCP4,PHI_NASA_DCP5,PHI_NASA_DCP6, | |
+ & PHI_NASA_DCP7, | |
+ & PHI_NASA_D2CP1,PHI_NASA_D2CP2,PHI_NASA_D2CP3, | |
+ & PHI_NASA_D2CP4,PHI_NASA_D2CP5,PHI_NASA_D2CP6, | |
+ & PHI_NASA_D2CP7, | |
+ & PHI_NASA_H,PHI_NASA_S | |
+C | |
+! WRITE(*,*) 'CALLED NASA' | |
+C | |
+ LDA = M | |
+ LWORK = M+N+P | |
+ MH = M | |
+ LDAH = MH | |
+ LWORKH= MH+NH+PH | |
+ MS = M | |
+ LDAS = MS | |
+ LWORKS= MS+NS+PS | |
+C | |
+C FIND 'Tint' and 'Tint1' in sample data | |
+C | |
+ MARK1 = 0 | |
+ DO I=1,M-2 | |
+ IF (TEMP1(I) .GT. Tint) THEN | |
+ MARK1=I-1 | |
+ IF (Tint .NE. TEMP1(I-1)) THEN | |
+ Tint=TEMP1(I-1) | |
+ TNEW=Tint | |
+! WRITE(*,*) 'Tint has been replaced!' | |
+ ENDIF | |
+ GOTO 995 | |
+ ENDIF | |
+ ENDDO | |
+ 995 CONTINUE | |
+! WRITE(*,*) 'MARK1=',MARK1 | |
+C | |
+ MARK2 = 0 | |
+ DO I=1,M-2 | |
+ IF (TEMP1(I) .GT. Tint1) THEN | |
+ MARK2=I-1 | |
+ IF (Tint1 .NE. TEMP1(I-1)) THEN | |
+ Tint1=TEMP1(I-1) | |
+ T1NEW=Tint1 | |
+! WRITE(*,*) 'Tint1 has been replaced!' | |
+ ENDIF | |
+ GOTO 996 | |
+ ENDIF | |
+ ENDDO | |
+ 996 CONTINUE | |
+! WRITE(*,*) 'MARK2=',MARK2 | |
+C | |
+C Rearrange the matrics | |
+C | |
+ DO I=1,M | |
+ TEMP(I)=0.D0 | |
+ C (I)=0.D0 | |
+ CH (I)=0.D0 | |
+ CS (I)=0.D0 | |
+ CH2 (I)=0.D0 | |
+ CS2 (I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ TEMP(I)=TEMP1(I) | |
+ C (I)=C1 (I) | |
+ CH (I)=CH1 (I) | |
+ CS (I)=CS1 (I) | |
+ ENDDO | |
+ TEMP(MARK1+1)=TEMP(MARK1) | |
+ C (MARK1+1)=C (MARK1) | |
+ CH (MARK1+1)=CH (MARK1) | |
+ CS (MARK1+1)=CS (MARK1) | |
+ DO I=MARK1+2,MARK2+1 | |
+ TEMP(I)=TEMP1(I-1) | |
+ C (I)=C1 (I-1) | |
+ CH (I)=CH1 (I-1) | |
+ CS (I)=CS1 (I-1) | |
+ ENDDO | |
+ TEMP(MARK2+2)=TEMP(MARK2+1) | |
+ C (MARK2+2)=C (MARK2+1) | |
+ CH (MARK2+2)=CH (MARK2+1) | |
+ CS (MARK2+2)=CS (MARK2+1) | |
+ DO I=MARK2+3,M | |
+ TEMP(I)=TEMP1(I-2) | |
+ C (I)=C1 (I-2) | |
+ CH (I)=CH1 (I-2) | |
+ CS (I)=CS1 (I-2) | |
+ ENDDO | |
+! WRITE(*,*) 'Tint =', Tint | |
+! WRITE(*,*) 'Tint1=', Tint1 | |
+! WRITE(*,*) TEMP | |
+! WRITE(*,*) C | |
+! WRITE(*,*) CH | |
+! WRITE(*,*) CS | |
+C | |
+C: Redefine the MARKS | |
+C | |
+ DO I=1,M | |
+ IF (TEMP(I) .EQ. Tint ) THEN | |
+ MARK1=I | |
+ GOTO 997 | |
+ ENDIF | |
+ ENDDO | |
+ 997 CONTINUE | |
+ DO I=1,M | |
+ IF (TEMP(I) .EQ. Tint1) THEN | |
+ MARK2=I | |
+ GOTO 998 | |
+ ENDIF | |
+ ENDDO | |
+ 998 CONTINUE | |
+! WRITE(*,*) 'MARK1 =', MARK1 | |
+! WRITE(*,*) 'MARK2 =', MARK2 | |
+! PAUSE | |
+C | |
+ DO I=1,N | |
+ X1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,N | |
+ DO J=1,LDA | |
+ A1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDB | |
+ B1(J,I)=0.D0 | |
+ Bk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORK | |
+ WORK1(I)=0.D0 | |
+ ENDDO | |
+C | |
+C For PHI matrix in FIRST temp range | |
+C | |
+ DO I=1,MARK1 | |
+ A1(I,1)=PHI_NASA1(TEMP(I)) | |
+ A1(I,2)=PHI_NASA2(TEMP(I)) | |
+ A1(I,3)=PHI_NASA3(TEMP(I)) | |
+ A1(I,4)=PHI_NASA4(TEMP(I)) | |
+ A1(I,5)=PHI_NASA5(TEMP(I)) | |
+ A1(I,6)=PHI_NASA6(TEMP(I)) | |
+ A1(I,7)=PHI_NASA7(TEMP(I)) | |
+ ENDDO | |
+C | |
+C For PHI matrix in SECOND temp range | |
+C | |
+ DO I=MARK1+1,MARK2 | |
+ A1(I,8) =PHI_NASA1(TEMP(I)) | |
+ A1(I,9) =PHI_NASA2(TEMP(I)) | |
+ A1(I,10)=PHI_NASA3(TEMP(I)) | |
+ A1(I,11)=PHI_NASA4(TEMP(I)) | |
+ A1(I,12)=PHI_NASA5(TEMP(I)) | |
+ A1(I,13)=PHI_NASA6(TEMP(I)) | |
+ A1(I,14)=PHI_NASA7(TEMP(I)) | |
+ ENDDO | |
+C | |
+C For PHI matrix in THIRD temp range | |
+C | |
+ DO I=MARK2+1,M | |
+ A1(I,15)=PHI_NASA1(TEMP(I)) | |
+ A1(I,16)=PHI_NASA2(TEMP(I)) | |
+ A1(I,17)=PHI_NASA3(TEMP(I)) | |
+ A1(I,18)=PHI_NASA4(TEMP(I)) | |
+ A1(I,19)=PHI_NASA5(TEMP(I)) | |
+ A1(I,20)=PHI_NASA6(TEMP(I)) | |
+ A1(I,21)=PHI_NASA7(TEMP(I)) | |
+ ENDDO | |
+C | |
+C For Constrains at Tint------------------------- | |
+C | |
+C For CP values | |
+ Bk(1,1) = PHI_NASA1(Tint) | |
+ Bk(1,2) = PHI_NASA2(Tint) | |
+ Bk(1,3) = PHI_NASA3(Tint) | |
+ Bk(1,4) = PHI_NASA4(Tint) | |
+ Bk(1,5) = PHI_NASA5(Tint) | |
+ Bk(1,6) = PHI_NASA6(Tint) | |
+ Bk(1,7) = PHI_NASA7(Tint) | |
+ Bk(1,8) =-PHI_NASA1(Tint) | |
+ Bk(1,9) =-PHI_NASA2(Tint) | |
+ Bk(1,10)=-PHI_NASA3(Tint) | |
+ Bk(1,11)=-PHI_NASA4(Tint) | |
+ Bk(1,12)=-PHI_NASA5(Tint) | |
+ Bk(1,13)=-PHI_NASA6(Tint) | |
+ Bk(1,14)=-PHI_NASA7(Tint) | |
+ D1(1)=0.D0 | |
+C For DCp values | |
+ Bk(2,1) = PHI_NASA_DCP1(Tint) | |
+ Bk(2,2) = PHI_NASA_DCP2(Tint) | |
+ Bk(2,3) = PHI_NASA_DCP3(Tint) | |
+ Bk(2,4) = PHI_NASA_DCP4(Tint) | |
+ Bk(2,5) = PHI_NASA_DCP5(Tint) | |
+ Bk(2,6) = PHI_NASA_DCP6(Tint) | |
+ Bk(2,7) = PHI_NASA_DCP7(Tint) | |
+ Bk(2,8) =-PHI_NASA_DCP1(Tint) | |
+ Bk(2,9) =-PHI_NASA_DCP2(Tint) | |
+ Bk(2,10)=-PHI_NASA_DCP3(Tint) | |
+ Bk(2,11)=-PHI_NASA_DCP4(Tint) | |
+ Bk(2,12)=-PHI_NASA_DCP5(Tint) | |
+ Bk(2,13)=-PHI_NASA_DCP6(Tint) | |
+ Bk(2,14)=-PHI_NASA_DCP7(Tint) | |
+ D1(2)=0.D0 | |
+C For D2Cp values | |
+ Bk(3,1) = PHI_NASA_D2CP1(Tint) | |
+ Bk(3,2) = PHI_NASA_D2CP2(Tint) | |
+ Bk(3,3) = PHI_NASA_D2CP3(Tint) | |
+ Bk(3,4) = PHI_NASA_D2CP4(Tint) | |
+ Bk(3,5) = PHI_NASA_D2CP5(Tint) | |
+ Bk(3,6) = PHI_NASA_D2CP6(Tint) | |
+ Bk(3,7) = PHI_NASA_D2CP7(Tint) | |
+ Bk(3,8) =-PHI_NASA_D2CP1(Tint) | |
+ Bk(3,9) =-PHI_NASA_D2CP2(Tint) | |
+ Bk(3,10)=-PHI_NASA_D2CP3(Tint) | |
+ Bk(3,11)=-PHI_NASA_D2CP4(Tint) | |
+ Bk(3,12)=-PHI_NASA_D2CP5(Tint) | |
+ Bk(3,13)=-PHI_NASA_D2CP6(Tint) | |
+ Bk(3,14)=-PHI_NASA_D2CP7(Tint) | |
+ D1(3)=0.D0 | |
+C | |
+C For Constrains at Tint1---------------------------- | |
+C | |
+C For CP values | |
+ Bk(4,8) = PHI_NASA1(Tint1) | |
+ Bk(4,9) = PHI_NASA2(Tint1) | |
+ Bk(4,10)= PHI_NASA3(Tint1) | |
+ Bk(4,11)= PHI_NASA4(Tint1) | |
+ Bk(4,12)= PHI_NASA5(Tint1) | |
+ Bk(4,13)= PHI_NASA6(Tint1) | |
+ Bk(4,14)= PHI_NASA7(Tint1) | |
+ Bk(4,15)=-PHI_NASA1(Tint1) | |
+ Bk(4,16)=-PHI_NASA2(Tint1) | |
+ Bk(4,17)=-PHI_NASA3(Tint1) | |
+ Bk(4,18)=-PHI_NASA4(Tint1) | |
+ Bk(4,19)=-PHI_NASA5(Tint1) | |
+ Bk(4,20)=-PHI_NASA6(Tint1) | |
+ Bk(4,21)=-PHI_NASA7(Tint1) | |
+ D1(4)=0.D0 | |
+C For DCp values | |
+ Bk(5,8) = PHI_NASA_DCP1(Tint1) | |
+ Bk(5,9) = PHI_NASA_DCP2(Tint1) | |
+ Bk(5,10)= PHI_NASA_DCP3(Tint1) | |
+ Bk(5,11)= PHI_NASA_DCP4(Tint1) | |
+ Bk(5,12)= PHI_NASA_DCP5(Tint1) | |
+ Bk(5,13)= PHI_NASA_DCP6(Tint1) | |
+ Bk(5,14)= PHI_NASA_DCP7(Tint1) | |
+ Bk(5,15)=-PHI_NASA_DCP1(Tint1) | |
+ Bk(5,16)=-PHI_NASA_DCP2(Tint1) | |
+ Bk(5,17)=-PHI_NASA_DCP3(Tint1) | |
+ Bk(5,18)=-PHI_NASA_DCP4(Tint1) | |
+ Bk(5,19)=-PHI_NASA_DCP5(Tint1) | |
+ Bk(5,20)=-PHI_NASA_DCP6(Tint1) | |
+ Bk(5,21)=-PHI_NASA_DCP7(Tint1) | |
+ D1(5)=0.D0 | |
+C For D2Cp values | |
+ Bk(6,8) = PHI_NASA_D2CP1(Tint1) | |
+ Bk(6,9) = PHI_NASA_D2CP2(Tint1) | |
+ Bk(6,10)= PHI_NASA_D2CP3(Tint1) | |
+ Bk(6,11)= PHI_NASA_D2CP4(Tint1) | |
+ Bk(6,12)= PHI_NASA_D2CP5(Tint1) | |
+ Bk(6,13)= PHI_NASA_D2CP6(Tint1) | |
+ Bk(6,14)= PHI_NASA_D2CP7(Tint1) | |
+ Bk(6,15)=-PHI_NASA_D2CP1(Tint1) | |
+ Bk(6,16)=-PHI_NASA_D2CP2(Tint1) | |
+ Bk(6,17)=-PHI_NASA_D2CP3(Tint1) | |
+ Bk(6,18)=-PHI_NASA_D2CP4(Tint1) | |
+ Bk(6,19)=-PHI_NASA_D2CP5(Tint1) | |
+ Bk(6,20)=-PHI_NASA_D2CP6(Tint1) | |
+ Bk(6,21)=-PHI_NASA_D2CP7(Tint1) | |
+ D1(6)=0.D0 | |
+C | |
+ DO I=1,N | |
+ DO J=1,LDB | |
+ B1(J,I)=Bk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+! NASA FORMAT | |
+C | |
+ call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
+! WRITE(*,*) 'X1=',X1(1:21) | |
+! pause | |
+C | |
+C For enthalpy, NEED define 2 coeffs, N=3 | |
+ DO I=1,NH | |
+ XH1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NH | |
+ DO J=1,LDAH | |
+ AH1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBH | |
+ BH1(J,I)=0.D0 | |
+ BHk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKH | |
+ WORKH(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(1:7)) | |
+ ENDDO | |
+C | |
+ DO I=MARK1+1,MARK2 | |
+ CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(8:14)) | |
+ ENDDO | |
+C | |
+ DO I=MARK2+1,MH | |
+ CH2(I)=CH(I) - PHI_NASA_H(TEMP(I),X1(15:21)) | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ AH1(I,1)=ROL | |
+ ENDDO | |
+ DO I=MARK1+1,MARK2 | |
+ AH1(I,2)=ROL | |
+ ENDDO | |
+ DO I=MARK2+1,MH | |
+ AH1(I,3)=ROL | |
+ ENDDO | |
+C | |
+C Contrain for H at Tint | |
+ BHk(1,1)=ROL | |
+ BHk(1,2)=-ROL | |
+ DH1(1)=PHI_NASA_H(Tint,X1(8:14)) | |
+ & -PHI_NASA_H(Tint,X1(1:7)) | |
+C | |
+C Contrain for H at 298.15K | |
+ BHk(2,1)=ROL | |
+ BHk(2,2)=0.D0 | |
+! DH1(2)=CH(1) - PHI_NASA_H(298.D0,X1(1:7)) | |
+ DH1(2)=DLTH - PHI_NASA_H(298.15D0,X1(1:7)) | |
+C | |
+C Contrain for H at Tint1 | |
+ BHk(3,2)=ROL | |
+ BHk(3,3)=-ROL | |
+ DH1(3)=PHI_NASA_H(Tint1,X1(15:21)) | |
+ & -PHI_NASA_H(Tint1,X1(8:14)) | |
+C | |
+ DO I=1,NH | |
+ DO J=1,LDBH | |
+ BH1(J,I)=BHk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
+ & LWORKH,INFO) | |
+! WRITE(*,*) 'H_CONST1=',XH1(1) | |
+! WRITE(*,*) 'H_CONST2=',XH1(2) | |
+! WRITE(*,*) 'H_CONST3=',XH1(3) | |
+C | |
+ A_H1=XH1(1) | |
+ A_H2=XH1(2) | |
+ A_H3=XH1(3) | |
+C | |
+C For entropy, NEED define 2 coeffs, N=2 | |
+ DO I=1,NS | |
+ XS1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NS | |
+ DO J=1,LDAS | |
+ AS1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBS | |
+ BS1(J,I)=0.D0 | |
+ BSk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKS | |
+ WORKS(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(1:7)) | |
+ ENDDO | |
+ DO I=MARK1+1,MARK2 | |
+ CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(8:14)) | |
+ ENDDO | |
+ DO I=MARK2+1,MS | |
+ CS2(I)=CS(I) - PHI_NASA_S(TEMP(I),X1(15:21)) | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ AS1(I,1)=ROL | |
+ ENDDO | |
+ DO I=MARK1+1,MARK2 | |
+ AS1(I,2)=ROL | |
+ ENDDO | |
+ DO I=MARK2+1,MS | |
+ AS1(I,3)=ROL | |
+ ENDDO | |
+C | |
+C Contrain for S at Tint | |
+ BSk(1,1)=ROL | |
+ BSk(1,2)=-ROL | |
+ DS1(1)=PHI_NASA_S(Tint,X1(8:14)) | |
+ & -PHI_NASA_S(Tint,X1(1:7)) | |
+C | |
+C Contrain for S at 298.15K | |
+ BSk(2,1)=ROL | |
+ BSk(2,2)=0.D0 | |
+! DS1(2)=CS(1) - PHI_NASA_S(298.D0,X1(1:7)) | |
+ DS1(2)=S_298 - PHI_NASA_S(298.15D0,X1(1:7)) | |
+C | |
+C Contrain for S at Tint1 | |
+ BSk(3,2)=ROL | |
+ BSk(3,3)=-ROL | |
+ DS1(3)=PHI_NASA_S(Tint1,X1(15:21)) | |
+ & -PHI_NASA_S(Tint1,X1(8:14)) | |
+C | |
+ DO I=1,NS | |
+ DO J=1,LDBS | |
+ BS1(J,I)=BSk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
+ & LWORKS,INFO) | |
+! WRITE(*,*) XS1 | |
+! WRITE(*,*) 'S_CONST1=',XS1(1) | |
+! WRITE(*,*) 'S_CONST2=',XS1(2) | |
+! WRITE(*,*) 'S_CONST3=',XS1(3) | |
+C | |
+ A_S1=XS1(1) | |
+ A_S2=XS1(2) | |
+ A_S3=XS1(3) | |
+C | |
+C | |
+C | |
+ DO I=1,7 | |
+ THERM1(I)=X1(I) | |
+ ENDDO | |
+ THERM1(7+1)=A_H1 | |
+ THERM1(7+2)=A_S1 | |
+ DO I=1,7 | |
+ THERM2(I)=X1(I+7) | |
+ ENDDO | |
+ THERM2(7+1)=A_H2 | |
+ THERM2(7+2)=A_S2 | |
+ DO I=1,7 | |
+ THERM3(I)=X1(I+7*2) | |
+ ENDDO | |
+ THERM3(7+1)=A_H3 | |
+ THERM3(7+2)=A_S3 | |
+! write(*,*) therm1(1:9) | |
+! write(*,*) therm2(1:9) | |
+! write(*,*) therm3(1:9) | |
+C | |
+! write(*,*) 'NASA OVER!' | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA1=ROL/(TEM*TEM) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA2=ROL/TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA3=ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA4=ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA5=ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA6(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA6=ROL*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA7(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA7=ROL*TEM*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP1=-2.D0*ROL/(TEM*TEM*TEM) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP2=-ROL/(TEM*TEM) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP3=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP4=ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP5=2.D0*ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP6(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP6=3.D0*ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_DCP7(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_DCP7=4.D0*ROL*TEM*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP1=6.D0*ROL/(TEM*TEM*TEM*TEM) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP2=2.D0*ROL/(TEM*TEM*TEM) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP3=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP4=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP5=2.D0*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP6(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP6=6.D0*ROL*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_D2CP7(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NASA_D2CP7=12.D0*ROL*TEM*TEM | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_H(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
+ DIMENSION alpha(7) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+! WRITE(*,*) ALPHA | |
+! WRITE(*,*) TEM | |
+! WRITE(*,*) PHI_NASA_H | |
+ PHI_NASA_H=((-1.0D0)*alpha(1)/TEM+alpha(2)*DLOG(TEM)+alpha(3)*TEM | |
+ & +alpha(4)*TEM*TEM/2.D0+alpha(5)*TEM*TEM*TEM/3.D0 | |
+ & +alpha(6)*TEM*TEM*TEM*TEM/4.D0 | |
+ & +alpha(7)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NASA_S(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
+ DIMENSION alpha(7) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+! WRITE(*,*) ALPHA(1:7) | |
+! WRITE(*,*) TEM | |
+ PHI_NASA_S=(-alpha(1)/TEM/TEM/2.D0-alpha(2)/TEM | |
+ & +alpha(3)*DLOG(TEM)+alpha(4)*TEM | |
+ & +alpha(5)*TEM*TEM/2.D0+alpha(6)*TEM*TEM*TEM/3.D0 | |
+ & +alpha(7)*TEM*TEM*TEM*TEM/4.D0)*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION DLTH298(alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH | |
+ DIMENSION alpha(7) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ TEM=298.15D0 | |
+ DLTH298=((-1.0D0)*alpha(1)/TEM+alpha(2)*DLOG(TEM)+alpha(3)*TEM | |
+ & +alpha(4)*TEM*TEM/2.D0+alpha(5)*TEM*TEM*TEM/3.D0 | |
+ & +alpha(6)*TEM*TEM*TEM*TEM/4.D0 | |
+ & +alpha(7)*TEM*TEM*TEM*TEM*TEM/5.D0)*ROL | |
+C | |
+ RETURN | |
+C | |
+ END | |
\ No newline at end of file | |
diff --git a/source/GATPFit/lsfp_nist1.f b/source/GATPFit/lsfp_nist1.f | |
index 750522b..802c3f2 100644 | |
--- a/source/GATPFit/lsfp_nist1.f | |
+++ b/source/GATPFit/lsfp_nist1.f | |
@@ -1,625 +1,608 @@ | |
-C: Add the constrains to the first and second derivatives | |
-C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
-C: -------------------------------------------------------------- | |
-C: For NIST | |
-C: Use a single matrix to calculate all 10 coefficients | |
-C: [A]: M x 10 | |
-C: [X]: 10 x 1 (alpha1_low,alpha2_low,alpha3_low,alpha4_low,alpha5_low, | |
-C: alpha1_hig,alpha2_hig,alpha3_hig,alpha4_hig,alpha5_hig) | |
-C: [C]: M x 1 | |
-C: Contrains: CP, dCP/dT, and d2CP/d2T | |
-C: at the intermediate temperature Tint | |
-C: [B]: 3 x 10 | |
-C: [D]: 3 x 1 | |
-C---------------------------------------------------------------- | |
-C FOR NIST CHEMTHERMO DATA FORMAT | |
-C number of coefficients: N=5 x 2 | |
-C number of discrete data point: M>=N, i.e., M=102 | |
-C | |
-C use the DGGLSE to solve the linear least squares equality-constrained | |
-C (LlSE) problem. | |
-!***************************A************************************* | |
-! Programmed by John Z. Wen, MIT, June 2005 | |
-!**************************************************************** | |
-C | |
- SUBROUTINE NIST(Tint,TNEW,THERM1,THERM2,TEMP1,C1,CH1,CS1) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION Tint,TNEW,THERM1,THERM2 | |
- DOUBLE PRECISION H_298,S_298,DLTH | |
-C | |
- INTEGER M,N,P,LDA,LDB,LWORK,INFO | |
- INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
- INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
- DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
- DOUBLE PRECISION TEMP1,PHI_NIST1,PHI_NIST2,PHI_NIST3, | |
- & PHI_NIST4,PHI_NIST5,ROL | |
- DOUBLE PRECISION PHI_NIST_DCP1,PHI_NIST_DCP2,PHI_NIST_DCP3, | |
- & PHI_NIST_DCP4,PHI_NIST_DCP5,PHI_NIST_D2CP1, | |
- & PHI_NIST_D2CP2,PHI_NIST_D2CP3,PHI_NIST_D2CP4, | |
- & PHI_NIST_D2CP5 | |
- DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2 | |
- DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
- DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
- DOUBLE PRECISION PHI_NIST_H,PHI_NIST_S | |
- INTEGER MARK1 | |
- DOUBLE PRECISION TEMP,C | |
-C | |
-C Required by LSEC solver: | |
-! LDA >= MAX(1,M) | |
-! LDB >= MAX(1,P) | |
-! LWORK >= max(1,M+N+P) | |
-! P=1 for only one constrain at the intermediate temp. | |
-! P=3 for three constrains at the intermediate temp. | |
-C | |
-C CHANGE 'LWORK' if NECESSARY | |
- PARAMETER (M=102) | |
- PARAMETER (LDB=3,P=3) | |
- PARAMETER (N=10) | |
- DIMENSION A1(M,N),B1(LDB,N),C1(M-1),D1(P),X1(N),WORK1(M+N+P), | |
- & Bk(LDB,N) | |
- PARAMETER (LDBH=2,PH=2) | |
- PARAMETER (NH=2) | |
- PARAMETER (LDBS=2,PS=2) | |
- PARAMETER (NS=2) | |
- DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-1),DH1(PH),XH1(NH), | |
- & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
- DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-1),DS1(PS),XS1(NS), | |
- & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
- DIMENSION TEMP1(M-1),THERM1(7),THERM2(7) | |
- DIMENSION TEMP(M),C(M) | |
- INTEGER I,J | |
-C | |
-! GAS CONSTANT | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- EXTERNAL PHI_NIST1,PHI_NIST2,PHI_NIST3,PHI_NIST4,PHI_NIST5, | |
- & PHI_NIST_DCP1,PHI_NIST_DCP2,PHI_NIST_DCP3, | |
- & PHI_NIST_DCP4,PHI_NIST_DCP5,PHI_NIST_D2CP1, | |
- & PHI_NIST_D2CP2,PHI_NIST_D2CP3,PHI_NIST_D2CP4, | |
- & PHI_NIST_D2CP5,PHI_NIST_H,PHI_NIST_S | |
-C | |
-! WRITE(*,*) 'CALLED NIST' | |
-C | |
- LDA = M | |
- LWORK = M+N+P | |
- MH = M | |
- LDAH = MH | |
- LWORKH= MH+NH+PH | |
- MS = M | |
- LDAS = MS | |
- LWORKS= MS+NS+PS | |
-C | |
-C FIND 'Tint' and 'Tint1' in sample data | |
-C | |
- DO I=1,M-1 | |
- IF (TEMP1(I) .GT. Tint) THEN | |
- MARK1=I-1 | |
- IF (Tint .NE. TEMP1(I-1)) THEN | |
- Tint=TEMP1(I-1) | |
- TNEW=Tint | |
-! WRITE(*,*) 'Tint has been replaced!' | |
- ENDIF | |
- GOTO 995 | |
- ENDIF | |
- ENDDO | |
- 995 CONTINUE | |
-! WRITE(*,*) 'MARK1=',MARK1 | |
-C | |
-C Rearrange the matrics | |
-C | |
- DO I=1,M | |
- TEMP(I)=0.D0 | |
- C (I)=0.D0 | |
- CH (I)=0.D0 | |
- CS (I)=0.D0 | |
- CH2 (I)=0.D0 | |
- CS2 (I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- TEMP(I)=TEMP1(I) | |
- C (I)=C1(I) | |
- CH(I)=CH1(I) | |
- CS(I)=CS1(I) | |
- ENDDO | |
- TEMP(MARK1+1)=TEMP(MARK1) | |
- C (MARK1+1)=C (MARK1) | |
- CH(MARK1+1)=CH(MARK1) | |
- CS(MARK1+1)=CS(MARK1) | |
- DO I=MARK1+2,M | |
- TEMP(I)=TEMP1(I-1) | |
- C (I)=C1 (I-1) | |
- CH(I)=CH1(I-1) | |
- CS(I)=CS1(I-1) | |
- ENDDO | |
-C | |
-! WRITE(*,*) 'Tint=', Tint | |
-! WRITE(*,*) TEMP | |
-! WRITE(*,*) C | |
-! WRITE(*,*) CH | |
-! WRITE(*,*) CS | |
-! PAUSE | |
-C | |
- DO I=1,N | |
- X1(I)=0.D0 | |
- ENDDO | |
- DO I=1,N | |
- DO J=1,LDA | |
- A1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDB | |
- B1(J,I)=0.D0 | |
- Bk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORK | |
- WORK1(I)=0.D0 | |
- ENDDO | |
-C | |
-! For PHI matrix, first temperature range | |
- DO I=1,MARK1 | |
- A1(I,1)=PHI_NIST1(TEMP(I)) | |
- A1(I,2)=PHI_NIST2(TEMP(I)) | |
- A1(I,3)=PHI_NIST3(TEMP(I)) | |
- A1(I,4)=PHI_NIST4(TEMP(I)) | |
- A1(I,5)=PHI_NIST5(TEMP(I)) | |
- ENDDO | |
-! For PHI matrix, second temperature range | |
- DO I=MARK1+1,M | |
- A1(I,6) =PHI_NIST1(TEMP(I)) | |
- A1(I,7) =PHI_NIST2(TEMP(I)) | |
- A1(I,8) =PHI_NIST3(TEMP(I)) | |
- A1(I,9) =PHI_NIST4(TEMP(I)) | |
- A1(I,10)=PHI_NIST5(TEMP(I)) | |
- ENDDO | |
-C | |
-! WRITE(*,*) TEMP1 | |
-! WRITE(*,*) C1 | |
-! PAUSE | |
-C | |
-C For Constrains at Tint ------------------------ | |
-C | |
-! For CP values | |
- Bk(1,1) = PHI_NIST1(Tint) | |
- Bk(1,2) = PHI_NIST2(Tint) | |
- Bk(1,3) = PHI_NIST3(Tint) | |
- Bk(1,4) = PHI_NIST4(Tint) | |
- Bk(1,5) = PHI_NIST5(Tint) | |
- Bk(1,6) =-PHI_NIST1(Tint) | |
- Bk(1,7) =-PHI_NIST2(Tint) | |
- Bk(1,8) =-PHI_NIST3(Tint) | |
- Bk(1,9) =-PHI_NIST4(Tint) | |
- Bk(1,10)=-PHI_NIST5(Tint) | |
- D1(1)=0.D0 | |
-C For DCp values | |
- Bk(2,1) = PHI_NIST_DCP1(Tint) | |
- Bk(2,2) = PHI_NIST_DCP2(Tint) | |
- Bk(2,3) = PHI_NIST_DCP3(Tint) | |
- Bk(2,4) = PHI_NIST_DCP4(Tint) | |
- Bk(2,5) = PHI_NIST_DCP5(Tint) | |
- Bk(2,6) =-PHI_NIST_DCP1(Tint) | |
- Bk(2,7) =-PHI_NIST_DCP2(Tint) | |
- Bk(2,8) =-PHI_NIST_DCP3(Tint) | |
- Bk(2,9) =-PHI_NIST_DCP4(Tint) | |
- Bk(2,10)=-PHI_NIST_DCP5(Tint) | |
- D1(2)=0.D0 | |
-C For D2Cp values | |
- Bk(3,1) = PHI_NIST_D2CP1(Tint) | |
- Bk(3,2) = PHI_NIST_D2CP2(Tint) | |
- Bk(3,3) = PHI_NIST_D2CP3(Tint) | |
- Bk(3,4) = PHI_NIST_D2CP4(Tint) | |
- Bk(3,5) = PHI_NIST_D2CP5(Tint) | |
- Bk(3,6) =-PHI_NIST_D2CP1(Tint) | |
- Bk(3,7) =-PHI_NIST_D2CP2(Tint) | |
- Bk(3,8) =-PHI_NIST_D2CP3(Tint) | |
- Bk(3,9) =-PHI_NIST_D2CP4(Tint) | |
- Bk(3,10)=-PHI_NIST_D2CP5(Tint) | |
- D1(3)=0.D0 | |
-C | |
- DO I=1,N | |
- DO J=1,LDB | |
- B1(J,I)=Bk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
-! NIST FORMAT----------------------------------------- | |
-C | |
- call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
-! WRITE(*,*) 'X1=',X1(1:10) | |
-! pause | |
-C | |
-C For enthalpy, NEED define 2 coeffs, N=2 | |
-C | |
- DO I=1,NH | |
- XH1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NH | |
- DO J=1,LDAH | |
- AH1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBH | |
- BH1(J,I)=0.D0 | |
- BHk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKH | |
- WORKH(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CH2(I)=CH(I)+ DLTH - H_298 - PHI_NIST_H(TEMP(I),X1(1:5)) | |
- ENDDO | |
- DO I=MARK1+1,MH | |
- CH2(I)=CH(I)+ DLTH - H_298 - PHI_NIST_H(TEMP(I),X1(6:10)) | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- AH1(I,1)=1.0D0 | |
- ENDDO | |
- DO I=MARK1+1,MH | |
- AH1(I,2)=1.0D0 | |
- ENDDO | |
-C | |
-C Contrain for H at Tint | |
-C | |
- BHk(1,1)=1.0D0 | |
- BHk(1,2)=-1.0D0 | |
- DH1(1)=PHI_NIST_H(Tint,X1(6:10)) | |
- & -PHI_NIST_H(Tint,X1(1:5)) | |
-C | |
-C Contrain for H at 298.15K | |
-C | |
- BHk(2,1)=1.0D0 | |
- BHk(2,2)=0.D0 | |
- DH1(2)=H_298 + DLTH - H_298 - PHI_NIST_H(298.15D0,X1(1:5)) | |
-C | |
- DO I=1,NH | |
- DO J=1,LDBH | |
- BH1(J,I)=BHk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
- & LWORKH,INFO) | |
-! WRITE(*,*) 'H_CONST1=',XH1(1) | |
-! WRITE(*,*) 'H_CONST2=',XH1(2) | |
-C | |
- A_H1=XH1(1) | |
- A_H2=XH1(2) | |
-C | |
-C For entropy, NEED define 2 coeffs, N=2 | |
- DO I=1,NS | |
- XS1(I)=0.D0 | |
- ENDDO | |
- DO I=1,NS | |
- DO J=1,LDAS | |
- AS1(J,I)=0.D0 | |
- ENDDO | |
- DO J=1,LDBS | |
- BS1(J,I)=0.D0 | |
- BSk(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
- DO I=1,LWORKS | |
- WORKS(I)=0.D0 | |
- ENDDO | |
-C | |
- DO I=1,MARK1 | |
- CS2(I)=CS(I) - PHI_NIST_S(TEMP(I),X1(1:5)) | |
- ENDDO | |
- DO I=MARK1+1,MS | |
- CS2(I)=CS(I) - PHI_NIST_S(TEMP(I),X1(6:10)) | |
- ENDDO | |
- DO I=1,MARK1 | |
- AS1(I,1)=1.0D0 | |
- ENDDO | |
- DO I=MARK1+1,MS | |
- AS1(I,2)=1.0D0 | |
- ENDDO | |
-C | |
-C Contrain for S at Tint | |
-C | |
- BSk(1,1)=1.0D0 | |
- BSk(1,2)=-1.0D0 | |
- DS1(1)=PHI_NIST_S(Tint,X1(6:10)) | |
- & -PHI_NIST_S(Tint,X1(1:5)) | |
-C | |
-C Contrain for S at 298.15K | |
-C | |
- BSk(2,1)=1.0D0 | |
- BSk(2,2)=0.0D0 | |
-! DS1(2)=CS(1) - PHI_NIST_S(298.D0,X1(1:5)) | |
- DS1(2)=S_298 - PHI_NIST_S(298.15D0,X1(1:5)) | |
-C | |
- DO I=1,NS | |
- DO J=1,LDBS | |
- BS1(J,I)=BSk(J,I) | |
- ENDDO | |
- ENDDO | |
-C | |
- call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
- & LWORKS,INFO) | |
-! WRITE(*,*) XS1 | |
-! WRITE(*,*) 'S_CONST1=',XS1(1) | |
-! WRITE(*,*) 'S_CONST2=',XS1(2) | |
-C | |
- A_S1=XS1(1) | |
- A_S2=XS1(2) | |
-C | |
-C | |
- DO I=1,5 | |
- THERM1(I)=X1(I) | |
- ENDDO | |
- THERM1(5+1)=A_H1 | |
- THERM1(5+2)=A_S1 | |
- DO I=1,5 | |
- THERM2(I)=X1(I+5) | |
- ENDDO | |
- THERM2(5+1)=A_H2 | |
- THERM2(5+2)=A_S2 | |
-C | |
-! WRITE(*,*) THERM1(1:7) | |
-! WRITE(*,*) THERM2(1:7) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST1=1.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST2=TEM/1000.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST3=(TEM/1000.D0)*(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST4=(TEM/1000.D0)*(TEM/1000.D0)*(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST5=1.0D0/(TEM/1000.D0)/(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_DCP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_DCP1=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_DCP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_DCP2=1.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_DCP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_DCP3=2.D0*(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_DCP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_DCP4=3.D0*(TEM/1000.D0)*(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_DCP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_DCP5=-2.D0/(TEM/1000.D0)/(TEM/1000.D0)/(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_D2CP1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_D2CP1=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_D2CP2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_D2CP2=0.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_D2CP3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_D2CP3=2.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_D2CP4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_D2CP4=6.D0*(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_D2CP5(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- PHI_NIST_D2CP5=6.D0/(TEM/1000.D0)/(TEM/1000.D0) | |
- & /(TEM/1000.D0)/(TEM/1000.D0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_H(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH,T1000 | |
- DIMENSION alpha(5) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
- T1000=TEM/1000.D0 | |
- PHI_NIST_H=alpha(1)*T1000+alpha(2)*T1000*T1000/2.D0 | |
- & +alpha(3)*T1000*T1000*T1000/3.D0 | |
- & +alpha(4)*T1000*T1000*T1000*T1000/4.D0 | |
- & -alpha(5)/T1000 | |
-! WRITE(*,*) 'PHI_NIST_H=',PHI_NIST_H | |
- WRITE(*,*) 'H calculated by Shomate is too small!' | |
- WRITE(*,*) 'warning! warning! warning!' | |
- PAUSE | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI_NIST_S(TEM,alpha) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH,T1000 | |
- DIMENSION alpha(5) | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
-C | |
-! WRITE(*,*) ALPHA(1:5) | |
-! WRITE(*,*) TEM | |
- T1000=TEM/1000.D0 | |
- PHI_NIST_S=alpha(1)*DLOG(T1000)+alpha(2)*T1000 | |
- & +alpha(3)*T1000*T1000/2.D0 | |
- & +alpha(4)*T1000*T1000*T1000/3.D0 | |
- & -alpha(5)/T1000/T1000/2.D0 | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
+C: Add the constrains to the first and second derivatives | |
+C: Therefore, there are three constrains: Cp, DCp, and D2Cp | |
+C: -------------------------------------------------------------- | |
+C: For NIST | |
+C: Use a single matrix to calculate all 10 coefficients | |
+C: [A]: M x 10 | |
+C: [X]: 10 x 1 (alpha1_low,alpha2_low,alpha3_low,alpha4_low,alpha5_low, | |
+C: alpha1_hig,alpha2_hig,alpha3_hig,alpha4_hig,alpha5_hig) | |
+C: [C]: M x 1 | |
+C: Contrains: CP, dCP/dT, and d2CP/d2T | |
+C: at the intermediate temperature Tint | |
+C: [B]: 3 x 10 | |
+C: [D]: 3 x 1 | |
+C---------------------------------------------------------------- | |
+C FOR NIST CHEMTHERMO DATA FORMAT | |
+C number of coefficients: N=5 x 2 | |
+C number of discrete data point: M>=N, i.e., M=102 | |
+C | |
+C use the DGGLSE to solve the linear least squares equality-constrained | |
+C (LlSE) problem. | |
+!***************************A************************************* | |
+! Programmed by John Z. Wen, MIT, June 2005 | |
+!**************************************************************** | |
+C | |
+ SUBROUTINE NIST(Tint,TNEW,THERM1,THERM2,TEMP1,C1,CH1,CS1) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION Tint,TNEW,THERM1,THERM2 | |
+ DOUBLE PRECISION H_298,S_298,DLTH | |
+C | |
+ INTEGER M,N,P,LDA,LDB,LWORK,INFO | |
+ INTEGER MH,NH,PH,LDAH,LDBH,LWORKH | |
+ INTEGER MS,NS,PS,LDAS,LDBS,LWORKS | |
+ DOUBLE PRECISION A1,B1,Bk,C1,D1,X1,WORK1 | |
+ DOUBLE PRECISION TEMP1,PHI_NIST1,PHI_NIST2,PHI_NIST3, | |
+ & PHI_NIST4,PHI_NIST5,ROL | |
+ DOUBLE PRECISION PHI_NIST_DCP1,PHI_NIST_DCP2,PHI_NIST_DCP3, | |
+ & PHI_NIST_DCP4,PHI_NIST_DCP5,PHI_NIST_D2CP1, | |
+ & PHI_NIST_D2CP2,PHI_NIST_D2CP3,PHI_NIST_D2CP4, | |
+ & PHI_NIST_D2CP5 | |
+ DOUBLE PRECISION A_H1,A_S1,A_H2,A_S2 | |
+ DOUBLE PRECISION AH1,BH1,CH1,DH1,XH1,WORKH,BHk,CH,CH2 | |
+ DOUBLE PRECISION AS1,BS1,CS1,DS1,XS1,WORKS,BSk,CS,CS2 | |
+ DOUBLE PRECISION PHI_NIST_H,PHI_NIST_S | |
+ INTEGER MARK1 | |
+ DOUBLE PRECISION TEMP,C | |
+C | |
+C Required by LSEC solver: | |
+! LDA >= MAX(1,M) | |
+! LDB >= MAX(1,P) | |
+! LWORK >= max(1,M+N+P) | |
+! P=1 for only one constrain at the intermediate temp. | |
+! P=3 for three constrains at the intermediate temp. | |
+C | |
+C CHANGE 'LWORK' if NECESSARY | |
+ PARAMETER (M=102) | |
+ PARAMETER (LDB=3,P=3) | |
+ PARAMETER (N=10) | |
+ DIMENSION A1(M,N),B1(LDB,N),C1(M-1),D1(P),X1(N),WORK1(M+N+P), | |
+ & Bk(LDB,N) | |
+ PARAMETER (LDBH=2,PH=2) | |
+ PARAMETER (NH=2) | |
+ PARAMETER (LDBS=2,PS=2) | |
+ PARAMETER (NS=2) | |
+ DIMENSION AH1(M,NH),BH1(LDBH,NH),CH1(M-1),DH1(PH),XH1(NH), | |
+ & WORKH(M+NH+PH),BHk(LDBH,NH),CH(M),CH2(M) | |
+ DIMENSION AS1(M,NS),BS1(LDBS,NS),CS1(M-1),DS1(PS),XS1(NS), | |
+ & WORKS(M+NS+PS),BSk(LDBS,NS),CS(M),CS2(M) | |
+ DIMENSION TEMP1(M-1),THERM1(7),THERM2(7) | |
+ DIMENSION TEMP(M),C(M) | |
+ INTEGER I,J | |
+C | |
+! GAS CONSTANT | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ EXTERNAL PHI_NIST1,PHI_NIST2,PHI_NIST3,PHI_NIST4,PHI_NIST5, | |
+ & PHI_NIST_DCP1,PHI_NIST_DCP2,PHI_NIST_DCP3, | |
+ & PHI_NIST_DCP4,PHI_NIST_DCP5,PHI_NIST_D2CP1, | |
+ & PHI_NIST_D2CP2,PHI_NIST_D2CP3,PHI_NIST_D2CP4, | |
+ & PHI_NIST_D2CP5,PHI_NIST_H,PHI_NIST_S | |
+C | |
+! WRITE(*,*) 'CALLED NIST' | |
+C | |
+ LDA = M | |
+ LWORK = M+N+P | |
+ MH = M | |
+ LDAH = MH | |
+ LWORKH= MH+NH+PH | |
+ MS = M | |
+ LDAS = MS | |
+ LWORKS= MS+NS+PS | |
+C | |
+C FIND 'Tint' and 'Tint1' in sample data | |
+C | |
+ MARK1 = 0 | |
+ DO I=1,M-1 | |
+ IF (TEMP1(I) .GT. Tint) THEN | |
+ MARK1=I-1 | |
+ IF (Tint .NE. TEMP1(I-1)) THEN | |
+ Tint=TEMP1(I-1) | |
+ TNEW=Tint | |
+! WRITE(*,*) 'Tint has been replaced!' | |
+ ENDIF | |
+ GOTO 995 | |
+ ENDIF | |
+ ENDDO | |
+ 995 CONTINUE | |
+! WRITE(*,*) 'MARK1=',MARK1 | |
+C | |
+C Rearrange the matrics | |
+C | |
+ DO I=1,M | |
+ TEMP(I)=0.D0 | |
+ C (I)=0.D0 | |
+ CH (I)=0.D0 | |
+ CS (I)=0.D0 | |
+ CH2 (I)=0.D0 | |
+ CS2 (I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ TEMP(I)=TEMP1(I) | |
+ C (I)=C1(I) | |
+ CH(I)=CH1(I) | |
+ CS(I)=CS1(I) | |
+ ENDDO | |
+ TEMP(MARK1+1)=TEMP(MARK1) | |
+ C (MARK1+1)=C (MARK1) | |
+ CH(MARK1+1)=CH(MARK1) | |
+ CS(MARK1+1)=CS(MARK1) | |
+ DO I=MARK1+2,M | |
+ TEMP(I)=TEMP1(I-1) | |
+ C (I)=C1 (I-1) | |
+ CH(I)=CH1(I-1) | |
+ CS(I)=CS1(I-1) | |
+ ENDDO | |
+C | |
+! WRITE(*,*) 'Tint=', Tint | |
+! WRITE(*,*) TEMP | |
+! WRITE(*,*) C | |
+! WRITE(*,*) CH | |
+! WRITE(*,*) CS | |
+! PAUSE | |
+C | |
+ DO I=1,N | |
+ X1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,N | |
+ DO J=1,LDA | |
+ A1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDB | |
+ B1(J,I)=0.D0 | |
+ Bk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORK | |
+ WORK1(I)=0.D0 | |
+ ENDDO | |
+C | |
+! For PHI matrix, first temperature range | |
+ DO I=1,MARK1 | |
+ A1(I,1)=PHI_NIST1(TEMP(I)) | |
+ A1(I,2)=PHI_NIST2(TEMP(I)) | |
+ A1(I,3)=PHI_NIST3(TEMP(I)) | |
+ A1(I,4)=PHI_NIST4(TEMP(I)) | |
+ A1(I,5)=PHI_NIST5(TEMP(I)) | |
+ ENDDO | |
+! For PHI matrix, second temperature range | |
+ DO I=MARK1+1,M | |
+ A1(I,6) =PHI_NIST1(TEMP(I)) | |
+ A1(I,7) =PHI_NIST2(TEMP(I)) | |
+ A1(I,8) =PHI_NIST3(TEMP(I)) | |
+ A1(I,9) =PHI_NIST4(TEMP(I)) | |
+ A1(I,10)=PHI_NIST5(TEMP(I)) | |
+ ENDDO | |
+C | |
+! WRITE(*,*) TEMP1 | |
+! WRITE(*,*) C1 | |
+! PAUSE | |
+C | |
+C For Constrains at Tint ------------------------ | |
+C | |
+! For CP values | |
+ Bk(1,1) = PHI_NIST1(Tint) | |
+ Bk(1,2) = PHI_NIST2(Tint) | |
+ Bk(1,3) = PHI_NIST3(Tint) | |
+ Bk(1,4) = PHI_NIST4(Tint) | |
+ Bk(1,5) = PHI_NIST5(Tint) | |
+ Bk(1,6) =-PHI_NIST1(Tint) | |
+ Bk(1,7) =-PHI_NIST2(Tint) | |
+ Bk(1,8) =-PHI_NIST3(Tint) | |
+ Bk(1,9) =-PHI_NIST4(Tint) | |
+ Bk(1,10)=-PHI_NIST5(Tint) | |
+ D1(1)=0.D0 | |
+C For DCp values | |
+ Bk(2,1) = PHI_NIST_DCP1(Tint) | |
+ Bk(2,2) = PHI_NIST_DCP2(Tint) | |
+ Bk(2,3) = PHI_NIST_DCP3(Tint) | |
+ Bk(2,4) = PHI_NIST_DCP4(Tint) | |
+ Bk(2,5) = PHI_NIST_DCP5(Tint) | |
+ Bk(2,6) =-PHI_NIST_DCP1(Tint) | |
+ Bk(2,7) =-PHI_NIST_DCP2(Tint) | |
+ Bk(2,8) =-PHI_NIST_DCP3(Tint) | |
+ Bk(2,9) =-PHI_NIST_DCP4(Tint) | |
+ Bk(2,10)=-PHI_NIST_DCP5(Tint) | |
+ D1(2)=0.D0 | |
+C For D2Cp values | |
+ Bk(3,1) = PHI_NIST_D2CP1(Tint) | |
+ Bk(3,2) = PHI_NIST_D2CP2(Tint) | |
+ Bk(3,3) = PHI_NIST_D2CP3(Tint) | |
+ Bk(3,4) = PHI_NIST_D2CP4(Tint) | |
+ Bk(3,5) = PHI_NIST_D2CP5(Tint) | |
+ Bk(3,6) =-PHI_NIST_D2CP1(Tint) | |
+ Bk(3,7) =-PHI_NIST_D2CP2(Tint) | |
+ Bk(3,8) =-PHI_NIST_D2CP3(Tint) | |
+ Bk(3,9) =-PHI_NIST_D2CP4(Tint) | |
+ Bk(3,10)=-PHI_NIST_D2CP5(Tint) | |
+ D1(3)=0.D0 | |
+C | |
+ DO I=1,N | |
+ DO J=1,LDB | |
+ B1(J,I)=Bk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+! NIST FORMAT----------------------------------------- | |
+C | |
+ call DGGLSE(M,N,P,A1,LDA,B1,LDB,C,D1,X1,WORK1,LWORK,INFO) | |
+! WRITE(*,*) 'X1=',X1(1:10) | |
+! pause | |
+C | |
+C For enthalpy, NEED define 2 coeffs, N=2 | |
+C | |
+ DO I=1,NH | |
+ XH1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NH | |
+ DO J=1,LDAH | |
+ AH1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBH | |
+ BH1(J,I)=0.D0 | |
+ BHk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKH | |
+ WORKH(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CH2(I)=CH(I)+ DLTH - H_298 - PHI_NIST_H(TEMP(I),X1(1:5)) | |
+ ENDDO | |
+ DO I=MARK1+1,MH | |
+ CH2(I)=CH(I)+ DLTH - H_298 - PHI_NIST_H(TEMP(I),X1(6:10)) | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ AH1(I,1)=1.0D0 | |
+ ENDDO | |
+ DO I=MARK1+1,MH | |
+ AH1(I,2)=1.0D0 | |
+ ENDDO | |
+C | |
+C Contrain for H at Tint | |
+C | |
+ BHk(1,1)=1.0D0 | |
+ BHk(1,2)=-1.0D0 | |
+ DH1(1)=PHI_NIST_H(Tint,X1(6:10)) | |
+ & -PHI_NIST_H(Tint,X1(1:5)) | |
+C | |
+C Contrain for H at 298.15K | |
+C | |
+ BHk(2,1)=1.0D0 | |
+ BHk(2,2)=0.D0 | |
+ DH1(2)=H_298 + DLTH - H_298 - PHI_NIST_H(298.15D0,X1(1:5)) | |
+C | |
+ DO I=1,NH | |
+ DO J=1,LDBH | |
+ BH1(J,I)=BHk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MH,NH,PH,AH1,LDAH,BH1,LDBH,CH2,DH1,XH1,WORKH, | |
+ & LWORKH,INFO) | |
+! WRITE(*,*) 'H_CONST1=',XH1(1) | |
+! WRITE(*,*) 'H_CONST2=',XH1(2) | |
+C | |
+ A_H1=XH1(1) | |
+ A_H2=XH1(2) | |
+C | |
+C For entropy, NEED define 2 coeffs, N=2 | |
+ DO I=1,NS | |
+ XS1(I)=0.D0 | |
+ ENDDO | |
+ DO I=1,NS | |
+ DO J=1,LDAS | |
+ AS1(J,I)=0.D0 | |
+ ENDDO | |
+ DO J=1,LDBS | |
+ BS1(J,I)=0.D0 | |
+ BSk(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+ DO I=1,LWORKS | |
+ WORKS(I)=0.D0 | |
+ ENDDO | |
+C | |
+ DO I=1,MARK1 | |
+ CS2(I)=CS(I) - PHI_NIST_S(TEMP(I),X1(1:5)) | |
+ ENDDO | |
+ DO I=MARK1+1,MS | |
+ CS2(I)=CS(I) - PHI_NIST_S(TEMP(I),X1(6:10)) | |
+ ENDDO | |
+ DO I=1,MARK1 | |
+ AS1(I,1)=1.0D0 | |
+ ENDDO | |
+ DO I=MARK1+1,MS | |
+ AS1(I,2)=1.0D0 | |
+ ENDDO | |
+C | |
+C Contrain for S at Tint | |
+C | |
+ BSk(1,1)=1.0D0 | |
+ BSk(1,2)=-1.0D0 | |
+ DS1(1)=PHI_NIST_S(Tint,X1(6:10)) | |
+ & -PHI_NIST_S(Tint,X1(1:5)) | |
+C | |
+C Contrain for S at 298.15K | |
+C | |
+ BSk(2,1)=1.0D0 | |
+ BSk(2,2)=0.0D0 | |
+! DS1(2)=CS(1) - PHI_NIST_S(298.D0,X1(1:5)) | |
+ DS1(2)=S_298 - PHI_NIST_S(298.15D0,X1(1:5)) | |
+C | |
+ DO I=1,NS | |
+ DO J=1,LDBS | |
+ BS1(J,I)=BSk(J,I) | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ call DGGLSE(MS,NS,PS,AS1,LDAS,BS1,LDBS,CS2,DS1,XS1,WORKS, | |
+ & LWORKS,INFO) | |
+! WRITE(*,*) XS1 | |
+! WRITE(*,*) 'S_CONST1=',XS1(1) | |
+! WRITE(*,*) 'S_CONST2=',XS1(2) | |
+C | |
+ A_S1=XS1(1) | |
+ A_S2=XS1(2) | |
+C | |
+C | |
+ DO I=1,5 | |
+ THERM1(I)=X1(I) | |
+ ENDDO | |
+ THERM1(5+1)=A_H1 | |
+ THERM1(5+2)=A_S1 | |
+ DO I=1,5 | |
+ THERM2(I)=X1(I+5) | |
+ ENDDO | |
+ THERM2(5+1)=A_H2 | |
+ THERM2(5+2)=A_S2 | |
+C | |
+! WRITE(*,*) THERM1(1:7) | |
+! WRITE(*,*) THERM2(1:7) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST1=1.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST2=TEM/1000.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST3=(TEM/1000.D0)*(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST4=(TEM/1000.D0)*(TEM/1000.D0)*(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST5=1.0D0/(TEM/1000.D0)/(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_DCP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_DCP1=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_DCP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_DCP2=1.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_DCP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_DCP3=2.D0*(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_DCP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_DCP4=3.D0*(TEM/1000.D0)*(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_DCP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_DCP5=-2.D0/(TEM/1000.D0)/(TEM/1000.D0)/(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_D2CP1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_D2CP1=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_D2CP2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_D2CP2=0.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_D2CP3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_D2CP3=2.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_D2CP4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_D2CP4=6.D0*(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_D2CP5(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,H_298,S_298,DLTH | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ PHI_NIST_D2CP5=6.D0/(TEM/1000.D0)/(TEM/1000.D0) | |
+ & /(TEM/1000.D0)/(TEM/1000.D0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_H(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH,T1000 | |
+ DIMENSION alpha(5) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+ T1000=TEM/1000.D0 | |
+ PHI_NIST_H=alpha(1)*T1000+alpha(2)*T1000*T1000/2.D0 | |
+ & +alpha(3)*T1000*T1000*T1000/3.D0 | |
+ & +alpha(4)*T1000*T1000*T1000*T1000/4.D0 | |
+ & -alpha(5)/T1000 | |
+! WRITE(*,*) 'PHI_NIST_H=',PHI_NIST_H | |
+ WRITE(*,*) 'H calculated by Shomate is too small!' | |
+ WRITE(*,*) 'warning! warning! warning!' | |
+ PAUSE | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI_NIST_S(TEM,alpha) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ROL,alpha,H_298,S_298,DLTH,T1000 | |
+ DIMENSION alpha(5) | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+C | |
+! WRITE(*,*) ALPHA(1:5) | |
+! WRITE(*,*) TEM | |
+ T1000=TEM/1000.D0 | |
+ PHI_NIST_S=alpha(1)*DLOG(T1000)+alpha(2)*T1000 | |
+ & +alpha(3)*T1000*T1000/2.D0 | |
+ & +alpha(4)*T1000*T1000*T1000/3.D0 | |
+ & -alpha(5)/T1000/T1000/2.D0 | |
+C | |
+ RETURN | |
+C | |
+ END | |
\ No newline at end of file | |
diff --git a/source/GATPFit/lsfp_wilh1.f b/source/GATPFit/lsfp_wilh1.f | |
index 4598023..b661fc2 100644 | |
--- a/source/GATPFit/lsfp_wilh1.f | |
+++ b/source/GATPFit/lsfp_wilh1.f | |
@@ -1,357 +1,345 @@ | |
-C WEN, August 2005, | |
-C add the Cp for 0K | |
-C********************************************************************** | |
-C FOR WILHOID CHEMTHERMO DATE FORMAT, N=4, M>=4 | |
-C | |
- SUBROUTINE SWILT(SNAM,ENAM,ELNO,STRUC_MOL,ATOMS, | |
- & ROTORS,THERM1,TEMP,CPT,CH,CS,M) | |
-C | |
- implicit none | |
-C | |
- CHARACTER(LEN=4) ENAM(5) | |
- CHARACTER(LEN=16) SNAM | |
- CHARACTER(LEN=9) STRUC_MOL | |
- CHARACTER(LEN=1) ELNO(5) | |
- DOUBLE PRECISION ROL,H_298,S_298,DLTH | |
- DOUBLE PRECISION TEMP,CPT,CH,CS,PHI1,PHI2,PHI3,PHI4,B_WILH, | |
- & CP_INF,CP_0,ATOMS,ROTORS | |
- DOUBLE PRECISION CPT2,TEM2 | |
- DOUBLE PRECISION Y_H,A_H,A_S,FUN_H,FUN_S | |
- DOUBLE PRECISION THERM1 | |
-C | |
- CHARACTER TRANS | |
- INTEGER M,N,NRHS,LDA,LDB,LWORK,INFO | |
- DOUBLE PRECISION A,B,WORK | |
- PARAMETER (N=4, NRHS=1) | |
-C | |
-C REQUIRED BY dgels: | |
-! LDA >= MAX(1,M) | |
-! LDB >= MAX(1,M,N) | |
-! LWORK >= max( 1, MN + max( MN, NRHS ) ) | |
-! MN= MIN( M, N ) | |
-C | |
- PARAMETER (LWORK=8) | |
- DIMENSION A(M+1,N),B(M+1,NRHS),WORK(LWORK) | |
- DIMENSION TEMP(M),CPT(M),CH(M),CS(M),THERM1(6) | |
- DIMENSION TEM2(M+1),CPT2(M+1) | |
-C | |
- INTEGER I,J | |
-C | |
- COMMON /GAS/ROL,H_298,S_298,DLTH | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- EXTERNAL PHI1,PHI2,PHI3,PHI4,B_WILH,FUN_H | |
-C | |
-C Input 100 temperature data | |
-! TEMP(1:M) from group additivity | |
-! DATA TEMP/300.D0,400.D0,500.D0,600.D0, | |
-! & 800.D0,1000.D0,1500.D0/ | |
-! DATA CPT/17.7725D0,22.4645D0,27.0142D0,30.7109D0, | |
-! & 36.9668D0,41.8009D0,49.3365D0/ | |
-C | |
-! DEFINE THE TOTAL NUMBER OF DISCRETE DATA****************** | |
-! | |
-! WRITE(*,*) 'CALLED WILH' | |
-C | |
- LDA=M+1 | |
- LDB=M+1 | |
- TRANS ='N' | |
-C | |
- DO I=1,N | |
- DO J=1,LDA | |
- A(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
-C | |
- DO I=1,NRHS | |
- DO J=1,LDB | |
- B(J,I)=0.D0 | |
- ENDDO | |
- ENDDO | |
-C | |
- DO I=1,LWORK | |
- WORK(I)=0.D0 | |
- ENDDO | |
-C | |
-C Calculate the Cp_0 and Cp_int, here ******************* | |
- | |
+C WEN, August 2005, | |
+C add the Cp for 0K | |
+C********************************************************************** | |
+C FOR WILHOID CHEMTHERMO DATE FORMAT, N=4, M>=4 | |
+C | |
+ SUBROUTINE SWILT(SNAM,ENAM,ELNO,STRUC_MOL,ATOMS, | |
+ & ROTORS,THERM1,TEMP,CPT,CH,CS,M) | |
+C | |
+ implicit none | |
+C | |
+ CHARACTER(LEN=4) ENAM(5) | |
+ CHARACTER(LEN=16) SNAM | |
+ CHARACTER(LEN=9) STRUC_MOL | |
+ CHARACTER(LEN=1) ELNO(5) | |
+ DOUBLE PRECISION ROL,H_298,S_298,DLTH | |
+ DOUBLE PRECISION TEMP,CPT,CH,CS,PHI1,PHI2,PHI3,PHI4,B_WILH, | |
+ & CP_INF,CP_0,ATOMS,ROTORS | |
+ DOUBLE PRECISION CPT2,TEM2 | |
+ DOUBLE PRECISION Y_H,A_H,A_S,FUN_H,FUN_S | |
+ DOUBLE PRECISION THERM1 | |
+C | |
+ CHARACTER TRANS | |
+ INTEGER M,N,NRHS,LDA,LDB,LWORK,INFO | |
+ DOUBLE PRECISION A,B,WORK | |
+ PARAMETER (N=4, NRHS=1) | |
+C | |
+C REQUIRED BY dgels: | |
+! LDA >= MAX(1,M) | |
+! LDB >= MAX(1,M,N) | |
+! LWORK >= max( 1, MN + max( MN, NRHS ) ) | |
+! MN= MIN( M, N ) | |
+C | |
+ PARAMETER (LWORK=8) | |
+ DIMENSION A(M+1,N),B(M+1,NRHS),WORK(LWORK) | |
+ DIMENSION TEMP(M),CPT(M),CH(M),CS(M),THERM1(6) | |
+ DIMENSION TEM2(M+1),CPT2(M+1) | |
+C | |
+ INTEGER I,J | |
+C | |
+ COMMON /GAS/ROL,H_298,S_298,DLTH | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ EXTERNAL PHI1,PHI2,PHI3,PHI4,B_WILH,FUN_H | |
+C | |
+C Input 100 temperature data | |
+! TEMP(1:M) from group additivity | |
+! DATA TEMP/300.D0,400.D0,500.D0,600.D0, | |
+! & 800.D0,1000.D0,1500.D0/ | |
+! DATA CPT/17.7725D0,22.4645D0,27.0142D0,30.7109D0, | |
+! & 36.9668D0,41.8009D0,49.3365D0/ | |
+C | |
+! DEFINE THE TOTAL NUMBER OF DISCRETE DATA****************** | |
+! | |
+! WRITE(*,*) 'CALLED WILH' | |
+C | |
+ LDA=M+1 | |
+ LDB=M+1 | |
+ TRANS ='N' | |
+C | |
+ DO I=1,N | |
+ DO J=1,LDA | |
+ A(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ DO I=1,NRHS | |
+ DO J=1,LDB | |
+ B(J,I)=0.D0 | |
+ ENDDO | |
+ ENDDO | |
+C | |
+ DO I=1,LWORK | |
+ WORK(I)=0.D0 | |
+ ENDDO | |
+C | |
+C Calculate the Cp_0 and Cp_int, here ******************* | |
C gmagoon 10/2/09: added monoatomic case; this needs to be considered separately | |
C and was causing problems for H radical (presumably similar for O atom) | |
IF (ATOMS .EQ. 1) THEN | |
CP_0 = 2.5D0*1.9872D0 | |
CP_INF = 2.5D0*1.9872D0 | |
- ELSE IF (STRUC_MOL .EQ. 'NONLINEAR') THEN | |
- CP_0 =4.0D0*1.9872D0 | |
- CP_INF=(3.0D0*ATOMS-(2.D0+0.5D0*ROTORS))*1.9872D0 | |
- ELSE | |
- CP_0 =3.5D0*1.9872D0 | |
- CP_INF=(3.0D0*ATOMS-1.5D0)*1.9872D0 | |
- ENDIF | |
-! WRITE(*,*) 'CP_INF=', CP_INF | |
-! WRITE(*,*) 'CP_0 =', CP_0 | |
-! PAUSE | |
-C******************************************************** | |
-C RESET 'TEMP' AND 'CPT' | |
- DO I=1,M+1 | |
- TEM2(I)=0.D0 | |
- CPT2(I)=0.D0 | |
- ENDDO | |
-! | |
- TEM2(1) = 0.D0 | |
- CPT2(1) = CP_0 | |
-! | |
- DO I=1,M | |
- TEM2(I+1)=TEMP(I) | |
- CPT2(I+1)=CPT(I) | |
- ENDDO | |
-! A(1:N,1:M+1) | |
- DO I=1,M+1 | |
- A(I,1)=PHI1(TEM2(I)) | |
- A(I,2)=PHI2(TEM2(I)) | |
- A(I,3)=PHI3(TEM2(I)) | |
- A(I,4)=PHI4(TEM2(I)) | |
- ENDDO | |
-! C(1:M+1), C(1:M+1,1)=CP(T)-CP_0-(CP_INF-CP_0)*Y*Y | |
- B(1,1) = 0.D0 | |
- DO I=1,M | |
- B(I+1,1)=B_WILH(TEM2(I+1),CPT2(I+1)) | |
- ENDDO | |
-! | |
-C Contrain for Cp at 0K | |
-! | |
-! B(1,1) = PHI1(0.D0) | |
-! B(1,2) = PHI2(0.D0) | |
-! B(1,3) = PHI3(0.D0) | |
-! B(1,4) = PHI4(0.D0) | |
-! WRITE(*,*) 'B=', B | |
-! PAUSE | |
-! | |
-! D(1) = 0.D0 | |
-! | |
-C: Call LS solver wihtout contrains | |
-C: Solver A*X=B | |
-C | |
- call dgels(trans,m+1,n,nrhs,a,lda,b,ldb,work,lwork,info) | |
-! call DGGLSE(M+1,N,P,A,LDA,B,LDB,C,D,X1,WORK, | |
-! & LWORK,INFO) | |
-C | |
-C The alpha coefficients are stored in b(1:4,1) | |
-! WRITE(*,*) B(1:4) | |
-C | |
-C Calculate the constant 'I' for Enthalpy | |
-C | |
- Y_H=298.15D0/(298.15D0+500.D0) | |
-C | |
- A_H=DLTH*1000.d0-(CP_0*298.15D0)+(CP_INF-CP_0)*298.15D0 | |
- & *FUN_H(298.15D0,B(1:4,1)) | |
-C | |
-C Calculate the constant 'J' for Entropy | |
-C | |
- A_S=S_298 - CP_INF*DLOG(298.15D0) + (CP_INF-CP_0)* | |
- & FUN_S(298.15D0,B(1:4,1)) | |
-C | |
-C | |
- DO I=1,4 | |
- THERM1(I)=B(I,1) | |
- ENDDO | |
- THERM1(4+1)=A_H | |
- THERM1(4+2)=A_S | |
-! WRITE(*,*) THERM1(1:6) | |
-C | |
-! WRITE(*,*) 'WILH OVER' | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C************************************************************************ | |
- DOUBLE PRECISION FUNCTION PHI1(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- PHI1=1.0D0*(CP_INF-CP_0)*Y*Y*(Y-1) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI2(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- PHI2=Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION PHI3(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- PHI3=Y*Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
-C | |
- DOUBLE PRECISION FUNCTION PHI4(TEM) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- PHI4=Y*Y*Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION B_WILH(TEM,CP) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,Y,CP_INF,CP_0,CP | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- B_WILH=CP-CP_0-Y*Y*(CP_INF-CP_0) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION FUN_H(TEM,ALPHA) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ALPHA,Y | |
- DOUBLE PRECISION FUN1,FUN2,FUN3,FUN4,FUN5 | |
- DIMENSION alpha(4) | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- IF (Y .EQ. 0.D0) Y=1.0D0 | |
- FUN1=(2.D0+ALPHA(1)+ALPHA(2)+ALPHA(3)+ALPHA(4))* | |
- & (Y/2.D0-1+(1.D0/Y-1)*DLOG(TEM+500.D0)) | |
- FUN2=(1.D0/6.D0)*(3.D0*ALPHA(1)+ALPHA(2)+ALPHA(3)+ALPHA(4)) | |
- FUN3=(Y/12.D0)*(4.D0*ALPHA(2)+ALPHA(3)+ALPHA(4)) | |
- FUN4=(Y*Y/20.D0)*(5.D0*ALPHA(3)+ALPHA(4)) | |
- FUN5=(Y*Y*Y/30.D0)*6.D0*ALPHA(4) | |
-C | |
- FUN_H=FUN1+Y*Y*(FUN2+FUN3+FUN4+FUN5) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
- DOUBLE PRECISION FUNCTION FUN_S(TEM,ALPHA) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,ALPHA,Y | |
- DIMENSION alpha(4) | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- IF (Y .EQ. 0.D0) Y=1.0D0 | |
-C | |
- FUN_S=DLOG(Y)+ | |
- & (1.D0+Y*(ALPHA(1)/2.D0+ALPHA(2)*Y/3.D0+ALPHA(3)*Y*Y/4.D0 | |
- & +ALPHA(4)*Y*Y*Y/5.D0))*Y | |
-C | |
- RETURN | |
-C | |
- END | |
-C | |
- | |
- DOUBLE PRECISION FUNCTION CP_WILH(TEM,BETA) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0 | |
- DIMENSION BETA(6) | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- CP_WILH=CP_0+(CP_INF-CP_0)*Y*Y | |
- & *(1.D0+(Y-1.D0)*(BETA(1)+BETA(2)*Y+BETA(3)*Y*Y | |
- & +BETA(4)*Y*Y*Y)) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION H_WILH(TEM,BETA) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0,FUN_H | |
- DIMENSION BETA(6) | |
- EXTERNAL FUN_H | |
- COMMON /CP/CP_INF,CP_0 | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- H_WILH=BETA(5) | |
- & +(CP_0*TEM)-(CP_INF-CP_0)*TEM* | |
- & FUN_H(TEM,BETA(1:4)) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
-C | |
- DOUBLE PRECISION FUNCTION S_WILH(TEM,BETA) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0,FUN_S | |
- DIMENSION BETA(6) | |
- COMMON /CP/CP_INF,CP_0 | |
- EXTERNAL FUN_S | |
-C | |
- Y=TEM/(TEM+500.D0) | |
- IF (TEM .EQ. 0.D0) TEM = 1.0D0 | |
- S_WILH=BETA(6) | |
- & +CP_INF*DLOG(TEM) - (CP_INF-CP_0)* | |
- & FUN_S(TEM,BETA(1:4)) | |
-C | |
- RETURN | |
-C | |
- END | |
- | |
- SUBROUTINE DATAFIND(BETA,TEM,CP,CH,CS) | |
-C | |
- implicit none | |
-C | |
- DOUBLE PRECISION BETA,TEM,CP,CH,CS | |
- DOUBLE PRECISION CP_WILH,H_WILH,S_WILH | |
- DIMENSION BETA(6) | |
-C | |
- EXTERNAL CP_WILH,H_WILH,S_WILH | |
-C | |
- CP=CP_WILH(TEM,BETA) | |
- CH=H_WILH(TEM,BETA) | |
- CS=S_WILH(TEM,BETA) | |
- RETURN | |
-C | |
- END | |
+ ELSE IF (STRUC_MOL .EQ. 'NONLINEAR') THEN | |
+ CP_0 =4.0D0*1.9872D0 | |
+ CP_INF=(3.0D0*ATOMS-(2.D0+0.5D0*ROTORS))*1.9872D0 | |
+ ELSE | |
+ CP_0 =3.5D0*1.9872D0 | |
+ CP_INF=(3.0D0*ATOMS-1.5D0)*1.9872D0 | |
+ ENDIF | |
+! WRITE(*,*) 'CP_INF=', CP_INF | |
+! WRITE(*,*) 'CP_0 =', CP_0 | |
+! PAUSE | |
+C******************************************************** | |
+C RESET 'TEMP' AND 'CPT' | |
+ DO I=1,M+1 | |
+ TEM2(I)=0.D0 | |
+ CPT2(I)=0.D0 | |
+ ENDDO | |
+! | |
+ TEM2(1) = 0.D0 | |
+ CPT2(1) = CP_0 | |
+! | |
+ DO I=1,M | |
+ TEM2(I+1)=TEMP(I) | |
+ CPT2(I+1)=CPT(I) | |
+ ENDDO | |
+! A(1:N,1:M+1) | |
+ DO I=1,M+1 | |
+ A(I,1)=PHI1(TEM2(I)) | |
+ A(I,2)=PHI2(TEM2(I)) | |
+ A(I,3)=PHI3(TEM2(I)) | |
+ A(I,4)=PHI4(TEM2(I)) | |
+ ENDDO | |
+! C(1:M+1), C(1:M+1,1)=CP(T)-CP_0-(CP_INF-CP_0)*Y*Y | |
+ B(1,1) = 0.D0 | |
+ DO I=1,M | |
+ B(I+1,1)=B_WILH(TEM2(I+1),CPT2(I+1)) | |
+ ENDDO | |
+! | |
+C Contrain for Cp at 0K | |
+! | |
+! B(1,1) = PHI1(0.D0) | |
+! B(1,2) = PHI2(0.D0) | |
+! B(1,3) = PHI3(0.D0) | |
+! B(1,4) = PHI4(0.D0) | |
+! WRITE(*,*) 'B=', B | |
+! PAUSE | |
+! | |
+! D(1) = 0.D0 | |
+! | |
+C: Call LS solver wihtout contrains | |
+C: Solver A*X=B | |
+C | |
+ call dgels(trans,m+1,n,nrhs,a,lda,b,ldb,work,lwork,info) | |
+! call DGGLSE(M+1,N,P,A,LDA,B,LDB,C,D,X1,WORK, | |
+! & LWORK,INFO) | |
+C | |
+C The alpha coefficients are stored in b(1:4,1) | |
+! WRITE(*,*) B(1:4) | |
+C | |
+C Calculate the constant 'I' for Enthalpy | |
+C | |
+ Y_H=298.15D0/(298.15D0+500.D0) | |
+C | |
+ A_H=DLTH*1000.d0-(CP_0*298.15D0)+(CP_INF-CP_0)*298.15D0 | |
+ & *FUN_H(298.15D0,B(1:4,1)) | |
+C | |
+C Calculate the constant 'J' for Entropy | |
+C | |
+ A_S=S_298 - CP_INF*DLOG(298.15D0) + (CP_INF-CP_0)* | |
+ & FUN_S(298.15D0,B(1:4,1)) | |
+C | |
+C | |
+ DO I=1,4 | |
+ THERM1(I)=B(I,1) | |
+ ENDDO | |
+ THERM1(4+1)=A_H | |
+ THERM1(4+2)=A_S | |
+! WRITE(*,*) THERM1(1:6) | |
+C | |
+! WRITE(*,*) 'WILH OVER' | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C************************************************************************ | |
+ DOUBLE PRECISION FUNCTION PHI1(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ PHI1=1.0D0*(CP_INF-CP_0)*Y*Y*(Y-1) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI2(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ PHI2=Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI3(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ PHI3=Y*Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+C | |
+ DOUBLE PRECISION FUNCTION PHI4(TEM) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,Y,CP_INF,CP_0 | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ PHI4=Y*Y*Y*(CP_INF-CP_0)*Y*Y*(Y-1) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION B_WILH(TEM,CP) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,Y,CP_INF,CP_0,CP | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ B_WILH=CP-CP_0-Y*Y*(CP_INF-CP_0) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION FUN_H(TEM,ALPHA) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ALPHA,Y | |
+ DOUBLE PRECISION FUN1,FUN2,FUN3,FUN4,FUN5 | |
+ DIMENSION alpha(4) | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ IF (Y .EQ. 0.D0) Y=1.0D0 | |
+ FUN1=(2.D0+ALPHA(1)+ALPHA(2)+ALPHA(3)+ALPHA(4))* | |
+ & (Y/2.D0-1+(1.D0/Y-1)*DLOG(TEM+500.D0)) | |
+ FUN2=(1.D0/6.D0)*(3.D0*ALPHA(1)+ALPHA(2)+ALPHA(3)+ALPHA(4)) | |
+ FUN3=(Y/12.D0)*(4.D0*ALPHA(2)+ALPHA(3)+ALPHA(4)) | |
+ FUN4=(Y*Y/20.D0)*(5.D0*ALPHA(3)+ALPHA(4)) | |
+ FUN5=(Y*Y*Y/30.D0)*6.D0*ALPHA(4) | |
+C | |
+ FUN_H=FUN1+Y*Y*(FUN2+FUN3+FUN4+FUN5) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+ DOUBLE PRECISION FUNCTION FUN_S(TEM,ALPHA) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,ALPHA,Y | |
+ DIMENSION alpha(4) | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ IF (Y .EQ. 0.D0) Y=1.0D0 | |
+C | |
+ FUN_S=DLOG(Y)+ | |
+ & (1.D0+Y*(ALPHA(1)/2.D0+ALPHA(2)*Y/3.D0+ALPHA(3)*Y*Y/4.D0 | |
+ & +ALPHA(4)*Y*Y*Y/5.D0))*Y | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION CP_WILH(TEM,BETA) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0 | |
+ DIMENSION BETA(6) | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ CP_WILH=CP_0+(CP_INF-CP_0)*Y*Y | |
+ & *(1.D0+(Y-1.D0)*(BETA(1)+BETA(2)*Y+BETA(3)*Y*Y | |
+ & +BETA(4)*Y*Y*Y)) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION H_WILH(TEM,BETA) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0,FUN_H | |
+ DIMENSION BETA(6) | |
+ EXTERNAL FUN_H | |
+ COMMON /CP/CP_INF,CP_0 | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ H_WILH=BETA(5) | |
+ & +(CP_0*TEM)-(CP_INF-CP_0)*TEM* | |
+ & FUN_H(TEM,BETA(1:4)) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+C | |
+ DOUBLE PRECISION FUNCTION S_WILH(TEM,BETA) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION TEM,BETA,Y,CP_INF,CP_0,FUN_S | |
+ DIMENSION BETA(6) | |
+ COMMON /CP/CP_INF,CP_0 | |
+ EXTERNAL FUN_S | |
+C | |
+ Y=TEM/(TEM+500.D0) | |
+ IF (TEM .EQ. 0.D0) TEM = 1.0D0 | |
+ S_WILH=BETA(6) | |
+ & +CP_INF*DLOG(TEM) - (CP_INF-CP_0)* | |
+ & FUN_S(TEM,BETA(1:4)) | |
+C | |
+ RETURN | |
+C | |
+ END | |
+ SUBROUTINE DATAFIND(BETA,TEM,CP,CH,CS) | |
+C | |
+ implicit none | |
+C | |
+ DOUBLE PRECISION BETA,TEM,CP,CH,CS | |
+ DOUBLE PRECISION CP_WILH,H_WILH,S_WILH | |
+ DIMENSION BETA(6) | |
+C | |
+ EXTERNAL CP_WILH,H_WILH,S_WILH | |
+C | |
+ CP=CP_WILH(TEM,BETA) | |
+ CH=H_WILH(TEM,BETA) | |
+ CS=S_WILH(TEM,BETA) | |
+ RETURN | |
+C | |
+ END | |
\ No newline at end of file | |
diff --git a/source/RMG/CheckForwardAndReverseRateCoefficients.java b/source/RMG/CheckForwardAndReverseRateCoefficients.java | |
index 2ecb408..933b21a 100644 | |
--- a/source/RMG/CheckForwardAndReverseRateCoefficients.java | |
+++ b/source/RMG/CheckForwardAndReverseRateCoefficients.java | |
@@ -1,6 +1,9 @@ | |
import java.io.BufferedReader; | |
+import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
+import java.io.FileWriter; | |
+import java.io.IOException; | |
import java.util.StringTokenizer; | |
import jing.chemParser.ChemParser; | |
@@ -15,11 +18,15 @@ public class CheckForwardAndReverseRateCoefficients { | |
public static void main(String args[]) { | |
// Temperature is assumed to have units in Kelvin | |
+ StringBuilder reverseRateCoefficients = new StringBuilder(); | |
+ String temperatureString = ""; | |
double[] T = new double [10]; | |
for (int i=0; i<10; i++) { | |
double temp = (1000.0/3000.0) + ((double)i/9.0) * (1000.0/300.0 - 1000.0/3000.0); | |
T[i] = 1000.0 / temp; | |
+ temperatureString += Double.toString(T[i])+"\t"; | |
} | |
+ reverseRateCoefficients.append(temperatureString+"\n"); | |
// double[] T = {614.0,614.0,614.0,614.0,614.0,629.0,643.0,678.0,713.0,749.0,784.0,854.0,930.0,1010.0,1100.0,1250.0,1350.0,1440.0,1510.0,1570.0,1640.0,1790.0,1970.0,2030.0,2090.0,2110.0,2130.0,2170.0,2180.0,2210.0,2220.0,2220.0,2220.0,2220.0,2210.0,2210.0,2210.0,2200.0,2190.0,2180.0,2170.0,2160.0,2150.0,2150.0,2140.0,2140.0,2140.0,2140.0,2130.0,2130.0,2130.0,2120.0,2120.0,2120.0,2120.0,2110.0,2110.0,2110.0,2110.0,2110.0,2100.0,2100.0,2100.0,2090.0,2080.0,2080.0,2070.0,2060.0,2050.0,2050.0,2040.0,2030.0,2030.0,2020.0,2010.0,2000.0,2000.0,1990.0,1980.0,1970.0,1970.0,1960.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0,1950.0}; | |
// double[] T = {681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,681.0,682.0,683.0,684.0,687.0,693.0,703.0,712.0,730.0,749.0,767.0,786.0,823.0,860.0,897.0,934.0,1000.0,1060.0,1120.0,1170.0,1230.0,1320.0,1370.0,1410.0,1440.0,1480.0,1550.0,1660.0,1760.0,1850.0,1920.0,1960.0,2060.0,2110.0,2150.0,2200.0,2240.0,2260.0,2260.0,2250.0,2250.0,2240.0,2240.0,2230.0,2220.0,2210.0,2200.0,2190.0,2180.0,2180.0,2180.0,2180.0,2180.0,2180.0,2170.0,2170.0,2170.0,2170.0,2170.0,2170.0,2160.0,2160.0,2150.0,2150.0,2140.0,2140.0,2130.0,2130.0,2120.0,2120.0,2110.0,2110.0,2100.0,2100.0,2090.0,2090.0,2080.0,2080.0,2070.0,2070.0,2060.0,2050.0,2050.0,2040.0,2030.0,2030.0,2020.0,2010.0,2010.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0}; | |
@@ -293,6 +300,7 @@ public class CheckForwardAndReverseRateCoefficients { | |
output += (logk[iii] - logKeq[iii]) + "\t"; | |
} | |
// System.out.println(output + shortRxnString); | |
+ reverseRateCoefficients.append(output + shortRxnString + "\n"); | |
} | |
} | |
line = ChemParser.readMeaningfulLine(br_thermodat, true); | |
@@ -300,6 +308,17 @@ public class CheckForwardAndReverseRateCoefficients { | |
} catch (FileNotFoundException e) { | |
System.err.println("File was not found: " + args[0] + "\n"); | |
} | |
+ | |
+ try { | |
+ File reversek = new File("reverseRateCoefficients.txt"); | |
+ FileWriter fw_rxns = new FileWriter(reversek); | |
+ fw_rxns.write(reverseRateCoefficients.toString()); | |
+ fw_rxns.close(); | |
+ } | |
+ catch (IOException e) { | |
+ System.out.println("Could not write reverseRateCoefficients.txt files"); | |
+ System.exit(0); | |
+ } | |
} | |
public static int[] determineSpeciesIndex(String reactsORprods) { | |
diff --git a/source/RMG/GUI.java b/source/RMG/GUI.java | |
index 536f3f7..27d5246 100644 | |
--- a/source/RMG/GUI.java | |
+++ b/source/RMG/GUI.java | |
@@ -68,9 +68,7 @@ import javax.swing.JButton; | |
import javax.swing.JComboBox; | |
import javax.swing.JComponent; | |
import javax.swing.JFileChooser; | |
-import javax.swing.JFormattedTextField; | |
import javax.swing.JLabel; | |
-import javax.swing.JOptionPane; | |
import javax.swing.JPanel; | |
import javax.swing.JScrollPane; | |
import javax.swing.JTabbedPane; | |
@@ -80,6 +78,7 @@ import javax.swing.JTextField; | |
import javax.swing.ListCellRenderer; | |
import javax.swing.table.TableCellRenderer; | |
import javax.swing.table.TableColumn; | |
+import javax.swing.text.JTextComponent; | |
import java.awt.Dimension; | |
import java.awt.GridLayout; | |
@@ -1959,16 +1958,7 @@ public class GUI extends JPanel implements ActionListener { | |
return; | |
} | |
else { | |
- String[] tempLines = tempConstant.getText().split("[\n]"); | |
- StringTokenizer st = null; | |
- for (int i=0; i<tempLines.length; i++) { | |
- st = new StringTokenizer(tempLines[i]); | |
- while (st.hasMoreTokens()) { | |
- String line = st.nextToken(); | |
- if (line.endsWith(",")) line = line.substring(0,line.length()-1).trim(); | |
- conditionFile += " " + line; | |
- } | |
- } | |
+ conditionFile += extractListOfValuesFromGUIInput(tempConstant); | |
} | |
conditionFile += "\r"; | |
@@ -1980,16 +1970,7 @@ public class GUI extends JPanel implements ActionListener { | |
return; | |
} | |
else { | |
- String[] pressLines = pressConstant.getText().split("[\n]"); | |
- StringTokenizer st = null; | |
- for (int i=0; i<pressLines.length; i++) { | |
- st = new StringTokenizer(pressLines[i]); | |
- while (st.hasMoreTokens()) { | |
- String line = st.nextToken(); | |
- if (line.endsWith(",")) line = line.substring(0,line.length()-1).trim(); | |
- conditionFile += " " + line; | |
- } | |
- } | |
+ conditionFile += extractListOfValuesFromGUIInput(pressConstant); | |
} | |
conditionFile += "\r\r"; | |
@@ -2005,9 +1986,18 @@ public class GUI extends JPanel implements ActionListener { | |
// Add whether to turn solvation on or not | |
// Add whether to run on-the-fly quantum jobs or not | |
+ if (thermomethod.getSelectedItem().equals("QM")) { | |
+ conditionFile += "ThermoMethod: QM " + qmSoftware.getSelectedItem().toString() + "\r" + | |
+ "QMForCyclicsOnly: "; | |
+ if (cyclicsOnly.getSelectedItem().equals("Yes")) { | |
+ conditionFile += "on"; | |
+ } else { | |
+ conditionFile += "off"; | |
+ } | |
+ conditionFile += "\rMaxRadNumForQM: " + maxRadNumQM.getText() + "\r\r"; | |
+ } | |
// Determine if each species is reactive, unreactive, or inert | |
- int nonInertCount = 0; | |
boolean unreactiveStatus = false; | |
String reactiveSpecies = ""; | |
String inertSpecies = ""; | |
@@ -2018,23 +2008,22 @@ public class GUI extends JPanel implements ActionListener { | |
else { | |
for (int i=0; i<tableInput.getRowCount(); i++) { | |
if (tableInput.getValueAt(i,3).equals("Inert")) { | |
- inertSpecies += tableInput.getValueAt(i,0) + " " + | |
- tableInput.getValueAt(i,1) + " (" + | |
- tableInput.getValueAt(i,2) + ")\r"; | |
+ inertSpecies += tableInput.getValueAt(i,0) + " (" + | |
+ tableInput.getValueAt(i,2) + ")" + | |
+ extractListOfValuesFromGUIInput(tableInput.getValueAt(i,1)) + "\r"; | |
} else if (tableInput.getValueAt(i,3).equals("Reactive-RMG")) { | |
- ++nonInertCount; | |
- reactiveSpecies += "(" + nonInertCount + ") " + | |
- tableInput.getValueAt(i,0) + " " + | |
- tableInput.getValueAt(i,1) + " (" + | |
- tableInput.getValueAt(i,2) + ")\r" + | |
+ reactiveSpecies += | |
+ tableInput.getValueAt(i,0) + " (" + | |
+ tableInput.getValueAt(i,2) + ")" + | |
+ extractListOfValuesFromGUIInput(tableInput.getValueAt(i,1)) + "\r" + | |
tableInput.getValueAt(i,4) + "\r\r"; | |
} else if (tableInput.getValueAt(i,3).equals("Reactive-User")) { | |
unreactiveStatus = true; | |
- ++nonInertCount; | |
- reactiveSpecies += "(" + nonInertCount + ") " + | |
- tableInput.getValueAt(i,0) + " " + | |
- tableInput.getValueAt(i,1) + " (" + | |
- tableInput.getValueAt(i,2) + ") unreactive\r" + | |
+ reactiveSpecies += | |
+ tableInput.getValueAt(i,0) + " (" + | |
+ tableInput.getValueAt(i,2) + ")" + | |
+ extractListOfValuesFromGUIInput(tableInput.getValueAt(i,1)) + | |
+ " unreactive\r" + | |
tableInput.getValueAt(i,4) + "\r\r"; | |
} | |
} | |
@@ -2557,6 +2546,41 @@ public class GUI extends JPanel implements ActionListener { | |
} | |
} | |
+ else if (line.startsWith("ThermoMethod")) { | |
+ st = new StringTokenizer(line); | |
+ tempString = st.nextToken(); // Skip over "ThermoMethod:" | |
+ String method = st.nextToken(); | |
+ if (method.toLowerCase().equals("qm")) { | |
+ thermomethod.setSelectedItem("QM"); | |
+ } else { | |
+ thermomethod.setSelectedItem("Group Additivity"); | |
+ } | |
+ qmSoftware.setSelectedItem("Both"); | |
+ if (st.hasMoreTokens()) { | |
+ method = st.nextToken().toLowerCase(); | |
+ if (method.equals("gaussian03")) qmSoftware.setSelectedItem("Gaussian03"); | |
+ else if (method.equals("mopac")) qmSoftware.setSelectedItem("MOPAC"); | |
+ else if (method.equals("both")) qmSoftware.setSelectedItem("Both"); | |
+ else System.out.println("GUI did not recognize the software package option " + method + " supplied to the ThermoMethod field."); | |
+ } | |
+ } | |
+ | |
+ else if (line.startsWith("QMForCyclicsOnly")) { | |
+ st = new StringTokenizer(line); | |
+ tempString = st.nextToken(); // Skip over "QMForCyclicsOnly:" | |
+ String yesno = st.nextToken(); | |
+ if (yesno.toLowerCase().equals("on")) | |
+ cyclicsOnly.setSelectedItem("Yes"); | |
+ else | |
+ cyclicsOnly.setSelectedItem("No"); | |
+ } | |
+ | |
+ else if (line.startsWith("MaxRadNumForQM")) { | |
+ st = new StringTokenizer(line); | |
+ tempString = st.nextToken(); // Skip over "MaxRadNumForQM:" | |
+ maxRadNumQM.setText(st.nextToken()); | |
+ } | |
+ | |
else if (line.toLowerCase().startsWith("readrestart")) { | |
st = new StringTokenizer(line); | |
tempString = st.nextToken(); // Skip over "ReadRestart:" | |
@@ -2606,16 +2630,17 @@ public class GUI extends JPanel implements ActionListener { | |
String reactivity = ""; | |
line = ChemParser.readMeaningfulLine(reader, true); | |
while (!line.startsWith("END")) { | |
- if (line.startsWith("(")) { | |
+ if (line.contains("(")) { | |
++numSpecies; | |
st = new StringTokenizer(line); | |
- tempString = st.nextToken(); // Skip over (#) | |
name = st.nextToken(); | |
- conc = st.nextToken(); | |
unit = st.nextToken(); | |
+ conc = ""; | |
reactivity = "Reactive-RMG"; | |
- if (st.hasMoreTokens()) { | |
- reactivity = "Reactive-User"; | |
+ while (st.hasMoreTokens()) { | |
+ String temporaryString = st.nextToken(); | |
+ if (temporaryString.equals("unreactive")) reactivity = "Reactive-User"; | |
+ else conc += temporaryString + " "; | |
} | |
} else { | |
adjList += line + "\r"; | |
@@ -2623,7 +2648,7 @@ public class GUI extends JPanel implements ActionListener { | |
line = ChemParser.readMeaningfulLine(reader, true); | |
- if (line.startsWith("(") || line.startsWith("END")) { | |
+ if (line.contains("(") || line.startsWith("END")) { | |
ICVector icEntry = new ICVector(numSpecies-1,name,conc,unit.substring(1,unit.length()-1),reactivity,adjList); | |
tmodelInput.updateIC(icEntry); | |
adjList = ""; | |
@@ -2644,8 +2669,9 @@ public class GUI extends JPanel implements ActionListener { | |
++numSpecies; | |
st = new StringTokenizer(line); | |
name = st.nextToken(); | |
- conc = st.nextToken(); | |
unit = st.nextToken(); | |
+ conc = ""; | |
+ while (st.hasMoreTokens()) conc += st.nextToken() + " "; | |
reactivity = "Inert"; | |
if (name.equals("Ar") || name.equals("Ne") || name.equals("N2") || name.equals("He")) { | |
ICVector icEntry = new ICVector(numSpecies-1,name,conc,unit.substring(1,unit.length()-1),reactivity,adjList); | |
@@ -3101,6 +3127,25 @@ public class GUI extends JPanel implements ActionListener { | |
} | |
} | |
+ public String extractListOfValuesFromGUIInput(Object guiInput) { | |
+ String string2return = ""; | |
+ String[] tempLines = null; | |
+ if (guiInput instanceof JTextComponent) | |
+ tempLines = ((JTextComponent) guiInput).getText().split("[\n]"); | |
+ else if (guiInput instanceof String) | |
+ tempLines = ((String) guiInput).split("[\n]"); | |
+ StringTokenizer st = null; | |
+ for (int i=0; i<tempLines.length; i++) { | |
+ st = new StringTokenizer(tempLines[i]); | |
+ while (st.hasMoreTokens()) { | |
+ String line = st.nextToken(); | |
+ if (line.endsWith(",")) line = line.substring(0,line.length()-1).trim(); | |
+ string2return += " " + line; | |
+ } | |
+ } | |
+ return string2return; | |
+ } | |
+ | |
public JComponent createTabOptions() { | |
// Create cellrenderers for JComboBox/JTable - CENTER text | |
ListCellRenderer centerJComboBoxRenderer = new CenterJCBRenderer(); | |
@@ -3255,6 +3300,46 @@ public class GUI extends JPanel implements ActionListener { | |
chemkinPanel.add(chemkinProps); | |
+ // Create the thermomethod_QM options subpanel | |
+ JPanel qmPanel = new JPanel(); | |
+ qmPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("QM thermo method"), | |
+ BorderFactory.createEmptyBorder(5,5,5,5))); | |
+ // Populate the subpanel | |
+ JPanel thermomethodPanel = new JPanel(); | |
+ thermomethodPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); | |
+ JLabel thermomethodLabel = new JLabel("Method for estimating thermo:"); | |
+ thermomethodPanel.add(thermomethodLabel); | |
+ thermomethodPanel.add(thermomethod = new JComboBox(thermomethodOptions)); | |
+ thermomethodPanel.add(qmSoftware = new JComboBox(softwareOptions)); | |
+ thermomethod.setActionCommand("QM"); | |
+ thermomethod.addActionListener(this); | |
+ qmSoftware.addActionListener(this); | |
+ qmSoftware.setEnabled(false); | |
+ | |
+ JPanel thermocyclicsPanel = new JPanel(); | |
+ thermocyclicsPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); | |
+ JLabel thermocyclicsLabel = new JLabel("Use QM only for cyclic species?"); | |
+ thermocyclicsPanel.add(thermocyclicsLabel); | |
+ thermocyclicsPanel.add(cyclicsOnly = new JComboBox(yesnoOptions)); | |
+ cyclicsOnly.addActionListener(this); | |
+ cyclicsOnly.setEnabled(false); | |
+ | |
+ JPanel thermoMaxRadPanel = new JPanel(); | |
+ thermoMaxRadPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); | |
+ JLabel thermoMaxRadLabel = new JLabel("Maximum radicals for QM species:"); | |
+ thermoMaxRadPanel.add(thermoMaxRadLabel); | |
+ thermoMaxRadPanel.add(maxRadNumQM = new JTextField()); | |
+ maxRadNumQM.setPreferredSize(new Dimension (75,25)); | |
+ maxRadNumQM.setHorizontalAlignment(JTextField.CENTER); | |
+ maxRadNumQM.setEnabled(false); | |
+ | |
+ Box qmProps = Box.createVerticalBox(); | |
+ qmProps.add(thermomethodPanel); | |
+ qmProps.add(thermocyclicsPanel); | |
+ qmProps.add(thermoMaxRadPanel); | |
+ | |
+ qmPanel.add(qmProps); | |
+ | |
// Create the Equation Of State (EOS) subpanel | |
JPanel EOS = new JPanel(); | |
EOS.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("Equation of State"), | |
@@ -3333,20 +3418,24 @@ public class GUI extends JPanel implements ActionListener { | |
Box totalOptionsBox = Box.createVerticalBox(); | |
Box horizontalBox1 = Box.createHorizontalBox(); | |
Box verticalBox1 = Box.createVerticalBox(); | |
+ Box verticalBox2 = Box.createVerticalBox(); | |
totalOptionsBox.add(restartPanel); | |
totalOptionsBox.add(maxPanel); | |
- horizontalBox1.add(chemkinPanel); | |
+ verticalBox1.add(chemkinPanel); | |
verticalBox1.add(inchiPanel); | |
- verticalBox1.add(EOS); | |
+ verticalBox2.add(qmPanel); | |
+ verticalBox2.add(EOS); | |
horizontalBox1.add(verticalBox1); | |
+ horizontalBox1.add(verticalBox2); | |
totalOptionsBox.add(horizontalBox1); | |
totalOptionsBox.add(forbiddenStructures); | |
Options.add(totalOptionsBox); | |
JComboBox[] allTab = {eosCombo, inchiCombo, chemkinAUnits, | |
- chemkinEaUnits, chemkinVerbosity, chemkinSMILES}; | |
+ chemkinEaUnits, chemkinVerbosity, chemkinSMILES, thermomethod, | |
+ cyclicsOnly, qmSoftware}; | |
initializeJCB(allTab); | |
JScrollPane scrolltab = new JScrollPane(Options); | |
@@ -3520,6 +3609,14 @@ public class GUI extends JPanel implements ActionListener { | |
disableComponents(pruneComps); | |
} | |
} | |
+ // QM options | |
+ else if ("QM".equals(event.getActionCommand())) { | |
+ JComponent[] qmComps = {qmSoftware,cyclicsOnly,maxRadNumQM}; | |
+ if (thermomethod.getSelectedItem().equals("QM")) { | |
+ enableComponents(qmComps); | |
+ } else | |
+ disableComponents(qmComps); | |
+ } | |
// Save the condition.txt file | |
else if ("saveCondition".equals(event.getActionCommand())) { | |
createConditionFile(false); | |
@@ -3558,6 +3655,8 @@ public class GUI extends JPanel implements ActionListener { | |
String[] AUnitsOptions = {"moles", "molecules"}; | |
String[] EaUnitsOptions = {"kcal/mol", "cal/mol", "kJ/mol", "J/mol", "Kelvins"}; | |
String[] eosOptions = {"Ideal Gas"}; // "Liquid" | |
+ String[] thermomethodOptions = {"Group Additivity", "QM"}; | |
+ String[] softwareOptions = {"Gaussian03", "MOPAC", "Both"}; | |
JPanel | |
// Main Panel | |
@@ -3578,7 +3677,8 @@ public class GUI extends JPanel implements ActionListener { | |
interCombo, | |
// Tab : Additional Options | |
eosCombo, inchiCombo, chemkinAUnits, chemkinEaUnits, chemkinVerbosity, | |
- readRestartOnOff, writeRestartOnOff, chemkinSMILES, | |
+ readRestartOnOff, writeRestartOnOff, chemkinSMILES, thermomethod, | |
+ qmSoftware, cyclicsOnly, | |
// | |
chebyTUnits, chebyPUnits; | |
@@ -3595,7 +3695,7 @@ public class GUI extends JPanel implements ActionListener { | |
scName, | |
// Tab : Additional Options | |
maxCarbonNum, maxOxygenNum, maxRadicalNum, maxSulfurNum, maxSiliconNum, | |
- maxHeavyAtom, FSName, | |
+ maxHeavyAtom, FSName, maxRadNumQM, | |
// | |
chebyTMin, chebyTMax, chebyPMin, chebyPMax, chebyTGen, chebyTRep, | |
chebyPGen, chebyPRep, chebyT, chebyP, | |
diff --git a/source/RMG/PopulateReactions.java b/source/RMG/PopulateReactions.java | |
index 7e2f8d2..5756dcf 100644 | |
--- a/source/RMG/PopulateReactions.java | |
+++ b/source/RMG/PopulateReactions.java | |
@@ -143,10 +143,22 @@ public class PopulateReactions { | |
try { | |
FileReader fr_input = new FileReader(args[0]); | |
BufferedReader br_input = new BufferedReader(fr_input); | |
+ | |
+ // Read in the Database field | |
+ String line = ChemParser.readMeaningfulLine(br_input, true); | |
+ if (line.toLowerCase().startsWith("database")) { | |
+ RMG.extractAndSetDatabasePath(line); | |
+ } | |
+ else { | |
+ System.err.println("PopulateReactions: Could not" | |
+ + " locate the Database field"); | |
+ System.exit(0); | |
+ } | |
+ | |
// Read in the first line of the input file | |
// This line should hold the temperature of the system, e.g. | |
// Temperature: 500 (K) | |
- String line = ChemParser.readMeaningfulLine(br_input, true); | |
+ line = ChemParser.readMeaningfulLine(br_input, true); | |
/* | |
* Read max atom types (if they exist) | |
@@ -376,7 +388,7 @@ public class PopulateReactions { | |
for (int numSpecies=0; numSpecies<species.size(); ++numSpecies) { | |
Species currentSpec = (Species)species.get(numSpecies); | |
if (!allSpeciesInNetwork.contains(currentSpec)) { | |
- listOfReactions += "!\t" + String.format(formatSpeciesName,currentSpec.getName()+"("+currentSpec.getID()+")") + currentSpec.getThermoData().toString() + currentSpec.getThermoData().getComments() + "\n"; | |
+ listOfReactions += "!\t" + String.format(formatSpeciesName,currentSpec.getFullName()) + currentSpec.getThermoData().toString() + currentSpec.getThermoData().getComments() + "\n"; | |
allSpeciesInNetwork.add(currentSpec); | |
} | |
} | |
@@ -456,7 +468,7 @@ public class PopulateReactions { | |
int i = 0; | |
while (iter_species.hasNext()) { | |
Species species = (Species)iter_species.next(); | |
- listOfSpecies += species.getName()+"("+species.getID()+")\n" + | |
+ listOfSpecies += species.getFullName()+"\n" + | |
species.getChemGraph().toStringWithoutH(i) + "\n"; | |
} | |
diff --git a/source/RMG/RMG.java b/source/RMG/RMG.java | |
index fea0990..ca7b892 100644 | |
--- a/source/RMG/RMG.java | |
+++ b/source/RMG/RMG.java | |
@@ -147,7 +147,6 @@ public class RMG { | |
public static void initializeSystemProperties(String inputfile) { | |
globalInitializeSystemProperties(); | |
- String workingDir = System.getProperty("RMG.workingDirectory"); | |
File f = new File("."); | |
String dir = f.getAbsolutePath(); | |
@@ -291,12 +290,7 @@ public class RMG { | |
//line = ChemParser.readMeaningfulLine(reader); | |
if (line.startsWith("Database")){ | |
- StringTokenizer st = new StringTokenizer(line); | |
- String next = st.nextToken(); | |
- String database_name = st.nextToken().trim(); | |
- | |
- String database_path = workingDir + "/databases/" + database_name; | |
- setDatabasePaths(database_path); | |
+ extractAndSetDatabasePath(line); | |
} | |
} | |
catch (IOException e) { | |
@@ -304,6 +298,15 @@ public class RMG { | |
} | |
} | |
+ public static void extractAndSetDatabasePath(String line) { | |
+ StringTokenizer st = new StringTokenizer(line); | |
+ String next = st.nextToken(); | |
+ String database_name = st.nextToken().trim(); | |
+ String workingDir = System.getProperty("RMG.workingDirectory"); | |
+ String database_path = workingDir + "/databases/" + database_name; | |
+ setDatabasePaths(database_path); | |
+ } | |
+ | |
/* this function is not used, has not been maintained, and is now out of date. | |
private static void writeThermoFile() { | |
diff --git a/source/RMG/ThermoDataEstimator.java b/source/RMG/ThermoDataEstimator.java | |
index 1d767a4..236efa6 100644 | |
--- a/source/RMG/ThermoDataEstimator.java | |
+++ b/source/RMG/ThermoDataEstimator.java | |
@@ -33,9 +33,7 @@ import jing.chemParser.*; | |
import jing.param.*; | |
import jing.chemUtil.*; | |
//import bondGroups.*; | |
-import jing.rxn.*; | |
import jing.rxnSys.*; | |
-import jing.mathTool.*; | |
public class ThermoDataEstimator {//gmagoon 7/24/09: based off of Thermo.java rev. 1.6; this performs original functionality described in the manual | |
@@ -58,11 +56,21 @@ public static void main(String[] args) { | |
try { | |
BufferedReader reader = new BufferedReader(new FileReader(file)); | |
+ String line = ChemParser.readMeaningfulLine(reader, true); | |
+ if (line.toLowerCase().startsWith("database")) { | |
+ RMG.extractAndSetDatabasePath(line); | |
+ } | |
+ else { | |
+ System.err.println("ThermoDataEstimator: Could not" | |
+ + " locate the Database field"); | |
+ System.exit(0); | |
+ } | |
+ | |
/* | |
* 14MAR2010: Allowing ThermoDataEstimator to read from Primary Reaction Library | |
*/ | |
ReactionModelGenerator rmg = new ReactionModelGenerator(); | |
- String line = ChemParser.readMeaningfulLine(reader, true); | |
+ line = ChemParser.readMeaningfulLine(reader, true); | |
if (line.toLowerCase().startsWith("primarythermolibrary")) { | |
rmg.readAndMakePTL(reader); | |
} | |
diff --git a/source/RMG/TransportDataEstimator.java b/source/RMG/TransportDataEstimator.java | |
index 7232422..ed3697a 100644 | |
--- a/source/RMG/TransportDataEstimator.java | |
+++ b/source/RMG/TransportDataEstimator.java | |
@@ -30,9 +30,21 @@ public class TransportDataEstimator { | |
try { | |
BufferedReader reader = new BufferedReader(new FileReader(new File(args[0]))); | |
- // Read in the Primary Transport Library, if it exists | |
ReactionModelGenerator rmg = new ReactionModelGenerator(); | |
String line = ChemParser.readMeaningfulLine(reader, true); | |
+ | |
+ // Read in the Database field | |
+ if (line.toLowerCase().startsWith("database")) { | |
+ RMG.extractAndSetDatabasePath(line); | |
+ } | |
+ else { | |
+ System.err.println("TransportDataEstimator: Could not" | |
+ + " locate the Database field"); | |
+ System.exit(0); | |
+ } | |
+ line = ChemParser.readMeaningfulLine(reader, true); | |
+ | |
+ // Read in the Primary Transport Library, if it exists | |
if (line.toLowerCase().startsWith("primarytransportlibrary")) { | |
rmg.readAndMakePTransL(reader); | |
} | |
diff --git a/source/RMG/jing/chem/ChemGraph.java b/source/RMG/jing/chem/ChemGraph.java | |
index bf23496..559408f 100644 | |
--- a/source/RMG/jing/chem/ChemGraph.java | |
+++ b/source/RMG/jing/chem/ChemGraph.java | |
@@ -123,8 +123,8 @@ public class ChemGraph implements Matchable { | |
if (isForbiddenStructure(p_graph,getRadicalNumber(),getOxygenNumber(),getCarbonNumber()) || getRadicalNumber() > MAX_RADICAL_NUM || getOxygenNumber() > MAX_OXYGEN_NUM || getCycleNumber() > MAX_CYCLE_NUM) { | |
//if (getRadicalNumber() > MAX_RADICAL_NUM || getOxygenNumber() > MAX_OXYGEN_NUM || getCycleNumber() > MAX_CYCLE_NUM) { | |
+ String message = p_graph.toString() + " is forbidden by "+whichForbiddenStructures(p_graph, getRadicalNumber(), getOxygenNumber(), getCycleNumber()) +"and not allowed."; | |
graph = null; | |
- String message = p_graph.toString() + " is forbidden by "+whichForbiddenStructures(p_graph) +"and not allowed."; | |
throw new ForbiddenStructureException(message); | |
} | |
} | |
@@ -1547,21 +1547,8 @@ return sn; | |
String newInChI=null; | |
int radicalNumber = this.getUnpairedRadicalNumber(); | |
// System.out.println("Radical number:"+radicalNumber);//for debugging purposes | |
- if (radicalNumber == 2){ | |
- newInChI = InChI.concat("/mult3"); | |
- } | |
- else if (radicalNumber == 3){ | |
- newInChI = InChI.concat("/mult4"); | |
- } | |
- else if (radicalNumber == 4){ | |
- newInChI = InChI.concat("/mult5"); | |
- } | |
- else if (radicalNumber == 5){ | |
- newInChI = InChI.concat("/mult6"); | |
- } | |
- else if (radicalNumber > 5){ | |
- System.out.println("Unexpectedly high multiplicity ("+ (radicalNumber+1)+ ") for " + InChI); | |
- System.exit(0); | |
+ if (radicalNumber >= 2){ | |
+ newInChI = InChI.concat("/mult"+(radicalNumber+1)); | |
} | |
else{ | |
newInChI = InChI; | |
@@ -1575,21 +1562,8 @@ return sn; | |
String newInChIKey=null; | |
int radicalNumber = this.getUnpairedRadicalNumber(); | |
// System.out.println("Radical number:"+radicalNumber);//for debugging purposes | |
- if (radicalNumber == 2){ | |
- newInChIKey = InChIKey.concat("mult3"); | |
- } | |
- else if (radicalNumber == 3){ | |
- newInChIKey = InChIKey.concat("mult4"); | |
- } | |
- else if (radicalNumber == 4){ | |
- newInChIKey = InChIKey.concat("mult5"); | |
- } | |
- else if (radicalNumber == 5){ | |
- newInChIKey = InChIKey.concat("mult6"); | |
- } | |
- else if (radicalNumber > 5){ | |
- System.out.println("Unexpectedly high multiplicity ("+ (radicalNumber+1)+ ") for " + InChI); | |
- System.exit(0); | |
+ if (radicalNumber >= 2){ | |
+ newInChIKey = InChIKey.concat("mult"+(radicalNumber+1)); | |
} | |
else{ | |
newInChIKey= InChIKey; | |
@@ -2126,7 +2100,7 @@ return sn; | |
// Which forbidden structure forbade this chemgraph? | |
// returns the names of forbidden structures. | |
- public static String whichForbiddenStructures(Graph p_graph) { | |
+ public static String whichForbiddenStructures(Graph p_graph, int radNumber, int oxygenNumber, int cycleNumber) { | |
String forbidden_by = ""; | |
for (Iterator iter = forbiddenStructure.iterator(); iter.hasNext(); ) { | |
FunctionalGroup fg = (FunctionalGroup)iter.next(); | |
@@ -2135,7 +2109,16 @@ return sn; | |
forbidden_by += fg.getName() +", "; | |
} | |
} | |
- if (forbidden_by=="") return "no forbidden structures, "; | |
+ if (forbidden_by=="") { | |
+ if (radNumber > MAX_RADICAL_NUM) | |
+ return "the maximum number of radicals per species (check the condition.txt file), "; | |
+ else if (oxygenNumber > MAX_OXYGEN_NUM) | |
+ return "the maximum number of oxygens per species (check the condition.txt file), "; | |
+ else if (cycleNumber > MAX_CYCLE_NUM) | |
+ return "the maximum number of cycles per species (check the condition.txt file), "; | |
+ else | |
+ return "no forbidden structures, "; | |
+ } | |
return forbidden_by; | |
} | |
diff --git a/source/RMG/jing/chem/FrequencyGroups.java b/source/RMG/jing/chem/FrequencyGroups.java | |
index 737981a..57f1071 100644 | |
--- a/source/RMG/jing/chem/FrequencyGroups.java | |
+++ b/source/RMG/jing/chem/FrequencyGroups.java | |
@@ -80,8 +80,8 @@ public class FrequencyGroups{//gmagoon 111708: removed "implements GeneralGAPP" | |
int nFreq = 3 * atoms - 5 - rotor - degeneracy - linearity; | |
if (nFreq < 0) { | |
- System.out.println(species.getName() + "(" + Integer.toString(species.getID()) + | |
- ") is overspecified: " + | |
+ System.out.println(species.getFullName() + | |
+ " is overspecified: " + | |
Integer.toString(degeneracy) + " harmonic oscillators and " + | |
Integer.toString(rotor) + " internal rotors are specified, but only " + | |
Integer.toString(3 * atoms - 5 - linearity) + " modes are allowed."); | |
@@ -191,7 +191,7 @@ public class FrequencyGroups{//gmagoon 111708: removed "implements GeneralGAPP" | |
// If the output file is empty, then an error occurred | |
if (franklOutput.length() == 0) | |
throw new IOException("Error: FrequencyGroups estimation for " + | |
- species.getName() + "(" + Integer.toString(species.getID()) + ") failed."); | |
+ species.getFullName() + " failed."); | |
// Read information about molecule (numuber of atoms, number of rotors, linearity) | |
atoms = Integer.parseInt(br.readLine().trim()); | |
@@ -259,7 +259,7 @@ public class FrequencyGroups{//gmagoon 111708: removed "implements GeneralGAPP" | |
} | |
// Rename input and output files | |
- /*String newName = species.getName()+"("+String.valueOf(species.getID())+")"; | |
+ /*String newName = species.getFullName(); | |
File f = new File("frankie/dat"); | |
File newFile = new File("frankie/"+newName+"_input"); | |
f.renameTo(newFile); | |
diff --git a/source/RMG/jing/chem/FunctionalGroupCollection.java b/source/RMG/jing/chem/FunctionalGroupCollection.java | |
index 3a4512b..dd83c90 100644 | |
--- a/source/RMG/jing/chem/FunctionalGroupCollection.java | |
+++ b/source/RMG/jing/chem/FunctionalGroupCollection.java | |
@@ -111,7 +111,22 @@ public class FunctionalGroupCollection implements Matchable { | |
public boolean isSubAtCentralNodes(Matchable p_functional) { | |
//#[ operation isSubAtCentralNodes(Matchable) | |
if (this == p_functional) return false; | |
- if (!(p_functional instanceof FunctionalGroupCollection)) return false; | |
+ if (!(p_functional instanceof FunctionalGroupCollection)) { | |
+ boolean found = false; | |
+ Iterator iter1 = functionalGroups.iterator(); | |
+ while (iter1.hasNext()) { | |
+ FunctionalGroup fg1 = (FunctionalGroup)iter1.next(); | |
+ if (fg1.equals(p_functional) || fg1.isSubAtCentralNodes(p_functional)) { | |
+ found = true; | |
+ } | |
+ else { | |
+ found = false; | |
+ break; | |
+ } | |
+ } | |
+ if (!found) return false; | |
+ return true; | |
+ } | |
Collection c1 = functionalGroups; | |
Collection c2 = ((FunctionalGroupCollection)p_functional).functionalGroups; | |
diff --git a/source/RMG/jing/chem/GATPFit.java b/source/RMG/jing/chem/GATPFit.java | |
index 6a24e96..cb8b68a 100644 | |
--- a/source/RMG/jing/chem/GATPFit.java | |
+++ b/source/RMG/jing/chem/GATPFit.java | |
@@ -111,7 +111,11 @@ public class GATPFit { | |
// write MW, temperature, ouput format, etc | |
//result.append( "MWEI " + MathTool.formatDouble(species.getMolecularWeight(), 6, 1).trim() + ls ); | |
result.append( "TEMP 1000.0" + ls ); | |
- result.append( "TMIN 300.0"+ls ); | |
+ //note:the TMIN and TMAX values below only affect the valid range in the CHEMKIN output file; | |
+ // the points used to deteremine the NASA-to-Wilhoit fit are determined independently inside the GATPFit fortran code. | |
+ // Too large a range causes problems fitting the transport data when pre-processing in CHEMKIN. | |
+ // (see https://github.com/GreenGroup/RMG-Java/issues/issue/18) | |
+ result.append( "TMIN 250.0"+ls ); | |
result.append( "TMAX 5000.0" + ls ); | |
result.append( "CHEM" + ls ); | |
result.append( "TEM2 2000.0" + ls ); | |
diff --git a/source/RMG/jing/chem/QMTP.java b/source/RMG/jing/chem/QMTP.java | |
index 2374d9e..47e7b14 100644 | |
--- a/source/RMG/jing/chem/QMTP.java | |
+++ b/source/RMG/jing/chem/QMTP.java | |
@@ -466,6 +466,9 @@ public class QMTP implements GeneralGAPP { | |
int exitValue = pythonProc.waitFor(); | |
if(timeoutThread.isAlive())//if the timeout thread is still alive (indicating that the process has completed in a timely manner), stop the timeout thread | |
timeoutThread.interrupt(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch (Exception e) { | |
String err = "Error in running RDKit Python process \n"; | |
@@ -614,6 +617,9 @@ public class QMTP implements GeneralGAPP { | |
//do nothing | |
} | |
int exitValue = babelProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running OpenBabel MOL to GJF process \n"; | |
@@ -715,6 +721,9 @@ public class QMTP implements GeneralGAPP { | |
//do nothing | |
} | |
int exitValue = molecoorProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running MoleCoor MOL to .MM4 process \n"; | |
@@ -743,6 +752,7 @@ public class QMTP implements GeneralGAPP { | |
line=reader.readLine(); | |
lineIndex++; | |
} | |
+ reader.close(); | |
mm4opt.close(); | |
} | |
catch(Exception e){ | |
@@ -991,6 +1001,9 @@ public class QMTP implements GeneralGAPP { | |
//do nothing | |
} | |
int exitValue = babelProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
//append the final keywords to the end of the file just written | |
// File mopacInpFile = new File(directory+"/"+name+".mop"); | |
@@ -1034,6 +1047,9 @@ public class QMTP implements GeneralGAPP { | |
System.out.println("Gaussian process received error (see above) on " + name); | |
} | |
int exitValue = gaussianProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running Gaussian process \n"; | |
@@ -1069,6 +1085,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading Gaussian log file \n"; | |
@@ -1125,6 +1143,9 @@ public class QMTP implements GeneralGAPP { | |
int exitValue = mm4Proc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running MM4 process \n"; | |
@@ -1164,6 +1185,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading MM4 output file \n"; | |
@@ -1219,6 +1242,9 @@ public class QMTP implements GeneralGAPP { | |
int exitValue = mm4Proc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running MM4 rotor process \n"; | |
@@ -1258,6 +1284,9 @@ public class QMTP implements GeneralGAPP { | |
System.out.println("MOPAC process received error (see above) on " + name); | |
} | |
int exitValue = mopacProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running MOPAC process \n"; | |
@@ -1296,6 +1325,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading MOPAC output file \n"; | |
@@ -1566,6 +1597,9 @@ public class QMTP implements GeneralGAPP { | |
} | |
int exitValue = canProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running CanTherm process \n"; | |
@@ -1606,6 +1640,7 @@ public class QMTP implements GeneralGAPP { | |
Cp1000 = Double.parseDouble(split[9]); | |
Cp1500 = Double.parseDouble(split[14]); | |
reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading CanTherm .canout file \n"; | |
@@ -1751,6 +1786,9 @@ public class QMTP implements GeneralGAPP { | |
//do nothing (there shouldn't be any more information, but this is included to get all the output) | |
} | |
int exitValue = cclibProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch (Exception e) { | |
String err = "Error in running ccLib Python process \n"; | |
@@ -1948,6 +1986,9 @@ public class QMTP implements GeneralGAPP { | |
} | |
} | |
int exitValue = symmProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in running point group calculation process using SYMMETRY \n"; | |
@@ -2074,6 +2115,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading preexisting Gaussian log file \n"; | |
@@ -2103,6 +2146,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
lineI=readerI.readLine(); | |
} | |
+ readerI.close(); | |
+ inI.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading preexisting Gaussian gjf file \n"; | |
@@ -2204,6 +2249,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading preexisting MOPAC output file \n"; | |
@@ -2233,6 +2280,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
lineI=readerI.readLine(); | |
} | |
+ readerI.close(); | |
+ inI.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading preexisting MOPAC input file \n"; | |
@@ -2333,6 +2382,8 @@ public class QMTP implements GeneralGAPP { | |
} | |
line=reader.readLine(); | |
} | |
+ reader.close(); | |
+ in.close(); | |
} | |
catch(Exception e){ | |
String err = "Error in reading preexisting MM4 output file \n"; | |
@@ -2357,7 +2408,9 @@ public class QMTP implements GeneralGAPP { | |
String lineI=readerI.readLine(); | |
//InChI should be repeated after in the first line of the input file | |
inputFileInChI = lineI.trim().substring(80);//extract the string starting with character 81 | |
- } | |
+ readerI.close(); | |
+ inI.close(); | |
+ } | |
catch(Exception e){ | |
String err = "Error in reading preexisting MM4 .mm4 file \n"; | |
err += e.toString(); | |
@@ -2668,6 +2721,9 @@ public class QMTP implements GeneralGAPP { | |
//do nothing (there shouldn't be any more information, but this is included to get all the output) | |
} | |
int exitValue = cclibProc.waitFor(); | |
+ br.close(); | |
+ isr.close(); | |
+ is.close(); | |
} | |
catch (Exception e) { | |
String err = "Error in running ccLib Python process \n"; | |
diff --git a/source/RMG/jing/chem/Species.java b/source/RMG/jing/chem/Species.java | |
index c18ef59..1f91c74 100644 | |
--- a/source/RMG/jing/chem/Species.java | |
+++ b/source/RMG/jing/chem/Species.java | |
@@ -337,7 +337,7 @@ public class Species { | |
//#[ operation findStablestThermoData() | |
double H = chemGraph.getThermoData().getH298(); | |
ChemGraph stablest = chemGraph; | |
- if (resonanceIsomers != null) { | |
+ if (!resonanceIsomers.isEmpty()) { | |
Iterator iter = resonanceIsomers.iterator(); | |
while (iter.hasNext()) { | |
ChemGraph g = (ChemGraph)iter.next(); | |
@@ -727,11 +727,21 @@ public class Species { | |
therfitExecuted = (threeFrequencyModel != null); | |
} | |
- | |
+ | |
+ //## operation getFullName() | |
+ public String getFullName() { | |
+ // get the full name with the ID appended. | |
+ // the chemkin name is a shortened version of this | |
+ if (addID){ | |
+ return String.format("%s(%d)",getName(),getID()); | |
+ } | |
+ else | |
+ return getName(); | |
+ } | |
+ | |
+ //## operation getChemkinName() | |
public String getChemkinName() { | |
- //#[ operation getChemkinName() | |
- if (addID){ | |
- String chemkinName = getName() + "(" + getID() + ")"; | |
+ String chemkinName = getFullName(); | |
/* Updated by MRH on 1-Jun-2008 | |
If statement used to check if chemkinName length was greater than 16 | |
I've changed it to length 10. Chemkin format dictates that any | |
@@ -746,11 +756,7 @@ public class Species { | |
if (chemkinName.length() > 10) chemkinName = "SPC(" + getID() + ")"; | |
return chemkinName; | |
- } | |
- else | |
- return getName(); | |
- //#] | |
} | |
//## operation getInternalRotor() | |
@@ -874,7 +880,7 @@ public class Species { | |
dictionary.putSpecies(spe, true); | |
// DEBUG: Tell console I made this species | |
- System.out.println("Created new species: " + spe.getName() + "(" + spe.getID() + ")"); | |
+ System.out.println("Created new species: " + spe.getFullName() ); | |
} | |
else { | |
@@ -987,7 +993,7 @@ public class Species { | |
p_chemGraph.setSpecies(spe); | |
// DEBUG: Tell console I made this species | |
- System.out.println("Created new species: " + spe.getName() + "(" + spe.getID() + ")"); | |
+ System.out.println("Created new species: " + spe.getFullName() ); | |
return spe; | |
} | |
@@ -1285,6 +1291,14 @@ public class Species { | |
} | |
result[0]=InChIstring; | |
result[1]=InChIKeystring; | |
+ try { | |
+ reader.close(); | |
+ in.close(); | |
+ } catch (Exception e) { | |
+ String err = "Error closing InChI output reader for " + p_chemGraph.chemicalFormula + " : "; | |
+ err += e.toString(); | |
+ System.out.println(err); | |
+ } | |
} | |
else { | |
result[0] = ""; | |
@@ -1354,8 +1368,7 @@ public class Species { | |
int mRad = 1; | |
int radCount = 0; | |
- // Assume the species does not contain > 4 radicals | |
- int maxRad = 4; | |
+ int maxRad = ChemGraph.MAX_RADICAL_NUM; | |
int[] radLocation = new int[maxRad]; | |
int[] radType = new int[maxRad]; | |
for (int numRads=0; numRads<(atomCount-1); numRads++) { | |
@@ -1647,7 +1660,7 @@ public class Species { | |
String line = ChemParser.readMeaningfulLine(reader, true); | |
while (!line.toUpperCase().endsWith("V2000")) { | |
- line = ChemParser.readMeaningfulLine(reader, true); | |
+ line = ChemParser.readMeaningfulLine(reader, false); | |
} | |
String molFile = ""; | |
@@ -1664,19 +1677,19 @@ public class Species { | |
// Extract the information in the first line (Count Line) of the .mol file | |
st = new StringTokenizer(molFileLines[0]); | |
- int numOfAtoms = Integer.parseInt(st.nextToken()); | |
- int numOfBonds = Integer.parseInt(st.nextToken()); | |
+ int numOfAtoms = Integer.parseInt(molFileLines[0].substring(0,3).trim()); | |
+ int numOfBonds = Integer.parseInt(molFileLines[0].substring(3,6).trim()); | |
// Next few are irrelevant for RMG (as of 10-Feb-2009) | |
- int numOfAtomLists = Integer.parseInt(st.nextToken()); | |
- String obsoleteString1 = st.nextToken(); | |
- String chiralFlag = st.nextToken(); | |
- int stextEntries = Integer.parseInt(st.nextToken()); | |
- String obsoleteString2 = st.nextToken(); | |
- String obsoleteString3 = st.nextToken(); | |
- String obsoleteString4 = st.nextToken(); | |
- String obsoleteString5 = st.nextToken(); | |
+ int numOfAtomLists = Integer.parseInt(molFileLines[0].substring(6,9).trim()); | |
+ String obsoleteString1 = molFileLines[0].substring(9,12); | |
+ String chiralFlag = molFileLines[0].substring(12,15); | |
+ int stextEntries = Integer.parseInt(molFileLines[0].substring(15,18).trim()); | |
+ String obsoleteString2 = molFileLines[0].substring(18,21); | |
+ String obsoleteString3 = molFileLines[0].substring(21,24); | |
+ String obsoleteString4 = molFileLines[0].substring(24,27); | |
+ String obsoleteString5 = molFileLines[0].substring(27,30); | |
// Extract the number of M lines | |
- int numOfMLines = Integer.parseInt(st.nextToken()); | |
+ int numOfMLines = Integer.parseInt(molFileLines[0].substring(30,33).trim()); | |
// Construct each individual line of the adjacency list | |
String[] adjListElement = new String[numOfAtoms]; | |
diff --git a/source/RMG/jing/chem/SpeciesDictionary.java b/source/RMG/jing/chem/SpeciesDictionary.java | |
index 741dae9..6ef64aa 100644 | |
--- a/source/RMG/jing/chem/SpeciesDictionary.java | |
+++ b/source/RMG/jing/chem/SpeciesDictionary.java | |
@@ -186,7 +186,7 @@ public class SpeciesDictionary { | |
Iterator iter = dictionary.values().iterator(); | |
while (iter.hasNext()) { | |
Species spe = (Species)iter.next(); | |
- if ((spe.getName()+"("+spe.getID()+")").compareToIgnoreCase(p_name) == 0) { | |
+ if ((spe.getFullName()).compareToIgnoreCase(p_name) == 0) { | |
return spe; | |
} | |
} | |
diff --git a/source/RMG/jing/chemParser/ChemParser.java b/source/RMG/jing/chemParser/ChemParser.java | |
index 5d33774..19b41b3 100644 | |
--- a/source/RMG/jing/chemParser/ChemParser.java | |
+++ b/source/RMG/jing/chemParser/ChemParser.java | |
@@ -63,13 +63,10 @@ public class ChemParser { | |
//## operation ChemParser() | |
private ChemParser() { | |
- //#[ operation ChemParser() | |
- //#] | |
} | |
//## operation extractReactionSeperator(String) | |
public static final String extractReactionSeperator(String p_string) { | |
- //#[ operation extractReactionSeperator(String) | |
if (p_string == null) throw new NullPointerException(); | |
StringTokenizer st = new StringTokenizer(p_string); | |
@@ -81,7 +78,6 @@ public class ChemParser { | |
else if (s.equals("->")) return "->"; | |
} | |
return null; | |
- //#] | |
} | |
/** | |
@@ -97,26 +93,14 @@ public class ChemParser { | |
} | |
} | |
} | |
- | |
// The directory is now empty so delete it | |
return dir.delete(); | |
} | |
- // Argument Stringp_name : | |
- /** | |
- the name of union | |
- */ | |
- // Argument HashMapp_unRead : | |
- /** | |
- the map including all the union, each mapping maps the unread union group's name with their union components' names. | |
- */ | |
- // Argument HashMapp_dictionary : | |
- /** | |
- The real dicationary where we can find the graph information from the name. | |
- */ | |
- //## operation findUnion(String,HashMap,HashMap) | |
+ // Argument Stringp_name : the name of union | |
+ // Argument HashMapp_unRead : the map including all the union, each mapping maps the unread union group's name with their union components' names. | |
+ // Argument HashMapp_dictionary : The real dicationary where we can find the graph information from the name. | |
public static void findUnion(String p_name, HashMap p_unRead, HashMap p_dictionary) { | |
- //#[ operation findUnion(String,HashMap,HashMap) | |
FunctionalGroupCollection fgc = new FunctionalGroupCollection(p_name); | |
// get the union set according to the p_name | |
@@ -136,15 +120,10 @@ public class ChemParser { | |
p_dictionary.put(p_name,fgc); | |
p_unRead.remove(p_name); | |
return; | |
- | |
- | |
- | |
- //#] | |
} | |
- //## operation parseArrheniusEPKinetics(String) | |
+ | |
/** | |
- * Input parameters updated by MRH on 8-Jun-2009 | |
* This function is called when reading a kinetics Library.txt file, | |
* if the kinetics tag is Arrhenius_EP. As of today, all rxn families | |
* in the RMG database are labeled Arrhenius_EP. Instead of passing only | |
@@ -156,22 +135,12 @@ public class ChemParser { | |
* nodes associated with this data entry (e.g. 1 for Beta_Scission, 2 for | |
* H_Abstraction, 3 for Diels_Alder_Addition, etc.). | |
* | |
- * The output is of type ArrheniusEPKinetics. The difference is that the | |
- * "comments" and "source" fields are no longer null. The "source" contains | |
+ * The output is of type ArrheniusEPKinetics. The "source" contains | |
* the set of nodes associated with this data, and the "comments" are | |
* the end-of-line comments, hopefully denoting where this data came from. | |
**/ | |
public static ArrheniusEPKinetics parseArrheniusEPKinetics(String p_string, int p_keyNum) { | |
- //#[ operation parseArrheniusEPKinetics(String) | |
StringTokenizer token = new StringTokenizer(p_string); | |
- //if (token.countTokens() != 10) throw new InvalidKineticsFormatException(); | |
- /* | |
- * If statement commented out by MRH on 8-Jun-2009 | |
- * The if statement existed because RMG was looking for 10 tokens: | |
- * (Trange, A, n, alpha, E0, dA, dn, dalpha, dE0, and Rank). | |
- * RMG now has no limit on the number of tokens, which allows | |
- * a RMG user/developer to put comments after the rank | |
- */ | |
String dummyCounter = token.nextToken(); // This should be the #. associated with the data | |
// Set the source of this data as the set of nodes | |
String source = ""; | |
@@ -219,24 +188,15 @@ public class ChemParser { | |
while (token.hasMoreTokens()) | |
comments += token.nextToken() + " "; | |
- /*if (token.hasMoreTokens()) { | |
- String beginningOfComments = token.nextToken(); | |
- String[] splitString = p_string.split(beginningOfComments); | |
- comments = beginningOfComments + splitString[1]; | |
- }*/ | |
ArrheniusEPKinetics k = new ArrheniusEPKinetics(ua, un, ualpha, ue, TRange, rank, source, comments); | |
-// ArrheniusEPKinetics k = new ArrheniusEPKinetics(ua, un, ualpha, ue, TRange, rank, null, null); | |
return k; | |
- | |
- | |
- //#] | |
} | |
//## operation parseArrheniusKinetics(String) | |
/** | |
- * Input parameters updated by MRH on 11-Jun-2009 | |
+ * | |
* This function is called when reading a kinetics Library.txt file, | |
* if the kinetics tag is Arrhenius. As of today, no rxn families | |
* in the RMG database are labeled Arrhenius. Instead of passing only | |
@@ -248,22 +208,12 @@ public class ChemParser { | |
* nodes associated with this data entry (e.g. 1 for Beta_Scission, 2 for | |
* H_Abstraction, 3 for Diels_Alder_Addition, etc.). | |
* | |
- * The output is of type ArrheniusKinetics. The difference is that the | |
- * "comments" and "source" fields are no longer null. The "source" contains | |
+ * The output is of type ArrheniusKinetics. The "source" contains | |
* the set of nodes associated with this data, and the "comments" are | |
* the end-of-line comments, hopefully denoting where this data came from. | |
**/ | |
public static ArrheniusKinetics parseArrheniusKinetics(String p_string, int p_keyNum) { | |
- //#[ operation parseArrheniusKinetics(String) | |
StringTokenizer token = new StringTokenizer(p_string); | |
- /* | |
- * If statement commented out by MRH on 11-Jun-2009 | |
- * The if statement existed because RMG was looking for 8 tokens: | |
- * (Trange, A, n, Ea, dA, dn, dEa, and Rank). | |
- * RMG now has no limit on the number of tokens, which allows | |
- * a RMG user/developer to put comments after the rank | |
- */ | |
-// if (token.countTokens() != 8) throw new InvalidKineticsFormatException(); | |
String dummyCounter = token.nextToken(); // This should be the #. associated with the data | |
// Set the source of this data as the set of nodes | |
String source = ""; | |
@@ -305,19 +255,13 @@ public class ChemParser { | |
// Set the comments of this data to whatever (if anything) follows the rank | |
String comments = ""; | |
- if (token.hasMoreTokens()) { | |
- String beginningOfComments = token.nextToken(); | |
- String[] splitString = p_string.split(beginningOfComments); | |
- comments = beginningOfComments + splitString[1]; | |
- } | |
+ while (token.hasMoreTokens()) | |
+ comments += token.nextToken() + " "; | |
+ | |
ArrheniusKinetics k = new ArrheniusKinetics(ua, un, ue, TRange, rank, source, comments); | |
-// ArrheniusKinetics k = new ArrheniusKinetics(ua, un, ue, TRange, rank, null, null); | |
return k; | |
- | |
- | |
- //#] | |
} | |
/* | |
@@ -615,17 +559,12 @@ public class ChemParser { | |
UncertainDouble un = new UncertainDouble(rxn_n,0.0,"A"); | |
UncertainDouble uE = new UncertainDouble(rxn_E,0.0,"A"); | |
- // The remaining tokens are comments | |
- String comments = ""; | |
- if (st.hasMoreTokens()) { | |
- String beginningOfComments = st.nextToken(); | |
- int startIndex = p_rxnString.indexOf(beginningOfComments); | |
- comments = p_rxnString.substring(startIndex); | |
- } | |
+ // The remaining tokens are comments, which may start with a ! | |
+ String comments = ""; | |
+ while (st.hasMoreTokens()) | |
+ comments += st.nextToken() + " "; | |
if (comments.startsWith("!")) comments = comments.substring(1); | |
-// while (st.hasMoreTokens()) { | |
-// comments += st.nextToken(); | |
-// } | |
+ | |
// Generate the kinetics (assuming a rank of 1 ... as of 7/Sept/2009, the rank | |
// of Kinetics should not be important at this stage of the mechanism | |
@@ -771,9 +710,6 @@ public class ChemParser { | |
return k; | |
- | |
- | |
- //#] | |
} | |
@@ -843,7 +779,6 @@ public class ChemParser { | |
} | |
return reactionSpe; | |
- //#] | |
} | |
//## operation parseSimpleArrheniusKinetics(String,double,double) | |
@@ -884,9 +819,6 @@ public class ChemParser { | |
return k; | |
- | |
- | |
- //#] | |
} | |
//## operation parseThermoFromLibrary(String) | |
@@ -982,7 +914,6 @@ public class ChemParser { | |
//## operation parseAbrahamGAValue(String) | |
public static UnifacGAValue parseUnifacGAValue(String p_string) { | |
- //#[ operation parseThermoGAValue(String) | |
String s = p_string.trim(); | |
StringTokenizer token = new StringTokenizer(s); | |
@@ -995,17 +926,10 @@ public class ChemParser { | |
return new UnifacGAValue(R,Q); | |
- | |
- | |
- | |
- //#] | |
} | |
- | |
- | |
- | |
//## operation parseThirdBodyList(String) | |
public static HashMap parseThirdBodyList(String p_string, HashMap speciesList) { | |
//#[ operation parseThirdBodyList(String) | |
@@ -1142,14 +1066,10 @@ public class ChemParser { | |
} | |
return action; | |
- | |
- | |
- //#] | |
} | |
//## operation readBond(String) | |
public static Object readBond(String p_name) throws InvalidGraphFormatException { | |
- //#[ operation readBond(String) | |
String bondType = removeBrace(p_name); | |
StringTokenizer bondToken = new StringTokenizer(bondType, ","); | |
int bondNum = bondToken.countTokens(); | |
@@ -1176,10 +1096,6 @@ public class ChemParser { | |
throw new InvalidGraphFormatException("bond: " + bondType); | |
} | |
- | |
- | |
- | |
- //#] | |
} | |
//## operation readChemGraph(BufferedReader) | |
diff --git a/source/RMG/jing/mathTool/UncertainDouble.java b/source/RMG/jing/mathTool/UncertainDouble.java | |
index 5c4e8ec..bb93a59 100644 | |
--- a/source/RMG/jing/mathTool/UncertainDouble.java | |
+++ b/source/RMG/jing/mathTool/UncertainDouble.java | |
@@ -130,10 +130,32 @@ public class UncertainDouble { | |
public UncertainDouble plus(double p_adder) { | |
//#[ operation plus(double) | |
return new UncertainDouble(value+p_adder,uncertainty,type); | |
- | |
- | |
//#] | |
} | |
+ | |
+ //## operation plus(UncertainDouble) | |
+ public UncertainDouble plus(UncertainDouble p_adder) { | |
+ double newUncertainty = getAddingUncertainty() + p_adder.getAddingUncertainty(); | |
+ double newValue = value + p_adder.getValue(); | |
+ return new UncertainDouble(newValue,newUncertainty,"Adder"); | |
+ | |
+ } | |
+ | |
+ //## operation getAddingUncertainty() | |
+ public double getAddingUncertainty() { | |
+ // return the uncertainty in an adding type | |
+ // i.e. if it's a multiplying type, subtract one and multiply it by 'value'. | |
+ // This exaggerates how low the lower bound will be. | |
+ // (e.g. 10*/2 will become 10+-10. | |
+ if (isAddingUncertainty()) { | |
+ return getUncertainty(); | |
+ } | |
+ else if (isMultiplyingUncertainty()){ | |
+ return getUncertainty() * ((double)getValue() - 1.0); | |
+ } | |
+ else throw new InvalidUncertaintyTypeException(); | |
+ } | |
+ | |
//## operation toString() | |
public String toString() { | |
diff --git a/source/RMG/jing/rxn/ArrheniusEPKinetics.java b/source/RMG/jing/rxn/ArrheniusEPKinetics.java | |
index f621ca1..3a87d5f 100644 | |
--- a/source/RMG/jing/rxn/ArrheniusEPKinetics.java | |
+++ b/source/RMG/jing/rxn/ArrheniusEPKinetics.java | |
@@ -50,86 +50,23 @@ public class ArrheniusEPKinetics extends ArrheniusKinetics { | |
//## operation ArrheniusEPKinetics(UncertainDouble,UncertainDouble,UncertainDouble,UncertainDouble,String,int,String,String) | |
public ArrheniusEPKinetics(UncertainDouble p_A, UncertainDouble p_n, UncertainDouble p_alpha, UncertainDouble p_E, String p_TRange, int p_rank, String p_source, String p_comment) { | |
- //#[ operation ArrheniusEPKinetics(UncertainDouble,UncertainDouble,UncertainDouble,UncertainDouble,String,int,String,String) | |
super(p_A, p_n, p_E, p_TRange, p_rank, p_source, p_comment); | |
alpha = p_alpha; | |
- | |
- //#] | |
} | |
+ | |
public ArrheniusEPKinetics() { | |
} | |
- /////////////////////////////////////// | |
- // Notice that we don't redefine getEValue() here but instead inherit it from ArrheniusKinetics | |
- // which means that if we imagine | |
- // Ea = Eo + alpha * Hrxn | |
- // then getEValue() returns Eo NOT Ea | |
- // (notice the additional method getEaValue() which does return Ea) | |
- // but we DO redefine toChemkinString to return the Ea | |
- /////////////////////////////////////// | |
- | |
+ //## operation toChemkinString(double, Temperature, boolean) | |
public String toChemkinString(double p_Hrxn, Temperature p_temperature, boolean includeComments){ | |
- double Ea = getEaValue(p_Hrxn); | |
- // If reported Arrhenius Ea value was computed using Evans-Polanyi relationship, | |
- // inform user (in chem.inp file) of what deltaHrxn(T) was used. | |
- if ((double)alpha.getValue() != 0.0) { | |
- comment += " (Ea computed using deltaHrxn(T=298K) of " + p_Hrxn + " kcal/mol)"; | |
- } | |
- if (Ea < p_Hrxn) { | |
- comment += String.format("Warning: Ea=%.1f < dHrxn(298K)=%.1f by %.1f kcal/mol",Ea, p_Hrxn, p_Hrxn-Ea); | |
- } | |
- Object [] formatString = new Object[5]; | |
- | |
-// formatString[0] = new Double(getAValue()); | |
- double tempDouble = new Double(getAValue()); | |
- if (AUnits.equals("moles")) { | |
- formatString[0] = tempDouble; | |
- } else if (AUnits.equals("molecules")) { | |
- formatString[0] = tempDouble / 6.022e23; | |
- } | |
- | |
- formatString[1] = new Double(getNValue()); | |
- | |
- if (EaUnits.equals("kcal/mol")) { | |
- formatString[2] = Ea; | |
- } | |
- else if (EaUnits.equals("cal/mol")) { | |
- formatString[2] = Ea * 1000.0; | |
- } | |
- else if (EaUnits.equals("kJ/mol")) { | |
- formatString[2] = Ea * 4.184; | |
- } | |
- else if (EaUnits.equals("J/mol")) { | |
- formatString[2] = Ea * 4184.0; | |
- } | |
- else if (EaUnits.equals("Kelvins")) { | |
- formatString[2] = Ea / 1.987e-3; | |
- } | |
- | |
- formatString[3] = source; formatString[4] = comment; | |
- | |
- if (includeComments){ | |
- return String.format("%1.7e \t %2.5f \t %1.7e \t !%s %s", formatString); | |
- } | |
- else | |
- return String.format("%1.7e \t %2.5f \t %1.7e \t ", formatString); | |
- | |
- //return String.valueOf(getAValue()) + '\t' + String.valueOf(getNValue()) + '\t' + Ea + "\t!" + source + " "+comment; | |
- | |
+ ArrheniusKinetics arrhenius = fixBarrier(p_Hrxn); | |
+ return arrhenius.toChemkinString(p_Hrxn, p_temperature, includeComments); | |
} | |
//## operation calculateRate(Temperature,double) | |
public double calculateRate(Temperature p_temperature, double p_Hrxn) { | |
- //#[ operation calculateRate(Temperature,double) | |
- double T = p_temperature.getStandard(); | |
- double R = GasConstant.getKcalMolK(); | |
- | |
- double Ea = E.getValue() + alpha.getValue()*p_Hrxn; | |
- //if (Ea<0) throw new NegativeEnergyBarrierException(); | |
- double rate = A.getValue() * Math.pow(T, n.getValue()) * Math.exp(-Ea/R/T); | |
- return rate; | |
- | |
- //#] | |
+ ArrheniusKinetics arrhenius = fixBarrier(p_Hrxn); | |
+ return arrhenius.calculateRate(p_temperature); | |
} | |
//## operation getAlphaUncertainty() | |
@@ -168,11 +105,52 @@ public class ArrheniusEPKinetics extends ArrheniusKinetics { | |
public UncertainDouble getAlpha() { | |
return alpha; | |
} | |
- //gmagoon 05/19/10: it looks like in rest of code, Hrxn at 298 K is used, so this temperature should be used elsewhere for consistency | |
- public double getEaValue(double p_Hrxn) { | |
- return E.getValue()+alpha.getValue()*p_Hrxn; | |
- } | |
+ | |
+ public double getEValue() { | |
+ throw new InvalidKineticsTypeException("Convert ArrheniusEPKinetics to ArrheniusKinetics with fixBarrier(Hrxn)."); | |
+ } | |
+ public double getEaValue(double p_Hrxn) { | |
+ ArrheniusKinetics arrhenius = fixBarrier(p_Hrxn); | |
+ return arrhenius.getEValue(); | |
+ } | |
+ | |
+ public ArrheniusKinetics fixBarrier(double p_Hrxn){ | |
+ // create a new ArrheniusKinetics object with a corrected barrier and return it. | |
+ double al = alpha.getValue(); | |
+ double Eo = E.getValue(); | |
+ double Ea = Eo + al * p_Hrxn; | |
+ | |
+ UncertainDouble newEa = getE(); | |
+ String newComment = getComment(); | |
+ String warning = ""; | |
+ if (al != 0.0){ | |
+ warning = String.format("Ea computed using Evans-Polanyi dHrxn(298K)=%.1f kcal/mol and alpha=%.2f.", p_Hrxn, al ); | |
+ newComment += " " + warning; | |
+ System.out.println(warning); | |
+ newEa = newEa.plus((UncertainDouble)getAlpha().multiply(p_Hrxn)); | |
+ } | |
+ | |
+ if (Eo>0 && Ea<0) { | |
+ // Negative barrier estimated by Evans-Polanyi, despite positive intrinsic barrier. | |
+ warning = String.format("Ea raised from %.1f kcal/mol to 0.0.", Ea); | |
+ newComment += " Warning: " + warning; | |
+ System.out.println(warning); | |
+ newEa = newEa.plus((-Ea)); | |
+ Ea = 0.0; | |
+ } | |
+ if (p_Hrxn>0 && Ea<p_Hrxn){ | |
+ // Reaction is endothermic and the barrier is less than the endothermicity. | |
+ warning = String.format("Ea raised by %.1f from %.1f to dHrxn(298K)=%.1f kcal/mol.",p_Hrxn-Ea, Ea, p_Hrxn ); | |
+ newComment += " Warning: " + warning; | |
+ System.out.println(warning); | |
+ newEa = newEa.plus((p_Hrxn-Ea)); | |
+ Ea = p_Hrxn; | |
+ } | |
+ assert (Ea == newEa.getValue()) : String.format("Something wrong with Ea calculation. %e != %e",Ea,newEa.getValue()); | |
+ ArrheniusKinetics newK = new ArrheniusKinetics(getA(),getN(),newEa,getTRange(),getRank(),getSource(),newComment); | |
+ return newK; | |
+ } | |
} | |
/********************************************************************* | |
File Path : RMG\RMG\jing\rxn\ArrheniusEPKinetics.java | |
diff --git a/source/RMG/jing/rxn/ArrheniusKinetics.java b/source/RMG/jing/rxn/ArrheniusKinetics.java | |
index 906edad..b84d7c4 100644 | |
--- a/source/RMG/jing/rxn/ArrheniusKinetics.java | |
+++ b/source/RMG/jing/rxn/ArrheniusKinetics.java | |
@@ -89,8 +89,6 @@ public class ArrheniusKinetics implements Kinetics { | |
source = p_source; | |
comment = p_comment; | |
- | |
- //#] | |
} | |
public ArrheniusKinetics() { | |
} | |
@@ -213,19 +211,11 @@ public class ArrheniusKinetics implements Kinetics { | |
//## operation calculateRate(Temperature,double) | |
public double calculateRate(Temperature p_temperature, double p_Hrxn) { | |
- //#[ operation calculateRate(Temperature,double) | |
- double T = p_temperature.getStandard(); | |
- double R = GasConstant.getKcalMolK(); | |
- | |
- //if (E.getValue() < 0) throw new NegativeEnergyBarrierException(); | |
- double rate = A.getValue() * Math.pow(T, n.getValue()) * Math.exp(-E.getValue()/R/T); | |
- return rate; | |
- | |
- | |
- //#] | |
+ // ignore the Hrxn because we don't need it. | |
+ return calculateRate(p_temperature); | |
} | |
-// ## operation calculateRate(Temperature,double) | |
+ //## operation calculateRate(Temperature) | |
public double calculateRate(Temperature p_temperature) { | |
//#[ operation calculateRate(Temperature,double) | |
double T = p_temperature.getStandard(); | |
@@ -234,9 +224,7 @@ public class ArrheniusKinetics implements Kinetics { | |
//if (E.getValue() < 0) throw new NegativeEnergyBarrierException(); | |
double rate = A.getValue() * Math.pow(T, n.getValue()) * Math.exp(-E.getValue()/R/T); | |
return rate; | |
- | |
- | |
- //#] | |
+ | |
} | |
public boolean equals(Kinetics p_k){ | |
@@ -271,6 +259,27 @@ public class ArrheniusKinetics implements Kinetics { | |
return n.getValue(); | |
//#] | |
} | |
+ | |
+ public ArrheniusKinetics fixBarrier(double p_Hrxn){ | |
+ // Return an ArrheniusKinetics object with a corrected barrier. | |
+ double Ea = E.getValue(); | |
+ | |
+ if (p_Hrxn>0 && Ea<p_Hrxn){ | |
+ // Reaction is endothermic and the barrier is less than the endothermicity. | |
+ String newComment = getComment(); | |
+ String warning = String.format("Ea raised by %.1f from %.1f to dHrxn(298K)=%.1f kcal/mol",p_Hrxn-Ea, Ea, p_Hrxn ); | |
+ System.out.println(warning); | |
+ newComment += " Warning: " + warning; | |
+ UncertainDouble newEa = E.plus((p_Hrxn-Ea)); | |
+ Ea = p_Hrxn; | |
+ ArrheniusKinetics newK = new ArrheniusKinetics(getA(),getN(),newEa,getTRange(),getRank(),getSource(),newComment); | |
+ return newK; | |
+ } | |
+ else { | |
+ // return it without changes. | |
+ return this; | |
+ } | |
+ } | |
//## operation multiply(double) | |
public Kinetics multiply(double p_multiple) { | |
@@ -292,9 +301,9 @@ public class ArrheniusKinetics implements Kinetics { | |
//## operation toChemkinString() | |
public String toChemkinString(double Hrxn, Temperature p_temperature, boolean includeComments) { | |
//#[ operation toChemkinString() | |
+ | |
Object [] formatString = new Object[5]; | |
-// formatString[0] = new Double(getAValue()); | |
double tempDouble = new Double(getAValue()); | |
if (AUnits.equals("moles")) { | |
formatString[0] = tempDouble; | |
@@ -304,33 +313,32 @@ public class ArrheniusKinetics implements Kinetics { | |
formatString[1] = new Double(getNValue()); | |
-// formatString[2] = new Double(E.getValue()); | |
- tempDouble = E.getValue(); | |
+ double Ea = E.getValue(); | |
if (EaUnits.equals("kcal/mol")) { | |
- formatString[2] = tempDouble; | |
+ formatString[2] = Ea; | |
} | |
else if (EaUnits.equals("cal/mol")) { | |
- formatString[2] = tempDouble * 1000.0; | |
+ formatString[2] = Ea * 1000.0; | |
} | |
else if (EaUnits.equals("kJ/mol")) { | |
- formatString[2] = tempDouble * 4.184; | |
+ formatString[2] = Ea * 4.184; | |
} | |
else if (EaUnits.equals("J/mol")) { | |
- formatString[2] = tempDouble * 4184.0; | |
+ formatString[2] = Ea * 4184.0; | |
} | |
else if (EaUnits.equals("Kelvins")) { | |
- formatString[2] = tempDouble / 1.987e-3; | |
+ formatString[2] = Ea / 1.987e-3; | |
} | |
- | |
- formatString[3] = source; formatString[4] = comment; | |
- | |
+ | |
if (includeComments) | |
- return String.format("%1.3e \t %2.2f \t %3.2f \t !%s %s", formatString); | |
- else | |
- return String.format("%1.3e \t %2.2f \t %3.2f \t ", formatString); | |
- | |
- //String.valueOf(getAValue()) + '\t' + String.valueOf(getNValue()) + '\t' + String.valueOf(getEValue() + "\t!" + source + " "+comment); | |
- //#] | |
+ { | |
+ formatString[3] = source; | |
+ formatString[4] = comment; | |
+ return String.format("%1.3e \t %2.2f \t %3.2f \t!%s %s", formatString); | |
+ } | |
+ else | |
+ return String.format("%1.3e \t %2.2f \t %3.2f", formatString); | |
+ | |
} | |
//## operation toString() | |
diff --git a/source/RMG/jing/rxn/FastMasterEqn.java b/source/RMG/jing/rxn/FastMasterEqn.java | |
index ea2d5fc..f177933 100644 | |
--- a/source/RMG/jing/rxn/FastMasterEqn.java | |
+++ b/source/RMG/jing/rxn/FastMasterEqn.java | |
@@ -614,7 +614,7 @@ public class FastMasterEqn implements PDepKineticsEstimator { | |
spec.calculateTransportParameters(); | |
input.append( "# Species identifier (128 characters or less, no spaces)\n" ); | |
- input.append( spec.getName() + "(" + Integer.toString(spec.getID()) + ")\n" ); | |
+ input.append( spec.getFullName() + "\n" ); | |
input.append( "# Ground-state energy; allowed units are J/mol, kJ/mol, cal/mol, kcal/mol, or cm^-1\n" ); | |
input.append( "J/mol " + Double.toString(spec.calculateH(stdTemp) * 4184) + "\n" ); | |
@@ -682,7 +682,7 @@ public class FastMasterEqn implements PDepKineticsEstimator { | |
input.append( Integer.toString(isomer.getNumSpecies()) ); | |
for (int j = 0; j < isomer.getNumSpecies(); j++) { | |
Species spec = isomer.getSpecies(j); | |
- input.append( " " + spec.getName() + "(" + Integer.toString(spec.getID()) + ")" ); | |
+ input.append( " " + spec.getFullName() ); | |
} | |
input.append( "\n\n" ); | |
} | |
@@ -969,12 +969,13 @@ public class FastMasterEqn implements PDepKineticsEstimator { | |
*/ | |
LinkedList pathReactionList = pdn.getPathReactions(); | |
boolean foundHighPLimitRxn = false; | |
+ Temperature stdtemp = new Temperature(298,"K"); | |
+ double Hrxn; | |
for (int HighPRxNum = 0; HighPRxNum < pathReactionList.size(); HighPRxNum++) { | |
PDepReaction rxnWHighPLimit = (PDepReaction)pathReactionList.get(HighPRxNum); | |
- Temperature stdtemp = new Temperature(298,"K"); | |
- double Hrxn = rxnWHighPLimit.calculateHrxn(stdtemp); | |
if (rxn.getStructure().equals(rxnWHighPLimit.getStructure())) { | |
foundHighPLimitRxn = true; | |
+ Hrxn = rxnWHighPLimit.calculateHrxn(stdtemp); | |
double A = 0.0, Ea = 0.0, n = 0.0; | |
if (rxnWHighPLimit.isForward()) { | |
Kinetics[] k_array = rxnWHighPLimit.getKinetics(); | |
@@ -1220,16 +1221,11 @@ public class FastMasterEqn implements PDepKineticsEstimator { | |
double[] k_total = new double[5]; | |
for (int numKinetics=0; numKinetics<k_array.length; ++numKinetics) { | |
for (int numTemperatures=0; numTemperatures<T.length; ++numTemperatures) { | |
- double Ea = 0.0; | |
- if (k_array[numKinetics] instanceof ArrheniusEPKinetics){ | |
- Ea = ((ArrheniusEPKinetics)k_array[numKinetics]).getEaValue(Hrxn); | |
- } | |
- else{ | |
- Ea = k_array[numKinetics].getEValue(); | |
- } | |
+ double Ea = 0.0; | |
+ Ea = ((ArrheniusKinetics)k_array[numKinetics]).getEValue(); | |
k_total[numTemperatures] += k_array[numKinetics].getAValue() * | |
- Math.pow(T[numTemperatures], k_array[numKinetics].getNValue()) * | |
- Math.exp(-Ea/GasConstant.getKcalMolK()/T[numTemperatures]); | |
+ Math.pow(T[numTemperatures], k_array[numKinetics].getNValue()) * | |
+ Math.exp(-Ea/GasConstant.getKcalMolK()/T[numTemperatures]); | |
} | |
} | |
// Construct matrix X and vector y | |
diff --git a/source/RMG/jing/rxn/Kinetics.java b/source/RMG/jing/rxn/Kinetics.java | |
index 555b5b7..89338e9 100644 | |
--- a/source/RMG/jing/rxn/Kinetics.java | |
+++ b/source/RMG/jing/rxn/Kinetics.java | |
@@ -109,6 +109,8 @@ public interface Kinetics { | |
String toString(); | |
boolean equals(Kinetics p_k); | |
+ | |
+ ArrheniusKinetics fixBarrier(double p_Hrxn); | |
} | |
/********************************************************************* | |
diff --git a/source/RMG/jing/rxn/PDepNetwork.java b/source/RMG/jing/rxn/PDepNetwork.java | |
index 2e83f8f..0f31925 100644 | |
--- a/source/RMG/jing/rxn/PDepNetwork.java | |
+++ b/source/RMG/jing/rxn/PDepNetwork.java | |
@@ -523,6 +523,43 @@ public class PDepNetwork { | |
return rLeak; | |
} | |
+ public static double[] getSpeciesLeakFluxes(SystemSnapshot ss, CoreEdgeReactionModel cerm) { | |
+ | |
+ int len = cerm.getMaxSpeciesID() + 1; | |
+ double[] leakFlux = new double[len]; | |
+ for (int n = 0; n < len; n++) | |
+ leakFlux[n] = 0.0; | |
+ | |
+ for (ListIterator<PDepNetwork> iter0 = networks.listIterator(); iter0.hasNext(); ) { | |
+ PDepNetwork pdn = iter0.next(); | |
+ | |
+ // If there is only one path reaction (and thus only one nonincluded | |
+ // reaction), use the high-pressure limit rate as the flux rather than | |
+ // the k(T,P) value to ensure that we are considering the maximum | |
+ // possible flux entering the network | |
+ if (pdn.getPathReactions().size() == 1 && pdn.getNetReactions().size() == 0) { | |
+ PDepReaction rxn = pdn.getPathReactions().get(0); | |
+ if (!rxn.getProduct().getIncluded()) | |
+ leakFlux[rxn.getProduct().getSpecies(0).getID()] += rxn.calculateForwardFlux(ss); | |
+ else if (!rxn.getReactant().getIncluded()) | |
+ leakFlux[rxn.getReactant().getSpecies(0).getID()] += rxn.calculateReverseFlux(ss); | |
+ } | |
+ // Otherwise use the set of k(T,P) values | |
+ else { | |
+ for (ListIterator<PDepReaction> iter = pdn.getNonincludedReactions().listIterator(); iter.hasNext(); ) { | |
+ PDepReaction rxn = iter.next(); | |
+ if (rxn.getReactant().getIncluded() && !rxn.getProduct().getIncluded()) | |
+ leakFlux[rxn.getProduct().getSpecies(0).getID()] += rxn.calculateForwardFlux(ss); | |
+ else if (!rxn.getReactant().getIncluded() && rxn.getProduct().getIncluded()) | |
+ leakFlux[rxn.getReactant().getSpecies(0).getID()] += rxn.calculateReverseFlux(ss); | |
+ } | |
+ } | |
+ } | |
+ | |
+ return leakFlux; | |
+ | |
+ } | |
+ | |
/** | |
* Calculates the isomer with the largest leak flux for this network. The | |
* reaction with the maximum flux is used to select the isomer. This isomer | |
diff --git a/source/RMG/jing/rxn/PDepReaction.java b/source/RMG/jing/rxn/PDepReaction.java | |
index f09fff2..42fdebd 100644 | |
--- a/source/RMG/jing/rxn/PDepReaction.java | |
+++ b/source/RMG/jing/rxn/PDepReaction.java | |
@@ -395,9 +395,9 @@ public class PDepReaction extends Reaction { | |
if (conc < 0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
forwardFlux *= conc; | |
} | |
@@ -424,9 +424,9 @@ public class PDepReaction extends Reaction { | |
if (conc < 0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
reverseFlux *= conc; | |
} | |
@@ -518,7 +518,8 @@ public class PDepReaction extends Reaction { | |
String result = getStructure().toChemkinString(true).toString(); | |
if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
result = formPDepSign(result); | |
- result += '\t' + "1.0E0 0.0 0.0" ; | |
+ result = String.format("%-52s",result); | |
+ result += "\t1.0E0 0.0 0.0" ; | |
result += "\t!" + getComments().toString() + '\n'; | |
if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
result += pDepRate.getChebyshev().toChemkinString() + '\n'; | |
@@ -545,7 +546,8 @@ public class PDepReaction extends Reaction { | |
String result = getStructure().toRestartString(true).toString(); | |
if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
result = formPDepSign(result); | |
- result += '\t' + "1.0E0 0.0 0.0" ; | |
+ result = String.format("%-52s",result); | |
+ result += "\t1.0E0 0.0 0.0" ; | |
result += "\t!" + getComments().toString() + | |
"\tdeltaHrxn(T=298K) = " + | |
calculateHrxn(new Temperature(298.0,"K")) + " kcal/mol\n"; | |
@@ -575,17 +577,21 @@ public class PDepReaction extends Reaction { | |
@Override | |
public String toChemkinString(Temperature t, Pressure p) { | |
if (pDepRate != null) { | |
- | |
String result = getStructure().toChemkinString(true).toString(); | |
- if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
- result = formPDepSign(result); | |
+ | |
if (PDepRateConstant.getMode() == PDepRateConstant.Mode.RATE) { | |
- result = formPDepSign(result) + "\t" + calculateRate(t,p) + " 0.0 0.0"; | |
- result += "\t!" + getComments().toString() + '\n'; | |
+ result = String.format(result = formPDepSign(result)); | |
+ result += String.format("\t%.3e 0.0 0.0",calculateRate(t,p)); | |
+ result += "\t!" + getComments().toString() + '\n'; | |
return result; | |
} | |
- result += '\t' + "1.0E0 0.0 0.0"; | |
- result += "\t!" + getComments().toString() + '\n'; | |
+ | |
+ if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
+ result = formPDepSign(result); | |
+ result = String.format("%-52s",result); | |
+ | |
+ result += "\t1.0E0 0.0 0.0"; | |
+ result += "\t!" + getComments().toString() + '\n'; | |
if (PDepRateConstant.getMode() == PDepRateConstant.Mode.CHEBYSHEV) | |
result += pDepRate.getChebyshev().toChemkinString() + '\n'; | |
diff --git a/source/RMG/jing/rxn/RateConstant.java b/source/RMG/jing/rxn/RateConstant.java | |
index 23275df..1df1894 100644 | |
--- a/source/RMG/jing/rxn/RateConstant.java | |
+++ b/source/RMG/jing/rxn/RateConstant.java | |
@@ -109,8 +109,6 @@ public class RateConstant { | |
public String printKey() { | |
//#[ operation printKey() | |
return kineticsTemplate.printKey(); | |
- | |
- | |
//#] | |
} | |
@@ -118,8 +116,6 @@ public class RateConstant { | |
public boolean repOk() { | |
//#[ operation repOk() | |
return kineticsTemplate.repOk(); | |
- | |
- | |
//#] | |
} | |
diff --git a/source/RMG/jing/rxn/Reaction.java b/source/RMG/jing/rxn/Reaction.java | |
index 0593310..200ef2b 100644 | |
--- a/source/RMG/jing/rxn/Reaction.java | |
+++ b/source/RMG/jing/rxn/Reaction.java | |
@@ -79,8 +79,7 @@ public class Reaction { | |
protected boolean kineticsFromPrimaryKineticLibrary = false; | |
protected ReactionTemplate rxnTemplate; | |
- | |
- // Constructors | |
+ // Constructors | |
//## operation Reaction() | |
public Reaction() { | |
@@ -180,7 +179,7 @@ public class Reaction { | |
double rate =0; | |
Temperature stdtemp = new Temperature(298,"K"); | |
double Hrxn = calculateHrxn(stdtemp); | |
- Temperature sys_temp = ReactionModelGenerator.getTemp4BestKinetics(); | |
+ Temperature sys_temp = ReactionModelGenerator.getTemp4BestKinetics(); | |
/* AJ 12JULY2010: | |
* Added diffusive limits from previous RMG version by replacing function calculateTotalRate | |
@@ -206,22 +205,18 @@ public class Reaction { | |
Kinetics[] k_All = kinetics; | |
for (int numKinetics=0; numKinetics<kinetics.length; numKinetics++) { | |
Kinetics k = k_All[numKinetics]; | |
- if (k instanceof ArrheniusEPKinetics) | |
- rate += k.calculateRate(p_temperature,Hrxn); | |
- else | |
- rate += k.calculateRate(p_temperature); | |
- | |
+ rate += k.calculateRate(p_temperature,Hrxn); | |
} | |
return rate; | |
} | |
else if (isForward()){ | |
Kinetics[] k_All = kinetics; | |
for (int numKinetics=0; numKinetics<kinetics.length; numKinetics++) { | |
- Kinetics k = k_All[numKinetics].multiply(structure.redundancy); | |
- if (k instanceof ArrheniusEPKinetics) | |
- rate += k.calculateRate(p_temperature,Hrxn); | |
- else | |
- rate += k.calculateRate(p_temperature); | |
+ Kinetics k = k_All[numKinetics]; | |
+ if ((int)structure.redundancy != 1){ | |
+ k = k.multiply(structure.redundancy); | |
+ } | |
+ rate += k.calculateRate(p_temperature,Hrxn); | |
} | |
/* Amrit Jalan, November 29, 2010 | |
@@ -413,9 +408,9 @@ public class Reaction { | |
else { | |
throw new InvalidReactionDirectionException(); | |
} | |
- | |
} | |
- | |
+ | |
+ //## operation calculatediff(LinkedList) | |
public double calculatediff(LinkedList p_struct) { | |
if (p_struct.size()!=2){ | |
@@ -688,8 +683,6 @@ public class Reaction { | |
//#[ operation contains(Species) | |
if (containsAsReactant(p_species) || containsAsProduct(p_species)) return true; | |
else return false; | |
- | |
- | |
//#] | |
} | |
@@ -729,17 +722,11 @@ public class Reaction { | |
public boolean equals(Object p_reaction) { | |
//#[ operation equals(Object) | |
if (this == p_reaction) return true; | |
- | |
if (!(p_reaction instanceof Reaction)) return false; | |
- | |
Reaction r = (Reaction)p_reaction; | |
- | |
if (!getStructure().equals(r.getStructure())) return false; | |
- | |
return true; | |
- | |
- //#] | |
} | |
/* | |
@@ -970,9 +957,7 @@ public class Reaction { | |
fittedReverseKinetics = null; | |
} | |
else { | |
- //double temp = 715; | |
- // double temp = 298.15; //10/29/07 gmagoon: Sandeep made change to temp = 298 on his computer locally | |
- // double temp = 1350; //11/6/07 gmagoon:**** changed to actual temperature in my condition file to create agreement with old version; apparently, choice of temp has large effect; //11/9/07 gmagoon: commented out | |
+ //double temp = 715; | |
double temp = 298.15; //11/9/07 gmagoon: restored use of 298.15 per discussion with Sandeep | |
//double temp = Global.temperature.getK(); | |
Kinetics[] k = getKinetics(); | |
@@ -1088,6 +1073,7 @@ public class Reaction { | |
} | |
if (isForward()) { | |
int red = structure.getRedundancy(); | |
+ if (red==1) return kinetics; // Don't waste time multiplying by 1 | |
Kinetics[] kinetics2return = new Kinetics[kinetics.length]; | |
for (int numKinetics=0; numKinetics<kinetics.length; ++numKinetics) { | |
kinetics2return[numKinetics] = kinetics[numKinetics].multiply(red); | |
@@ -1109,9 +1095,6 @@ public class Reaction { | |
else | |
throw new InvalidReactionDirectionException(structure.toString()); | |
- | |
- | |
- //#] | |
} | |
public void setKineticsComments(String p_string, int num_k){ | |
@@ -1420,7 +1403,7 @@ public class Reaction { | |
if (ChemkinString != null) | |
return ChemkinString; | |
StringBuilder result = new StringBuilder(); | |
- StringBuilder strucString = getStructure().toChemkinString(hasReverseReaction()); | |
+ String strucString = String.format("%-52s",getStructure().toChemkinString(hasReverseReaction())); | |
Temperature stdtemp = new Temperature(298,"K"); | |
double Hrxn = calculateHrxn(stdtemp); | |
Kinetics[] allKinetics = getKinetics(); | |
@@ -1462,7 +1445,7 @@ public class Reaction { | |
* when writing the Restart files, to account for this bug. | |
*/ | |
- String result = getStructure().toRestartString(hasReverseReaction()).toString(); //+ " "+getStructure().direction + " "+getStructure().redundancy; | |
+ String result = String.format("%-52s",getStructure().toRestartString(hasReverseReaction())); //+ " "+getStructure().direction + " "+getStructure().redundancy; | |
// MRH 18Jan2010: Restart files do not look for direction/redundancy | |
/* | |
* MRH 14Feb2010: Handle reactions with multiple kinetics | |
@@ -1772,17 +1755,17 @@ public class Reaction { | |
String rxn = ""; | |
Species species = (Species) structure.getReactantList().get(0); | |
- rxn = rxn + species.getName() + "(" + Integer.toString(species.getID()) + ")"; | |
+ rxn = rxn + species.getFullName() ; | |
for (int i = 1; i < getReactantNumber(); i++) { | |
species = (Species) structure.getReactantList().get(i); | |
- rxn += " + " + species.getName() + "(" + Integer.toString(species.getID()) + ")"; | |
+ rxn += " + " + species.getFullName() ; | |
} | |
rxn += " --> "; | |
species = (Species) structure.getProductList().get(0); | |
- rxn = rxn + species.getName() + "(" + Integer.toString(species.getID()) + ")"; | |
+ rxn = rxn + species.getFullName() ; | |
for (int i = 1; i < getProductNumber(); i++) { | |
species = (Species) structure.getProductList().get(i); | |
- rxn += " + " + species.getName() + "(" + Integer.toString(species.getID()) + ")"; | |
+ rxn += " + " + species.getFullName() ; | |
} | |
return rxn; | |
@@ -1839,9 +1822,9 @@ public class Reaction { | |
if (conc < 0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
forwardFlux *= conc; | |
} | |
diff --git a/source/RMG/jing/rxn/ReactionTemplate.java b/source/RMG/jing/rxn/ReactionTemplate.java | |
index f46ace4..6fce3ee 100644 | |
--- a/source/RMG/jing/rxn/ReactionTemplate.java | |
+++ b/source/RMG/jing/rxn/ReactionTemplate.java | |
@@ -252,7 +252,7 @@ public class ReactionTemplate { | |
} | |
//## operation findClosestRateConstant(Collection) | |
- public Kinetics[] findClosestRateConstant(LinkedList p_matchedPathSet) { | |
+ public Kinetics findClosestRateConstant(LinkedList p_matchedPathSet) { | |
//#[ operation findClosestRateConstant(Collection) | |
LinkedHashSet exactTreeNode = new LinkedHashSet(); | |
LinkedHashSet exactKey = new LinkedHashSet(); | |
@@ -277,10 +277,7 @@ public class ReactionTemplate { | |
KineticsTemplate kt = kineticsTemplateLibrary.getKineticsTemplate(exactKey); | |
int rNum = getReactantNumber(); | |
if (kt!=null) { | |
- Kinetics[] k_closest = new Kinetics[1]; | |
- k_closest[0] = kt.kinetics; | |
- return k_closest; | |
-// return kt.kinetics; | |
+ return kt.kinetics; | |
} | |
Collection allPossibleTreeNodeSet = MathTool.expand(p_matchedPathSet.iterator()); | |
@@ -319,20 +316,12 @@ public class ReactionTemplate { | |
// get averaged k with the closest distance | |
Kinetics newK = ArrheniusKinetics.average(bestKineticsSet); | |
- //KineticsTemplate newKT = kineticsTemplateLibrary.addKinetics(exactKey, newK); | |
- //RateConstant rc = new RateConstant(newKT, bestKineticsTemplateSet, closest); | |
- Kinetics[] k_closest = new Kinetics[1]; | |
- k_closest[0] = newK; | |
- return k_closest; | |
-// return newK; | |
+ return newK; | |
- | |
- | |
- //#] | |
} | |
//## operation findExactRateConstant(Collection) | |
- public Kinetics[] findExactRateConstant(Collection p_matchedPathSet) { | |
+ public Kinetics findExactRateConstant(Collection p_matchedPathSet) { | |
//#[ operation findExactRateConstant(Collection) \ | |
LinkedHashSet fgc = new LinkedHashSet(); | |
@@ -349,14 +338,7 @@ public class ReactionTemplate { | |
KineticsTemplate kt = kineticsTemplateLibrary.getKineticsTemplate(fgc); | |
if (kt==null) return null; | |
- else { | |
- //kt.kinetics.setSource(kt.kinetics.toChemkinString()); | |
- Kinetics[] k_exact = new Kinetics[1]; | |
- k_exact[0] = kt.kinetics; | |
- return k_exact; | |
-// return kt.kinetics; | |
- } | |
- | |
+ else return kt.kinetics; | |
} | |
/** | |
@@ -413,6 +395,11 @@ public class ReactionTemplate { | |
* for the R. + HOO. --> .OO. + RH direction are not very accurate (ignition delays | |
* change drastically, running the same condition.txt file). | |
*/ | |
+ /* 17-JAN-2011 | |
+ * Once again removing the "H_Abstraction" code so that the exothermic direction is always favored. | |
+ * The observation of 24-SEPT-2010 that the ignition delays change drastically could have been due | |
+ * to some other change. | |
+ | |
if (name.equals("H_Abstraction")) { | |
boolean polyRadicalReactant = false; | |
boolean polyRadicalProduct = false; | |
@@ -445,6 +432,7 @@ public class ReactionTemplate { | |
p_structure.setDirection(-1); | |
} | |
} | |
+ */ | |
if (thermoConsistence) { | |
Temperature T = new Temperature(298, "K"); | |
@@ -489,20 +477,29 @@ public class ReactionTemplate { | |
} | |
if (p_structure.isForward()) { | |
+ Kinetics kf = null; | |
LinkedList fg = structureTemplate.getMatchedFunctionalGroup(reactants); | |
if (fg == null) { | |
Global.RT_findRateConstant += (System.currentTimeMillis()-pT)/1000/60; | |
return null; | |
} | |
String comments = getKineticsComments(fg); | |
- k = findExactRateConstant(fg); | |
- if (k==null) { | |
- k = findClosestRateConstant(fg); | |
- k[0].setSource(name + " estimate: (" + k[0].getSource() + ")"); | |
+ kf = findExactRateConstant(fg); | |
+ if (kf==null) { | |
+ kf = findClosestRateConstant(fg); | |
+ kf.setSource(name + " estimate: (" + kf.getSource() + ")"); | |
} | |
- else k[0].setSource(name + " exact: "); | |
- k[0].setComments(comments); | |
+ else kf.setSource(name + " exact: "); | |
+ kf.setComments(comments); | |
Global.RT_findRateConstant += (System.currentTimeMillis()-pT)/1000/60; | |
+ | |
+ // fix rate constant here | |
+ double Hrxn = p_structure.calculateHrxn(new Temperature(298, "K")); | |
+ ArrheniusKinetics k_fixed = kf.fixBarrier(Hrxn); | |
+ | |
+ // We must return a list (with one element). | |
+ k = new Kinetics[1]; | |
+ k[0] = k_fixed; | |
return k; | |
} | |
else { | |
@@ -608,20 +605,22 @@ public class ReactionTemplate { | |
} | |
private String getKineticsComments(Collection p_matchedPathSet) { | |
- StringBuilder comment = new StringBuilder(); | |
- for (Iterator iter = p_matchedPathSet.iterator(); iter.hasNext();) { | |
+ StringBuilder comment = new StringBuilder("[ "); | |
+ for (Iterator iter = p_matchedPathSet.iterator(); iter.hasNext();) { | |
Stack s = (Stack)iter.next(); | |
HierarchyTreeNode node = (HierarchyTreeNode)s.peek(); | |
- if (node.hasDummyChild()) comment.append((node.getDummyChild().getName()+" ")); | |
+ if (node.hasDummyChild()) comment.append((node.getDummyChild().getName() + " , ")); | |
else { | |
if (node.getElement() instanceof FunctionalGroup) | |
- comment.append(((FunctionalGroup)node.getElement()).getName() + " "); | |
+ comment.append(((FunctionalGroup)node.getElement()).getName() + " , "); | |
else | |
- comment.append(((FunctionalGroupCollection)node.getElement()).getName() + " "); | |
+ comment.append(((FunctionalGroupCollection)node.getElement()).getName() + " , "); | |
} | |
- } | |
- return comment.toString(); | |
- } | |
+ } | |
+ comment.delete(comment.length()-2, comment.length()); // remove the final comma | |
+ comment.append("]"); | |
+ return comment.toString(); | |
+ } | |
//## operation findUnion(String,HashMap) | |
private void findUnion(String p_name, HashMap p_unRead) { | |
@@ -1484,22 +1483,8 @@ public class ReactionTemplate { | |
} | |
else fgc.add(fg); | |
} | |
- // read in the | |
- /* | |
- * Commented out by MRH 15-Jun-2009 | |
- * We used to pass only the TRange, modified Arrhenius parameters, | |
- * their uncertainties, and the data's rank to parseArrheniusKinetics. | |
- * Now, pass the entire line of data, so that any comments | |
- * written after the rank may be read in | |
- */ | |
-// String kinetics = token.nextToken(); | |
-// while (token.hasMoreTokens()) { | |
-// kinetics = kinetics + " " + token.nextToken(); | |
-// } | |
+ // read in the kinetics | |
Kinetics k; | |
-// if (format.equals("Arrhenius")) k = ChemParser.parseArrheniusKinetics(kinetics); | |
-// else if (format.equals("Arrhenius_EP")) k = ChemParser.parseArrheniusEPKinetics(kinetics); | |
-// else throw new InvalidKineticsFormatException("Invalid rate constant format: " + kinetics); | |
if (format.equals("Arrhenius")) k = ChemParser.parseArrheniusKinetics(line,keyNum); | |
else if (format.equals("Arrhenius_EP")) k = ChemParser.parseArrheniusEPKinetics(line,keyNum); | |
else throw new InvalidKineticsFormatException("Invalid rate constant format: " + line); | |
diff --git a/source/RMG/jing/rxn/ReactionTemplateLibrary.java b/source/RMG/jing/rxn/ReactionTemplateLibrary.java | |
index 2403917..11ea839 100644 | |
--- a/source/RMG/jing/rxn/ReactionTemplateLibrary.java | |
+++ b/source/RMG/jing/rxn/ReactionTemplateLibrary.java | |
@@ -67,6 +67,7 @@ public class ReactionTemplateLibrary { | |
// Read the file families.txt | |
try { | |
+ System.out.println("\nReading kinetics groups database from: " + kineticsDirectory + "\n"); | |
String familiesPath = kineticsDirectory + "families.txt"; | |
FileReader in = new FileReader(familiesPath); | |
BufferedReader data = new BufferedReader(in); | |
diff --git a/source/RMG/jing/rxn/Structure.java b/source/RMG/jing/rxn/Structure.java | |
index b850b20..159c659 100644 | |
--- a/source/RMG/jing/rxn/Structure.java | |
+++ b/source/RMG/jing/rxn/Structure.java | |
@@ -935,8 +935,8 @@ public class Structure { | |
while (iter1.hasNext()) { | |
index++; | |
Species spe = (Species)iter1.next(); | |
- if (index < r_num) s = s + spe.getName()+"("+spe.getID()+")" + "+"; | |
- else s += spe.getName()+"("+spe.getID()+")"; | |
+ if (index < r_num) s = s + spe.getFullName() + "+"; | |
+ else s += spe.getFullName(); | |
} | |
if (p_includeReverse) | |
s += "="; | |
@@ -948,8 +948,8 @@ public class Structure { | |
while (iter2.hasNext()) { | |
index++; | |
Species spe = (Species)iter2.next(); | |
- if (index < p_num) s = s + spe.getName()+"("+spe.getID()+")" + "+"; | |
- else s += spe.getName()+"("+spe.getID()+")"; | |
+ if (index < p_num) s = s + spe.getFullName() + "+"; | |
+ else s += spe.getFullName(); | |
} | |
StringBuilder sb = new StringBuilder(s); | |
diff --git a/source/RMG/jing/rxn/TROEReaction.java b/source/RMG/jing/rxn/TROEReaction.java | |
index dfd08c3..a131728 100644 | |
--- a/source/RMG/jing/rxn/TROEReaction.java | |
+++ b/source/RMG/jing/rxn/TROEReaction.java | |
@@ -69,12 +69,8 @@ public class TROEReaction extends ThirdBodyReaction { | |
public double calculateRate(SystemSnapshot p_presentStatus) { | |
//#[ operation calculateRate(SystemSnapshot) | |
Temperature temp = p_presentStatus.getTemperature(); | |
- | |
- //Kinetics k = getKinetics(); | |
- //double rate = k.calculateRate(temp, calculateHrxn(temp)); | |
double rate = super.calculateTotalRate(temp); | |
rate *= calculateTroeFallOff(p_presentStatus); | |
- | |
return rate; | |
//#] | |
} | |
diff --git a/source/RMG/jing/rxn/TemplateReaction.java b/source/RMG/jing/rxn/TemplateReaction.java | |
index 02969d2..c21e464 100644 | |
--- a/source/RMG/jing/rxn/TemplateReaction.java | |
+++ b/source/RMG/jing/rxn/TemplateReaction.java | |
@@ -64,9 +64,8 @@ public class TemplateReaction extends Reaction { | |
reactionTemplate = p_template; | |
if (kinetics != null) | |
kineticsFromPrimaryKineticLibrary = p_kinetics[0].getFromPrimaryKineticLibrary(); | |
- | |
- //#] | |
} | |
+ | |
public TemplateReaction() { | |
} | |
@@ -350,8 +349,15 @@ public class TemplateReaction extends Reaction { | |
TemplateReaction reaction = p_template.getReactionFromStructure(p_structureSp); | |
Global.getReacFromStruc = Global.getReacFromStruc + (System.currentTimeMillis() - PT) / 1000 / 60; | |
- if (reaction == null) { | |
- | |
+ if (reaction != null){ | |
+ // the same identity of p_structure already exists, clear p_structure to release mem | |
+ Structure st = reaction.getStructure(); | |
+ if (st != p_structure) { | |
+ p_structure = null; | |
+ } | |
+ } | |
+ else { | |
+ // Create a new reaction. | |
reaction = new TemplateReaction(p_structureSp, p_kinetics, p_template); | |
// DEBUG: Tell console I made this reaction | |
System.out.println("Created new reaction: " + reaction.toString()); | |
@@ -385,12 +391,6 @@ public class TemplateReaction extends Reaction { | |
if (!reaction.repOk()) { | |
throw new InvalidTemplateReactionException(); | |
} | |
- } else { | |
- // the same identity of p_structure already exists, clear p_structure to release mem | |
- Structure st = reaction.getStructure(); | |
- if (st != p_structure) { | |
- p_structure = null; | |
- } | |
} | |
Global.makeTR += (System.currentTimeMillis() - PT) / 1000 / 60; | |
return reaction; | |
diff --git a/source/RMG/jing/rxn/TemplateReactionGenerator.java b/source/RMG/jing/rxn/TemplateReactionGenerator.java | |
index 1849108..21e0f65 100644 | |
--- a/source/RMG/jing/rxn/TemplateReactionGenerator.java | |
+++ b/source/RMG/jing/rxn/TemplateReactionGenerator.java | |
@@ -102,18 +102,8 @@ public class TemplateReactionGenerator implements ReactionGenerator { | |
} | |
} | |
Runtime runTime = Runtime.getRuntime(); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
- if (runTime.freeMemory() < runTime.totalMemory()/3) { | |
+ if (runTime.freeMemory() < runTime.totalMemory()/3) | |
runTime.gc(); | |
- System.out.println("After garbage collection:"); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
- } | |
return pdepReactionSet; | |
} | |
@@ -267,18 +257,8 @@ public class TemplateReactionGenerator implements ReactionGenerator { | |
//PDepNetwork.completeNetwork(p_species); | |
Runtime runTime = Runtime.getRuntime(); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
- if (runTime.freeMemory() < runTime.totalMemory()/3) { | |
+ if (runTime.freeMemory() < runTime.totalMemory()/3) | |
runTime.gc(); | |
- System.out.println("After garbage collection:"); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
- } | |
// double t = (System.currentTimeMillis()-pT)/1000/60; | |
// Global.RT_reactTwoReactants += t; | |
diff --git a/source/RMG/jing/rxn/ThirdBodyReaction.java b/source/RMG/jing/rxn/ThirdBodyReaction.java | |
index 25a99ae..99e1346 100644 | |
--- a/source/RMG/jing/rxn/ThirdBodyReaction.java | |
+++ b/source/RMG/jing/rxn/ThirdBodyReaction.java | |
@@ -58,14 +58,10 @@ public class ThirdBodyReaction extends Reaction { | |
//## operation calculateRate(SystemSnapshot) | |
public double calculateRate(SystemSnapshot p_systemSnapshot) { | |
- //#[ operation calculateRate(SystemSnapshot) | |
Temperature temp = p_systemSnapshot.getTemperature(); | |
- //Kinetics k = getKinetics(); | |
- //double rate = k.calculateRate(temp, calculateHrxn(temp)); | |
double rate = super.calculateTotalRate(temp); | |
rate *= calculateThirdBodyCoefficient(p_systemSnapshot); | |
return rate; | |
- //#] | |
} | |
public HashMap getWeightMap(){ | |
@@ -219,6 +215,7 @@ public class ThirdBodyReaction extends Reaction { | |
//#[ operation toChemkinString() | |
StringBuilder s = getStructure().toChemkinString(true); | |
s = formPDepSign(s); | |
+ s = new StringBuilder(String.format("%-52s",s)); // pad it to 52 characters | |
for (int i=0; i<getKinetics().length; i++) { | |
s.append("\t" + getKinetics()[i].toChemkinString(calculateHrxn(p_temperature),p_temperature, true) + '\n'); | |
} | |
@@ -253,6 +250,7 @@ public class ThirdBodyReaction extends Reaction { | |
public String toRestartString(Temperature t) { | |
StringBuilder s = getStructure().toRestartString(true); | |
s = formPDepSignForRestart(s); | |
+ s = new StringBuilder(String.format("%-52s",s)); // pad it to 52 characters | |
for (int i=0; i<getKinetics().length; i++) { | |
s.append("\t" + getKinetics()[i].toChemkinString(calculateHrxn(t),t,false) + " 0.0 0.0 0.0\n"); | |
} | |
diff --git a/source/RMG/jing/rxnSys/Chemkin.java b/source/RMG/jing/rxnSys/Chemkin.java | |
index d9ec16a..d019f99 100644 | |
--- a/source/RMG/jing/rxnSys/Chemkin.java | |
+++ b/source/RMG/jing/rxnSys/Chemkin.java | |
@@ -173,14 +173,14 @@ public Chemkin() { | |
double conc = ((Double)p_speciesConc.get(i)).doubleValue(); | |
double flux = ((Double)p_speciesFlux.get(i)).doubleValue(); | |
- System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getName() + '\t' + String.valueOf(conc) + '\t' + String.valueOf(flux)); | |
+ System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getFullName() + '\t' + String.valueOf(conc) + '\t' + String.valueOf(flux)); | |
if (conc < 0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException("species " + spe.getName() + " has negative conc: " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException("species " + spe.getFullName() + " has negative conc: " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
SpeciesStatus ss = new SpeciesStatus(spe, 1, conc, flux); | |
@@ -415,9 +415,9 @@ public Chemkin() { | |
} | |
//## operation solve(boolean,ReactionModel,boolean,SystemSnapshot,ReactionTime,ReactionTime,boolean) | |
- public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, final ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_conditionChanged) { | |
+ public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, final ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_conditionChanged, LinkedHashSet nonpdep_from_seed) { | |
//#[ operation solve(boolean,ReactionModel,boolean,SystemSnapshot,ReactionTime,ReactionTime,boolean) | |
- writeChemkinInputFile(p_reactionModel, p_beginStatus); | |
+ writeChemkinInputFile(p_reactionModel, p_beginStatus, nonpdep_from_seed); | |
runChemkin(); | |
checkChemkinMessage(); | |
@@ -461,7 +461,7 @@ public Chemkin() { | |
} | |
//## operation writeChemkinInputFile(ReactionModel,SystemSnapshot) | |
- public static void writeChemkinInputFile(final ReactionModel p_reactionModel, SystemSnapshot p_beginStatus) { | |
+ public static void writeChemkinInputFile(final ReactionModel p_reactionModel, SystemSnapshot p_beginStatus, LinkedHashSet nonpdep_from_seed) { | |
//String dir = System.getProperty("RMG.workingDirectory"); | |
//if (!dir.endsWith("/")) dir += "/"; | |
@@ -485,7 +485,7 @@ public Chemkin() { | |
bufferedWriter.write(writeChemkinElement()); | |
bufferedWriter.write(writeChemkinSpecies(p_reactionModel, p_beginStatus)); | |
bufferedWriter.write(writeChemkinThermo(p_reactionModel)); | |
- bufferedWriter = writeChemkinPdepReactions(p_reactionModel, p_beginStatus,bufferedWriter); | |
+ bufferedWriter = writeChemkinPdepReactions(p_reactionModel, p_beginStatus,bufferedWriter,nonpdep_from_seed); | |
} catch (FileNotFoundException ex) { | |
ex.printStackTrace(); | |
} catch (IOException ex) { | |
@@ -542,14 +542,14 @@ public Chemkin() { | |
} | |
- public static void writeChemkinInputFile(ReactionSystem rs) { | |
+ public static void writeChemkinInputFile(ReactionSystem rs, LinkedHashSet nonpdep_from_seed) { | |
// call the above writeChemkinInputFile method, with the appropriate parameters | |
- writeChemkinInputFile(rs.reactionModel, rs.initialStatus); | |
+ writeChemkinInputFile(rs.reactionModel, rs.initialStatus, nonpdep_from_seed); | |
} | |
//## operation writeChemkinPdepReactions(ReactionModel, SystemSnapshot) | |
- public static BufferedWriter writeChemkinPdepReactions(ReactionModel p_reactionModel, SystemSnapshot p_beginStatus, BufferedWriter bufferedWriter) throws IOException { | |
+ public static BufferedWriter writeChemkinPdepReactions(ReactionModel p_reactionModel, SystemSnapshot p_beginStatus, BufferedWriter bufferedWriter, LinkedHashSet nonpdep_from_seed) throws IOException { | |
/* | |
Writes all reactions, not just the P-dep ones. | |
Returns the result as a string. | |
@@ -606,7 +606,8 @@ public Chemkin() { | |
if (rxn.getReverseReaction() == null) | |
rxn.generateReverseReaction(); | |
- if (!rxn.reactantEqualsProduct() && !pDepList.contains(rxn) && !pDepList.contains(rxn.getReverseReaction()) ) { | |
+ if (!rxn.reactantEqualsProduct() && !pDepList.contains(rxn) && !pDepList.contains(rxn.getReverseReaction()) && | |
+ !nonpdep_from_seed.contains(rxn) && !nonpdep_from_seed.contains(rxn.getReverseReaction())) { | |
pDepList.add(rxn); | |
} | |
} | |
@@ -660,7 +661,7 @@ public Chemkin() { | |
for (Iterator iter = cerm.getSpecies(); iter.hasNext(); ) { | |
Species spe = (Species)iter.next(); | |
if (spe.getChemkinName().startsWith("SPC")) | |
- result.append("\t" + spe.getChemkinName() + "\t!" + spe.getName() + "\n"); | |
+ result.append("\t" + spe.getChemkinName() + "\t! " + spe.getFullName() + "\n"); | |
else | |
result.append('\t' + spe.getChemkinName() + '\n'); | |
} | |
@@ -894,7 +895,7 @@ public Chemkin() { | |
} | |
-public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int iternum) { | |
+public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int iternum, LinkedHashSet nonpdep_from_seed) { | |
//writeChemkinInputFile(p_reactionModel, p_beginStatus); | |
diff --git a/source/RMG/jing/rxnSys/CoreEdgeReactionModel.java b/source/RMG/jing/rxnSys/CoreEdgeReactionModel.java | |
index 90565c0..250505d 100644 | |
--- a/source/RMG/jing/rxnSys/CoreEdgeReactionModel.java | |
+++ b/source/RMG/jing/rxnSys/CoreEdgeReactionModel.java | |
@@ -324,7 +324,7 @@ public class CoreEdgeReactionModel implements ReactionModel { | |
//#[ operation addUnreactedSpecies(Species) | |
if (containsAsReactedSpecies(p_species)) { | |
// this is not a unreacted species | |
- System.out.println("This is a reacted species " + p_species.getName()); | |
+ System.out.println("This is a reacted species " + p_species.getFullName()); | |
System.out.println("Can't add it into unreacted species set!"); | |
} | |
else { | |
@@ -341,7 +341,7 @@ public class CoreEdgeReactionModel implements ReactionModel { | |
Species species = (Species)speciesIter.next(); | |
if (containsAsReactedSpecies(species)) { | |
// this is not a unreacted species | |
- System.out.println("This is a reacted species " + species.getName()); | |
+ System.out.println("This is a reacted species " + species.getFullName()); | |
System.out.println("Can't add it into unreacted species set!"); | |
} | |
else { | |
@@ -797,7 +797,7 @@ public class CoreEdgeReactionModel implements ReactionModel { | |
getReactedSpeciesSet().add(p_species); | |
return; | |
} | |
- else throw new InvalidCoreEdgeRelationException(p_species.getName()); | |
+ else throw new InvalidCoreEdgeRelationException(p_species.getFullName()); | |
//#] | |
} | |
@@ -839,7 +839,7 @@ public class CoreEdgeReactionModel implements ReactionModel { | |
System.out.println("SpeciesID\tNamw\tH298\tS298\tCp300\tCp400\tCp500\tCp600\tCp800\tCp1000\tCp1500"); | |
for (int i=0; i<sortedSpeList.size(); i++) { | |
Species spe = (Species)sortedSpeList.get(i); | |
- System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getName() + '\t' + spe.getThermoData().toString()); | |
+ System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getFullName() + '\t' + spe.getThermoData().toString()); | |
}*/ | |
LinkedList nonPDepList = new LinkedList(); | |
@@ -926,7 +926,7 @@ public class CoreEdgeReactionModel implements ReactionModel { | |
System.out.println("SpeciesID\tNamw\tH298\tS298\tCp300\tCp400\tCp500\tCp600\tCp800\tCp1000\tCp1500"); | |
for (int i=0; i<sortedSpeList.size(); i++) { | |
Species spe = (Species)sortedSpeList.get(i); | |
- System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getName() + '\t' + spe.getThermoData().toString()); | |
+ System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getFullName() + '\t' + spe.getThermoData().toString()); | |
}*/ | |
LinkedList nonPDepList = new LinkedList(); | |
diff --git a/source/RMG/jing/rxnSys/DynamicSimulator.java b/source/RMG/jing/rxnSys/DynamicSimulator.java | |
index d6adbb8..95f1c8e 100644 | |
--- a/source/RMG/jing/rxnSys/DynamicSimulator.java | |
+++ b/source/RMG/jing/rxnSys/DynamicSimulator.java | |
@@ -47,7 +47,7 @@ public interface DynamicSimulator { | |
//void clean(); | |
//## operation solve(boolean,ReactionModel,boolean,SystemSnapshot,ReactionTime,ReactionTime,Temperature,Pressure,boolean) | |
- SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure,boolean p_conditionChanged, TerminationTester tt, int p_iterationNum); | |
+ SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure,boolean p_conditionChanged, TerminationTester tt, int p_iterationNum, LinkedHashSet nonpdep_from_seed); | |
void addConversion(double [] p_conversion, int p_numConversiosn); | |
double[] getConversion(); | |
diff --git a/source/RMG/jing/rxnSys/JDAS.java b/source/RMG/jing/rxnSys/JDAS.java | |
index 275b4f5..586295b 100644 | |
--- a/source/RMG/jing/rxnSys/JDAS.java | |
+++ b/source/RMG/jing/rxnSys/JDAS.java | |
@@ -93,6 +93,7 @@ public abstract class JDAS implements DAESolver { | |
protected double endTime; | |
protected StringBuilder thermoString = new StringBuilder(); | |
protected static HashMap edgeID; | |
+ protected static HashMap edgeLeakID; | |
protected double[] maxEdgeFluxRatio; | |
protected boolean[] prunableSpecies; | |
protected double termTol; | |
@@ -142,7 +143,8 @@ public abstract class JDAS implements DAESolver { | |
} | |
public StringBuilder generatePDepODEReactionList(ReactionModel p_reactionModel, | |
- SystemSnapshot p_beginStatus, Temperature p_temperature, Pressure p_pressure) { | |
+ SystemSnapshot p_beginStatus, Temperature p_temperature, Pressure p_pressure, | |
+ LinkedHashSet nonpdep_from_seed) { | |
StringBuilder rString = new StringBuilder(); | |
StringBuilder arrayString = new StringBuilder(); | |
@@ -154,7 +156,7 @@ public abstract class JDAS implements DAESolver { | |
LinkedList nonPDepList = new LinkedList(); | |
LinkedList pDepList = new LinkedList(); | |
- generatePDepReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure, nonPDepList, pDepList); | |
+ generatePDepReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure, nonPDepList, pDepList, nonpdep_from_seed); | |
int size = nonPDepList.size() + pDepList.size() + duplicates.size(); | |
@@ -259,7 +261,7 @@ public abstract class JDAS implements DAESolver { | |
public void generatePDepReactionList(ReactionModel p_reactionModel, | |
SystemSnapshot p_beginStatus, Temperature p_temperature, Pressure p_pressure, | |
- LinkedList nonPDepList, LinkedList pDepList) { | |
+ LinkedList nonPDepList, LinkedList pDepList, LinkedHashSet nonpdep_from_seed) { | |
CoreEdgeReactionModel cerm = (CoreEdgeReactionModel) p_reactionModel; | |
@@ -274,7 +276,10 @@ public abstract class JDAS implements DAESolver { | |
rxn.generateReverseReaction(); | |
} | |
- if (!rxn.reactantEqualsProduct() && !troeList.contains(rxn) && !troeList.contains(rxn.getReverseReaction()) && !thirdBodyList.contains(rxn) && !thirdBodyList.contains(rxn.getReverseReaction()) && !lindemannList.contains(rxn) && !lindemannList.contains(rxn.getReverseReaction())) { | |
+ if (!rxn.reactantEqualsProduct() && !troeList.contains(rxn) && !troeList.contains(rxn.getReverseReaction()) && | |
+ !thirdBodyList.contains(rxn) && !thirdBodyList.contains(rxn.getReverseReaction()) && | |
+ !lindemannList.contains(rxn) && !lindemannList.contains(rxn.getReverseReaction()) && | |
+ !nonpdep_from_seed.contains(rxn) && !nonpdep_from_seed.contains(rxn.getReverseReaction())) { | |
if (!pDepList.contains(rxn) && !pDepList.contains(rxn.getReverseReaction())) { | |
pDepList.add(rxn); | |
} else if (pDepList.contains(rxn) && !pDepList.contains(rxn.getReverseReaction())) { | |
@@ -319,18 +324,18 @@ public abstract class JDAS implements DAESolver { | |
Species spe = (Species) iter.next(); | |
int id = getRealID(spe); | |
if (id > p_y.length) { | |
- throw new UnknownReactedSpeciesException(spe.getName()); | |
+ throw new UnknownReactedSpeciesException(spe.getFullName()); | |
} | |
double conc = p_y[id - 1]; | |
double flux = p_yprime[id - 1]; | |
- System.out.println(String.format("%1$4d\t%2$-13s\t%3$ 6E \t%4$ 6E", spe.getID(), spe.getName(), conc, flux)); | |
+ System.out.println(String.format("%1$4d\t%2$-13s\t%3$ 6E \t%4$ 6E", spe.getID(), spe.getFullName(), conc, flux)); | |
if (conc < 0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException("Species " + spe.getName() + " has negative conc: " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative conc: " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) { | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
} | |
SpeciesStatus ss = new SpeciesStatus(spe, 1, conc, flux); | |
@@ -574,7 +579,7 @@ public abstract class JDAS implements DAESolver { | |
Species spe = ss.getSpecies(); | |
int id = getRealID(spe); | |
- //System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getName() + '\t' + String.valueOf(conc) + '\t' + String.valueOf(flux)); | |
+ //System.out.println(String.valueOf(spe.getID()) + '\t' + spe.getFullName() + '\t' + String.valueOf(conc) + '\t' + String.valueOf(flux)); | |
y[id - 1] = conc; | |
yprime[id - 1] = flux; | |
@@ -751,10 +756,10 @@ public abstract class JDAS implements DAESolver { | |
return rtol; | |
} | |
- public String getEdgeReactionString(CoreEdgeReactionModel model, HashMap edgeID, | |
- Reaction r, Temperature temperature, Pressure pressure) { | |
+ public String getEdgeReactionString(CoreEdgeReactionModel model, HashMap IDmap, | |
+ Reaction r, Temperature temperature, Pressure pressure, int offset) { | |
- int edgeSpeciesCounter = edgeID.size(); | |
+ int edgeSpeciesCounter = IDmap.size() + offset; | |
// Find the rate coefficient | |
double k; | |
@@ -782,11 +787,11 @@ public abstract class JDAS implements DAESolver { | |
Species spe = (Species) pIter.next(); | |
if (model.containsAsUnreactedSpecies(spe)) { | |
prodCount++; | |
- Integer id = (Integer) edgeID.get(spe); | |
+ Integer id = (Integer) IDmap.get(spe); | |
if (id == null) { | |
edgeSpeciesCounter++; | |
id = new Integer(edgeSpeciesCounter); | |
- edgeID.put(spe, id); | |
+ IDmap.put(spe, id); | |
} | |
tempProdArray[prodCount - 1] = id; | |
} | |
@@ -811,12 +816,13 @@ public abstract class JDAS implements DAESolver { | |
// First use reactions in unreacted reaction set, which is valid for both RateBasedRME and RateBasedPDepRME | |
edgeID = new HashMap(); | |
+ edgeLeakID = new HashMap(); | |
LinkedHashSet ur = model.getUnreactedReactionSet(); | |
for (Iterator iur = ur.iterator(); iur.hasNext();) { | |
Reaction r = (Reaction) iur.next(); | |
if (((CoreEdgeReactionModel) model).reactantsInCoreQ(r.getStructure())) { | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, r, p_temperature, p_pressure);//this line is needed even when not writing to file because it will update edgeID | |
+ String str = getEdgeReactionString(model, edgeID, r, p_temperature, p_pressure, 0);//this line is needed even when not writing to file because it will update edgeID | |
// edgeReacInfoString.append("\n" + str); | |
} | |
} | |
@@ -868,13 +874,13 @@ public abstract class JDAS implements DAESolver { | |
if (edgeReaction) { | |
if (forwardFlag) { | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure);//use the forward reaction | |
+ String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure, 0);//use the forward reaction | |
// edgeReacInfoString.append("\n" + str); | |
} else { | |
PDepReaction rxn_r = (PDepReaction) rxn.getReverseReaction(); | |
if (rxn_r != null) {//make sure the reverse is not null | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, rxn_r, p_temperature, p_pressure);//use the reverse reaction | |
+ String str = getEdgeReactionString(model, edgeID, rxn_r, p_temperature, p_pressure, 0);//use the reverse reaction | |
// edgeReacInfoString.append("\n" + str); | |
} | |
} | |
@@ -884,107 +890,92 @@ public abstract class JDAS implements DAESolver { | |
//second, consider kLeak of each reaction network so that the validity of each reaction network may be tested | |
//in the original CHEMDIS approach, we included a reaction and pseudospecies for each kleak/P-dep network | |
- //with the FAME approach we still consider each P-dep network as a pseudospecies, but we have multiple reactions contributing to this pseudo-species, with each reaction having different reactants | |
+ //with the FAME approach we still group all the wells from separate networks together in a new construct, edgeLeakID, analogous to edge ID | |
+ //edgeLeakID may include some of the same species as edgeID, as well as some new species | |
+ //the IDs used in edgeID and edgeLeakID will be consecutive; i.e. edgeID will go from 1 to N and edgeFluxID will go from N+1 to N+M | |
edgeSpeciesCounter = edgeID.size();//above functions use getEdgeReactionString, which only uses edgeSpeciesCounter locally; we need to update it for the current context | |
for (Iterator iter1 = PDepNetwork.getNetworks().iterator(); iter1.hasNext();) { | |
PDepNetwork pdn = (PDepNetwork) iter1.next(); | |
- //account for pseudo-edge species product by incrementing the edgeSpeciesCounter and storing the ID in the tempProdArray; each of these ID's will occur once and only once; thus, note that the corresponding PDepNetwork is NOT stored to the HashMap | |
- int prodCount = 1;//prodCount will not be modified as each PDepNetwork will be treated as a pseudo-edge species product | |
- int[] tempProdArray = {0, 0, 0}; | |
- edgeSpeciesCounter++; | |
- tempProdArray[0] = edgeSpeciesCounter;//note that if there are no non-included reactions that have all core reactants for a particular P-dep network, then the ID will be allocated, but not used...hopefully this would not cause problems with the Fortran code | |
double k = 0.0; | |
boolean allCoreReac = false; | |
- // double k = pdn.getKLeak(index);//index in DASSL should correspond to the same (reactionSystem/TPcondition) index as used by kLeak | |
- // if (!pdn.isActive() && pdn.getIsChemAct()) { | |
- // k = pdn.getEntryReaction().calculateTotalRate(p_temperature); | |
- // } | |
- if (pdn.getPathReactions().size() == 1 && pdn.getNetReactions().size() == 0) {//// If there is only one path reaction (and thus only one nonincluded reaction), use the high-pressure limit rate as the flux rather than the k(T,P) value (cf. PDepNetwork.getLeakFlux()) | |
+ if (pdn.getPathReactions().size() == 1 && pdn.getNetReactions().size() == 0) {// If there is only one path reaction and no net reactions (i.e. the network is A + B --> C*), use the high-pressure limit rate as the flux rather than the k(T,P) value (cf. PDepNetwork.getLeakFlux()) | |
PDepReaction rxn = pdn.getPathReactions().get(0); | |
- int reacCount = 0; | |
- int[] tempReacArray = {0, 0, 0}; | |
allCoreReac = false;//allCoreReac will be used to track whether all reactant species are in the core | |
if (!rxn.getProduct().getIncluded()) { | |
- k = rxn.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the reactants, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getReactant().getSpeciesListIterator(); rIter.hasNext();) { | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxn, p_temperature, p_pressure, edgeID.size());//use the forward reaction | |
+ //bw.write("\n" + str); | |
+ } | |
} else { | |
PDepReaction rxnReverse = (PDepReaction) rxn.getReverseReaction(); | |
if (rxnReverse != null) { | |
- k = rxnReverse.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the products, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getProduct().getSpeciesListIterator(); rIter.hasNext();) { | |
- | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
} | |
- } | |
- if (allCoreReac) {//only consider cases where all reactants are in the core | |
- edgeReactionCounter++; | |
- ////update the output string with info for kLeak for one PDepNetwork | |
- //bw.write("\n" + reacCount + " " + prodCount + " " + tempReacArray[0] + " " + tempReacArray[1] + " " + tempReacArray[2] + " " + tempProdArray[0] + " " + tempProdArray[1] + " " + tempProdArray[2] + " " + k); | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxnReverse, p_temperature, p_pressure, edgeID.size());//use the reverse reaction | |
+ //bw.write("\n" + str); | |
+ } | |
} | |
} else { | |
for (ListIterator<PDepReaction> iter = pdn.getNonincludedReactions().listIterator(); iter.hasNext();) {//cf. getLeakFlux in PDepNetwork | |
PDepReaction rxn = iter.next(); | |
- int reacCount = 0; | |
- int[] tempReacArray = {0, 0, 0}; | |
allCoreReac = false;//allCoreReac will be used to track whether all reactant species are in the core | |
if (rxn.getReactant().getIncluded() && !rxn.getProduct().getIncluded()) { | |
- k = rxn.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the reactants, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getReactant().getSpeciesListIterator(); rIter.hasNext();) { | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxn, p_temperature, p_pressure, edgeID.size());//use the forward reaction | |
+ //bw.write("\n" + str); | |
+ } | |
} else if (!rxn.getReactant().getIncluded() && rxn.getProduct().getIncluded()) { | |
PDepReaction rxnReverse = (PDepReaction) rxn.getReverseReaction(); | |
- k = rxnReverse.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the products, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getProduct().getSpeciesListIterator(); rIter.hasNext();) { | |
- | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
- } | |
- if (allCoreReac) {//only consider cases where all reactants are in the core | |
- edgeReactionCounter++; | |
- ////update the output string with info for kLeak for one PDepNetwork | |
- //bw.write("\n" + reacCount + " " + prodCount + " " + tempReacArray[0] + " " + tempReacArray[1] + " " + tempReacArray[2] + " " + tempProdArray[0] + " " + tempProdArray[1] + " " + tempProdArray[2] + " " + k); | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxnReverse, p_temperature, p_pressure, edgeID.size());//use the reverse reaction | |
+ //bw.write("\n" + str); | |
+ } | |
} | |
} | |
} | |
- | |
} | |
} | |
+ edgeSpeciesCounter = edgeID.size() + edgeLeakID.size(); | |
@@ -1000,12 +991,13 @@ public abstract class JDAS implements DAESolver { | |
// First use reactions in unreacted reaction set, which is valid for both RateBasedRME and RateBasedPDepRME | |
edgeID = new HashMap(); | |
+ edgeLeakID = new HashMap(); | |
ur = model.getUnreactedReactionSet(); | |
for (Iterator iur = ur.iterator(); iur.hasNext();) { | |
Reaction r = (Reaction) iur.next(); | |
if (((CoreEdgeReactionModel) model).reactantsInCoreQ(r.getStructure())) { | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, r, p_temperature, p_pressure);//this line is needed even when not writing to file because it will update edgeID | |
+ String str = getEdgeReactionString(model, edgeID, r, p_temperature, p_pressure, 0);//this line is needed even when not writing to file because it will update edgeID | |
bw.write("\n" + str); | |
} | |
@@ -1058,13 +1050,13 @@ public abstract class JDAS implements DAESolver { | |
if (edgeReaction) { | |
if (forwardFlag) { | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure);//use the forward reaction | |
+ String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure, 0);//use the forward reaction | |
bw.write("\n" + str); | |
} else { | |
PDepReaction rxn_r = (PDepReaction) rxn.getReverseReaction(); | |
if (rxn_r != null) {//make sure the reverse is not null | |
edgeReactionCounter++; | |
- String str = getEdgeReactionString(model, edgeID, rxn_r, p_temperature, p_pressure);//use the reverse reaction | |
+ String str = getEdgeReactionString(model, edgeID, rxn_r, p_temperature, p_pressure, 0);//use the reverse reaction | |
bw.write("\n" + str); | |
} | |
} | |
@@ -1072,127 +1064,95 @@ public abstract class JDAS implements DAESolver { | |
} | |
} | |
- //6/19/09 gmagoon: original code below; with new P-dep implementation, it would only take into account forward reactions | |
- //if (rxn.isEdgeReaction(model)) { | |
- // edgeReactionCounter++; | |
- // String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure); | |
- // edgeReacInfoString.append("\n" + str); | |
- //} | |
- //a potentially simpler approach based on the original approach (however, it seems like isEdgeReaction may return false even if there are some core products along with edge products): | |
- // PDepReaction rxnReverse = (PDepReaction)rxn.getReverseReaction(); | |
- // if (rxn.isEdgeReaction(model)) { | |
- // edgeReactionCounter++; | |
- // String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure); | |
- // edgeReacInfoString.append("\n" + str); | |
- // } | |
- // else if (rxnReverse.isEdgeReaction(model)){ | |
- // edgeReactionCounter++; | |
- // String str = getEdgeReactionString(model, edgeID, rxn, p_temperature, p_pressure); | |
- // edgeReacInfoString.append("\n" + str); | |
- // } | |
//second, consider kLeak of each reaction network so that the validity of each reaction network may be tested | |
//in the original CHEMDIS approach, we included a reaction and pseudospecies for each kleak/P-dep network | |
- //with the FAME approach we still consider each P-dep network as a pseudospecies, but we have multiple reactions contributing to this pseudo-species, with each reaction having different reactants | |
+ //with the FAME approach we still group all the wells from separate networks together in a new construct, edgeLeakID, analogous to edge ID | |
+ //edgeLeakID may include some of the same species as edgeID, as well as some new species | |
+ //the IDs used in edgeID and edgeLeakID will be consecutive; i.e. edgeID will go from 1 to N and edgeFluxID will go from N+1 to N+M | |
edgeSpeciesCounter = edgeID.size();//above functions use getEdgeReactionString, which only uses edgeSpeciesCounter locally; we need to update it for the current context | |
for (Iterator iter1 = PDepNetwork.getNetworks().iterator(); iter1.hasNext();) { | |
PDepNetwork pdn = (PDepNetwork) iter1.next(); | |
- //account for pseudo-edge species product by incrementing the edgeSpeciesCounter and storing the ID in the tempProdArray; each of these ID's will occur once and only once; thus, note that the corresponding PDepNetwork is NOT stored to the HashMap | |
- int prodCount = 1;//prodCount will not be modified as each PDepNetwork will be treated as a pseudo-edge species product | |
- int[] tempProdArray = {0, 0, 0}; | |
- edgeSpeciesCounter++; | |
- tempProdArray[0] = edgeSpeciesCounter;//note that if there are no non-included reactions that have all core reactants for a particular P-dep network, then the ID will be allocated, but not used...hopefully this would not cause problems with the Fortran code | |
double k = 0.0; | |
boolean allCoreReac = false; | |
- // double k = pdn.getKLeak(index);//index in DASSL should correspond to the same (reactionSystem/TPcondition) index as used by kLeak | |
- // if (!pdn.isActive() && pdn.getIsChemAct()) { | |
- // k = pdn.getEntryReaction().calculateTotalRate(p_temperature); | |
- // } | |
- if (pdn.getPathReactions().size() == 1 && pdn.getNetReactions().size() == 0) {//// If there is only one path reaction (and thus only one nonincluded reaction), use the high-pressure limit rate as the flux rather than the k(T,P) value (cf. PDepNetwork.getLeakFlux()) | |
+ if (pdn.getPathReactions().size() == 1 && pdn.getNetReactions().size() == 0) {// If there is only one path reaction and no net reactions (i.e. the network is A + B --> C*), use the high-pressure limit rate as the flux rather than the k(T,P) value (cf. PDepNetwork.getLeakFlux()) | |
PDepReaction rxn = pdn.getPathReactions().get(0); | |
- int reacCount = 0; | |
- int[] tempReacArray = {0, 0, 0}; | |
allCoreReac = false;//allCoreReac will be used to track whether all reactant species are in the core | |
if (!rxn.getProduct().getIncluded()) { | |
- k = rxn.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the reactants, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getReactant().getSpeciesListIterator(); rIter.hasNext();) { | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxn, p_temperature, p_pressure, edgeID.size());//use the forward reaction | |
+ bw.write("\n" + str); | |
+ } | |
} else { | |
PDepReaction rxnReverse = (PDepReaction) rxn.getReverseReaction(); | |
if (rxnReverse != null) { | |
- k = rxnReverse.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the products, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getProduct().getSpeciesListIterator(); rIter.hasNext();) { | |
- | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
} | |
- } | |
- if (allCoreReac) {//only consider cases where all reactants are in the core | |
- edgeReactionCounter++; | |
- //update the output string with info for kLeak for one PDepNetwork | |
- bw.write("\n" + reacCount + " " + prodCount + " " + tempReacArray[0] + " " + tempReacArray[1] + " " + tempReacArray[2] + " " + tempProdArray[0] + " " + tempProdArray[1] + " " + tempProdArray[2] + " " + k); | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxnReverse, p_temperature, p_pressure, edgeID.size());//use the reverse reaction | |
+ bw.write("\n" + str); | |
+ } | |
} | |
} else { | |
for (ListIterator<PDepReaction> iter = pdn.getNonincludedReactions().listIterator(); iter.hasNext();) {//cf. getLeakFlux in PDepNetwork | |
PDepReaction rxn = iter.next(); | |
- int reacCount = 0; | |
- int[] tempReacArray = {0, 0, 0}; | |
allCoreReac = false;//allCoreReac will be used to track whether all reactant species are in the core | |
if (rxn.getReactant().getIncluded() && !rxn.getProduct().getIncluded()) { | |
- k = rxn.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the reactants, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getReactant().getSpeciesListIterator(); rIter.hasNext();) { | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxn, p_temperature, p_pressure, edgeID.size());//use the forward reaction | |
+ bw.write("\n" + str); | |
+ } | |
} else if (!rxn.getReactant().getIncluded() && rxn.getProduct().getIncluded()) { | |
PDepReaction rxnReverse = (PDepReaction) rxn.getReverseReaction(); | |
- k = rxnReverse.calculateRate(p_temperature, p_pressure); | |
allCoreReac = true; | |
//iterate over the products, counting and storing IDs in tempReacArray, up to a maximum of 3 reactants | |
for (ListIterator<Species> rIter = rxn.getProduct().getSpeciesListIterator(); rIter.hasNext();) { | |
- | |
- reacCount++; | |
Species spe = (Species) rIter.next(); | |
- if (model.containsAsReactedSpecies(spe)) { | |
- tempReacArray[reacCount - 1] = getRealID(spe); | |
- } else { | |
+ if (!model.containsAsReactedSpecies(spe)) { | |
allCoreReac = false; | |
} | |
} | |
- } | |
- if (allCoreReac) {//only consider cases where all reactants are in the core | |
- edgeReactionCounter++; | |
- //update the output string with info for kLeak for one PDepNetwork | |
- bw.write("\n" + reacCount + " " + prodCount + " " + tempReacArray[0] + " " + tempReacArray[1] + " " + tempReacArray[2] + " " + tempProdArray[0] + " " + tempProdArray[1] + " " + tempProdArray[2] + " " + k); | |
+ if (allCoreReac) {//only consider cases where all reactants are in the core | |
+ edgeReactionCounter++; | |
+ ////update the output string with info for kLeak for one PDepNetwork | |
+ String str = getEdgeReactionString(model, edgeLeakID, rxnReverse, p_temperature, p_pressure, edgeID.size());//use the reverse reaction | |
+ bw.write("\n" + str); | |
+ } | |
} | |
} | |
} | |
} | |
} | |
+ edgeSpeciesCounter = edgeID.size() + edgeLeakID.size();//this line is not needed here, but it is included for consistency with the first pass | |
} catch (IOException e) { | |
System.err.println("Problem writing Solver Input File!"); | |
e.printStackTrace(); | |
diff --git a/source/RMG/jing/rxnSys/JDASPK.java b/source/RMG/jing/rxnSys/JDASPK.java | |
index 3021258..b092fbc 100644 | |
--- a/source/RMG/jing/rxnSys/JDASPK.java | |
+++ b/source/RMG/jing/rxnSys/JDASPK.java | |
@@ -98,7 +98,7 @@ public class JDASPK extends JDAS { | |
} | |
//## operation solve(boolean,ReactionModel,boolean,SystemSnapshot,ReactionTime,ReactionTime,Temperature,Pressure,boolean) | |
- public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged,TerminationTester tt, int p_iterationNum) { | |
+ public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged,TerminationTester tt, int p_iterationNum, LinkedHashSet nonpdep_from_seed) { | |
// set up the input file | |
setupInputFile(); | |
//outputString = new StringBuilder(); | |
@@ -141,7 +141,7 @@ public class JDASPK extends JDAS { | |
//rString is a combination of a integer and a real array | |
//real array format: rate, A, n, Ea, Keq | |
//int array format : nReac, nProd, r1, r2, r3, p1, p2, p3, HASrev(T=1 or F=0) | |
- rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure); | |
+ rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure, nonpdep_from_seed); | |
nParameter = 0; | |
if (parameterInfor != 0) { | |
@@ -426,8 +426,8 @@ public class JDASPK extends JDAS { | |
} | |
//for autoflag cases, there will be additional information which may be used for pruning | |
if (autoflag){ | |
- prunableSpecies = new boolean[edgeID.size()]; | |
- maxEdgeFluxRatio = new double[edgeID.size()]; | |
+ prunableSpecies = new boolean[edgeID.size()+edgeLeakID.size()]; | |
+ maxEdgeFluxRatio = new double[edgeID.size()+edgeLeakID.size()]; | |
line=br.readLine();//read volume; (this is actually in the output even if AUTO is off, but is not used) | |
line=br.readLine();//read the edgeflag | |
Integer edgeflag = Integer.parseInt(line.trim()); | |
@@ -440,10 +440,8 @@ public class JDASPK extends JDAS { | |
line=br.readLine();//read the time integrated to | |
double finalTime = Double.parseDouble(line.trim()); | |
System.out.println("ODE solver integrated to "+ finalTime+" sec."); | |
- // read the "prunability index" (0 or 1) and maximum ratio (edge flux/Rchar) for each edge species; | |
- // note that edgeID only contains species, not P-dep networks, so we will not be reading in all the output from DASSL, | |
- // only the flux ratio to actual edge species (vs. P-dep network pseudospecies) | |
- for (int i=0; i<edgeID.size(); i++){ | |
+ // read the "prunability index" (0 or 1) and maximum ratio (edge flux/Rchar) for each edge species; vector index + 1 corresponds to ID value in edgeID and edgeLeakID | |
+ for (int i=0; i<(edgeID.size()+edgeLeakID.size()); i++){ | |
line = br.readLine().trim(); //read the prunability index | |
int q = Integer.parseInt(line); //q should be 1 or 0 | |
if (q == 1) {prunableSpecies[i]=true;} | |
@@ -469,7 +467,7 @@ public class JDASPK extends JDAS { | |
return 1; | |
} | |
- public LinkedList solveSEN(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged,TerminationTester tt) { | |
+ public LinkedList solveSEN(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged,TerminationTester tt, LinkedHashSet nonpdep_from_seed) { | |
setupInputFile(); | |
// outputString = new StringBuilder(); | |
Iterator spe_iter = p_reactionModel.getSpecies(); | |
@@ -510,7 +508,7 @@ public class JDASPK extends JDAS { | |
//rString is a combination of a integer and a real array | |
//real array format: rate, A, n, Ea, Keq | |
//int array format : nReac, nProd, r1, r2, r3, p1, p2, p3, HASrev(T=1 or F=0) | |
- rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure); | |
+ rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure, nonpdep_from_seed); | |
nParameter = 0; | |
if (parameterInfor != 0) { | |
diff --git a/source/RMG/jing/rxnSys/JDASSL.java b/source/RMG/jing/rxnSys/JDASSL.java | |
index 07197ef..0292c89 100644 | |
--- a/source/RMG/jing/rxnSys/JDASSL.java | |
+++ b/source/RMG/jing/rxnSys/JDASSL.java | |
@@ -101,7 +101,7 @@ public class JDASSL extends JDAS { | |
}*/ | |
//## operation solve(boolean,ReactionModel,boolean,SystemSnapshot,ReactionTime,ReactionTime,Temperature,Pressure,boolean) | |
- public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int p_iterationNum) { | |
+ public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int p_iterationNum, LinkedHashSet nonpdep_from_seed) { | |
// set up the input file | |
setupInputFile(); | |
@@ -158,7 +158,7 @@ public class JDASSL extends JDAS { | |
//rString is a combination of a integer and a real array | |
//real array format: rate, A, n, Ea, Keq | |
//int array format : nReac, nProd, r1, r2, r3, p1, p2, p3, rev(=1 or -1) | |
- rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure); | |
+ rString = generatePDepODEReactionList(p_reactionModel, p_beginStatus, p_temperature, p_pressure,nonpdep_from_seed); | |
initializeWorkSpace(); | |
initializeConcentrations(p_beginStatus, p_reactionModel, p_beginTime, p_endTime, initialSpecies); | |
@@ -387,7 +387,7 @@ public class JDASSL extends JDAS { | |
line = br.readLine(); | |
if (Double.parseDouble(line.trim()) != neq) { | |
- System.out.println("ODESolver didnt generate all species result"); | |
+ System.out.println("ODESolver didnt generate all species results"); | |
System.exit(0); | |
} | |
endTime = Double.parseDouble(br.readLine().trim()); | |
@@ -407,8 +407,8 @@ public class JDASSL extends JDAS { | |
} | |
//for autoflag cases, there will be additional information which may be used for pruning | |
if (autoflag){ | |
- prunableSpecies = new boolean[edgeID.size()]; | |
- maxEdgeFluxRatio = new double[edgeID.size()]; | |
+ prunableSpecies = new boolean[edgeID.size()+edgeLeakID.size()]; | |
+ maxEdgeFluxRatio = new double[edgeID.size()+edgeLeakID.size()]; | |
line=br.readLine();//read volume; (this is actually in the output even if AUTO is off, but is not used) | |
line=br.readLine();//read the edgeflag | |
Integer edgeflag = Integer.parseInt(line.trim()); | |
@@ -416,16 +416,13 @@ public class JDASSL extends JDAS { | |
targetReached = true; | |
} | |
else{ | |
- System.out.println("DEBUG: DASSL Fortran code found that edge entity "+ edgeflag+ " exceeded the model enlargement criterion."); | |
targetReached = false; | |
} | |
line=br.readLine();//read the time integrated to | |
double finalTime = Double.parseDouble(line.trim()); | |
- // read the "prunability index" (0 or 1) and maximum ratio (edge flux/Rchar) for each edge species; | |
- // note that edgeID only contains species, not P-dep networks, so we will not be reading in all the output from DASSL, | |
- // only the flux ratio to actual edge species (vs. P-dep network pseudospecies) | |
+ // read the "prunability index" (0 or 1) and maximum ratio (edge flux/Rchar) for each edge species; vector index + 1 corresponds to ID value in edgeID and edgeLeakID | |
System.out.println("ODE solver integrated to "+ finalTime+" sec."); | |
- for (int i=0; i<edgeID.size(); i++){ | |
+ for (int i=0; i<(edgeID.size()+edgeLeakID.size()); i++){ | |
line = br.readLine().trim(); //read the prunability index | |
int q = Integer.parseInt(line); //q should be 1 or 0 | |
if (q == 1) { prunableSpecies[i] = true; } | |
@@ -474,7 +471,7 @@ public class JDASSL extends JDAS { | |
spe = (Species)iter.next(); | |
if((Integer)(IDTranslator.get(spe))==i+1) break; | |
} | |
- String name = spe.getName(); | |
+ String name = spe.getFullName(); | |
fw.write(name + "\t"); | |
} | |
fw.write("\n"); | |
diff --git a/source/RMG/jing/rxnSys/RateBasedPDepRME.java b/source/RMG/jing/rxnSys/RateBasedPDepRME.java | |
index 5bc631f..4eaca67 100644 | |
--- a/source/RMG/jing/rxnSys/RateBasedPDepRME.java | |
+++ b/source/RMG/jing/rxnSys/RateBasedPDepRME.java | |
@@ -107,14 +107,29 @@ public class RateBasedPDepRME implements ReactionModelEnlarger { | |
CoreEdgeReactionModel cerm = (CoreEdgeReactionModel) rm; | |
- // Iterate over reaction systems, enlarging each individually | |
- LinkedList updateList = new LinkedList(); | |
- for (int i = 0; i < rxnSystemList.size(); i++) { | |
+ // Lists of species to add to the core or to explore in PDepNetworks | |
+ // These lists will be of the same length as rxnSystemList, and will | |
+ // contain null where there is no corresponding species; this is done | |
+ // so that we know which reaction system corresponds with each update | |
+ // (although it doesn't matter very much, since they all share the same | |
+ // model core and edge anyway) | |
+ // They should also not contain duplicates, i.e. each candidate species | |
+ // should only appear in one of the two lists, and only once in that | |
+ // list; since adding to core is a superset of making included, species | |
+ // that would be in both lists are placed in coreUpdateList | |
+ LinkedList coreUpdateList = new LinkedList(); | |
+ LinkedList leakUpdateList = new LinkedList(); | |
+ | |
+ // Iterate over reaction systems, enlarging each individually | |
+ for (int i = 0; i < rxnSystemList.size(); i++) { | |
// Don't need to enlarge if the system is already valid | |
- if ((Boolean) validList.get(i)) | |
- continue; | |
- | |
+ if ((Boolean) validList.get(i)) { | |
+ coreUpdateList.add(null); | |
+ leakUpdateList.add(null); | |
+ continue; | |
+ } | |
+ | |
ReactionSystem rxnSystem = (ReactionSystem) rxnSystemList.get(i); | |
PresentStatus ps = rxnSystem.getPresentStatus(); | |
@@ -138,27 +153,6 @@ public class RateBasedPDepRME implements ReactionModelEnlarger { | |
us.getName() + "(" + us.getID() + "), but there are only " + | |
unreactedSpeciesFlux.length + " fluxes."); | |
} | |
- | |
- // Flux from pDep reactions //gmagoon 61709: ...is already taken into account above (the unreactedSpeciesFlux is also used by the validityTester | |
-// for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
-// PDepNetwork pdn = (PDepNetwork) iter.next(); | |
-// for (Iterator iter2 = pdn.getNetReactions().iterator(); iter2.hasNext(); ) { | |
-// PDepReaction rxn = (PDepReaction) iter2.next(); | |
-// double forwardFlux = rxn.calculateForwardFlux(ps); | |
-// double reverseFlux = rxn.calculateReverseFlux(ps); | |
-// //System.out.println(rxn.toString() + ": " + forwardFlux + " " + reverseFlux); | |
-// for (int j = 0; j < rxn.getReactantNumber(); j++) { | |
-// Species species = (Species) rxn.getReactantList().get(j); | |
-// if (cerm.containsAsUnreactedSpecies(species)) | |
-// flux[species.getID()] += reverseFlux; | |
-// } | |
-// for (int j = 0; j < rxn.getProductNumber(); j++) { | |
-// Species species = (Species) rxn.getProductList().get(j); | |
-// if (cerm.containsAsUnreactedSpecies(species)) | |
-// flux[species.getID()] += forwardFlux; | |
-// } | |
-// } | |
-// } | |
// Determine species with maximum flux and its flux | |
Species maxSpecies = null; | |
@@ -172,215 +166,240 @@ public class RateBasedPDepRME implements ReactionModelEnlarger { | |
} | |
if (maxSpecies == null) throw new NullPointerException(); | |
- // Determine network with maximum leak flux and its flux | |
- PDepNetwork maxNetwork = null; | |
- double maxLeak = 0; | |
- for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
- PDepNetwork pdn = (PDepNetwork) iter.next(); | |
- if (Math.abs(pdn.getLeakFlux(ps)) >= maxLeak) { | |
- maxLeak = Math.abs(pdn.getLeakFlux(ps)); | |
- maxNetwork = pdn; | |
+ // Determine species with maximum leak flux and its flux | |
+ Species maxLeakSpecies = null; | |
+ double maxLeakFlux = 0; | |
+ double[] leakFlux = PDepNetwork.getSpeciesLeakFluxes(ps, cerm); | |
+ for (Iterator iter = cerm.getUnreactedSpeciesSet().iterator(); iter.hasNext(); ) { | |
+ Species us = (Species) iter.next(); | |
+ if (Math.abs(leakFlux[us.getID()]) >= maxLeakFlux) { | |
+ maxLeakFlux = Math.abs(leakFlux[us.getID()]); | |
+ maxLeakSpecies = us; | |
} | |
} | |
- if (maxNetwork == null) throw new NullPointerException(); | |
+ if (maxLeakSpecies == null) throw new NullPointerException(); | |
// Output results of above calculations to console | |
System.out.print("Time: "); | |
System.out.println(ps.getTime()); | |
System.out.println("Rmin: " + String.valueOf(Rmin)); | |
- System.out.println("Unreacted species " + maxSpecies.getName() + " has highest flux: " + String.valueOf(maxFlux)); | |
- System.out.println("Network " + maxNetwork.getID() + " has highest leak flux: " + String.valueOf(maxLeak)); | |
+ System.out.println("Unreacted species " + maxSpecies.getFullName() + " has highest flux: " + String.valueOf(maxFlux)); | |
+ System.out.println("Unreacted species " + maxLeakSpecies.getFullName() + " has highest leak flux: " + String.valueOf(maxLeakFlux)); | |
- //if (maxFlux > Rmin) | |
- if (maxFlux > maxLeak && maxFlux > Rmin) { | |
- if (!updateList.contains(maxSpecies)) | |
- updateList.add(maxSpecies); | |
- else | |
- updateList.add(null); | |
- } | |
- else if (maxLeak > Rmin) { | |
- if (!updateList.contains(maxNetwork)) | |
- updateList.add(maxNetwork); | |
- else | |
- updateList.add(null); | |
+ | |
+ if (maxFlux > maxLeakFlux && maxFlux > Rmin) { | |
+ // Flux is greater than leakFlux, and big enough to matter. | |
+ if (!coreUpdateList.contains(maxSpecies)) | |
+ coreUpdateList.add(maxSpecies); | |
+ else | |
+ coreUpdateList.add(null); | |
+ leakUpdateList.add(null); | |
+ } | |
+ else if (maxLeakFlux > Rmin) { | |
+ // leakFlux is greater than Flux, and big enough to matter. | |
+ if (!leakUpdateList.contains(maxLeakSpecies)) | |
+ leakUpdateList.add(maxLeakSpecies); | |
+ else | |
+ leakUpdateList.add(null); | |
+ coreUpdateList.add(null); | |
+ } | |
+ else { | |
+ // neither leakFlux nor Flux is big enough to matter | |
+ leakUpdateList.add(null); | |
+ coreUpdateList.add(null); | |
} | |
- else | |
- updateList.add(null); | |
+ } | |
- } | |
+ // Check that species don't exist in both coreUpdateList and leakUpdateList | |
+ // If any are in both lists, then remove from leakUpdateList | |
+ for (int i = 0; i < rxnSystemList.size(); i++) { | |
+ if (leakUpdateList.get(i) != null && coreUpdateList.contains(leakUpdateList.get(i))) | |
+ leakUpdateList.set(i, null); | |
+ } | |
- for (int i = 0; i < updateList.size(); i++) { | |
+ // Make sure we're about to do something to the reaction model | |
+ boolean found = false; | |
+ for (int i = 0; i < rxnSystemList.size(); i++) { | |
+ if (coreUpdateList.get(i) != null || leakUpdateList.get(i) != null) | |
+ found = true; | |
+ } | |
+ if (!found) { | |
+ System.out.println("Could not find any species to add to core or leak species to explore. Stopping to avoid infinite loop."); | |
+ System.exit(0); | |
+ } | |
+ | |
+ // Update the reaction model | |
+ for (int i = 0; i < rxnSystemList.size(); i++) { | |
+ // Add species to core | |
+ if (coreUpdateList.get(i) != null) | |
+ addSpeciesToCore((Species) coreUpdateList.get(i), cerm, (ReactionSystem) rxnSystemList.get(i)); | |
+ // Explore species in networks | |
+ else if (leakUpdateList.get(i) != null) | |
+ makeSpeciesIncluded((Species) leakUpdateList.get(i), cerm, (ReactionSystem) rxnSystemList.get(i)); | |
+ } | |
+ } | |
- Object object = updateList.get(i); | |
- ReactionSystem rxnSystem = (ReactionSystem) rxnSystemList.get(i); | |
- PresentStatus ps = rxnSystem.getPresentStatus(); | |
- | |
- if (object == null) | |
- continue; | |
- else if (object instanceof Species) { | |
- | |
- Species maxSpecies = (Species) object; | |
- | |
- // Add a species to the core | |
- System.out.print("\nAdd a new reacted Species: "); | |
- System.out.println(maxSpecies.getChemkinName()); | |
- System.out.println(maxSpecies.toStringWithoutH()); | |
- Temperature temp = new Temperature(715, "K"); | |
- double H = maxSpecies.calculateH(temp); | |
- double S = maxSpecies.calculateS(temp); | |
- double G = maxSpecies.calculateG(temp); | |
- double Cp = maxSpecies.calculateCp(temp); | |
- System.out.println("Thermo of species at 715K (H, S, G, Cp, respectively)\t" + String.valueOf(H) + '\t' + String.valueOf(S) + '\t' + String.valueOf(G) + '\t' + String.valueOf(Cp)); | |
- | |
- if (cerm.containsAsReactedSpecies(maxSpecies)) | |
- System.out.println("Species " + maxSpecies.getName() + "(" + | |
- Integer.toString(maxSpecies.getID()) + | |
- ") is already present in reaction model"); | |
- else { | |
- | |
- // Move the species and appropriate reactions from the edge to the core | |
- cerm.moveFromUnreactedToReactedSpecies(maxSpecies); | |
- cerm.moveFromUnreactedToReactedReaction(); | |
- | |
- // Adding a species to the core automatically makes it | |
- // included in all networks it is contained in | |
- // Therefore we need to merge all networks containing that | |
- // species as a unimolecular isomer together | |
- PDepNetwork network = null; | |
- LinkedList<PDepNetwork> networksToRemove = new LinkedList<PDepNetwork>(); | |
- for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
- PDepNetwork pdn = (PDepNetwork) iter.next(); | |
- if (pdn.contains(maxSpecies)) { | |
- if (network == null) | |
- network = pdn; // first pdn to contain maxSpecies | |
- else { // second or later pdn to contain maxSpecies. merge it with network | |
- for (int j = 0; j < pdn.getIsomers().size(); j++) | |
- network.addIsomer(pdn.getIsomers().get(j)); | |
- for (int j = 0; j < pdn.getPathReactions().size(); j++) | |
- network.addReaction(pdn.getPathReactions().get(j),false); | |
- networksToRemove.add(pdn); | |
- } | |
- } | |
- } | |
- if (network != null) { | |
- network.getIsomer(maxSpecies).setIncluded(true); | |
- try { | |
- network.updateReactionLists(cerm); | |
- } catch (PDepException e) { | |
- e.printStackTrace(); | |
- System.out.println(e.getMessage()); | |
- System.err.println("WARNING: Attempt to update reaction list failed " + | |
- "for the following network:\n" + network.toString()); | |
- System.exit(0); | |
- } | |
- } | |
- | |
- // Generate new reaction set; partition into core and edge | |
- LinkedHashSet newReactionSet_nodup; | |
- if(rxnSystem.getLibraryReactionGenerator().getReactionLibrary() != null){ | |
- | |
- System.out.println("Checking Reaction Library "+rxnSystem.getLibraryReactionGenerator().getReactionLibrary().getName()+" for reactions of "+maxSpecies.getName()+" with the core."); | |
- // At this point the core (cerm.getReactedSpeciesSet()) already contains maxSpecies, so we can just react the entire core. | |
- LinkedHashSet newReactionSet = rxnSystem.getLibraryReactionGenerator().react(cerm.getReactedSpeciesSet()); | |
- //LinkedHashSet newReactionSet = rxnSystem.getLibraryReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All"); | |
- | |
- // Report only those that contain the new species (maxSpecies) | |
- Iterator ReactionIter = newReactionSet.iterator(); | |
- while(ReactionIter.hasNext()){ | |
- Reaction current_reaction = (Reaction)ReactionIter.next(); | |
- if (current_reaction.contains(maxSpecies)) { | |
- System.out.println("Library Reaction: " + current_reaction.toString() ); | |
- } | |
- } | |
- | |
- System.out.println("Generating reactions using reaction family templates."); | |
- // Iterate through the reaction templates | |
- newReactionSet.addAll(rxnSystem.getReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All")); | |
- | |
- // To remove the duplicates that are found in Reaction Library and Reaction Template | |
- // Preference given to Reaction Library over Template Reaction | |
- newReactionSet_nodup = rxnSystem.getLibraryReactionGenerator().RemoveDuplicateReac(newReactionSet); | |
- } | |
- else{ | |
- // When no Reaction Library is present | |
- System.out.println("Generating reactions using reaction family templates."); | |
- newReactionSet_nodup = rxnSystem.getReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All"); | |
- } | |
- // shamel 6/22/2010 Suppressed output , line is only for debugging | |
- // System.out.println("Reaction Set For Pdep PdepRME "+newReactionSet_nodup); | |
- | |
- Iterator rxnIter = newReactionSet_nodup.iterator(); | |
- while (rxnIter.hasNext()){ | |
- Reaction r = (Reaction) rxnIter.next(); | |
- if (r.getReactantNumber() > 1 && r.getProductNumber() > 1) | |
- cerm.addReaction(r); | |
- else { | |
- cerm.categorizeReaction(r.getStructure()); | |
- PDepNetwork.addReactionToNetworks(r); | |
- } | |
- } | |
+ public void addSpeciesToCore(Species maxSpecies, CoreEdgeReactionModel cerm, ReactionSystem rxnSystem) { | |
- } | |
+ // Add a species to the core | |
+ System.out.print("\nAdd a new reacted Species to the core: "); | |
+ System.out.println(maxSpecies.getFullName()); | |
+ System.out.println(maxSpecies.toStringWithoutH()); | |
+ Temperature temp = new Temperature(715, "K"); | |
+ double H = maxSpecies.calculateH(temp); | |
+ double S = maxSpecies.calculateS(temp); | |
+ double G = maxSpecies.calculateG(temp); | |
+ double Cp = maxSpecies.calculateCp(temp); | |
+ System.out.println("Thermo of species at 715K (H, S, G, Cp, respectively)\t" + String.valueOf(H) + '\t' + String.valueOf(S) + '\t' + String.valueOf(G) + '\t' + String.valueOf(Cp)); | |
- } | |
- else if (object instanceof PDepNetwork) { | |
+ if (cerm.containsAsReactedSpecies(maxSpecies)) | |
+ System.out.println("Species " + maxSpecies.getFullName() + | |
+ " is already present in reaction model"); | |
+ else { | |
- PDepNetwork maxNetwork = (PDepNetwork) object; | |
- if ( maxNetwork.getAltered() ) { | |
- System.out.println("\nNetwork " + maxNetwork.getID() + " has been altered already this step, so will not be expanded until next step."); | |
- } | |
- else { | |
- try { | |
- PDepIsomer isomer = maxNetwork.getMaxLeakIsomer(ps); | |
- System.out.println("\nAdd a new included Species: " + isomer.toString() + | |
- " to network " + maxNetwork.getID()); | |
- | |
- // Debug by Mike | |
- System.out.println("Here's the # of networks: " + PDepNetwork.getNetworks().size()); | |
- // Making a species included in one network automatically | |
- // makes it included in all networks it is contained in | |
- // Therefore we need to merge all networks containing that | |
- // species as a unimolecular isomer together | |
- LinkedList<PDepNetwork> networksToRemove = new LinkedList<PDepNetwork>(); | |
- for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
- PDepNetwork pdn = (PDepNetwork) iter.next(); | |
- if (pdn.contains(isomer.getSpecies(0)) && pdn != maxNetwork) { | |
- for (int j = 0; j < pdn.getIsomers().size(); j++) | |
- maxNetwork.addIsomer(pdn.getIsomers().get(j)); | |
- for (int j = 0; j < pdn.getPathReactions().size(); j++) | |
- maxNetwork.addReaction(pdn.getPathReactions().get(j),false); | |
- networksToRemove.add(pdn); | |
- } | |
- } | |
- for (Iterator iter = networksToRemove.iterator(); iter.hasNext(); ) { | |
- PDepNetwork pdn = (PDepNetwork) iter.next(); | |
- PDepNetwork.getNetworks().remove(pdn); | |
- } | |
- | |
- // Make the isomer included | |
- // This will cause any other reactions of the form | |
- // isomer -> products that don't yet exist to be created | |
- maxNetwork.makeIsomerIncluded(isomer); | |
- maxNetwork.updateReactionLists(cerm); | |
- System.out.println("Here's the # of networks: " + PDepNetwork.getNetworks().size()); | |
- } | |
- catch (PDepException e) { | |
- e.printStackTrace(); | |
- System.out.println(e.getMessage()); | |
- System.out.println(maxNetwork.toString()); | |
- System.exit(0); | |
- } | |
- } | |
+ // Move the species and appropriate reactions from the edge to the core | |
+ cerm.moveFromUnreactedToReactedSpecies(maxSpecies); | |
+ cerm.moveFromUnreactedToReactedReaction(); | |
+ | |
+ // Adding a species to the core automatically makes it | |
+ // included in all networks it is contained in | |
+ // Therefore we need to merge all networks containing that | |
+ // species as a unimolecular isomer together | |
+ PDepNetwork network = null; | |
+ LinkedList<PDepNetwork> networksToRemove = new LinkedList<PDepNetwork>(); | |
+ for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
+ PDepNetwork pdn = (PDepNetwork) iter.next(); | |
+ if (pdn.contains(maxSpecies)) { | |
+ if (network == null) | |
+ network = pdn; // first pdn to contain maxSpecies | |
+ else { // second or later pdn to contain maxSpecies. merge it with network | |
+ for (int j = 0; j < pdn.getIsomers().size(); j++) | |
+ network.addIsomer(pdn.getIsomers().get(j)); | |
+ for (int j = 0; j < pdn.getPathReactions().size(); j++) | |
+ network.addReaction(pdn.getPathReactions().get(j),false); | |
+ networksToRemove.add(pdn); | |
+ } | |
+ } | |
+ } | |
+ if (network != null) { | |
+ network.getIsomer(maxSpecies).setIncluded(true); | |
+ try { | |
+ network.updateReactionLists(cerm); | |
+ } catch (PDepException e) { | |
+ e.printStackTrace(); | |
+ System.out.println(e.getMessage()); | |
+ System.err.println("WARNING: Attempt to update reaction list failed " + | |
+ "for the following network:\n" + network.toString()); | |
+ System.exit(0); | |
+ } | |
+ } | |
+ | |
+ // Generate new reaction set; partition into core and edge | |
+ LinkedHashSet newReactionSet_nodup; | |
+ if(rxnSystem.getLibraryReactionGenerator().getReactionLibrary() != null){ | |
+ | |
+ System.out.println("Checking Reaction Library "+rxnSystem.getLibraryReactionGenerator().getReactionLibrary().getName()+" for reactions of "+maxSpecies.getFullName()+" with the core."); | |
+ // At this point the core (cerm.getReactedSpeciesSet()) already contains maxSpecies, so we can just react the entire core. | |
+ LinkedHashSet newReactionSet = rxnSystem.getLibraryReactionGenerator().react(cerm.getReactedSpeciesSet()); | |
+ //LinkedHashSet newReactionSet = rxnSystem.getLibraryReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All"); | |
+ | |
+ // Report only those that contain the new species (maxSpecies) | |
+ Iterator ReactionIter = newReactionSet.iterator(); | |
+ while(ReactionIter.hasNext()){ | |
+ Reaction current_reaction = (Reaction)ReactionIter.next(); | |
+ if (current_reaction.contains(maxSpecies)) { | |
+ System.out.println("Library Reaction: " + current_reaction.toString() ); | |
+ } | |
+ } | |
+ | |
+ System.out.println("Generating reactions using reaction family templates."); | |
+ // Iterate through the reaction templates | |
+ newReactionSet.addAll(rxnSystem.getReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All")); | |
+ | |
+ // To remove the duplicates that are found in Reaction Library and Reaction Template | |
+ // Preference given to Reaction Library over Template Reaction | |
+ newReactionSet_nodup = rxnSystem.getLibraryReactionGenerator().RemoveDuplicateReac(newReactionSet); | |
+ } | |
+ else{ | |
+ // When no Reaction Library is present | |
+ System.out.println("Generating reactions using reaction family templates."); | |
+ newReactionSet_nodup = rxnSystem.getReactionGenerator().react(cerm.getReactedSpeciesSet(),maxSpecies,"All"); | |
+ } | |
+ // shamel 6/22/2010 Suppressed output , line is only for debugging | |
+ // System.out.println("Reaction Set For Pdep PdepRME "+newReactionSet_nodup); | |
+ | |
+ Iterator rxnIter = newReactionSet_nodup.iterator(); | |
+ while (rxnIter.hasNext()){ | |
+ Reaction r = (Reaction) rxnIter.next(); | |
+ if (r.getReactantNumber() > 1 && r.getProductNumber() > 1) | |
+ cerm.addReaction(r); | |
+ else { | |
+ cerm.categorizeReaction(r.getStructure()); | |
+ PDepNetwork.addReactionToNetworks(r); | |
+ } | |
+ } | |
+ | |
+ } | |
+ | |
+ System.out.println(""); | |
+ | |
+ } | |
+ | |
+ public void makeSpeciesIncluded(Species species, CoreEdgeReactionModel cerm, ReactionSystem rxnSystem) { | |
+ | |
+ LinkedList<PDepNetwork> networksToRemove = new LinkedList<PDepNetwork>(); | |
+ | |
+ // Find the networks that this species occurs in as a nonincluded isomer | |
+ // There should be at least one | |
+ for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
+ PDepNetwork network = (PDepNetwork) iter.next(); | |
+ if (network.contains(species)) { | |
+ PDepIsomer isomer = network.getIsomer(species); | |
+ if (isomer.isUnimolecular() && !isomer.getIncluded()) { | |
+ networksToRemove.add(network); | |
+ if (network.getAltered()) { | |
+ System.out.println("\nNetwork " + network.getID() + " has been altered already this step, so will not be expanded until next step."); | |
+ return; | |
+ } | |
+ } else { | |
+ System.out.println("Isomer " + species.toString() + " is in network #" + network.getID() + | |
+ ", but is not unimolecular AND nonIncluded,\n\tso RMG will not remove this network."); | |
+ } | |
} | |
- else | |
- continue; | |
- | |
- System.out.println(""); | |
+ } | |
+ | |
+ // Keep the first identified network; remove the others | |
+ PDepNetwork maxNetwork = networksToRemove.get(0); | |
+ networksToRemove.remove(0); | |
+ | |
+ try { | |
+ | |
+ // Debug by Mike | |
+ System.out.println("Here's the # of networks: " + PDepNetwork.getNetworks().size()); | |
+ // Making a species included in one network automatically | |
+ // makes it included in all networks it is contained in | |
+ // Therefore we need to merge all networks containing that | |
+ // species as a unimolecular isomer together | |
+ for (Iterator iter = networksToRemove.iterator(); iter.hasNext(); ) { | |
+ PDepNetwork pdn = (PDepNetwork) iter.next(); | |
+ PDepNetwork.getNetworks().remove(pdn); | |
+ } | |
+ | |
+ // Make the isomer included | |
+ // This will cause any other reactions of the form | |
+ // isomer -> products that don't yet exist to be created | |
+ maxNetwork.makeIsomerIncluded(maxNetwork.getIsomer(species)); | |
+ maxNetwork.updateReactionLists(cerm); | |
+ System.out.println("Here's the # of networks: " + PDepNetwork.getNetworks().size()); | |
+ } | |
+ catch (PDepException e) { | |
+ e.printStackTrace(); | |
+ System.out.println(e.getMessage()); | |
+ System.out.println(maxNetwork.toString()); | |
+ System.exit(0); | |
} | |
- | |
- } | |
- | |
- | |
+ System.out.println(""); | |
+ } | |
} | |
diff --git a/source/RMG/jing/rxnSys/RateBasedPDepVT.java b/source/RMG/jing/rxnSys/RateBasedPDepVT.java | |
index dfbdd1e..28c8395 100644 | |
--- a/source/RMG/jing/rxnSys/RateBasedPDepVT.java | |
+++ b/source/RMG/jing/rxnSys/RateBasedPDepVT.java | |
@@ -67,14 +67,14 @@ public class RateBasedPDepVT extends RateBasedVT { | |
PresentStatus ps = p_reactionSystem.getPresentStatus(); | |
calculateRmin(ps); | |
- for (Iterator iter = PDepNetwork.getNetworks().iterator(); iter.hasNext(); ) { | |
- PDepNetwork pdn = (PDepNetwork )iter.next(); | |
- if (pdn.getLeakFlux(ps) > Rmin) | |
- { | |
- System.out.println("Exceeded largest permitted flux for convergence (tolerance="+tolerance+"): " + Rmin); | |
+ CoreEdgeReactionModel cerm = (CoreEdgeReactionModel) p_reactionSystem.getReactionModel(); | |
+ double[] leakFlux = PDepNetwork.getSpeciesLeakFluxes(ps, cerm); | |
+ for (Iterator iter = cerm.getUnreactedSpeciesSet().iterator(); iter.hasNext(); ) { | |
+ Species us = (Species) iter.next(); | |
+ if (leakFlux[us.getID()] > Rmin) { | |
+ System.out.println("Leak flux exceeded largest permitted flux for convergence (tolerance="+tolerance+"): " + Rmin); | |
return false; | |
} | |
- | |
} | |
return true; | |
diff --git a/source/RMG/jing/rxnSys/RateBasedRME.java b/source/RMG/jing/rxnSys/RateBasedRME.java | |
index 41d4fe5..d151359 100644 | |
--- a/source/RMG/jing/rxnSys/RateBasedRME.java | |
+++ b/source/RMG/jing/rxnSys/RateBasedRME.java | |
@@ -112,9 +112,8 @@ public class RateBasedRME implements ReactionModelEnlarger { | |
Species newCoreSpecies = (Species) nextList.get(i); | |
if (cerm.containsAsReactedSpecies(newCoreSpecies)) //throw new InvalidNextCandidateSpeciesException(); | |
{ | |
- System.out.println("Species " + newCoreSpecies.getName() + "(" + | |
- Integer.toString(newCoreSpecies.getID()) + | |
- ") is already present in reaction model"); | |
+ System.out.println("Species " + newCoreSpecies.getFullName() + | |
+ " is already present in reaction model"); | |
} else { | |
double findSpeciesTime = (System.currentTimeMillis() - startTime) / 1000 / 60; | |
@@ -123,7 +122,7 @@ public class RateBasedRME implements ReactionModelEnlarger { | |
//Global.diagnosticInfo.append(next.getChemkinName() + "\t" + maxflux + "\t" + ((RateBasedVT) ((ReactionSystem) p_reactionSystemList.get(i)).finishController.validityTester).Rmin + "\t" + findSpeciesTime + "\t"); | |
System.out.print("\nAdd a new reacted Species:"); | |
- System.out.println(newCoreSpecies.getName()); | |
+ System.out.println(newCoreSpecies.getFullName()); | |
Temperature temp = new Temperature(298, "K"); | |
double H = newCoreSpecies.calculateH(temp); | |
double S = newCoreSpecies.calculateS(temp); | |
@@ -151,7 +150,7 @@ public class RateBasedRME implements ReactionModelEnlarger { | |
ReactionSystem rxnSystem = (ReactionSystem) p_reactionSystemList.get(i); | |
// Check Reaction Library | |
if(rxnSystem.getLibraryReactionGenerator().getReactionLibrary() != null){ | |
- System.out.println("Checking Reaction Library "+rxnSystem.getLibraryReactionGenerator().getReactionLibrary().getName()+" for reactions of "+newCoreSpecies.getName()+" with the core."); | |
+ System.out.println("Checking Reaction Library "+rxnSystem.getLibraryReactionGenerator().getReactionLibrary().getName()+" for reactions of "+newCoreSpecies.getFullName()+" with the core."); | |
// At this point the core (cerm.getReactedSpeciesSet()) already contains newCoreSpecies, so we can just react the entire core. | |
LinkedHashSet newReactionSet = rxnSystem.getLibraryReactionGenerator().react(cerm.getReactedSpeciesSet()); | |
@@ -301,9 +300,9 @@ public class RateBasedRME implements ReactionModelEnlarger { | |
if (conc<0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
flux *= conc; | |
} | |
@@ -324,7 +323,7 @@ public class RateBasedRME implements ReactionModelEnlarger { | |
System.out.print("Time: "); | |
System.out.println(p_presentStatus.getTime()); | |
- System.out.println("Unreacted species " + maxSpecies.getName() + " has highest flux: " + String.valueOf(maxFlux)); | |
+ System.out.println("Unreacted species " + maxSpecies.getFullName() + " has highest flux: " + String.valueOf(maxFlux)); | |
System.out.println("The total number of unreacted reactions with this species is "+reactionWithSpecies+". Significant ones are:"); | |
Iterator reactionIter = significantReactions.keySet().iterator(); | |
while (reactionIter.hasNext()){ | |
diff --git a/source/RMG/jing/rxnSys/ReactionModelGenerator.java b/source/RMG/jing/rxnSys/ReactionModelGenerator.java | |
index 4329dab..03e62b0 100644 | |
--- a/source/RMG/jing/rxnSys/ReactionModelGenerator.java | |
+++ b/source/RMG/jing/rxnSys/ReactionModelGenerator.java | |
@@ -133,6 +133,7 @@ public class ReactionModelGenerator { | |
protected static int maxEdgeSpeciesAfterPruning; | |
public int limitingReactantID = 1; | |
+ public int numberOfEquivalenceRatios = 0; | |
//## operation ReactionModelGenerator() | |
public ReactionModelGenerator() { | |
@@ -740,8 +741,8 @@ public class ReactionModelGenerator { | |
while (st.hasMoreTokens()) { | |
String name = st.nextToken(); | |
Species spe = (Species)speciesSet.get(name); | |
+ if (spe == null) throw new InvalidConversionException("Unknown reactant in 'Goal Conversion' field of input file : " + name); | |
setLimitingReactantID(spe.getID()); | |
- if (spe == null) throw new InvalidConversionException("Unknown reactant: " + name); | |
String conv = st.nextToken(); | |
double conversion; | |
try { | |
@@ -1399,8 +1400,9 @@ public class ReactionModelGenerator { | |
ReactionSystem rs = (ReactionSystem)reactionSystemList.get(i); | |
ReactionTime begin = (ReactionTime)beginList.get(i); | |
ReactionTime end = (ReactionTime)endList.get(i); | |
- endList.set(i,rs.solveReactionSystem(begin, end, true, true, true, iterationNumber-1)); | |
- Chemkin.writeChemkinInputFile(rs); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ endList.set(i,rs.solveReactionSystem(begin, end, true, true, true, iterationNumber-1,seedmechnonpdeprxns)); | |
+ Chemkin.writeChemkinInputFile(rs, seedmechnonpdeprxns); | |
boolean terminated = rs.isReactionTerminated(); | |
terminatedList.add(terminated); | |
if(!terminated) | |
@@ -1530,7 +1532,8 @@ public class ReactionModelGenerator { | |
boolean conditionChanged = (Boolean)conditionChangedList.get(i); | |
ReactionTime begin = (ReactionTime)beginList.get(i); | |
ReactionTime end = (ReactionTime)endList.get(i); | |
- endList.set(i,rs.solveReactionSystem(begin, end, false, reactionChanged, conditionChanged, iterationNumber-1)); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ endList.set(i,rs.solveReactionSystem(begin, end, false, reactionChanged, conditionChanged, iterationNumber-1,seedmechnonpdeprxns)); | |
//end = reactionSystem.solveReactionSystem(begin, end, false, reactionChanged, conditionChanged, iterationNumber-1); | |
} | |
solverMin = solverMin + (System.currentTimeMillis()-startTime)/1000/60; | |
@@ -1540,7 +1543,8 @@ public class ReactionModelGenerator { | |
// we over-write the chemkin file each time, so only the LAST reaction system is saved | |
// i.e. if you are using RATE for pdep, only the LAST pressure is used. | |
ReactionSystem rs = (ReactionSystem)reactionSystemList.get(i); | |
- Chemkin.writeChemkinInputFile(rs); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ Chemkin.writeChemkinInputFile(rs,seedmechnonpdeprxns); | |
} | |
//9/1/09 gmagoon: if we are using QM, output a file with the CHEMKIN name, the RMG name, the (modified) InChI, and the (modified) InChIKey | |
if (ChemGraph.useQM){ | |
@@ -1579,15 +1583,16 @@ public class ReactionModelGenerator { | |
System.out.println("At this time: " + ((ReactionTime)endList.get(i)).toString()); | |
Species spe = SpeciesDictionary.getSpeciesFromID(getLimitingReactantID()); | |
double conv = rs.getPresentConversion(spe); | |
- System.out.print("Conversion of " + spe.getName() + " is:"); | |
+ System.out.print("Conversion of " + spe.getFullName() + " is:"); | |
System.out.println(conv); | |
} | |
System.out.println("Running Time is: " + String.valueOf((System.currentTimeMillis()-tAtInitialization)/1000/60) + " minutes."); | |
printModelSize(); | |
- | |
+ printMemoryUsed(); | |
+ | |
startTime = System.currentTimeMillis(); | |
- double mU = memoryUsed(); | |
+ double mU = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); | |
double gc = (System.currentTimeMillis()-startTime)/1000/60; | |
startTime = System.currentTimeMillis(); | |
@@ -1660,7 +1665,8 @@ public class ReactionModelGenerator { | |
boolean conditionChanged = (Boolean)conditionChangedList.get(i); | |
ReactionTime begin = (ReactionTime)beginList.get(i); | |
ReactionTime end = (ReactionTime)endList.get(i); | |
- endList.set(i,rs.solveReactionSystem(begin, end, false, reactionChanged, false, iterationNumber-1)); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ endList.set(i,rs.solveReactionSystem(begin, end, false, reactionChanged, false, iterationNumber-1,seedmechnonpdeprxns)); | |
// end = reactionSystem.solveReactionSystem(begin, end, false, reactionChanged, false, iterationNumber-1); | |
} | |
solverMin = solverMin + (System.currentTimeMillis()-startTime)/1000/60; | |
@@ -1720,7 +1726,7 @@ public class ReactionModelGenerator { | |
System.out.println("At this reaction time: " + ((ReactionTime)endList.get(i)).toString()); | |
Species spe = SpeciesDictionary.getSpeciesFromID(getLimitingReactantID()); | |
double conv = rs.getPresentConversion(spe); | |
- System.out.print("Conversion of " + spe.getName() + " is:"); | |
+ System.out.print("Conversion of " + spe.getFullName() + " is:"); | |
System.out.println(conv); | |
} | |
//System.out.println("At this time: " + end.toString()); | |
@@ -1729,21 +1735,8 @@ public class ReactionModelGenerator { | |
//System.out.print("current conversion = "); | |
//System.out.println(conv); | |
- Runtime runTime = Runtime.getRuntime(); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
+ printMemoryUsed(); | |
- //runTime.gc(); | |
- /* if we're not calling runTime.gc() then don't bother printing this: | |
- System.out.println("After garbage collection:"); | |
- System.out.print("Memory used: "); | |
- System.out.println(runTime.totalMemory()); | |
- System.out.print("Free memory: "); | |
- System.out.println(runTime.freeMemory()); | |
- */ | |
- | |
printModelSize(); | |
} | |
@@ -1785,7 +1778,8 @@ public class ReactionModelGenerator { | |
//terminated = false; | |
ReactionTime begin = (ReactionTime)beginList.get(i); | |
ReactionTime end = (ReactionTime)endList.get(i); | |
- rs.solveReactionSystemwithSEN(begin, end, true, false, false); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ rs.solveReactionSystemwithSEN(begin, end, true, false, false, seedmechnonpdeprxns); | |
//reactionSystem.solveReactionSystemwithSEN(begin, end, true, false, false); | |
} | |
@@ -1794,7 +1788,8 @@ public class ReactionModelGenerator { | |
// All of the reaction systems are the same, so just write the chemkin | |
// file for the first reaction system | |
ReactionSystem rs = (ReactionSystem)reactionSystemList.get(0); | |
- Chemkin.writeChemkinInputFile(getReactionModel(),rs.getPresentStatus()); | |
+ LinkedHashSet seedmechnonpdeprxns = extractSeedMechRxnsIfTheyExist(); | |
+ Chemkin.writeChemkinInputFile(getReactionModel(),rs.getPresentStatus(),seedmechnonpdeprxns); | |
//9/1/09 gmagoon: if we are using QM, output a file with the CHEMKIN name, the RMG name, the (modified) InChI, and the (modified) InChIKey | |
if (ChemGraph.useQM){ | |
@@ -2187,7 +2182,7 @@ public class ReactionModelGenerator { | |
System.gc(); | |
} | |
- public static long memoryUsed(){ | |
+ public static void printMemoryUsed(){ | |
garbageCollect(); | |
Runtime rT = Runtime.getRuntime(); | |
long uM, tM, fM; | |
@@ -2196,11 +2191,9 @@ public class ReactionModelGenerator { | |
uM = tM - fM; | |
System.out.println("After garbage collection:"); | |
System.out.print("Memory used: "); | |
- System.out.println(tM); | |
+ System.out.println(uM); | |
System.out.print("Free memory: "); | |
System.out.println(fM); | |
- | |
- return uM; | |
} | |
private HashSet readIncludeSpecies(String fileName) { | |
@@ -2565,7 +2558,7 @@ public class ReactionModelGenerator { | |
bw = new BufferedWriter(new FileWriter("Restart/edgeSpecies.txt")); | |
for(Iterator iter=((CoreEdgeReactionModel)getReactionModel()).getUnreactedSpeciesSet().iterator();iter.hasNext();){ | |
Species species = (Species) iter.next(); | |
- bw.write(species.getName()+"("+species.getID()+")"); | |
+ bw.write(species.getFullName()); | |
bw.newLine(); | |
int dummyInt = 0; | |
bw.write(species.getChemGraph().toString(dummyInt)); | |
@@ -2651,7 +2644,7 @@ public class ReactionModelGenerator { | |
bw = new BufferedWriter(new FileWriter("Restart/coreSpecies.txt")); | |
for(Iterator iter=getReactionModel().getSpecies();iter.hasNext();){ | |
Species species = (Species) iter.next(); | |
- bw.write(species.getName()+"("+species.getID()+")"); | |
+ bw.write(species.getFullName()); | |
bw.newLine(); | |
int dummyInt = 0; | |
bw.write(species.getChemGraph().toString(dummyInt)); | |
@@ -2837,12 +2830,10 @@ public class ReactionModelGenerator { | |
LinkedList allNets = PDepNetwork.getNetworks(); | |
- int netCounter = 0; | |
for(Iterator iter=allNets.iterator(); iter.hasNext();){ | |
PDepNetwork pdepnet = (PDepNetwork) iter.next(); | |
- ++netCounter; | |
- bw.write("PDepNetwork #" + netCounter); | |
+ bw.write("PDepNetwork #" + pdepnet.getID()); | |
bw.newLine(); | |
// Write netReactionList | |
@@ -4026,9 +4017,9 @@ public class ReactionModelGenerator { | |
(((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber()+reactionModel.getSpeciesNumber())>= minSpeciesForPruning){ | |
int numberToBePruned = ((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber() - maxEdgeSpeciesAfterPruning; | |
- System.out.println("PDep Pruning DEBUG:\nThe number of species in the model's edge, before pruning: " + ((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber()); | |
- System.out.println("PDep Pruning DEBUG:\nRMG thinks the following number of species" + | |
- " needs to be pruned: " + numberToBePruned); | |
+ //System.out.println("PDep Pruning DEBUG:\nThe number of species in the model's edge, before pruning: " + ((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber()); | |
+ //System.out.println("PDep Pruning DEBUG:\nRMG thinks the following number of species" + | |
+ // " needs to be pruned: " + numberToBePruned); | |
Iterator iter = JDAS.edgeID.keySet().iterator();//determine the maximum edge flux ratio for each edge species | |
while(iter.hasNext()){ | |
Species spe = (Species)iter.next(); | |
@@ -4046,10 +4037,51 @@ public class ReactionModelGenerator { | |
prunableSpeciesMap.put(spe, maxmaxRatio); | |
} | |
} | |
+ //repeat with the edgeLeakID; if a species appears in both lists, it will be prunable only if it is prunable in both cases, and the sum of maximum edgeFlux + maximum edgeLeakFlux (for each reaction system) will be considered; this will be a conservative overestimate of maximum (edgeFlux+edgeLeakFlux) | |
+ iter = JDAS.edgeLeakID.keySet().iterator(); | |
+ while(iter.hasNext()){ | |
+ Species spe = (Species)iter.next(); | |
+ Integer id = (Integer)JDAS.edgeLeakID.get(spe); | |
+ //check whether the same species is in edgeID | |
+ if(JDAS.edgeID.containsKey(spe)){//the species exists in edgeID | |
+ if(prunableSpeciesMap.containsKey(spe)){//the species was determined to be "prunable" based on edgeID | |
+ Integer idEdge=(Integer)JDAS.edgeID.get(spe); | |
+ double maxmaxRatio = ds0.maxEdgeFluxRatio[id-1]+ds0.maxEdgeFluxRatio[idEdge-1]; | |
+ boolean prunable = ds0.prunableSpecies[id-1]; | |
+ //go through the rest of the reaction systems to see if there are higher max flux ratios | |
+ for (Integer i = 1; i < reactionSystemList.size(); i++) { | |
+ JDAS ds = (JDAS)((ReactionSystem) reactionSystemList.get(i)).getDynamicSimulator(); | |
+ if(ds.maxEdgeFluxRatio[id-1]+ds.maxEdgeFluxRatio[idEdge-1] > maxmaxRatio) maxmaxRatio = ds.maxEdgeFluxRatio[id-1]+ds.maxEdgeFluxRatio[idEdge-1]; | |
+ if(!ds.prunableSpecies[id-1]) prunable = false;// probably redundant: if the conc. is zero in one system, it should be zero in all systems, but it is included for completeness | |
+ } | |
+ if( prunable){//if the species is "prunable" (i.e. it doesn't have any reactions producing it with zero flux), replace with the newly determined maxmaxRatio | |
+ prunableSpeciesMap.remove(spe); | |
+ prunableSpeciesMap.put(spe, maxmaxRatio); | |
+ } | |
+ else{//otherwise, the species is not prunable in both edgeID and edgeLeakID and should be removed from the prunable species map | |
+ prunableSpeciesMap.remove(spe); | |
+ } | |
+ } | |
+ } | |
+ else{//the species is new | |
+ double maxmaxRatio = ds0.maxEdgeFluxRatio[id-1]; | |
+ boolean prunable = ds0.prunableSpecies[id-1]; | |
+ //go through the rest of the reaction systems to see if there are higher max flux ratios | |
+ for (Integer i = 1; i < reactionSystemList.size(); i++) { | |
+ JDAS ds = (JDAS)((ReactionSystem) reactionSystemList.get(i)).getDynamicSimulator(); | |
+ if(ds.maxEdgeFluxRatio[id-1] > maxmaxRatio) maxmaxRatio = ds.maxEdgeFluxRatio[id-1]; | |
+ if(!ds.prunableSpecies[id-1]) prunable = false;// probably redundant: if the conc. is zero in one system, it should be zero in all systems, but it is included for completeness | |
+ } | |
+ //if the species is "prunable" (i.e. it doesn't have any reactions producing it with zero flux), add it to the prunableSpeciesMap | |
+ if( prunable){ | |
+ prunableSpeciesMap.put(spe, maxmaxRatio); | |
+ } | |
+ } | |
+ } | |
// at this point prunableSpeciesMap includes ALL prunable species, no matter how large their flux | |
- System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
- " as prunable, before checking against explored (included) species: " + prunableSpeciesMap.size()); | |
+ //System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
+ // " as prunable, before checking against explored (included) species: " + prunableSpeciesMap.size()); | |
// Pressure dependence only: Species that are included in any | |
// PDepNetwork are not eligible for pruning, so they must be removed | |
@@ -4066,8 +4098,8 @@ public class ReactionModelGenerator { | |
} | |
} | |
- System.out.println("PDep Pruning DEBUG:\nRMG now reduced the number of prunable species," + | |
- " after checking against explored (included) species, to: " + prunableSpeciesMap.size()); | |
+ //System.out.println("PDep Pruning DEBUG:\nRMG now reduced the number of prunable species," + | |
+ // " after checking against explored (included) species, to: " + prunableSpeciesMap.size()); | |
// sort the prunableSpecies by maxmaxRatio | |
// i.e. sort the map by values | |
@@ -4099,10 +4131,10 @@ public class ReactionModelGenerator { | |
else break; // no more to be pruned | |
} | |
- System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
- " to be pruned due to max flux ratio lower than threshold: " + belowThreshold); | |
- System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
- " to be pruned due to low max flux ratio : " + lowMaxFlux); | |
+ //System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
+ // " to be pruned due to max flux ratio lower than threshold: " + belowThreshold); | |
+ //System.out.println("PDep Pruning DEBUG:\nRMG has marked the following number of species" + | |
+ // " to be pruned due to low max flux ratio : " + lowMaxFlux); | |
//now, speciesToPrune has been filled with species that should be pruned from the edge | |
System.out.println("Pruning..."); | |
@@ -4286,7 +4318,7 @@ public class ReactionModelGenerator { | |
} | |
} | |
} | |
- System.out.println("PDep Pruning DEBUG:\nThe number of species in the model's edge, after pruning: " + ((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber()); | |
+ //System.out.println("PDep Pruning DEBUG:\nThe number of species in the model's edge, after pruning: " + ((CoreEdgeReactionModel)reactionModel).getEdge().getSpeciesNumber()); | |
return; | |
} | |
@@ -4890,6 +4922,7 @@ public class ReactionModelGenerator { | |
} | |
//System.out.println(name); | |
Species species = Species.make(name,cg); | |
+ int numConcentrations = 0; // The number of concentrations read-in for each species | |
// The remaining tokens are either: | |
// The desired concentrations | |
@@ -4923,14 +4956,26 @@ public class ReactionModelGenerator { | |
else if (!unit.equals("mole/cm3") && !unit.equals("mol/cm3")) { | |
throw new InvalidUnitException("Species Concentration in condition.txt!"); | |
} | |
+ SpeciesStatus ss = new SpeciesStatus(species,1,concentration,0.0); | |
+ speciesStatus.put(numSpeciesStatus, ss); | |
+ ++numSpeciesStatus; | |
+ ++numConcentrations; | |
} | |
} | |
+ // Check if the number of concentrations read in is consistent with all previous | |
+ // concentration counts. The first time this function is called, the variable | |
+ // numberOfEquivalenceRatios will be initialized. | |
+ boolean goodToGo = areTheNumberOfConcentrationsConsistent(numConcentrations); | |
+ if (!goodToGo) { | |
+ System.out.println("\n\nThe number of concentrations (" + numConcentrations + ") supplied for species " + species.getName() + | |
+ "\nis not consistent with the number of concentrations (" + numberOfEquivalenceRatios + ") " + | |
+ "supplied for all previously read-in species \n\n" + | |
+ "Terminating RMG simulation."); | |
+ System.exit(0); | |
+ } | |
// Make a SpeciesStatus and store it in the LinkedHashMap | |
// double flux = 0; | |
-// int species_type = 1; // reacted species | |
- SpeciesStatus ss = new SpeciesStatus(species,1,concentration,0.0); | |
- speciesStatus.put(numSpeciesStatus, ss); | |
- ++numSpeciesStatus; | |
+// int species_type = 1; // reacted species | |
species.setReactivity(IsReactive); // GJB | |
species.setConstantConcentration(IsConstantConcentration); | |
@@ -4977,6 +5022,7 @@ public class ReactionModelGenerator { | |
// The remaining tokens are concentrations | |
double inertConc = 0.0; | |
int counter = 0; | |
+ int numberOfConcentrations = 0; | |
while (st.hasMoreTokens()) { | |
String conc = st.nextToken(); | |
inertConc = Double.parseDouble(conc); | |
@@ -5006,6 +5052,19 @@ public class ReactionModelGenerator { | |
((InitialStatus)initialStatusList.get(isIndex)).putInertGas(name,inertConc); | |
} | |
++counter; | |
+ ++numberOfConcentrations; | |
+ } | |
+ | |
+ // Check if the number of concentrations read in is consistent with all previous | |
+ // concentration counts. The first time this function is called, the variable | |
+ // numberOfEquivalenceRatios will be initialized. | |
+ boolean goodToGo = areTheNumberOfConcentrationsConsistent(numberOfConcentrations); | |
+ if (!goodToGo) { | |
+ System.out.println("\n\nThe number of concentrations (" + numberOfConcentrations + ") supplied for species " + name + | |
+ "\nis not consistent with the number of concentrations (" + numberOfEquivalenceRatios + ") " + | |
+ "supplied for all previously read-in species \n\n" + | |
+ "Terminating RMG simulation."); | |
+ System.exit(0); | |
} | |
line = ChemParser.readMeaningfulLine(reader, true); | |
@@ -5225,6 +5284,21 @@ public class ReactionModelGenerator { | |
System.out.println("The model edge has " + Integer.toString(numberOfEdgeReactions) + " reactions and "+ Integer.toString(numberOfEdgeSpecies) + " species."); | |
} | |
+ | |
+ public boolean areTheNumberOfConcentrationsConsistent(int number) { | |
+ if (numberOfEquivalenceRatios == 0) numberOfEquivalenceRatios = number; | |
+ else { | |
+ if (number == numberOfEquivalenceRatios) return true; | |
+ else return false; | |
+ } | |
+ return true; | |
+ } | |
+ | |
+ public LinkedHashSet extractSeedMechRxnsIfTheyExist() { | |
+ LinkedHashSet seedmechnonpdeprxns = new LinkedHashSet(); | |
+ if (seedMechanism != null) seedmechnonpdeprxns = seedMechanism.getReactionSet(); | |
+ return seedmechnonpdeprxns; | |
+ } | |
} | |
/********************************************************************* | |
File Path : RMG\RMG\jing\rxnSys\ReactionModelGenerator.java | |
diff --git a/source/RMG/jing/rxnSys/ReactionSystem.java b/source/RMG/jing/rxnSys/ReactionSystem.java | |
index 82d14f9..b2a22ea 100644 | |
--- a/source/RMG/jing/rxnSys/ReactionSystem.java | |
+++ b/source/RMG/jing/rxnSys/ReactionSystem.java | |
@@ -244,7 +244,7 @@ public class ReactionSystem { | |
// if (p_systemSnapshot.getSpeciesStatus(spe) != null) | |
// conc = (p_systemSnapshot.getSpeciesStatus(spe)).getConcentration(); | |
// if (conc<0) | |
-// throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+// throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
// flux *= conc; | |
// | |
// } | |
@@ -281,9 +281,9 @@ public class ReactionSystem { | |
if (conc<0) { | |
double aTol = ReactionModelGenerator.getAtol(); | |
//if (Math.abs(conc) < aTol) conc = 0; | |
- //else throw new NegativeConcentrationException(spe.getName() + ": " + String.valueOf(conc)); | |
+ //else throw new NegativeConcentrationException(spe.getFullName() + ": " + String.valueOf(conc)); | |
if (conc < -100.0 * aTol) | |
- throw new NegativeConcentrationException("Species " + spe.getName() + " has negative concentration: " + String.valueOf(conc)); | |
+ throw new NegativeConcentrationException("Species " + spe.getFullName() + " has negative concentration: " + String.valueOf(conc)); | |
} | |
flux *= conc; | |
@@ -392,7 +392,7 @@ public class ReactionSystem { | |
} | |
} | |
- System.out.println("The main pathway to generate " + p_species.getName() + " is "); | |
+ System.out.println("The main pathway to generate " + p_species.getFullName() + " is "); | |
System.out.println(maxReaction); | |
System.out.println("The max flux is " + String.valueOf(maxFlux)); | |
@@ -584,7 +584,7 @@ public class ReactionSystem { | |
double maxFlux = 0; | |
Reaction maxReaction = null; | |
- System.out.println("the consumption paths for " + p_species.getName()); | |
+ System.out.println("the consumption paths for " + p_species.getFullName()); | |
for (Iterator iter = p_reactionList.iterator(); iter.hasNext(); ) { | |
Reaction rxn = (Reaction)iter.next(); | |
if (rxn.containsAsReactant(p_species)) { | |
@@ -614,7 +614,7 @@ public class ReactionSystem { | |
} | |
} | |
- System.out.println("the formationtion paths for " + p_species.getName()); | |
+ System.out.println("the formationtion paths for " + p_species.getFullName()); | |
for (Iterator iter = p_reactionList.iterator(); iter.hasNext(); ) { | |
Reaction rxn = (Reaction)iter.next(); | |
if (rxn.containsAsProduct(p_species)) { | |
@@ -690,7 +690,7 @@ public class ReactionSystem { | |
for (Iterator iter = speSet.iterator(); iter.hasNext(); ) { | |
Species spe = (Species)iter.next(); | |
- System.out.println(spe.getName()+"("+String.valueOf(spe.getID())+"): " + spe.getThermoData().toString()); | |
+ System.out.println(spe.getFullName()+": " + spe.getThermoData().toString()); | |
} | |
@@ -1478,7 +1478,7 @@ public String printLowerBoundConcentrations(LinkedList p_speciesList) { | |
//## operation solveReactionSystem(ReactionTime,ReactionTime,boolean,boolean,boolean) | |
//9/24/07 gmagoon: added p_reactionModel as parameter; subsequently removed | |
- public ReactionTime solveReactionSystem(ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_initialization, boolean p_reactionChanged, boolean p_conditionChanged, int iterationNum) { | |
+ public ReactionTime solveReactionSystem(ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_initialization, boolean p_reactionChanged, boolean p_conditionChanged, int iterationNum, LinkedHashSet nonpdep_from_seed) { | |
//#[ operation solveReactionSystem(ReactionTime,ReactionTime,boolean,boolean,boolean) | |
Temperature t = getTemperatureModel().getTemperature(p_beginTime); | |
@@ -1497,7 +1497,7 @@ public String printLowerBoundConcentrations(LinkedList p_speciesList) { | |
if (!beginStatus.getTime().equals(p_beginTime)) throw new InvalidBeginStatusException(); | |
System.out.println("Solving reaction system..."); | |
- SystemSnapshot present = getDynamicSimulator().solve(p_initialization, getReactionModel(), p_reactionChanged, beginStatus, p_beginTime, p_endTime,t,p, p_conditionChanged, finishController.terminationTester, iterationNum); | |
+ SystemSnapshot present = getDynamicSimulator().solve(p_initialization, getReactionModel(), p_reactionChanged, beginStatus, p_beginTime, p_endTime,t,p, p_conditionChanged, finishController.terminationTester, iterationNum, nonpdep_from_seed); | |
appendUnreactedSpeciesStatus(present, t); | |
@@ -1506,7 +1506,7 @@ public String printLowerBoundConcentrations(LinkedList p_speciesList) { | |
//#] | |
} | |
- public void solveReactionSystemwithSEN(ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_initialization, boolean p_reactionChanged, boolean p_conditionChanged) { | |
+ public void solveReactionSystemwithSEN(ReactionTime p_beginTime, ReactionTime p_endTime, boolean p_initialization, boolean p_reactionChanged, boolean p_conditionChanged, LinkedHashSet nonpdep_from_seed) { | |
Temperature t = getTemperatureModel().getTemperature(p_beginTime); | |
Pressure p = getPressureModel().getPressure(p_beginTime); | |
@@ -1523,7 +1523,7 @@ public String printLowerBoundConcentrations(LinkedList p_speciesList) { | |
if (!beginStatus.getTime().equals(p_beginTime)) throw new InvalidBeginStatusException(); | |
System.out.println("Solving reaction system..."); | |
- LinkedList sS = ((JDASPK)getDynamicSimulator()).solveSEN(p_initialization, getReactionModel(), p_reactionChanged, beginStatus, p_beginTime, p_endTime,t,p, p_conditionChanged, finishController.terminationTester); | |
+ LinkedList sS = ((JDASPK)getDynamicSimulator()).solveSEN(p_initialization, getReactionModel(), p_reactionChanged, beginStatus, p_beginTime, p_endTime,t,p, p_conditionChanged, finishController.terminationTester, nonpdep_from_seed); | |
for (int i=0; i< sS.size(); i++){ | |
systemSnapshot.add(sS.get(i)); | |
diff --git a/source/RMG/jing/rxnSys/SeedMechanism.java b/source/RMG/jing/rxnSys/SeedMechanism.java | |
index 713314d..a9db16d 100644 | |
--- a/source/RMG/jing/rxnSys/SeedMechanism.java | |
+++ b/source/RMG/jing/rxnSys/SeedMechanism.java | |
@@ -285,139 +285,139 @@ public class SeedMechanism { | |
if (nextLine == null) { | |
continueToReadRxn = false; | |
} else if (nextLine.toLowerCase().contains("troe")) { | |
- // read in troe parameters | |
- StringTokenizer st = new StringTokenizer(nextLine, "/"); | |
- String temp = st.nextToken().trim(); // TROE | |
- String troeString = st.nextToken().trim(); // List of troe parameters | |
- st = new StringTokenizer(troeString); | |
- int n = st.countTokens(); | |
- if (n != 3 && n != 4) throw new InvalidKineticsFormatException("Troe parameter number = "+n + " for reaction: " + r.toString()); | |
- | |
- a = Double.parseDouble(st.nextToken().trim()); | |
- T3star = Double.parseDouble(st.nextToken().trim()); | |
- Tstar = Double.parseDouble(st.nextToken().trim()); | |
+ // read in troe parameters | |
+ StringTokenizer st = new StringTokenizer(nextLine, "/"); | |
+ String temp = st.nextToken().trim(); // TROE | |
+ String troeString = st.nextToken().trim(); // List of troe parameters | |
+ st = new StringTokenizer(troeString); | |
+ int n = st.countTokens(); | |
+ if (n != 3 && n != 4) throw new InvalidKineticsFormatException("Troe parameter number = "+n + " for reaction: " + r.toString()); | |
+ | |
+ a = Double.parseDouble(st.nextToken().trim()); | |
+ T3star = Double.parseDouble(st.nextToken().trim()); | |
+ Tstar = Double.parseDouble(st.nextToken().trim()); | |
+ | |
+ if (st.hasMoreTokens()) { | |
+ troe7 = true; | |
+ T2star = Double.parseDouble(st.nextToken().trim()); | |
+ } | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ } else if (nextLine.toLowerCase().contains("low")) { | |
+ // read in lindemann parameters | |
+ StringTokenizer st = new StringTokenizer(nextLine, "/"); | |
+ String temp = st.nextToken().trim(); // LOW | |
+ String lowString = st.nextToken().trim(); // Modified Arrhenius parameters | |
+ /* | |
+ * MRH 17Feb2010: | |
+ * The units of the k_zero (LOW) Arrhenius parameters are different from the units of | |
+ * k_inf Arrhenius parameters by a factor of cm3/mol, hence the getReactantNumber()+1 | |
+ */ | |
+ low = ChemParser.parseSimpleArrheniusKinetics(lowString, A_multiplier, E_multiplier, r.getReactantNumber()+1); | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ } else if (nextLine.contains("CHEB")) { | |
+ // Read in the Tmin/Tmax and Pmin/Pmax information | |
+ StringTokenizer st_cheb = new StringTokenizer(nextLine,"/"); | |
+ String nextToken = st_cheb.nextToken(); // Should be TCHEB or PCHEB | |
+ StringTokenizer st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
+ double Tmin = 0.0; double Tmax = 0.0; double Pmin = 0.0; double Pmax = 0.0; | |
+ if (nextToken.trim().equals("TCHEB")) { | |
+ Tmin = Double.parseDouble(st_minmax.nextToken()); | |
+ Tmax = Double.parseDouble(st_minmax.nextToken()); | |
+ } else { | |
+ Pmin = Double.parseDouble(st_minmax.nextToken()); | |
+ Pmax = Double.parseDouble(st_minmax.nextToken()); | |
+ } | |
+ nextToken = st_cheb.nextToken(); // Should be PCHEB or TCHEB | |
+ st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
+ if (nextToken.trim().equals("TCHEB")) { | |
+ Tmin = Double.parseDouble(st_minmax.nextToken()); | |
+ Tmax = Double.parseDouble(st_minmax.nextToken()); | |
+ } else { | |
+ Pmin = Double.parseDouble(st_minmax.nextToken()); | |
+ Pmax = Double.parseDouble(st_minmax.nextToken()); | |
+ } | |
+ // Read in the N/M values (number of polynomials in the Temp and Press domain) | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ st_cheb = new StringTokenizer(nextLine,"/"); | |
+ nextToken = st_cheb.nextToken(); // Should be CHEB | |
+ st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
+ int numN = Integer.parseInt(st_minmax.nextToken()); | |
+ int numM = Integer.parseInt(st_minmax.nextToken()); | |
+ // Read in the coefficients | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ double[] unorderedChebyCoeffs = new double[numN*numM]; | |
+ int chebyCoeffCounter = 0; | |
+ while (nextLine != null && nextLine.contains("CHEB")) { | |
+ st_cheb = new StringTokenizer(nextLine,"/"); | |
+ nextToken = st_cheb.nextToken(); // Should be CHEB | |
+ st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
+ while (st_minmax.hasMoreTokens()) { | |
+ unorderedChebyCoeffs[chebyCoeffCounter] = Double.parseDouble(st_minmax.nextToken()); | |
+ ++chebyCoeffCounter; | |
+ } | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ } | |
+ // Order the chebyshev coefficients | |
+ double[][] chebyCoeffs = new double[numN][numM]; | |
+ for (int numRows=0; numRows<numN; numRows++) { | |
+ for (int numCols=0; numCols<numM; numCols++) { | |
+ chebyCoeffs[numRows][numCols] = unorderedChebyCoeffs[numM*numRows+numCols]; | |
+ } | |
+ } | |
+ // Make the ChebyshevPolynomials, PDepReaction, and add to list of PDepReactions | |
+ ChebyshevPolynomials coeffs = new ChebyshevPolynomials( | |
+ numN,new Temperature(Tmin,"K"),new Temperature(Tmax,"K"), | |
+ numM,new Pressure(Pmin,"bar"),new Pressure(Pmax,"bar"), | |
+ chebyCoeffs); | |
+ PDepIsomer reactants = new PDepIsomer(r.getStructure().getReactantList()); | |
+ PDepIsomer products = new PDepIsomer(r.getStructure().getProductList()); | |
+ PDepRateConstant pdepRC = new PDepRateConstant(coeffs); | |
+ PDepReaction pdeprxn = new PDepReaction(reactants,products,pdepRC); | |
+ allPdepNetworks.add(pdeprxn); | |
+ continueToReadRxn = false; | |
+ } else if (nextLine.contains("PLOG")) { | |
+ while (nextLine != null && nextLine.contains("PLOG")) { | |
+ // Increase the PLOG counter | |
+ ++numPLOGs; | |
+ // Store the previous PLOG information in temporary arrays | |
+ Pressure[] previousPressures = new Pressure[numPLOGs]; | |
+ ArrheniusKinetics[] previousKinetics = new ArrheniusKinetics[numPLOGs]; | |
+ for (int previousNumPLOG=0; previousNumPLOG<numPLOGs-1; ++previousNumPLOG) { | |
+ previousPressures[previousNumPLOG] = pdepkineticsPLOG.getPressures(previousNumPLOG); | |
+ previousKinetics[previousNumPLOG] = pdepkineticsPLOG.getKinetics(previousNumPLOG); | |
+ } | |
+ // Read in the new PLOG information, and add this to the temporary array | |
+ PDepArrheniusKinetics newpdepkinetics = parsePLOGline(nextLine); | |
+ previousPressures[numPLOGs-1] = newpdepkinetics.getPressures(0); | |
+ previousKinetics[numPLOGs-1] = newpdepkinetics.getKinetics(0); | |
+ // Re-initialize pdepkinetics and populate with stored information | |
+ pdepkineticsPLOG = new PDepArrheniusKinetics(numPLOGs); | |
+ pdepkineticsPLOG.setPressures(previousPressures); | |
+ pdepkineticsPLOG.setRateCoefficients(previousKinetics); | |
+ // Read the next line | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ } | |
+ // Make the PDepReaction | |
+ PDepIsomer reactants = new PDepIsomer(r.getStructure().getReactantList()); | |
+ PDepIsomer products = new PDepIsomer(r.getStructure().getProductList()); | |
+ PDepRateConstant pdepRC = new PDepRateConstant(pdepkineticsPLOG); | |
+ PDepReaction pdeprxn = new PDepReaction(reactants,products,pdepRC); | |
+ // Add to the list of PDepReactions | |
+ allPdepNetworks.add(pdeprxn); | |
+ // Re-initialize the pdepkinetics variable | |
+ numPLOGs = 0; | |
+ pdepkineticsPLOG = new PDepArrheniusKinetics(numPLOGs); | |
+ continueToReadRxn = false; | |
+ } else if (nextLine.contains("/")) { | |
+ // read in third body colliders + efficiencies | |
+ thirdBodyList.putAll(ChemParser.parseThirdBodyList(nextLine,allSpecies)); | |
+ nextLine = ChemParser.readMeaningfulLine(data, true); | |
+ } else { | |
+ // the nextLine is a "new" reaction, hence we need to exit the while loop | |
+ continueToReadRxn = false; | |
+ } | |
+ } | |
- if (st.hasMoreTokens()) { | |
- troe7 = true; | |
- T2star = Double.parseDouble(st.nextToken().trim()); | |
- } | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- } else if (nextLine.toLowerCase().contains("low")) { | |
- // read in lindemann parameters | |
- StringTokenizer st = new StringTokenizer(nextLine, "/"); | |
- String temp = st.nextToken().trim(); // LOW | |
- String lowString = st.nextToken().trim(); // Modified Arrhenius parameters | |
- /* | |
- * MRH 17Feb2010: | |
- * The units of the k_zero (LOW) Arrhenius parameters are different from the units of | |
- * k_inf Arrhenius parameters by a factor of cm3/mol, hence the getReactantNumber()+1 | |
- */ | |
- low = ChemParser.parseSimpleArrheniusKinetics(lowString, A_multiplier, E_multiplier, r.getReactantNumber()+1); | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- } else if (nextLine.contains("CHEB")) { | |
- // Read in the Tmin/Tmax and Pmin/Pmax information | |
- StringTokenizer st_cheb = new StringTokenizer(nextLine,"/"); | |
- String nextToken = st_cheb.nextToken(); // Should be TCHEB or PCHEB | |
- StringTokenizer st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
- double Tmin = 0.0; double Tmax = 0.0; double Pmin = 0.0; double Pmax = 0.0; | |
- if (nextToken.trim().equals("TCHEB")) { | |
- Tmin = Double.parseDouble(st_minmax.nextToken()); | |
- Tmax = Double.parseDouble(st_minmax.nextToken()); | |
- } else { | |
- Pmin = Double.parseDouble(st_minmax.nextToken()); | |
- Pmax = Double.parseDouble(st_minmax.nextToken()); | |
- } | |
- nextToken = st_cheb.nextToken(); // Should be PCHEB or TCHEB | |
- st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
- if (nextToken.trim().equals("TCHEB")) { | |
- Tmin = Double.parseDouble(st_minmax.nextToken()); | |
- Tmax = Double.parseDouble(st_minmax.nextToken()); | |
- } else { | |
- Pmin = Double.parseDouble(st_minmax.nextToken()); | |
- Pmax = Double.parseDouble(st_minmax.nextToken()); | |
- } | |
- // Read in the N/M values (number of polynomials in the Temp and Press domain) | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- st_cheb = new StringTokenizer(nextLine,"/"); | |
- nextToken = st_cheb.nextToken(); // Should be CHEB | |
- st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
- int numN = Integer.parseInt(st_minmax.nextToken()); | |
- int numM = Integer.parseInt(st_minmax.nextToken()); | |
- // Read in the coefficients | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- double[] unorderedChebyCoeffs = new double[numN*numM]; | |
- int chebyCoeffCounter = 0; | |
- while (nextLine != null && nextLine.contains("CHEB")) { | |
- st_cheb = new StringTokenizer(nextLine,"/"); | |
- nextToken = st_cheb.nextToken(); // Should be CHEB | |
- st_minmax = new StringTokenizer(st_cheb.nextToken()); | |
- while (st_minmax.hasMoreTokens()) { | |
- unorderedChebyCoeffs[chebyCoeffCounter] = Double.parseDouble(st_minmax.nextToken()); | |
- ++chebyCoeffCounter; | |
- } | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- } | |
- // Order the chebyshev coefficients | |
- double[][] chebyCoeffs = new double[numN][numM]; | |
- for (int numRows=0; numRows<numN; numRows++) { | |
- for (int numCols=0; numCols<numM; numCols++) { | |
- chebyCoeffs[numRows][numCols] = unorderedChebyCoeffs[numM*numRows+numCols]; | |
- } | |
- } | |
- // Make the ChebyshevPolynomials, PDepReaction, and add to list of PDepReactions | |
- ChebyshevPolynomials coeffs = new ChebyshevPolynomials( | |
- numN,new Temperature(Tmin,"K"),new Temperature(Tmax,"K"), | |
- numM,new Pressure(Pmin,"bar"),new Pressure(Pmax,"bar"), | |
- chebyCoeffs); | |
- PDepIsomer reactants = new PDepIsomer(r.getStructure().getReactantList()); | |
- PDepIsomer products = new PDepIsomer(r.getStructure().getProductList()); | |
- PDepRateConstant pdepRC = new PDepRateConstant(coeffs); | |
- PDepReaction pdeprxn = new PDepReaction(reactants,products,pdepRC); | |
- allPdepNetworks.add(pdeprxn); | |
- continueToReadRxn = false; | |
- } else if (nextLine.contains("PLOG")) { | |
- while (nextLine != null && nextLine.contains("PLOG")) { | |
- // Increase the PLOG counter | |
- ++numPLOGs; | |
- // Store the previous PLOG information in temporary arrays | |
- Pressure[] previousPressures = new Pressure[numPLOGs]; | |
- ArrheniusKinetics[] previousKinetics = new ArrheniusKinetics[numPLOGs]; | |
- for (int previousNumPLOG=0; previousNumPLOG<numPLOGs-1; ++previousNumPLOG) { | |
- previousPressures[previousNumPLOG] = pdepkineticsPLOG.getPressures(previousNumPLOG); | |
- previousKinetics[previousNumPLOG] = pdepkineticsPLOG.getKinetics(previousNumPLOG); | |
- } | |
- // Read in the new PLOG information, and add this to the temporary array | |
- PDepArrheniusKinetics newpdepkinetics = parsePLOGline(nextLine); | |
- previousPressures[numPLOGs-1] = newpdepkinetics.getPressures(0); | |
- previousKinetics[numPLOGs-1] = newpdepkinetics.getKinetics(0); | |
- // Re-initialize pdepkinetics and populate with stored information | |
- pdepkineticsPLOG = new PDepArrheniusKinetics(numPLOGs); | |
- pdepkineticsPLOG.setPressures(previousPressures); | |
- pdepkineticsPLOG.setRateCoefficients(previousKinetics); | |
- // Read the next line | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- } | |
- // Make the PDepReaction | |
- PDepIsomer reactants = new PDepIsomer(r.getStructure().getReactantList()); | |
- PDepIsomer products = new PDepIsomer(r.getStructure().getProductList()); | |
- PDepRateConstant pdepRC = new PDepRateConstant(pdepkineticsPLOG); | |
- PDepReaction pdeprxn = new PDepReaction(reactants,products,pdepRC); | |
- // Add to the list of PDepReactions | |
- allPdepNetworks.add(pdeprxn); | |
- // Re-initialize the pdepkinetics variable | |
- numPLOGs = 0; | |
- pdepkineticsPLOG = new PDepArrheniusKinetics(numPLOGs); | |
- continueToReadRxn = false; | |
- } else if (nextLine.contains("/")) { | |
- // read in third body colliders + efficiencies | |
- thirdBodyList = ChemParser.parseThirdBodyList(nextLine,allSpecies); | |
- nextLine = ChemParser.readMeaningfulLine(data, true); | |
- } else { | |
- // the nextLine is a "new" reaction, hence we need to exit the while loop | |
- continueToReadRxn = false; | |
- } | |
- } | |
- | |
/* | |
* Make the pdep reaction, according to which parameters | |
* are present | |
@@ -475,9 +475,9 @@ public class SeedMechanism { | |
* troe reactions. In the instance that no "troeReactions.txt" file exists, inform | |
* user of this but continue simulation. | |
*/ | |
- System.out.println("RMG did not find/read pressure-dependent reactions (pdepreactions.txt) " + | |
- "in the " + source + p_name + "\n" + e.getMessage()); | |
- return new LinkedHashSet(); | |
+ System.err.println("RMG could not find, or read in its entirety, the pressure-dependent reactions file (pdepreactions.txt)" + | |
+ "\n\tin the " + source + p_name + "\n" + e.getMessage()); | |
+ return null; | |
} | |
} | |
diff --git a/source/daspk/Makefile b/source/daspk/Makefile | |
index b6090fa..acbcb47 100644 | |
--- a/source/daspk/Makefile | |
+++ b/source/daspk/Makefile | |
@@ -13,10 +13,40 @@ BUILDDIR=../../build/daspk | |
# The directory in which to place compiled executables and JAR files | |
BINDIR=../../bin | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fmod=$(BUILDDIR) -ftrace=full | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fmod=$(BUILDDIR) -ftrace=full # used for dassl and daspk | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+# Special flags for daspk files | |
+# Don't check for bounds on arrays beacuse dlinpk breaks them on purpose. | |
+# Don't warn about tab characters or uninitialized variables. | |
+DASPK_FFLAGS = -fno-bounds-check -Wtabs -Wno-uninitialized | |
+endif ###### END OF gfortran SETTINGS | |
+ | |
LDFLAGS= $(F90_EXTRA_LDFLAGS) -lblas -llapack -ldaepack | |
@@ -40,10 +70,11 @@ $(BUILDDIR)/%.o: %.f90 | |
# the files in the private folder are not part of the base RMG distribution | |
# because we are not licensed to distribute them | |
+# NB. they are also compiled with extra special flags | |
$(BUILDDIR)/%.o: private/%.f | |
mkdir -p $(BUILDDIR) | |
- $(F90) $(F90FLAGS) -c $< -o $@ | |
- | |
+ $(F90) $(F90FLAGS) $(DASPK_FFLAGS) -c $< -o $@ | |
+ | |
clean: | |
rm -rf $(BUILDDIR) | |
rm -rf $(BINDIR)/daspkAUTO.exe | |
diff --git a/source/daspk/call_daspkAUTO.f90 b/source/daspk/call_daspkAUTO.f90 | |
index 7482a6c..efc4ef9 100644 | |
--- a/source/daspk/call_daspkAUTO.f90 | |
+++ b/source/daspk/call_daspkAUTO.f90 | |
@@ -1,5 +1,5 @@ | |
! 9-Jul-2009 mrharper: | |
-! Added Lindemann reactions | |
+! Added Lindemann reactions | |
! 6/26/08 gmagoon: | |
! filename: call_daspkAUTO.f90; | |
! changed name from CALL_DASPK to CALL_DASPKLAUTO | |
@@ -106,59 +106,59 @@ PROGRAM CALL_DASPKAUTO | |
! READ INFORMATION ABOUT LINDEREACTIONS | |
READ(12,*) LINDEREACTIONSIZE | |
- READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
- READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
! 6/26/08 gmagoon: if autoFlag = 1, read in additional information | |
! specific to automatic time stepping | |
- IF (AUTOFLAG .EQ. 1) THEN | |
- ! read the threshhold, corresponding to the value of | |
- ! termination tolerance specified in condition.txt input file | |
- !CORETHRESH is the threshhold for moving something from edge to core, | |
- !whereas THRESH is the threshhold for terminating the run before the end | |
- !THRESH >= CORETHRESH | |
- READ(12,*) THRESH, CORETHRESH | |
- ! read the number of edge species and edge reactions | |
- READ(12,*) ESPECIES, EREACTIONSIZE | |
- ! allocate memory for arrays | |
- ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
- & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
- & KVEC(EREACTIONSIZE)) | |
- ! read in the reaction parameters for each reaction; | |
- ! a maximum of 3 products and 3 reactants is assumed | |
- ! for each reaction; parameters read for each reaction | |
- ! are: number of reactants, number of products, | |
- ! three reactant ID's (integers from 1 to NSTATE-1), | |
- ! three product ID's (integers from 1 to ESPECIES), | |
- ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
- ! note that cases where abs. value of stoic. coeff. | |
- ! does not equal one are handled by using repeated | |
- ! reactant/product IDs | |
- ! note: use of KVEC rather than Arrhenius parameters | |
- ! requires assumption that system is isothermal | |
- ! (and isobaric for pressure dependence) | |
- DO I=1, EREACTIONSIZE | |
- READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
- & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
- & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
- ! alternative for reading Arrhenius parameters instead | |
- ! of k values; this allows easier extention to | |
- ! non-isothermal systems in the future | |
- ! form: k=A*T^n*e^(Ea/(RT)) *? | |
- ! units: A[=], n[=]dimensionless, Ea[=] | |
- ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ IF (AUTOFLAG .EQ. 1) THEN | |
+ ! read the threshhold, corresponding to the value of | |
+ ! termination tolerance specified in condition.txt input file | |
+ !CORETHRESH is the threshhold for moving something from edge to core, | |
+ !whereas THRESH is the threshhold for terminating the run before the end | |
+ !THRESH >= CORETHRESH | |
+ READ(12,*) THRESH, CORETHRESH | |
+ ! read the number of edge species and edge reactions | |
+ READ(12,*) ESPECIES, EREACTIONSIZE | |
+ ! allocate memory for arrays | |
+ ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
+ & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
+ & KVEC(EREACTIONSIZE)) | |
+ ! read in the reaction parameters for each reaction; | |
+ ! a maximum of 3 products and 3 reactants is assumed | |
+ ! for each reaction; parameters read for each reaction | |
+ ! are: number of reactants, number of products, | |
+ ! three reactant ID's (integers from 1 to NSTATE-1), | |
+ ! three product ID's (integers from 1 to ESPECIES), | |
+ ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
+ ! note that cases where abs. value of stoic. coeff. | |
+ ! does not equal one are handled by using repeated | |
+ ! reactant/product IDs | |
+ ! note: use of KVEC rather than Arrhenius parameters | |
+ ! requires assumption that system is isothermal | |
+ ! (and isobaric for pressure dependence) | |
+ DO I=1, EREACTIONSIZE | |
+ READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
+ & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
+ ! alternative for reading Arrhenius parameters instead | |
+ ! of k values; this allows easier extention to | |
+ ! non-isothermal systems in the future | |
+ ! form: k=A*T^n*e^(Ea/(RT)) *? | |
+ ! units: A[=], n[=]dimensionless, Ea[=] | |
+ ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
! & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
! & IDEPROD(I,2),IDEPROD(I,3), AVEC(I), NVEC(I), & | |
! & EAVEC(I) | |
- ! for isothermal, isobaric systems, (or just isothermal | |
- ! systems if pressure dependence is not considered) | |
+ ! for isothermal, isobaric systems, (or just isothermal | |
+ ! systems if pressure dependence is not considered) | |
! the following may be calculated here once | |
- ! (versus calculating at every timestep) | |
- ! ...units may need adjustment: | |
- ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
- ! & /(8.314*TEMPERATURE)) | |
- END DO | |
- END IF | |
+ ! (versus calculating at every timestep) | |
+ ! ...units may need adjustment: | |
+ ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
+ ! & /(8.314*TEMPERATURE)) | |
+ END DO | |
+ END IF | |
! read constantConcentration data (if flag = 1 then the concentration of that species will not be integrated) | |
! there is one integer for each species (up to nstate-1), then the last one is for the VOLUME | |
READ(12,*) (ConstantConcentration(I), i=1,nstate) | |
@@ -211,13 +211,13 @@ PROGRAM CALL_DASPKAUTO | |
read(13) troereactionratearray(i) | |
end do | |
- READ(13) LINDEREACTIONSIZE | |
- DO I=1,20*LINDEREACTIONSIZE | |
- READ(13) LINDEREACTIONARRAY(I) | |
- END DO | |
- DO I=1,17*LINDEREACTIONSIZE | |
- READ(13) LINDEREACTIONRATEARRAY(I) | |
- END DO | |
+ READ(13) LINDEREACTIONSIZE | |
+ DO I=1,20*LINDEREACTIONSIZE | |
+ READ(13) LINDEREACTIONARRAY(I) | |
+ END DO | |
+ DO I=1,17*LINDEREACTIONSIZE | |
+ READ(13) LINDEREACTIONRATEARRAY(I) | |
+ END DO | |
do i=1,nstate-1 | |
read(13) thermo(i) | |
@@ -260,8 +260,8 @@ PROGRAM CALL_DASPKAUTO | |
! 6/26/08 gmagoon: deallocate memory from allocatable arrays | |
! (may or may not be useful) | |
IF (AUTOFLAG .EQ. 1) THEN | |
- DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
- & IDEREAC, IDEPROD) | |
+ DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
+ & IDEREAC, IDEPROD) | |
END IF | |
END PROGRAM CALL_DASPKAUTO | |
@@ -366,10 +366,10 @@ PROGRAM CALL_DASPKAUTO | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
DO I=0,NSTATE-2 | |
RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+ & | |
@@ -398,55 +398,55 @@ PROGRAM CALL_DASPKAUTO | |
! 6/26/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG and EDGEFLAGCORE (-1 if flux threshhold has not yet been met, | |
! positive integer otherwise) | |
- EDGEFLAG = -1 | |
- EDGEFLAGCORE = -1 | |
- !initialize flag CORESTORED to -1 indicating that the output values (when core inclusion threshold is exceeded) have not been stored yet; this will be set to 1 once the values are stored | |
- CORESTORED = -1 | |
- !initialize MAXRATIO to a vector of all zeroes; | |
- !this variable will track the maxiumum | |
- !of rate(i)/Rchar for each edge species i, with respect to time | |
- MAXRATIO = 0 | |
- !initialize HIGHESTRATIO to 0; this variable (a scalar) | |
- !tracks the maximum of maxratio; when a new maximum is | |
- !attained, the present time step creating the new maximum | |
- !will be stored for output from the ODE solver to the Java code | |
- HIGHESTRATIO = 0 | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
+ EDGEFLAG = -1 | |
+ EDGEFLAGCORE = -1 | |
+ !initialize flag CORESTORED to -1 indicating that the output values (when core inclusion threshold is exceeded) have not been stored yet; this will be set to 1 once the values are stored | |
+ CORESTORED = -1 | |
+ !initialize MAXRATIO to a vector of all zeroes; | |
+ !this variable will track the maxiumum | |
+ !of rate(i)/Rchar for each edge species i, with respect to time | |
+ MAXRATIO = 0 | |
+ !initialize HIGHESTRATIO to 0; this variable (a scalar) | |
+ !tracks the maximum of maxratio; when a new maximum is | |
+ !attained, the present time step creating the new maximum | |
+ !will be stored for output from the ODE solver to the Java code | |
+ HIGHESTRATIO = 0 | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
& EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
& MAXRATIO,PRUNEVEC,NSTATE) | |
- !update HIGHESTRATIO | |
- !note that we cannot exit the do loop once the IF statement is | |
- !caught because the HIGHESTRATIO will not necessarily have the highest value | |
- DO I=1, ESPECIES | |
- IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
- HIGHESTRATIO = MAXRATIO(I) | |
- END IF | |
- END DO | |
- !when core flux threshold is exceeded for the first time, store the values for output | |
- !we want to use the first point of exceeding the core inclusion threshold | |
- !(aka error tolerance) to determine which species to add to the core | |
- !note: TOTALREACTIONFLUX apparently tracks integrated flux, not | |
- !instantaneous flux, so setting value to be zero here should be OK... | |
- !in any case, the result doesn't seem to be used by the Java code | |
- IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=0 | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = 0 | |
- !PRUNEVEC_OUTPT = PRUNEVEC !note that we do not copy prunevec for the output value; this will be based on the final time integrated to (in case core threshold, but not termination threshold, is exceeded at t=0...it is ok to prune species that have zero flux at t=0 | |
- CORESTORED = 1 | |
- END IF | |
- | |
- ENDIF | |
+ !update HIGHESTRATIO | |
+ !note that we cannot exit the do loop once the IF statement is | |
+ !caught because the HIGHESTRATIO will not necessarily have the highest value | |
+ DO I=1, ESPECIES | |
+ IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
+ HIGHESTRATIO = MAXRATIO(I) | |
+ END IF | |
+ END DO | |
+ !when core flux threshold is exceeded for the first time, store the values for output | |
+ !we want to use the first point of exceeding the core inclusion threshold | |
+ !(aka error tolerance) to determine which species to add to the core | |
+ !note: TOTALREACTIONFLUX apparently tracks integrated flux, not | |
+ !instantaneous flux, so setting value to be zero here should be OK... | |
+ !in any case, the result doesn't seem to be used by the Java code | |
+ IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
+ ITER_OUTPT=0 | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = 0 | |
+ !PRUNEVEC_OUTPT = PRUNEVEC !note that we do not copy prunevec for the output value; this will be based on the final time integrated to (in case core threshold, but not termination threshold, is exceeded at t=0...it is ok to prune species that have zero flux at t=0 | |
+ CORESTORED = 1 | |
+ END IF | |
+ | |
+ ENDIF | |
iter =0 | |
PREVTIME = TIME | |
DO I=1,REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+ & | |
- & LINDEREACTIONSIZE | |
+ & LINDEREACTIONSIZE | |
PREVREACTIONFLUX(I) = 0 | |
TOTALREACTIONFLUX(I) = 0 | |
CURRENTREACTIONFLUX(I) = 0 | |
@@ -481,28 +481,28 @@ PROGRAM CALL_DASPKAUTO | |
PREVTIME = TIME | |
! 6/26/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & MAXRATIO,PRUNEVEC,NSTATE) | |
- !update HIGHESTRATIO | |
- DO I=1, ESPECIES | |
- IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
- HIGHESTRATIO = MAXRATIO(I) | |
- END IF | |
- END DO | |
- !when core flux threshold is exceeded for the first time, store the values for output | |
- IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=ITER | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
- CORESTORED=1 | |
- END IF | |
- END IF | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & MAXRATIO,PRUNEVEC,NSTATE) | |
+ !update HIGHESTRATIO | |
+ DO I=1, ESPECIES | |
+ IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
+ HIGHESTRATIO = MAXRATIO(I) | |
+ END IF | |
+ END DO | |
+ !when core flux threshold is exceeded for the first time, store the values for output | |
+ IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
+ ITER_OUTPT=ITER | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
+ CORESTORED=1 | |
+ END IF | |
+ END IF | |
go to 1 | |
END IF | |
@@ -538,28 +538,28 @@ PROGRAM CALL_DASPKAUTO | |
end if | |
! 6/26/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & MAXRATIO,PRUNEVEC,NSTATE) | |
- !update HIGHESTRATIO | |
- DO I=1, ESPECIES | |
- IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
- HIGHESTRATIO = MAXRATIO(I) | |
- END IF | |
- END DO | |
- !when core flux threshold is exceeded for the first time, store the values for output | |
- IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=ITER | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
- CORESTORED=1 | |
- END IF | |
- END IF | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & MAXRATIO,PRUNEVEC,NSTATE) | |
+ !update HIGHESTRATIO | |
+ DO I=1, ESPECIES | |
+ IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
+ HIGHESTRATIO = MAXRATIO(I) | |
+ END IF | |
+ END DO | |
+ !when core flux threshold is exceeded for the first time, store the values for output | |
+ IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
+ ITER_OUTPT=ITER | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
+ CORESTORED=1 | |
+ END IF | |
+ END IF | |
go to 2 | |
END IF | |
END IF | |
@@ -574,13 +574,13 @@ PROGRAM CALL_DASPKAUTO | |
!target time/conversion has been reached | |
!in either case, CORESTORED should be -1 | |
IF (CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=ITER | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
+ ITER_OUTPT=ITER | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
END IF | |
IWORK_OUTPT = IWORK | |
RWORK_OUTPT = RWORK | |
@@ -605,8 +605,8 @@ PROGRAM CALL_DASPKAUTO | |
DO j=1,NSTATE | |
!WRITE(15,*) Yprime(I*nstate+j)/Y(NSTATE) | |
WRITE(15,*) (Y_OUTPT(NSTATE)*YPRIME_OUTPT(I*nstate+j)- & | |
- & Y_OUTPT(I*nstate+j)*YPRIME_OUTPT(NSTATE)) & | |
- & /(Y_OUTPT(NSTATE)**2) | |
+ & Y_OUTPT(I*nstate+j)*YPRIME_OUTPT(NSTATE)) & | |
+ & /(Y_OUTPT(NSTATE)**2) | |
END DO | |
end do | |
@@ -625,12 +625,12 @@ PROGRAM CALL_DASPKAUTO | |
!, the final time integrated to, | |
!along with pruning information | |
IF (AUTOFLAG .EQ. 1) THEN | |
- WRITE(15,*) EDGEFLAG | |
- WRITE(15,*) TIME | |
- DO I=1, ESPECIES | |
- WRITE(15,*) PRUNEVEC(I) | |
- WRITE(15,*) MAXRATIO(I) | |
- END DO | |
+ WRITE(15,*) EDGEFLAG | |
+ WRITE(15,*) TIME | |
+ DO I=1, ESPECIES | |
+ WRITE(15,*) PRUNEVEC(I) | |
+ WRITE(15,*) MAXRATIO(I) | |
+ END DO | |
END IF | |
CLOSE(15) | |
@@ -781,10 +781,10 @@ PROGRAM CALL_DASPKAUTO | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
DO I=0,NSTATE-2 | |
RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+LINDEREACTIONSIZE+i+1) = & | |
@@ -905,71 +905,71 @@ PROGRAM CALL_DASPKAUTO | |
! if edgeflux also exceeds the termination threshold flux, edgeflag is set to the offending species ID | |
SUBROUTINE EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
- & KVEC, MAXRATIO,PRUNEVEC,NSTATE) | |
- IMPLICIT NONE | |
- INTEGER EDGEFLAG, EDGEFLAGCORE, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
- DOUBLE PRECISION THRESH,CORETHRESH,FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
- DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
- INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
+ & KVEC, MAXRATIO,PRUNEVEC,NSTATE) | |
+ IMPLICIT NONE | |
+ INTEGER EDGEFLAG, EDGEFLAGCORE, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
+ DOUBLE PRECISION THRESH,CORETHRESH,FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
+ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
+ INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
- INTEGER PRUNEVEC(ESPECIES) | |
+ INTEGER PRUNEVEC(ESPECIES) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE),RATIO, MAXRATIO(ESPECIES) | |
- | |
- ALLOCATE(RATE(ESPECIES)) | |
- ! initialize array to have all zeroes | |
- RATE=0 | |
- ! it is assumed edgeflag = -1 at this point, since | |
+ | |
+ ALLOCATE(RATE(ESPECIES)) | |
+ ! initialize array to have all zeroes | |
+ RATE=0 | |
+ ! it is assumed edgeflag = -1 at this point, since | |
! this should be the only way to access this subroutine | |
! calculate characteristic flux, FLUXRC | |
- CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
- | |
- !initialize PRUNEVEC; at first, assume everything is prunable | |
- PRUNEVEC=1 | |
- | |
- ! calculate the vector of fluxes for each species | |
- ! by summing contributions from each reaction | |
- ILOOP: DO I=1, EREACTIONSIZE | |
- ! calculate reaction flux by multiplying k | |
- ! by concentration(s) | |
- RFLUX = KVEC(I) | |
- KLOOP: DO K=1, NEREAC(I) | |
- RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
- END DO KLOOP | |
- ! loop over reaction products, adding RFLUX | |
- JLOOP: DO J=1, NEPROD(I) | |
- RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
- !if RFLUX is zero, then presumably one of the | |
- !reactant concentrations is zero (it is assumed | |
- !that k != 0), and therefore, we don't want to | |
- !prune the species yet | |
- IF(RFLUX .EQ. 0.0) THEN | |
- PRUNEVEC(IDEPROD(I,J)) = 0 | |
- END IF | |
- END DO JLOOP | |
- END DO ILOOP | |
- | |
- | |
- ! check if any of the edge species fluxes exceed | |
- ! the threshhold and update the MAXRATIO vector | |
- FLOOP: DO I=1, ESPECIES | |
- RATIO = RATE(I)/FLUXRC | |
- !if we reach the error tolerance (aka core tolerance), | |
- !set EDGEFLAGCORE to the species ID | |
- !if we also reach the termination tolerance, set EDGEFLAG to the species ID | |
- IF (RATIO .GE. CORETHRESH) THEN | |
- EDGEFLAGCORE = I | |
- IF(RATIO .GE. THRESH) THEN | |
- EDGEFLAG = I | |
- END IF | |
- END IF | |
- !update the MAXRATIO vector | |
- IF(RATIO .GT. MAXRATIO(I)) THEN | |
- MAXRATIO(I) = RATIO | |
- END IF | |
- END DO FLOOP | |
- DEALLOCATE(RATE) | |
+ CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
+ | |
+ !initialize PRUNEVEC; at first, assume everything is prunable | |
+ PRUNEVEC=1 | |
+ | |
+ ! calculate the vector of fluxes for each species | |
+ ! by summing contributions from each reaction | |
+ ILOOP: DO I=1, EREACTIONSIZE | |
+ ! calculate reaction flux by multiplying k | |
+ ! by concentration(s) | |
+ RFLUX = KVEC(I) | |
+ KLOOP: DO K=1, NEREAC(I) | |
+ RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
+ END DO KLOOP | |
+ ! loop over reaction products, adding RFLUX | |
+ JLOOP: DO J=1, NEPROD(I) | |
+ RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
+ !if RFLUX is zero, then presumably one of the | |
+ !reactant concentrations is zero (it is assumed | |
+ !that k != 0), and therefore, we don't want to | |
+ !prune the species yet | |
+ IF(RFLUX .EQ. 0.0) THEN | |
+ PRUNEVEC(IDEPROD(I,J)) = 0 | |
+ END IF | |
+ END DO JLOOP | |
+ END DO ILOOP | |
+ | |
+ | |
+ ! check if any of the edge species fluxes exceed | |
+ ! the threshhold and update the MAXRATIO vector | |
+ FLOOP: DO I=1, ESPECIES | |
+ RATIO = RATE(I)/FLUXRC | |
+ !if we reach the error tolerance (aka core tolerance), | |
+ !set EDGEFLAGCORE to the species ID | |
+ !if we also reach the termination tolerance, set EDGEFLAG to the species ID | |
+ IF (RATIO .GE. CORETHRESH) THEN | |
+ EDGEFLAGCORE = I | |
+ IF(RATIO .GE. THRESH) THEN | |
+ EDGEFLAG = I | |
+ END IF | |
+ END IF | |
+ !update the MAXRATIO vector | |
+ IF(RATIO .GT. MAXRATIO(I)) THEN | |
+ MAXRATIO(I) = RATIO | |
+ END IF | |
+ END DO FLOOP | |
+ DEALLOCATE(RATE) | |
END SUBROUTINE EDGEFLUX | |
! RCHAR calculates the characteristic flux (i.e. the | |
@@ -984,24 +984,24 @@ END SUBROUTINE EDGEFLUX | |
! plus one) | |
SUBROUTINE RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
IMPLICIT NONE | |
- INTEGER NSTATE, I | |
- DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
- ! compute the sum of squared fluxes | |
- SSF=0.0 | |
+ INTEGER NSTATE, I | |
+ DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
+ ! compute the sum of squared fluxes | |
+ SSF=0.0 | |
!6/26/08 gmagoon: note that we are implicitly treating only indexing | |
!first NSTATE elements of array (i.e. nparam=0) since we do not care | |
!about sensitivity here | |
- DO I=1, NSTATE-1 | |
- ! add (dCi/dt)^2 with dCi/dt computed based on | |
+ DO I=1, NSTATE-1 | |
+ ! add (dCi/dt)^2 with dCi/dt computed based on | |
! quotient rule...dCi/dt=d(Ni/V)/dt | |
- ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
- SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
+ ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
+ SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
& /(Y(NSTATE)**2))**2 | |
- END DO | |
- ! compute the square root, corresponding to | |
+ END DO | |
+ ! compute the square root, corresponding to | |
! L2 norm | |
- FLUXRC = SSF**0.5 | |
+ FLUXRC = SSF**0.5 | |
END SUBROUTINE RCHAR | |
diff --git a/source/daspk/private b/source/daspk/private | |
index 7b246f0..168c901 160000 | |
--- a/source/daspk/private | |
+++ b/source/daspk/private | |
@@ -1 +1 @@ | |
-Subproject commit 7b246f0a33ef61c4df873c2979de720c9338dd65 | |
+Subproject commit 168c9010767d8260b3914c6ad336de1f0d2bdf01 | |
diff --git a/source/daspk/reaction_flux.f b/source/daspk/reaction_flux.f | |
index 3a8ad72..691cb7d 100644 | |
--- a/source/daspk/reaction_flux.f | |
+++ b/source/daspk/reaction_flux.f | |
@@ -16,7 +16,7 @@ C ************************************************ | |
DO I=1,REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+ | |
- $ LINDEREACTIONSIZE | |
+ $ LINDEREACTIONSIZE | |
reactionflux(I) = 0 | |
END DO | |
@@ -193,11 +193,11 @@ c write(*,*) temperature | |
LOGF = LOGFCENT/(1 + INSIDE**2) | |
F = 10**LOGF | |
- IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) * F | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) * F | |
- END IF | |
+ IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) * F | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) * F | |
+ END IF | |
IF (TROEREACTIONARRAY(21*I+9) .EQ. 1) THEN | |
RRATE = fRATE/KEQ | |
@@ -258,13 +258,13 @@ c write(*,*) temperature | |
PR = LOWRATE * M/RATE | |
- IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) | |
- END IF | |
+ IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) | |
+ END IF | |
- IF (LINDEREACTIONARRAY(20*I+9) .EQ. 1) THEN | |
+ IF (LINDEREACTIONARRAY(20*I+9) .EQ. 1) THEN | |
RRATE = fRATE/KEQ | |
ELSE | |
RRATE = 0 | |
@@ -282,7 +282,7 @@ C ********************************** | |
END DO | |
REACTIONFLUX(I+1+REACTIONSIZE+THIRDBODYREACTIONSIZE | |
- $ +TROEREACTIONSIZE) = FRATE - RRATE | |
+ $ +TROEREACTIONSIZE) = FRATE - RRATE | |
END DO | |
diff --git a/source/daspk/res_rpar.f b/source/daspk/res_rpar.f | |
index 6ea9079..afba886 100644 | |
--- a/source/daspk/res_rpar.f | |
+++ b/source/daspk/res_rpar.f | |
@@ -19,8 +19,8 @@ C - GENERATED: Wed Jan 31 02:09:44 2007 | |
parameter(tbrmax=50) | |
integer troemax | |
parameter(troemax=50) | |
- integer lindemax | |
- parameter(lindemax=50) | |
+ integer lindemax | |
+ parameter(lindemax=50) | |
integer i | |
integer j | |
integer k | |
@@ -29,7 +29,7 @@ C - GENERATED: Wed Jan 31 02:09:44 2007 | |
integer nstate | |
double precision pressure | |
integer troereactionsize | |
- integer lindereactionsize | |
+ integer lindereactionsize | |
integer ires | |
double precision cj | |
integer ijac | |
@@ -49,9 +49,9 @@ C - GENERATED: Wed Jan 31 02:09:44 2007 | |
$ troereactionsize+lindereactionsize+nstate-1) | |
integer reactionarray | |
integer troereactionarray | |
- integer lindereactionarray | |
+ integer lindereactionarray | |
double precision troereactionratearray | |
- double precision lindereactionratearray | |
+ double precision lindereactionratearray | |
common /size/ nstate,neq,nparam,reactionsize,troereactionsize, | |
$ thirdbodyreactionsize,lindereactionsize | |
common /reac/ reactionratearray(5*rmax), | |
@@ -83,7 +83,7 @@ C Active variable offsets and counters | |
integer reactionratearrayoft | |
integer thirdbodyreactionratearrayoft | |
integer troereactionratearrayoft | |
- integer lindereactionratearrayoft | |
+ integer lindereactionratearrayoft | |
integer temperatureoft | |
integer pressureoft | |
integer zzzindx | |
@@ -102,7 +102,7 @@ C Variable offsets for COMMON BLOCK reac | |
reactionratearrayoft=0 | |
thirdbodyreactionratearrayoft=reactionratearrayoft+(5*rmax) | |
troereactionratearrayoft=thirdbodyreactionratearrayoft+(16*tbrmax) | |
- lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
+ lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
temperatureoft=lindereactionratearrayoft+(17*lindemax) | |
pressureoft=temperatureoft+1 | |
C Number of independent and dependent variables. | |
@@ -178,8 +178,8 @@ C Done | |
parameter(tbrmax=50) | |
integer troemax | |
parameter(troemax=50) | |
- integer lindemax | |
- parameter(lindemax=50) | |
+ integer lindemax | |
+ parameter(lindemax=50) | |
integer numcollider | |
double precision logpr | |
double precision lowrate | |
@@ -197,7 +197,7 @@ C Done | |
double precision pressure | |
double precision pr | |
integer troereactionsize | |
- integer lindereactionsize | |
+ integer lindereactionsize | |
double precision dg | |
integer thirdbodyreactionsize | |
integer nparam | |
@@ -230,9 +230,9 @@ C Done | |
double precision rpar(*) | |
integer reactionarray | |
integer troereactionarray | |
- integer lindereactionarray | |
+ integer lindereactionarray | |
double precision troereactionratearray | |
- double precision lindereactionratearray | |
+ double precision lindereactionratearray | |
common /size/ nstate,neq,nparam,reactionsize,troereactionsize, | |
$ thirdbodyreactionsize,lindereactionsize | |
common /reac/ reactionratearray(5*rmax), | |
@@ -275,7 +275,7 @@ C Active variable offsets and counters | |
integer reactionratearrayoft | |
integer thirdbodyreactionratearrayoft | |
integer troereactionratearrayoft | |
- integer lindereactionratearrayoft | |
+ integer lindereactionratearrayoft | |
integer temperatureoft | |
integer pressureoft | |
integer thermooft | |
@@ -341,7 +341,7 @@ C Variable offsets for COMMON BLOCK reac | |
reactionratearrayoft=0 | |
thirdbodyreactionratearrayoft=reactionratearrayoft+(5*rmax) | |
troereactionratearrayoft=thirdbodyreactionratearrayoft+(16*tbrmax) | |
- lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
+ lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
temperatureoft=lindereactionratearrayoft+(17*lindemax) | |
pressureoft=temperatureoft+1 | |
C | |
@@ -840,8 +840,8 @@ C | |
f=zzzv3 | |
call DSVM1(foft+1,2,zzzvbar2,logfoft+1,2) | |
C | |
- IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
- zzzv4=1+pr | |
+ IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
+ zzzv4=1+pr | |
zzzv5=1.0d0/zzzv4 | |
zzzv6=lowrate*zzzv5 | |
zzzv8=zzzv6*f | |
@@ -854,8 +854,8 @@ C | |
frate=zzzv8 | |
call DSVM3(frateoft+1,2,zzzvbar7,foft+1,2,zzzvbar2, | |
$ proft+1,2,zzzvbar1,lowrateoft+1,2) | |
- ELSE | |
- zzzv4=1+pr | |
+ ELSE | |
+ zzzv4=1+pr | |
zzzv5=pr/zzzv4 | |
zzzv6=rate*zzzv5 | |
zzzv8=zzzv6*f | |
@@ -868,7 +868,7 @@ C | |
frate=zzzv8 | |
call DSVM3(frateoft+1,2,zzzvbar7,foft+1,2,zzzvbar2, | |
$ proft+1,2,zzzvbar1,rateoft+1,2) | |
- END IF | |
+ END IF | |
zzzv4=1+pr | |
zzzv5=pr/zzzv4 | |
@@ -1031,27 +1031,27 @@ C | |
call DSVM3(proft+1,2,zzzvbar4,rateoft+1,2,zzzvbar2,moft+1,2, | |
$ zzzvbar1,lowrateoft+1,2) | |
C | |
- IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
+ IF (RNUM .GT. 1 .AND. PNUM .GT. 1) THEN | |
zzzv4=1+pr | |
zzzv5=1.0d0/zzzv4 | |
zzzvbar5=lowrate | |
zzzvbar4=-zzzv5/zzzv4*zzzvbar5 | |
zzzvbar2=zzzvbar4 | |
zzzvbar1=zzzv5 | |
- frate=zzzv5*zzzvbar5 | |
+ frate=zzzv5*zzzvbar5 | |
call DSVM2(frateoft+1,2,zzzvbar2,proft+1,2, | |
$ zzzvbar1,lowrateoft+1,2) | |
- ELSE | |
+ ELSE | |
zzzv4=1+pr | |
zzzv5=pr/zzzv4 | |
zzzvbar5=rate | |
zzzvbar4=-zzzv5/zzzv4*zzzvbar5 | |
zzzvbar2=1.0d0/zzzv4*zzzvbar5+zzzvbar4 | |
zzzvbar1=zzzv5 | |
- frate=zzzv5*zzzvbar5 | |
+ frate=zzzv5*zzzvbar5 | |
call DSVM2(frateoft+1,2,zzzvbar2,proft+1,2, | |
$ zzzvbar1,rateoft+1,2) | |
- END IF | |
+ END IF | |
C | |
if(lindereactionarray(20*i+9)==1) then | |
zzzv3=frate/keq | |
diff --git a/source/daspk/resad.f b/source/daspk/resad.f | |
index 955a0ab..97675db 100644 | |
--- a/source/daspk/resad.f | |
+++ b/source/daspk/resad.f | |
@@ -19,8 +19,8 @@ C - GENERATED: Wed Jan 31 02:02:16 2007 | |
parameter(tbrmax=50) | |
integer troemax | |
parameter(troemax=50) | |
- integer lindemax | |
- parameter(lindemax=50) | |
+ integer lindemax | |
+ parameter(lindemax=50) | |
integer i | |
integer j | |
integer k | |
@@ -29,7 +29,7 @@ C - GENERATED: Wed Jan 31 02:02:16 2007 | |
integer nstate | |
double precision pressure | |
integer troereactionsize | |
- integer lindereactionsize | |
+ integer lindereactionsize | |
integer ires | |
double precision cj | |
integer ijac | |
@@ -49,9 +49,9 @@ C - GENERATED: Wed Jan 31 02:02:16 2007 | |
$ troereactionsize+lindereactionsize+nstate-1) | |
integer reactionarray | |
integer troereactionarray | |
- integer lindereactionarray | |
+ integer lindereactionarray | |
double precision troereactionratearray | |
- double precision lindereactionratearray | |
+ double precision lindereactionratearray | |
common /size/ nstate,neq,nparam,reactionsize,troereactionsize, | |
$ thirdbodyreactionsize,lindereactionsize | |
common /reac/ reactionratearray(5*rmax), | |
@@ -83,7 +83,7 @@ C Active variable offsets and counters | |
integer reactionratearrayoft | |
integer thirdbodyreactionratearrayoft | |
integer troereactionratearrayoft | |
- integer lindereactionratearrayoft | |
+ integer lindereactionratearrayoft | |
integer temperatureoft | |
integer pressureoft | |
integer zzzindx | |
@@ -102,7 +102,7 @@ C Variable offsets for COMMON BLOCK reac | |
reactionratearrayoft=0 | |
thirdbodyreactionratearrayoft=reactionratearrayoft+(5*rmax) | |
troereactionratearrayoft=thirdbodyreactionratearrayoft+(16*tbrmax) | |
- lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
+ lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
temperatureoft=lindereactionratearrayoft+(17*lindemax) | |
pressureoft=temperatureoft+1 | |
C Number of independent and dependent variables. | |
@@ -176,8 +176,8 @@ C Done | |
parameter(tbrmax=50) | |
integer troemax | |
parameter(troemax=50) | |
- integer lindemax | |
- parameter(lindemax=50) | |
+ integer lindemax | |
+ parameter(lindemax=50) | |
integer numcollider | |
double precision logpr | |
double precision lowrate | |
@@ -195,7 +195,7 @@ C Done | |
double precision pressure | |
double precision pr | |
integer troereactionsize | |
- integer lindereactionsize | |
+ integer lindereactionsize | |
double precision dg | |
integer thirdbodyreactionsize | |
integer nparam | |
@@ -228,9 +228,9 @@ C Done | |
double precision rpar(*) | |
integer reactionarray | |
integer troereactionarray | |
- integer lindereactionarray | |
+ integer lindereactionarray | |
double precision troereactionratearray | |
- double precision lindereactionratearray | |
+ double precision lindereactionratearray | |
common /size/ nstate,neq,nparam,reactionsize,troereactionsize, | |
$ thirdbodyreactionsize,lindereactionsize | |
common /reac/ reactionratearray(5*rmax), | |
@@ -273,7 +273,7 @@ C Active variable offsets and counters | |
integer reactionratearrayoft | |
integer thirdbodyreactionratearrayoft | |
integer troereactionratearrayoft | |
- integer lindereactionratearrayoft | |
+ integer lindereactionratearrayoft | |
integer temperatureoft | |
integer pressureoft | |
integer yoft | |
@@ -335,7 +335,7 @@ C Variable offsets for COMMON BLOCK reac | |
reactionratearrayoft=0 | |
thirdbodyreactionratearrayoft=reactionratearrayoft+(5*rmax) | |
troereactionratearrayoft=thirdbodyreactionratearrayoft+(16*tbrmax) | |
- lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
+ lindereactionratearrayoft=troereactionratearrayoft+(21*troemax) | |
temperatureoft=lindereactionratearrayoft+(17*lindemax) | |
pressureoft=temperatureoft+1 | |
C | |
@@ -785,7 +785,7 @@ C | |
f=zzzv3 | |
call DSVM1(foft+1,2,zzzvbar2,logfoft+1,2) | |
C | |
- if (rnum .gt. 1 .and. pnum .gt. 1) then | |
+ if (rnum .gt. 1 .and. pnum .gt. 1) then | |
zzzv4=1+pr | |
zzzv5=1.0d0/zzzv4 | |
zzzv6=lowrate*zzzv5 | |
@@ -798,7 +798,7 @@ C | |
frate=zzzv8 | |
call DSVM2(frateoft+1,2,zzzvbar7,foft+1,2, | |
$ zzzvbar2,proft+1,2) | |
- else | |
+ else | |
zzzv4=1+pr | |
zzzv5=pr/zzzv4 | |
zzzv6=rate*zzzv5 | |
@@ -811,7 +811,7 @@ C | |
frate=zzzv8 | |
call DSVM2(frateoft+1,2,zzzvbar7,foft+1,2, | |
$ zzzvbar2,proft+1,2) | |
- end if | |
+ end if | |
C | |
if(troereactionarray(21*i+9)==1) then | |
zzzv3=frate/keq | |
@@ -933,7 +933,7 @@ C | |
$ +i+1) | |
direction=lindereactionarray(20*i+9) | |
C | |
- if (rnum .gt. 1 .and. pnum .gt. 1) then | |
+ if (rnum .gt. 1 .and. pnum .gt. 1) then | |
zzzv4=1+pr | |
zzzv5=1.0d0/zzzv4 | |
zzzvbar5=lowrate | |
@@ -941,7 +941,7 @@ C | |
zzzvbar2=zzzvbar4 | |
frate=zzzv8 | |
call DSVM1(frateoft+1,2,zzzvbar2,proft+1,2) | |
- else | |
+ else | |
zzzv4=1+pr | |
zzzv5=pr/zzzv4 | |
zzzvbar5=rate | |
@@ -949,7 +949,7 @@ C | |
zzzvbar2=1.0d0/zzzv4*zzzvbar5+zzzvbar4 | |
frate=zzzv8 | |
call DSVM1(frateoft+1,2,zzzvbar2,proft+1,2) | |
- end if | |
+ end if | |
C | |
if(lindereactionarray(20*i+9)==1) then | |
zzzv3=frate/keq | |
diff --git a/source/dassl/Makefile b/source/dassl/Makefile | |
index 2a035cd..182bfbd 100644 | |
--- a/source/dassl/Makefile | |
+++ b/source/dassl/Makefile | |
@@ -13,10 +13,40 @@ BUILDDIR=../../build/dassl | |
# The directory in which to place compiled executables and JAR files | |
BINDIR=../../bin | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fmod=$(BUILDDIR) -ftrace=full | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fmod=$(BUILDDIR) -ftrace=full # used for dassl and daspk | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+# Special flags for dassl d*.f files | |
+# Don't check for bounds on arrays beacuse dlinpk breaks them on purpose. | |
+# Don't warn about tab characters | |
+DASSL_FFLAGS = -fno-bounds-check -Wtabs | |
+endif ###### END OF gfortran SETTINGS | |
+ | |
LDFLAGS= $(F90_EXTRA_LDFLAGS) | |
@@ -30,6 +60,11 @@ $(BINDIR)/dasslAUTO.exe: $(OBJ) | |
mkdir -p $(BINDIR) | |
$(F90) $(LDFLAGS) $(OBJ) -o $(BINDIR)/dasslAUTO.exe | |
+# only .f files that begin with a d (eg. daux.f, dassl.f, dlinpk.f) | |
+$(BUILDDIR)/d%.o: d%.f | |
+ mkdir -p $(BUILDDIR) | |
+ $(F90) $(F90FLAGS) $(DASSL_FFLAGS) -c $< -o $@ | |
+ | |
$(BUILDDIR)/%.o: %.f | |
mkdir -p $(BUILDDIR) | |
$(F90) $(F90FLAGS) -c $< -o $@ | |
diff --git a/source/dassl/call_dasslAUTO.f90 b/source/dassl/call_dasslAUTO.f90 | |
index df74600..535fae6 100644 | |
--- a/source/dassl/call_dasslAUTO.f90 | |
+++ b/source/dassl/call_dasslAUTO.f90 | |
@@ -26,14 +26,14 @@ | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, IDID, impspecies, & | |
& AUTOFLAG, ESPECIES, EREACTIONSIZE, ConstantConcentration(SPMAX+1), & | |
- & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION Y(SPMAX), YPRIME(SPMAX), T, TOUT, RTOL, ATOL,& | |
& RWORK(51+9*SPMAX+SPMAX**2), TEMPERATURE, PRESSURE,& | |
& REACTIONRATEARRAY(5*rmax),& | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax),& | |
& TROEREACTIONRATEARRAY(21*TROemax), targetconc, THRESH, & | |
- & CORETHRESH, LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
+ & CORETHRESH, LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
! 4/25/08 gmagoon:make auto arrays allocatable and double | |
! precision for KVEC | |
INTEGER, DIMENSION(:), ALLOCATABLE :: NEREAC,NEPROD | |
@@ -47,7 +47,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
!5/12/08 gmagoon: added timing (cf. http://beige.ucs.indiana.edu/B673/node105.html) | |
! integer count_0, count_1, count_rate, count_max | |
! double precision start, finish | |
@@ -100,7 +100,7 @@ | |
READ(12,*) THIRDBODYREACTIONSIZE | |
READ(12,*)(THIRDBODYREACTIONARRAY(I),I=1,20*THIRDBODYREACTIONSIZE) | |
READ(12,*)(THIRDBODYREACTIONRATEARRAY(I),I=1, & | |
- & 16*THIRDBODYREACTIONSIZE) | |
+ & 16*THIRDBODYREACTIONSIZE) | |
! READ INFORMATION ABOUT TROEREACTIONS | |
READ(12,*) TROEREACTIONSIZE | |
@@ -109,59 +109,59 @@ | |
! READ INFORMATION ABOUT LINDEMANNREACTIONS | |
READ(12,*) LINDEREACTIONSIZE | |
- READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
- READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
! 4/24/08 gmagoon: if autoFlag = 1, read in additional information | |
! specific to automatic time stepping | |
- IF (AUTOFLAG .EQ. 1) THEN | |
- ! read the threshhold, corresponding to the value of | |
- ! termination tolerance specified in condition.txt input file | |
- !CORETHRESH is the threshhold for moving something from edge to core, | |
- !whereas THRESH is the threshhold for terminating the run before the end | |
- !THRESH >= CORETHRESH | |
- READ(12,*) THRESH, CORETHRESH | |
- ! read the number of edge species and edge reactions | |
- READ(12,*) ESPECIES, EREACTIONSIZE | |
- ! allocate memory for arrays | |
- ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
- & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
- & KVEC(EREACTIONSIZE)) | |
- ! read in the reaction parameters for each reaction; | |
- ! a maximum of 3 products and 3 reactants is assumed | |
- ! for each reaction; parameters read for each reaction | |
- ! are: number of reactants, number of products, | |
- ! three reactant ID's (integers from 1 to NSTATE-1), | |
- ! three product ID's (integers from 1 to ESPECIES), | |
- ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
- ! note that cases where abs. value of stoic. coeff. | |
- ! does not equal one are handled by using repeated | |
- ! reactant/product IDs | |
- ! note: use of KVEC rather than Arrhenius parameters | |
- ! requires assumption that system is isothermal | |
- ! (and isobaric for pressure dependence) | |
- DO I=1, EREACTIONSIZE | |
- READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
- & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
- & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
- ! alternative for reading Arrhenius parameters instead | |
- ! of k values; this allows easier extention to | |
- ! non-isothermal systems in the future | |
- ! form: k=A*T^n*e^(Ea/(RT)) *? | |
- ! units: A[=], n[=]dimensionless, Ea[=] | |
- ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ IF (AUTOFLAG .EQ. 1) THEN | |
+ ! read the threshhold, corresponding to the value of | |
+ ! termination tolerance specified in condition.txt input file | |
+ !CORETHRESH is the threshhold for moving something from edge to core, | |
+ !whereas THRESH is the threshhold for terminating the run before the end | |
+ !THRESH >= CORETHRESH | |
+ READ(12,*) THRESH, CORETHRESH | |
+ ! read the number of edge species and edge reactions | |
+ READ(12,*) ESPECIES, EREACTIONSIZE | |
+ ! allocate memory for arrays | |
+ ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
+ & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
+ & KVEC(EREACTIONSIZE)) | |
+ ! read in the reaction parameters for each reaction; | |
+ ! a maximum of 3 products and 3 reactants is assumed | |
+ ! for each reaction; parameters read for each reaction | |
+ ! are: number of reactants, number of products, | |
+ ! three reactant ID's (integers from 1 to NSTATE-1), | |
+ ! three product ID's (integers from 1 to ESPECIES), | |
+ ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
+ ! note that cases where abs. value of stoic. coeff. | |
+ ! does not equal one are handled by using repeated | |
+ ! reactant/product IDs | |
+ ! note: use of KVEC rather than Arrhenius parameters | |
+ ! requires assumption that system is isothermal | |
+ ! (and isobaric for pressure dependence) | |
+ DO I=1, EREACTIONSIZE | |
+ READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
+ & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
+ ! alternative for reading Arrhenius parameters instead | |
+ ! of k values; this allows easier extention to | |
+ ! non-isothermal systems in the future | |
+ ! form: k=A*T^n*e^(Ea/(RT)) *? | |
+ ! units: A[=], n[=]dimensionless, Ea[=] | |
+ ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
! & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
! & IDEPROD(I,2),IDEPROD(I,3), AVEC(I), NVEC(I), & | |
! & EAVEC(I) | |
- ! for isothermal, isobaric systems, (or just isothermal | |
- ! systems if pressure dependence is not considered) | |
+ ! for isothermal, isobaric systems, (or just isothermal | |
+ ! systems if pressure dependence is not considered) | |
! the following may be calculated here once | |
- ! (versus calculating at every timestep) | |
- ! ...units may need adjustment: | |
- ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
- ! & /(8.314*TEMPERATURE)) | |
- END DO | |
- END IF | |
+ ! (versus calculating at every timestep) | |
+ ! ...units may need adjustment: | |
+ ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
+ ! & /(8.314*TEMPERATURE)) | |
+ END DO | |
+ END IF | |
! read constantConcentration data (if flag = 1 then the concentration of that species will not be integrated) | |
! there is one integer for each species (up to nstate-1), then the last one is for the VOLUME | |
@@ -183,7 +183,7 @@ | |
! Fortran90 vs. Fortran 77; perhaps it was a problem with | |
! non-auto cases after my modifications and I just didn't | |
! notice it | |
- CLOSE(13) | |
+ CLOSE(13) | |
CLOSE(14) | |
CALL SOLVEODE(Y, YPRIME, T, TOUT, INFO, RTOL, ATOL, IDID, & | |
@@ -197,8 +197,8 @@ | |
! this should prevent "deallocated a bad pointer" error when | |
! autoflag is not 1 | |
IF (AUTOFLAG .EQ. 1) THEN | |
- DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
- & IDEREAC, IDEPROD) | |
+ DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
+ & IDEREAC, IDEPROD) | |
END IF | |
!5/12/08 gmagoon: added timing (see above) | |
@@ -226,20 +226,20 @@ | |
! INITIALIZE VARIABLES IN COMMON BLOC | |
INTEGER SPMAX, RMAX, TBRMAX, TROEMAX, AUTOFLAG, ESPECIES, & | |
- & EREACTIONSIZE, LINDEMAX | |
+ & EREACTIONSIZE, LINDEMAX | |
INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE),MAXRATIO(ESPECIES), & | |
- & HIGHESTRATIO | |
+ & HIGHESTRATIO | |
PARAMETER (SPMAX = 1500, RMAX = 100000, TBRMAX=100, TROEMAX=100, & | |
- & LINDEMAX=100) | |
+ & LINDEMAX=100) | |
INTEGER REACTIONSIZE, THIRDBODYREACTIONSIZE, TROEREACTIONSIZE, & | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, NSTATE, EDGEFLAG, & | |
& EDGEFLAGCORE, CORESTORED, ConstantConcentration(SPMAX+1), & | |
- & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION REACTIONRATEARRAY(5*rmax), & | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax), & | |
@@ -253,7 +253,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
INTEGER INFO(30), LIW, LRW, IWORK(41 + NSTATE), IPAR(1),IDID, iter, & | |
& IMPSPECIES, conc, ITER_OUTPT, IWORK_OUTPT(41 + NSTATE) | |
@@ -299,10 +299,10 @@ | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
! ********************************** | |
! 5/13/08 gmagoon: added time stepping timing | |
! call system_clock(count_0T, count_rateT, count_maxT) | |
@@ -310,53 +310,53 @@ | |
CALL GETFLUX(Y, YPRIME, RPAR) | |
- | |
+ | |
! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG and EDGEFLAGCORE (-1 if flux threshhold has not yet been met, | |
! positive integer otherwise) | |
- EDGEFLAG = -1 | |
- EDGEFLAGCORE = -1 | |
- !initialize flag CORESTORED to -1 indicating that the output values (when core inclusion threshold is exceeded) have not been stored yet; this will be set to 1 once the values are stored | |
- CORESTORED = -1 | |
- !initialize MAXRATIO to a vector of all zeroes; | |
- !this variable will track the maxiumum | |
- !of rate(i)/Rchar for each edge species i, with respect to time | |
- MAXRATIO = 0 | |
- !initialize HIGHESTRATIO to 0; this variable (a scalar) | |
- !tracks the maximum of maxratio; when a new maximum is | |
- !attained, the present time step creating the new maximum | |
- !will be stored for output from the ODE solver to the Java code | |
- HIGHESTRATIO = 0 | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
+ EDGEFLAG = -1 | |
+ EDGEFLAGCORE = -1 | |
+ !initialize flag CORESTORED to -1 indicating that the output values (when core inclusion threshold is exceeded) have not been stored yet; this will be set to 1 once the values are stored | |
+ CORESTORED = -1 | |
+ !initialize MAXRATIO to a vector of all zeroes; | |
+ !this variable will track the maxiumum | |
+ !of rate(i)/Rchar for each edge species i, with respect to time | |
+ MAXRATIO = 0 | |
+ !initialize HIGHESTRATIO to 0; this variable (a scalar) | |
+ !tracks the maximum of maxratio; when a new maximum is | |
+ !attained, the present time step creating the new maximum | |
+ !will be stored for output from the ODE solver to the Java code | |
+ HIGHESTRATIO = 0 | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
& EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
& MAXRATIO,PRUNEVEC,NSTATE) | |
- !update HIGHESTRATIO | |
- !note that we cannot exit the do loop once the IF statement is | |
- !caught because the HIGHESTRATIO will not necessarily have the highest value | |
- DO I=1, ESPECIES | |
- IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
- HIGHESTRATIO = MAXRATIO(I) | |
- END IF | |
- END DO | |
- !when core flux threshold is exceeded for the first time, store the values for output | |
- !we want to use the first point of exceeding the core inclusion threshold | |
- !(aka error tolerance) to determine which species to add to the core | |
- !note: TOTALREACTIONFLUX apparently tracks integrated flux, not | |
- !instantaneous flux, so setting value to be zero here should be OK... | |
- !in any case, the result doesn't seem to be used by the Java code | |
- IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=0 | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = 0 | |
- !PRUNEVEC_OUTPT = PRUNEVEC !note that we do not copy prunevec for the output value; this will be based on the final time integrated to (in case core threshold, but not termination threshold, is exceeded at t=0...it is ok to prune species that have zero flux at t=0 | |
- CORESTORED = 1 | |
- END IF | |
- ENDIF | |
+ !update HIGHESTRATIO | |
+ !note that we cannot exit the do loop once the IF statement is | |
+ !caught because the HIGHESTRATIO will not necessarily have the highest value | |
+ DO I=1, ESPECIES | |
+ IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
+ HIGHESTRATIO = MAXRATIO(I) | |
+ END IF | |
+ END DO | |
+ !when core flux threshold is exceeded for the first time, store the values for output | |
+ !we want to use the first point of exceeding the core inclusion threshold | |
+ !(aka error tolerance) to determine which species to add to the core | |
+ !note: TOTALREACTIONFLUX apparently tracks integrated flux, not | |
+ !instantaneous flux, so setting value to be zero here should be OK... | |
+ !in any case, the result doesn't seem to be used by the Java code | |
+ IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
+ ITER_OUTPT=0 | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = 0 | |
+ !PRUNEVEC_OUTPT = PRUNEVEC !note that we do not copy prunevec for the output value; this will be based on the final time integrated to (in case core threshold, but not termination threshold, is exceeded at t=0...it is ok to prune species that have zero flux at t=0 | |
+ CORESTORED = 1 | |
+ END IF | |
+ ENDIF | |
@@ -374,7 +374,7 @@ | |
IMPSPECIES = 1 | |
conc = -1 | |
END IF | |
- | |
+ | |
! open 'SpeciesProfiles.txt' output file to append to | |
OPEN(UNIT=17, FILE='SpeciesProfiles.txt', ACCESS = 'APPEND') | |
@@ -408,34 +408,34 @@ | |
tout = 200*time | |
end if | |
! write(*,*) time, y(impspecies), targetConc*y(nstate) | |
- ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
- ! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y, YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & MAXRATIO,PRUNEVEC,NSTATE) | |
- !update HIGHESTRATIO | |
- DO I=1, ESPECIES | |
- IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
- HIGHESTRATIO = MAXRATIO(I) | |
- END IF | |
- END DO | |
- !when core flux threshold is exceeded for the first time, store the values for output | |
- IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=ITER | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
- CORESTORED = 1 | |
- END IF | |
- END IF | |
+ ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
+ ! determine EDGEFLAG | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y, YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & MAXRATIO,PRUNEVEC,NSTATE) | |
+ !update HIGHESTRATIO | |
+ DO I=1, ESPECIES | |
+ IF (MAXRATIO(I) .GT. HIGHESTRATIO) THEN | |
+ HIGHESTRATIO = MAXRATIO(I) | |
+ END IF | |
+ END DO | |
+ !when core flux threshold is exceeded for the first time, store the values for output | |
+ IF(EDGEFLAGCORE .GT. 0 .AND. CORESTORED .EQ. -1) THEN | |
+ ITER_OUTPT=ITER | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
+ CORESTORED = 1 | |
+ END IF | |
+ END IF | |
! save time and concentrations to 'SpeciesProfiles.txt' | |
WRITE(17,1700) TIME, ( Y(I)/Y(NSTATE), I=1, NSTATE-1) | |
-1700 FORMAT(99999(G12.5,' ')) ! there should be a tab character between the quotes | |
+1700 FORMAT(99999(G12.5,' ')) ! there should be a tab character between the quotes | |
GO TO 1 | |
END IF | |
@@ -457,13 +457,13 @@ | |
!target time/conversion has been reached | |
!in either case, CORESTORED should be -1 | |
IF (CORESTORED .EQ. -1) THEN | |
- ITER_OUTPT=ITER | |
- TIME_OUTPT=TIME | |
- Y_OUTPT = Y | |
- YPRIME_OUTPT = YPRIME | |
- !IWORK_OUTPT = IWORK | |
- !RWORK_OUTPT = RWORK | |
- TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
+ ITER_OUTPT=ITER | |
+ TIME_OUTPT=TIME | |
+ Y_OUTPT = Y | |
+ YPRIME_OUTPT = YPRIME | |
+ !IWORK_OUTPT = IWORK | |
+ !RWORK_OUTPT = RWORK | |
+ TOTALREACTIONFLUX_OUTPT = TOTALREACTIONFLUX | |
END IF | |
IWORK_OUTPT = IWORK | |
RWORK_OUTPT = RWORK | |
@@ -495,12 +495,12 @@ | |
!, the final time integrated to, | |
!along with pruning information | |
IF (AUTOFLAG .EQ. 1) THEN | |
- WRITE(16,*) EDGEFLAG | |
- WRITE(16,*) TIME | |
- DO I=1, ESPECIES | |
- WRITE(16,*) PRUNEVEC(I) | |
- WRITE(16,*) MAXRATIO(I) | |
- END DO | |
+ WRITE(16,*) EDGEFLAG | |
+ WRITE(16,*) TIME | |
+ DO I=1, ESPECIES | |
+ WRITE(16,*) PRUNEVEC(I) | |
+ WRITE(16,*) MAXRATIO(I) | |
+ END DO | |
END IF | |
CLOSE(16) | |
@@ -532,71 +532,71 @@ | |
! when edgeflux exceeds core threshold, edgeflagcore is set to the offending species ID | |
! if edgeflux also exceeds the termination threshold flux, edgeflag is set to the offending species ID | |
SUBROUTINE EDGEFLUX(EDGEFLAG,EDGEFLAGCORE,Y,YPRIME,THRESH,CORETHRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
- & KVEC,MAXRATIO,PRUNEVEC,NSTATE) | |
- IMPLICIT NONE | |
- INTEGER EDGEFLAG, EDGEFLAGCORE, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
- DOUBLE PRECISION THRESH, CORETHRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
- DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
- INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
+ & KVEC,MAXRATIO,PRUNEVEC,NSTATE) | |
+ IMPLICIT NONE | |
+ INTEGER EDGEFLAG, EDGEFLAGCORE, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
+ DOUBLE PRECISION THRESH, CORETHRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
+ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
+ INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
- INTEGER PRUNEVEC(ESPECIES) | |
+ INTEGER PRUNEVEC(ESPECIES) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE), RATIO, MAXRATIO(ESPECIES) | |
- | |
- ALLOCATE(RATE(ESPECIES)) | |
- ! initialize array to have all zeroes | |
- RATE=0 | |
- ! it is assumed edgeflag = -1 at this point, since | |
+ | |
+ ALLOCATE(RATE(ESPECIES)) | |
+ ! initialize array to have all zeroes | |
+ RATE=0 | |
+ ! it is assumed edgeflag = -1 at this point, since | |
! this should be the only way to access this subroutine | |
! calculate characteristic flux, FLUXRC | |
- CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
- | |
- !initialize PRUNEVEC; at first, assume everything is prunable | |
- PRUNEVEC=1 | |
- | |
- ! calculate the vector of fluxes for each species | |
- ! by summing contributions from each reaction | |
- ILOOP: DO I=1, EREACTIONSIZE | |
- ! calculate reaction flux by multiplying k | |
- ! by concentration(s) | |
- RFLUX = KVEC(I) | |
- KLOOP: DO K=1, NEREAC(I) | |
- RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
- END DO KLOOP | |
- ! loop over reaction products, adding RFLUX | |
- JLOOP: DO J=1, NEPROD(I) | |
- RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
- !if RFLUX is zero, then presumably one of the | |
- !reactant concentrations is zero (it is assumed | |
- !that k != 0), and therefore, we don't want to | |
- !prune the species yet | |
- IF(RFLUX .EQ. 0.0) THEN | |
- PRUNEVEC(IDEPROD(I,J)) = 0 | |
- END IF | |
- END DO JLOOP | |
- END DO ILOOP | |
- | |
- | |
- ! check if any of the edge species fluxes exceed | |
- ! the threshhold and update the MAXRATIO vector | |
- FLOOP: DO I=1, ESPECIES | |
- RATIO = RATE(I)/FLUXRC | |
- !if we reach the error tolerance (aka core tolerance), | |
- !set EDGEFLAGCORE to the species ID | |
- !if we also reach the termination tolerance, set EDGEFLAG to the species ID | |
- IF (RATIO .GE. CORETHRESH) THEN | |
- EDGEFLAGCORE = I | |
- IF(RATIO .GE. THRESH) THEN | |
- EDGEFLAG = I | |
- END IF | |
- END IF | |
- !update the MAXRATIO vector | |
- IF(RATIO .GT. MAXRATIO(I)) THEN | |
- MAXRATIO(I) = RATIO | |
- END IF | |
- END DO FLOOP | |
- DEALLOCATE(RATE) | |
+ CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
+ | |
+ !initialize PRUNEVEC; at first, assume everything is prunable | |
+ PRUNEVEC=1 | |
+ | |
+ ! calculate the vector of fluxes for each species | |
+ ! by summing contributions from each reaction | |
+ ILOOP: DO I=1, EREACTIONSIZE | |
+ ! calculate reaction flux by multiplying k | |
+ ! by concentration(s) | |
+ RFLUX = KVEC(I) | |
+ KLOOP: DO K=1, NEREAC(I) | |
+ RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
+ END DO KLOOP | |
+ ! loop over reaction products, adding RFLUX | |
+ JLOOP: DO J=1, NEPROD(I) | |
+ RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
+ !if RFLUX is zero, then presumably one of the | |
+ !reactant concentrations is zero (it is assumed | |
+ !that k != 0), and therefore, we don't want to | |
+ !prune the species yet | |
+ IF(RFLUX .EQ. 0.0) THEN | |
+ PRUNEVEC(IDEPROD(I,J)) = 0 | |
+ END IF | |
+ END DO JLOOP | |
+ END DO ILOOP | |
+ | |
+ | |
+ ! check if any of the edge species fluxes exceed | |
+ ! the threshhold and update the MAXRATIO vector | |
+ FLOOP: DO I=1, ESPECIES | |
+ RATIO = RATE(I)/FLUXRC | |
+ !if we reach the error tolerance (aka core tolerance), | |
+ !set EDGEFLAGCORE to the species ID | |
+ !if we also reach the termination tolerance, set EDGEFLAG to the species ID | |
+ IF (RATIO .GE. CORETHRESH) THEN | |
+ EDGEFLAGCORE = I | |
+ IF(RATIO .GE. THRESH) THEN | |
+ EDGEFLAG = I | |
+ END IF | |
+ END IF | |
+ !update the MAXRATIO vector | |
+ IF(RATIO .GT. MAXRATIO(I)) THEN | |
+ MAXRATIO(I) = RATIO | |
+ END IF | |
+ END DO FLOOP | |
+ DEALLOCATE(RATE) | |
END SUBROUTINE EDGEFLUX | |
! RCHAR calculates the characteristic flux (i.e. the | |
@@ -611,18 +611,18 @@ END SUBROUTINE EDGEFLUX | |
! plus one) | |
SUBROUTINE RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
IMPLICIT NONE | |
- INTEGER NSTATE, I | |
- DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
- ! compute the sum of squared fluxes | |
- SSF=0.0 | |
- DO I=1, NSTATE-1 | |
- ! add (dCi/dt)^2 with dCi/dt computed based on | |
+ INTEGER NSTATE, I | |
+ DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
+ ! compute the sum of squared fluxes | |
+ SSF=0.0 | |
+ DO I=1, NSTATE-1 | |
+ ! add (dCi/dt)^2 with dCi/dt computed based on | |
! quotient rule...dCi/dt=d(Ni/V)/dt | |
- ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
- SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
+ ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
+ SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
& /(Y(NSTATE)**2))**2 | |
- END DO | |
- ! compute the square root, corresponding to | |
+ END DO | |
+ ! compute the square root, corresponding to | |
! L2 norm | |
- FLUXRC = SSF**0.5 | |
+ FLUXRC = SSF**0.5 | |
END SUBROUTINE RCHAR | |
diff --git a/source/dassl/call_dasslAUTOdebug3.f90 b/source/dassl/call_dasslAUTOdebug3.f90 | |
index 30f9590..9899816 100644 | |
--- a/source/dassl/call_dasslAUTOdebug3.f90 | |
+++ b/source/dassl/call_dasslAUTOdebug3.f90 | |
@@ -26,14 +26,14 @@ | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, IDID, impspecies, & | |
& AUTOFLAG, ESPECIES, EREACTIONSIZE, ConstantConcentration(SPMAX+1), & | |
- & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION Y(SPMAX), YPRIME(SPMAX), T, TOUT, RTOL, ATOL,& | |
& RWORK(51+9*SPMAX+SPMAX**2), TEMPERATURE, PRESSURE,& | |
& REACTIONRATEARRAY(5*rmax),& | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax),& | |
& TROEREACTIONRATEARRAY(21*TROemax), targetconc, THRESH, & | |
- & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
+ & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
! 4/25/08 gmagoon:make auto arrays allocatable and double | |
! precision for KVEC | |
INTEGER, DIMENSION(:), ALLOCATABLE :: NEREAC,NEPROD | |
@@ -47,7 +47,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
!5/12/08 gmagoon: added timing (cf. http://beige.ucs.indiana.edu/B673/node105.html) | |
! integer count_0, count_1, count_rate, count_max | |
! double precision start, finish | |
@@ -99,7 +99,7 @@ | |
READ(12,*) THIRDBODYREACTIONSIZE | |
READ(12,*)(THIRDBODYREACTIONARRAY(I),I=1,20*THIRDBODYREACTIONSIZE) | |
READ(12,*)(THIRDBODYREACTIONRATEARRAY(I),I=1, & | |
- & 16*THIRDBODYREACTIONSIZE) | |
+ & 16*THIRDBODYREACTIONSIZE) | |
! READ INFORMATION ABOUT TROEREACTIONS | |
READ(12,*) TROEREACTIONSIZE | |
@@ -108,56 +108,56 @@ | |
! READ INFORMATION ABOUT LINDEMANNREACTIONS | |
READ(12,*) LINDEREACTIONSIZE | |
- READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
- READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
! 4/24/08 gmagoon: if autoFlag = 1, read in additional information | |
! specific to automatic time stepping | |
- IF (AUTOFLAG .EQ. 1) THEN | |
- ! read the threshhold, corresponding to the value | |
- ! specified in condition.txt input file | |
- READ(12,*) THRESH | |
- ! read the number of edge species and edge reactions | |
- READ(12,*) ESPECIES, EREACTIONSIZE | |
- ! allocate memory for arrays | |
- ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
- & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
- & KVEC(EREACTIONSIZE)) | |
- ! read in the reaction parameters for each reaction; | |
- ! a maximum of 3 products and 3 reactants is assumed | |
- ! for each reaction; parameters read for each reaction | |
- ! are: number of reactants, number of products, | |
- ! three reactant ID's (integers from 1 to NSTATE-1), | |
- ! three product ID's (integers from 1 to ESPECIES), | |
- ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
- ! note that cases where abs. value of stoic. coeff. | |
- ! does not equal one are handled by using repeated | |
- ! reactant/product IDs | |
- ! note: use of KVEC rather than Arrhenius parameters | |
- ! requires assumption that system is isothermal | |
- ! (and isobaric for pressure dependence) | |
- DO I=1, EREACTIONSIZE | |
- READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
- & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
- & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
- ! alternative for reading Arrhenius parameters instead | |
- ! of k values; this allows easier extention to | |
- ! non-isothermal systems in the future | |
- ! form: k=A*T^n*e^(Ea/(RT)) *? | |
- ! units: A[=], n[=]dimensionless, Ea[=] | |
- ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ IF (AUTOFLAG .EQ. 1) THEN | |
+ ! read the threshhold, corresponding to the value | |
+ ! specified in condition.txt input file | |
+ READ(12,*) THRESH | |
+ ! read the number of edge species and edge reactions | |
+ READ(12,*) ESPECIES, EREACTIONSIZE | |
+ ! allocate memory for arrays | |
+ ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
+ & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
+ & KVEC(EREACTIONSIZE)) | |
+ ! read in the reaction parameters for each reaction; | |
+ ! a maximum of 3 products and 3 reactants is assumed | |
+ ! for each reaction; parameters read for each reaction | |
+ ! are: number of reactants, number of products, | |
+ ! three reactant ID's (integers from 1 to NSTATE-1), | |
+ ! three product ID's (integers from 1 to ESPECIES), | |
+ ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
+ ! note that cases where abs. value of stoic. coeff. | |
+ ! does not equal one are handled by using repeated | |
+ ! reactant/product IDs | |
+ ! note: use of KVEC rather than Arrhenius parameters | |
+ ! requires assumption that system is isothermal | |
+ ! (and isobaric for pressure dependence) | |
+ DO I=1, EREACTIONSIZE | |
+ READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
+ & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
+ ! alternative for reading Arrhenius parameters instead | |
+ ! of k values; this allows easier extention to | |
+ ! non-isothermal systems in the future | |
+ ! form: k=A*T^n*e^(Ea/(RT)) *? | |
+ ! units: A[=], n[=]dimensionless, Ea[=] | |
+ ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
! & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
! & IDEPROD(I,2),IDEPROD(I,3), AVEC(I), NVEC(I), & | |
! & EAVEC(I) | |
- ! for isothermal, isobaric systems, (or just isothermal | |
- ! systems if pressure dependence is not considered) | |
+ ! for isothermal, isobaric systems, (or just isothermal | |
+ ! systems if pressure dependence is not considered) | |
! the following may be calculated here once | |
- ! (versus calculating at every timestep) | |
- ! ...units may need adjustment: | |
- ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
- ! & /(8.314*TEMPERATURE)) | |
- END DO | |
- END IF | |
+ ! (versus calculating at every timestep) | |
+ ! ...units may need adjustment: | |
+ ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
+ ! & /(8.314*TEMPERATURE)) | |
+ END DO | |
+ END IF | |
! read constantConcentration data (if flag = 1 then the concentration of that species will not be integrated) | |
! there is one integer for each species (up to nstate-1), then the last one is for the VOLUME | |
@@ -179,7 +179,7 @@ | |
! Fortran90 vs. Fortran 77; perhaps it was a problem with | |
! non-auto cases after my modifications and I just didn't | |
! notice it | |
- CLOSE(13) | |
+ CLOSE(13) | |
CLOSE(14) | |
CALL SOLVEODE(Y, YPRIME, T, TOUT, INFO, RTOL, ATOL, IDID, & | |
@@ -193,8 +193,8 @@ | |
! this should prevent "deallocated a bad pointer" error when | |
! autoflag is not 1 | |
IF (AUTOFLAG .EQ. 1) THEN | |
- DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
- & IDEREAC, IDEPROD) | |
+ DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
+ & IDEREAC, IDEPROD) | |
END IF | |
!5/12/08 gmagoon: added timing (see above) | |
@@ -222,19 +222,19 @@ | |
! INITIALIZE VARIABLES IN COMMON BLOC | |
INTEGER SPMAX, RMAX, TBRMAX, TROEMAX, AUTOFLAG, ESPECIES, & | |
- & EREACTIONSIZE, LINDEMAX | |
+ & EREACTIONSIZE, LINDEMAX | |
INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
PARAMETER (SPMAX = 1500, RMAX = 100000, TBRMAX=100, TROEMAX=100, & | |
- & LINDEMAX=100) | |
+ & LINDEMAX=100) | |
INTEGER REACTIONSIZE, THIRDBODYREACTIONSIZE, TROEREACTIONSIZE, & | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, NSTATE, EDGEFLAG, & | |
& ConstantConcentration(SPMAX+1), LINDEREACTIONSIZE, & | |
- & LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION REACTIONRATEARRAY(5*rmax), & | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax), & | |
@@ -248,7 +248,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
INTEGER INFO(30), LIW, LRW, IWORK(*), IPAR(1),IDID, iter, & | |
& IMPSPECIES, conc | |
@@ -289,10 +289,10 @@ | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
! ********************************** | |
! 5/13/08 gmagoon: added time stepping timing | |
! call system_clock(count_0T, count_rateT, count_maxT) | |
@@ -300,16 +300,16 @@ | |
CALL GETFLUX(Y, YPRIME, RPAR) | |
- | |
+ | |
! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG (-1 if flux threshhold has not been met, | |
! positive integer otherwise) | |
- EDGEFLAG = -1 | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ EDGEFLAG = -1 | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
& EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
& NSTATE) | |
- ENDIF | |
+ ENDIF | |
iter = 0; | |
PREVTIME = TIME | |
@@ -325,7 +325,7 @@ | |
IMPSPECIES = 1 | |
conc = -1 | |
END IF | |
- | |
+ | |
! 4/24/08 gmagoon: added criteria that edgeflag = -1 for loop to | |
! continue; calls to DASSL will stop once EDGEFLAG takes on a | |
@@ -357,13 +357,13 @@ | |
tout = 200*time | |
end if | |
! write(*,*) time, y(impspecies), targetConc*y(nstate) | |
- ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
- ! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & NSTATE) | |
- ENDIF | |
+ ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
+ ! determine EDGEFLAG | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & NSTATE) | |
+ ENDIF | |
GO TO 1 | |
END IF | |
END IF | |
@@ -422,58 +422,58 @@ | |
! value besides -1; otherwise, EDGEFLAG remains -1; | |
! EDGEFLUX also calls RCHAR | |
SUBROUTINE EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
- & KVEC, NSTATE) | |
- IMPLICIT NONE | |
- INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
- DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
- DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
- INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
+ & KVEC, NSTATE) | |
+ IMPLICIT NONE | |
+ INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
+ DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE) | |
+ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
+ INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
- | |
- ALLOCATE(RATE(ESPECIES)) | |
- ! initialize array to have all zeroes | |
- RATE=0 | |
- ! it is assumed edgeflag = -1 at this point, since | |
+ | |
+ ALLOCATE(RATE(ESPECIES)) | |
+ ! initialize array to have all zeroes | |
+ RATE=0 | |
+ ! it is assumed edgeflag = -1 at this point, since | |
! this should be the only way to access this subroutine | |
! calculate characteristic flux, FLUXRC | |
- CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
- | |
- ! calculate the vector of fluxes for each species | |
- ! by summing contributions from each reaction | |
- ILoOP: DO I=1, EREACTIONSIZE | |
- ! calculate reaction flux by multiplying k | |
- ! by concentration(s) | |
- RFLUX = KVEC(I) | |
- KLOOP: DO K=1, NEREAC(I) | |
- RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
- END DO KLOOP | |
- ! loop over reaction products, adding RFLUX | |
- JLOOP: DO J=1, NEPROD(I) | |
- RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
- END DO JLOOP | |
- END DO ILOOP | |
- | |
- | |
- ! check if any of the edge species fluxes exceed | |
- ! the threshhold; if so, set edgeflag equal to | |
- ! the index of the first species found and exit | |
- ! the loop | |
- ! 5/7/08 gmagoon: added write statements for debugging purposes | |
-! OPEN (UNIT=20, FILE = 'debug.txt') | |
-! WRITE(20,*) FLUXRC | |
- FLOOP: DO I=1, ESPECIES | |
-! WRITE(20,*) I, RATE(I) | |
- IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
+ CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
+ | |
+ ! calculate the vector of fluxes for each species | |
+ ! by summing contributions from each reaction | |
+ ILoOP: DO I=1, EREACTIONSIZE | |
+ ! calculate reaction flux by multiplying k | |
+ ! by concentration(s) | |
+ RFLUX = KVEC(I) | |
+ KLOOP: DO K=1, NEREAC(I) | |
+ RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
+ END DO KLOOP | |
+ ! loop over reaction products, adding RFLUX | |
+ JLOOP: DO J=1, NEPROD(I) | |
+ RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
+ END DO JLOOP | |
+ END DO ILOOP | |
+ | |
+ | |
+ ! check if any of the edge species fluxes exceed | |
+ ! the threshhold; if so, set edgeflag equal to | |
+ ! the index of the first species found and exit | |
+ ! the loop | |
+ ! 5/7/08 gmagoon: added write statements for debugging purposes | |
+! OPEN (UNIT=20, FILE = 'debug.txt') | |
+! WRITE(20,*) FLUXRC | |
+ FLOOP: DO I=1, ESPECIES | |
+! WRITE(20,*) I, RATE(I) | |
+ IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
! line below added for call_dasslAUTOdebug3.f90 7/28/09 | |
WRITE(*,*) I, RATE(I), FLUXRC | |
- EDGEFLAG = I | |
- EXIT FLOOP | |
- END IF | |
- END DO FLOOP | |
- DEALLOCATE(RATE) | |
+ EDGEFLAG = I | |
+ EXIT FLOOP | |
+ END IF | |
+ END DO FLOOP | |
+ DEALLOCATE(RATE) | |
END SUBROUTINE EDGEFLUX | |
! RCHAR calculates the characteristic flux (i.e. the | |
@@ -488,18 +488,18 @@ END SUBROUTINE EDGEFLUX | |
! plus one) | |
SUBROUTINE RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
IMPLICIT NONE | |
- INTEGER NSTATE, I | |
- DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
- ! compute the sum of squared fluxes | |
- SSF=0.0 | |
- DO I=1, NSTATE-1 | |
- ! add (dCi/dt)^2 with dCi/dt computed based on | |
+ INTEGER NSTATE, I | |
+ DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
+ ! compute the sum of squared fluxes | |
+ SSF=0.0 | |
+ DO I=1, NSTATE-1 | |
+ ! add (dCi/dt)^2 with dCi/dt computed based on | |
! quotient rule...dCi/dt=d(Ni/V)/dt | |
- ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
- SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
+ ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
+ SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
& /(Y(NSTATE)**2))**2 | |
- END DO | |
- ! compute the square root, corresponding to | |
+ END DO | |
+ ! compute the square root, corresponding to | |
! L2 norm | |
- FLUXRC = SSF**0.5 | |
+ FLUXRC = SSF**0.5 | |
END SUBROUTINE RCHAR | |
diff --git a/source/dassl/call_dasslAUTOinfo.f90 b/source/dassl/call_dasslAUTOinfo.f90 | |
index ce3e206..42483dc 100644 | |
--- a/source/dassl/call_dasslAUTOinfo.f90 | |
+++ b/source/dassl/call_dasslAUTOinfo.f90 | |
@@ -26,14 +26,14 @@ | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, IDID, impspecies, & | |
& AUTOFLAG, ESPECIES, EREACTIONSIZE, ConstantConcentration(SPMAX+1), & | |
- & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION Y(SPMAX), YPRIME(SPMAX), T, TOUT, RTOL, ATOL,& | |
& RWORK(51+9*SPMAX+SPMAX**2), TEMPERATURE, PRESSURE,& | |
& REACTIONRATEARRAY(5*rmax),& | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax),& | |
& TROEREACTIONRATEARRAY(21*TROemax), targetconc, THRESH, & | |
- & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
+ & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
! 4/25/08 gmagoon:make auto arrays allocatable and double | |
! precision for KVEC | |
INTEGER, DIMENSION(:), ALLOCATABLE :: NEREAC,NEPROD | |
@@ -47,7 +47,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
!5/12/08 gmagoon: added timing (cf. http://beige.ucs.indiana.edu/B673/node105.html) | |
! integer count_0, count_1, count_rate, count_max | |
! double precision start, finish | |
@@ -102,7 +102,7 @@ | |
READ(12,*) THIRDBODYREACTIONSIZE | |
READ(12,*)(THIRDBODYREACTIONARRAY(I),I=1,20*THIRDBODYREACTIONSIZE) | |
READ(12,*)(THIRDBODYREACTIONRATEARRAY(I),I=1, & | |
- & 16*THIRDBODYREACTIONSIZE) | |
+ & 16*THIRDBODYREACTIONSIZE) | |
! READ INFORMATION ABOUT TROEREACTIONS | |
READ(12,*) TROEREACTIONSIZE | |
@@ -111,56 +111,56 @@ | |
! READ INFORMATION ABOUT LINDEMANNREACTIONS | |
READ(12,*) LINDEREACTIONSIZE | |
- READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
- READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
! 4/24/08 gmagoon: if autoFlag = 1, read in additional information | |
! specific to automatic time stepping | |
- IF (AUTOFLAG .EQ. 1) THEN | |
- ! read the threshhold, corresponding to the value | |
- ! specified in condition.txt input file | |
- READ(12,*) THRESH | |
- ! read the number of edge species and edge reactions | |
- READ(12,*) ESPECIES, EREACTIONSIZE | |
- ! allocate memory for arrays | |
- ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
- & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
- & KVEC(EREACTIONSIZE)) | |
- ! read in the reaction parameters for each reaction; | |
- ! a maximum of 3 products and 3 reactants is assumed | |
- ! for each reaction; parameters read for each reaction | |
- ! are: number of reactants, number of products, | |
- ! three reactant ID's (integers from 1 to NSTATE-1), | |
- ! three product ID's (integers from 1 to ESPECIES), | |
- ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
- ! note that cases where abs. value of stoic. coeff. | |
- ! does not equal one are handled by using repeated | |
- ! reactant/product IDs | |
- ! note: use of KVEC rather than Arrhenius parameters | |
- ! requires assumption that system is isothermal | |
- ! (and isobaric for pressure dependence) | |
- DO I=1, EREACTIONSIZE | |
- READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
- & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
- & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
- ! alternative for reading Arrhenius parameters instead | |
- ! of k values; this allows easier extention to | |
- ! non-isothermal systems in the future | |
- ! form: k=A*T^n*e^(Ea/(RT)) *? | |
- ! units: A[=], n[=]dimensionless, Ea[=] | |
- ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ IF (AUTOFLAG .EQ. 1) THEN | |
+ ! read the threshhold, corresponding to the value | |
+ ! specified in condition.txt input file | |
+ READ(12,*) THRESH | |
+ ! read the number of edge species and edge reactions | |
+ READ(12,*) ESPECIES, EREACTIONSIZE | |
+ ! allocate memory for arrays | |
+ ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
+ & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
+ & KVEC(EREACTIONSIZE)) | |
+ ! read in the reaction parameters for each reaction; | |
+ ! a maximum of 3 products and 3 reactants is assumed | |
+ ! for each reaction; parameters read for each reaction | |
+ ! are: number of reactants, number of products, | |
+ ! three reactant ID's (integers from 1 to NSTATE-1), | |
+ ! three product ID's (integers from 1 to ESPECIES), | |
+ ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
+ ! note that cases where abs. value of stoic. coeff. | |
+ ! does not equal one are handled by using repeated | |
+ ! reactant/product IDs | |
+ ! note: use of KVEC rather than Arrhenius parameters | |
+ ! requires assumption that system is isothermal | |
+ ! (and isobaric for pressure dependence) | |
+ DO I=1, EREACTIONSIZE | |
+ READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
+ & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
+ ! alternative for reading Arrhenius parameters instead | |
+ ! of k values; this allows easier extention to | |
+ ! non-isothermal systems in the future | |
+ ! form: k=A*T^n*e^(Ea/(RT)) *? | |
+ ! units: A[=], n[=]dimensionless, Ea[=] | |
+ ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
! & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
! & IDEPROD(I,2),IDEPROD(I,3), AVEC(I), NVEC(I), & | |
! & EAVEC(I) | |
- ! for isothermal, isobaric systems, (or just isothermal | |
- ! systems if pressure dependence is not considered) | |
+ ! for isothermal, isobaric systems, (or just isothermal | |
+ ! systems if pressure dependence is not considered) | |
! the following may be calculated here once | |
- ! (versus calculating at every timestep) | |
- ! ...units may need adjustment: | |
- ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
- ! & /(8.314*TEMPERATURE)) | |
- END DO | |
- END IF | |
+ ! (versus calculating at every timestep) | |
+ ! ...units may need adjustment: | |
+ ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
+ ! & /(8.314*TEMPERATURE)) | |
+ END DO | |
+ END IF | |
! read constantConcentration data (if flag = 1 then the concentration of that species will not be integrated) | |
! there is one integer for each species (up to nstate-1), then the last one is for the VOLUME | |
@@ -182,7 +182,7 @@ | |
! Fortran90 vs. Fortran 77; perhaps it was a problem with | |
! non-auto cases after my modifications and I just didn't | |
! notice it | |
- CLOSE(13) | |
+ CLOSE(13) | |
CLOSE(14) | |
CALL SOLVEODE(Y, YPRIME, T, TOUT, INFO, RTOL, ATOL, IDID, & | |
@@ -196,8 +196,8 @@ | |
! this should prevent "deallocated a bad pointer" error when | |
! autoflag is not 1 | |
IF (AUTOFLAG .EQ. 1) THEN | |
- DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
- & IDEREAC, IDEPROD) | |
+ DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
+ & IDEREAC, IDEPROD) | |
END IF | |
!5/12/08 gmagoon: added timing (see above) | |
@@ -228,19 +228,19 @@ | |
! INITIALIZE VARIABLES IN COMMON BLOC | |
INTEGER SPMAX, RMAX, TBRMAX, TROEMAX, AUTOFLAG, ESPECIES, & | |
- & EREACTIONSIZE, LINDEMAX | |
+ & EREACTIONSIZE, LINDEMAX | |
INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
PARAMETER (SPMAX = 1500, RMAX = 100000, TBRMAX=100, TROEMAX=100, & | |
- & LINDEMAX=100) | |
+ & LINDEMAX=100) | |
INTEGER REACTIONSIZE, THIRDBODYREACTIONSIZE, TROEREACTIONSIZE, & | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, NSTATE, EDGEFLAG, & | |
& ConstantConcentration(SPMAX+1), LINDEREACTIONSIZE, & | |
- & LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION REACTIONRATEARRAY(5*rmax), & | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax), & | |
@@ -254,7 +254,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
INTEGER INFO(30), LIW, LRW, IWORK(*), IPAR(1),IDID, iter, & | |
& IMPSPECIES, conc | |
@@ -295,10 +295,10 @@ | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
! ********************************** | |
! 5/13/08 gmagoon: added time stepping timing | |
! call system_clock(count_0T, count_rateT, count_maxT) | |
@@ -306,16 +306,16 @@ | |
CALL GETFLUX(Y, YPRIME, RPAR) | |
- | |
+ | |
! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG (-1 if flux threshhold has not been met, | |
! positive integer otherwise) | |
- EDGEFLAG = -1 | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ EDGEFLAG = -1 | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
& EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
& NSTATE,time) | |
- ENDIF | |
+ ENDIF | |
iter = 0; | |
PREVTIME = TIME | |
@@ -331,7 +331,7 @@ | |
IMPSPECIES = 1 | |
conc = -1 | |
END IF | |
- | |
+ | |
! 4/24/08 gmagoon: added criteria that edgeflag = -1 for loop to | |
! continue; calls to DASSL will stop once EDGEFLAG takes on a | |
@@ -363,13 +363,13 @@ | |
tout = 200*time | |
end if | |
! write(*,*) time, y(impspecies), targetConc*y(nstate) | |
- ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
- ! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & NSTATE,time) | |
- ENDIF | |
+ ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
+ ! determine EDGEFLAG | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & NSTATE,time) | |
+ ENDIF | |
GO TO 1 | |
END IF | |
END IF | |
@@ -428,63 +428,63 @@ | |
! value besides -1; otherwise, EDGEFLAG remains -1; | |
! EDGEFLUX also calls RCHAR | |
SUBROUTINE EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
- & KVEC, NSTATE,T) | |
- IMPLICIT NONE | |
- INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
- DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE), T | |
- DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
- INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
+ & KVEC, NSTATE,T) | |
+ IMPLICIT NONE | |
+ INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
+ DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE), T | |
+ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
+ INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
- | |
- ALLOCATE(RATE(ESPECIES)) | |
- ! initialize array to have all zeroes | |
- RATE=0 | |
- ! it is assumed edgeflag = -1 at this point, since | |
+ | |
+ ALLOCATE(RATE(ESPECIES)) | |
+ ! initialize array to have all zeroes | |
+ RATE=0 | |
+ ! it is assumed edgeflag = -1 at this point, since | |
! this should be the only way to access this subroutine | |
! calculate characteristic flux, FLUXRC | |
- CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
- | |
- ! calculate the vector of fluxes for each species | |
- ! by summing contributions from each reaction | |
- ILOOP: DO I=1, EREACTIONSIZE | |
- ! calculate reaction flux by multiplying k | |
- ! by concentration(s) | |
- RFLUX = KVEC(I) | |
- KLOOP: DO K=1, NEREAC(I) | |
- RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
- END DO KLOOP | |
+ CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
+ | |
+ ! calculate the vector of fluxes for each species | |
+ ! by summing contributions from each reaction | |
+ ILOOP: DO I=1, EREACTIONSIZE | |
+ ! calculate reaction flux by multiplying k | |
+ ! by concentration(s) | |
+ RFLUX = KVEC(I) | |
+ KLOOP: DO K=1, NEREAC(I) | |
+ RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
+ END DO KLOOP | |
WRITE(40,*) I, T, RFLUX/(THRESH*FLUXRC) | |
- ! loop over reaction products, adding RFLUX | |
- JLOOP: DO J=1, NEPROD(I) | |
- RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
- END DO JLOOP | |
- END DO ILOOP | |
- | |
- | |
- ! check if any of the edge species fluxes exceed | |
- ! the threshhold; if so, set edgeflag equal to | |
- ! the index of the first species found and exit | |
- ! the loop | |
- ! 5/7/08 gmagoon: added write statements for debugging purposes | |
-! OPEN (UNIT=20, FILE = 'debug.txt') | |
-! WRITE(20,*) FLUXRC | |
+ ! loop over reaction products, adding RFLUX | |
+ JLOOP: DO J=1, NEPROD(I) | |
+ RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
+ END DO JLOOP | |
+ END DO ILOOP | |
+ | |
+ | |
+ ! check if any of the edge species fluxes exceed | |
+ ! the threshhold; if so, set edgeflag equal to | |
+ ! the index of the first species found and exit | |
+ ! the loop | |
+ ! 5/7/08 gmagoon: added write statements for debugging purposes | |
+! OPEN (UNIT=20, FILE = 'debug.txt') | |
+! WRITE(20,*) FLUXRC | |
do i=1,nstate-1 | |
write(25,*) i, T, y(i)/y(nstate) | |
end do | |
- FLOOP: DO I=1, ESPECIES | |
-! WRITE(20,*) I, RATE(I) | |
+ FLOOP: DO I=1, ESPECIES | |
+! WRITE(20,*) I, RATE(I) | |
WRITE(30,*) I, T, RATE(I)/(THRESH*FLUXRC) | |
- IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
- EDGEFLAG = I | |
-! EXIT FLOOP | |
- END IF | |
- END DO FLOOP | |
+ IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
+ EDGEFLAG = I | |
+! EXIT FLOOP | |
+ END IF | |
+ END DO FLOOP | |
- DEALLOCATE(RATE) | |
+ DEALLOCATE(RATE) | |
END SUBROUTINE EDGEFLUX | |
! RCHAR calculates the characteristic flux (i.e. the | |
@@ -499,18 +499,18 @@ END SUBROUTINE EDGEFLUX | |
! plus one) | |
SUBROUTINE RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
IMPLICIT NONE | |
- INTEGER NSTATE, I | |
- DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
- ! compute the sum of squared fluxes | |
- SSF=0.0 | |
- DO I=1, NSTATE-1 | |
- ! add (dCi/dt)^2 with dCi/dt computed based on | |
+ INTEGER NSTATE, I | |
+ DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
+ ! compute the sum of squared fluxes | |
+ SSF=0.0 | |
+ DO I=1, NSTATE-1 | |
+ ! add (dCi/dt)^2 with dCi/dt computed based on | |
! quotient rule...dCi/dt=d(Ni/V)/dt | |
- ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
- SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
+ ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
+ SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
& /(Y(NSTATE)**2))**2 | |
- END DO | |
- ! compute the square root, corresponding to | |
+ END DO | |
+ ! compute the square root, corresponding to | |
! L2 norm | |
- FLUXRC = SSF**0.5 | |
+ FLUXRC = SSF**0.5 | |
END SUBROUTINE RCHAR | |
diff --git a/source/dassl/call_dasslAUTOinfoFirst.f90 b/source/dassl/call_dasslAUTOinfoFirst.f90 | |
index fb98e93..d9a529e 100644 | |
--- a/source/dassl/call_dasslAUTOinfoFirst.f90 | |
+++ b/source/dassl/call_dasslAUTOinfoFirst.f90 | |
@@ -26,14 +26,14 @@ | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, IDID, impspecies, & | |
& AUTOFLAG, ESPECIES, EREACTIONSIZE, ConstantConcentration(SPMAX+1), & | |
- & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONSIZE, LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION Y(SPMAX), YPRIME(SPMAX), T, TOUT, RTOL, ATOL,& | |
& RWORK(51+9*SPMAX+SPMAX**2), TEMPERATURE, PRESSURE,& | |
& REACTIONRATEARRAY(5*rmax),& | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax),& | |
& TROEREACTIONRATEARRAY(21*TROemax), targetconc, THRESH, & | |
- & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
+ & LINDEREACTIONRATEARRAY(17*LINDEMAX) | |
! 4/25/08 gmagoon:make auto arrays allocatable and double | |
! precision for KVEC | |
INTEGER, DIMENSION(:), ALLOCATABLE :: NEREAC,NEPROD | |
@@ -47,7 +47,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
!5/12/08 gmagoon: added timing (cf. http://beige.ucs.indiana.edu/B673/node105.html) | |
! integer count_0, count_1, count_rate, count_max | |
! double precision start, finish | |
@@ -102,7 +102,7 @@ | |
READ(12,*) THIRDBODYREACTIONSIZE | |
READ(12,*)(THIRDBODYREACTIONARRAY(I),I=1,20*THIRDBODYREACTIONSIZE) | |
READ(12,*)(THIRDBODYREACTIONRATEARRAY(I),I=1, & | |
- & 16*THIRDBODYREACTIONSIZE) | |
+ & 16*THIRDBODYREACTIONSIZE) | |
! READ INFORMATION ABOUT TROEREACTIONS | |
READ(12,*) TROEREACTIONSIZE | |
@@ -111,56 +111,56 @@ | |
! READ INFORMATION ABOUT LINDEMANNREACTIONS | |
READ(12,*) LINDEREACTIONSIZE | |
- READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
- READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONARRAY(I),I=1,20*LINDEREACTIONSIZE) | |
+ READ(12,*)(LINDEREACTIONRATEARRAY(I),I=1,17*LINDEREACTIONSIZE) | |
! 4/24/08 gmagoon: if autoFlag = 1, read in additional information | |
! specific to automatic time stepping | |
- IF (AUTOFLAG .EQ. 1) THEN | |
- ! read the threshhold, corresponding to the value | |
- ! specified in condition.txt input file | |
- READ(12,*) THRESH | |
- ! read the number of edge species and edge reactions | |
- READ(12,*) ESPECIES, EREACTIONSIZE | |
- ! allocate memory for arrays | |
- ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
- & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
- & KVEC(EREACTIONSIZE)) | |
- ! read in the reaction parameters for each reaction; | |
- ! a maximum of 3 products and 3 reactants is assumed | |
- ! for each reaction; parameters read for each reaction | |
- ! are: number of reactants, number of products, | |
- ! three reactant ID's (integers from 1 to NSTATE-1), | |
- ! three product ID's (integers from 1 to ESPECIES), | |
- ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
- ! note that cases where abs. value of stoic. coeff. | |
- ! does not equal one are handled by using repeated | |
- ! reactant/product IDs | |
- ! note: use of KVEC rather than Arrhenius parameters | |
- ! requires assumption that system is isothermal | |
- ! (and isobaric for pressure dependence) | |
- DO I=1, EREACTIONSIZE | |
- READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
- & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
- & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
- ! alternative for reading Arrhenius parameters instead | |
- ! of k values; this allows easier extention to | |
- ! non-isothermal systems in the future | |
- ! form: k=A*T^n*e^(Ea/(RT)) *? | |
- ! units: A[=], n[=]dimensionless, Ea[=] | |
- ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ IF (AUTOFLAG .EQ. 1) THEN | |
+ ! read the threshhold, corresponding to the value | |
+ ! specified in condition.txt input file | |
+ READ(12,*) THRESH | |
+ ! read the number of edge species and edge reactions | |
+ READ(12,*) ESPECIES, EREACTIONSIZE | |
+ ! allocate memory for arrays | |
+ ALLOCATE(NEREAC(EREACTIONSIZE), NEPROD(EREACTIONSIZE),& | |
+ & IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3),& | |
+ & KVEC(EREACTIONSIZE)) | |
+ ! read in the reaction parameters for each reaction; | |
+ ! a maximum of 3 products and 3 reactants is assumed | |
+ ! for each reaction; parameters read for each reaction | |
+ ! are: number of reactants, number of products, | |
+ ! three reactant ID's (integers from 1 to NSTATE-1), | |
+ ! three product ID's (integers from 1 to ESPECIES), | |
+ ! and the rate coefficient k, such that dCi/dt=k*Ca*Cb; | |
+ ! note that cases where abs. value of stoic. coeff. | |
+ ! does not equal one are handled by using repeated | |
+ ! reactant/product IDs | |
+ ! note: use of KVEC rather than Arrhenius parameters | |
+ ! requires assumption that system is isothermal | |
+ ! (and isobaric for pressure dependence) | |
+ DO I=1, EREACTIONSIZE | |
+ READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
+ & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
+ & IDEPROD(I,2), IDEPROD(I,3), KVEC(I) | |
+ ! alternative for reading Arrhenius parameters instead | |
+ ! of k values; this allows easier extention to | |
+ ! non-isothermal systems in the future | |
+ ! form: k=A*T^n*e^(Ea/(RT)) *? | |
+ ! units: A[=], n[=]dimensionless, Ea[=] | |
+ ! READ(12,*) NEREAC(I),NEPROD(I),IDEREAC(I,1), & | |
! & IDEREAC(I,2),IDEREAC(I,3),IDEPROD(I,1), & | |
! & IDEPROD(I,2),IDEPROD(I,3), AVEC(I), NVEC(I), & | |
! & EAVEC(I) | |
- ! for isothermal, isobaric systems, (or just isothermal | |
- ! systems if pressure dependence is not considered) | |
+ ! for isothermal, isobaric systems, (or just isothermal | |
+ ! systems if pressure dependence is not considered) | |
! the following may be calculated here once | |
- ! (versus calculating at every timestep) | |
- ! ...units may need adjustment: | |
- ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
- ! & /(8.314*TEMPERATURE)) | |
- END DO | |
- END IF | |
+ ! (versus calculating at every timestep) | |
+ ! ...units may need adjustment: | |
+ ! KVEC(I)=AVEC(I)*TEMPERATURE**NVEC(I)*EXP(EAVEC(I) & | |
+ ! & /(8.314*TEMPERATURE)) | |
+ END DO | |
+ END IF | |
! read constantConcentration data (if flag = 1 then the concentration of that species will not be integrated) | |
! there is one integer for each species (up to nstate-1), then the last one is for the VOLUME | |
@@ -182,7 +182,7 @@ | |
! Fortran90 vs. Fortran 77; perhaps it was a problem with | |
! non-auto cases after my modifications and I just didn't | |
! notice it | |
- CLOSE(13) | |
+ CLOSE(13) | |
CLOSE(14) | |
CALL SOLVEODE(Y, YPRIME, T, TOUT, INFO, RTOL, ATOL, IDID, & | |
@@ -196,8 +196,8 @@ | |
! this should prevent "deallocated a bad pointer" error when | |
! autoflag is not 1 | |
IF (AUTOFLAG .EQ. 1) THEN | |
- DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
- & IDEREAC, IDEPROD) | |
+ DEALLOCATE (NEREAC, NEPROD, KVEC, & | |
+ & IDEREAC, IDEPROD) | |
END IF | |
!5/12/08 gmagoon: added timing (see above) | |
@@ -228,19 +228,19 @@ | |
! INITIALIZE VARIABLES IN COMMON BLOC | |
INTEGER SPMAX, RMAX, TBRMAX, TROEMAX, AUTOFLAG, ESPECIES, & | |
- & EREACTIONSIZE, LINDEMAX | |
+ & EREACTIONSIZE, LINDEMAX | |
INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
PARAMETER (SPMAX = 1500, RMAX = 100000, TBRMAX=100, TROEMAX=100, & | |
- & LINDEMAX=100) | |
+ & LINDEMAX=100) | |
INTEGER REACTIONSIZE, THIRDBODYREACTIONSIZE, TROEREACTIONSIZE, & | |
& REACTIONARRAY(9*RMAX), THIRDBODYREACTIONARRAY(20*TBRMAX), & | |
& TROEREACTIONARRAY(21*TROEMAX), I, J, NSTATE, EDGEFLAG, & | |
& ConstantConcentration(SPMAX+1), LINDEREACTIONSIZE, & | |
- & LINDEREACTIONARRAY(20*LINDEMAX) | |
+ & LINDEREACTIONARRAY(20*LINDEMAX) | |
DOUBLE PRECISION REACTIONRATEARRAY(5*rmax), & | |
& THIRDBODYREACTIONRATEARRAY(16*Tbrmax), & | |
@@ -254,7 +254,7 @@ | |
& TROEREACTIONRATEARRAY, temperature, pressure,& | |
& REACTIONARRAY, THIRDBODYREACTIONARRAY,& | |
& TROEREACTIONARRAY, ConstantConcentration, & | |
- & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
+ & LINDEREACTIONRATEARRAY, LINDEREACTIONARRAY | |
INTEGER INFO(30), LIW, LRW, IWORK(*), IPAR(1),IDID, iter, & | |
& IMPSPECIES, conc | |
@@ -295,10 +295,10 @@ | |
& TROEREACTIONRATEARRAY(21*I+1) | |
END DO | |
- DO I=0,LINDEREACTIONSIZE-1 | |
- RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
- & LINDEREACTIONRATEARRAY(17*I+1) | |
- END DO | |
+ DO I=0,LINDEREACTIONSIZE-1 | |
+ RPAR(REACTIONSIZE+THIRDBODYREACTIONSIZE+TROEREACTIONSIZE+I+1) = & | |
+ & LINDEREACTIONRATEARRAY(17*I+1) | |
+ END DO | |
! ********************************** | |
! 5/13/08 gmagoon: added time stepping timing | |
! call system_clock(count_0T, count_rateT, count_maxT) | |
@@ -306,16 +306,16 @@ | |
CALL GETFLUX(Y, YPRIME, RPAR) | |
- | |
+ | |
! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
! determine EDGEFLAG (-1 if flux threshhold has not been met, | |
! positive integer otherwise) | |
- EDGEFLAG = -1 | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ EDGEFLAG = -1 | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
& EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
& NSTATE,time) | |
- ENDIF | |
+ ENDIF | |
iter = 0; | |
PREVTIME = TIME | |
@@ -331,7 +331,7 @@ | |
IMPSPECIES = 1 | |
conc = -1 | |
END IF | |
- | |
+ | |
! 4/24/08 gmagoon: added criteria that edgeflag = -1 for loop to | |
! continue; calls to DASSL will stop once EDGEFLAG takes on a | |
@@ -363,13 +363,13 @@ | |
tout = 200*time | |
end if | |
! write(*,*) time, y(impspecies), targetConc*y(nstate) | |
- ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
- ! determine EDGEFLAG | |
- IF (AUTOFLAG.eq.1) THEN | |
- CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
- & NSTATE,time) | |
- ENDIF | |
+ ! 4/24/08 gmagoon: call EdgeFlux if AUTOFLAG is 1 to | |
+ ! determine EDGEFLAG | |
+ IF (AUTOFLAG.eq.1) THEN | |
+ CALL EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD,KVEC, & | |
+ & NSTATE,time) | |
+ ENDIF | |
GO TO 1 | |
END IF | |
END IF | |
@@ -428,65 +428,65 @@ | |
! value besides -1; otherwise, EDGEFLAG remains -1; | |
! EDGEFLUX also calls RCHAR | |
SUBROUTINE EDGEFLUX(EDGEFLAG, Y, YPRIME,THRESH,ESPECIES, & | |
- & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
- & KVEC, NSTATE,T) | |
- IMPLICIT NONE | |
- INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
- DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE), T | |
- DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
- INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
+ & EREACTIONSIZE,NEREAC,NEPROD,IDEREAC,IDEPROD, & | |
+ & KVEC, NSTATE,T) | |
+ IMPLICIT NONE | |
+ INTEGER EDGEFLAG, ESPECIES, EREACTIONSIZE, NSTATE, I, J, K | |
+ DOUBLE PRECISION THRESH, FLUXRC, RFLUX, Y(NSTATE), YPRIME(NSTATE), T | |
+ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RATE | |
+ INTEGER NEREAC(EREACTIONSIZE),NEPROD(EREACTIONSIZE) | |
INTEGER IDEREAC(EREACTIONSIZE,3), IDEPROD(EREACTIONSIZE,3) | |
DOUBLE PRECISION KVEC(EREACTIONSIZE) | |
- | |
- ALLOCATE(RATE(ESPECIES)) | |
- ! initialize array to have all zeroes | |
- RATE=0 | |
- ! it is assumed edgeflag = -1 at this point, since | |
+ | |
+ ALLOCATE(RATE(ESPECIES)) | |
+ ! initialize array to have all zeroes | |
+ RATE=0 | |
+ ! it is assumed edgeflag = -1 at this point, since | |
! this should be the only way to access this subroutine | |
! calculate characteristic flux, FLUXRC | |
- CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
- | |
- ! calculate the vector of fluxes for each species | |
- ! by summing contributions from each reaction | |
- ILOOP: DO I=1, EREACTIONSIZE | |
- ! calculate reaction flux by multiplying k | |
- ! by concentration(s) | |
- RFLUX = KVEC(I) | |
- KLOOP: DO K=1, NEREAC(I) | |
- RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
- END DO KLOOP | |
+ CALL RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
+ | |
+ ! calculate the vector of fluxes for each species | |
+ ! by summing contributions from each reaction | |
+ ILOOP: DO I=1, EREACTIONSIZE | |
+ ! calculate reaction flux by multiplying k | |
+ ! by concentration(s) | |
+ RFLUX = KVEC(I) | |
+ KLOOP: DO K=1, NEREAC(I) | |
+ RFLUX = RFLUX*Y(IDEREAC(I,K))/Y(NSTATE) | |
+ END DO KLOOP | |
! WRITE(40,*) I, T, RFLUX/(THRESH*FLUXRC) | |
WRITE(40,*) I, T, RFLUX | |
- ! loop over reaction products, adding RFLUX | |
- JLOOP: DO J=1, NEPROD(I) | |
- RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
- END DO JLOOP | |
- END DO ILOOP | |
- | |
- | |
- ! check if any of the edge species fluxes exceed | |
- ! the threshhold; if so, set edgeflag equal to | |
- ! the index of the first species found and exit | |
- ! the loop | |
- ! 5/7/08 gmagoon: added write statements for debugging purposes | |
-! OPEN (UNIT=20, FILE = 'debug.txt') | |
-! WRITE(20,*) FLUXRC | |
+ ! loop over reaction products, adding RFLUX | |
+ JLOOP: DO J=1, NEPROD(I) | |
+ RATE(IDEPROD(I,J))=RATE(IDEPROD(I,J))+ RFLUX | |
+ END DO JLOOP | |
+ END DO ILOOP | |
+ | |
+ | |
+ ! check if any of the edge species fluxes exceed | |
+ ! the threshhold; if so, set edgeflag equal to | |
+ ! the index of the first species found and exit | |
+ ! the loop | |
+ ! 5/7/08 gmagoon: added write statements for debugging purposes | |
+! OPEN (UNIT=20, FILE = 'debug.txt') | |
+! WRITE(20,*) FLUXRC | |
do i=1,nstate-1 | |
write(25,*) i, T, y(i)/y(nstate) | |
end do | |
- FLOOP: DO I=1, ESPECIES | |
-! WRITE(20,*) I, RATE(I) | |
+ FLOOP: DO I=1, ESPECIES | |
+! WRITE(20,*) I, RATE(I) | |
! WRITE(30,*) I, T, RATE(I)/(THRESH*FLUXRC) | |
WRITE(30,*) I, T, RATE(I) | |
- IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
- EDGEFLAG = I | |
-! EXIT FLOOP | |
- END IF | |
- END DO FLOOP | |
+ IF(RATE(I) .GE. THRESH*FLUXRC) THEN | |
+ EDGEFLAG = I | |
+! EXIT FLOOP | |
+ END IF | |
+ END DO FLOOP | |
- DEALLOCATE(RATE) | |
+ DEALLOCATE(RATE) | |
END SUBROUTINE EDGEFLUX | |
! RCHAR calculates the characteristic flux (i.e. the | |
@@ -501,18 +501,18 @@ END SUBROUTINE EDGEFLUX | |
! plus one) | |
SUBROUTINE RCHAR(FLUXRC, Y, YPRIME, NSTATE) | |
IMPLICIT NONE | |
- INTEGER NSTATE, I | |
- DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
- ! compute the sum of squared fluxes | |
- SSF=0.0 | |
- DO I=1, NSTATE-1 | |
- ! add (dCi/dt)^2 with dCi/dt computed based on | |
+ INTEGER NSTATE, I | |
+ DOUBLE PRECISION SSF, FLUXRC, Y(NSTATE), YPRIME(NSTATE) | |
+ ! compute the sum of squared fluxes | |
+ SSF=0.0 | |
+ DO I=1, NSTATE-1 | |
+ ! add (dCi/dt)^2 with dCi/dt computed based on | |
! quotient rule...dCi/dt=d(Ni/V)/dt | |
- ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
- SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
+ ! =(V*dNi/dt-Ni*dV/dt)/V^2 | |
+ SSF=SSF+((Y(NSTATE)*YPRIME(I)-Y(I)*YPRIME(NSTATE)) & | |
& /(Y(NSTATE)**2))**2 | |
- END DO | |
- ! compute the square root, corresponding to | |
+ END DO | |
+ ! compute the square root, corresponding to | |
! L2 norm | |
- FLUXRC = SSF**0.5 | |
+ FLUXRC = SSF**0.5 | |
END SUBROUTINE RCHAR | |
diff --git a/source/dassl/getflux.f b/source/dassl/getflux.f | |
index 1d3b1bb..3792b86 100644 | |
--- a/source/dassl/getflux.f | |
+++ b/source/dassl/getflux.f | |
@@ -181,17 +181,17 @@ c write(*,*) temperature | |
LOGF = LOGFCENT/(1 + INSIDE**2) | |
F = 10**LOGF | |
-C 9-Jul-2009: MRH | |
-C For unimolecular/recombination rxns, effective rate constant is | |
-C keff = kinf * (Pr/(1+Pr)) * F | |
-C For chemically-activated bimolecular rxns, effective rate constant is | |
-C keff = kzero * (1/(1+Pr)) * F | |
- IF (TROEREACTIONARRAY(I*21+1) .GT. 1 .AND. | |
- $ TROEREACTIONARRAY(I*21+2) .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) * F | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) * F | |
- END IF | |
+C 9-Jul-2009: MRH | |
+C For unimolecular/recombination rxns, effective rate constant is | |
+C keff = kinf * (Pr/(1+Pr)) * F | |
+C For chemically-activated bimolecular rxns, effective rate constant is | |
+C keff = kzero * (1/(1+Pr)) * F | |
+ IF (TROEREACTIONARRAY(I*21+1) .GT. 1 .AND. | |
+ $ TROEREACTIONARRAY(I*21+2) .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) * F | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) * F | |
+ END IF | |
IF (TROEREACTIONARRAY(21*I+9) .EQ. 1) THEN | |
RRATE = fRATE/TROEREACTIONRATEARRAY(21*I+5) | |
@@ -244,17 +244,17 @@ c write(*,*) temperature | |
PR = LOWRATE * M/RATE | |
-C 9-Jul-2009: MRH | |
-C For unimolecular/recombination rxns, effective rate constant is | |
-C keff = kinf * (Pr/(1+Pr)) * F | |
-C For chemically-activated bimolecular rxns, effective rate constant is | |
-C keff = kzero * (1/(1+Pr)) * F | |
- IF (LINDEREACTIONARRAY(I*20+1) .GT. 1 .AND. | |
- $ LINDEREACTIONARRAY(I*20+2) .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) | |
- END IF | |
+C 9-Jul-2009: MRH | |
+C For unimolecular/recombination rxns, effective rate constant is | |
+C keff = kinf * (Pr/(1+Pr)) * F | |
+C For chemically-activated bimolecular rxns, effective rate constant is | |
+C keff = kzero * (1/(1+Pr)) * F | |
+ IF (LINDEREACTIONARRAY(I*20+1) .GT. 1 .AND. | |
+ $ LINDEREACTIONARRAY(I*20+2) .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) | |
+ END IF | |
IF (LINDEREACTIONARRAY(20*I+9) .EQ. 1) THEN | |
RRATE = fRATE/LINDEREACTIONRATEARRAY(17*I+5) | |
diff --git a/source/dassl/reaction_flux.f b/source/dassl/reaction_flux.f | |
index 99b0161..739d977 100644 | |
--- a/source/dassl/reaction_flux.f | |
+++ b/source/dassl/reaction_flux.f | |
@@ -165,17 +165,17 @@ c write(*,*) temperature | |
LOGF = LOGFCENT/(1 + INSIDE**2) | |
F = 10**LOGF | |
-C 9-Jul-2009: MRH | |
-C For unimolecular/recombination rxns, effective rate constant is | |
-C keff = kinf * (Pr/(1+Pr)) * F | |
-C For chemically-activated bimolecular rxns, effective rate constant is | |
-C keff = kzero * (1/(1+Pr)) * F | |
- IF (TROEREACTIONARRAY(I*21+1) .GT. 1 .AND. | |
- $ TROEREACTIONARRAY(I*21+2) .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) * F | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) * F | |
- END IF | |
+C 9-Jul-2009: MRH | |
+C For unimolecular/recombination rxns, effective rate constant is | |
+C keff = kinf * (Pr/(1+Pr)) * F | |
+C For chemically-activated bimolecular rxns, effective rate constant is | |
+C keff = kzero * (1/(1+Pr)) * F | |
+ IF (TROEREACTIONARRAY(I*21+1) .GT. 1 .AND. | |
+ $ TROEREACTIONARRAY(I*21+2) .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) * F | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) * F | |
+ END IF | |
IF (TROEREACTIONARRAY(21*I+9) .EQ. 1) THEN | |
RRATE = fRATE/TROEREACTIONRATEARRAY(21*I+5) | |
@@ -221,17 +221,17 @@ c write(*,*) temperature | |
PR = LOWRATE * M/RATE | |
-C 9-Jul-2009: MRH | |
-C For unimolecular/recombination rxns, effective rate constant is | |
-C keff = kinf * (Pr/(1+Pr)) * F | |
-C For chemically-activated bimolecular rxns, effective rate constant is | |
-C keff = kzero * (1/(1+Pr)) * F | |
- IF (LINDEREACTIONARRAY(I*20+1) .GT. 1 .AND. | |
- $ LINDEREACTIONARRAY(I*20+2) .GT. 1) THEN | |
- FRATE = LOWRATE * (1/(1+PR)) | |
- ELSE | |
- FRATE = RATE * (PR/(1+PR)) | |
- END IF | |
+C 9-Jul-2009: MRH | |
+C For unimolecular/recombination rxns, effective rate constant is | |
+C keff = kinf * (Pr/(1+Pr)) * F | |
+C For chemically-activated bimolecular rxns, effective rate constant is | |
+C keff = kzero * (1/(1+Pr)) * F | |
+ IF (LINDEREACTIONARRAY(I*20+1) .GT. 1 .AND. | |
+ $ LINDEREACTIONARRAY(I*20+2) .GT. 1) THEN | |
+ FRATE = LOWRATE * (1/(1+PR)) | |
+ ELSE | |
+ FRATE = RATE * (PR/(1+PR)) | |
+ END IF | |
IF (LINDEREACTIONARRAY(20*I+9) .EQ. 1) THEN | |
RRATE = fRATE/LINDEREACTIONRATEARRAY(17*I+5) | |
diff --git a/source/fame/Makefile b/source/fame/Makefile | |
index 8f98fc2..e1684e6 100755 | |
--- a/source/fame/Makefile | |
+++ b/source/fame/Makefile | |
@@ -13,10 +13,35 @@ BUILDDIR=../../build/fame | |
# The directory in which to place compiled executables and JAR files | |
BINDIR=../../bin | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fmod=$(BUILDDIR) -ftrace=full | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fbounds-check -ftrace=full -fmod=$(BUILDDIR) -Wall -O3 | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+endif ###### END OF gfortran SETTINGS | |
LDFLAGS= $(F90_EXTRA_LDFLAGS) -lpthread -lblas -llapack | |
diff --git a/source/fame/fame.f90 b/source/fame/fame.f90 | |
index 65cb1b1..a989f0a 100755 | |
--- a/source/fame/fame.f90 | |
+++ b/source/fame/fame.f90 | |
@@ -137,7 +137,7 @@ program fame | |
do t = 1, nT | |
write (1,fmt=*) K(t,:,prod,reac) | |
end do | |
- stop | |
+ go to 99 | |
end if | |
write (*, fmt='(A)'), '# The reactant and product isomers' | |
@@ -171,7 +171,7 @@ program fame | |
end do | |
! Close log file | |
- close(1) | |
+99 close(1) | |
deallocate(K, chebyshevCoeffs, pDepArrhenius) | |
diff --git a/source/fame/io.f90 b/source/fame/io.f90 | |
index c70e867..79a9166 100644 | |
--- a/source/fame/io.f90 | |
+++ b/source/fame/io.f90 | |
@@ -656,7 +656,7 @@ contains | |
read(token, *), numValues | |
call getFirstToken(string, token) | |
- units = token | |
+ units = token(1:64) | |
allocate(values(1:numValues)) | |
do n = 1, numValues | |
@@ -688,7 +688,7 @@ contains | |
read(token, *), numValues | |
call getFirstToken(string, token) | |
- units = token | |
+ units = token(1:64) | |
call getFirstToken(string, token) | |
read(token, *), Nmin | |
@@ -714,7 +714,7 @@ contains | |
character(len=256) token | |
call getFirstToken(string, token) | |
- units = token | |
+ units = token(1:64) | |
call getFirstToken(string, token) | |
read(token, *), value | |
diff --git a/source/fame/network.f90 b/source/fame/network.f90 | |
index cf42d42..270f956 100644 | |
--- a/source/fame/network.f90 | |
+++ b/source/fame/network.f90 | |
@@ -308,16 +308,20 @@ contains | |
integer linear, symm | |
character(len=128) msg | |
- integer i | |
+ integer Nvib, Nrot, Nhind, i | |
+ | |
+ Nvib = size(spec%spectral%vibFreq) | |
+ Nrot = size(spec%spectral%rotFreq) | |
+ Nhind = size(spec%spectral%hindFreq) | |
! Prepare inputs for density of states function | |
- do i = 1, size(spec%spectral%vibFreq) | |
+ do i = 1, Nvib | |
vib(i) = spec%spectral%vibFreq(i) | |
end do | |
- do i = 1, size(spec%spectral%rotFreq) | |
+ do i = 1, Nrot | |
rot(i) = spec%spectral%rotFreq(i) | |
end do | |
- do i = 1, size(spec%spectral%hindFreq) | |
+ do i = 1, Nhind | |
hind(i,1) = spec%spectral%hindFreq(i) | |
hind(i,2) = spec%spectral%hindBarrier(i) | |
end do | |
@@ -328,8 +332,8 @@ contains | |
symm = spec%spectral%symmNum | |
! Calculate the density of states | |
- call densityOfStates(Elist, nGrains, vib, size(vib), rot, size(rot), & | |
- hind, size(hind), symm, linear, densStates, msg) | |
+ call densityOfStates(Elist, nGrains, vib, Nvib, rot, Nrot, & | |
+ hind, Nhind, symm, linear, densStates, msg) | |
end subroutine | |
@@ -543,7 +547,7 @@ contains | |
do r = 1, nGrains | |
if (isom%E0 < Elist(r) .and. index == 0) index = r | |
end do | |
- isom%densStates(index:nGrains) = densStates(1:nGrains-index) | |
+ isom%densStates(index:nGrains) = densStates(1:nGrains-index+1) | |
end subroutine | |
@@ -988,7 +992,7 @@ contains | |
real(8) dE, dEdown | |
character(len=128) :: msg | |
- integer i, j, r | |
+ integer i, j, r, s | |
write(1,*) 'Applying method at', T, 'K,', P/1e5, 'bar...' | |
@@ -1000,12 +1004,19 @@ contains | |
densStates(i,:) = net%isomers(i)%densStates * dE / net%isomers(i)%Q | |
end do | |
- | |
! Active-state energy of each isomer | |
do i = 1, nIsom+nReac+nProd | |
Eres(i) = isomer_getActiveSpaceEnergy(i, net%reactions) | |
end do | |
+ ! Zero collision matrix | |
+ do i = 1, nIsom | |
+ do r = 1, Ngrains | |
+ do s = 1, Ngrains | |
+ Mcoll(i,r,s) = 0.0 | |
+ end do | |
+ end do | |
+ end do | |
! Zero rate coefficient matrices | |
do r = 1, nGrains | |
do i = 1, nIsom | |
diff --git a/source/fame/rs.f90 b/source/fame/rs.f90 | |
index f84c57a..13730de 100644 | |
--- a/source/fame/rs.f90 | |
+++ b/source/fame/rs.f90 | |
@@ -105,6 +105,15 @@ Kij, Fim, Gnj, dEdown, nIsom, nReac, nProd, nGrains, K, msg) | |
bres(i) = sum(eqDist(i,1:nRes(i))) | |
end do | |
+ ! Zero pseudo-steady state vector array | |
+ do i = 1, nIsom | |
+ do n = 1, nIsom+nReac | |
+ do r = nRes(i), nGrains | |
+ pa(r,n,i) = 0.0 | |
+ end do | |
+ end do | |
+ end do | |
+ | |
! Determine pseudo-steady state populations of active state | |
if (nIsom == 1) then | |
! Not worth it to call banded solver when only one well | |
diff --git a/source/frankie/Makefile b/source/frankie/Makefile | |
index aba3c40..1a1aa38 100755 | |
--- a/source/frankie/Makefile | |
+++ b/source/frankie/Makefile | |
@@ -13,10 +13,36 @@ BUILDDIR=../../build/frankie | |
# The directory in which to place compiled executables and JAR files | |
BINDIR=../../bin | |
-# The Fortran 90 compiler to use and flags to use when compiling Fortran 90 | |
-# code | |
-F90=g95 | |
-F90FLAGS=-fmod=$(BUILDDIR) -ftrace=full | |
+# The Fortran 90 compiler to use and flags to use when compiling Fortran code | |
+# Call with 'make F90=g95' if you want to use g95 | |
+# or 'make F90=gfortran' for GNU Fortran (recommended) | |
+# Here we set the default | |
+#F90=g95 | |
+F90=gfortran | |
+ | |
+ifeq ($(F90),g95) | |
+F90FLAGS = -fbounds-check -ftrace=full -fmod=$(BUILDDIR) -Wall -O3 | |
+F90FLAGS_NDEBUG = -fmod=$(BUILDDIR) -ftrace=full # used for dassl and daspk | |
+endif ###### END OF g95 SETTINGS | |
+ | |
+ifeq ($(F90),gfortran) | |
+# --fpe-trap=invalid,zero,underflow,overflow | |
+# The above flag causes problems at least with fame. Maybe a bug in gfortran? (Maybe a bug in fame.) | |
+F90FLAGS = -ftrapv -fbounds-check -frange-check \ | |
+ -ggdb -J""$(BUILDDIR)"" -O3 -Wall -Wno-unused | |
+# if gfortran>4.3 then add -fbacktrace (it's not supported in earlier versions) | |
+ifeq ($(shell gfortran --version 2>/dev/zero|grep -iqs '^GNU Fortran.* [4-9]\.[3-9]\.[0-9]' && echo "ok"), ok) | |
+F90FLAGS += -fbacktrace | |
+endif | |
+F90FLAGS_NDEBUG = $(F90FLAGS) # used for dassl and daspk | |
+ | |
+# call as `make MACOS=true F90=gfortran` if you want MacOS X 10.6+ 64-bit intel core2 features | |
+ifdef MACOS | |
+F90FLAGS += -arch x86_64 -march=core2 | |
+F90_EXTRA_LDFLAGS += -framework vecLIB | |
+endif | |
+ | |
+endif ###### END OF gfortran SETTINGS | |
LDFLAGS= $(F90_EXTRA_LDFLAGS) -lpthread | |
diff --git a/source/frankie/calc_freq_code.f90 b/source/frankie/calc_freq_code.f90 | |
index f4d8c5a..b343f87 100755 | |
--- a/source/frankie/calc_freq_code.f90 | |
+++ b/source/frankie/calc_freq_code.f90 | |
@@ -1155,7 +1155,7 @@ SUBROUTINE Bond_avg_8x3_2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
call linspace(typical_frequencies(1),typical_frequencies(2), & | |
@@ -1201,7 +1201,7 @@ SUBROUTINE Bond_avg_5x2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
predicted_frequencies(1) = typical_frequencies(1) | |
@@ -1240,7 +1240,7 @@ SUBROUTINE Bond_avg_3x2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
predicted_frequencies(1) = typical_frequencies(1) | |
@@ -1271,7 +1271,7 @@ SUBROUTINE Bond_avg_7x2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ !! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
predicted_frequencies(1) = typical_frequencies(1) | |
@@ -1318,7 +1318,7 @@ SUBROUTINE Bond_avg_5x1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1362,7 +1362,7 @@ SUBROUTINE Bond_avg_3x1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1400,7 +1400,7 @@ SUBROUTINE Bond_avg_6x2_2_1 (Number_of_bonds, & | |
IF (Number_of_bonds == 0 ) THEN | |
! WRITE (*,*) 'N = 0' | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1441,7 +1441,7 @@ SUBROUTINE Bond_avg_4x1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1484,7 +1484,7 @@ SUBROUTINE Bond_avg_5x2_2_1 (Number_of_bonds, & | |
IF (Number_of_bonds == 0 ) THEN | |
! WRITE (*,*) 'N = 0' | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1521,7 +1521,7 @@ SUBROUTINE Bond_avg_6x2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
predicted_frequencies(1) = typical_frequencies(1) | |
@@ -1564,7 +1564,7 @@ SUBROUTINE Bond_avg_2x1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1595,7 +1595,7 @@ SUBROUTINE Bond_avg_1x1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
@@ -1622,7 +1622,7 @@ SUBROUTINE Bond_avg_4x2_1 (Number_of_bonds, & | |
INTEGER :: i,j, k | |
IF (Number_of_bonds == 0 ) THEN | |
- predicted_frequencies = (/ 0.0, 0.0, 0.0, 0.0 /) | |
+ ! predicted_frequencies has DIMENSION(0) so we can't assign anything to it | |
ELSEIF (Number_of_bonds == 1) THEN | |
predicted_frequencies(1) = typical_frequencies(1) | |
@@ -7658,7 +7658,7 @@ IMPLICIT NONE | |
WRITE(*,*) 'Nonlinear molecule' | |
trans_rot_cp_to_cv = 4.0 | |
N_vib = 3 * (N_atoms) - 6 - (N_rot) - (degeneracy) | |
- IF (N_vib < 0) THEN | |
+ IF (N_vib < 0) THEN | |
WRITE(*,*) 'Something is wrong. The system is over specified.' | |
WRITE(*,*) 'Either reduce the number of rotors or reduce the number of bond types.' | |
WRITE(*,*) 'Program will now exit to avoid crashing.' | |
diff --git a/web/source/documentation/faq.txt b/web/source/documentation/faq.txt | |
index 02befdc..f01907f 100644 | |
--- a/web/source/documentation/faq.txt | |
+++ b/web/source/documentation/faq.txt | |
@@ -1,123 +1,123 @@ | |
-.. _faq: | |
- | |
-******************************** | |
-FAQ (Frequently-Asked Questions) | |
-******************************** | |
- | |
-Questions | |
---------- | |
- | |
- | |
-How do I represent molecular oxygen? | |
-==================================== | |
- | |
-Use the ground electronic state of molecular oxygen, which contains a single | |
-bond and a diradical. The adjacency list should be :: | |
- | |
- (1) O2 0.1 (mol/cm3) | |
- 1 O 1 {2,S} | |
- 2 O 1 {1,S} | |
- | |
-For more information, please see :ref:`Representing oxygen <oxygen>`. | |
- | |
-.. _Q3: | |
- | |
-My RMG run runs out of memory. How should I proceed? | |
-==================================================================================================================================== | |
-This type of error will probably look something like ``Exception in thread "main" java.lang.OutOfMemoryError: Java heap space``. | |
-Species take up a large amount of memory, and when the combined edge plus core gets into the range of tens of thousands | |
-of species, the run will typically crash even with around 1500 MB of RAM. | |
-If you haven't already done so, we recommend allocating as much memory as possible | |
-when executing the RMG job (for example, using the option -Xmx1600m will allocate 1600 MB of memory. See the section on :ref:`running RMG <running>`). If this still fails, there are several additional options: | |
- | |
-1) Use the pruning feature introduced in RMG 3.2. | |
- | |
-2) Use tighter bounds for MaxCarbonNumber, MaxRadicalNumber, etc. as appropriate for your system. | |
- By reducing these values, RMG will generate fewer edge species. The idea is to intelligently choose the bounds to | |
- exclude species that shouldn't be relevant for your particular system. | |
- | |
-3) Relax the error tolerance (i.e. make it larger). RMG keeps expanding the reaction mechanism | |
- until the flux to 'edge' species is below the tolerance you specify. Increasing this tolerance | |
- means RMG will build a smaller mechanism (though it may be | |
- missing some important reaction pathways). For more details see http://rmg.sourceforge.net/documentation/theory/enlarger.html and the reference on that page. | |
- | |
-.. _Q4: | |
- | |
-RMG has been running for multiple days and hasn't finished. Is there any way to make it run faster? | |
-=================================================================================================== | |
-Getting RMG to converge in a reasonable time, especially for large starting species, can be tricky. Depending on the options specified, the RMG developers | |
-have seen mechanism generation runs as long as ~10 days. During this time, RMG is running hundreds of reaction model simulations and considering tens of thousands of species, and perhaps over a million possible reactions. As such, it can be inconvenient to have it running for a long time on your personal single-core machine or laptop. So, if you have access to a computing cluster where you can run RMG, that can ease the burden. Some "tricks" that could be helpful in reducing time requirements for model generation (in no particular order): | |
- | |
-1) Relax the error tolerance (i.e. make it larger). RMG keeps expanding the reaction mechanism | |
- until the flux to 'edge' species is below the tolerance you specify. Increasing this tolerance | |
- means RMG will stop sooner; it will take less time, but the model will be smaller and may be | |
- missing some important reaction pathways. For more details see http://rmg.sourceforge.net/documentation/theory/enlarger.html and the reference on that page. | |
- | |
-2) Setting the maximum number of carbons (or oxygens, heavy atoms, etc.) in a species, | |
- if you're focusing on the species decomposition. | |
- | |
-3) Run RMG for a single temperature / pressure (TemperatureModel, PressureModel). | |
- | |
-4) If you are running RMG with pressure dependence, consider trying the less accurate | |
- (but faster) ModifiedStrongCollision option. | |
- | |
-5) If you are using a Seed Mechanism, set the GenerateReactions field to off. | |
- | |
-.. _Q5: | |
- | |
-How do I use the DASPK dynamic solver? | |
-====================================== | |
-RMG uses DASPK in a manner that requires a proprietary library known as DAEPACK, | |
-and unfortunately, we cannot distribute this library. If you acquire this | |
-library (for example, possibly through the Jacobian program from Numerica) we | |
-will be able to help you compile the Linux version of daspkAUTO.exe, but | |
-compiling in Windows has been tricky in our experience. | |
- | |
-Hopefully, DASSL will meet your needs as it should provide all the functionality | |
-of DASPK, with the exception of sensitivity analysis (which you could do in | |
-Chemkin with the final model). | |
- | |
-.. _Q6: | |
- | |
-During the RMG run, I see the warning: "Frankie exceeded maximum number of iterations...". Is this normal? | |
-============================================================================================================ | |
-This occurs when the optimization algorithm for the frequency estimation code | |
-"Frankie" fails to converge. In these cases, the frequencies (used to calculate | |
-density of states in master equation calculations to account for pressure dependence) | |
-may not be as accurate as they could be. It is typical for some fraction of Frankie | |
-jobs to fail in this fashion. | |
- | |
-.. _Q7: | |
- | |
-During the RMG run, I see the warning: "fitted Er < 0 ...". Is this normal? | |
-=============================================================================== | |
-This occurs when the fitted activation energy for reverse reaction rate coefficients | |
-(based on equilibrium considerations) turns out to be negative. In these cases, the | |
-activation energy for the reverse reaction is adjusted to zero, with corresponding | |
-adjustment to the A-factor to ensure accurate equilibrium constant is maintained. | |
-It is typical for some fraction of the large number of reactions considered to | |
-produce this output. | |
- | |
-.. _Q8: | |
- | |
-I encounter a NegativeConcentrationException, causing the RMG run to fail. How should I proceed? | |
-============================================================================================================================================================================== | |
-The error message will read something like ``Exception in thread "main" jing.rxnSys.NegativeConcentrationException...``. | |
-The issue here is that the ODE simulator reached a slightly negative concentration, which RMG consequently interpreted as erroneous and stopped. It is basically a numerical | |
-artifact, as the equations should not allow a negative concentration. There are two options for dealing with this: | |
- | |
-1. Play around with the value for Atol in the DynamicSimulator block in your | |
- condition file...for example, maybe try tightening it (i.e. reduce the value) by a few orders of | |
- magnitude. | |
- | |
-2. Specify the non-negativity option (introduced in version 3.2). (This could cause other solver errors, so use this as a last-resort.) | |
- To use this option with the DASSL solver, specify non-negative in the condition.txt input file as follows: "DynamicSimulator: | |
- DASSL: non-negative". | |
- | |
-.. _Q2: | |
- | |
-During the RMG run, I see the warning: "Negative Steady State populations encountered during reservoir state method, falling back to Modified Strong Collision". Is this normal? | |
-================================================================================================================================================================================ | |
-This is a normal numerical error in the matrix algebra. It occurs sometimes | |
-with the reservoir state method due to the larger size of the matrices. RMG | |
-recovers from the error by trying the Modified Strong Collision method. | |
+.. _faq: | |
+ | |
+******************************** | |
+FAQ (Frequently-Asked Questions) | |
+******************************** | |
+ | |
+Questions | |
+--------- | |
+ | |
+ | |
+How do I represent molecular oxygen? | |
+==================================== | |
+ | |
+Use the ground electronic state of molecular oxygen, which contains a single | |
+bond and a diradical. The adjacency list should be :: | |
+ | |
+ (1) O2 0.1 (mol/cm3) | |
+ 1 O 1 {2,S} | |
+ 2 O 1 {1,S} | |
+ | |
+For more information, please see :ref:`Representing oxygen <oxygen>`. | |
+ | |
+.. _Q3: | |
+ | |
+My RMG run runs out of memory. How should I proceed? | |
+==================================================================================================================================== | |
+This type of error will probably look something like ``Exception in thread "main" java.lang.OutOfMemoryError: Java heap space``. | |
+Species take up a large amount of memory, and when the combined edge plus core gets into the range of tens of thousands | |
+of species, the run will typically crash even with around 1500 MB of RAM. | |
+If you haven't already done so, we recommend allocating as much memory as possible | |
+when executing the RMG job (for example, using the option -Xmx1600m will allocate 1600 MB of memory. See the section on :ref:`running RMG <running>`). If this still fails, there are several additional options: | |
+ | |
+1) Use the pruning feature introduced in RMG 3.2. | |
+ | |
+2) Use tighter bounds for MaxCarbonNumber, MaxRadicalNumber, etc. as appropriate for your system. | |
+ By reducing these values, RMG will generate fewer edge species. The idea is to intelligently choose the bounds to | |
+ exclude species that shouldn't be relevant for your particular system. | |
+ | |
+3) Relax the error tolerance (i.e. make it larger). RMG keeps expanding the reaction mechanism | |
+ until the flux to 'edge' species is below the tolerance you specify. Increasing this tolerance | |
+ means RMG will build a smaller mechanism (though it may be | |
+ missing some important reaction pathways). For more details see http://rmg.sourceforge.net/documentation/theory/enlarger.html and the reference on that page. | |
+ | |
+.. _Q4: | |
+ | |
+RMG has been running for multiple days and hasn't finished. Is there any way to make it run faster? | |
+=================================================================================================== | |
+Getting RMG to converge in a reasonable time, especially for large starting species, can be tricky. Depending on the options specified, the RMG developers | |
+have seen mechanism generation runs as long as ~10 days. During this time, RMG is running hundreds of reaction model simulations and considering tens of thousands of species, and perhaps over a million possible reactions. As such, it can be inconvenient to have it running for a long time on your personal single-core machine or laptop. So, if you have access to a computing cluster where you can run RMG, that can ease the burden. Some "tricks" that could be helpful in reducing time requirements for model generation (in no particular order): | |
+ | |
+1) Relax the error tolerance (i.e. make it larger). RMG keeps expanding the reaction mechanism | |
+ until the flux to 'edge' species is below the tolerance you specify. Increasing this tolerance | |
+ means RMG will stop sooner; it will take less time, but the model will be smaller and may be | |
+ missing some important reaction pathways. For more details see http://rmg.sourceforge.net/documentation/theory/enlarger.html and the reference on that page. | |
+ | |
+2) Setting the maximum number of carbons (or oxygens, heavy atoms, etc.) in a species, | |
+ if you're focusing on the species decomposition. | |
+ | |
+3) Run RMG for a single temperature / pressure (TemperatureModel, PressureModel). | |
+ | |
+4) If you are running RMG with pressure dependence, consider trying the less accurate | |
+ (but faster) ModifiedStrongCollision option. | |
+ | |
+5) If you are using a Seed Mechanism, set the GenerateReactions field to off. | |
+ | |
+.. _Q5: | |
+ | |
+How do I use the DASPK dynamic solver? | |
+====================================== | |
+RMG uses DASPK in a manner that requires a proprietary library known as DAEPACK, | |
+and unfortunately, we cannot distribute this library. If you acquire this | |
+library (for example, possibly through the Jacobian program from Numerica) we | |
+will be able to help you compile the Linux version of daspkAUTO.exe, but | |
+compiling in Windows has been tricky in our experience. | |
+ | |
+Hopefully, DASSL will meet your needs as it should provide all the functionality | |
+of DASPK, with the exception of sensitivity analysis (which you could do in | |
+Chemkin with the final model). | |
+ | |
+.. _Q6: | |
+ | |
+During the RMG run, I see the warning: "Frankie exceeded maximum number of iterations...". Is this normal? | |
+============================================================================================================ | |
+This occurs when the optimization algorithm for the frequency estimation code | |
+"Frankie" fails to converge. In these cases, the frequencies (used to calculate | |
+density of states in master equation calculations to account for pressure dependence) | |
+may not be as accurate as they could be. It is typical for some fraction of Frankie | |
+jobs to fail in this fashion. | |
+ | |
+.. _Q7: | |
+ | |
+During the RMG run, I see the warning: "fitted Er < 0 ...". Is this normal? | |
+=============================================================================== | |
+This occurs when the fitted activation energy for reverse reaction rate coefficients | |
+(based on equilibrium considerations) turns out to be negative. In these cases, the | |
+activation energy for the reverse reaction is adjusted to zero, with corresponding | |
+adjustment to the A-factor to ensure accurate equilibrium constant is maintained. | |
+It is typical for some fraction of the large number of reactions considered to | |
+produce this output. | |
+ | |
+.. _Q8: | |
+ | |
+I encounter a NegativeConcentrationException, causing the RMG run to fail. How should I proceed? | |
+============================================================================================================================================================================== | |
+The error message will read something like ``Exception in thread "main" jing.rxnSys.NegativeConcentrationException...``. | |
+The issue here is that the ODE simulator reached a slightly negative concentration, which RMG consequently interpreted as erroneous and stopped. It is basically a numerical | |
+artifact, as the equations should not allow a negative concentration. There are two options for dealing with this: | |
+ | |
+1. Play around with the value for Atol in the DynamicSimulator block in your | |
+ condition file...for example, maybe try tightening it (i.e. reduce the value) by a few orders of | |
+ magnitude. | |
+ | |
+2. Specify the non-negativity option (introduced in version 3.2). (This could cause other solver errors, so use this as a last-resort.) | |
+ To use this option with the DASSL solver, specify non-negative in the condition.txt input file as follows: "DynamicSimulator: | |
+ DASSL: non-negative". | |
+ | |
+.. _Q2: | |
+ | |
+During the RMG run, I see the warning: "Negative Steady State populations encountered during reservoir state method, falling back to Modified Strong Collision". Is this normal? | |
+================================================================================================================================================================================ | |
+This is a normal numerical error in the matrix algebra. It occurs sometimes | |
+with the reservoir state method due to the larger size of the matrices. RMG | |
+recovers from the error by trying the Modified Strong Collision method. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment