From a8e90b6b8de76c41bcf739dff30048f6e109c17e Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Wed, 7 Aug 2024 15:44:49 -0400 Subject: [PATCH 01/34] added module, check for privacy --- .gitmodules | 3 +++ private-test-suit | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 private-test-suit diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..b85d5d27 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "private-test-suit"] + path = private-test-suit + url = https://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@github.com/aidanfitz/private-test-suit.git diff --git a/private-test-suit b/private-test-suit new file mode 160000 index 00000000..8436f6f8 --- /dev/null +++ b/private-test-suit @@ -0,0 +1 @@ +Subproject commit 8436f6f8206da091d554136ec8d16d71979ffaa8 From 175d022efd331ff7d0a74407fd6c99764962ff82 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Wed, 7 Aug 2024 15:49:41 -0400 Subject: [PATCH 02/34] fix? --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index b85d5d27..0c4d3a75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "private-test-suit"] path = private-test-suit - url = https://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@github.com/aidanfitz/private-test-suit.git + url = https://@github.com/aidanfitz/private-test-suit.git From bda7d24cc22ccf361e29cc1ad2d4f49bedca1127 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Thu, 8 Aug 2024 13:05:30 -0400 Subject: [PATCH 03/34] secrect fix? --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9872cdec..7030a273 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ data/ test/ python/ private_tests +.gitmodules \ No newline at end of file From bbf9400d7ab7354cf87371cc62abaf7c973a1a06 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Thu, 8 Aug 2024 13:46:38 -0400 Subject: [PATCH 04/34] edit make file and private compilation --- Makefile | 16 +++++++++++++++- run_tests | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e602f2e5..e000903a 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,20 @@ doctest: cleandoc: rm -r -f $(DOC_DIR)/html; rm -r -f $(TEX_DIR); rm -r -f $(TST_DIR)/$(DOC_DIR)/html; rm -r -f $(TST_DIR)/$(TEX_DIR); rm -r -f $(DOC_DIR)/$(TST_DIR) +## ============ +## PRIVATE TESTS: +## ============ +PTST_DIR = private-test-suit +PTEST_SRC = $(notdir $(wildcard $(PTST_DIR)/*.F90)) +PTEST_OBJ = $(PTEST_SRC:.F90=.o) +PTEST_LNK = $(addprefix $(OBJ_DIR)/,$(PTEST_OBJ)) +PTST_OBJ = $(basename $(PTEST_SRC)) +PTST_BIN = $(addprefix $(BIN_DIR)/,$(PTST_OBJ)) + +privatetest: $(PTEST_LNK) $(SHARED_LNK) $(MODS_LNK) $(PTST_BIN) + +$(OBJ_DIR)/%.o: $(PTST_DIR)/%.F90 + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ ## =========== ## DAILY TESTS @@ -230,7 +244,7 @@ $(OBJ_DIR)/%.o: $(DTST_DIR)/%.F90 ## =========== ## ALL TESTS: ## =========== -test: all dailytest +test: all dailytest privatetest ## =========== ## DEBUG: diff --git a/run_tests b/run_tests index fbd9f6a9..babca993 100755 --- a/run_tests +++ b/run_tests @@ -70,4 +70,6 @@ tail -1 test12out.txt ./TestThermo87 ./TestThermo88 ./TestThermo89 -./TestThermo90 \ No newline at end of file +./TestThermo90 +./TestThermo91 +./TestThermo92 \ No newline at end of file From 4cf05bbc1dd0926b91e4a624693fc347ce634206 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Wed, 14 Aug 2024 15:21:41 -0400 Subject: [PATCH 05/34] testing? --- private-test-suit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private-test-suit b/private-test-suit index 8436f6f8..d887b03d 160000 --- a/private-test-suit +++ b/private-test-suit @@ -1 +1 @@ -Subproject commit 8436f6f8206da091d554136ec8d16d71979ffaa8 +Subproject commit d887b03dc99e0fbce20888db6fc8f6f28271c6c5 From 2945b2169d9e151458e8b105d7508c7e04eb54c8 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 26 Aug 2024 15:46:28 -0400 Subject: [PATCH 06/34] removed submodule --- .gitmodules | 3 --- private-test-suit | 1 - 2 files changed, 4 deletions(-) delete mode 160000 private-test-suit diff --git a/.gitmodules b/.gitmodules index 0c4d3a75..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "private-test-suit"] - path = private-test-suit - url = https://@github.com/aidanfitz/private-test-suit.git diff --git a/private-test-suit b/private-test-suit deleted file mode 160000 index d887b03d..00000000 --- a/private-test-suit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d887b03dc99e0fbce20888db6fc8f6f28271c6c5 From 62ebdbd92628d55c068f4f4486cba8895ff10bc4 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 26 Aug 2024 16:27:00 -0400 Subject: [PATCH 07/34] reorganized --- Makefile | 41 +++------ run_tests | 4 +- test/daily/TestThermo30.F90 | 73 ++++++++------- test/daily/TestThermo31.F90 | 81 ++++++++++------- test/daily/TestThermo32.F90 | 73 ++++++++------- test/daily/TestThermo33.F90 | 75 ++++++++------- test/daily/TestThermo40.F90 | 82 ++++++++++------- test/daily/TestThermo41.F90 | 177 +++++++++++++++++------------------- test/daily/TestThermo42.F90 | 105 ++++++++++----------- test/daily/TestThermo43.F90 | 66 +++++++------- test/daily/TestThermo44.F90 | 51 +++++------ test/daily/TestThermo45.F90 | 107 ++++++++++++++++------ test/daily/TestThermo46.F90 | 80 +++++++++++----- test/daily/TestThermo47.F90 | 77 ++++++++++------ test/daily/TestThermo48.F90 | 128 ++++++++++++++++++++------ test/daily/TestThermo49.F90 | 110 ++++++++++++++++------ test/daily/TestThermo50.F90 | 82 ++++++++++++----- test/daily/TestThermo51.F90 | 80 +++++++++++----- test/daily/TestThermo52.F90 | 113 +++++++++++++++++------ test/daily/TestThermo53.F90 | 80 ++++++++++------ test/daily/TestThermo54.F90 | 69 +++++++------- test/daily/TestThermo55.F90 | 83 +++++++---------- test/daily/TestThermo56.F90 | 77 ++++++---------- test/daily/TestThermo57.F90 | 88 +++++++----------- test/daily/TestThermo58.F90 | 89 +++++++----------- test/daily/TestThermo59.F90 | 87 +++++++----------- test/daily/TestThermo60.F90 | 87 +++++++----------- test/daily/TestThermo61.F90 | 83 +++++++---------- test/daily/TestThermo62.F90 | 176 ++++++++++++++++++----------------- test/daily/TestThermo63.F90 | 96 +++++++++---------- test/daily/TestThermo64.F90 | 175 ++++++++++++++++++----------------- test/daily/TestThermo65.F90 | 90 ------------------ test/daily/TestThermo70.F90 | 148 ------------------------------ test/daily/TestThermo71.F90 | 122 ------------------------- test/daily/TestThermo72.F90 | 120 ------------------------ test/daily/TestThermo73.F90 | 167 ---------------------------------- test/daily/TestThermo74.F90 | 152 ------------------------------- test/daily/TestThermo75.F90 | 127 -------------------------- test/daily/TestThermo76.F90 | 125 ------------------------- test/daily/TestThermo77.F90 | 152 ------------------------------- test/daily/TestThermo78.F90 | 123 ------------------------- test/daily/TestThermo80.F90 | 90 ------------------ test/daily/TestThermo81.F90 | 90 ------------------ test/daily/TestThermo82.F90 | 90 ------------------ test/daily/TestThermo83.F90 | 90 ------------------ test/daily/TestThermo84.F90 | 90 ------------------ test/daily/TestThermo85.F90 | 90 ------------------ test/daily/TestThermo86.F90 | 92 ------------------- test/daily/TestThermo87.F90 | 92 ------------------- test/daily/TestThermo88.F90 | 92 ------------------- test/daily/TestThermo89.F90 | 91 ------------------ test/daily/TestThermo90.F90 | 86 ------------------ 52 files changed, 1524 insertions(+), 3590 deletions(-) delete mode 100644 test/daily/TestThermo65.F90 delete mode 100644 test/daily/TestThermo70.F90 delete mode 100644 test/daily/TestThermo71.F90 delete mode 100644 test/daily/TestThermo72.F90 delete mode 100644 test/daily/TestThermo73.F90 delete mode 100644 test/daily/TestThermo74.F90 delete mode 100644 test/daily/TestThermo75.F90 delete mode 100644 test/daily/TestThermo76.F90 delete mode 100644 test/daily/TestThermo77.F90 delete mode 100644 test/daily/TestThermo78.F90 delete mode 100644 test/daily/TestThermo80.F90 delete mode 100644 test/daily/TestThermo81.F90 delete mode 100644 test/daily/TestThermo82.F90 delete mode 100644 test/daily/TestThermo83.F90 delete mode 100644 test/daily/TestThermo84.F90 delete mode 100644 test/daily/TestThermo85.F90 delete mode 100644 test/daily/TestThermo86.F90 delete mode 100644 test/daily/TestThermo87.F90 delete mode 100644 test/daily/TestThermo88.F90 delete mode 100644 test/daily/TestThermo89.F90 delete mode 100644 test/daily/TestThermo90.F90 diff --git a/Makefile b/Makefile index e000903a..fbc6551b 100644 --- a/Makefile +++ b/Makefile @@ -66,16 +66,13 @@ VPATH = $(SHARED_DIR) # Separate modules and non-modules modfiles := $(shell find src -name "Module*.f90") -srcfiles := $(shell find src -iname "*.f90" -and -not -name "Module*") - -## -OBJ_FILES = $(addprefix $(OBJ_DIR)/,$(patsubst %.f90, %.o, $(patsubst %.F90, %.o, $(notdir $(srcfiles))))) +srcfiles := $(shell find src -name "[^(Module)]*.f90") ## ======== ## MODULES: ## ======== -MODS_OBJ = $(patsubst %.f90, %.o, $(notdir $(modfiles))) -MODS_LNK = $(addprefix $(OBJ_DIR)/,$(MODS_OBJ)) +MODS_SRC = $(patsubst %.f90, %.o, $(notdir $(modfiles))) +MODS_LNK = $(addprefix $(OBJ_DIR)/,$(MODS_SRC)) ## ================= ## LIBRARIES: @@ -95,7 +92,7 @@ C_SRC = Thermochimica-c.C Thermochimica-cxx.C C_OBJ = $(C_SRC:.C=.o) C_LNK = $(addprefix $(OBJ_DIR)/,$(C_OBJ)) TC-C_LIB = libthermoc.a -C_LIB = $(OBJ_DIR)/$(TC-C_LIB) +C_LIB = $(OBJ_DIR)/$(TC-C_LIB) ## ============ ## OLD EXECUTABLES: @@ -130,19 +127,21 @@ ${BIN_DIR}: ${MKDIR_P} ${BIN_DIR} # Enforce module dependency rules -$(OBJ_FILES): $(srcfiles) $(MODS_LNK) -$(EXEC_LNK) $(DTST_LNK): $(MODS_LNK) +$(srcfiles): $(MODS_LNK) + +%.o: %.f90 + $(FC) $(FCFLAGS) -c $< -o $@ -$(OBJ_DIR)/%.o: %.f90 $(OBJ_DIR) +$(OBJ_DIR)/%.o: %.f90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ -$(OBJ_DIR)/%.o: %.F90 $(OBJ_DIR) +$(OBJ_DIR)/%.o: %.F90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ -$(OBJ_DIR)/%.o: $(TST_DIR)/%.F90 $(OBJ_DIR) +$(OBJ_DIR)/%.o: $(TST_DIR)/%.F90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ -$(OBJ_DIR)/%.o: $(EXE_DIR)/%.F90 $(OBJ_DIR) +$(OBJ_DIR)/%.o: $(EXE_DIR)/%.F90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ $(SHARED_LIB): $(SHARED_LNK) @@ -218,20 +217,6 @@ doctest: cleandoc: rm -r -f $(DOC_DIR)/html; rm -r -f $(TEX_DIR); rm -r -f $(TST_DIR)/$(DOC_DIR)/html; rm -r -f $(TST_DIR)/$(TEX_DIR); rm -r -f $(DOC_DIR)/$(TST_DIR) -## ============ -## PRIVATE TESTS: -## ============ -PTST_DIR = private-test-suit -PTEST_SRC = $(notdir $(wildcard $(PTST_DIR)/*.F90)) -PTEST_OBJ = $(PTEST_SRC:.F90=.o) -PTEST_LNK = $(addprefix $(OBJ_DIR)/,$(PTEST_OBJ)) -PTST_OBJ = $(basename $(PTEST_SRC)) -PTST_BIN = $(addprefix $(BIN_DIR)/,$(PTST_OBJ)) - -privatetest: $(PTEST_LNK) $(SHARED_LNK) $(MODS_LNK) $(PTST_BIN) - -$(OBJ_DIR)/%.o: $(PTST_DIR)/%.F90 - $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ ## =========== ## DAILY TESTS @@ -244,7 +229,7 @@ $(OBJ_DIR)/%.o: $(DTST_DIR)/%.F90 ## =========== ## ALL TESTS: ## =========== -test: all dailytest privatetest +test: all dailytest ## =========== ## DEBUG: diff --git a/run_tests b/run_tests index babca993..fbd9f6a9 100755 --- a/run_tests +++ b/run_tests @@ -70,6 +70,4 @@ tail -1 test12out.txt ./TestThermo87 ./TestThermo88 ./TestThermo89 -./TestThermo90 -./TestThermo91 -./TestThermo92 \ No newline at end of file +./TestThermo90 \ No newline at end of file diff --git a/test/daily/TestThermo30.F90 b/test/daily/TestThermo30.F90 index 187d96a4..b51945d5 100644 --- a/test/daily/TestThermo30.F90 +++ b/test/daily/TestThermo30.F90 @@ -1,8 +1,8 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo30.F90 - !> \brief Spot test - W-Au-Ar-O. + !> \file TestThermo51.F90 + !> \brief Spot test - 2250K with 55% Tc, 45% Ru. !> \author M.H.A. Piro, B.W.N. Fitzpatrick ! ! DISCLAIMER @@ -12,16 +12,16 @@ ! ! Revisions: ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 31/08/2018 B.W.N. Fitzpatrick Change system to fictive RKMP model - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a fictive system labelled W-Au-Ar-O. + !! results for the Pd-Ru-Tc-Mo system at 2250K with 55% Tc, 45% Ru. ! !------------------------------------------------------------------------------------------------------------- @@ -29,45 +29,59 @@ program TestThermo30 USE ModuleThermoIO USE ModuleThermo - USE ModuleGEMSolver implicit none + integer :: i,j,k + logical :: s1pass, s2pass, cppass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'WAuArO-1.dat' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1455D0 - dElementMass(74) = 1.95D0 ! W - dElementMass(79) = 1D0 ! Au - dElementMass(18) = 2D0 ! Ar - dElementMass(8) = 10D0 ! O + dTemperature = 2250D0 + dElementMass(43) = 0.55D0 ! Tc + dElementMass(44) = 0.45D0 ! Ru ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. ! Check results: if (INFOThermo == 0) then - if ((DABS(dGibbsEnergySys - (-4.620D5))/((-4.620D5))) < 1D-3) then - ! The test passed: - print *, 'TestThermo30: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo30: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) + if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo30: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo30: FAIL <---' @@ -76,9 +90,4 @@ program TestThermo30 call EXIT(1) end if - !call ThermoDebug - - ! Reset Thermochimica: - call ResetThermo - end program TestThermo30 diff --git a/test/daily/TestThermo31.F90 b/test/daily/TestThermo31.F90 index 6bf75f44..db98464d 100644 --- a/test/daily/TestThermo31.F90 +++ b/test/daily/TestThermo31.F90 @@ -1,8 +1,8 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo31.F90 - !> \brief Spot test - W-Au-Ar-O_02. + !> \file TestThermo52.F90 + !> \brief Spot test - 1973K with 30% Mo, 40% Pd, 30% Ru. !> \author M.H.A. Piro, B.W.N. Fitzpatrick ! ! DISCLAIMER @@ -12,16 +12,16 @@ ! ! Revisions: ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Change to a fictive database - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a fictive W-Au-Ar-O_02 system. + !! results for the Pd-Ru-Tc-Mo system at 1973K with 30% Mo, 40% Pd, 30% Ru. ! !------------------------------------------------------------------------------------------------------------- @@ -32,44 +32,60 @@ program TestThermo31 implicit none + integer :: i,j,k + logical :: s1pass, s2pass, s3pass, cppass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'WAuArO-2.dat' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1000D0 - dElementMass(74) = 1D0 ! W - dElementMass(79) = 3D0 ! Au - dElementMass(18) = 5D0 ! Ar - dElementMass(8) = 2D0 ! O + dTemperature = 1973D0 + dElementMass(42) = 0.3D0 ! Mo + dElementMass(46) = 0.4D0 ! Pd + dElementMass(44) = 0.3D0 ! Ru ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - !iPrintResultsMode = 2 - !call PrintResults - + s1pass = .FALSE. + s2pass = .FALSE. + s3pass = .FALSE. + cppass = .FALSE. ! Check results: if (INFOThermo == 0) then - if ((DABS(dGibbsEnergySys - (6.769E5))/((6.769D5))) < 1D-3) then - ! The test passed: - print *, 'TestThermo31: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo31: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) + if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'FCCN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. end if + end if + + if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo31: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo31: FAIL <---' @@ -78,9 +94,4 @@ program TestThermo31 call EXIT(1) end if - !call ThermoDebug - - ! Reset Thermochimica: - call ResetThermo - -end program TestThermo31 +end program TestThermo52 diff --git a/test/daily/TestThermo32.F90 b/test/daily/TestThermo32.F90 index f83aa3c4..7fe29a7e 100644 --- a/test/daily/TestThermo32.F90 +++ b/test/daily/TestThermo32.F90 @@ -1,8 +1,8 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo32.F90 - !> \brief Spot test - W-Au-Ar-Ne-O, 2452K. + !> \file TestThermo53.F90 + !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. !> \author M.H.A. Piro, B.W.N. Fitzpatrick ! ! DISCLAIMER @@ -15,13 +15,13 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use a fictive system - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a fictive system labelled W-Au-Ar-Ne-O at 2452K. + !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. ! !------------------------------------------------------------------------------------------------------------- @@ -32,46 +32,60 @@ program TestThermo32 implicit none + integer :: i,j,k + logical :: s1pass, s2pass, s3pass, cppass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'WAuArNeO-1.dat' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' ! Specify values: dPressure = 1D0 - dTemperature = 2452D0 - dElementMass(74) = 1.95D0 ! W - dElementMass(79) = 1D0 ! Au - dElementMass(18) = 2D0 ! Ar - dElementMass(8) = 10D0 ! O - dElementMass(10) = 10D0 ! Ne + dTemperature = 973D0 + dElementMass(42) = 0.1D0 ! Mo + dElementMass(46) = 0.3D0 ! Pd + dElementMass(44) = 0.6D0 ! Ru ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - !iPrintResultsMode = 2 - !call PrintResults - + s1pass = .FALSE. + s2pass = .FALSE. + s3pass = .FALSE. + cppass = .FALSE. ! Check results: if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (1.672D7))/((1.672D7))) < 1D-3) then - ! The test passed: - print *, 'TestThermo32: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo32: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) + if (DABS(dGibbsEnergySys - (-4.90922E+04))/(-4.90922E+04) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.80273D0)/0.80273D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.10757D0)/0.10757D0 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 8.9693E-02)/8.9693E-02 < 1D-3) s3pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 30.1581)/30.1581 < 1D-3) cppass = .TRUE. end if + end if + + if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo32: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo32: FAIL <---' @@ -80,7 +94,4 @@ program TestThermo32 call EXIT(1) end if - ! Reset Thermochimica: - call ResetThermo - end program TestThermo32 diff --git a/test/daily/TestThermo33.F90 b/test/daily/TestThermo33.F90 index 37426c9f..ba808c4b 100644 --- a/test/daily/TestThermo33.F90 +++ b/test/daily/TestThermo33.F90 @@ -1,8 +1,8 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo33.F90 - !> \brief Spot test - W-Au-Ar-Ne-O, 900K. + !> \file TestThermo54.F90 + !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. !> \author M.H.A. Piro, B.W.N. Fitzpatrick ! ! DISCLAIMER @@ -15,13 +15,13 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use a fictive system - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a fictive system labelled W-Au-Ar-Ne-O at 900K. + !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. ! !------------------------------------------------------------------------------------------------------------- @@ -32,44 +32,60 @@ program TestThermo33 implicit none + integer :: i,j,k + logical :: s1pass, s2pass, s3pass, cppass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'WAuArNeO-2.dat' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' ! Specify values: - dPressure = 2D0 - dTemperature = 900D0 - dElementMass(74) = 20D0 ! W - dElementMass(79) = 2D0 ! Au - dElementMass(18) = 7D0 ! Ar - dElementMass(8) = 5D0 ! O - dElementMass(10) = 1D0 ! Ne + dPressure = 1D0 + dTemperature = 1800D0 + dElementMass(43) = 0.01D0 ! Tc + dElementMass(46) = 0.09D0 ! Pd + dElementMass(42) = 0.9D0 ! Mo ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + s1pass = .FALSE. + s2pass = .FALSE. + s3pass = .FALSE. + cppass = .FALSE. ! Check results: if (INFOThermo == 0) then - if ((DABS(dMolFraction(1) - 0.75306881663786374)/0.75306881663786374 < 1D-3).AND. & - (DABS(dMolFraction(9) - 3.0917444033201544D-002)/3.0917444033201544D-002 < 1D-3).AND. & - (DABS(dGibbsEnergySys - (3.06480D+06))/(3.06480D+06) < 1D-3)) then - ! The test passed: - print *, 'TestThermo33: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo33: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) + if (DABS(dGibbsEnergySys - (-1.05595D5))/(-1.05595D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'BCCN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 9.7175E-03)/9.7175E-03 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.93597D0)/0.93597D0 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 5.4310E-02)/5.4310E-02 < 1D-3) s3pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 40.0333)/40.0333 < 1D-3) cppass = .TRUE. end if + end if + + if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo33: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo33: FAIL <---' @@ -78,9 +94,4 @@ program TestThermo33 call EXIT(1) end if - !call ThermoDebug - - ! Reset Thermochimica: - call ResetThermo - end program TestThermo33 diff --git a/test/daily/TestThermo40.F90 b/test/daily/TestThermo40.F90 index a1597414..8d56cca2 100644 --- a/test/daily/TestThermo40.F90 +++ b/test/daily/TestThermo40.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo40.F90 - !> \brief Spot test - 2250K with 80% Mo, 20% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo61.F90 + !> \brief Tricky SUBL vacancy-vacancy + !> \author M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,69 +14,79 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 24/06/2021 M. Poschmann Original code + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 2250K with 80% Mo, 20% Ru. + !> \details The purpose of this application test is to ensure that Thermochimica includes vacancy-vacancy + !! species in the SUBL model if appropriate. ! !------------------------------------------------------------------------------------------------------------- program TestThermo40 USE ModuleThermoIO + USE ModuleGEMSolver USE ModuleThermo + USE ModuleParseCS implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + integer :: i, j, k + real(8) :: gibbsCheck, p1check, p2check, s1check, dHeatCapacityCheck + logical :: subqPass, gasPass, cppass ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' ! Specify values: dPressure = 1D0 - dTemperature = 2250D0 - dElementMass(42) = 0.8D0 ! Mo - dElementMass(44) = 0.2D0 ! Ru + dTemperature = 1000D0 + dElementMass(8) = 2D0 ! O + dElementMass(22) = 0.5D0 ! Ti + + gibbsCheck = -6.24557D05 + p1check = 0.50000D0 + s1check = 0.99772D0 + p2check = 0.50114D0 + dHeatCapacityCheck = 54.8676 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - call Thermochimica + if (INFOThermo == 0) call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: + subqPass = .FALSE. + gasPass = .FALSE. + cppass = .FALSE. if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.44373D5))/(-1.44373E+5) < 1D-3) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'BCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.2D0)/0.2D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.8D0)/0.8D0 < 1D-3) s2pass = .TRUE. + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'Rutilesoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. end if - end do + end if + else if (cSolnPhaseName(j) == 'gas_ideal') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + gasPass = .TRUE. + end if end if end do - if (ABS(dHeatCapacity - 40.2724)/40.2724 < 1D-3) cppass = .TRUE. + if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (subqPass .AND. gasPass .AND. cppass) then ! The test passed: print *, 'TestThermo40: PASS' ! Reset Thermochimica: @@ -90,4 +100,10 @@ program TestThermo40 call EXIT(1) end if + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + end program TestThermo40 diff --git a/test/daily/TestThermo41.F90 b/test/daily/TestThermo41.F90 index 23b5b27e..a962f1b4 100644 --- a/test/daily/TestThermo41.F90 +++ b/test/daily/TestThermo41.F90 @@ -1,93 +1,84 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo41.F90 - !> \brief Spot test - 2250K with 48.86% Mo, 51.14% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 2250K with 48.86% Mo, 51.14% Ru. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo41 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - integer :: i,j,k - logical :: s1pass, s2pass, cppass - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2250D0 - dElementMass(42) = 4.3D0 ! Mo - dElementMass(44) = 4.5D0 ! Ru - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - call HeatCapacity - - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.30624D6))/(-1.30624D6) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.51136D0)/0.51136D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.48864D0)/0.48864D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 352.351)/352.351 < 1D-3) cppass = .TRUE. - end if - end if - - if (s1pass .AND. s2pass .AND. cppass) then - ! The test passed: - print *, 'TestThermo41: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo41: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo41 +program TestThermo41 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleGEMSolver + USE ModuleParseCS + + implicit none + + integer :: i,j,k + real(8) :: gibbsCheck, p1check, p2check, s1check + logical :: subqPass, gasPass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY //'ClAlNa.dat' + + ! Specify values: + dTemperature = 2000D0 + dPressure = 1.0D0 + dElementMass = 0D0 + dElementMass(17) = 2D0 ! Cl + dElementMass(13) = 1D0 ! Al + + gibbsCheck = -9.64834D+05 + p1check = 0.80307D0 + s1check = 3.8514D-03 + p2check = 0.60797D0 + + ! Specify output and debug modes: + iPrintResultsMode = 2 + lDebugMode = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + + subqPass = .FALSE. + gasPass = .FALSE. + if (INFOThermo == 0) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then + do i = 1, nSolnPhases + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'MSsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. + end if + end if + else if (cSolnPhaseName(j) == 'gas_ideal') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + gasPass = .TRUE. + end if + end if + end do + end if + end if + + if (subqPass .AND. gasPass) then + ! The test passed: + print *, 'TestThermo41: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo41: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo41 diff --git a/test/daily/TestThermo42.F90 b/test/daily/TestThermo42.F90 index d9f229bc..069cc67b 100644 --- a/test/daily/TestThermo42.F90 +++ b/test/daily/TestThermo42.F90 @@ -1,83 +1,72 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo42.F90 - !> \brief Spot test - 2310K with 22% Mo, 78% Tc. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 2310K with 22% Mo, 78% Tc. - ! - !------------------------------------------------------------------------------------------------------------- - program TestThermo42 USE ModuleThermoIO USE ModuleThermo + USE ModuleGEMSolver + USE ModuleParseCS implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + integer :: i,j,k + real(8) :: gibbsCheck, p1check, p2check, s1check + logical :: subqPass, solPass ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' - + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY //'ClAlNa.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 2310D0 - dElementMass(42) = 0.22D0 ! Mo - dElementMass(43) = 0.78D0 ! Tc + dTemperature = 1000D0 + dPressure = 1.0D0 + dElementMass = 0D0 + dElementMass(17) = 3D0 ! Cl + dElementMass(11) = 1D0 ! Na + dElementMass(13) = 1D0 ! Al + + gibbsCheck = -1.17685D+06 + p1check = 4.2176D0 + s1check = 0.23035D0 + p2check = 4.4748D-2 + + ! Specify output and debug modes: + iPrintResultsMode = 2 + lDebugMode = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - call Thermochimica - call HeatCapacity + if (INFOThermo == 0) call Thermochimica - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: + subqPass = .FALSE. + solPass = .FALSE. if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.5588D5))/(-1.5588D5) < 1D-3) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.66535D0)/0.66535D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.33465D0)/0.33465D0 < 1D-3) s2pass = .TRUE. + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'MSsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. end if - end do + end if + end if + end do + do i = 1, nConPhases + j = iAssemblage(i) + if (ADJUSTL(TRIM(cSpeciesName(j))) == 'NaCl_S1(s)') then + if (DABS((dMolesPhase(i)-p2check)/p2check) < 1D-3) then + solPass = .TRUE. + end if end if end do - if (ABS(dHeatCapacity - 111.198)/111.198 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (subqPass .AND. solPass) then ! The test passed: print *, 'TestThermo42: PASS' ! Reset Thermochimica: @@ -91,4 +80,10 @@ program TestThermo42 call EXIT(1) end if + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + end program TestThermo42 diff --git a/test/daily/TestThermo43.F90 b/test/daily/TestThermo43.F90 index 01fac0e1..d28735ab 100644 --- a/test/daily/TestThermo43.F90 +++ b/test/daily/TestThermo43.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo43.F90 - !> \brief Spot test - 400K with 40% Pd, 60% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo64.F90 + !> \brief Spot test - Nb-Zr-O-H 600 K. + !> \author M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,69 +14,65 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/31/2021 M. Poschmann Original code ! ! Purpose: ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 400K with 40% Pd, 60% Ru. + !> \details The purpose of this application test is to ensure that ternary mixing SUBL cases with only + !! one specified coefficient are handled correctly. ! !------------------------------------------------------------------------------------------------------------- program TestThermo43 USE ModuleThermoIO + USE ModuleGEMSolver USE ModuleThermo + USE ModuleParseCS implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + integer :: i, j + logical :: bccPass ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'ZIRC-test64.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 400D0 - dElementMass(46) = 0.4D0 ! Pd - dElementMass(44) = 0.6D0 ! Ru + dPressure = 100D0 + dTemperature = 600D0 + dElementMass(41) = 1D0 ! Nb + dElementMass(40) = 1D0 ! Zr + dElementMass(8) = 1D0 ! O + dElementMass(1) = 0.1D0 ! H + + ! Specify output mode: + iPrintResultsMode = 2 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - call Thermochimica - call HeatCapacity + if (INFOThermo == 0) call Thermochimica - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. + bccPass = .FALSE. ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.33770D4))/(-1.33770D4) < 1D-3) then + ! The fluorite oxide phase should be the only one stable at equilibrium. + if ((DABS((dGibbsEnergySys - (-5.24838E+05))/(-5.24838E+05))) < 1D-3) then do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 5.4695E-03)/5.4695E-03 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.99453D0)/0.99453D0 < 1D-3) s2pass = .TRUE. - end if - end do + j = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(j) == 'BCC_A2') then + bccPass = .TRUE. end if end do - if (ABS(dHeatCapacity - 25.7620)/25.7620 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (bccPass) then ! The test passed: print *, 'TestThermo43: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo44.F90 b/test/daily/TestThermo44.F90 index 453b8c4d..21226b89 100644 --- a/test/daily/TestThermo44.F90 +++ b/test/daily/TestThermo44.F90 @@ -1,8 +1,8 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo44.F90 - !> \brief Spot test - 1000K with 40% Pd, 60% Tc. + !> \file TestThermo65.F90 + !> \brief Spot test - 400K with 25% Mo, 25% Ru, 25% Pd, 25% Tc. !> \author M.H.A. Piro, B.W.N. Fitzpatrick ! ! DISCLAIMER @@ -14,14 +14,14 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/01/2021 M. Poschmann Original code + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1000K with 40% Pd, 60% Tc. + !! results for the Pd-Ru-Tc-Mo system at 400K with 25% Mo, 25% Ru, 25% Pd, 25% Tc. The database is + !! modified such that it contains only the BCC phase, but with ternary miscibility gap possible. ! !------------------------------------------------------------------------------------------------------------- @@ -33,50 +33,47 @@ program TestThermo44 implicit none integer :: i,j,k - logical :: s1pass, s2pass, cppass + logical :: p1pass, p2pass, p3pass ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'ternaryMiscibility-Kaye.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1000D0 - dElementMass(46) = 40D0 ! Pd - dElementMass(43) = 60D0 ! Tc + dTemperature = 400D0 + dElementMass(42) = 1D0 ! Mo + dElementMass(43) = 1D0 ! Tc + dElementMass(44) = 1D0 ! Ru + dElementMass(46) = 1D0 ! Pd ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. + p1pass = .FALSE. + p2pass = .FALSE. + p3pass = .FALSE. ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.04309D6))/(-5.04309D6) < 1D-3) then + if (DABS((dGibbsEnergySys - (-4.48928D4))/(-4.48928D4)) < 1D-3) then do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.4D0)/0.4D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.6D0)/0.6D0 < 1D-3) s2pass = .TRUE. - end if - end do + j = nElements + 1 - i + k = -iAssemblage(j) + if (cSolnPhaseName(k) == 'BCCN') then + if (DABS(dMolesPhase(j) - 1.8231D0)/1.8231D0 < 1D-3) p1pass = .TRUE. + if (DABS(dMolesPhase(j) - 1.1145D0)/1.1145D0 < 1D-3) p2pass = .TRUE. + if (DABS(dMolesPhase(j) - 1.0625D0)/1.0625D0 < 1D-3) p3pass = .TRUE. end if end do - if (ABS(dHeatCapacity - 3023.31)/3023.31 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (p1pass .AND. p2pass .AND. p3pass) then ! The test passed: print *, 'TestThermo44: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo45.F90 b/test/daily/TestThermo45.F90 index 6529d2b9..e359ad3c 100644 --- a/test/daily/TestThermo45.F90 +++ b/test/daily/TestThermo45.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo45.F90 - !> \brief Spot test - 1234K with 1% Tc, 99% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo70.F90 + !> \brief Spot test - 1500K with 70% Sn, 30% O. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,14 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1234K with 1% Tc, 99% Ru. + !! results for the Zirc Data file at 1500K with 0.7 mols of Sn and 0.3 of O. It also tests mixing term Case #2 + !! an #4 of the SUBI phase, with the presence of a miscibility gap. Permission was granted from N. Dupin + !! to make use of the Zirc DAT file. ! !------------------------------------------------------------------------------------------------------------- @@ -32,51 +33,105 @@ program TestThermo45 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: sfcheck5, sfcheck6, sfcheck7, sfcheck8 + real(8) :: pcheck1, pcheck2, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass + logical :: s5pass, s6pass, s7pass, s8pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1234D0 - dElementMass(43) = 1D0 ! Tc - dElementMass(44) = 99D0 ! Ru + dTemperature = 1500D0 + dElementMass(8) = 0.3D0 ! O + dElementMass(50) = 0.7D0 ! Sn + ! Liquid #1 + sfcheck1 = 1D0 !Sn + sfcheck2 = 1.55834D-2 !O-2 + sfcheck3 = 9.84334D-1 !Va + sfcheck4 = 8.22893D-5 !O2Sn + ! Liquid #2 + sfcheck5 = 1D0 !Sn + sfcheck6 = 9.12945D-01 !O-2 + sfcheck7 = 1.35005D-2 !Va + sfcheck8 = 7.35549D-2 !O2Sn + + pcheck1 = -310505D0 ! O + pcheck2 = -125800D0 ! Sn + gibbscheck = -181212D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. - cppass = .FALSE. + s3pass = .FALSE. + s4pass = .FALSE. + s5pass = .FALSE. + s6pass = .FALSE. + s7pass = .FALSE. + s8pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then - do i = 1, nSolnPhases + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then + !do i = 1, nSolnPhases + loop_checkPhases: do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do + end do + + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then + if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. + end if + end do end do end if - end do - if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. + end do loop_checkPhases end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass .AND. & + s5pass .AND. & + s6pass .AND. & + s7pass .AND. & + s8pass) then ! The test passed: print *, 'TestThermo45: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo46.F90 b/test/daily/TestThermo46.F90 index ed9be1c5..468b29f3 100644 --- a/test/daily/TestThermo46.F90 +++ b/test/daily/TestThermo46.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo46.F90 - !> \brief Spot test - 2250K with 55% Tc, 45% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo71.F90 + !> \brief Spot test - 2000K with 20% Cr, 70% Zr, 10% O. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,12 +15,14 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! ! Purpose: ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 2250K with 55% Tc, 45% Ru. + !\details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Zirc Data file at 1500K with 0.7 mols of Cn, 0.2 mols of Zr and 0.1 of O. It also + !! tests mixing term Case #2 an #3 of the SUBI phase. Permission was granted from N. Dupin to make + !! use of the Zirc DAT file. ! !------------------------------------------------------------------------------------------------------------- @@ -31,51 +33,79 @@ program TestThermo46 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3 + + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass + + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq.dat' ! Specify values: dPressure = 1D0 - dTemperature = 2250D0 - dElementMass(43) = 0.55D0 ! Tc - dElementMass(44) = 0.45D0 ! Ru + dTemperature = 2000D0 + dElementMass(8) = 0.1D0 ! O + dElementMass(24) = 0.2D0 ! Cr + dElementMass(40) = 0.7D0 ! Zr + + ! Liquid #1 + sfcheck1 = 3.30097D-1 !Cr + sfcheck2 = 6.69903D-1 !Zr + sfcheck3 = 9.99997D-1 !Va + + pcheck1 = -126330D0 ! Cr + pcheck2 = -628950D0 ! O + pcheck3 = -151241D0 ! Zr + + gibbscheck = -194030D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. - cppass = .FALSE. + s3pass = .FALSE. + !s4pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'CR+3') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'ZR+4') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + end if + end do end do + end if end do - if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass) then ! The test passed: print *, 'TestThermo46: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo47.F90 b/test/daily/TestThermo47.F90 index 6b11a025..28e3bfef 100644 --- a/test/daily/TestThermo47.F90 +++ b/test/daily/TestThermo47.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo47.F90 - !> \brief Spot test - 1973K with 30% Mo, 40% Pd, 30% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo72.F90 + !> \brief Spot test - 700K with 20% Cs, 80% Te. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,18 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1973K with 30% Mo, 40% Pd, 30% Ru. + ! results for the open literature Cs-Te assessment file at 700K with 0.2 mols of Cs and 0.8 of Te. + ! It also tests mixing term Case #5 of the SUBI phase. + !! The DAT file was pulled from the following article. However, modifications may have been made + !! from the original version: T. N. Pham Thi, J. C. Dumas, V. Bouineau, N. Dupin, C. Gueneau, S. Gosse, + !! P. Benigni, P. Maugis and J. Rogez, "Thermodynamic assessment of the Cs–Te binary system," Calphad, + !! vol. 48, pp. 1-12, 2015. ! !------------------------------------------------------------------------------------------------------------- @@ -32,55 +37,72 @@ program TestThermo47 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3 + real(8) :: pcheck1, pcheck2, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'CsTe-1.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1973D0 - dElementMass(42) = 0.3D0 ! Mo - dElementMass(46) = 0.4D0 ! Pd - dElementMass(44) = 0.3D0 ! Ru + dTemperature = 700D0 + dElementMass(52) = 0.8D0 ! Te + dElementMass(55) = 0.2D0 ! Cs + + ! Liquid #1 + sfcheck1 = 1D0 !Cs + sfcheck2 = 1.25D-1 !Cs2Te + sfcheck3 = 8.75D-1 !Te + + pcheck1 = -275754D0 !Cs + pcheck2 = -43828.1D0 !Te + + gibbscheck = -90213.3D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. s3pass = .FALSE. - cppass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQUID') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + end if + end do end do end if end do - if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass) then ! The test passed: print *, 'TestThermo47: PASS' ! Reset Thermochimica: @@ -94,4 +116,5 @@ program TestThermo47 call EXIT(1) end if + end program TestThermo47 diff --git a/test/daily/TestThermo48.F90 b/test/daily/TestThermo48.F90 index f6a8ff3c..87f3603b 100644 --- a/test/daily/TestThermo48.F90 +++ b/test/daily/TestThermo48.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo48.F90 - !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo73.F90 + !> \brief Spot test - 2500K with 33% Ca, 33% Mn, 33% S. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,18 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. + !! results for the open literature Ca-Mn-S assessment file at 2500K with 1 mol of Ca, 1 mol of Mn, and + !! 1 mol of S. It also tests mixing term Case #1, # 2, and #3 of the SUBI phase with a miscibility gap + !! present. + !! The DAT file was pulled from the following article. However, modifications may have been made + !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, + !! vol. 53, pp. 55-61, 2016. ! !------------------------------------------------------------------------------------------------------------- @@ -32,55 +37,120 @@ program TestThermo48 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4, sfcheck5 + real(8) :: sfcheck6, sfcheck7, sfcheck8, sfcheck9, sfcheck10 + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass, s5pass + logical :: s6pass, s7pass, s8pass, s9pass, s10pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'CaMnS.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1973D0 - dElementMass(42) = 0.1D0 ! Mo - dElementMass(46) = 0.3D0 ! Pd - dElementMass(44) = 0.6D0 ! Ru + dTemperature = 2500D0 + dElementMass(20) = 1D0 ! Ca + dElementMass(25) = 1D0 ! Mn + dElementMass(16) = 1D0 ! S + + ! Liquid #1 + sfcheck1 = 8.06572D-1 !Ca + sfcheck2 = 1.93428D-1 !Mn + sfcheck3 = 8.18084D-1 !S-2 + sfcheck4 = 1.81915D-1 !Va + sfcheck5 = 7.69522D-7 !S + + ! Liquid #2 + sfcheck6 = 1.96945D-2 !Ca + sfcheck7 = 9.80306D-1 !Mn + sfcheck8 = 1.6531D-3 !S-2 + sfcheck9 = 9.98344D-1 !Va + sfcheck10 = 3.04003D-6 !S + + pcheck1 = -251878D0 !Ca + pcheck2 = -201710D0 !Mn + pcheck3 = -457030D0 !S + + gibbscheck = -910619D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. s3pass = .FALSE. - cppass = .FALSE. + s4pass = .FALSE. + s5pass = .FALSE. + s6pass = .FALSE. + s7pass = .FALSE. + s8pass = .FALSE. + s9pass = .FALSE. + s10pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.27255D5))/(-1.27255D5) < 1D-3) then - do i = 1, nSolnPhases + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then + loop_checkPhases: do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13768D0)/0.13768D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.12624D0)/0.12624D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.73608D0)/0.73608D0 < 1D-3) s3pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then + if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. + end if + end do + end do + + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck9)/sfcheck9 < 1D-3) s9pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then + if (DABS(dSiteFraction(i,j,l) - sfcheck10)/sfcheck10 < 1D-3) s10pass = .TRUE. + end if + end do end do end if - end do - if (ABS(dHeatCapacity - 78.2758)/78.2758 < 1D-3) cppass = .TRUE. + end do loop_checkPhases end if end if - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass .AND. & + s5pass .AND. & + s6pass .AND. & + s7pass .AND. & + s8pass .AND. & + s9pass .AND. & + s10pass) then ! The test passed: print *, 'TestThermo48: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo49.F90 b/test/daily/TestThermo49.F90 index be903621..62bd0cdf 100644 --- a/test/daily/TestThermo49.F90 +++ b/test/daily/TestThermo49.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo49.F90 - !> \brief Spot test - 1000K with 40% Pd, 60% Tc. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo74.F90 + !> \brief Spot test - 1900K with , 2 mol Fe, 4 mol Mn, 3 mol S. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,18 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1000K with Pd and Tc. + !! results for the open literature Ca-Mn-S assessment file at 2500K with 1 mol of Ca, 1 mol of Mn, and + !! 1 mol of S. It also tests mixing term Case #1, # 2, and #3 of the SUBI phase with a miscibility gap + !! present. + !! The DAT file was pulled from the following article. However, modifications may have been made + !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, + !! vol. 53, pp. 55-61, 2016. ! !------------------------------------------------------------------------------------------------------------- @@ -32,52 +37,105 @@ program TestThermo49 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: sfcheck5, sfcheck6, sfcheck7 + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass + logical :: s5pass, s6pass, s7pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'FeMnCaS-1.dat' ! Specify values: dPressure = 1D0 dTemperature = 1900D0 - dElementMass = 0D0 - dElementMass(43) = 0.125D0 ! Tc - dElementMass(46) = 0.874D0 ! Pd + dElementMass(26) = 2D0 ! Fe + dElementMass(25) = 4D0 ! Mn + dElementMass(16) = 3D0 ! S + + ! Liquid #1 + sfcheck1 = 3.2331D-1 !Fe+2 + sfcheck2 = 6.7669D-1 !Mn+2 + sfcheck3 = 5.1140D-1 !S-2 + sfcheck4 = 4.8860D-1 !Va + + ! Liquid #2 + sfcheck5 = 7.7271D-1 !Fe+2 + sfcheck6 = 2.27D-1 !Mn+2 + sfcheck7 = 9.9999D-1 !Va + + pcheck1 = -121307D0 !Ca + pcheck2 = -155496D0 !Mn + pcheck3 = -360095D0 !S + + gibbscheck = -1944880D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. - cppass = .FALSE. + s3pass = .FALSE. + s4pass = .FALSE. + s5pass = .FALSE. + s6pass = .FALSE. + s7pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.28092D5))/(-1.28092D5) < 1D-3) then - do i = 1, nSolnPhases + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then + loop_checkPhases: do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.90358D0)/0.90358D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 9.6420E-02)/9.6420E-02 < 1D-3) s2pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do + end do + + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. + end if + end do end do end if - end do - if (ABS(dHeatCapacity - 679.082)/679.082 < 1D-3) cppass = .TRUE. + end do loop_checkPhases end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass .AND. & + s5pass .AND. & + s6pass .AND. & + s7pass) then ! The test passed: print *, 'TestThermo49: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo50.F90 b/test/daily/TestThermo50.F90 index 57fc2fe4..2cb30f33 100644 --- a/test/daily/TestThermo50.F90 +++ b/test/daily/TestThermo50.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo50.F90 - !> \brief Spot test - 1234K with 1% Tc, 99% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo75.F90 + !> \brief Spot test - 1500K with 0.5 Ca - 0.2 Mn - 0.4 Fe. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,18 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 02/24/2022 B.A.T. Breeden SUBI Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1234K with 1% Tc, 99% Ru. + !! results for the open literature Ca-Mn-S assessment file at 1500K with 0.5 mol of Ca, 0.2 mol of Mn, and + !! 0.4 mol of Fe. It also tests mixing term Case #8 of the SUBI phase. + !! + !! The DAT file was pulled from the following article. However, modifications may have been made + !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, + !! vol. 53, pp. 55-61, 2016. ! !------------------------------------------------------------------------------------------------------------- @@ -32,51 +37,80 @@ program TestThermo50 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'FeMnCaS-2.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1234D0 - dElementMass(43) = 1D0 ! Tc - dElementMass(44) = 99D0 ! Ru + dTemperature = 1500D0 + dElementMass(26) = 0.4D0 ! Fe + dElementMass(25) = 0.2D0 ! Mn + dElementMass(20) = 0.5D0 ! Ca + + ! Liquid #1 + sfcheck1 = 0.45455D0 !Ca+2 + sfcheck2 = 0.18182D0 !Mn+2 + sfcheck3 = 0.36364D0 !Fe+2 + sfcheck4 = 1.0D0 !Va + + pcheck1 = -113841.3D0 !Ca + pcheck2 = -92132.39D0 !Mn + pcheck3 = -114102.3D0 !Fe + + gibbscheck = -116594D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. - cppass = .FALSE. + s3pass = .FALSE. + s4pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do end do end if end do - if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass) then ! The test passed: print *, 'TestThermo50: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo51.F90 b/test/daily/TestThermo51.F90 index da3b2312..09effad3 100644 --- a/test/daily/TestThermo51.F90 +++ b/test/daily/TestThermo51.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo51.F90 - !> \brief Spot test - 2250K with 55% Tc, 45% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo76.F90 + !> \brief Spot test - 2500K with 1.0 Cs - 0.5 Te + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,18 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 02/24/2022 B.A.T. Breeden SUBI Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 2250K with 55% Tc, 45% Ru. + !! results for the open literature Cs-Te assessment file at 2500K with 1.0 mol of Cs and 0.5 mol of Te. + !! It also tests mixing term Case #9 of the SUBI phase. + !! The DAT file was pulled from the following article. However, modifications may have been made + !! from the original version: T. N. Pham Thi, J. C. Dumas, V. Bouineau, N. Dupin, C. Gueneau, S. Gosse, + !! P. Benigni, P. Maugis and J. Rogez, "Thermodynamic assessment of the Cs–Te binary system," Calphad, + !! vol. 48, pp. 1-12, 2015. ! !------------------------------------------------------------------------------------------------------------- @@ -32,51 +37,78 @@ program TestThermo51 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: pcheck1, pcheck2, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'CsTe-2.dat' ! Specify values: dPressure = 1D0 - dTemperature = 2250D0 - dElementMass(43) = 0.55D0 ! Tc - dElementMass(44) = 0.45D0 ! Ru + dTemperature = 2500D0 + dElementMass(52) = 0.5D0 ! Te + dElementMass(55) = 1.0D0 ! Cs + + ! Liquid #1 + sfcheck1 = 1D0 !Cs + sfcheck2 = 0.34222D0 !Va + sfcheck3 = 0.48667D0 !Cs2Te + sfcheck4 = 0.17111D0 !Te + + pcheck1 = -377921D0 !Cs + pcheck2 = -381967D0 !Te + + gibbscheck = -568905D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. - cppass = .FALSE. + s3pass = .FALSE. + s4pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQUID') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do end do + end if end do - if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass) then ! The test passed: print *, 'TestThermo51: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo52.F90 b/test/daily/TestThermo52.F90 index 9353c789..ff1ad4f9 100644 --- a/test/daily/TestThermo52.F90 +++ b/test/daily/TestThermo52.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo52.F90 - !> \brief Spot test - 1973K with 30% Mo, 40% Pd, 30% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo77.F90 + !> \brief Spot test - 2500K with 1.0 Nb - 0.7 Sn - 0.3 O. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,15 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 02/24/2022 B.A.T. Breeden SUBI Test Case ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1973K with 30% Mo, 40% Pd, 30% Ru. + !! results for the Zirc Data file at 2500K with 1.0 mol of Nb, 0.7 mols of Sn, and 0.3 of O. It also + !! tests mixing term Case #7 of the SUBI phase, with the presence of a miscibility gap. Permission + !! was granted from N. Dupin to make use of the Zirc DAT file. The data file for this test case has been + !! modified from it's original state. ! !------------------------------------------------------------------------------------------------------------- @@ -32,55 +34,108 @@ program TestThermo52 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: sfcheck5, sfcheck6, sfcheck7 + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass, s5pass + logical :: s6pass, s7pass, s8pass, s9pass, s10pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq_mod1.dat' ! Specify values: dPressure = 1D0 - dTemperature = 1973D0 - dElementMass(42) = 0.3D0 ! Mo - dElementMass(46) = 0.4D0 ! Pd - dElementMass(44) = 0.3D0 ! Ru + dTemperature = 2500D0 + dElementMass(41) = 1D0 ! Nb + dElementMass(8) = 0.3D0 ! O + dElementMass(50) = 0.7D0 ! Sn + + ! Liquid #1 + sfcheck1 = 0.99586D0 !Nb+2 + sfcheck2 = 0.327163D0 !O-2 + sfcheck3 = 0.563388D0 !Va + sfcheck4 = 0.109449D0 !NBO5/2 + + ! Liquid #2 + sfcheck5 = 0.418758D0 !Nb+2 + sfcheck6 = 0.581242D0 !Sn+2 + sfcheck7 = 0.99976D0 !Va + + pcheck1 = -183696D0 !Nb + pcheck2 = -593052D0 !O + pcheck3 = -249101D0 !Sn + + gibbscheck = -535982D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. s3pass = .FALSE. - cppass = .FALSE. + s4pass = .FALSE. + s5pass = .FALSE. + s6pass = .FALSE. + s7pass = .FALSE. + s8pass = .FALSE. + s9pass = .FALSE. + s10pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then - do i = 1, nSolnPhases + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then + loop_checkPhases: do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NBO5/2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do + end do + + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. + end if + end do end do end if - end do - if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. + end do loop_checkPhases end if end if - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass .AND. & + s5pass .AND. & + s6pass .AND. & + s7pass) then ! The test passed: print *, 'TestThermo52: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo53.F90 b/test/daily/TestThermo53.F90 index f9247a4a..f143a8b6 100644 --- a/test/daily/TestThermo53.F90 +++ b/test/daily/TestThermo53.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo53.F90 - !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo78.F90 + !> \brief Spot test - 2000K with 0.5 Cr - 0.8 Sn - 0.6 O. + !> \author M.H.A. Piro, B.A.T. Breeden ! ! DISCLAIMER ! ========== @@ -15,13 +15,14 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention + ! 02/24/2022 B.A.T. Breeden SUBI Test Case ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. + !! results for the Zirc Data file at 2000K with 0.5 mols of Cr, 0.8 mols of Sn, and 0.6 mols of O. + !! It also tests mixing term Case #12 of the SUBI phase. Permission was granted from N. Dupin to make + !! use of the Zirc DAT file. The data file for this test case has been modified from it's original state. ! !------------------------------------------------------------------------------------------------------------- @@ -32,55 +33,80 @@ program TestThermo53 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 + real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck + integer :: i,j,k,l + logical :: s1pass, s2pass, s3pass, s4pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq_mod2.dat' ! Specify values: dPressure = 1D0 - dTemperature = 973D0 - dElementMass(42) = 0.1D0 ! Mo - dElementMass(46) = 0.3D0 ! Pd - dElementMass(44) = 0.6D0 ! Ru + dTemperature = 2000D0 + dElementMass(24) = 0.5D0 ! Cr + dElementMass(50) = 0.8D0 ! Sn + dElementMass(8) = 0.6D0 ! O + + ! Liquid #1 + sfcheck1 = 0.50000D0 !Cr+3 + sfcheck2 = 0.50000D0 !Sn+2 + sfcheck3 = 0.76923D0 !Va + sfcheck4 = 0.23077D0 !O2SN + + pcheck1 = -723575D0 !Cr + pcheck2 = -467079D0 !O + pcheck3 = -780227D0 !Sn + + gibbscheck = -1266220D0 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. s2pass = .FALSE. s3pass = .FALSE. - cppass = .FALSE. + s4pass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-4.90922E+04))/(-4.90922E+04) < 1D-3) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & + (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & + (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & + (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then do i = 1, nSolnPhases k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.80273D0)/0.80273D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.10757D0)/0.10757D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 8.9693E-02)/8.9693E-02 < 1D-3) s3pass = .TRUE. - end if + if (cSolnPhaseName(k) == 'IONIC_LIQ') then + do j = 1, 2 + do l = 1, nConstituentSublattice(i,j) + if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'CR+3') then + if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then + if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then + if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. + else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then + if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. + end if + end do end do end if end do - if (ABS(dHeatCapacity - 30.1581)/30.1581 < 1D-3) cppass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (s1pass .AND. & + s2pass .AND. & + s3pass .AND. & + s4pass) then ! The test passed: print *, 'TestThermo53: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo54.F90 b/test/daily/TestThermo54.F90 index 9b6fc159..19ca6e09 100644 --- a/test/daily/TestThermo54.F90 +++ b/test/daily/TestThermo54.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo54.F90 - !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick + !> \file TestThermo80.F90 + !> \brief SUBM first sublattice binary mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -15,13 +15,13 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code - ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. + !! results a SUBM phase with a binary excess mixing term on the first sublattice. ! !------------------------------------------------------------------------------------------------------------- @@ -32,55 +32,48 @@ program TestThermo54 implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 1800D0 - dElementMass(43) = 0.01D0 ! Tc - dElementMass(46) = 0.09D0 ! Pd - dElementMass(42) = 0.9D0 ! Mo + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 0.1D0 ! Li + dElementMass(11) = 0.4D0 ! Na + ! dElementMass(17) = 0D0 ! Cl + dElementMass(9) = 1.6D0 ! F + dElementMass(26) = 0.3D0 ! Fe + ! dElementMass(8) = 3D0 ! O + dElementMass(19) = 0.2D0 ! K + + gibbscheck = -4.89601D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - call HeatCapacity + ! Check results: s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.05595D5))/(-1.05595D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'BCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 9.7175E-03)/9.7175E-03 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.93597D0)/0.93597D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 5.4310E-02)/5.4310E-02 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 40.0333)/40.0333 < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo54: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo55.F90 b/test/daily/TestThermo55.F90 index 1a173c1a..36eaaaf7 100644 --- a/test/daily/TestThermo55.F90 +++ b/test/daily/TestThermo55.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo55.F90 - !> \brief Spot test - Ni-Cr-Fe-H 300 K. - !> \author M. Poschmann + !> \file TestThermo81.F90 + !> \brief SUBM first sublattice binary mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,81 +14,66 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 05/21/2020 M. Poschmann Original code + ! 05/14/2013 M.H.A. Piro Original code + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including magnetic solution species and excess magnetic terms. + !! results a SUBM phase with a binary excess mixing term on the first sublattice. ! !------------------------------------------------------------------------------------------------------------- program TestThermo55 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, iFirst - real(8) :: T, B, StructureFactor - logical :: fccPass, bccPass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC-noSUBI.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1000D0 - dTemperature = 300D0 - dElementMass(23) = 0.1D0 ! V - dElementMass(24) = 1D0 ! Cr - dElementMass(26) = 2D0 ! Fe - dElementMass(28) = 1D0 ! Ni - dElementMass(50) = 0.1D0 ! Sn - dElementMass(1) = 1D0 ! H - - ! Specify output mode: - iPrintResultsMode = 2 + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 0.1D0 ! Li + dElementMass(11) = 0.4D0 ! Na + ! dElementMass(17) = 0D0 ! Cl + ! dElementMass(9) = 1.6D0 ! F + dElementMass(26) = 0.3D0 ! Fe + dElementMass(8) = 0.8D0 ! O + dElementMass(19) = 0.2D0 ! K + + gibbscheck = -5.12663D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica + + ! Check results: + s1pass = .FALSE. - fccPass = .FALSE. - bccPass = .FALSE. ! Check results: if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (-4.96674D04))/((-4.96674D04))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'FCC_A1') then - call CompMagneticTemperatureMoment(j,T,B) - iFirst = nSpeciesPhase(j-1) + 1 - StructureFactor = dCoeffGibbsMagnetic(iFirst,3) - T = -T * StructureFactor - B = -B * StructureFactor - if ((DABS((T-97.24D0)/97.24D0) < 1D-3) .AND. (DABS((B-0.13862D0)/0.13862D0) < 1D-3)) then - fccPass = .TRUE. - end if - else if (cSolnPhaseName(j) == 'BCC_A2') then - call CompMagneticTemperatureMoment(j,T,B) - if ((DABS((T-641.38D0)/641.38D0) < 1D-3) .AND. (DABS((B-1.5248D0)/1.5248D0) < 1D-3)) then - bccPass = .TRUE. - end if - end if - end do + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (fccPass .AND. bccPass) then + if (s1pass) then ! The test passed: print *, 'TestThermo55: PASS' ! Reset Thermochimica: @@ -102,10 +87,4 @@ program TestThermo55 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo55 diff --git a/test/daily/TestThermo56.F90 b/test/daily/TestThermo56.F90 index a7c6a147..16315895 100644 --- a/test/daily/TestThermo56.F90 +++ b/test/daily/TestThermo56.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo56.F90 - !> \brief Spot test - Fe-Cu-C 1400 K. - !> \author M. Poschmann + !> \file TestThermo82.F90 + !> \brief SUBM second sublattice binary mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,79 +14,66 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 06/30/2020 M. Poschmann Original code - ! 06/05/2024 A.E.F. Fitzsimmons Naming convention change + ! 05/14/2013 M.H.A. Piro Original code + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including magnetic solution species and excess magnetic terms. Also tests - !! G-type asymmetric (and symmetric) excess mixing energy implementation for SUBG. + !! results a SUBM phase with a binary excess mixing term on the second sublattice. ! !------------------------------------------------------------------------------------------------------------- program TestThermo56 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, iFirst - real(8) :: T, B, StructureFactor - logical :: fccPass, liquidPass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CuFeC-Kang.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dTemperature = 1400D0 + dTemperature = 1000 dPressure = 1.0D0 dElementMass = 0D0 - dElementMass(6) = 1.0D0 ! C - dElementMass(26) = 1.0D0 ! Fe - dElementMass(29) = 1.0D0 ! Cu + + dElementMass(3) = 1.2D0 ! Li + ! dElementMass(11) = 0.4D0 ! Na + dElementMass(17) = 0.5D0 ! Cl + dElementMass(9) = 0.3D0 ! F + ! dElementMass(26) = 0.3D0 ! Fe + dElementMass(8) = 0.2D0 ! O + ! dElementMass(19) = 0.2D0 ! K + + gibbscheck = -4.52110D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica + + ! Check results: + s1pass = .FALSE. - fccPass = .FALSE. - liquidPass = .FALSE. ! Check results: if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (-1.73325D05))/((-1.73325D05))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'FCC_A1') then - call CompMagneticTemperatureMoment(j,T,B) - iFirst = nSpeciesPhase(j-1) + 1 - StructureFactor = dCoeffGibbsMagnetic(iFirst,3) - T = -T * StructureFactor - B = -B * StructureFactor - if ((DABS((T-59.4D0)/59.4D0) < 1D-3) .AND. (DABS((B-0.62064D0)/0.62064D0) < 1D-3)) then - fccPass = .TRUE. - end if - else if (cSolnPhaseName(j) == 'Liquid') then - if (DABS((dMolesPhase(nElements + 1 - i)-2.9666D0)/2.9666D0) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j))-4.4975D-2)/4.4975D-2) < 1D-3) then - liquidPass = .TRUE. - end if - end if - end if - end do + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (fccPass .AND. liquidPass) then + if (s1pass) then ! The test passed: print *, 'TestThermo56: PASS' ! Reset Thermochimica: @@ -100,10 +87,4 @@ program TestThermo56 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo56 diff --git a/test/daily/TestThermo57.F90 b/test/daily/TestThermo57.F90 index 37c9ea91..96a827e0 100644 --- a/test/daily/TestThermo57.F90 +++ b/test/daily/TestThermo57.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo57.F90 - !> \brief Spot test - Fe-Ti-V-O 2000 K. - !> \author M. Poschmann + !> \file TestThermo83.F90 + !> \brief SUBM first sublattice ternary mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,84 +14,66 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 08/10/2020 M. Poschmann Original code - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 05/14/2013 M.H.A. Piro Original code + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including SUBQ solution phase with compound constituent. + !! results a SUBM phase with a ternary excess mixing term on the first sublattice. ! !------------------------------------------------------------------------------------------------------------- program TestThermo57 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, hemaPass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(8) = 2D0 ! O - dElementMass(22) = 0.5D0 ! Ti - dElementMass(23) = 0.5D0 ! V - dElementMass(26) = 0.5D0 ! Fe - - gibbsCheck = -1.21336D06 - p1check = 0.36803D0 - p2check = 0.47842D0 - s1check = 1.0885D-2 - s2check = 5.6813D-2 - dHeatCapacityCheck = 186.933 + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 0.1D0 ! Li + dElementMass(11) = 0.4D0 ! Na + dElementMass(17) = 1.6D0 ! Cl + ! dElementMass(9) = 1.6D0 ! F + dElementMass(26) = 0.3D0 ! Fe + ! dElementMass(8) = 3D0 ! O + dElementMass(19) = 0.2D0 ! K + + gibbscheck = -5.89226D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - call HeatCapacity + call Thermochimica - subqPass = .FALSE. - hemaPass = .FALSE. - cppass = .FALSE. + ! Check results: + s1pass = .FALSE. + + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'Hemasoln') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - hemaPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. hemaPass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo57: PASS' ! Reset Thermochimica: @@ -105,10 +87,4 @@ program TestThermo57 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo57 diff --git a/test/daily/TestThermo58.F90 b/test/daily/TestThermo58.F90 index b8ae2993..d2482e21 100644 --- a/test/daily/TestThermo58.F90 +++ b/test/daily/TestThermo58.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo58.F90 - !> \brief Spot test - Fe-Ti-O 2000 K. - !> \author M. Poschmann + !> \file TestThermo84.F90 + !> \brief SUBM second sublattice ternary mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,85 +14,66 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 08/10/2020 M. Poschmann Original code - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 05/14/2013 M.H.A. Piro Original code + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including SUBQ solution phase. + !! results a SUBM phase with a ternary excess mixing term on the second sublattice. ! !------------------------------------------------------------------------------------------------------------- program TestThermo58 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, k, l - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(8) = 2D0 ! O - dElementMass(22) = 0.5D0 ! Ti - dElementMass(26) = 0.5D0 ! Fe - - gibbsCheck = -1.00057D06 - p1check = 1.1768D0 - p2check = 0.14544D0 - s1check = 5.1547D-2 - s2check = 2.9406D-7 - dHeatCapacityCheck = 105.954 + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + ! dElementMass(3) = 1.2D0 ! Li + ! dElementMass(11) = 0.4D0 ! Na + dElementMass(17) = 0.5D0 ! Cl + dElementMass(9) = 0.3D0 ! F + ! dElementMass(26) = 0.3D0 ! Fe + dElementMass(8) = 0.2D0 ! O + dElementMass(19) = 1.2D0 ! K + + gibbscheck = -1.76944D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - call HeatCapacity + call Thermochimica - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. + ! Check results: + s1pass = .FALSE. + + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - do l = nSpeciesPhase(j-1) + 1, nSpeciesPhase(j) - if (DABS((dMolFraction(nSpeciesPhase(j-1)+5)-s2check)/s2check) < 1D-3) then - gasPass = .TRUE. - end if - end do - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. gasPass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo58: PASS' ! Reset Thermochimica: @@ -106,10 +87,4 @@ program TestThermo58 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo58 diff --git a/test/daily/TestThermo59.F90 b/test/daily/TestThermo59.F90 index 071f512e..0a35ef03 100644 --- a/test/daily/TestThermo59.F90 +++ b/test/daily/TestThermo59.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo59.F90 - !> \brief Spot test - Fe-V-O 2000 K. - !> \author M. Poschmann + !> \file TestThermo85.F90 + !> \brief SUBM all mixing. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,83 +14,66 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 08/10/2020 M. Poschmann Original code - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 05/14/2013 M.H.A. Piro Original code + ! 11/04/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including SUBQ solution phase with compound constituent. + !! results a SUBM phase with all excess mixing terms. ! !------------------------------------------------------------------------------------------------------------- program TestThermo59 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(8) = 2D0 ! O - dElementMass(23) = 0.5D0 ! V - dElementMass(26) = 0.5D0 ! Fe - - gibbsCheck = -8.92127D05 - p1check = 0.80434D0 - p2check = 4.0631D-2 - s1check = 0.17025D0 - s2check = 0.99973D0 - dHeatCapacityCheck = 133.351 + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 1D0 ! Li + dElementMass(11) = 2D0 ! Na + dElementMass(17) = 2D0 ! Cl + dElementMass(9) = 12D0 ! F + dElementMass(26) = 3D0 ! Fe + dElementMass(8) = 1D0 ! O + dElementMass(19) = 4D0 ! K + + gibbscheck = -5.64332D05 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - call HeatCapacity + call Thermochimica - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. + ! Check results: + s1pass = .FALSE. + + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. gasPass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo59: PASS' ! Reset Thermochimica: @@ -104,10 +87,4 @@ program TestThermo59 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo59 diff --git a/test/daily/TestThermo60.F90 b/test/daily/TestThermo60.F90 index 9a436322..67ea88a1 100644 --- a/test/daily/TestThermo60.F90 +++ b/test/daily/TestThermo60.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo60.F90 - !> \brief Spot test - Ti-V-O 2000 K. - !> \author M. Poschmann + !> \file TestThermo86.F90 + !> \brief SUBM mistmatch coefficients and charges. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,83 +14,68 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 08/10/2020 M. Poschmann Original code + ! 05/14/2013 M.H.A. Piro Original code + ! 11/08/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for a system including SUBQ solution phase with compound constituent. + !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. + !! Two constituents on first sublattice are tested. ! !------------------------------------------------------------------------------------------------------------- program TestThermo60 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, hemaPass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(8) = 2D0 ! O - dElementMass(22) = 0.5D0 ! Ti - dElementMass(23) = 0.5D0 ! V - - gibbsCheck = -1.09209D06 - p1check = 0.60817D0 - p2check = 0.18563D0 - s1check = 0.25897D0 - s2check = 0.34107D0 - dHeatCapacityCheck = 100.960 + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 2D0 ! Li + ! dElementMass(11) = 2D0 ! Na + ! dElementMass(17) = 4D0 ! Cl + ! dElementMass(9) = 5D0 ! F + ! dElementMass(26) = 3D0 ! Fe + dElementMass(8) = 3D0 ! O + ! dElementMass(19) = 4D0 ! K + dElementMass(40) = 1D0 ! Zr + + gibbscheck = -1.01677D05 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - call HeatCapacity + call Thermochimica - subqPass = .FALSE. - hemaPass = .FALSE. - cppass = .FALSE. + ! Check results: + s1pass = .FALSE. + + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'Hemasoln') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - hemaPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. hemaPass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo60: PASS' ! Reset Thermochimica: @@ -104,10 +89,4 @@ program TestThermo60 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo60 diff --git a/test/daily/TestThermo61.F90 b/test/daily/TestThermo61.F90 index b0f22ec0..04a0a2b3 100644 --- a/test/daily/TestThermo61.F90 +++ b/test/daily/TestThermo61.F90 @@ -1,9 +1,9 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestThermo61.F90 - !> \brief Tricky SUBL vacancy-vacancy - !> \author M. Poschmann + !> \file TestThermo87.F90 + !> \brief SUBM mistmatch coefficients and charges. + !> \author M.H.A. Piro, M. Poschmann ! ! DISCLAIMER ! ========== @@ -14,79 +14,68 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 24/06/2021 M. Poschmann Original code + ! 05/14/2013 M.H.A. Piro Original code + ! 11/08/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! ! Purpose: ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica includes vacancy-vacancy - !! species in the SUBL model if appropriate. + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. + !! Two constituents on second sublattice are tested. ! !------------------------------------------------------------------------------------------------------------- program TestThermo61 USE ModuleThermoIO - USE ModuleGEMSolver USE ModuleThermo - USE ModuleParseCS implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dPressure = 1D0 - dTemperature = 1000D0 - dElementMass(8) = 2D0 ! O - dElementMass(22) = 0.5D0 ! Ti + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 0D0 ! Li + dElementMass(11) = 0D0 ! Na + dElementMass(17) = 2D0 ! Cl + dElementMass(9) = 0D0 ! F + dElementMass(26) = 0D0 ! Fe + dElementMass(8) = 1D0 ! O + dElementMass(19) = 0D0 ! K + dElementMass(40) = 1D0 ! Zr - gibbsCheck = -6.24557D05 - p1check = 0.50000D0 - s1check = 0.99772D0 - p2check = 0.50114D0 - dHeatCapacityCheck = 54.8676 + gibbscheck = -1.50268D04 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - call HeatCapacity + call Thermochimica + + ! Check results: + s1pass = .FALSE. - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'Rutilesoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. gasPass .AND. cppass) then + if (s1pass) then ! The test passed: print *, 'TestThermo61: PASS' ! Reset Thermochimica: @@ -100,10 +89,4 @@ program TestThermo61 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo61 diff --git a/test/daily/TestThermo62.F90 b/test/daily/TestThermo62.F90 index 53d9e08f..827f9651 100644 --- a/test/daily/TestThermo62.F90 +++ b/test/daily/TestThermo62.F90 @@ -1,84 +1,92 @@ -program TestThermo62 - - USE ModuleThermoIO - USE ModuleThermo - USE ModuleGEMSolver - USE ModuleParseCS - - implicit none - - integer :: i,j,k - real(8) :: gibbsCheck, p1check, p2check, s1check - logical :: subqPass, gasPass - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY //'ClAlNa.dat' - - ! Specify values: - dTemperature = 2000D0 - dPressure = 1.0D0 - dElementMass = 0D0 - dElementMass(17) = 2D0 ! Cl - dElementMass(13) = 1D0 ! Al - - gibbsCheck = -9.64834D+05 - p1check = 0.80307D0 - s1check = 3.8514D-03 - p2check = 0.60797D0 - - ! Specify output and debug modes: - iPrintResultsMode = 2 - lDebugMode = .FALSE. - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - - subqPass = .FALSE. - gasPass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'MSsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end do - end if - end if - - if (subqPass .AND. gasPass) then - ! The test passed: - print *, 'TestThermo62: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo62: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - -end program TestThermo62 + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo88.F90 + !> \brief SUBM mismatch coefficients and charges. + !> \author M.H.A. Piro, M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 11/11/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. + !! Two constituents on both sublattices are tested. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo62 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + real(8) :: gibbscheck + logical :: s1pass + + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' + + ! Specify values: + dTemperature = 1000 + dPressure = 1.0D0 + dElementMass = 0D0 + + dElementMass(3) = 3D0 ! Li + dElementMass(11) = 0D0 ! Na + dElementMass(17) = 0D0 ! Cl + dElementMass(9) = 5D0 ! F + dElementMass(26) = 0D0 ! Fe + dElementMass(8) = 1D0 ! O + dElementMass(19) = 0D0 ! K + dElementMass(40) = 1D0 ! Zr + + gibbscheck = -1.90265D05 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + ! Check results: + s1pass = .FALSE. + + ! Check results: + if (INFOThermo == 0) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. + end if + end if + + if (s1pass) then + ! The test passed: + print *, 'TestThermo62: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo62: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo62 diff --git a/test/daily/TestThermo63.F90 b/test/daily/TestThermo63.F90 index 9ba721c6..21d27eac 100644 --- a/test/daily/TestThermo63.F90 +++ b/test/daily/TestThermo63.F90 @@ -1,72 +1,80 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo89.F90 + !> \brief SUBM worst case scenario. + !> \author M.H.A. Piro, M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 11/11/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results a SUBM phase where everything and the kitchen sink is thrown in. + ! + !------------------------------------------------------------------------------------------------------------- + program TestThermo63 USE ModuleThermoIO USE ModuleThermo - USE ModuleGEMSolver - USE ModuleParseCS implicit none - integer :: i,j,k - real(8) :: gibbsCheck, p1check, p2check, s1check - logical :: subqPass, solPass + real(8) :: gibbscheck + logical :: s1pass + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY //'ClAlNa.dat' + cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' ! Specify values: - dTemperature = 1000D0 + dTemperature = 1000 dPressure = 1.0D0 dElementMass = 0D0 - dElementMass(17) = 3D0 ! Cl - dElementMass(11) = 1D0 ! Na - dElementMass(13) = 1D0 ! Al - gibbsCheck = -1.17685D+06 - p1check = 4.2176D0 - s1check = 0.23035D0 - p2check = 4.4748D-2 + dElementMass(3) = 1D0 ! Li + dElementMass(11) = 2D0 ! Na + dElementMass(17) = 2D0 ! Cl + dElementMass(9) = 12D0 ! F + dElementMass(26) = 3D0 ! Fe + dElementMass(8) = 11D0 ! O + dElementMass(19) = 4D0 ! K + dElementMass(40) = 5D0 ! Zr - ! Specify output and debug modes: - iPrintResultsMode = 2 - lDebugMode = .FALSE. + gibbscheck = -7.61628D05 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica - subqPass = .FALSE. - solPass = .FALSE. + ! Check results: + s1pass = .FALSE. + + ! Check results: if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'MSsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - end if - end do - do i = 1, nConPhases - j = iAssemblage(i) - if (ADJUSTL(TRIM(cSpeciesName(j))) == 'NaCl_S1(s)') then - if (DABS((dMolesPhase(i)-p2check)/p2check) < 1D-3) then - solPass = .TRUE. - end if - end if - end do + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. end if end if - if (subqPass .AND. solPass) then + if (s1pass) then ! The test passed: print *, 'TestThermo63: PASS' ! Reset Thermochimica: @@ -80,10 +88,4 @@ program TestThermo63 call EXIT(1) end if - ! Destruct everything: - if (INFOThermo == 0) call ResetThermoAll - - ! Call the debugger: - call ThermoDebug - end program TestThermo63 diff --git a/test/daily/TestThermo64.F90 b/test/daily/TestThermo64.F90 index 6d3fbbc5..6209decd 100644 --- a/test/daily/TestThermo64.F90 +++ b/test/daily/TestThermo64.F90 @@ -1,89 +1,86 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo64.F90 - !> \brief Spot test - Nb-Zr-O-H 600 K. - !> \author M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 08/31/2021 M. Poschmann Original code - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that ternary mixing SUBL cases with only - !! one specified coefficient are handled correctly. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo64 - - USE ModuleThermoIO - USE ModuleGEMSolver - USE ModuleThermo - USE ModuleParseCS - - implicit none - - integer :: i, j - logical :: bccPass - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC-test64.dat' - - ! Specify values: - dPressure = 100D0 - dTemperature = 600D0 - dElementMass(41) = 1D0 ! Nb - dElementMass(40) = 1D0 ! Zr - dElementMass(8) = 1D0 ! O - dElementMass(1) = 0.1D0 ! H - - ! Specify output mode: - iPrintResultsMode = 2 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - - bccPass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS((dGibbsEnergySys - (-5.24838E+05))/(-5.24838E+05))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'BCC_A2') then - bccPass = .TRUE. - end if - end do - end if - end if - - if (bccPass) then - ! The test passed: - print *, 'TestThermo64: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo64: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo64 + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo89.F90 + !> \brief SUBM worst case scenario. + !> \author M.H.A. Piro, M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 11/11/2022 M. Poschmann SUBM Test Case + ! 04/17/2024 A.E.F Fitzsimmons CsI data bug test + ! 05/06/2024 A.E.F Fitzsimmons Naming convention update + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results of CsI at low pressure. This test is consistent with the test in the tutorial manual. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo64 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + real(8) :: gibbscheck + logical :: s1pass + + + ! Specify units: + cInputUnitTemperature = 'C' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'CsI-Pham.dat' + + ! Specify values: + dTemperature = 400 + dPressure = 1D-5 + + dElementMass(53) = 1D0 ! I + dElementMass(55) = 1D0 ! cs + + + gibbscheck = -4.41869D05 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + ! Check results: + s1pass = .FALSE. + + ! Check results: + if (INFOThermo == 0) then + if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then + s1pass = .TRUE. + end if + end if + + if (s1pass) then + ! The test passed: + print *, 'TestThermo64: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo64: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo64 diff --git a/test/daily/TestThermo65.F90 b/test/daily/TestThermo65.F90 deleted file mode 100644 index 24552318..00000000 --- a/test/daily/TestThermo65.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo65.F90 - !> \brief Spot test - 400K with 25% Mo, 25% Ru, 25% Pd, 25% Tc. - !> \author M.H.A. Piro, B.W.N. Fitzpatrick - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 10/01/2021 M. Poschmann Original code - ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Pd-Ru-Tc-Mo system at 400K with 25% Mo, 25% Ru, 25% Pd, 25% Tc. The database is - !! modified such that it contains only the BCC phase, but with ternary miscibility gap possible. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo65 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - integer :: i,j,k - logical :: p1pass, p2pass, p3pass - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ternaryMiscibility-Kaye.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 400D0 - dElementMass(42) = 1D0 ! Mo - dElementMass(43) = 1D0 ! Tc - dElementMass(44) = 1D0 ! Ru - dElementMass(46) = 1D0 ! Pd - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - p1pass = .FALSE. - p2pass = .FALSE. - p3pass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - (-4.48928D4))/(-4.48928D4)) < 1D-3) then - do i = 1, nSolnPhases - j = nElements + 1 - i - k = -iAssemblage(j) - if (cSolnPhaseName(k) == 'BCCN') then - if (DABS(dMolesPhase(j) - 1.8231D0)/1.8231D0 < 1D-3) p1pass = .TRUE. - if (DABS(dMolesPhase(j) - 1.1145D0)/1.1145D0 < 1D-3) p2pass = .TRUE. - if (DABS(dMolesPhase(j) - 1.0625D0)/1.0625D0 < 1D-3) p3pass = .TRUE. - end if - end do - end if - end if - - if (p1pass .AND. p2pass .AND. p3pass) then - ! The test passed: - print *, 'TestThermo65: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo65: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo65 diff --git a/test/daily/TestThermo70.F90 b/test/daily/TestThermo70.F90 deleted file mode 100644 index 314d36e2..00000000 --- a/test/daily/TestThermo70.F90 +++ /dev/null @@ -1,148 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo70.F90 - !> \brief Spot test - 1500K with 70% Sn, 30% O. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Zirc Data file at 1500K with 0.7 mols of Sn and 0.3 of O. It also tests mixing term Case #2 - !! an #4 of the SUBI phase, with the presence of a miscibility gap. Permission was granted from N. Dupin - !! to make use of the Zirc DAT file. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo70 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7, sfcheck8 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - logical :: s5pass, s6pass, s7pass, s8pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 1500D0 - dElementMass(8) = 0.3D0 ! O - dElementMass(50) = 0.7D0 ! Sn - ! Liquid #1 - sfcheck1 = 1D0 !Sn - sfcheck2 = 1.55834D-2 !O-2 - sfcheck3 = 9.84334D-1 !Va - sfcheck4 = 8.22893D-5 !O2Sn - ! Liquid #2 - sfcheck5 = 1D0 !Sn - sfcheck6 = 9.12945D-01 !O-2 - sfcheck7 = 1.35005D-2 !Va - sfcheck8 = 7.35549D-2 !O2Sn - - pcheck1 = -310505D0 ! O - pcheck2 = -125800D0 ! Sn - gibbscheck = -181212D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - !do i = 1, nSolnPhases - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then - if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass .AND. & - s8pass) then - ! The test passed: - print *, 'TestThermo70: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo70: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo70 diff --git a/test/daily/TestThermo71.F90 b/test/daily/TestThermo71.F90 deleted file mode 100644 index d85d489f..00000000 --- a/test/daily/TestThermo71.F90 +++ /dev/null @@ -1,122 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo71.F90 - !> \brief Spot test - 2000K with 20% Cr, 70% Zr, 10% O. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI - ! - ! Purpose: - ! ======== - !\details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Zirc Data file at 1500K with 0.7 mols of Cn, 0.2 mols of Zr and 0.1 of O. It also - !! tests mixing term Case #2 an #3 of the SUBI phase. Permission was granted from N. Dupin to make - !! use of the Zirc DAT file. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo71 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3 - - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass - - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(8) = 0.1D0 ! O - dElementMass(24) = 0.2D0 ! Cr - dElementMass(40) = 0.7D0 ! Zr - - ! Liquid #1 - sfcheck1 = 3.30097D-1 !Cr - sfcheck2 = 6.69903D-1 !Zr - sfcheck3 = 9.99997D-1 !Va - - pcheck1 = -126330D0 ! Cr - pcheck2 = -628950D0 ! O - pcheck3 = -151241D0 ! Zr - - gibbscheck = -194030D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - !s4pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'CR+3') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'ZR+4') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - end if - end do - end do - - end if - end do - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass) then - ! The test passed: - print *, 'TestThermo71: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo71: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo71 diff --git a/test/daily/TestThermo72.F90 b/test/daily/TestThermo72.F90 deleted file mode 100644 index ce2f44c8..00000000 --- a/test/daily/TestThermo72.F90 +++ /dev/null @@ -1,120 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo72.F90 - !> \brief Spot test - 700K with 20% Cs, 80% Te. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - ! results for the open literature Cs-Te assessment file at 700K with 0.2 mols of Cs and 0.8 of Te. - ! It also tests mixing term Case #5 of the SUBI phase. - !! The DAT file was pulled from the following article. However, modifications may have been made - !! from the original version: T. N. Pham Thi, J. C. Dumas, V. Bouineau, N. Dupin, C. Gueneau, S. Gosse, - !! P. Benigni, P. Maugis and J. Rogez, "Thermodynamic assessment of the Cs–Te binary system," Calphad, - !! vol. 48, pp. 1-12, 2015. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo72 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CsTe-1.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 700D0 - dElementMass(52) = 0.8D0 ! Te - dElementMass(55) = 0.2D0 ! Cs - - ! Liquid #1 - sfcheck1 = 1D0 !Cs - sfcheck2 = 1.25D-1 !Cs2Te - sfcheck3 = 8.75D-1 !Te - - pcheck1 = -275754D0 !Cs - pcheck2 = -43828.1D0 !Te - - gibbscheck = -90213.3D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQUID') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - end if - end do - end do - end if - end do - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass) then - ! The test passed: - print *, 'TestThermo72: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo72: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - - -end program TestThermo72 diff --git a/test/daily/TestThermo73.F90 b/test/daily/TestThermo73.F90 deleted file mode 100644 index e5c9aa0d..00000000 --- a/test/daily/TestThermo73.F90 +++ /dev/null @@ -1,167 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo73.F90 - !> \brief Spot test - 2500K with 33% Ca, 33% Mn, 33% S. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the open literature Ca-Mn-S assessment file at 2500K with 1 mol of Ca, 1 mol of Mn, and - !! 1 mol of S. It also tests mixing term Case #1, # 2, and #3 of the SUBI phase with a miscibility gap - !! present. - !! The DAT file was pulled from the following article. However, modifications may have been made - !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, - !! vol. 53, pp. 55-61, 2016. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo73 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4, sfcheck5 - real(8) :: sfcheck6, sfcheck7, sfcheck8, sfcheck9, sfcheck10 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass, s5pass - logical :: s6pass, s7pass, s8pass, s9pass, s10pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CaMnS.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2500D0 - dElementMass(20) = 1D0 ! Ca - dElementMass(25) = 1D0 ! Mn - dElementMass(16) = 1D0 ! S - - ! Liquid #1 - sfcheck1 = 8.06572D-1 !Ca - sfcheck2 = 1.93428D-1 !Mn - sfcheck3 = 8.18084D-1 !S-2 - sfcheck4 = 1.81915D-1 !Va - sfcheck5 = 7.69522D-7 !S - - ! Liquid #2 - sfcheck6 = 1.96945D-2 !Ca - sfcheck7 = 9.80306D-1 !Mn - sfcheck8 = 1.6531D-3 !S-2 - sfcheck9 = 9.98344D-1 !Va - sfcheck10 = 3.04003D-6 !S - - pcheck1 = -251878D0 !Ca - pcheck2 = -201710D0 !Mn - pcheck3 = -457030D0 !S - - gibbscheck = -910619D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - s9pass = .FALSE. - s10pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck9)/sfcheck9 < 1D-3) s9pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then - if (DABS(dSiteFraction(i,j,l) - sfcheck10)/sfcheck10 < 1D-3) s10pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass .AND. & - s8pass .AND. & - s9pass .AND. & - s10pass) then - ! The test passed: - print *, 'TestThermo73: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo73: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo73 diff --git a/test/daily/TestThermo74.F90 b/test/daily/TestThermo74.F90 deleted file mode 100644 index 11c3082a..00000000 --- a/test/daily/TestThermo74.F90 +++ /dev/null @@ -1,152 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo74.F90 - !> \brief Spot test - 1900K with , 2 mol Fe, 4 mol Mn, 3 mol S. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the open literature Ca-Mn-S assessment file at 2500K with 1 mol of Ca, 1 mol of Mn, and - !! 1 mol of S. It also tests mixing term Case #1, # 2, and #3 of the SUBI phase with a miscibility gap - !! present. - !! The DAT file was pulled from the following article. However, modifications may have been made - !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, - !! vol. 53, pp. 55-61, 2016. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo74 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - logical :: s5pass, s6pass, s7pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeMnCaS-1.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 1900D0 - dElementMass(26) = 2D0 ! Fe - dElementMass(25) = 4D0 ! Mn - dElementMass(16) = 3D0 ! S - - ! Liquid #1 - sfcheck1 = 3.2331D-1 !Fe+2 - sfcheck2 = 6.7669D-1 !Mn+2 - sfcheck3 = 5.1140D-1 !S-2 - sfcheck4 = 4.8860D-1 !Va - - ! Liquid #2 - sfcheck5 = 7.7271D-1 !Fe+2 - sfcheck6 = 2.27D-1 !Mn+2 - sfcheck7 = 9.9999D-1 !Va - - pcheck1 = -121307D0 !Ca - pcheck2 = -155496D0 !Mn - pcheck3 = -360095D0 !S - - gibbscheck = -1944880D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass) then - ! The test passed: - print *, 'TestThermo74: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo74: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo74 diff --git a/test/daily/TestThermo75.F90 b/test/daily/TestThermo75.F90 deleted file mode 100644 index 60ceba66..00000000 --- a/test/daily/TestThermo75.F90 +++ /dev/null @@ -1,127 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo75.F90 - !> \brief Spot test - 1500K with 0.5 Ca - 0.2 Mn - 0.4 Fe. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 02/24/2022 B.A.T. Breeden SUBI Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the open literature Ca-Mn-S assessment file at 1500K with 0.5 mol of Ca, 0.2 mol of Mn, and - !! 0.4 mol of Fe. It also tests mixing term Case #8 of the SUBI phase. - !! - !! The DAT file was pulled from the following article. However, modifications may have been made - !! from the original version: D. Dilner, "Thermodynamic description of the Fe–Mn–Ca–Mg–S system," Calphad, - !! vol. 53, pp. 55-61, 2016. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo75 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeMnCaS-2.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 1500D0 - dElementMass(26) = 0.4D0 ! Fe - dElementMass(25) = 0.2D0 ! Mn - dElementMass(20) = 0.5D0 ! Ca - - ! Liquid #1 - sfcheck1 = 0.45455D0 !Ca+2 - sfcheck2 = 0.18182D0 !Mn+2 - sfcheck3 = 0.36364D0 !Fe+2 - sfcheck4 = 1.0D0 !Va - - pcheck1 = -113841.3D0 !Ca - pcheck2 = -92132.39D0 !Mn - pcheck3 = -114102.3D0 !Fe - - gibbscheck = -116594D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - end if - end do - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass) then - ! The test passed: - print *, 'TestThermo75: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo75: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo75 diff --git a/test/daily/TestThermo76.F90 b/test/daily/TestThermo76.F90 deleted file mode 100644 index 9e4cdb23..00000000 --- a/test/daily/TestThermo76.F90 +++ /dev/null @@ -1,125 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo76.F90 - !> \brief Spot test - 2500K with 1.0 Cs - 0.5 Te - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 02/24/2022 B.A.T. Breeden SUBI Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the open literature Cs-Te assessment file at 2500K with 1.0 mol of Cs and 0.5 mol of Te. - !! It also tests mixing term Case #9 of the SUBI phase. - !! The DAT file was pulled from the following article. However, modifications may have been made - !! from the original version: T. N. Pham Thi, J. C. Dumas, V. Bouineau, N. Dupin, C. Gueneau, S. Gosse, - !! P. Benigni, P. Maugis and J. Rogez, "Thermodynamic assessment of the Cs–Te binary system," Calphad, - !! vol. 48, pp. 1-12, 2015. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo76 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CsTe-2.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2500D0 - dElementMass(52) = 0.5D0 ! Te - dElementMass(55) = 1.0D0 ! Cs - - ! Liquid #1 - sfcheck1 = 1D0 !Cs - sfcheck2 = 0.34222D0 !Va - sfcheck3 = 0.48667D0 !Cs2Te - sfcheck4 = 0.17111D0 !Te - - pcheck1 = -377921D0 !Cs - pcheck2 = -381967D0 !Te - - gibbscheck = -568905D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQUID') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - end if - end do - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass) then - ! The test passed: - print *, 'TestThermo76: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo76: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo76 diff --git a/test/daily/TestThermo77.F90 b/test/daily/TestThermo77.F90 deleted file mode 100644 index 190ff63e..00000000 --- a/test/daily/TestThermo77.F90 +++ /dev/null @@ -1,152 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo77.F90 - !> \brief Spot test - 2500K with 1.0 Nb - 0.7 Sn - 0.3 O. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 02/24/2022 B.A.T. Breeden SUBI Test Case - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Zirc Data file at 2500K with 1.0 mol of Nb, 0.7 mols of Sn, and 0.3 of O. It also - !! tests mixing term Case #7 of the SUBI phase, with the presence of a miscibility gap. Permission - !! was granted from N. Dupin to make use of the Zirc DAT file. The data file for this test case has been - !! modified from it's original state. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo77 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass, s5pass - logical :: s6pass, s7pass, s8pass, s9pass, s10pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq_mod1.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2500D0 - dElementMass(41) = 1D0 ! Nb - dElementMass(8) = 0.3D0 ! O - dElementMass(50) = 0.7D0 ! Sn - - ! Liquid #1 - sfcheck1 = 0.99586D0 !Nb+2 - sfcheck2 = 0.327163D0 !O-2 - sfcheck3 = 0.563388D0 !Va - sfcheck4 = 0.109449D0 !NBO5/2 - - ! Liquid #2 - sfcheck5 = 0.418758D0 !Nb+2 - sfcheck6 = 0.581242D0 !Sn+2 - sfcheck7 = 0.99976D0 !Va - - pcheck1 = -183696D0 !Nb - pcheck2 = -593052D0 !O - pcheck3 = -249101D0 !Sn - - gibbscheck = -535982D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - s9pass = .FALSE. - s10pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NBO5/2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass) then - ! The test passed: - print *, 'TestThermo77: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo77: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo77 diff --git a/test/daily/TestThermo78.F90 b/test/daily/TestThermo78.F90 deleted file mode 100644 index f1a97d52..00000000 --- a/test/daily/TestThermo78.F90 +++ /dev/null @@ -1,123 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo78.F90 - !> \brief Spot test - 2000K with 0.5 Cr - 0.8 Sn - 0.6 O. - !> \author M.H.A. Piro, B.A.T. Breeden - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 02/24/2022 B.A.T. Breeden SUBI Test Case - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results for the Zirc Data file at 2000K with 0.5 mols of Cr, 0.8 mols of Sn, and 0.6 mols of O. - !! It also tests mixing term Case #12 of the SUBI phase. Permission was granted from N. Dupin to make - !! use of the Zirc DAT file. The data file for this test case has been modified from it's original state. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo78 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZIRC_no_liq_mod2.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 2000D0 - dElementMass(24) = 0.5D0 ! Cr - dElementMass(50) = 0.8D0 ! Sn - dElementMass(8) = 0.6D0 ! O - - ! Liquid #1 - sfcheck1 = 0.50000D0 !Cr+3 - sfcheck2 = 0.50000D0 !Sn+2 - sfcheck3 = 0.76923D0 !Va - sfcheck4 = 0.23077D0 !O2SN - - pcheck1 = -723575D0 !Cr - pcheck2 = -467079D0 !O - pcheck3 = -780227D0 !Sn - - gibbscheck = -1266220D0 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'CR+3') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - end if - end do - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass) then - ! The test passed: - print *, 'TestThermo78: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo78: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo78 diff --git a/test/daily/TestThermo80.F90 b/test/daily/TestThermo80.F90 deleted file mode 100644 index 43a6b9e5..00000000 --- a/test/daily/TestThermo80.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo80.F90 - !> \brief SUBM first sublattice binary mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with a binary excess mixing term on the first sublattice. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo80 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 0.1D0 ! Li - dElementMass(11) = 0.4D0 ! Na - ! dElementMass(17) = 0D0 ! Cl - dElementMass(9) = 1.6D0 ! F - dElementMass(26) = 0.3D0 ! Fe - ! dElementMass(8) = 3D0 ! O - dElementMass(19) = 0.2D0 ! K - - gibbscheck = -4.89601D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo80: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo80: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo80 diff --git a/test/daily/TestThermo81.F90 b/test/daily/TestThermo81.F90 deleted file mode 100644 index 4011797c..00000000 --- a/test/daily/TestThermo81.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo81.F90 - !> \brief SUBM first sublattice binary mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with a binary excess mixing term on the first sublattice. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo81 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 0.1D0 ! Li - dElementMass(11) = 0.4D0 ! Na - ! dElementMass(17) = 0D0 ! Cl - ! dElementMass(9) = 1.6D0 ! F - dElementMass(26) = 0.3D0 ! Fe - dElementMass(8) = 0.8D0 ! O - dElementMass(19) = 0.2D0 ! K - - gibbscheck = -5.12663D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo81: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo81: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo81 diff --git a/test/daily/TestThermo82.F90 b/test/daily/TestThermo82.F90 deleted file mode 100644 index 5cf4e783..00000000 --- a/test/daily/TestThermo82.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo82.F90 - !> \brief SUBM second sublattice binary mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with a binary excess mixing term on the second sublattice. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo82 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 1.2D0 ! Li - ! dElementMass(11) = 0.4D0 ! Na - dElementMass(17) = 0.5D0 ! Cl - dElementMass(9) = 0.3D0 ! F - ! dElementMass(26) = 0.3D0 ! Fe - dElementMass(8) = 0.2D0 ! O - ! dElementMass(19) = 0.2D0 ! K - - gibbscheck = -4.52110D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo82: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo82: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo82 diff --git a/test/daily/TestThermo83.F90 b/test/daily/TestThermo83.F90 deleted file mode 100644 index eeb6dbbb..00000000 --- a/test/daily/TestThermo83.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo83.F90 - !> \brief SUBM first sublattice ternary mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with a ternary excess mixing term on the first sublattice. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo83 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 0.1D0 ! Li - dElementMass(11) = 0.4D0 ! Na - dElementMass(17) = 1.6D0 ! Cl - ! dElementMass(9) = 1.6D0 ! F - dElementMass(26) = 0.3D0 ! Fe - ! dElementMass(8) = 3D0 ! O - dElementMass(19) = 0.2D0 ! K - - gibbscheck = -5.89226D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo83: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo83: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo83 diff --git a/test/daily/TestThermo84.F90 b/test/daily/TestThermo84.F90 deleted file mode 100644 index 05297423..00000000 --- a/test/daily/TestThermo84.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo84.F90 - !> \brief SUBM second sublattice ternary mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with a ternary excess mixing term on the second sublattice. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo84 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - ! dElementMass(3) = 1.2D0 ! Li - ! dElementMass(11) = 0.4D0 ! Na - dElementMass(17) = 0.5D0 ! Cl - dElementMass(9) = 0.3D0 ! F - ! dElementMass(26) = 0.3D0 ! Fe - dElementMass(8) = 0.2D0 ! O - dElementMass(19) = 1.2D0 ! K - - gibbscheck = -1.76944D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo84: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo84: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo84 diff --git a/test/daily/TestThermo85.F90 b/test/daily/TestThermo85.F90 deleted file mode 100644 index 60680c76..00000000 --- a/test/daily/TestThermo85.F90 +++ /dev/null @@ -1,90 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo85.F90 - !> \brief SUBM all mixing. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/04/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase with all excess mixing terms. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo85 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 1D0 ! Li - dElementMass(11) = 2D0 ! Na - dElementMass(17) = 2D0 ! Cl - dElementMass(9) = 12D0 ! F - dElementMass(26) = 3D0 ! Fe - dElementMass(8) = 1D0 ! O - dElementMass(19) = 4D0 ! K - - gibbscheck = -5.64332D05 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo85: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo85: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo85 diff --git a/test/daily/TestThermo86.F90 b/test/daily/TestThermo86.F90 deleted file mode 100644 index 3f3aa34f..00000000 --- a/test/daily/TestThermo86.F90 +++ /dev/null @@ -1,92 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo86.F90 - !> \brief SUBM mistmatch coefficients and charges. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/08/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. - !! Two constituents on first sublattice are tested. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo86 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 2D0 ! Li - ! dElementMass(11) = 2D0 ! Na - ! dElementMass(17) = 4D0 ! Cl - ! dElementMass(9) = 5D0 ! F - ! dElementMass(26) = 3D0 ! Fe - dElementMass(8) = 3D0 ! O - ! dElementMass(19) = 4D0 ! K - dElementMass(40) = 1D0 ! Zr - - gibbscheck = -1.01677D05 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo86: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo86: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo86 diff --git a/test/daily/TestThermo87.F90 b/test/daily/TestThermo87.F90 deleted file mode 100644 index 8a2f75cb..00000000 --- a/test/daily/TestThermo87.F90 +++ /dev/null @@ -1,92 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo87.F90 - !> \brief SUBM mistmatch coefficients and charges. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/08/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. - !! Two constituents on second sublattice are tested. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo87 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 0D0 ! Li - dElementMass(11) = 0D0 ! Na - dElementMass(17) = 2D0 ! Cl - dElementMass(9) = 0D0 ! F - dElementMass(26) = 0D0 ! Fe - dElementMass(8) = 1D0 ! O - dElementMass(19) = 0D0 ! K - dElementMass(40) = 1D0 ! Zr - - gibbscheck = -1.50268D04 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo87: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo87: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo87 diff --git a/test/daily/TestThermo88.F90 b/test/daily/TestThermo88.F90 deleted file mode 100644 index 79e4f40c..00000000 --- a/test/daily/TestThermo88.F90 +++ /dev/null @@ -1,92 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo88.F90 - !> \brief SUBM mismatch coefficients and charges. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/11/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase where not all charges and coefficients are equal, i.e. with Zr(4+) + O(2-) -> ZrO2. - !! Two constituents on both sublattices are tested. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo88 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 3D0 ! Li - dElementMass(11) = 0D0 ! Na - dElementMass(17) = 0D0 ! Cl - dElementMass(9) = 5D0 ! F - dElementMass(26) = 0D0 ! Fe - dElementMass(8) = 1D0 ! O - dElementMass(19) = 0D0 ! K - dElementMass(40) = 1D0 ! Zr - - gibbscheck = -1.90265D05 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo88: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo88: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo88 diff --git a/test/daily/TestThermo89.F90 b/test/daily/TestThermo89.F90 deleted file mode 100644 index de32342d..00000000 --- a/test/daily/TestThermo89.F90 +++ /dev/null @@ -1,91 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo89.F90 - !> \brief SUBM worst case scenario. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/11/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase where everything and the kitchen sink is thrown in. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo89 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 1D0 ! Li - dElementMass(11) = 2D0 ! Na - dElementMass(17) = 2D0 ! Cl - dElementMass(9) = 12D0 ! F - dElementMass(26) = 3D0 ! Fe - dElementMass(8) = 11D0 ! O - dElementMass(19) = 4D0 ! K - dElementMass(40) = 5D0 ! Zr - - gibbscheck = -7.61628D05 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo89: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo89: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo89 diff --git a/test/daily/TestThermo90.F90 b/test/daily/TestThermo90.F90 deleted file mode 100644 index 95e077f9..00000000 --- a/test/daily/TestThermo90.F90 +++ /dev/null @@ -1,86 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo89.F90 - !> \brief SUBM worst case scenario. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/11/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F Fitzsimmons CsI data bug test - ! 05/06/2024 A.E.F Fitzsimmons Naming convention update - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results of CsI at low pressure. This test is consistent with the test in the tutorial manual. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo90 - - USE ModuleThermoIO - USE ModuleThermo - - implicit none - - real(8) :: gibbscheck - logical :: s1pass - - - ! Specify units: - cInputUnitTemperature = 'C' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CsI-Pham.dat' - - ! Specify values: - dTemperature = 400 - dPressure = 1D-5 - - dElementMass(53) = 1D0 ! I - dElementMass(55) = 1D0 ! cs - - - gibbscheck = -4.41869D05 - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if - - if (s1pass) then - ! The test passed: - print *, 'TestThermo90: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo90: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo90 From 299109316b903117cde789374a79f0d2722e246c Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 27 Aug 2024 11:52:26 -0400 Subject: [PATCH 08/34] new run_script --- run_tests | 88 ++++++++++--------------------------- test/daily/TestThermo31.F90 | 2 +- 2 files changed, 24 insertions(+), 66 deletions(-) diff --git a/run_tests b/run_tests index fbd9f6a9..d354f76a 100755 --- a/run_tests +++ b/run_tests @@ -2,72 +2,30 @@ set -Eeuo pipefail script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) -cd $script_dir +cd "$script_dir/bin" -cd bin +# Array of test names from public test suite +tests=( + TestThermo01 TestThermo02 TestThermo03 TestThermo04 TestThermo05 + TestThermo06 TestThermo07 TestThermo08 TestThermo09 TestThermo10 + TestThermo11 TestThermo12 TestThermo13 TestThermo14 TestThermo15 + TestThermo16 TestThermo17 TestThermo18 TestThermo19 TestThermo20 + TestThermo21 TestThermo22 TestThermo23 TestThermo24 TestThermo25 + TestThermo26 TestThermo27 TestThermo28 TestThermo29 TestThermo30 + TestThermo31 TestThermo32 TestThermo33 TestThermo34 TestThermo35 + TestThermo36 TestThermo37 TestThermo38 TestThermo39 TestThermo40 + TestThermo41 TestThermo42 TestThermo43 TestThermo44 TestThermo45 + TestThermo46 TestThermo47 TestThermo48 TestThermo49 TestThermo50 + TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 + TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 + TestThermo61 TestThermo62 TestThermo63 TestThermo64 +) -./TestThermo01 -./TestThermo02 -./TestThermo03 -./TestThermo04 -./TestThermo05 -./TestThermo06 -./TestThermo07 -./TestThermo08 -./TestThermo09 -./TestThermo10 -./TestThermo11 ./TestThermo12 > test12out.txt tail -1 test12out.txt -./TestThermo13 -./TestThermo14 -./TestThermo30 -./TestThermo31 -./TestThermo32 -./TestThermo33 -./TestThermo40 -./TestThermo41 -./TestThermo42 -./TestThermo43 -./TestThermo44 -./TestThermo45 -./TestThermo46 -./TestThermo47 -./TestThermo48 -./TestThermo49 -./TestThermo50 -./TestThermo51 -./TestThermo52 -./TestThermo53 -./TestThermo54 -./TestThermo55 -./TestThermo56 -./TestThermo57 -./TestThermo58 -./TestThermo59 -./TestThermo60 -./TestThermo61 -./TestThermo62 -./TestThermo63 -./TestThermo64 -./TestThermo65 -./TestThermo70 -./TestThermo71 -./TestThermo72 -./TestThermo73 -./TestThermo74 -./TestThermo75 -./TestThermo76 -./TestThermo77 -./TestThermo78 -./TestThermo80 -./TestThermo81 -./TestThermo82 -./TestThermo83 -./TestThermo84 -./TestThermo85 -./TestThermo86 -./TestThermo87 -./TestThermo88 -./TestThermo89 -./TestThermo90 \ No newline at end of file + +# Iterate through tests and run each one +for test_name in "${tests[@]}"; do + ./"$test_name" + +done \ No newline at end of file diff --git a/test/daily/TestThermo31.F90 b/test/daily/TestThermo31.F90 index db98464d..8460d85d 100644 --- a/test/daily/TestThermo31.F90 +++ b/test/daily/TestThermo31.F90 @@ -94,4 +94,4 @@ program TestThermo31 call EXIT(1) end if -end program TestThermo52 +end program TestThermo31 From 3fbc70d450a9b33f0cebe6e0dccee701147759d9 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 27 Aug 2024 12:37:48 -0400 Subject: [PATCH 09/34] test updated --- src/module/ModuleTesting.f90 | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/module/ModuleTesting.f90 diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 new file mode 100644 index 00000000..e69de29b From c2941e311a107ff36d36e7863ecb607547dd1ce1 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 27 Aug 2024 12:41:43 -0400 Subject: [PATCH 10/34] ignore override --- .gitignore | 1 - test/daily/TestThermo15.F90 | 91 ++++++++++++++++++++++++++++ test/daily/TestThermo16.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo17.F90 | 89 ++++++++++++++++++++++++++++ test/daily/TestThermo18.F90 | 95 +++++++++++++++++++++++++++++ test/daily/TestThermo19.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo20.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo21.F90 | 94 +++++++++++++++++++++++++++++ test/daily/TestThermo22.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo23.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo24.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo25.F90 | 92 +++++++++++++++++++++++++++++ test/daily/TestThermo26.F90 | 97 ++++++++++++++++++++++++++++++ test/daily/TestThermo27.F90 | 97 ++++++++++++++++++++++++++++++ test/daily/TestThermo28.F90 | 94 +++++++++++++++++++++++++++++ test/daily/TestThermo29.F90 | 93 +++++++++++++++++++++++++++++ test/daily/TestThermo34.F90 | 111 ++++++++++++++++++++++++++++++++++ test/daily/TestThermo35.F90 | 109 ++++++++++++++++++++++++++++++++++ test/daily/TestThermo36.F90 | 114 +++++++++++++++++++++++++++++++++++ test/daily/TestThermo37.F90 | 115 ++++++++++++++++++++++++++++++++++++ test/daily/TestThermo38.F90 | 113 +++++++++++++++++++++++++++++++++++ test/daily/TestThermo39.F90 | 113 +++++++++++++++++++++++++++++++++++ 22 files changed, 2075 insertions(+), 1 deletion(-) create mode 100644 test/daily/TestThermo15.F90 create mode 100644 test/daily/TestThermo16.F90 create mode 100644 test/daily/TestThermo17.F90 create mode 100644 test/daily/TestThermo18.F90 create mode 100644 test/daily/TestThermo19.F90 create mode 100644 test/daily/TestThermo20.F90 create mode 100644 test/daily/TestThermo21.F90 create mode 100644 test/daily/TestThermo22.F90 create mode 100644 test/daily/TestThermo23.F90 create mode 100644 test/daily/TestThermo24.F90 create mode 100644 test/daily/TestThermo25.F90 create mode 100644 test/daily/TestThermo26.F90 create mode 100644 test/daily/TestThermo27.F90 create mode 100644 test/daily/TestThermo28.F90 create mode 100644 test/daily/TestThermo29.F90 create mode 100644 test/daily/TestThermo34.F90 create mode 100644 test/daily/TestThermo35.F90 create mode 100644 test/daily/TestThermo36.F90 create mode 100644 test/daily/TestThermo37.F90 create mode 100644 test/daily/TestThermo38.F90 create mode 100644 test/daily/TestThermo39.F90 diff --git a/.gitignore b/.gitignore index 7030a273..d9d23c88 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,6 @@ test/doc/ .vscode/ # some of these will occasionally require manual override data/ -test/ python/ private_tests .gitmodules \ No newline at end of file diff --git a/test/daily/TestThermo15.F90 b/test/daily/TestThermo15.F90 new file mode 100644 index 00000000..2527600f --- /dev/null +++ b/test/daily/TestThermo15.F90 @@ -0,0 +1,91 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo30.F90 + !> \brief Spot test - W-Au-Ar-O. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 31/08/2018 B.W.N. Fitzpatrick Change system to fictive RKMP model + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a fictive system labelled W-Au-Ar-O. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo15 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleGEMSolver + + implicit none + + !Gibbs Energy result via Factsage + real(8) :: gibbscheck + + !Init test values + gibbscheck = -4.620D5 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'WAuArO-1.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1455D0 + dElementMass(74) = 1.95D0 ! W + dElementMass(79) = 1D0 ! Au + dElementMass(18) = 2D0 ! Ar + dElementMass(8) = 10D0 ! O + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + ! Check results: + if (INFOThermo == 0) then + if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then + ! The test passed: + print *, 'TestThermo15: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo15: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + else + ! The test failed. + print *, 'TestThermo15: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + !call ThermoDebug + + ! Reset Thermochimica: + call ResetThermo + +end program TestThermo15 diff --git a/test/daily/TestThermo16.F90 b/test/daily/TestThermo16.F90 new file mode 100644 index 00000000..184f1d61 --- /dev/null +++ b/test/daily/TestThermo16.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo31.F90 + !> \brief Spot test - W-Au-Ar-O_02. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Change to a fictive database + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a fictive W-Au-Ar-O_02 system. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo16 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + !Gibbs Energy result via Factsage + real(8) :: gibbscheck + + !Init test values + gibbscheck = 6.769E5 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'WAuArO-2.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000D0 + dElementMass(74) = 1D0 ! W + dElementMass(79) = 3D0 ! Au + dElementMass(18) = 5D0 ! Ar + dElementMass(8) = 2D0 ! O + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + !iPrintResultsMode = 2 + !call PrintResults + + ! Check results: + if (INFOThermo == 0) then + if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then + ! The test passed: + print *, 'TestThermo16: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo16: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + else + ! The test failed. + print *, 'TestThermo16: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + !call ThermoDebug + + ! Reset Thermochimica: + call ResetThermo + +end program TestThermo16 diff --git a/test/daily/TestThermo17.F90 b/test/daily/TestThermo17.F90 new file mode 100644 index 00000000..8c977408 --- /dev/null +++ b/test/daily/TestThermo17.F90 @@ -0,0 +1,89 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo32.F90 + !> \brief Spot test - W-Au-Ar-Ne-O, 2452K. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use a fictive system + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a fictive system labelled W-Au-Ar-Ne-O at 2452K. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo17 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + !Gibbs Energy result via Factsage + real(8) :: gibbscheck + + !Init test values + gibbscheck = 1.672D7 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'WAuArNeO-1.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2452D0 + dElementMass(74) = 1.95D0 ! W + dElementMass(79) = 1D0 ! Au + dElementMass(18) = 2D0 ! Ar + dElementMass(8) = 10D0 ! O + dElementMass(10) = 10D0 ! Ne + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + ! Check results: + if (INFOThermo == 0) then + ! The fluorite oxide phase should be the only one stable at equilibrium. + if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then + ! The test passed: + print *, 'TestThermo17: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo17: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + else + ! The test failed. + print *, 'TestThermo17: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Reset Thermochimica: + call ResetThermo + +end program TestThermo17 diff --git a/test/daily/TestThermo18.F90 b/test/daily/TestThermo18.F90 new file mode 100644 index 00000000..06afb15b --- /dev/null +++ b/test/daily/TestThermo18.F90 @@ -0,0 +1,95 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo33.F90 + !> \brief Spot test - W-Au-Ar-Ne-O, 900K. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use a fictive system + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a fictive system labelled W-Au-Ar-Ne-O at 900K. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo18 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + !Gibbs Energy result via Factsage + real(8) :: gibbscheck + real(8) :: molFractionTest(2) + + !Init test values + gibbscheck = 3.06480D+06 + molFractionTest = [0.75306881663786374D0,3.0917444033201544D-002] + + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'WAuArNeO-2.dat' + + ! Specify values: + dPressure = 2D0 + dTemperature = 900D0 + dElementMass(74) = 20D0 ! W + dElementMass(79) = 2D0 ! Au + dElementMass(18) = 7D0 ! Ar + dElementMass(8) = 5D0 ! O + dElementMass(10) = 1D0 ! Ne + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + + ! Check results: + if (INFOThermo == 0) then + if ((DABS(dMolFraction(1) - molFractionTest(1))/molFractionTest(1) < 1D-3).AND. & + (DABS(dMolFraction(9) - molFractionTest(2))/molFractionTest(2) < 1D-3).AND. & + (DABS(dGibbsEnergySys - (gibbscheck))/(gibbscheck) < 1D-3)) then + ! The test passed: + print *, 'TestThermo18: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo18: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + else + ! The test failed. + print *, 'TestThermo18: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + !call ThermoDebug + + ! Reset Thermochimica: + call ResetThermo + +end program TestThermo18 diff --git a/test/daily/TestThermo19.F90 b/test/daily/TestThermo19.F90 new file mode 100644 index 00000000..d660b36c --- /dev/null +++ b/test/daily/TestThermo19.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo40.F90 + !> \brief Spot test - 2250K with 80% Mo, 20% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 2250K with 80% Mo, 20% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo19 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2250D0 + dElementMass(42) = 0.8D0 ! Mo + dElementMass(44) = 0.2D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.44373D5))/(-1.44373E+5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'BCCN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.2D0)/0.2D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.8D0)/0.8D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 40.2724)/40.2724 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo19: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo19: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo19 diff --git a/test/daily/TestThermo20.F90 b/test/daily/TestThermo20.F90 new file mode 100644 index 00000000..79ba2cfc --- /dev/null +++ b/test/daily/TestThermo20.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo41.F90 + !> \brief Spot test - 2250K with 48.86% Mo, 51.14% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 2250K with 48.86% Mo, 51.14% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo20 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2250D0 + dElementMass(42) = 4.3D0 ! Mo + dElementMass(44) = 4.5D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.30624D6))/(-1.30624D6) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.51136D0)/0.51136D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.48864D0)/0.48864D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 352.351)/352.351 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo20: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo20: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo20 diff --git a/test/daily/TestThermo21.F90 b/test/daily/TestThermo21.F90 new file mode 100644 index 00000000..48c3c044 --- /dev/null +++ b/test/daily/TestThermo21.F90 @@ -0,0 +1,94 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo42.F90 + !> \brief Spot test - 2310K with 22% Mo, 78% Tc. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 2310K with 22% Mo, 78% Tc. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo21 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + + ! Specify values: + dPressure = 1D0 + dTemperature = 2310D0 + dElementMass(42) = 0.22D0 ! Mo + dElementMass(43) = 0.78D0 ! Tc + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.5588D5))/(-1.5588D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'LiqN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.66535D0)/0.66535D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.33465D0)/0.33465D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 111.198)/111.198 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo21: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo21: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo21 diff --git a/test/daily/TestThermo22.F90 b/test/daily/TestThermo22.F90 new file mode 100644 index 00000000..d368395b --- /dev/null +++ b/test/daily/TestThermo22.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo43.F90 + !> \brief Spot test - 400K with 40% Pd, 60% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 400K with 40% Pd, 60% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo22 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 400D0 + dElementMass(46) = 0.4D0 ! Pd + dElementMass(44) = 0.6D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.33770D4))/(-1.33770D4) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'FCCN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 5.4695E-03)/5.4695E-03 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.99453D0)/0.99453D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 25.7620)/25.7620 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo22: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo22: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo22 diff --git a/test/daily/TestThermo23.F90 b/test/daily/TestThermo23.F90 new file mode 100644 index 00000000..f89bf244 --- /dev/null +++ b/test/daily/TestThermo23.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo44.F90 + !> \brief Spot test - 1000K with 40% Pd, 60% Tc. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1000K with 40% Pd, 60% Tc. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo23 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000D0 + dElementMass(46) = 40D0 ! Pd + dElementMass(43) = 60D0 ! Tc + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-5.04309D6))/(-5.04309D6) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.4D0)/0.4D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.6D0)/0.6D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 3023.31)/3023.31 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo23: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo23: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo23 diff --git a/test/daily/TestThermo24.F90 b/test/daily/TestThermo24.F90 new file mode 100644 index 00000000..12aa7671 --- /dev/null +++ b/test/daily/TestThermo24.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo45.F90 + !> \brief Spot test - 1234K with 1% Tc, 99% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1234K with 1% Tc, 99% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo24 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1234D0 + dElementMass(43) = 1D0 ! Tc + dElementMass(44) = 99D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo24: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo24: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo24 diff --git a/test/daily/TestThermo25.F90 b/test/daily/TestThermo25.F90 new file mode 100644 index 00000000..4f3540a8 --- /dev/null +++ b/test/daily/TestThermo25.F90 @@ -0,0 +1,92 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo46.F90 + !> \brief Spot test - 2250K with 55% Tc, 45% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 2250K with 55% Tc, 45% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo25 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2250D0 + dElementMass(43) = 0.55D0 ! Tc + dElementMass(44) = 0.45D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo25: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo25: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo25 diff --git a/test/daily/TestThermo26.F90 b/test/daily/TestThermo26.F90 new file mode 100644 index 00000000..611f4f2d --- /dev/null +++ b/test/daily/TestThermo26.F90 @@ -0,0 +1,97 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo47.F90 + !> \brief Spot test - 1973K with 30% Mo, 40% Pd, 30% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1973K with 30% Mo, 40% Pd, 30% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo26 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, s3pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1973D0 + dElementMass(42) = 0.3D0 ! Mo + dElementMass(46) = 0.4D0 ! Pd + dElementMass(44) = 0.3D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + s3pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'FCCN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo26: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo26: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo26 diff --git a/test/daily/TestThermo27.F90 b/test/daily/TestThermo27.F90 new file mode 100644 index 00000000..d374fc5f --- /dev/null +++ b/test/daily/TestThermo27.F90 @@ -0,0 +1,97 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo48.F90 + !> \brief Spot test - 1973K with 10% Mo, 30% Pd, 60% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1973K with 10% Mo, 30% Pd, 60% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo27 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, s3pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1973D0 + dElementMass(42) = 0.1D0 ! Mo + dElementMass(46) = 0.3D0 ! Pd + dElementMass(44) = 0.6D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + s3pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.27255D5))/(-1.27255D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'LiqN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.13768D0)/0.13768D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then + if (DABS(dMolFraction(j) - 0.12624D0)/0.12624D0 < 1D-3) s2pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.73608D0)/0.73608D0 < 1D-3) s3pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 78.2758)/78.2758 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo27: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo27: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo27 diff --git a/test/daily/TestThermo28.F90 b/test/daily/TestThermo28.F90 new file mode 100644 index 00000000..ce67e9b9 --- /dev/null +++ b/test/daily/TestThermo28.F90 @@ -0,0 +1,94 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo49.F90 + !> \brief Spot test - 1000K with 40% Pd, 60% Tc. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1000K with Pd and Tc. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo28 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1900D0 + dElementMass = 0D0 + dElementMass(43) = 0.125D0 ! Tc + dElementMass(46) = 0.874D0 ! Pd + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-1.28092D5))/(-1.28092D5) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'LiqN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then + if (DABS(dMolFraction(j) - 0.90358D0)/0.90358D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 9.6420E-02)/9.6420E-02 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 679.082)/679.082 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo28: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo28: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo28 diff --git a/test/daily/TestThermo29.F90 b/test/daily/TestThermo29.F90 new file mode 100644 index 00000000..69e643f3 --- /dev/null +++ b/test/daily/TestThermo29.F90 @@ -0,0 +1,93 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo50.F90 + !> \brief Spot test - 1234K with 1% Tc, 99% Ru. + !> \author M.H.A. Piro, B.W.N. Fitzpatrick + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/14/2013 M.H.A. Piro Original code + ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system + ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for the Pd-Ru-Tc-Mo system at 1234K with 1% Tc, 99% Ru. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo29 + + USE ModuleThermoIO + USE ModuleThermo + + implicit none + + integer :: i,j,k + logical :: s1pass, s2pass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'NobleMetals-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1234D0 + dElementMass(43) = 1D0 ! Tc + dElementMass(44) = 99D0 ! Ru + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + call Thermochimica + call HeatCapacity + + s1pass = .FALSE. + s2pass = .FALSE. + cppass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then + do i = 1, nSolnPhases + k = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(k) == 'HCPN') then + do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) + if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then + if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. + else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then + if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. + end if + end do + end if + end do + if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. + end if + end if + + if (s1pass .AND. s2pass .AND. cppass) then + ! The test passed: + print *, 'TestThermo29: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo29: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestThermo29 diff --git a/test/daily/TestThermo34.F90 b/test/daily/TestThermo34.F90 new file mode 100644 index 00000000..381dd087 --- /dev/null +++ b/test/daily/TestThermo34.F90 @@ -0,0 +1,111 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo55.F90 + !> \brief Spot test - Ni-Cr-Fe-H 300 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/21/2020 M. Poschmann Original code + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including magnetic solution species and excess magnetic terms. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo34 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, iFirst + real(8) :: T, B, StructureFactor + logical :: fccPass, bccPass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'ZIRC-noSUBI.dat' + + ! Specify values: + dPressure = 1000D0 + dTemperature = 300D0 + dElementMass(23) = 0.1D0 ! V + dElementMass(24) = 1D0 ! Cr + dElementMass(26) = 2D0 ! Fe + dElementMass(28) = 1D0 ! Ni + dElementMass(50) = 0.1D0 ! Sn + dElementMass(1) = 1D0 ! H + + ! Specify output mode: + iPrintResultsMode = 2 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + + fccPass = .FALSE. + bccPass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + ! The fluorite oxide phase should be the only one stable at equilibrium. + if ((DABS(dGibbsEnergySys - (-4.96674D04))/((-4.96674D04))) < 1D-3) then + do i = 1, nSolnPhases + j = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(j) == 'FCC_A1') then + call CompMagneticTemperatureMoment(j,T,B) + iFirst = nSpeciesPhase(j-1) + 1 + StructureFactor = dCoeffGibbsMagnetic(iFirst,3) + T = -T * StructureFactor + B = -B * StructureFactor + if ((DABS((T-97.24D0)/97.24D0) < 1D-3) .AND. (DABS((B-0.13862D0)/0.13862D0) < 1D-3)) then + fccPass = .TRUE. + end if + else if (cSolnPhaseName(j) == 'BCC_A2') then + call CompMagneticTemperatureMoment(j,T,B) + if ((DABS((T-641.38D0)/641.38D0) < 1D-3) .AND. (DABS((B-1.5248D0)/1.5248D0) < 1D-3)) then + bccPass = .TRUE. + end if + end if + end do + end if + end if + + if (fccPass .AND. bccPass) then + ! The test passed: + print *, 'TestThermo34: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo34: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo34 diff --git a/test/daily/TestThermo35.F90 b/test/daily/TestThermo35.F90 new file mode 100644 index 00000000..73ad226e --- /dev/null +++ b/test/daily/TestThermo35.F90 @@ -0,0 +1,109 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo56.F90 + !> \brief Spot test - Fe-Cu-C 1400 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 06/30/2020 M. Poschmann Original code + ! 06/05/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including magnetic solution species and excess magnetic terms. Also tests + !! G-type asymmetric (and symmetric) excess mixing energy implementation for SUBG. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo35 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, iFirst + real(8) :: T, B, StructureFactor + logical :: fccPass, liquidPass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'CuFeC-Kang.dat' + + ! Specify values: + dTemperature = 1400D0 + dPressure = 1.0D0 + dElementMass = 0D0 + dElementMass(6) = 1.0D0 ! C + dElementMass(26) = 1.0D0 ! Fe + dElementMass(29) = 1.0D0 ! Cu + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + + fccPass = .FALSE. + liquidPass = .FALSE. + ! Check results: + if (INFOThermo == 0) then + ! The fluorite oxide phase should be the only one stable at equilibrium. + if ((DABS(dGibbsEnergySys - (-1.73325D05))/((-1.73325D05))) < 1D-3) then + do i = 1, nSolnPhases + j = -iAssemblage(nElements + 1 - i) + if (cSolnPhaseName(j) == 'FCC_A1') then + call CompMagneticTemperatureMoment(j,T,B) + iFirst = nSpeciesPhase(j-1) + 1 + StructureFactor = dCoeffGibbsMagnetic(iFirst,3) + T = -T * StructureFactor + B = -B * StructureFactor + if ((DABS((T-59.4D0)/59.4D0) < 1D-3) .AND. (DABS((B-0.62064D0)/0.62064D0) < 1D-3)) then + fccPass = .TRUE. + end if + else if (cSolnPhaseName(j) == 'Liquid') then + if (DABS((dMolesPhase(nElements + 1 - i)-2.9666D0)/2.9666D0) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j))-4.4975D-2)/4.4975D-2) < 1D-3) then + liquidPass = .TRUE. + end if + end if + end if + end do + end if + end if + + if (fccPass .AND. liquidPass) then + ! The test passed: + print *, 'TestThermo35: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo35: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo35 diff --git a/test/daily/TestThermo36.F90 b/test/daily/TestThermo36.F90 new file mode 100644 index 00000000..3e9a46ce --- /dev/null +++ b/test/daily/TestThermo36.F90 @@ -0,0 +1,114 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo57.F90 + !> \brief Spot test - Fe-Ti-V-O 2000 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/10/2020 M. Poschmann Original code + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including SUBQ solution phase with compound constituent. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo36 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, k + real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck + logical :: subqPass, hemaPass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2000D0 + dElementMass(8) = 2D0 ! O + dElementMass(22) = 0.5D0 ! Ti + dElementMass(23) = 0.5D0 ! V + dElementMass(26) = 0.5D0 ! Fe + + gibbsCheck = -1.21336D06 + p1check = 0.36803D0 + p2check = 0.47842D0 + s1check = 1.0885D-2 + s2check = 5.6813D-2 + dHeatCapacityCheck = 186.933 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + subqPass = .FALSE. + hemaPass = .FALSE. + cppass = .FALSE. + if (INFOThermo == 0) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then + do i = 1, nSolnPhases + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'SlagBsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. + end if + end if + else if (cSolnPhaseName(j) == 'Hemasoln') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then + hemaPass = .TRUE. + end if + end if + end if + end do + if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + end if + end if + + if (subqPass .AND. hemaPass .AND. cppass) then + ! The test passed: + print *, 'TestThermo36: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo36: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo36 diff --git a/test/daily/TestThermo37.F90 b/test/daily/TestThermo37.F90 new file mode 100644 index 00000000..582cac20 --- /dev/null +++ b/test/daily/TestThermo37.F90 @@ -0,0 +1,115 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo58.F90 + !> \brief Spot test - Fe-Ti-O 2000 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/10/2020 M. Poschmann Original code + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including SUBQ solution phase. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo37 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, k, l + real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck + logical :: subqPass, gasPass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2000D0 + dElementMass(8) = 2D0 ! O + dElementMass(22) = 0.5D0 ! Ti + dElementMass(26) = 0.5D0 ! Fe + + gibbsCheck = -1.00057D06 + p1check = 1.1768D0 + p2check = 0.14544D0 + s1check = 5.1547D-2 + s2check = 2.9406D-7 + dHeatCapacityCheck = 105.954 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + subqPass = .FALSE. + gasPass = .FALSE. + cppass = .FALSE. + if (INFOThermo == 0) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then + do i = 1, nSolnPhases + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'SlagBsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. + end if + end if + else if (cSolnPhaseName(j) == 'gas_ideal') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + do l = nSpeciesPhase(j-1) + 1, nSpeciesPhase(j) + if (DABS((dMolFraction(nSpeciesPhase(j-1)+5)-s2check)/s2check) < 1D-3) then + gasPass = .TRUE. + end if + end do + end if + end if + end do + if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + end if + end if + + if (subqPass .AND. gasPass .AND. cppass) then + ! The test passed: + print *, 'TestThermo37: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo37: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo37 diff --git a/test/daily/TestThermo38.F90 b/test/daily/TestThermo38.F90 new file mode 100644 index 00000000..00c2b41f --- /dev/null +++ b/test/daily/TestThermo38.F90 @@ -0,0 +1,113 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo59.F90 + !> \brief Spot test - Fe-V-O 2000 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/10/2020 M. Poschmann Original code + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including SUBQ solution phase with compound constituent. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo38 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, k + real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck + logical :: subqPass, gasPass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2000D0 + dElementMass(8) = 2D0 ! O + dElementMass(23) = 0.5D0 ! V + dElementMass(26) = 0.5D0 ! Fe + + gibbsCheck = -8.92127D05 + p1check = 0.80434D0 + p2check = 4.0631D-2 + s1check = 0.17025D0 + s2check = 0.99973D0 + dHeatCapacityCheck = 133.351 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + subqPass = .FALSE. + gasPass = .FALSE. + cppass = .FALSE. + if (INFOThermo == 0) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then + do i = 1, nSolnPhases + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'SlagBsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. + end if + end if + else if (cSolnPhaseName(j) == 'gas_ideal') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then + gasPass = .TRUE. + end if + end if + end if + end do + if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + end if + end if + + if (subqPass .AND. gasPass .AND. cppass) then + ! The test passed: + print *, 'TestThermo38: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo38: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo38 diff --git a/test/daily/TestThermo39.F90 b/test/daily/TestThermo39.F90 new file mode 100644 index 00000000..79171c98 --- /dev/null +++ b/test/daily/TestThermo39.F90 @@ -0,0 +1,113 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestThermo60.F90 + !> \brief Spot test - Ti-V-O 2000 K. + !> \author M. Poschmann + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/10/2020 M. Poschmann Original code + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to ensure that Thermochimica computes the correct + !! results for a system including SUBQ solution phase with compound constituent. + ! + !------------------------------------------------------------------------------------------------------------- + +program TestThermo39 + + USE ModuleThermoIO + USE ModuleGEMSolver + USE ModuleThermo + USE ModuleParseCS + + implicit none + + integer :: i, j, k + real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck + logical :: subqPass, hemaPass, cppass + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 2000D0 + dElementMass(8) = 2D0 ! O + dElementMass(22) = 0.5D0 ! Ti + dElementMass(23) = 0.5D0 ! V + + gibbsCheck = -1.09209D06 + p1check = 0.60817D0 + p2check = 0.18563D0 + s1check = 0.25897D0 + s2check = 0.34107D0 + dHeatCapacityCheck = 100.960 + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + + ! Call Thermochimica: + if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + subqPass = .FALSE. + hemaPass = .FALSE. + cppass = .FALSE. + if (INFOThermo == 0) then + if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then + do i = 1, nSolnPhases + k = nElements + 1 - i + j = -iAssemblage(k) + if (cSolnPhaseName(j) == 'SlagBsoln') then + if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then + subqPass = .TRUE. + end if + end if + else if (cSolnPhaseName(j) == 'Hemasoln') then + if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then + if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then + hemaPass = .TRUE. + end if + end if + end if + end do + if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. + end if + end if + + if (subqPass .AND. hemaPass .AND. cppass) then + ! The test passed: + print *, 'TestThermo39: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestThermo39: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + + ! Destruct everything: + if (INFOThermo == 0) call ResetThermoAll + + ! Call the debugger: + call ThermoDebug + +end program TestThermo39 From 518000b2aa06d05516702565c52de30c591d7d4b Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 6 Jan 2025 12:53:00 -0500 Subject: [PATCH 11/34] ModuleTesting and SQA Update --- .gitignore | 1 + Makefile | 6 +- data/CaMnS.dat | 2 +- src/module/ModuleTesting.f90 | 71 ++++++++++++++++++++ test/Thermo.F90 | 2 +- test/daily/TestThermo15.F90 | 49 ++++++++------ test/daily/TestThermo16.F90 | 54 ++++++++------- test/daily/TestThermo17.F90 | 48 ++++++++------ test/daily/TestThermo18.F90 | 52 ++++++++------- test/daily/TestThermo19.F90 | 45 ++++++------- test/daily/TestThermo20.F90 | 45 ++++++------- test/daily/TestThermo21.F90 | 45 ++++++------- test/daily/TestThermo22.F90 | 45 ++++++------- test/daily/TestThermo23.F90 | 47 ++++++------- test/daily/TestThermo24.F90 | 46 ++++++------- test/daily/TestThermo25.F90 | 45 ++++++------- test/daily/TestThermo26.F90 | 48 ++++++-------- test/daily/TestThermo27.F90 | 48 ++++++-------- test/daily/TestThermo28.F90 | 45 ++++++------- test/daily/TestThermo29.F90 | 45 ++++++------- test/daily/TestThermo30.F90 | 45 ++++++------- test/daily/TestThermo31.F90 | 48 ++++++-------- test/daily/TestThermo32.F90 | 48 ++++++-------- test/daily/TestThermo33.F90 | 48 ++++++-------- test/daily/TestThermo34.F90 | 57 +++++++--------- test/daily/TestThermo35.F90 | 53 ++++++--------- test/daily/TestThermo36.F90 | 64 +++++++----------- test/daily/TestThermo37.F90 | 62 ++++++----------- test/daily/TestThermo38.F90 | 62 +++++++---------- test/daily/TestThermo39.F90 | 59 ++++++----------- test/daily/TestThermo40.F90 | 62 +++++++---------- test/daily/TestThermo41.F90 | 59 ++++++----------- test/daily/TestThermo42.F90 | 61 ++++++----------- test/daily/TestThermo43.F90 | 43 ++++++------ test/daily/TestThermo44.F90 | 43 ++++++------ test/daily/TestThermo45.F90 | 99 ++++++--------------------- test/daily/TestThermo46.F90 | 78 +++++++--------------- test/daily/TestThermo47.F90 | 73 +++++++------------- test/daily/TestThermo48.F90 | 125 ++++++++--------------------------- test/daily/TestThermo49.F90 | 100 ++++++---------------------- test/daily/TestThermo50.F90 | 71 ++++++-------------- test/daily/TestThermo51.F90 | 74 ++++++--------------- test/daily/TestThermo52.F90 | 107 +++++++----------------------- test/daily/TestThermo53.F90 | 7 +- test/daily/TestThermo54.F90 | 37 ++++++----- test/daily/TestThermo55.F90 | 35 +++++----- test/daily/TestThermo56.F90 | 35 +++++----- test/daily/TestThermo57.F90 | 35 +++++----- test/daily/TestThermo58.F90 | 36 +++++----- test/daily/TestThermo59.F90 | 33 +++++---- test/daily/TestThermo60.F90 | 38 ++++++----- test/daily/TestThermo61.F90 | 35 ++++++---- test/daily/TestThermo62.F90 | 33 +++++---- test/daily/TestThermo63.F90 | 33 +++++---- test/daily/TestThermo64.F90 | 37 ++++++----- 55 files changed, 1171 insertions(+), 1553 deletions(-) diff --git a/.gitignore b/.gitignore index d9d23c88..7030a273 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ test/doc/ .vscode/ # some of these will occasionally require manual override data/ +test/ python/ private_tests .gitmodules \ No newline at end of file diff --git a/Makefile b/Makefile index fbc6551b..110f296d 100644 --- a/Makefile +++ b/Makefile @@ -127,10 +127,14 @@ ${BIN_DIR}: ${MKDIR_P} ${BIN_DIR} # Enforce module dependency rules + $(srcfiles): $(MODS_LNK) +$(OBJ_DIR)/ModuleTesting.o: $(OBJ_DIR)/ModuleThermo.o +$(OBJ_DIR)/ModuleTesting.o: $(OBJ_DIR)/ModuleThermoIO.o + %.o: %.f90 - $(FC) $(FCFLAGS) -c $< -o $@ + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ $(OBJ_DIR)/%.o: %.f90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ diff --git a/data/CaMnS.dat b/data/CaMnS.dat index aacfbed9..5e886467 100644 --- a/data/CaMnS.dat +++ b/data/CaMnS.dat @@ -444,4 +444,4 @@ Va:S 1 0.00000000 0.00 2000.0000 -265760.95 497.94364 -83.883678 -0.21790250E-01 0.28051160E-05 79820.000 1 0.16568470E+31 -9.00 -################################################### +################################################### \ No newline at end of file diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index e69de29b..85d5b863 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -0,0 +1,71 @@ + + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ModuleTesting.F90 + !> \brief Module for testing. + !> \author A.E.F. Fitzsimmons + ! + ! DISCLAIMER + ! ========== + ! All of the programming herein is original unless otherwise specified. Details of contributions to the + ! programming are given below. + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 09/03/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details The purpose of this application test is to run tests with cleaner code, checking gibbs energy, + !! heat capacity and another function to test all mole fractions within a stable phase. + ! + !------------------------------------------------------------------------------------------------------------- + +module ModuleTesting + + USE ModuleThermo + USE ModuleThermoIO + + implicit none + + contains + + subroutine testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + USE ModuleThermo + + !Init variables + integer, intent(in):: nSpeciesTest + integer, allocatable, intent(in) :: iSpeciesIndexTest(:) + real(8), allocatable, intent(in) :: dMolFractionTest(:) + real(8), intent(in) :: dGibbsCheck, dHeatCapacityCheck + logical, intent(out) :: lPass + real(8) :: dToleranceCheck + integer :: i + + dToleranceCheck = 1D-3 + + !Test Gibbs and HeatCapacity + if (DABS((dGibbsEnergySys - dGibbsCheck)/dGibbsCheck) >= dToleranceCheck) return + if (DABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck >= dToleranceCheck) return + + do i = 1, nSpeciesTest + if (DABS(dMolFraction(iSpeciesIndexTest(i)) - dMolFractionTest(i))/dMolFractionTest(i) >= dToleranceCheck) return + end do + + lPass = .TRUE. + + end subroutine testMolFraction + + subroutine printMolFractions + USE ModuleThermo + integer :: i + + do i = 1, nSpecies + print *, i, cSpeciesName(i), dMolFraction(i) + end do + + end subroutine printMolFractions + +end module ModuleTesting \ No newline at end of file diff --git a/test/Thermo.F90 b/test/Thermo.F90 index 52784340..4ebc4827 100644 --- a/test/Thermo.F90 +++ b/test/Thermo.F90 @@ -68,7 +68,7 @@ program thermo cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'C-O.dat' + cThermoFileName = DATA_DIRECTORY // 'CO.dat' ! Specify values: dPressure = 1D0 diff --git a/test/daily/TestThermo15.F90 b/test/daily/TestThermo15.F90 index 2527600f..b895bf1d 100644 --- a/test/daily/TestThermo15.F90 +++ b/test/daily/TestThermo15.F90 @@ -31,14 +31,16 @@ program TestThermo15 USE ModuleThermoIO USE ModuleThermo USE ModuleGEMSolver + USE ModuleTesting implicit none - !Gibbs Energy result via Factsage - real(8) :: gibbscheck - - !Init test values - gibbscheck = -4.620D5 + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -53,28 +55,35 @@ program TestThermo15 dElementMass(79) = 1D0 ! Au dElementMass(18) = 2D0 ! Ar dElementMass(8) = 10D0 ! O + + ! Init test values + dGibbsCheck = -4.62037D05 + dHeatCapacityCheck = 360D0 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 3, 4] !Au, W, O, Ar + dMolFractionTest = [0.66896D-01, 0.13043D0, 0.66889D0, 0.13377D0 ] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) ! Check results: - if (INFOThermo == 0) then - if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then - ! The test passed: - print *, 'TestThermo15: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo15: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if + if (lPass) then + ! The test passed: + print *, 'TestThermo15: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo15: FAIL <---' @@ -83,8 +92,6 @@ program TestThermo15 call EXIT(1) end if - !call ThermoDebug - ! Reset Thermochimica: call ResetThermo diff --git a/test/daily/TestThermo16.F90 b/test/daily/TestThermo16.F90 index 184f1d61..b36fde0f 100644 --- a/test/daily/TestThermo16.F90 +++ b/test/daily/TestThermo16.F90 @@ -30,14 +30,16 @@ program TestThermo16 USE ModuleThermoIO USE ModuleThermo - + USE ModuleTesting + implicit none - !Gibbs Energy result via Factsage - real(8) :: gibbscheck - - !Init test values - gibbscheck = 6.769E5 + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -53,30 +55,34 @@ program TestThermo16 dElementMass(18) = 5D0 ! Ar dElementMass(8) = 2D0 ! O + ! Init test values + dGibbsCheck = 6.76880D05 + dHeatCapacityCheck = 251.212 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 3, 4] !Au, W, O, Ar + dMolFractionTest = [0.272727D0, 9.09090D-02, 0.18181D0, 0.45454D0 ] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - !iPrintResultsMode = 2 - !call PrintResults + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) ! Check results: - if (INFOThermo == 0) then - if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then - ! The test passed: - print *, 'TestThermo16: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo16: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if + if (lPass) then + ! The test passed: + print *, 'TestThermo16: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo16: FAIL <---' @@ -84,9 +90,7 @@ program TestThermo16 call ResetThermo call EXIT(1) end if - - !call ThermoDebug - + ! Reset Thermochimica: call ResetThermo diff --git a/test/daily/TestThermo17.F90 b/test/daily/TestThermo17.F90 index 8c977408..def880dd 100644 --- a/test/daily/TestThermo17.F90 +++ b/test/daily/TestThermo17.F90 @@ -29,14 +29,16 @@ program TestThermo17 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - !Gibbs Energy result via Factsage - real(8) :: gibbscheck - - !Init test values - gibbscheck = 1.672D7 + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -53,28 +55,34 @@ program TestThermo17 dElementMass(8) = 10D0 ! O dElementMass(10) = 10D0 ! Ne + ! Init test values + dGibbsCheck = 1.67160D07 + dHeatCapacityCheck = 603.816 + nSpeciesTest = 5 + iSpeciesIndexTest = [1, 2, 3, 4, 5] !Au, W, O, Ar, Ne + dMolFractionTest = [4.00801D-02, 7.81563D-02, 0.40080D0, 8.01603D-02, 0.40080D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) + ! Check results: - if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (gibbscheck))/((gibbscheck))) < 1D-3) then - ! The test passed: - print *, 'TestThermo17: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo17: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if + if (lPass) then + ! The test passed: + print *, 'TestThermo17: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo17: FAIL <---' diff --git a/test/daily/TestThermo18.F90 b/test/daily/TestThermo18.F90 index 06afb15b..2c7c89c5 100644 --- a/test/daily/TestThermo18.F90 +++ b/test/daily/TestThermo18.F90 @@ -30,16 +30,16 @@ program TestThermo18 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - !Gibbs Energy result via Factsage - real(8) :: gibbscheck - real(8) :: molFractionTest(2) - - !Init test values - gibbscheck = 3.06480D+06 - molFractionTest = [0.75306881663786374D0,3.0917444033201544D-002] + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -56,29 +56,34 @@ program TestThermo18 dElementMass(8) = 5D0 ! O dElementMass(10) = 1D0 ! Ne + ! Init test values + dGibbsCheck = 3.06480D06 + dHeatCapacityCheck = 332.449 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 5, 3, 9] !Au, Au, O, Ne + dMolFractionTest = [0.75306D0, 2.75309D-59, 0.24693D0, 3.09174D-02] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) + ! Check results: - if (INFOThermo == 0) then - if ((DABS(dMolFraction(1) - molFractionTest(1))/molFractionTest(1) < 1D-3).AND. & - (DABS(dMolFraction(9) - molFractionTest(2))/molFractionTest(2) < 1D-3).AND. & - (DABS(dGibbsEnergySys - (gibbscheck))/(gibbscheck) < 1D-3)) then - ! The test passed: - print *, 'TestThermo18: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo18: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if + if (lPass) then + ! The test passed: + print *, 'TestThermo18: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) else ! The test failed. print *, 'TestThermo18: FAIL <---' @@ -87,7 +92,6 @@ program TestThermo18 call EXIT(1) end if - !call ThermoDebug ! Reset Thermochimica: call ResetThermo diff --git a/test/daily/TestThermo19.F90 b/test/daily/TestThermo19.F90 index d660b36c..78268ae5 100644 --- a/test/daily/TestThermo19.F90 +++ b/test/daily/TestThermo19.F90 @@ -29,11 +29,16 @@ program TestThermo19 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +52,14 @@ program TestThermo19 dElementMass(42) = 0.8D0 ! Mo dElementMass(44) = 0.2D0 ! Ru + ! Init test values + dGibbsCheck = -1.44373D05 + dHeatCapacityCheck = 40.2726 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 7] !Mo, Mo2, Ru + dMolFractionTest = [6.40268D-09, 1.93080D-013, 0.23683D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo19 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.44373D5))/(-1.44373E+5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'BCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.2D0)/0.2D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.8D0)/0.8D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 40.2724)/40.2724 < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo19: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo20.F90 b/test/daily/TestThermo20.F90 index 79ba2cfc..9dab1c9f 100644 --- a/test/daily/TestThermo20.F90 +++ b/test/daily/TestThermo20.F90 @@ -29,11 +29,16 @@ program TestThermo20 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +52,14 @@ program TestThermo20 dElementMass(42) = 4.3D0 ! Mo dElementMass(44) = 4.5D0 ! Ru + ! Init test values + dGibbsCheck = -1.30624D06 + dHeatCapacityCheck = 352.384 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 7] !Mo, Mo2, Ru + dMolFractionTest = [4.57902D-09, 9.87550D-14, 0.61776D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo20 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.30624D6))/(-1.30624D6) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.51136D0)/0.51136D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.48864D0)/0.48864D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 352.351)/352.351 < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo20: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo21.F90 b/test/daily/TestThermo21.F90 index 48c3c044..94c16dec 100644 --- a/test/daily/TestThermo21.F90 +++ b/test/daily/TestThermo21.F90 @@ -29,11 +29,16 @@ program TestThermo21 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo21 dElementMass(42) = 0.22D0 ! Mo dElementMass(43) = 0.78D0 ! Tc + ! Init test values + dGibbsCheck = -1.55880D05 + dHeatCapacityCheck = 111.147 + nSpeciesTest = 3 + iSpeciesIndexTest = [2, 7, 8] !Mo2, Mo, Tc + dMolFractionTest = [3.081021D-13, 7.50680D-01, 3.14203D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,29 +68,13 @@ program TestThermo21 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.5588D5))/(-1.5588D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.66535D0)/0.66535D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.33465D0)/0.33465D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 111.198)/111.198 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo21: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo22.F90 b/test/daily/TestThermo22.F90 index d368395b..2de3a4b0 100644 --- a/test/daily/TestThermo22.F90 +++ b/test/daily/TestThermo22.F90 @@ -29,11 +29,16 @@ program TestThermo22 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +52,14 @@ program TestThermo22 dElementMass(46) = 0.4D0 ! Pd dElementMass(44) = 0.6D0 ! Ru + ! Init test values + dGibbsCheck = -1.33770D04 + dHeatCapacityCheck = 25.7619 + nSpeciesTest = 3 + iSpeciesIndexTest = [2, 3, 4] !Pd, Pd, Ru + dMolFractionTest = [1.02116D-43, 9.94530D-01, 5.46947D-03] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo22 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.33770D4))/(-1.33770D4) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 5.4695E-03)/5.4695E-03 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.99453D0)/0.99453D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 25.7620)/25.7620 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo22: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo23.F90 b/test/daily/TestThermo23.F90 index f89bf244..fdcf18ec 100644 --- a/test/daily/TestThermo23.F90 +++ b/test/daily/TestThermo23.F90 @@ -29,12 +29,17 @@ program TestThermo23 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' @@ -47,6 +52,14 @@ program TestThermo23 dElementMass(46) = 40D0 ! Pd dElementMass(43) = 60D0 ! Tc + ! Init test values + dGibbsCheck = -5.04309D06 + dHeatCapacityCheck = 3023.31 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 11] !Tc, Pd, Pd + dMolFractionTest = [1.07317D-26, 4.31574D-14, 3.99999D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo23 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.04309D6))/(-5.04309D6) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.4D0)/0.4D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.6D0)/0.6D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 3023.31)/3023.31 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo23: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo24.F90 b/test/daily/TestThermo24.F90 index 12aa7671..12e2a8e1 100644 --- a/test/daily/TestThermo24.F90 +++ b/test/daily/TestThermo24.F90 @@ -29,11 +29,17 @@ program TestThermo24 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) + ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +53,14 @@ program TestThermo24 dElementMass(43) = 1D0 ! Tc dElementMass(44) = 99D0 ! Ru + ! Init test values + dGibbsCheck = -5.64282D06 + dHeatCapacityCheck = 2983.20 + nSpeciesTest = 2 + iSpeciesIndexTest = [3, 8] !Tc, Ru + dMolFractionTest = [1.84242D-02, 9.88098D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +68,13 @@ program TestThermo24 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - if (s1pass .AND. s2pass .AND. cppass) then + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) + + if (lPass) then ! The test passed: print *, 'TestThermo24: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo25.F90 b/test/daily/TestThermo25.F90 index 4f3540a8..b1a581c6 100644 --- a/test/daily/TestThermo25.F90 +++ b/test/daily/TestThermo25.F90 @@ -28,11 +28,16 @@ program TestThermo25 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -46,6 +51,14 @@ program TestThermo25 dElementMass(43) = 0.55D0 ! Tc dElementMass(44) = 0.45D0 ! Ru + ! Init test values + dGibbsCheck = -1.54452D05 + dHeatCapacityCheck = 38.5393 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 9, 2, 10] !Tc, Tc, Ru, Ru + dMolFractionTest = [2.68858D-08, 5.57738D-01, 3.18793D-08, 4.42261D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -53,29 +66,13 @@ program TestThermo25 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo25: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo26.F90 b/test/daily/TestThermo26.F90 index 611f4f2d..3f95a22f 100644 --- a/test/daily/TestThermo26.F90 +++ b/test/daily/TestThermo26.F90 @@ -29,11 +29,16 @@ program TestThermo26 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo26 dElementMass(46) = 0.4D0 ! Pd dElementMass(44) = 0.3D0 ! Ru + ! Init test values + dGibbsCheck = -1.38528D05 + dHeatCapacityCheck = 37.9398 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 3, 4, 12] !Mo, Mo2, Ru, Pd, Pd + dMolFractionTest = [5.30212D-12, 6.86724D-18, 2.57749D-10, 9.71941D-05, 3.01074D-02] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,32 +68,13 @@ program TestThermo26 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo26: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo27.F90 b/test/daily/TestThermo27.F90 index d374fc5f..cf92078d 100644 --- a/test/daily/TestThermo27.F90 +++ b/test/daily/TestThermo27.F90 @@ -29,11 +29,16 @@ program TestThermo27 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo27 dElementMass(46) = 0.3D0 ! Pd dElementMass(44) = 0.6D0 ! Ru + ! Init test values + dGibbsCheck = -1.27255D05 + dHeatCapacityCheck = 78.2751 + nSpeciesTest = 3 + iSpeciesIndexTest = [11, 2, 12, 13] !Mo, Mo2, Pd, Ru + dMolFractionTest = [9.82191D-06, 2.97670D-19, 1.64922D-01, 8.35067D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,32 +68,13 @@ program TestThermo27 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.27255D5))/(-1.27255D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13768D0)/0.13768D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.12624D0)/0.12624D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.73608D0)/0.73608D0 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 78.2758)/78.2758 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo27: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo28.F90 b/test/daily/TestThermo28.F90 index ce67e9b9..d8ee438f 100644 --- a/test/daily/TestThermo28.F90 +++ b/test/daily/TestThermo28.F90 @@ -29,11 +29,16 @@ program TestThermo28 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo28 dElementMass(43) = 0.125D0 ! Tc dElementMass(46) = 0.874D0 ! Pd + ! Init test values + dGibbsCheck = -1.28092D05 + dHeatCapacityCheck = 679.088 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 14, 15] !Tc, Pd, Tc, Pd + dMolFractionTest = [5.99165D-11, 8.25169D-05, 4.41759D-01, 9.03579D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,29 +68,13 @@ program TestThermo28 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.28092D5))/(-1.28092D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'LiqN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.90358D0)/0.90358D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 9.6420E-02)/9.6420E-02 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 679.082)/679.082 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo28: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo29.F90 b/test/daily/TestThermo29.F90 index 69e643f3..d4167ba7 100644 --- a/test/daily/TestThermo29.F90 +++ b/test/daily/TestThermo29.F90 @@ -29,11 +29,16 @@ program TestThermo29 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +52,14 @@ program TestThermo29 dElementMass(43) = 1D0 ! Tc dElementMass(44) = 99D0 ! Ru + ! Init test values + dGibbsCheck = -5.64282D06 + dHeatCapacityCheck = 2983.20 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 9, 10] !Tc, Ru, Tc, Ru + dMolFractionTest = [3.03879D-22, 9.31086D-21, 3.48751D-03, 9.96512D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo29 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-5.64282D6))/(-5.64282D6) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.99D0)/0.99D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.01D0)/0.01D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 2983.20)/2983.20 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo29: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo30.F90 b/test/daily/TestThermo30.F90 index b51945d5..80fa5382 100644 --- a/test/daily/TestThermo30.F90 +++ b/test/daily/TestThermo30.F90 @@ -29,11 +29,16 @@ program TestThermo30 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,6 +52,14 @@ program TestThermo30 dElementMass(43) = 0.55D0 ! Tc dElementMass(44) = 0.45D0 ! Ru + ! Init test values + dGibbsCheck = -1.54452D05 + dHeatCapacityCheck = 38.5393 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 7, 8] !Tc, Ru, Tc, Ru + dMolFractionTest = [2.68858D-08, 3.18793D-08, 5.62750D-01, 4.37249D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -54,29 +67,13 @@ program TestThermo30 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.54452D5))/(-1.54452D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.45D0)/0.45D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 0.55D0)/0.55D0 < 1D-3) s2pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 38.5394)/38.5394 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo30: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo31.F90 b/test/daily/TestThermo31.F90 index 8460d85d..5231266f 100644 --- a/test/daily/TestThermo31.F90 +++ b/test/daily/TestThermo31.F90 @@ -29,11 +29,16 @@ program TestThermo31 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo31 dElementMass(46) = 0.4D0 ! Pd dElementMass(44) = 0.3D0 ! Ru + ! Init test values + dGibbsCheck = -1.38528D05 + dHeatCapacityCheck = 37.9398 + nSpeciesTest = 5 + iSpeciesIndexTest = [1, 2, 11, 12, 13] !Mo, Mo2, Mo, Pd, Ru + dMolFractionTest = [5.30212D-12, 6.86724D-18, 2.50864D-01, 3.01074D-02, 7.19027D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,32 +68,13 @@ program TestThermo31 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.38528D5))/(-1.38528D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'FCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.13193D0)/0.13193D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.24756D0)/0.24756D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 0.62051D0)/0.62051D0 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 37.9399)/37.9399 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo31: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo32.F90 b/test/daily/TestThermo32.F90 index 7fe29a7e..a4562409 100644 --- a/test/daily/TestThermo32.F90 +++ b/test/daily/TestThermo32.F90 @@ -29,11 +29,16 @@ program TestThermo32 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo32 dElementMass(46) = 0.3D0 ! Pd dElementMass(44) = 0.6D0 ! Ru + ! Init test values + dGibbsCheck = -4.90922D04 + dHeatCapacityCheck = 30.1581 + nSpeciesTest = 5 + iSpeciesIndexTest = [1, 2, 9, 10, 11] !Mo, Mo2, Pd, Ru, Mo + dMolFractionTest = [1.03385D-32, 1.09989D-44, 8.54218D-01, 4.68076D-02, 3.51236D-11] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,32 +68,13 @@ program TestThermo32 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-4.90922E+04))/(-4.90922E+04) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'HCPN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Ru') then - if (DABS(dMolFraction(j) - 0.80273D0)/0.80273D0 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.10757D0)/0.10757D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 8.9693E-02)/8.9693E-02 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 30.1581)/30.1581 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo32: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo33.F90 b/test/daily/TestThermo33.F90 index ba808c4b..8db4e89e 100644 --- a/test/daily/TestThermo33.F90 +++ b/test/daily/TestThermo33.F90 @@ -29,11 +29,16 @@ program TestThermo33 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: s1pass, s2pass, s3pass, cppass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -48,6 +53,14 @@ program TestThermo33 dElementMass(46) = 0.09D0 ! Pd dElementMass(42) = 0.9D0 ! Mo + ! Init test values + dGibbsCheck = -1.05595D05 + dHeatCapacityCheck = 40.0333 + nSpeciesTest = 6 + iSpeciesIndexTest = [10, 11, 12, 19, 20, 21] !Tc, Pd, Mo, Tc, Mo, Pd + dMolFractionTest = [6.8001D-04, 9.3597D-01, 5.4310D-02, 1.3208D-02, 4.7934D-01, 5.1949D-01] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) @@ -55,32 +68,13 @@ program TestThermo33 call Thermochimica call HeatCapacity - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - cppass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS(dGibbsEnergySys - (-1.05595D5))/(-1.05595D5) < 1D-3) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'BCCN') then - do j = nSpeciesPhase(k-1) + 1, nSpeciesPhase(k) - if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Tc') then - if (DABS(dMolFraction(j) - 9.7175E-03)/9.7175E-03 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Mo') then - if (DABS(dMolFraction(j) - 0.93597D0)/0.93597D0 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cSpeciesName(j))) == 'Pd') then - if (DABS(dMolFraction(j) - 5.4310E-02)/5.4310E-02 < 1D-3) s3pass = .TRUE. - end if - end do - end if - end do - if (ABS(dHeatCapacity - 40.0333)/40.0333 < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. s2pass .AND. s3pass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo33: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo34.F90 b/test/daily/TestThermo34.F90 index 381dd087..0b93a816 100644 --- a/test/daily/TestThermo34.F90 +++ b/test/daily/TestThermo34.F90 @@ -29,12 +29,16 @@ program TestThermo34 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i, j, iFirst - real(8) :: T, B, StructureFactor - logical :: fccPass, bccPass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -52,43 +56,28 @@ program TestThermo34 dElementMass(50) = 0.1D0 ! Sn dElementMass(1) = 1D0 ! H - ! Specify output mode: - iPrintResultsMode = 2 + ! Init test values + dGibbsCheck = -4.96674D04 + dHeatCapacityCheck = 131.162 + nSpeciesTest = 8 + iSpeciesIndexTest = [1, 3, 4, 8, 9, 11, 39, 60] !Cr, Fe, H, Ni, Sn, V, Cr:Fe, V:Ni + dMolFractionTest = [1.4724D-64, 4.1279D-68, 1.3186D-37, 5.2694D-71, 1.9488D-55, 4.4569D-89, 8.1559D-02, 5.0192D-04] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica - - fccPass = .FALSE. - bccPass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (-4.96674D04))/((-4.96674D04))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'FCC_A1') then - call CompMagneticTemperatureMoment(j,T,B) - iFirst = nSpeciesPhase(j-1) + 1 - StructureFactor = dCoeffGibbsMagnetic(iFirst,3) - T = -T * StructureFactor - B = -B * StructureFactor - if ((DABS((T-97.24D0)/97.24D0) < 1D-3) .AND. (DABS((B-0.13862D0)/0.13862D0) < 1D-3)) then - fccPass = .TRUE. - end if - else if (cSolnPhaseName(j) == 'BCC_A2') then - call CompMagneticTemperatureMoment(j,T,B) - if ((DABS((T-641.38D0)/641.38D0) < 1D-3) .AND. (DABS((B-1.5248D0)/1.5248D0) < 1D-3)) then - bccPass = .TRUE. - end if - end if - end do - end if - end if + call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (fccPass .AND. bccPass) then + if (lPass) then ! The test passed: print *, 'TestThermo34: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo35.F90 b/test/daily/TestThermo35.F90 index 73ad226e..c3f6d86b 100644 --- a/test/daily/TestThermo35.F90 +++ b/test/daily/TestThermo35.F90 @@ -31,12 +31,15 @@ program TestThermo35 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS - + USE ModuleTesting implicit none - integer :: i, j, iFirst - real(8) :: T, B, StructureFactor - logical :: fccPass, liquidPass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -52,41 +55,27 @@ program TestThermo35 dElementMass(26) = 1.0D0 ! Fe dElementMass(29) = 1.0D0 ! Cu + !Init test values + dGibbsCheck = -1.73325D05 + dHeatCapacityCheck = 1.05080D02 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 6, 13] !C-C-Va-Va, Cu-Fe-Va-Va, Fe + dMolFractionTest = [1.8840D-09, 4.4977D-02, 0.88662D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - fccPass = .FALSE. - liquidPass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS(dGibbsEnergySys - (-1.73325D05))/((-1.73325D05))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'FCC_A1') then - call CompMagneticTemperatureMoment(j,T,B) - iFirst = nSpeciesPhase(j-1) + 1 - StructureFactor = dCoeffGibbsMagnetic(iFirst,3) - T = -T * StructureFactor - B = -B * StructureFactor - if ((DABS((T-59.4D0)/59.4D0) < 1D-3) .AND. (DABS((B-0.62064D0)/0.62064D0) < 1D-3)) then - fccPass = .TRUE. - end if - else if (cSolnPhaseName(j) == 'Liquid') then - if (DABS((dMolesPhase(nElements + 1 - i)-2.9666D0)/2.9666D0) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j))-4.4975D-2)/4.4975D-2) < 1D-3) then - liquidPass = .TRUE. - end if - end if - end if - end do - end if - end if + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (fccPass .AND. liquidPass) then + if (lPass) then ! The test passed: print *, 'TestThermo35: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo36.F90 b/test/daily/TestThermo36.F90 index 3e9a46ce..60a8789b 100644 --- a/test/daily/TestThermo36.F90 +++ b/test/daily/TestThermo36.F90 @@ -16,7 +16,7 @@ ! ---- ---------- --------------------- ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! + ! 04/09/2024 A.E.F. Fitzsimmons Remodel ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct @@ -30,12 +30,16 @@ program TestThermo36 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, hemaPass, cppass + + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -51,47 +55,27 @@ program TestThermo36 dElementMass(23) = 0.5D0 ! V dElementMass(26) = 0.5D0 ! Fe - gibbsCheck = -1.21336D06 - p1check = 0.36803D0 - p2check = 0.47842D0 - s1check = 1.0885D-2 - s2check = 5.6813D-2 - dHeatCapacityCheck = 186.933 - + ! Init test values + dGibbsCheck = -1.21336D06 + dHeatCapacityCheck = 186.933 + nSpeciesTest = 3 + iSpeciesIndexTest = [9, 20, 34] !Fe[3+]-Fe[3+]-O-O, Fe[3+]-Ti[3+]-O-O, Ti2O3[2+] + dMolFractionTest = [1.0886D-02, 9.0028D-04, 0.44965D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + if (INFOThermo == 0) call Thermochimica call HeatCapacity - subqPass = .FALSE. - hemaPass = .FALSE. - cppass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'Hemasoln') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - hemaPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. hemaPass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo36: PASS' ! Reset Thermochimica: @@ -111,4 +95,4 @@ program TestThermo36 ! Call the debugger: call ThermoDebug -end program TestThermo36 +end program TestThermo36 \ No newline at end of file diff --git a/test/daily/TestThermo37.F90 b/test/daily/TestThermo37.F90 index 582cac20..3626b557 100644 --- a/test/daily/TestThermo37.F90 +++ b/test/daily/TestThermo37.F90 @@ -16,7 +16,7 @@ ! ---- ---------- --------------------- ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! + ! 06/09/2024 A.E.F. Fitzsimmons Remodel with ModuleTesting ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct @@ -30,18 +30,22 @@ program TestThermo37 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i, j, k, l - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' ! Specify values: dPressure = 1D0 @@ -50,49 +54,27 @@ program TestThermo37 dElementMass(22) = 0.5D0 ! Ti dElementMass(26) = 0.5D0 ! Fe - gibbsCheck = -1.00057D06 - p1check = 1.1768D0 - p2check = 0.14544D0 - s1check = 5.1547D-2 - s2check = 2.9406D-7 - dHeatCapacityCheck = 105.954 + !Init test values + dGibbsCheck = -1.00057D06 + dHeatCapacityCheck = 105.954 + nSpeciesTest = 2 + iSpeciesIndexTest = [8, 15] !Ti[4+]-Ti[4+]-O-O, Ti[4+]-Ti[3+]-O-O + dMolFractionTest = [0.24690D0, 6.2213D-04] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica call HeatCapacity - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - do l = nSpeciesPhase(j-1) + 1, nSpeciesPhase(j) - if (DABS((dMolFraction(nSpeciesPhase(j-1)+5)-s2check)/s2check) < 1D-3) then - gasPass = .TRUE. - end if - end do - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. gasPass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo37: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo38.F90 b/test/daily/TestThermo38.F90 index 00c2b41f..529dcacc 100644 --- a/test/daily/TestThermo38.F90 +++ b/test/daily/TestThermo38.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 09/17/2024 A.E.F. Fitzsimmons Remodle SQA ! ! Purpose: ! ======== @@ -30,18 +31,23 @@ program TestThermo38 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) + ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' ! Specify values: dPressure = 1D0 @@ -50,47 +56,27 @@ program TestThermo38 dElementMass(23) = 0.5D0 ! V dElementMass(26) = 0.5D0 ! Fe - gibbsCheck = -8.92127D05 - p1check = 0.80434D0 - p2check = 4.0631D-2 - s1check = 0.17025D0 - s2check = 0.99973D0 - dHeatCapacityCheck = 133.351 - + !Init test values + dGibbsCheck = -8.92127D05 + dHeatCapacityCheck = 133.351 + nSpeciesTest = 4 + iSpeciesIndexTest = [2, 3, 6, 10] !V, Fe, FeO, Fe[3+]-Fe[2+]-O-O + dMolFractionTest = [3.8002D-17, 1.3197D-08, 9.0072D-07, 0.15646D0] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica call HeatCapacity - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. gasPass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo38: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo39.F90 b/test/daily/TestThermo39.F90 index 79171c98..a69fe7e1 100644 --- a/test/daily/TestThermo39.F90 +++ b/test/daily/TestThermo39.F90 @@ -30,18 +30,21 @@ program TestThermo39 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS - + Use ModuleTesting implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, s2check, dHeatCapacityCheck - logical :: subqPass, hemaPass, cppass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' ! Specify values: dPressure = 1D0 @@ -50,47 +53,27 @@ program TestThermo39 dElementMass(22) = 0.5D0 ! Ti dElementMass(23) = 0.5D0 ! V - gibbsCheck = -1.09209D06 - p1check = 0.60817D0 - p2check = 0.18563D0 - s1check = 0.25897D0 - s2check = 0.34107D0 - dHeatCapacityCheck = 100.960 + !Init test values + dGibbsCheck = -1.09209D06 + dHeatCapacityCheck = 100.960 + nSpeciesTest = 2 + iSpeciesIndexTest = [7, 9] !V2O3-V2O3-O-O, Ti[3+]-Ti[3+]-O-O + dMolFractionTest = [0.25897D0, 1.3458D-05] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica call HeatCapacity - subqPass = .FALSE. - hemaPass = .FALSE. - cppass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'SlagBsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'Hemasoln') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s2check)/s2check) < 1D-3) then - hemaPass = .TRUE. - end if - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + if (INFOThermo == 0) call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. hemaPass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo39: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo40.F90 b/test/daily/TestThermo40.F90 index 8d56cca2..9b5dbc25 100644 --- a/test/daily/TestThermo40.F90 +++ b/test/daily/TestThermo40.F90 @@ -15,7 +15,8 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 24/06/2021 M. Poschmann Original code - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 09/17/2024 A.E.F. Fitzsimmons Remodle SQA ! ! Purpose: ! ======== @@ -30,63 +31,50 @@ program TestThermo40 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i, j, k - real(8) :: gibbsCheck, p1check, p2check, s1check, dHeatCapacityCheck - logical :: subqPass, gasPass, cppass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' cInputUnitPressure = 'atm' cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' + cThermoFileName = DATA_DIRECTORY // 'FeTiVO.dat' ! Specify values: dPressure = 1D0 dTemperature = 1000D0 dElementMass(8) = 2D0 ! O dElementMass(22) = 0.5D0 ! Ti - - gibbsCheck = -6.24557D05 - p1check = 0.50000D0 - s1check = 0.99772D0 - p2check = 0.50114D0 - dHeatCapacityCheck = 54.8676 - + + !Init test values + dGibbsCheck = -6.24557D05 + dHeatCapacityCheck = 5.48677D01 + nSpeciesTest = 2 + iSpeciesIndexTest = [3, 7, 9] !Gas: TiO2, Rutilesoln: TiO2, Ti[4+] + dMolFractionTest = [1.3533D-23, 9.9772D-01, 2.2805D-03] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica call HeatCapacity - subqPass = .FALSE. - gasPass = .FALSE. - cppass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'Rutilesoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end do - if (ABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck < 1D-3) cppass = .TRUE. - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. gasPass .AND. cppass) then + if (lPass) then ! The test passed: print *, 'TestThermo40: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo41.F90 b/test/daily/TestThermo41.F90 index a962f1b4..829d796f 100644 --- a/test/daily/TestThermo41.F90 +++ b/test/daily/TestThermo41.F90 @@ -2,14 +2,16 @@ program TestThermo41 USE ModuleThermoIO USE ModuleThermo - USE ModuleGEMSolver - USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i,j,k - real(8) :: gibbsCheck, p1check, p2check, s1check - logical :: subqPass, gasPass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -20,48 +22,31 @@ program TestThermo41 ! Specify values: dTemperature = 2000D0 dPressure = 1.0D0 - dElementMass = 0D0 dElementMass(17) = 2D0 ! Cl dElementMass(13) = 1D0 ! Al - gibbsCheck = -9.64834D+05 - p1check = 0.80307D0 - s1check = 3.8514D-03 - p2check = 0.60797D0 - - ! Specify output and debug modes: - iPrintResultsMode = 2 - lDebugMode = .FALSE. + !Init test values + dGibbsCheck = -9.64834D05 + dHeatCapacityCheck = 6.84308D01 + nSpeciesTest = 3 + iSpeciesIndexTest = [2, 4, 8] !Al2Cl6, Al2-Al2-Cl-Cl, Al-Al2-Va-Va + dMolFractionTest = [1.5843D-04, 5.3213D-03, 0.36809D0] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica + call HeatCapacity + + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - subqPass = .FALSE. - gasPass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'MSsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - else if (cSolnPhaseName(j) == 'gas_ideal') then - if (DABS((dMolesPhase(k)-p2check)/p2check) < 1D-3) then - gasPass = .TRUE. - end if - end if - end do - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. gasPass) then + if (lPass) then ! The test passed: print *, 'TestThermo41: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo42.F90 b/test/daily/TestThermo42.F90 index 069cc67b..41a8fac1 100644 --- a/test/daily/TestThermo42.F90 +++ b/test/daily/TestThermo42.F90 @@ -4,12 +4,16 @@ program TestThermo42 USE ModuleThermo USE ModuleGEMSolver USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i,j,k - real(8) :: gibbsCheck, p1check, p2check, s1check - logical :: subqPass, solPass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -20,53 +24,32 @@ program TestThermo42 ! Specify values: dTemperature = 1000D0 dPressure = 1.0D0 - dElementMass = 0D0 dElementMass(17) = 3D0 ! Cl dElementMass(11) = 1D0 ! Na dElementMass(13) = 1D0 ! Al - gibbsCheck = -1.17685D+06 - p1check = 4.2176D0 - s1check = 0.23035D0 - p2check = 4.4748D-2 - - ! Specify output and debug modes: - iPrintResultsMode = 2 - lDebugMode = .FALSE. + !Init test values + dGibbsCheck = -1.17685D06 + dHeatCapacityCheck = 3.10958D02 + nSpeciesTest = 3 + iSpeciesIndexTest = [8, 10, 12] !Al-Al-Cl-Cl, Na-Al-Cl-Cl, Al-Al2-Cl-Cl + dMolFractionTest = [3.1217D-03, 0.54214D0, 6.6187D-04] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + if (INFOThermo == 0) call Thermochimica + call HeatCapacity - subqPass = .FALSE. - solPass = .FALSE. - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - gibbsCheck)/gibbsCheck) < 1D-3) then - do i = 1, nSolnPhases - k = nElements + 1 - i - j = -iAssemblage(k) - if (cSolnPhaseName(j) == 'MSsoln') then - if (DABS((dMolesPhase(k)-p1check)/p1check) < 1D-3) then - if (DABS((dMolFraction(nSpeciesPhase(j-1)+1)-s1check)/s1check) < 1D-3) then - subqPass = .TRUE. - end if - end if - end if - end do - do i = 1, nConPhases - j = iAssemblage(i) - if (ADJUSTL(TRIM(cSpeciesName(j))) == 'NaCl_S1(s)') then - if (DABS((dMolesPhase(i)-p2check)/p2check) < 1D-3) then - solPass = .TRUE. - end if - end if - end do - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (subqPass .AND. solPass) then + if (lPass) then ! The test passed: print *, 'TestThermo42: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo43.F90 b/test/daily/TestThermo43.F90 index d28735ab..e6e90eaf 100644 --- a/test/daily/TestThermo43.F90 +++ b/test/daily/TestThermo43.F90 @@ -15,7 +15,7 @@ ! Date Programmer Description of change ! ---- ---------- --------------------- ! 08/31/2021 M. Poschmann Original code - ! + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that ternary mixing SUBL cases with only @@ -29,11 +29,16 @@ program TestThermo43 USE ModuleGEMSolver USE ModuleThermo USE ModuleParseCS + USE ModuleTesting implicit none - integer :: i, j - logical :: bccPass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -49,30 +54,28 @@ program TestThermo43 dElementMass(8) = 1D0 ! O dElementMass(1) = 0.1D0 ! H - ! Specify output mode: - iPrintResultsMode = 2 + ! Init test values + dGibbsCheck = -5.24838D05 + dHeatCapacityCheck = 72.479 + nSpeciesTest = 7 + iSpeciesIndexTest = [1, 3, 5, 7, 10, 15, 17] !H, H2O, HO, HZr, NbO2, Zr2, ZrO2 + dMolFractionTest = [1.1114D-20, 3.8973D-51, 5.8381D-46, 3.0155D-47, 7.4787D-48, 2.7307D-79, 7.9320D-43] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - if (INFOThermo == 0) call Thermochimica + call Thermochimica + call HeatCapacity - bccPass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - ! The fluorite oxide phase should be the only one stable at equilibrium. - if ((DABS((dGibbsEnergySys - (-5.24838E+05))/(-5.24838E+05))) < 1D-3) then - do i = 1, nSolnPhases - j = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(j) == 'BCC_A2') then - bccPass = .TRUE. - end if - end do - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (bccPass) then + if (lPass) then ! The test passed: print *, 'TestThermo43: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo44.F90 b/test/daily/TestThermo44.F90 index 21226b89..9704beb6 100644 --- a/test/daily/TestThermo44.F90 +++ b/test/daily/TestThermo44.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 10/01/2021 M. Poschmann Original code ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== @@ -29,11 +30,16 @@ program TestThermo44 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - integer :: i,j,k - logical :: p1pass, p2pass, p3pass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -49,31 +55,28 @@ program TestThermo44 dElementMass(44) = 1D0 ! Ru dElementMass(46) = 1D0 ! Pd + ! Init test values + dGibbsCheck = -4.48928D04 + dHeatCapacityCheck = 118.263 + nSpeciesTest = 6 + iSpeciesIndexTest = [1, 2, 3, 4, 10, 11] !Mo, Pd, Tc, Ru, Pd, Tc + dMolFractionTest = [2.1655D-04, 4.0808D-03, 1.1254D-01, 8.8316D-01, 9.2991D-01, 6.6589D-02] + lPass = .FALSE. + ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - p1pass = .FALSE. - p2pass = .FALSE. - p3pass = .FALSE. - ! Check results: - if (INFOThermo == 0) then - if (DABS((dGibbsEnergySys - (-4.48928D4))/(-4.48928D4)) < 1D-3) then - do i = 1, nSolnPhases - j = nElements + 1 - i - k = -iAssemblage(j) - if (cSolnPhaseName(k) == 'BCCN') then - if (DABS(dMolesPhase(j) - 1.8231D0)/1.8231D0 < 1D-3) p1pass = .TRUE. - if (DABS(dMolesPhase(j) - 1.1145D0)/1.1145D0 < 1D-3) p2pass = .TRUE. - if (DABS(dMolesPhase(j) - 1.0625D0)/1.0625D0 < 1D-3) p3pass = .TRUE. - end if - end do - end if - end if + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (p1pass .AND. p2pass .AND. p3pass) then + if (lPass) then ! The test passed: print *, 'TestThermo44: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo45.F90 b/test/daily/TestThermo45.F90 index e359ad3c..bc5bab4d 100644 --- a/test/daily/TestThermo45.F90 +++ b/test/daily/TestThermo45.F90 @@ -30,16 +30,16 @@ program TestThermo45 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7, sfcheck8 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - logical :: s5pass, s6pass, s7pass, s8pass - + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -52,86 +52,29 @@ program TestThermo45 dTemperature = 1500D0 dElementMass(8) = 0.3D0 ! O dElementMass(50) = 0.7D0 ! Sn - ! Liquid #1 - sfcheck1 = 1D0 !Sn - sfcheck2 = 1.55834D-2 !O-2 - sfcheck3 = 9.84334D-1 !Va - sfcheck4 = 8.22893D-5 !O2Sn - ! Liquid #2 - sfcheck5 = 1D0 !Sn - sfcheck6 = 9.12945D-01 !O-2 - sfcheck7 = 1.35005D-2 !Va - sfcheck8 = 7.35549D-2 !O2Sn - pcheck1 = -310505D0 ! O - pcheck2 = -125800D0 ! Sn - gibbscheck = -181212D0 + !Init test values + dGibbsCheck = -1.80962D05 + dHeatCapacityCheck = -1.198592D07 + nSpeciesTest = 4 + iSpeciesIndexTest = [2, 7, 11, 14] !O2, Sn2, O2Sn, Sn:O + dMolFractionTest = [3.0860D-10, 1.5042D-08, 3.5945D-26, 8.0039D-03] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - !do i = 1, nSolnPhases - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O2SN') then - if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass .AND. & - s8pass) then + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) + + if (lPass) then ! The test passed: print *, 'TestThermo45: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo46.F90 b/test/daily/TestThermo46.F90 index 468b29f3..93cfbfbd 100644 --- a/test/daily/TestThermo46.F90 +++ b/test/daily/TestThermo46.F90 @@ -30,16 +30,16 @@ program TestThermo46 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3 - - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass - - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -50,62 +50,32 @@ program TestThermo46 ! Specify values: dPressure = 1D0 dTemperature = 2000D0 - dElementMass(8) = 0.1D0 ! O - dElementMass(24) = 0.2D0 ! Cr - dElementMass(40) = 0.7D0 ! Zr - - ! Liquid #1 - sfcheck1 = 3.30097D-1 !Cr - sfcheck2 = 6.69903D-1 !Zr - sfcheck3 = 9.99997D-1 !Va - - pcheck1 = -126330D0 ! Cr - pcheck2 = -628950D0 ! O - pcheck3 = -151241D0 ! Zr - - gibbscheck = -194030D0 + dElementMass(8) = 0.1D0 ! O + dElementMass(24) = 0.2D0 ! Cr + dElementMass(40) = 0.7D0 ! Zr + + ! Init test values + dGibbsCheck = -1.94030D05 + dHeatCapacityCheck = 43.8857 + nSpeciesTest = 5 + iSpeciesIndexTest = [1, 10, 18, 44, 50] !Cr, Cr+3:O-2, Cr:O, ZR:CR, ZR:O + dMolFractionTest = [3.7689D-04, 2.4239D-07, 6.8007D-06, 7.5995D-05, 1.0000D-05] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - !s4pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'CR+3') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'ZR+4') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - end if - end do - end do - - end if - end do - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass) then + if (lPass) then ! The test passed: print *, 'TestThermo46: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo47.F90 b/test/daily/TestThermo47.F90 index 28e3bfef..0faec548 100644 --- a/test/daily/TestThermo47.F90 +++ b/test/daily/TestThermo47.F90 @@ -34,13 +34,16 @@ program TestThermo47 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: @@ -52,57 +55,31 @@ program TestThermo47 ! Specify values: dPressure = 1D0 dTemperature = 700D0 - dElementMass(52) = 0.8D0 ! Te - dElementMass(55) = 0.2D0 ! Cs + dElementMass(52) = 1D0 ! Te + dElementMass(55) = 1D0 ! Cs - ! Liquid #1 - sfcheck1 = 1D0 !Cs - sfcheck2 = 1.25D-1 !Cs2Te - sfcheck3 = 8.75D-1 !Te - - pcheck1 = -275754D0 !Cs - pcheck2 = -43828.1D0 !Te - - gibbscheck = -90213.3D0 + !Init test values + dGibbsCheck = -2.93180D05 + dHeatCapacityCheck = 9.26111D01 + nSpeciesTest = 2 + iSpeciesIndexTest = [16, 17] !Cs2Te, Te + dMolFractionTest = [0.41360D0, 0.58640D0] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: - call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQUID') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - end if - end do - end do - end if - end do - end if - end if + if (INFOThermo == 0) call Thermochimica + call HeatCapacity + + !Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass) then + if (lPass) then ! The test passed: print *, 'TestThermo47: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo48.F90 b/test/daily/TestThermo48.F90 index 87f3603b..52fcb7b2 100644 --- a/test/daily/TestThermo48.F90 +++ b/test/daily/TestThermo48.F90 @@ -34,16 +34,16 @@ program TestThermo48 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4, sfcheck5 - real(8) :: sfcheck6, sfcheck7, sfcheck8, sfcheck9, sfcheck10 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass, s5pass - logical :: s6pass, s7pass, s8pass, s9pass, s10pass - + !Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -54,103 +54,32 @@ program TestThermo48 ! Specify values: dPressure = 1D0 dTemperature = 2500D0 - dElementMass(20) = 1D0 ! Ca - dElementMass(25) = 1D0 ! Mn - dElementMass(16) = 1D0 ! S - - ! Liquid #1 - sfcheck1 = 8.06572D-1 !Ca - sfcheck2 = 1.93428D-1 !Mn - sfcheck3 = 8.18084D-1 !S-2 - sfcheck4 = 1.81915D-1 !Va - sfcheck5 = 7.69522D-7 !S - - ! Liquid #2 - sfcheck6 = 1.96945D-2 !Ca - sfcheck7 = 9.80306D-1 !Mn - sfcheck8 = 1.6531D-3 !S-2 - sfcheck9 = 9.98344D-1 !Va - sfcheck10 = 3.04003D-6 !S - - pcheck1 = -251878D0 !Ca - pcheck2 = -201710D0 !Mn - pcheck3 = -457030D0 !S - - gibbscheck = -910619D0 + dElementMass(20) = 1D0 ! Ca + dElementMass(25) = 1D0 ! Mn + dElementMass(16) = 1D0 ! S + + !Init test values + dGibbsCheck = -9.10619D05 + dHeatCapacityCheck = -5.32116D03 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 19, 20] !S, Ca:S, Mn:S + dMolFractionTest = [2.8964D-06, 5.4737D-03, 9.9452D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica - - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - s9pass = .FALSE. - s10pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck8)/sfcheck8 < 1D-3) s8pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck9)/sfcheck9 < 1D-3) s9pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S') then - if (DABS(dSiteFraction(i,j,l) - sfcheck10)/sfcheck10 < 1D-3) s10pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if - - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass .AND. & - s8pass .AND. & - s9pass .AND. & - s10pass) then + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) + + if (lPass) then ! The test passed: print *, 'TestThermo48: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo49.F90 b/test/daily/TestThermo49.F90 index 62bd0cdf..efde9afa 100644 --- a/test/daily/TestThermo49.F90 +++ b/test/daily/TestThermo49.F90 @@ -31,19 +31,17 @@ !------------------------------------------------------------------------------------------------------------- program TestThermo49 - USE ModuleThermoIO USE ModuleThermo - + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - logical :: s5pass, s6pass, s7pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -58,84 +56,28 @@ program TestThermo49 dElementMass(25) = 4D0 ! Mn dElementMass(16) = 3D0 ! S - ! Liquid #1 - sfcheck1 = 3.2331D-1 !Fe+2 - sfcheck2 = 6.7669D-1 !Mn+2 - sfcheck3 = 5.1140D-1 !S-2 - sfcheck4 = 4.8860D-1 !Va - - ! Liquid #2 - sfcheck5 = 7.7271D-1 !Fe+2 - sfcheck6 = 2.27D-1 !Mn+2 - sfcheck7 = 9.9999D-1 !Va - - pcheck1 = -121307D0 !Ca - pcheck2 = -155496D0 !Mn - pcheck3 = -360095D0 !S - - gibbscheck = -1944880D0 + ! Init test values + dGibbsCheck = -1.94495D06 + dHeatCapacityCheck = 128.00 + nSpeciesTest = 6 + iSpeciesIndexTest = [10, 11, 12, 15, 16, 17] !Fe+2:S-2, Fe+2:Va, Mn+2:S-2, Fe+2:S-2, Fe+2:Va. Mn+2:S-2 + dMolFractionTest = [5.5296D-05, 7.7304D-01, 1.6228D-05, 1.1106D-01, 2.1224D-01, 2.3246D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'S-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass) then + if (lPass) then ! The test passed: print *, 'TestThermo49: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo50.F90 b/test/daily/TestThermo50.F90 index 2cb30f33..9f301ba0 100644 --- a/test/daily/TestThermo50.F90 +++ b/test/daily/TestThermo50.F90 @@ -34,14 +34,16 @@ program TestThermo50 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -56,61 +58,28 @@ program TestThermo50 dElementMass(25) = 0.2D0 ! Mn dElementMass(20) = 0.5D0 ! Ca - ! Liquid #1 - sfcheck1 = 0.45455D0 !Ca+2 - sfcheck2 = 0.18182D0 !Mn+2 - sfcheck3 = 0.36364D0 !Fe+2 - sfcheck4 = 1.0D0 !Va - - pcheck1 = -113841.3D0 !Ca - pcheck2 = -92132.39D0 !Mn - pcheck3 = -114102.3D0 !Fe - - gibbscheck = -116594D0 + ! Init test values + dGibbsCheck = -1.16594D05 + dHeatCapacityCheck = 42.6874 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3] !Ca+2:Va, Fe+2:Va, Mn+2:Va + dMolFractionTest = [4.5454D-01, 3.6363D-01, 1.8181D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Ca+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Mn+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Fe+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - end if - end do - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass) then + if (lPass) then ! The test passed: print *, 'TestThermo50: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo51.F90 b/test/daily/TestThermo51.F90 index 09effad3..cc977f4f 100644 --- a/test/daily/TestThermo51.F90 +++ b/test/daily/TestThermo51.F90 @@ -34,14 +34,16 @@ program TestThermo51 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: pcheck1, pcheck2, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -52,63 +54,31 @@ program TestThermo51 ! Specify values: dPressure = 1D0 dTemperature = 2500D0 - dElementMass(52) = 0.5D0 ! Te - dElementMass(55) = 1.0D0 ! Cs - - ! Liquid #1 - sfcheck1 = 1D0 !Cs - sfcheck2 = 0.34222D0 !Va - sfcheck3 = 0.48667D0 !Cs2Te - sfcheck4 = 0.17111D0 !Te - - pcheck1 = -377921D0 !Cs - pcheck2 = -381967D0 !Te + dElementMass(52) = 0.5D0 ! Te + dElementMass(55) = 1.0D0 ! Cs - gibbscheck = -568905D0 + ! Init test values + dGibbsCheck = -5.68905D05 + dHeatCapacityCheck = 84.2722 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3] !Cs+:VA, Cs2Te, Te + dMolFractionTest = [3.4222D-01, 4.8666D-01, 1.7111D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3)) then - do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQUID') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs+') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Cs2Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Te') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - end if - end do - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass) then + if (lPass) then ! The test passed: print *, 'TestThermo51: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo52.F90 b/test/daily/TestThermo52.F90 index ff1ad4f9..fd1bf24d 100644 --- a/test/daily/TestThermo52.F90 +++ b/test/daily/TestThermo52.F90 @@ -31,16 +31,16 @@ program TestThermo52 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 - real(8) :: sfcheck5, sfcheck6, sfcheck7 - real(8) :: pcheck1, pcheck2, pcheck3, gibbscheck - integer :: i,j,k,l - logical :: s1pass, s2pass, s3pass, s4pass, s5pass - logical :: s6pass, s7pass, s8pass, s9pass, s10pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -51,91 +51,32 @@ program TestThermo52 ! Specify values: dPressure = 1D0 dTemperature = 2500D0 - dElementMass(41) = 1D0 ! Nb - dElementMass(8) = 0.3D0 ! O - dElementMass(50) = 0.7D0 ! Sn - - ! Liquid #1 - sfcheck1 = 0.99586D0 !Nb+2 - sfcheck2 = 0.327163D0 !O-2 - sfcheck3 = 0.563388D0 !Va - sfcheck4 = 0.109449D0 !NBO5/2 - - ! Liquid #2 - sfcheck5 = 0.418758D0 !Nb+2 - sfcheck6 = 0.581242D0 !Sn+2 - sfcheck7 = 0.99976D0 !Va - - pcheck1 = -183696D0 !Nb - pcheck2 = -593052D0 !O - pcheck3 = -249101D0 !Sn - - gibbscheck = -535982D0 + dElementMass(41) = 1D0 ! Nb + dElementMass(8) = 0.3D0 ! O + dElementMass(50) = 0.7D0 ! Sn + + ! Init test values + dGibbsCheck = -5.14706D05 + dHeatCapacityCheck = -1.7023D09 + nSpeciesTest = 4 + iSpeciesIndexTest = [6, 14, 20, 21] ! O2Sn, NB+2:O-2, O2Sn, NB+2:O-2 + dMolFractionTest = [4.5414D-11, 5.1351D-01, 1.0010D-027, 2.1018D-03] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. - s2pass = .FALSE. - s3pass = .FALSE. - s4pass = .FALSE. - s5pass = .FALSE. - s6pass = .FALSE. - s7pass = .FALSE. - s8pass = .FALSE. - s9pass = .FALSE. - s10pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3) .AND. & - (DABS((dElementPotential(1)*dIdealConstant*dTemperature - pcheck1)/pcheck1) < 1D-3).AND. & - (DABS((dElementPotential(2)*dIdealConstant*dTemperature - pcheck2)/pcheck2) < 1D-3).AND. & - (DABS((dElementPotential(3)*dIdealConstant*dTemperature - pcheck3)/pcheck3) < 1D-3)) then - loop_checkPhases: do i = 1, nSolnPhases - k = -iAssemblage(nElements + 1 - i) - if (cSolnPhaseName(k) == 'IONIC_LIQ') then - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck1)/sfcheck1 < 1D-3) s1pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'O-2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck2)/sfcheck2 < 1D-3) s2pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck3)/sfcheck3 < 1D-3) s3pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NBO5/2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck4)/sfcheck4 < 1D-3) s4pass = .TRUE. - end if - end do - end do - - do j = 1, 2 - do l = 1, nConstituentSublattice(i,j) - if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'NB+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck5)/sfcheck5 < 1D-3) s5pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'SN+2') then - if (DABS(dSiteFraction(i,j,l) - sfcheck6)/sfcheck6 < 1D-3) s6pass = .TRUE. - else if (TRIM(ADJUSTL(cConstituentNameSUB(i,j,l))) == 'Va') then - if (DABS(dSiteFraction(i,j,l) - sfcheck7)/sfcheck7 < 1D-3) s7pass = .TRUE. - end if - end do - end do - end if - end do loop_checkPhases - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass .AND. & - s2pass .AND. & - s3pass .AND. & - s4pass .AND. & - s5pass .AND. & - s6pass .AND. & - s7pass) then + if (lPass) then ! The test passed: print *, 'TestThermo52: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo53.F90 b/test/daily/TestThermo53.F90 index f143a8b6..d86e53f8 100644 --- a/test/daily/TestThermo53.F90 +++ b/test/daily/TestThermo53.F90 @@ -30,7 +30,7 @@ program TestThermo53 USE ModuleThermoIO USE ModuleThermo - + USE ModuleTesting implicit none real(8) :: sfcheck1, sfcheck2, sfcheck3, sfcheck4 @@ -69,7 +69,10 @@ program TestThermo53 ! Call Thermochimica: call Thermochimica - + !call printMolFractions + !iPrintResultsMode = 2 + ! Perform post-processing of results: + !if (iPrintResultsMode > 0) call PrintResults ! Check results: s1pass = .FALSE. s2pass = .FALSE. diff --git a/test/daily/TestThermo54.F90 b/test/daily/TestThermo54.F90 index 19ca6e09..3e05332c 100644 --- a/test/daily/TestThermo54.F90 +++ b/test/daily/TestThermo54.F90 @@ -29,12 +29,16 @@ program TestThermo54 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -49,31 +53,32 @@ program TestThermo54 dElementMass(3) = 0.1D0 ! Li dElementMass(11) = 0.4D0 ! Na - ! dElementMass(17) = 0D0 ! Cl dElementMass(9) = 1.6D0 ! F dElementMass(26) = 0.3D0 ! Fe - ! dElementMass(8) = 3D0 ! O dElementMass(19) = 0.2D0 ! K - gibbscheck = -4.89601D04 + ! Init test values + dGibbsCheck = -4.89601D04 + dHeatCapacityCheck = -17.3603 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 3, 4] !LiF, NaF, FeF3, KF + dMolFractionTest = [1.0000D-01, 3.9999D-01, 2.9999D-01, 2.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo54: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo55.F90 b/test/daily/TestThermo55.F90 index 36eaaaf7..f82c2abf 100644 --- a/test/daily/TestThermo55.F90 +++ b/test/daily/TestThermo55.F90 @@ -29,12 +29,16 @@ program TestThermo55 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -49,31 +53,32 @@ program TestThermo55 dElementMass(3) = 0.1D0 ! Li dElementMass(11) = 0.4D0 ! Na - ! dElementMass(17) = 0D0 ! Cl - ! dElementMass(9) = 1.6D0 ! F dElementMass(26) = 0.3D0 ! Fe dElementMass(8) = 0.8D0 ! O dElementMass(19) = 0.2D0 ! K - gibbscheck = -5.12663D04 + ! Init test values + dGibbsCheck = -5.12663D04 + dHeatCapacityCheck = -1.01318 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 2, 3, 4] !Li2O, Na2O, Fe2O3, K2O + dMolFractionTest = [1.0000D-01, 3.9999D-01, 2.9999D-01, 2.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo55: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo56.F90 b/test/daily/TestThermo56.F90 index 16315895..cc8d97b1 100644 --- a/test/daily/TestThermo56.F90 +++ b/test/daily/TestThermo56.F90 @@ -29,11 +29,16 @@ program TestThermo56 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: @@ -48,32 +53,32 @@ program TestThermo56 dElementMass = 0D0 dElementMass(3) = 1.2D0 ! Li - ! dElementMass(11) = 0.4D0 ! Na dElementMass(17) = 0.5D0 ! Cl dElementMass(9) = 0.3D0 ! F - ! dElementMass(26) = 0.3D0 ! Fe dElementMass(8) = 0.2D0 ! O - ! dElementMass(19) = 0.2D0 ! K - gibbscheck = -4.52110D04 + ! Init test values + dGibbsCheck = -4.52110D04 + dHeatCapacityCheck = -4.92203D-03 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3] !LiF, LiCl, Li2O + dMolFractionTest = [2.9999D-01, 5.0000D-01, 2.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo56: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo57.F90 b/test/daily/TestThermo57.F90 index 96a827e0..f94bd6f8 100644 --- a/test/daily/TestThermo57.F90 +++ b/test/daily/TestThermo57.F90 @@ -29,12 +29,16 @@ program TestThermo57 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -50,30 +54,31 @@ program TestThermo57 dElementMass(3) = 0.1D0 ! Li dElementMass(11) = 0.4D0 ! Na dElementMass(17) = 1.6D0 ! Cl - ! dElementMass(9) = 1.6D0 ! F dElementMass(26) = 0.3D0 ! Fe - ! dElementMass(8) = 3D0 ! O dElementMass(19) = 0.2D0 ! K - gibbscheck = -5.89226D04 + ! Init test values + dGibbsCheck = -5.89226D04 + dHeatCapacityCheck = 5.52866 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3, 4] !LiCl, NaCl, FeCl3, KCl + dMolFractionTest = [1.0000D-01, 3.9999D-01, 2.9999D-01, 2.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo57: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo58.F90 b/test/daily/TestThermo58.F90 index d2482e21..867cc2c7 100644 --- a/test/daily/TestThermo58.F90 +++ b/test/daily/TestThermo58.F90 @@ -29,12 +29,16 @@ program TestThermo58 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -47,33 +51,33 @@ program TestThermo58 dPressure = 1.0D0 dElementMass = 0D0 - ! dElementMass(3) = 1.2D0 ! Li - ! dElementMass(11) = 0.4D0 ! Na dElementMass(17) = 0.5D0 ! Cl dElementMass(9) = 0.3D0 ! F - ! dElementMass(26) = 0.3D0 ! Fe dElementMass(8) = 0.2D0 ! O dElementMass(19) = 1.2D0 ! K - gibbscheck = -1.76944D04 + ! Init test values + dGibbsCheck = -1.76944D04 + dHeatCapacityCheck = -2.32830D-07 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3] !KF, KCl, K2O + dMolFractionTest = [3.000D-01, 4.9999D-01, 2.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo58: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo59.F90 b/test/daily/TestThermo59.F90 index 0a35ef03..3c8e6f00 100644 --- a/test/daily/TestThermo59.F90 +++ b/test/daily/TestThermo59.F90 @@ -29,12 +29,16 @@ program TestThermo59 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -55,25 +59,28 @@ program TestThermo59 dElementMass(8) = 1D0 ! O dElementMass(19) = 4D0 ! K - gibbscheck = -5.64332D05 + ! Init test values + dGibbsCheck = -5.64331D05 + dHeatCapacityCheck = 2219.86 + nSpeciesTest = 5 + iSpeciesIndexTest = [1, 2, 4, 11, 12] !LiF, LiCl, NaCl, KCl, K2O + dMolFractionTest = [8.0000D-02, 1.3333D-02, 2.6666D-02, 5.3333D-02, 2.6666D-02] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo59: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo60.F90 b/test/daily/TestThermo60.F90 index 67ea88a1..affb2dd1 100644 --- a/test/daily/TestThermo60.F90 +++ b/test/daily/TestThermo60.F90 @@ -30,12 +30,16 @@ program TestThermo60 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -49,33 +53,31 @@ program TestThermo60 dElementMass = 0D0 dElementMass(3) = 2D0 ! Li - ! dElementMass(11) = 2D0 ! Na - ! dElementMass(17) = 4D0 ! Cl - ! dElementMass(9) = 5D0 ! F - ! dElementMass(26) = 3D0 ! Fe dElementMass(8) = 3D0 ! O - ! dElementMass(19) = 4D0 ! K dElementMass(40) = 1D0 ! Zr - gibbscheck = -1.01677D05 + ! Init test values + dGibbsCheck = -1.01677D05 + dHeatCapacityCheck = 3189.08 + nSpeciesTest = 2 + iSpeciesIndexTest = [1, 2] !Li2O, ZrO2 + dMolFractionTest = [4.9999D-01, 5.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo60: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo61.F90 b/test/daily/TestThermo61.F90 index 04a0a2b3..ae669ac8 100644 --- a/test/daily/TestThermo61.F90 +++ b/test/daily/TestThermo61.F90 @@ -30,12 +30,16 @@ program TestThermo61 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -57,25 +61,28 @@ program TestThermo61 dElementMass(19) = 0D0 ! K dElementMass(40) = 1D0 ! Zr - gibbscheck = -1.50268D04 + ! Init test values + dGibbsCheck = -1.50268D04 + dHeatCapacityCheck = -6975.92 + nSpeciesTest = 2 + iSpeciesIndexTest = [1, 2] !ZrCl4, ZrO2 + dMolFractionTest = [4.9999D-01, 5.0000D-01] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity + + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - s1pass = .FALSE. - - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo61: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo62.F90 b/test/daily/TestThermo62.F90 index 827f9651..b72477c2 100644 --- a/test/daily/TestThermo62.F90 +++ b/test/daily/TestThermo62.F90 @@ -30,12 +30,16 @@ program TestThermo62 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -57,25 +61,28 @@ program TestThermo62 dElementMass(19) = 0D0 ! K dElementMass(40) = 1D0 ! Zr - gibbscheck = -1.90265D05 + ! Init test values + dGibbsCheck = -1.90265D05 + dHeatCapacityCheck = 3.72529E-06 + nSpeciesTest = 3 + iSpeciesIndexTest = [1, 2, 3, 4] !Pd, Pd, Ru + dMolFractionTest = [5.9999D-01, 1.2000D-01, 1.9999D-01, 8.0000D-02] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo62: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo63.F90 b/test/daily/TestThermo63.F90 index 21d27eac..24bca85b 100644 --- a/test/daily/TestThermo63.F90 +++ b/test/daily/TestThermo63.F90 @@ -29,12 +29,16 @@ program TestThermo63 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'K' @@ -56,25 +60,28 @@ program TestThermo63 dElementMass(19) = 4D0 ! K dElementMass(40) = 5D0 ! Zr - gibbscheck = -7.61628D05 + ! Init test values + dGibbsCheck = -7.61628D05 + dHeatCapacityCheck = 1198.68 + nSpeciesTest = 7 + iSpeciesIndexTest = [1, 2, 3, 7, 8, 10, 11] !Pd, Pd, Ru + dMolFractionTest = [2.7906D-02, 4.6511D-03, 5.5813D-02, 8.3720D-02, 1.3953D-02, 1.1162D-01, 1.8604D-02] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo63: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestThermo64.F90 b/test/daily/TestThermo64.F90 index 6209decd..2b685831 100644 --- a/test/daily/TestThermo64.F90 +++ b/test/daily/TestThermo64.F90 @@ -30,12 +30,16 @@ program TestThermo64 USE ModuleThermoIO USE ModuleThermo + USE ModuleTesting implicit none - real(8) :: gibbscheck - logical :: s1pass - + ! Init variables + logical :: lPass + real(8) :: dGibbsCheck, dHeatCapacityCheck + integer :: nSpeciesTest + integer, allocatable :: iSpeciesIndexTest(:) + real(8), allocatable :: dMolFractionTest(:) ! Specify units: cInputUnitTemperature = 'C' @@ -46,30 +50,31 @@ program TestThermo64 ! Specify values: dTemperature = 400 dPressure = 1D-5 - - dElementMass(53) = 1D0 ! I + dElementMass(53) = 1D0 ! I dElementMass(55) = 1D0 ! cs - - gibbscheck = -4.41869D05 + ! Init test values + dGibbsCheck = -4.41869D05 + dHeatCapacityCheck = 69.8320 + nSpeciesTest = 4 + iSpeciesIndexTest = [1, 3, 5, 6] !Cs, I, CsI, Cs2I2 + dMolFractionTest = [4.2170D-18, 1.0711D-02, 2.5818D-03, 1.9349D-05] + lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) ! Call Thermochimica: call Thermochimica + call HeatCapacity - ! Check results: - s1pass = .FALSE. + ! Execute the test for mole fractions, gibbs energy and heat capacity + call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - ! Check results: - if (INFOThermo == 0) then - if ((DABS((dGibbsEnergySys - (gibbscheck))/(gibbscheck)) < 1D-3)) then - s1pass = .TRUE. - end if - end if + ! Deallocation + deallocate(iSpeciesIndexTest, dMolFractionTest) - if (s1pass) then + if (lPass) then ! The test passed: print *, 'TestThermo64: PASS' ! Reset Thermochimica: From ee8fbe592b19a697e0a5df2a5011eaee808267c5 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 6 Jan 2025 13:46:38 -0500 Subject: [PATCH 12/34] update docs --- test/daily/TestThermo19.F90 | 1 + test/daily/TestThermo20.F90 | 1 + test/daily/TestThermo21.F90 | 1 + test/daily/TestThermo22.F90 | 1 + test/daily/TestThermo23.F90 | 1 + test/daily/TestThermo24.F90 | 1 + test/daily/TestThermo25.F90 | 1 + test/daily/TestThermo26.F90 | 1 + test/daily/TestThermo27.F90 | 1 + test/daily/TestThermo28.F90 | 1 + test/daily/TestThermo29.F90 | 1 + test/daily/TestThermo30.F90 | 1 + test/daily/TestThermo31.F90 | 1 + test/daily/TestThermo32.F90 | 1 + test/daily/TestThermo33.F90 | 1 + test/daily/TestThermo34.F90 | 3 ++- test/daily/TestThermo35.F90 | 1 + test/daily/TestThermo36.F90 | 3 ++- test/daily/TestThermo37.F90 | 1 + test/daily/TestThermo39.F90 | 1 + test/daily/TestThermo43.F90 | 1 + test/daily/TestThermo45.F90 | 1 + test/daily/TestThermo46.F90 | 1 + test/daily/TestThermo47.F90 | 1 + test/daily/TestThermo48.F90 | 1 + test/daily/TestThermo49.F90 | 1 + test/daily/TestThermo50.F90 | 1 + test/daily/TestThermo51.F90 | 1 + test/daily/TestThermo52.F90 | 1 + test/daily/TestThermo53.F90 | 1 + test/daily/TestThermo54.F90 | 1 + test/daily/TestThermo55.F90 | 1 + test/daily/TestThermo56.F90 | 1 + test/daily/TestThermo57.F90 | 1 + test/daily/TestThermo58.F90 | 1 + test/daily/TestThermo59.F90 | 1 + test/daily/TestThermo60.F90 | 1 + test/daily/TestThermo61.F90 | 1 + test/daily/TestThermo62.F90 | 1 + test/daily/TestThermo63.F90 | 1 + test/daily/TestThermo64.F90 | 1 + 41 files changed, 43 insertions(+), 2 deletions(-) diff --git a/test/daily/TestThermo19.F90 b/test/daily/TestThermo19.F90 index 78268ae5..80899697 100644 --- a/test/daily/TestThermo19.F90 +++ b/test/daily/TestThermo19.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo20.F90 b/test/daily/TestThermo20.F90 index 9dab1c9f..bdc839ae 100644 --- a/test/daily/TestThermo20.F90 +++ b/test/daily/TestThermo20.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo21.F90 b/test/daily/TestThermo21.F90 index 94c16dec..b3eed68d 100644 --- a/test/daily/TestThermo21.F90 +++ b/test/daily/TestThermo21.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo22.F90 b/test/daily/TestThermo22.F90 index 2de3a4b0..0e0120c1 100644 --- a/test/daily/TestThermo22.F90 +++ b/test/daily/TestThermo22.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo23.F90 b/test/daily/TestThermo23.F90 index fdcf18ec..134057ac 100644 --- a/test/daily/TestThermo23.F90 +++ b/test/daily/TestThermo23.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo24.F90 b/test/daily/TestThermo24.F90 index 12e2a8e1..79afeb3d 100644 --- a/test/daily/TestThermo24.F90 +++ b/test/daily/TestThermo24.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo25.F90 b/test/daily/TestThermo25.F90 index b1a581c6..49fb9029 100644 --- a/test/daily/TestThermo25.F90 +++ b/test/daily/TestThermo25.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct diff --git a/test/daily/TestThermo26.F90 b/test/daily/TestThermo26.F90 index 3f95a22f..5246424c 100644 --- a/test/daily/TestThermo26.F90 +++ b/test/daily/TestThermo26.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo27.F90 b/test/daily/TestThermo27.F90 index cf92078d..15b95c19 100644 --- a/test/daily/TestThermo27.F90 +++ b/test/daily/TestThermo27.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo28.F90 b/test/daily/TestThermo28.F90 index d8ee438f..f8ade077 100644 --- a/test/daily/TestThermo28.F90 +++ b/test/daily/TestThermo28.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo29.F90 b/test/daily/TestThermo29.F90 index d4167ba7..ef1644af 100644 --- a/test/daily/TestThermo29.F90 +++ b/test/daily/TestThermo29.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo30.F90 b/test/daily/TestThermo30.F90 index 80fa5382..37c635d7 100644 --- a/test/daily/TestThermo30.F90 +++ b/test/daily/TestThermo30.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo31.F90 b/test/daily/TestThermo31.F90 index 5231266f..eab78beb 100644 --- a/test/daily/TestThermo31.F90 +++ b/test/daily/TestThermo31.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo32.F90 b/test/daily/TestThermo32.F90 index a4562409..f0d49673 100644 --- a/test/daily/TestThermo32.F90 +++ b/test/daily/TestThermo32.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo33.F90 b/test/daily/TestThermo33.F90 index 8db4e89e..ef4c364a 100644 --- a/test/daily/TestThermo33.F90 +++ b/test/daily/TestThermo33.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 08/31/2018 B.W.N. Fitzpatrick Modification to use Kaye's Pd-Ru-Tc-Mo system ! 05/06/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo34.F90 b/test/daily/TestThermo34.F90 index 0b93a816..9e51c1e3 100644 --- a/test/daily/TestThermo34.F90 +++ b/test/daily/TestThermo34.F90 @@ -14,7 +14,8 @@ ! ========== ! Date Programmer Description of change ! ---- ---------- --------------------- - ! 05/21/2020 M. Poschmann Original code + ! 05/21/2020 M. Poschmann Original code + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo35.F90 b/test/daily/TestThermo35.F90 index c3f6d86b..2f358cd5 100644 --- a/test/daily/TestThermo35.F90 +++ b/test/daily/TestThermo35.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 06/30/2020 M. Poschmann Original code ! 06/05/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons SQA, standardizing tests ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo36.F90 b/test/daily/TestThermo36.F90 index 60a8789b..980f6437 100644 --- a/test/daily/TestThermo36.F90 +++ b/test/daily/TestThermo36.F90 @@ -16,7 +16,8 @@ ! ---- ---------- --------------------- ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! 04/09/2024 A.E.F. Fitzsimmons Remodel + ! 08/27/2024 A.E.F. Fitzsimmons Remodel + ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct diff --git a/test/daily/TestThermo37.F90 b/test/daily/TestThermo37.F90 index 3626b557..bb64ff97 100644 --- a/test/daily/TestThermo37.F90 +++ b/test/daily/TestThermo37.F90 @@ -17,6 +17,7 @@ ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change ! 06/09/2024 A.E.F. Fitzsimmons Remodel with ModuleTesting + ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that Thermochimica computes the correct diff --git a/test/daily/TestThermo39.F90 b/test/daily/TestThermo39.F90 index a69fe7e1..7ab917f4 100644 --- a/test/daily/TestThermo39.F90 +++ b/test/daily/TestThermo39.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 08/10/2020 M. Poschmann Original code ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 04/09/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo43.F90 b/test/daily/TestThermo43.F90 index e6e90eaf..d1a92315 100644 --- a/test/daily/TestThermo43.F90 +++ b/test/daily/TestThermo43.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 08/31/2021 M. Poschmann Original code ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle + ! ! Purpose: ! ======== !> \details The purpose of this application test is to ensure that ternary mixing SUBL cases with only diff --git a/test/daily/TestThermo45.F90 b/test/daily/TestThermo45.F90 index bc5bab4d..cf43c917 100644 --- a/test/daily/TestThermo45.F90 +++ b/test/daily/TestThermo45.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo46.F90 b/test/daily/TestThermo46.F90 index 93cfbfbd..f419593c 100644 --- a/test/daily/TestThermo46.F90 +++ b/test/daily/TestThermo46.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo47.F90 b/test/daily/TestThermo47.F90 index 0faec548..2e0498fe 100644 --- a/test/daily/TestThermo47.F90 +++ b/test/daily/TestThermo47.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo48.F90 b/test/daily/TestThermo48.F90 index 52fcb7b2..509f80c7 100644 --- a/test/daily/TestThermo48.F90 +++ b/test/daily/TestThermo48.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo49.F90 b/test/daily/TestThermo49.F90 index efde9afa..6396e4e0 100644 --- a/test/daily/TestThermo49.F90 +++ b/test/daily/TestThermo49.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 01/10/2022 B.A.T. Breeden Modification to use Dupin's Zirc Data base with SUBI ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo50.F90 b/test/daily/TestThermo50.F90 index 9f301ba0..d491ba80 100644 --- a/test/daily/TestThermo50.F90 +++ b/test/daily/TestThermo50.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 02/24/2022 B.A.T. Breeden SUBI Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo51.F90 b/test/daily/TestThermo51.F90 index cc977f4f..f33e5c80 100644 --- a/test/daily/TestThermo51.F90 +++ b/test/daily/TestThermo51.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 02/24/2022 B.A.T. Breeden SUBI Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo52.F90 b/test/daily/TestThermo52.F90 index fd1bf24d..90619bec 100644 --- a/test/daily/TestThermo52.F90 +++ b/test/daily/TestThermo52.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code ! 02/24/2022 B.A.T. Breeden SUBI Test Case + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo53.F90 b/test/daily/TestThermo53.F90 index d86e53f8..98e3ef62 100644 --- a/test/daily/TestThermo53.F90 +++ b/test/daily/TestThermo53.F90 @@ -16,6 +16,7 @@ ! ---- ---------- --------------------- ! 05/14/2013 M.H.A. Piro Original code ! 02/24/2022 B.A.T. Breeden SUBI Test Case + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo54.F90 b/test/daily/TestThermo54.F90 index 3e05332c..6c3b79f8 100644 --- a/test/daily/TestThermo54.F90 +++ b/test/daily/TestThermo54.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo55.F90 b/test/daily/TestThermo55.F90 index f82c2abf..0bffdbea 100644 --- a/test/daily/TestThermo55.F90 +++ b/test/daily/TestThermo55.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo56.F90 b/test/daily/TestThermo56.F90 index cc8d97b1..edb7b7cc 100644 --- a/test/daily/TestThermo56.F90 +++ b/test/daily/TestThermo56.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo57.F90 b/test/daily/TestThermo57.F90 index f94bd6f8..887d2bfc 100644 --- a/test/daily/TestThermo57.F90 +++ b/test/daily/TestThermo57.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 08/27/2024 A.E.F. Fitzsimmons Remodel ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo58.F90 b/test/daily/TestThermo58.F90 index 867cc2c7..a1197c09 100644 --- a/test/daily/TestThermo58.F90 +++ b/test/daily/TestThermo58.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo59.F90 b/test/daily/TestThermo59.F90 index 3c8e6f00..d6cc22d3 100644 --- a/test/daily/TestThermo59.F90 +++ b/test/daily/TestThermo59.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/04/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo60.F90 b/test/daily/TestThermo60.F90 index affb2dd1..18836dc7 100644 --- a/test/daily/TestThermo60.F90 +++ b/test/daily/TestThermo60.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/08/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo61.F90 b/test/daily/TestThermo61.F90 index ae669ac8..3276f34d 100644 --- a/test/daily/TestThermo61.F90 +++ b/test/daily/TestThermo61.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/08/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo62.F90 b/test/daily/TestThermo62.F90 index b72477c2..79bfbd12 100644 --- a/test/daily/TestThermo62.F90 +++ b/test/daily/TestThermo62.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/11/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo63.F90 b/test/daily/TestThermo63.F90 index 24bca85b..8356101a 100644 --- a/test/daily/TestThermo63.F90 +++ b/test/daily/TestThermo63.F90 @@ -17,6 +17,7 @@ ! 05/14/2013 M.H.A. Piro Original code ! 11/11/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== diff --git a/test/daily/TestThermo64.F90 b/test/daily/TestThermo64.F90 index 2b685831..bea579e3 100644 --- a/test/daily/TestThermo64.F90 +++ b/test/daily/TestThermo64.F90 @@ -18,6 +18,7 @@ ! 11/11/2022 M. Poschmann SUBM Test Case ! 04/17/2024 A.E.F Fitzsimmons CsI data bug test ! 05/06/2024 A.E.F Fitzsimmons Naming convention update + ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle ! ! Purpose: ! ======== From e12057ae85a6fae3207ff8d57b75aa9e741ab8a6 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Fri, 14 Feb 2025 13:10:57 -0500 Subject: [PATCH 13/34] New Debug Call --- src/debug/ThermoDebug.f90 | 2 ++ src/parser/ParseCSHeader.f90 | 7 ++++++- test/daily/TestThermo51.F90 | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index 88a25150..53b1a0ff 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -163,6 +163,8 @@ subroutine ThermoDEBUG print *, 'DEBUG: A tag was not properly read in input parsing.' elseif (INFOThermo == 55) then print *, 'DEBUG: Not all input parameters were supplied in input file.' + elseif (INFOThermo == 56) then + print *, 'DEBUG: Thermochimica does not support data-files with functions.' elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 diff --git a/src/parser/ParseCSHeader.f90 b/src/parser/ParseCSHeader.f90 index 3adfebaa..5c900eac 100755 --- a/src/parser/ParseCSHeader.f90 +++ b/src/parser/ParseCSHeader.f90 @@ -109,7 +109,12 @@ subroutine ParseCSHeader INFO = 8 return end if - + !Checking for function file. + if ((nSolnPhasesSysCS == 0) .AND. (iGasPhase == 0)) then + !create a debug output to call + INFO = 56 + return + end if ! Check to see if there are any gaseous species: if (iGasPhase == 0) then ! There is no gas phase, the number of solution phases and indexing must be adjusted. diff --git a/test/daily/TestThermo51.F90 b/test/daily/TestThermo51.F90 index f33e5c80..eaf21f03 100644 --- a/test/daily/TestThermo51.F90 +++ b/test/daily/TestThermo51.F90 @@ -72,10 +72,9 @@ program TestThermo51 ! Call Thermochimica: call Thermochimica call HeatCapacity - ! Execute the test for mole fractions, gibbs energy and heat capacity call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - + ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) From 4a98e000fe56d2b748f45892c2adce98935201d1 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 18 Feb 2025 09:12:45 -0500 Subject: [PATCH 14/34] deleted new debug --- src/debug/ThermoDebug.f90 | 2 -- src/parser/ParseCSHeader.f90 | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index 53b1a0ff..88a25150 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -163,8 +163,6 @@ subroutine ThermoDEBUG print *, 'DEBUG: A tag was not properly read in input parsing.' elseif (INFOThermo == 55) then print *, 'DEBUG: Not all input parameters were supplied in input file.' - elseif (INFOThermo == 56) then - print *, 'DEBUG: Thermochimica does not support data-files with functions.' elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 diff --git a/src/parser/ParseCSHeader.f90 b/src/parser/ParseCSHeader.f90 index 5c900eac..3adfebaa 100755 --- a/src/parser/ParseCSHeader.f90 +++ b/src/parser/ParseCSHeader.f90 @@ -109,12 +109,7 @@ subroutine ParseCSHeader INFO = 8 return end if - !Checking for function file. - if ((nSolnPhasesSysCS == 0) .AND. (iGasPhase == 0)) then - !create a debug output to call - INFO = 56 - return - end if + ! Check to see if there are any gaseous species: if (iGasPhase == 0) then ! There is no gas phase, the number of solution phases and indexing must be adjusted. From e9c6bd6d3f6af4bc83d16004750d5037aeedd0f9 Mon Sep 17 00:00:00 2001 From: aidanfitz <77299121+aidanfitz@users.noreply.github.com> Date: Wed, 12 Mar 2025 09:49:10 -0400 Subject: [PATCH 15/34] Missing Data From e404b6808fd17380ff72101724a818ca44dbe471 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 5 May 2025 12:49:30 -0400 Subject: [PATCH 16/34] New debug calls --- src/debug/ThermoDebug.f90 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index 88a25150..3a3d9319 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -11,10 +11,10 @@ ! Revisions: ! ========== ! - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 10/21/2011 M.H.A. Piro Original code. - ! + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 10/21/2011 M.H.A. Piro Original code. + ! 05/05/2025 A.E.F. Fitzsimmons added more debug calls ! ! Purpose: ! ======== @@ -163,6 +163,14 @@ subroutine ThermoDEBUG print *, 'DEBUG: A tag was not properly read in input parsing.' elseif (INFOThermo == 55) then print *, 'DEBUG: Not all input parameters were supplied in input file.' + elseif (INFOThermo == 56) then + print *, 'DEBUG: Lower bound is larger than upper bound.' + elseif (INFOThermo == 57) then + print *, 'DEBUG: Unsuccessful phase transition search.' + elseif (INFOThermo == 58) then + print *, 'DEBUG: No Phase Transitions in given temperature range in PhaseTransition subroutine.' + elseif (INFOThermo == 59) then + print *, "DEBUG: Phase Transition module needs more than one elements." elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 From debc812ba19dd8301bf1ed7a34434224cb68a7b9 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 6 May 2025 13:05:35 -0400 Subject: [PATCH 17/34] Phase transition subroutine --- src/postprocess/PhaseTransition.f90 | 127 ++++++++++++++++++++++++++++ src/postprocess/SortInt.f90 | 20 +++++ 2 files changed, 147 insertions(+) create mode 100644 src/postprocess/PhaseTransition.f90 create mode 100644 src/postprocess/SortInt.f90 diff --git a/src/postprocess/PhaseTransition.f90 b/src/postprocess/PhaseTransition.f90 new file mode 100644 index 00000000..876fe5ae --- /dev/null +++ b/src/postprocess/PhaseTransition.f90 @@ -0,0 +1,127 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ModuleTesting.F90 + !> \brief Module for testing. + !> \author A.E.F. Fitzsimmons + ! + !> \todo Input file setup, Return assemblages + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 04/10/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Using a bisection search, this subroutine will find and record temperatures of which a phase has + !! made a transition. Returning the list of transition temperatures. + ! + !------------------------------------------------------------------------------------------------------------- +subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + USE ModuleThermoIO + USE ModuleThermo + implicit none + + real(8), intent(in) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10), intent(out) :: dPhaseTransitionTemp + integer, intent(out) :: iTransitions + + real(8) :: dTempUpper, dTempLower + integer :: i, iMaxIteration + integer, dimension(nElements) :: iAssemblageUpper, iAssemblageLower + logical :: lCompareAssemblage, lCompareAssemblage2 + + ! Init + i = 1 + iMaxIteration = 50 + iTransitions = 0 + dTempLower = dTempMin + dTempUpper = dTempMax + lCompareAssemblage = .FALSE. + lCompareAssemblage2 = .FALSE. + + if(dTempMin>=dTempMax) then + INFOThermo = 56 + return + end if + + ! Initialize Lower assemblage + dTemperature = dTempLower + call Thermochimica + iAssemblageLower = iAssemblage + call SortInt(iAssemblageLower, nElements) + + ! Loop until we reach the max temperature + do while (dTempLower < dTempMax) + + ! Initialize Upper assemblage + dTempUpper = dTempMax + dTemperature = dTempUpper + call Thermochimica + iAssemblageUpper = iAssemblage + call SortInt(iAssemblageUpper, nElements) + + ! Check if there's a transition between lower and upper + if (ALL(iAssemblageLower == iAssemblageUpper)) then + !No transitions in this range + exit + end if + + ! Bisection loop to find transition within [dTempLower, dTempUpper] + do i = 1, iMaxIteration + dTemperature = (dTempUpper + dTempLower) / 2D0 + + ! Check convergence + if ((dTempUpper - dTempLower) <= dTempTolerance) then + ! Found transition + iTransitions = iTransitions + 1 + dPhaseTransitionTemp(iTransitions) = dTemperature + call SortInt(iAssemblage, nElements) + + ! FOR DEBUG: REMOVE LATER + print *, "AssemblageUpper: ", iAssemblageUpper, NEW_LINE(" "), & + " AssemblageLower: ", iAssemblageLower, NEW_LINE(" "), & + " AssemblageTransition: ", iAssemblage, NEW_LINE(" ") + + ! New Lower + dTempLower = dTemperature + dTempTolerance + iAssemblageLower = iAssemblageUpper + exit ! Found a transition, break bisection loop to restart from new lower + end if + + ! Midpoint calculation + call Thermochimica + call SortInt(iAssemblage, nElements) + + lCompareAssemblage = ALL(iAssemblage == iAssemblageUpper) + lCompareAssemblage2 = ALL(iAssemblage == iAssemblageLower) + + ! FOR DEBUG: REMOVE LATER + !print *, "Iteration: ", i, " dTempLower: ", dTempLower, " dTempUpper: ", dTempUpper, " dTempGuess: ", dTemperature, NEW_LINE(" ") + + ! Bisection check + if (lCompareAssemblage) then + dTempUpper = dTemperature + iAssemblageUpper = iAssemblage + elseif (lCompareAssemblage2) then + dTempLower = dTemperature + iAssemblageLower = iAssemblage + else + ! Phase not equal to lower or higher assemblage. Treat midpoint as new upper bound to keep bisecting + dTempUpper = dTemperature + iAssemblageUpper = iAssemblage + end if + end do + + ! If no transition found within tolerance after bisection, stop + if ((dTempUpper - dTempLower) > dTempTolerance) then + INFOThermo = 57 + exit + end if + + end do + + + +end subroutine PhaseTransition diff --git a/src/postprocess/SortInt.f90 b/src/postprocess/SortInt.f90 new file mode 100644 index 00000000..f848f22a --- /dev/null +++ b/src/postprocess/SortInt.f90 @@ -0,0 +1,20 @@ +subroutine SortInt(iArray, n) + INTEGER :: i, j, k, temp, N + integer,dimension(N):: iArray + + ! Selection Sort + DO i = 1, N - 1 + k = i + DO j = i + 1, N + IF (iArray(j) < iArray(k)) THEN + k = j + END IF + END DO + IF (k /= i) THEN + temp = iArray(i) + iArray(i) = iArray(k) + iArray(k) = temp + END IF + END DO + +end subroutine SortInt \ No newline at end of file From 71a8ec90eb11809405b7265ca51b366be9b72094 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 6 May 2025 14:07:57 -0400 Subject: [PATCH 18/34] First transition test --- run_tests | 2 +- src/module/ModuleTesting.f90 | 25 +++++++++++++++++++++++++ src/postprocess/PhaseTransition.f90 | 8 -------- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/run_tests b/run_tests index d354f76a..04f75e0d 100755 --- a/run_tests +++ b/run_tests @@ -18,7 +18,7 @@ tests=( TestThermo46 TestThermo47 TestThermo48 TestThermo49 TestThermo50 TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 - TestThermo61 TestThermo62 TestThermo63 TestThermo64 + TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition1 ) ./TestThermo12 > test12out.txt diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 85d5b863..8b34d48d 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -68,4 +68,29 @@ subroutine printMolFractions end subroutine printMolFractions + subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dTolerance, lPass) + implicit none + real(8), intent(in) :: dPhaseTransitionTemp(:) + real(8), intent(in) :: dTestTransitionTemp(:) + real(8), intent(in) :: dTolerance + logical, intent(out) :: lPass + integer :: i, n + real(8) :: diff + + n = size(dPhaseTransitionTemp) + lPass = .TRUE. + + do i = 1, n + ! Only check where the expected value is non-zero + if (dTestTransitionTemp(i) > 0D0) then + diff = abs(dPhaseTransitionTemp(i) - dTestTransitionTemp(i)) + if (diff > dTolerance) then + print *, 'Mismatch at index ', i, ': calculated = ', dPhaseTransitionTemp(i), & + ', expected = ', dTestTransitionTemp(i), ', diff = ', diff + lPass = .FALSE. + end if + end if + end do + + end subroutine checkTransitionTest end module ModuleTesting \ No newline at end of file diff --git a/src/postprocess/PhaseTransition.f90 b/src/postprocess/PhaseTransition.f90 index 876fe5ae..627adfea 100644 --- a/src/postprocess/PhaseTransition.f90 +++ b/src/postprocess/PhaseTransition.f90 @@ -79,11 +79,6 @@ subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionT dPhaseTransitionTemp(iTransitions) = dTemperature call SortInt(iAssemblage, nElements) - ! FOR DEBUG: REMOVE LATER - print *, "AssemblageUpper: ", iAssemblageUpper, NEW_LINE(" "), & - " AssemblageLower: ", iAssemblageLower, NEW_LINE(" "), & - " AssemblageTransition: ", iAssemblage, NEW_LINE(" ") - ! New Lower dTempLower = dTemperature + dTempTolerance iAssemblageLower = iAssemblageUpper @@ -97,9 +92,6 @@ subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionT lCompareAssemblage = ALL(iAssemblage == iAssemblageUpper) lCompareAssemblage2 = ALL(iAssemblage == iAssemblageLower) - ! FOR DEBUG: REMOVE LATER - !print *, "Iteration: ", i, " dTempLower: ", dTempLower, " dTempUpper: ", dTempUpper, " dTempGuess: ", dTemperature, NEW_LINE(" ") - ! Bisection check if (lCompareAssemblage) then dTempUpper = dTemperature From 90f3d4f5de642b60b4bdc997e98d00ace69a5c9f Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Fri, 9 May 2025 12:26:13 -0400 Subject: [PATCH 19/34] added recursion --- data/ZrH-Dupin.dat | 494 ++++++++---------- run_tests | 1 + src/module/ModuleTesting.f90 | 8 +- src/postprocess/PhaseTransitionrecur.f90 | 130 +++++ .../PhaseTransitionrecur.f90:Zone.Identifier | 4 + 5 files changed, 361 insertions(+), 276 deletions(-) create mode 100644 src/postprocess/PhaseTransitionrecur.f90 create mode 100644 src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier diff --git a/data/ZrH-Dupin.dat b/data/ZrH-Dupin.dat index d5f7e2e8..ae2e1110 100644 --- a/data/ZrH-Dupin.dat +++ b/data/ZrH-Dupin.dat @@ -1,5 +1,5 @@ System Zr-H - 2 7 5 2 2 2 2 2 2 11 + 2 6 5 2 2 2 2 2 4 Zr H 91.22400000 1.00794000 6 1 2 3 4 5 6 @@ -7,348 +7,298 @@ gas_ideal IDMX H - 4 1 0.0 1.0 - 6000.0000 -.29815000E-09 0.66975967E-11 -.10000000E-11 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 + 1 1 0.0 1.0 + 6000.0000 211801.62 24.498982 -20.786110 0.00000000 + 0.00000000 0.00000000 H2 - 4 4 0.0 2.0 + 1 4 0.0 2.0 1000.0000 -9522.9741 78.527388 -31.357070 0.27589925E-02 -.74639067E-06 56582.300 - 1 0.00000000 0.00 - 2100.0000 180.10866 -15.612826 -17.848570 -.58416800E-02 + 2100.0000 180.10868 -15.612826 -17.848570 -.58416800E-02 0.31461867E-06 -1280036.0 - 1 0.00000000 0.00 - 6000.0000 -18840.166 92.312025 -32.050820 -.10728235E-02 + 6000.0000 -18840.166 92.312026 -32.050820 -.10728235E-02 0.11428178E-07 3561002.5 - 1 0.00000000 0.00 - 6001.0000 -45213.865 179.58187 -42.258382 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 + 6001.0000 -45213.864 179.58187 -42.258382 0.00000000 + 0.00000000 0.00000000 Zr - 4 1 1.0 0.0 - 6000.0000 -.29815000E-09 0.66975967E-11 -.10000000E-11 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 + 1 5 1.0 0.0 + 700.00000 586876.84 74.417119 -38.691110 0.11528460E-01 + -.16932550E-05 270638.80 + 1300.0000 595990.29 -26.053051 -24.061060 0.17436410E-02 + -.59431233E-06 -748947.50 + 2700.0000 593841.67 -46.020456 -20.463610 -.29610840E-02 + 0.10839143E-06 526352.50 + 6000.0000 630745.05 -161.96537 -6.6473430 -.46738955E-02 + 0.10683358E-06 -15872340. + 6001.0000 544207.47 122.66750 -40.539832 0.00000000 + 0.00000000 0.00000000 Zr2 - 4 1 2.0 0.0 - 6000.0000 -.29815000E-09 0.66975967E-11 -.10000000E-11 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - HZr - 4 1 1.0 1.0 - 6000.0000 -.29815000E-09 0.66975967E-11 -.10000000E-11 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 + 1 3 2.0 0.0 + 3600.0000 892794.96 -14.412075 -37.136720 -.32039655E-03 + -.43060517E-08 85422.150 + 6000.0000 874148.85 9.3491793 -39.333560 -.10196690E-02 + 0.60979967E-07 14065805. + 6001.0000 899504.66 -13.346552 -37.616482 0.00000000 + 0.00000000 0.00000000 + ZrH + 1 3 1.0 1.0 + 1000.0000 508873.03 -56.365252 -23.041830 -.10711540E-01 + 0.14689955E-05 -46462.485 + 6000.0000 500139.24 39.113532 -37.037190 -.38075865E-03 + 0.20646017E-08 1021210.0 + 6001.0000 488896.56 74.181301 -41.103606 0.00000000 + 0.00000000 0.00000000 BCC_A2 SUBLM 1.00000 0.400000 ZR:H - 16 4 1.0 3.0 - 1000.0000 22740.944 243.44013 -71.197405 -.23942125E-03 - -.11195860E-05 119844.45 - 1 0.00000000 0.00 - 2100.0000 37295.568 102.22981 -50.934655 -.13140430E-01 - 0.47192800E-06 -1885083.0 - 1 0.00000000 0.00 - 2128.0000 8765.1559 264.11709 -72.238030 -.59871453E-02 - 0.17142267E-07 5376474.8 - 1 0.00000000 0.00 - 6000.0000 -9493.1693 401.19219 -90.220230 -.16092353E-02 + 16 5 1.0 3.0 + 1000.0000 30043.000 242.73678 -72.643011 0.37984047E-02 + -.11293150E-05 110106.45 + 1 -.76143000E-10 4.00 + 2100.0000 44597.624 101.52646 -52.380261 -.91026040E-02 + 0.46219900E-06 -1894821.0 + 1 -.76143000E-10 4.00 + 2128.0000 16067.212 263.41374 -73.683636 -.19493193E-02 + 0.74132674E-08 5366736.8 + 1 -.76143000E-10 4.00 + 6000.0000 -14113.205 402.75222 -90.220230 -.16092353E-02 0.17142267E-07 5341503.8 - 1 -.13428960E+32 -9.00 - 0.000000 0.000000 + 1 0.12760580E+33 -9.00 + 6000.0001 -53672.489 533.65513 -105.53138 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 ZR:VA - 16 2 1.0 0.0 + 16 3 1.0 0.0 2128.0000 -525.53900 124.94570 -25.607406 -.34008400E-03 -.97290000E-08 25233.000 1 -.76143000E-10 4.00 - 6000.0000 -30705.956 264.28418 -42.144000 0.00000000 - 0.00000000 0.00000000 + 6000.0000 -30705.956 264.28418 -42.144000 0.00000000 + 0.00000000 0.00000000 1 0.12760580E+33 -9.00 - 0.000000 0.000000 + 6000.0001 -30704.689 264.28232 -42.143810 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 2 1.00000 3.00000 1 2 - ZR + Zr H VA 1 1 1 2 0 3 1 2 3 2 - -474971.00 359.00000 0.00000000 0.00000000 0.00000000 - 0.00000000 - -267893.00 200.00000 0.00000000 0.00000000 0.00000000 - 0.00000000 + -474971.00 359.00000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -267893.00 200.00000 0.00000000 0.00000000 0.00000000 + 0.00000000 0 - ZR2H + FCC_C1 SUBL ZR:H - 4 4 2.0 1.0 - 1000.0000 -66381.677 332.16179 -64.002135 -.73763238E-02 - -.37319533E-06 98233.150 - 1 0.00000000 0.00 - 2100.0000 -61530.136 285.09169 -57.247885 -.11676660E-01 - 0.15730933E-06 -570076.00 - 1 0.00000000 0.00 - 2128.0000 -71040.273 339.05411 -64.349010 -.92922318E-02 - 0.57140892E-08 1850443.3 - 1 0.00000000 0.00 - 6000.0000 -107556.92 613.20432 -100.31341 -.53641175E-03 - 0.57140892E-08 1780501.3 - 1 -.26857920E+32 -9.00 + 4 5 1.0 2.0 + 1000.0000 -187840.57 412.37644 -64.988870 -.16189175E-02 + -.74639067E-06 91553.300 + 1 0.00000000 0.00 + 2100.0000 -178137.49 318.23623 -51.480370 -.10219590E-01 + 0.31461867E-06 -1245065.0 + 1 0.00000000 0.00 + 2128.0000 -197157.76 426.16108 -65.682620 -.54507335E-02 + 0.11428178E-07 3595973.5 + 1 0.00000000 0.00 + 6000.0000 -215416.09 563.23618 -83.664820 -.10728235E-02 + 0.11428178E-07 3561002.5 + 1 -.13428960E+32 -9.00 + 6000.0001 -241789.92 650.50622 -93.872402 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 ZR:VA - 4 2 2.0 0.0 - 2128.0000 -15655.189 251.29810 -48.323600 -.87558200E-02 - 0.00000000 69942.000 - 1 0.00000000 0.00 - 6000.0000 -52171.840 525.44831 -84.288000 0.00000000 - 0.00000000 0.00000000 - 1 -.26857920E+32 -9.00 + 4 3 1.0 0.0 + 2128.0000 -227.59500 124.74905 -24.161800 -.43779100E-02 + 0.00000000 34971.000 + 1 0.00000000 0.00 + 6000.0000 -18485.920 261.82415 -42.144000 0.00000000 + 0.00000000 0.00000000 + 1 -.13428960E+32 -9.00 + 6000.0001 -18486.053 261.82435 -42.144020 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 2 - 2.00000 1.00000 + 1.00000 2.00000 1 2 - ZR + Zr H VA 1 1 1 2 + 3 + 1 2 3 2 + 14385.000 -6.0000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -106445.00 87.300000 0.00000000 0.00000000 0.00000000 + 0.00000000 0 - ZRH - SUBL - ZR:H - 4 4 1.0 1.0 + HCP_A3 + SUBLM + 0.333333 0.280000 + ZR:VA:H + 16 5 1.0 1.0 1000.0000 -58554.082 206.51274 -39.840335 -.29984137E-02 -.37319533E-06 63262.150 - 1 0.00000000 0.00 - 2100.0000 -53702.541 159.44264 -33.086085 -.72987500E-02 + 1 0.00000000 0.00 + 2100.0000 -53702.541 159.44263 -33.086085 -.72987500E-02 0.15730933E-06 -605047.00 - 1 0.00000000 0.00 + 1 0.00000000 0.00 2128.0000 -63212.678 213.40506 -40.187210 -.49143218E-02 0.57140892E-08 1815472.3 - 1 0.00000000 0.00 - 6000.0000 -81471.003 350.48017 -58.169410 -.53641175E-03 + 1 0.00000000 0.00 + 6000.0000 -81471.003 350.48016 -58.169410 -.53641175E-03 0.57140892E-08 1780501.3 1 -.13428960E+32 -9.00 - ZR:VA - 4 2 1.0 0.0 + 6000.0001 -94657.986 394.11528 -63.273211 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 + ZR:VA:VA + 16 3 1.0 0.0 2128.0000 -7827.5947 125.64905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -26085.920 262.72415 -42.144000 0.00000000 - 0.00000000 0.00000000 + 0.00000000 34971.000 + 1 0.00000000 0.00 + 6000.0000 -26085.920 262.72415 -42.144000 0.00000000 + 0.00000000 0.00000000 1 -.13428960E+32 -9.00 - 2 - 1.00000 1.00000 - 1 2 - ZR + 6000.0001 -26086.053 262.72435 -42.144020 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 + 3 + 1.00000 1.00000 1.00000 + 1 1 2 + Zr + VA H VA + 1 1 1 1 1 2 0 - ZRH2_DELTA - SUBL - ZR:H - 4 4 1.0 2.0 - 1000.0000 -187840.57 412.37644 -64.988870 -.16189175E-02 - -.74639067E-06 91553.300 - 1 0.00000000 0.00 - 2100.0000 -178137.49 318.23622 -51.480370 -.10219590E-01 - 0.31461867E-06 -1245065.0 - 1 0.00000000 0.00 - 2128.0000 -197157.76 426.16107 -65.682620 -.54507335E-02 - 0.11428178E-07 3595973.5 - 1 0.00000000 0.00 - 6000.0000 -215416.09 563.23618 -83.664820 -.10728235E-02 - 0.11428178E-07 3561002.5 - 1 -.13428960E+32 -9.00 - ZR:VA - 4 2 1.0 0.0 - 2128.0000 -227.59500 124.74905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -18485.920 261.82415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 2 - 1.00000 2.00000 - 1 2 - ZR + 0 + HCP_ORD + SUBLM + 0.333333 0.280000 + ZR:VA:VA:VA:H + 16 5 3.0 3.0 + 1000.0000 -175662.25 619.53823 -119.52101 -.89952412E-02 + -.11195860E-05 189786.45 + 1 0.00000000 0.00 + 2100.0000 -161107.62 478.32787 -99.258255 -.21896250E-01 + 0.47192800E-06 -1815141.0 + 1 0.00000000 0.00 + 2128.0000 -189638.03 640.21515 -120.56163 -.14742965E-01 + 0.17142267E-07 5446416.8 + 1 0.00000000 0.00 + 6000.0000 -244413.01 1051.4405 -174.50823 -.16092353E-02 + 0.17142267E-07 5341503.8 + 1 -.40286880E+32 -9.00 + 6000.0001 -283973.96 1182.3458 -189.81963 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 + ZR:VA:VA:VA:VA + 16 3 3.0 0.0 + 2128.0000 -23482.784 376.94715 -72.485400 -.13133730E-01 + 0.00000000 104913.00 + 1 0.00000000 0.00 + 6000.0000 -78257.760 788.17246 -126.43200 0.00000000 + 0.00000000 0.00000000 + 1 -.40286880E+32 -9.00 + 6000.0001 -78258.159 788.17305 -126.43206 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 0.000000 0.000000 + 5 + 3.00000 1.00000 1.00000 1.00000 3.00000 + 1 1 1 1 2 + Zr + VA + VA + VA H VA + 1 1 + 1 1 + 1 1 1 1 1 2 - 3 - 1 2 3 2 - 14385.000 -6.0000000 0.00000000 0.00000000 0.00000000 - 0.00000000 - -106445.00 87.300000 0.00000000 0.00000000 0.00000000 - 0.00000000 + 0 0 ZRH2_EPSILON SUBL ZR:H - 4 4 1.0 2.0 + 4 5 1.0 2.0 1000.0000 -185565.57 314.67644 -51.652870 -.16189175E-02 -.74639067E-06 91553.300 - 1 0.00000000 0.00 - 2100.0000 -175862.49 220.53622 -38.144370 -.10219590E-01 + 1 0.00000000 0.00 + 2100.0000 -175862.49 220.53623 -38.144370 -.10219590E-01 0.31461867E-06 -1245065.0 - 1 0.00000000 0.00 - 2128.0000 -194882.76 328.46107 -52.346620 -.54507335E-02 + 1 0.00000000 0.00 + 2128.0000 -194882.76 328.46108 -52.346620 -.54507335E-02 0.11428178E-07 3595973.5 - 1 0.00000000 0.00 + 1 0.00000000 0.00 6000.0000 -213141.09 465.53618 -70.328820 -.10728235E-02 0.11428178E-07 3561002.5 1 -.13428960E+32 -9.00 + 6000.0001 -239514.92 552.80622 -80.536402 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 ZR:VA - 4 2 1.0 0.0 - 2128.0000 772.40500 124.74905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -17485.920 261.82415 -42.144000 0.00000000 - 0.00000000 0.00000000 + 4 3 1.0 0.0 + 2128.0000 -127.59500 124.74905 -24.161800 -.43779100E-02 + 0.00000000 34971.000 + 1 0.00000000 0.00 + 6000.0000 -18385.920 261.82415 -42.144000 0.00000000 + 0.00000000 0.00000000 1 -.13428960E+32 -9.00 + 6000.0001 -18386.053 261.82435 -42.144020 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 2 1.00000 2.00000 1 2 - ZR + Zr H VA 1 1 1 2 3 1 2 3 1 - 19900.000 0.00000000 0.00000000 0.00000000 0.00000000 - 0.00000000 - 0 - ZRH_GAMMA - SUBL - ZR:H - 4 4 1.0 1.0 - 1000.0000 -96696.582 220.16274 -37.907335 -.29984137E-02 - -.37319533E-06 63262.150 - 1 0.00000000 0.00 - 2100.0000 -91845.041 173.09264 -31.153085 -.72987500E-02 - 0.15730933E-06 -605047.00 - 1 0.00000000 0.00 - 2128.0000 -101355.18 227.05506 -38.254210 -.49143218E-02 - 0.57140892E-08 1815472.3 - 1 0.00000000 0.00 - 6000.0000 -119613.50 364.13017 -56.236410 -.53641175E-03 - 0.57140892E-08 1780501.3 - 1 -.13428960E+32 -9.00 - ZR:VA - 4 2 1.0 0.0 - 2128.0000 772.40500 124.74905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -17485.920 261.82415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 2 - 1.00000 1.00000 - 1 2 - ZR - H VA - 1 1 - 1 2 + 19900.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0 - Zr_liquid(s) - 4 2 1.0 0.0 - 2128.0000 10320.095 116.56824 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.16275000E-21 7.00 - 6000.0000 -8281.2648 253.81260 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_cbcc_a12(s2) - 4 3 1.0 0.0 - 2128.0000 -3225.3950 125.64905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -21483.721 262.72415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 6001.0000 -21483.853 262.72435 -42.144020 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_cub_a13(s3) - 4 3 1.0 0.0 - 2128.0000 -296.39499 125.64905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -18554.721 262.72415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 6001.0000 -18554.853 262.72435 -42.144020 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_fcc_a1(s4) - 4 3 1.0 0.0 - 2128.0000 -227.59499 124.74905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -18485.921 261.82415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 6001.0000 -18486.053 261.82435 -42.144020 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_hcp_a3(s5) - 4 3 1.0 0.0 - 2128.0000 -7827.5947 125.64905 -24.161800 -.43779100E-02 - 0.00000000 34971.000 - 1 0.00000000 0.00 - 6000.0000 -26085.920 262.72415 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 -.13428960E+32 -9.00 - 6001.0000 -26086.053 262.72435 -42.144020 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_omega(s6) - 4 3 1.0 0.0 - 2128.0000 -8878.0820 144.43223 -26.855600 -.27994460E-02 - 0.00000000 38376.000 - 1 0.00000000 0.00 - 6000.0000 -29500.521 265.29086 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 0.71744500E+32 -9.00 - 6001.0000 -29499.811 265.28982 -42.143893 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_orthorhombic_a20(s7) - 4 3 1.0 0.0 - 2128.0000 4474.4611 124.94570 -25.607406 -.34008400E-03 - -.97290000E-08 25233.000 - 1 -.76143000E-10 4.00 - 6000.0000 -25705.952 264.28417 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 0.12760580E+33 -9.00 - 6001.0000 -25704.689 264.28232 -42.143810 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr_tetragonal_u(s8) - 4 3 1.0 0.0 - 2128.0000 4474.4611 124.94570 -25.607406 -.34008400E-03 - -.97290000E-08 25233.000 - 1 -.76143000E-10 4.00 - 6000.0000 -25705.952 264.28417 -42.144000 0.00000000 - 0.00000000 0.00000000 - 1 0.12760580E+33 -9.00 - 6001.0000 -25704.689 264.28232 -42.143810 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr3_laves_c15(s) - 4 1 3.0 0.0 - 6000.0000 -.29815000E-09 0.66975967E-11 -.10000000E-11 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - Zr # - 4 1 1.0 0.0 - 6000.0000 0.00000000 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 - H # - 4 1 0.0 1.0 - 6000.0000 0.00000000 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 - 1 0.00000000 0.00 + H2(g) # + 4 4 0.0 2.0 + 1200.0000 -13779.823 -17.824781 -19.825631 -.15388637E-02 + -.23830749E-06 147589.95 + 1 779.44498 0.50 + 4100.0000 330318.97 -121.44530 -14.387460 -.10320538E-02 + 0.00000000 -10416577. + 2 -74353.404 99.00 8539.3383 0.50 + 6000.0000 5123954.0 -941.72642 42.957060 0.00000000 + 0.00000000 -.36536589E+09 + 2 -931953.90 99.00 68151.779 0.50 + 6000.0000 -43508.638 176.80798 -41.974318 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Zr_Solid_Alpha(s) # + 1 2 1.0 0.0 + 1135.0000 -7784.8849 131.05307 -25.275675 -.11459462E-03 + -.93967667E-06 28167.161 + 1135.0000 -13328.979 187.23265 -32.755164 0.00000000 + 0.00000000 0.00000000 + Zr(s) # + 1 1 1.0 0.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + H(s) # + 1 1 0.0 1.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 diff --git a/run_tests b/run_tests index 04f75e0d..4206a949 100755 --- a/run_tests +++ b/run_tests @@ -19,6 +19,7 @@ tests=( TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition1 + TestTransition2 TestTransition3 TestTransition4 TestTransition5 ) ./TestThermo12 > test12out.txt diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 8b34d48d..27f9093b 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -75,7 +75,7 @@ subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dToler real(8), intent(in) :: dTolerance logical, intent(out) :: lPass integer :: i, n - real(8) :: diff + real(8) :: dDiff n = size(dPhaseTransitionTemp) lPass = .TRUE. @@ -83,10 +83,10 @@ subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dToler do i = 1, n ! Only check where the expected value is non-zero if (dTestTransitionTemp(i) > 0D0) then - diff = abs(dPhaseTransitionTemp(i) - dTestTransitionTemp(i)) - if (diff > dTolerance) then + dDiff = abs(dPhaseTransitionTemp(i) - dTestTransitionTemp(i)) + if (dDiff > dTolerance) then print *, 'Mismatch at index ', i, ': calculated = ', dPhaseTransitionTemp(i), & - ', expected = ', dTestTransitionTemp(i), ', diff = ', diff + ', expected = ', dTestTransitionTemp(i), ', dDiff = ', dDiff lPass = .FALSE. end if end if diff --git a/src/postprocess/PhaseTransitionrecur.f90 b/src/postprocess/PhaseTransitionrecur.f90 new file mode 100644 index 00000000..4699cd20 --- /dev/null +++ b/src/postprocess/PhaseTransitionrecur.f90 @@ -0,0 +1,130 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ModuleTesting.F90 + !> \brief Module for testing. + !> \author A.E.F. Fitzsimmons + ! + !> \todo Fix duplicates + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 04/10/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Using a bisection search, this subroutine will find and record temperatures of which a phase has + !! made a transition. Returning the list of transition temperatures. + ! + !------------------------------------------------------------------------------------------------------------- +recursive subroutine PhaseTransitionrecur(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions, lFirst) + USE ModuleThermoIO + USE ModuleThermo + implicit none + + real(8), intent(in) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10), intent(out) :: dPhaseTransitionTemp + real(8) :: dTempUpper, dTempLower + integer, intent(out) :: iTransitions + integer :: i, iMaxIteration + integer, dimension(nElements) :: iAssemblageUpper, iAssemblageLower + integer, dimension(10,nElements) :: iPhaseTransitionAssemblage + logical :: lBisectionConvergence, lCompareAssemblage, lCompareAssemblage2 + + !Init + iMaxIteration = 50 + dTempUpper = dTempMax + dTempLower = dTempMin + lBisectionConvergence = .FALSE. + lCompareAssemblage = .FALSE. + lCompareAssemblage2 = .FALSE. + + if(dTempMin>=dTempMax) then + INFOThermo = 56 + return + end if + + if(nElements < 2) then + INFOThermo = 59 + return + end if + + !Init Upper and Lower assemblage + dTemperature = dTempUpper + call Thermochimica + iAssemblageUpper = iAssemblage + call SortInt(iAssemblageUpper, nElements) + + dTemperature = dTempLower + call Thermochimica + iAssemblageLower = iAssemblage + call SortInt(iAssemblageLower, nElements) + + lCompareAssemblage = ALL(iAssemblageLower == iAssemblageUpper) + + !Check if any transition is made + if(lCompareAssemblage) then + INFOThermo = 58 + return + end if + + !Bisection + LOOP_TEMP: do i = 1, iMaxIteration + !reinit + lCompareAssemblage = .FALSE. + lCompareAssemblage2 = .FALSE. + dTemperature = (dTempUpper + dTempLower) / 2D0 + + !Check if reached convergence + if (dTempUpper-dTempLower <= dTempTolerance) then + !Save convergence Temperature and Assemblage + + iTransitions = iTransitions + 1 + dPhaseTransitionTemp(iTransitions) = dTemperature + if (iTransitions > 1) then + if (abs(dPhaseTransitionTemp(iTransitions) - dPhaseTransitionTemp(iTransitions-1)) < dTempTolerance) then + iTransitions = iTransitions - 1 + end if + end if + + call SortInt(iAssemblage, nElements) + iPhaseTransitionAssemblage(iTransitions, :) = iAssemblage + lBisectionConvergence = .TRUE. + ! print *, "AssemblageUpper: ", iAssemblageUpper, NEW_LINE(" "), " AssemblageLower: ", iAssemblageLower, NEW_LINE(" "), " AssemblageTransition: ", iAssemblage, NEW_LINE(" ") + + EXIT LOOP_TEMP + end if + + !Midpoint calculation + call Thermochimica + call SortInt(iAssemblage, nElements) + + print *, "Iteration: ", i, " dTempLower: ", dTempLower, " dTempUpper: ", dTempUpper, " dTempGuess: ", dTemperature, NEW_LINE(" ") + lCompareAssemblage = ALL(iAssemblage == iAssemblageUpper) + lCompareAssemblage2 = ALL(iAssemblage == iAssemblageLower) + + !Bisection step + if (lCompareAssemblage) then + dTempUpper = dTemperature + iAssemblageUpper = iAssemblage + call SortInt(iAssemblageUpper, nElements) + elseif (lCompareAssemblage2) then + dTempLower = dTemperature + iAssemblageLower = iAssemblage + call SortInt(iAssemblageLower, nElements) + else + !else if upper-lower< + print *, "CALL NEW UPPER" + call PhaseTransition(dTempLower, dTemperature - dTempTolerance, dTempTolerance, dPhaseTransitionTemp, iTransitions) + print *, "CALL NEW LOWER" + call PhaseTransition(dTemperature + dTempTolerance, dTempUpper, dTempTolerance, dPhaseTransitionTemp, iTransitions) + EXIT LOOP_TEMP + end if + + end do LOOP_TEMP + +end subroutine PhaseTransition + + + diff --git a/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier b/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier new file mode 100644 index 00000000..2d9deb0b --- /dev/null +++ b/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier @@ -0,0 +1,4 @@ +[ZoneTransfer] +ZoneId=3 +ReferrerUrl=vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html +HostUrl=file://wsl.localhost/Ubuntu/home/aidan/thermochimica/src/postprocess/PhaseTransition.f90 From 5e9cb361050c407d51fd1bd5a92882a7fbb12bcc Mon Sep 17 00:00:00 2001 From: aidanfitz <77299121+aidanfitz@users.noreply.github.com> Date: Mon, 26 May 2025 12:30:59 -0400 Subject: [PATCH 20/34] Delete src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier --- src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier diff --git a/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier b/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier deleted file mode 100644 index 2d9deb0b..00000000 --- a/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier +++ /dev/null @@ -1,4 +0,0 @@ -[ZoneTransfer] -ZoneId=3 -ReferrerUrl=vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html -HostUrl=file://wsl.localhost/Ubuntu/home/aidan/thermochimica/src/postprocess/PhaseTransition.f90 From 78abb0c5575e7df545b55710cb6cc4cda1b320b7 Mon Sep 17 00:00:00 2001 From: aidanfitz <77299121+aidanfitz@users.noreply.github.com> Date: Mon, 26 May 2025 12:31:18 -0400 Subject: [PATCH 21/34] Delete src/postprocess/PhaseTransitionrecur.f90 --- src/postprocess/PhaseTransitionrecur.f90 | 130 ----------------------- 1 file changed, 130 deletions(-) delete mode 100644 src/postprocess/PhaseTransitionrecur.f90 diff --git a/src/postprocess/PhaseTransitionrecur.f90 b/src/postprocess/PhaseTransitionrecur.f90 deleted file mode 100644 index 4699cd20..00000000 --- a/src/postprocess/PhaseTransitionrecur.f90 +++ /dev/null @@ -1,130 +0,0 @@ - !------------------------------------------------------------------------------------------------------------- - ! - !> \file ModuleTesting.F90 - !> \brief Module for testing. - !> \author A.E.F. Fitzsimmons - ! - !> \todo Fix duplicates - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 04/10/2024 A.E.F. Fitzsimmons Original Code - ! - ! Purpose: - ! ======== - !> \details Using a bisection search, this subroutine will find and record temperatures of which a phase has - !! made a transition. Returning the list of transition temperatures. - ! - !------------------------------------------------------------------------------------------------------------- -recursive subroutine PhaseTransitionrecur(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions, lFirst) - USE ModuleThermoIO - USE ModuleThermo - implicit none - - real(8), intent(in) :: dTempMin, dTempMax, dTempTolerance - real(8), dimension(10), intent(out) :: dPhaseTransitionTemp - real(8) :: dTempUpper, dTempLower - integer, intent(out) :: iTransitions - integer :: i, iMaxIteration - integer, dimension(nElements) :: iAssemblageUpper, iAssemblageLower - integer, dimension(10,nElements) :: iPhaseTransitionAssemblage - logical :: lBisectionConvergence, lCompareAssemblage, lCompareAssemblage2 - - !Init - iMaxIteration = 50 - dTempUpper = dTempMax - dTempLower = dTempMin - lBisectionConvergence = .FALSE. - lCompareAssemblage = .FALSE. - lCompareAssemblage2 = .FALSE. - - if(dTempMin>=dTempMax) then - INFOThermo = 56 - return - end if - - if(nElements < 2) then - INFOThermo = 59 - return - end if - - !Init Upper and Lower assemblage - dTemperature = dTempUpper - call Thermochimica - iAssemblageUpper = iAssemblage - call SortInt(iAssemblageUpper, nElements) - - dTemperature = dTempLower - call Thermochimica - iAssemblageLower = iAssemblage - call SortInt(iAssemblageLower, nElements) - - lCompareAssemblage = ALL(iAssemblageLower == iAssemblageUpper) - - !Check if any transition is made - if(lCompareAssemblage) then - INFOThermo = 58 - return - end if - - !Bisection - LOOP_TEMP: do i = 1, iMaxIteration - !reinit - lCompareAssemblage = .FALSE. - lCompareAssemblage2 = .FALSE. - dTemperature = (dTempUpper + dTempLower) / 2D0 - - !Check if reached convergence - if (dTempUpper-dTempLower <= dTempTolerance) then - !Save convergence Temperature and Assemblage - - iTransitions = iTransitions + 1 - dPhaseTransitionTemp(iTransitions) = dTemperature - if (iTransitions > 1) then - if (abs(dPhaseTransitionTemp(iTransitions) - dPhaseTransitionTemp(iTransitions-1)) < dTempTolerance) then - iTransitions = iTransitions - 1 - end if - end if - - call SortInt(iAssemblage, nElements) - iPhaseTransitionAssemblage(iTransitions, :) = iAssemblage - lBisectionConvergence = .TRUE. - ! print *, "AssemblageUpper: ", iAssemblageUpper, NEW_LINE(" "), " AssemblageLower: ", iAssemblageLower, NEW_LINE(" "), " AssemblageTransition: ", iAssemblage, NEW_LINE(" ") - - EXIT LOOP_TEMP - end if - - !Midpoint calculation - call Thermochimica - call SortInt(iAssemblage, nElements) - - print *, "Iteration: ", i, " dTempLower: ", dTempLower, " dTempUpper: ", dTempUpper, " dTempGuess: ", dTemperature, NEW_LINE(" ") - lCompareAssemblage = ALL(iAssemblage == iAssemblageUpper) - lCompareAssemblage2 = ALL(iAssemblage == iAssemblageLower) - - !Bisection step - if (lCompareAssemblage) then - dTempUpper = dTemperature - iAssemblageUpper = iAssemblage - call SortInt(iAssemblageUpper, nElements) - elseif (lCompareAssemblage2) then - dTempLower = dTemperature - iAssemblageLower = iAssemblage - call SortInt(iAssemblageLower, nElements) - else - !else if upper-lower< - print *, "CALL NEW UPPER" - call PhaseTransition(dTempLower, dTemperature - dTempTolerance, dTempTolerance, dPhaseTransitionTemp, iTransitions) - print *, "CALL NEW LOWER" - call PhaseTransition(dTemperature + dTempTolerance, dTempUpper, dTempTolerance, dPhaseTransitionTemp, iTransitions) - EXIT LOOP_TEMP - end if - - end do LOOP_TEMP - -end subroutine PhaseTransition - - - From 4e5abe1c69bfbd564fc0a9bb139b3d9c0f75965e Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 27 May 2025 08:48:07 -0400 Subject: [PATCH 22/34] Transition Tests --- src/postprocess/PhaseTransitionrecur.f90 | 130 ------------------ .../PhaseTransitionrecur.f90:Zone.Identifier | 4 - 2 files changed, 134 deletions(-) delete mode 100644 src/postprocess/PhaseTransitionrecur.f90 delete mode 100644 src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier diff --git a/src/postprocess/PhaseTransitionrecur.f90 b/src/postprocess/PhaseTransitionrecur.f90 deleted file mode 100644 index 4699cd20..00000000 --- a/src/postprocess/PhaseTransitionrecur.f90 +++ /dev/null @@ -1,130 +0,0 @@ - !------------------------------------------------------------------------------------------------------------- - ! - !> \file ModuleTesting.F90 - !> \brief Module for testing. - !> \author A.E.F. Fitzsimmons - ! - !> \todo Fix duplicates - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 04/10/2024 A.E.F. Fitzsimmons Original Code - ! - ! Purpose: - ! ======== - !> \details Using a bisection search, this subroutine will find and record temperatures of which a phase has - !! made a transition. Returning the list of transition temperatures. - ! - !------------------------------------------------------------------------------------------------------------- -recursive subroutine PhaseTransitionrecur(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions, lFirst) - USE ModuleThermoIO - USE ModuleThermo - implicit none - - real(8), intent(in) :: dTempMin, dTempMax, dTempTolerance - real(8), dimension(10), intent(out) :: dPhaseTransitionTemp - real(8) :: dTempUpper, dTempLower - integer, intent(out) :: iTransitions - integer :: i, iMaxIteration - integer, dimension(nElements) :: iAssemblageUpper, iAssemblageLower - integer, dimension(10,nElements) :: iPhaseTransitionAssemblage - logical :: lBisectionConvergence, lCompareAssemblage, lCompareAssemblage2 - - !Init - iMaxIteration = 50 - dTempUpper = dTempMax - dTempLower = dTempMin - lBisectionConvergence = .FALSE. - lCompareAssemblage = .FALSE. - lCompareAssemblage2 = .FALSE. - - if(dTempMin>=dTempMax) then - INFOThermo = 56 - return - end if - - if(nElements < 2) then - INFOThermo = 59 - return - end if - - !Init Upper and Lower assemblage - dTemperature = dTempUpper - call Thermochimica - iAssemblageUpper = iAssemblage - call SortInt(iAssemblageUpper, nElements) - - dTemperature = dTempLower - call Thermochimica - iAssemblageLower = iAssemblage - call SortInt(iAssemblageLower, nElements) - - lCompareAssemblage = ALL(iAssemblageLower == iAssemblageUpper) - - !Check if any transition is made - if(lCompareAssemblage) then - INFOThermo = 58 - return - end if - - !Bisection - LOOP_TEMP: do i = 1, iMaxIteration - !reinit - lCompareAssemblage = .FALSE. - lCompareAssemblage2 = .FALSE. - dTemperature = (dTempUpper + dTempLower) / 2D0 - - !Check if reached convergence - if (dTempUpper-dTempLower <= dTempTolerance) then - !Save convergence Temperature and Assemblage - - iTransitions = iTransitions + 1 - dPhaseTransitionTemp(iTransitions) = dTemperature - if (iTransitions > 1) then - if (abs(dPhaseTransitionTemp(iTransitions) - dPhaseTransitionTemp(iTransitions-1)) < dTempTolerance) then - iTransitions = iTransitions - 1 - end if - end if - - call SortInt(iAssemblage, nElements) - iPhaseTransitionAssemblage(iTransitions, :) = iAssemblage - lBisectionConvergence = .TRUE. - ! print *, "AssemblageUpper: ", iAssemblageUpper, NEW_LINE(" "), " AssemblageLower: ", iAssemblageLower, NEW_LINE(" "), " AssemblageTransition: ", iAssemblage, NEW_LINE(" ") - - EXIT LOOP_TEMP - end if - - !Midpoint calculation - call Thermochimica - call SortInt(iAssemblage, nElements) - - print *, "Iteration: ", i, " dTempLower: ", dTempLower, " dTempUpper: ", dTempUpper, " dTempGuess: ", dTemperature, NEW_LINE(" ") - lCompareAssemblage = ALL(iAssemblage == iAssemblageUpper) - lCompareAssemblage2 = ALL(iAssemblage == iAssemblageLower) - - !Bisection step - if (lCompareAssemblage) then - dTempUpper = dTemperature - iAssemblageUpper = iAssemblage - call SortInt(iAssemblageUpper, nElements) - elseif (lCompareAssemblage2) then - dTempLower = dTemperature - iAssemblageLower = iAssemblage - call SortInt(iAssemblageLower, nElements) - else - !else if upper-lower< - print *, "CALL NEW UPPER" - call PhaseTransition(dTempLower, dTemperature - dTempTolerance, dTempTolerance, dPhaseTransitionTemp, iTransitions) - print *, "CALL NEW LOWER" - call PhaseTransition(dTemperature + dTempTolerance, dTempUpper, dTempTolerance, dPhaseTransitionTemp, iTransitions) - EXIT LOOP_TEMP - end if - - end do LOOP_TEMP - -end subroutine PhaseTransition - - - diff --git a/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier b/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier deleted file mode 100644 index 2d9deb0b..00000000 --- a/src/postprocess/PhaseTransitionrecur.f90:Zone.Identifier +++ /dev/null @@ -1,4 +0,0 @@ -[ZoneTransfer] -ZoneId=3 -ReferrerUrl=vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html -HostUrl=file://wsl.localhost/Ubuntu/home/aidan/thermochimica/src/postprocess/PhaseTransition.f90 From 220fa521d1757547a42d26f7ae2c357ebb938303 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 27 May 2025 08:52:35 -0400 Subject: [PATCH 23/34] Removed ignore --- .gitignore | 1 - test/daily/TestTransition1.F90 | 63 ++++++++++++++++++++++++++++++++++ test/daily/TestTransition2.F90 | 61 ++++++++++++++++++++++++++++++++ test/daily/TestTransition3.F90 | 61 ++++++++++++++++++++++++++++++++ test/daily/TestTransition4.F90 | 61 ++++++++++++++++++++++++++++++++ test/daily/TestTransition5.F90 | 61 ++++++++++++++++++++++++++++++++ test/daily/TestTransition6.F90 | 62 +++++++++++++++++++++++++++++++++ 7 files changed, 369 insertions(+), 1 deletion(-) create mode 100644 test/daily/TestTransition1.F90 create mode 100644 test/daily/TestTransition2.F90 create mode 100644 test/daily/TestTransition3.F90 create mode 100644 test/daily/TestTransition4.F90 create mode 100644 test/daily/TestTransition5.F90 create mode 100644 test/daily/TestTransition6.F90 diff --git a/.gitignore b/.gitignore index 4a21c0b1..4a05d1c8 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,6 @@ test/doc/ # some of these will occasionally require manual override data/ -test/ python/ private_tests diff --git a/test/daily/TestTransition1.F90 b/test/daily/TestTransition1.F90 new file mode 100644 index 00000000..f9edd6d7 --- /dev/null +++ b/test/daily/TestTransition1.F90 @@ -0,0 +1,63 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D-1 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'AlMg-Liang.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(13) = 0.5 ! Al + dElementMass(12) = 0.5 ! Mg + + ! Init test values + dTempMin = 300 + dTempMax = 1000 + iTestTransitions = 4 + dTestTransitionTemp = [523.24D0, 667.39D0, 729.97D0, 735.02D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + !Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + do i = 1, size(dPhaseTransitionTemp) + print *, dPhaseTransitionTemp(i) + end do + if (lPass) then + ! The test passed: + print *, 'TestTransition1: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition1: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestTransition2.F90 b/test/daily/TestTransition2.F90 new file mode 100644 index 00000000..4e35cb1f --- /dev/null +++ b/test/daily/TestTransition2.F90 @@ -0,0 +1,61 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D0 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'MoPdRuRhTc-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(44) = 0.55 ! Mo + dElementMass(42) = 0.45 ! Ru + + ! Init test values + dTempMin = 1000 + dTempMax = 2500 + iTestTransitions = 4 + dTestTransitionTemp = [1415.93D0, 1824.70D0, 2295.85D0, 2354.94D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + !Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + if (lPass) then + ! The test passed: + print *, 'TestTransition2: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition2: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestTransition3.F90 b/test/daily/TestTransition3.F90 new file mode 100644 index 00000000..575319f5 --- /dev/null +++ b/test/daily/TestTransition3.F90 @@ -0,0 +1,61 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D0 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'MoPdRuRhTc-Kaye.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(45) = 0.4 ! Pd + dElementMass(46) = 0.6 ! Rh + + ! Init test values + dTempMin = 500 + dTempMax = 2500 + iTestTransitions = 3 + dTestTransitionTemp = [1149.58D0, 1937.22D0, 1959.30D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + !Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + if (lPass) then + ! The test passed: + print *, 'TestTransition3: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition3: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestTransition4.F90 b/test/daily/TestTransition4.F90 new file mode 100644 index 00000000..cd355ce3 --- /dev/null +++ b/test/daily/TestTransition4.F90 @@ -0,0 +1,61 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D0 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'ZrH-Dupin.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(40) = 0.97 ! Zr + dElementMass(1) = 0.03 ! H + + ! Init test values + dTempMin = 300 + dTempMax = 1300 + iTestTransitions = 3 + dTestTransitionTemp = [735.39D0, 1064.22D0, 1103.52D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] ! 304.99 missing + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + ! Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + if (lPass) then + ! The test passed: + print *, 'TestTransition4: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition4: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestTransition5.F90 b/test/daily/TestTransition5.F90 new file mode 100644 index 00000000..1c52c708 --- /dev/null +++ b/test/daily/TestTransition5.F90 @@ -0,0 +1,61 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D0 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'CsTe-1.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(52) = 0.75 ! Te + dElementMass(55) = 0.25 ! Cs + + ! Init test values + dTempMin = 300 + dTempMax = 1000 + iTestTransitions = 2 + dTestTransitionTemp = [499.62D0, 501.63D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + ! Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + if (lPass) then + ! The test passed: + print *, 'TestTransition5: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition5: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestTransition6.F90 b/test/daily/TestTransition6.F90 new file mode 100644 index 00000000..13990af7 --- /dev/null +++ b/test/daily/TestTransition6.F90 @@ -0,0 +1,62 @@ +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: i, iTransitions, iTestTransitions + logical :: lPass + + i = 1 + iTransitions = 0 + dPhaseTransitionTemp = 0D0 + dTempTolerance = 1D0 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'CsTe-1.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(52) = 0.75 ! Te + dElementMass(55) = 0.25 ! Cs + + ! Init test values + dTempMin = 300 + dTempMax = 1000 + iTestTransitions = 1 + dTestTransitionTemp = [499.62D0, 501.21D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica ! or I can init hardcode nElements + + ! Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + + if (lPass) then + ! The test passed: + print *, 'TestTransition4: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition4: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file From 5545fcf7cb2f0ec571367e9f1f4243867cf6d3f0 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Wed, 28 May 2025 14:04:55 -0400 Subject: [PATCH 24/34] cleaned new test files --- run_tests | 1 + src/postprocess/PhaseTransition.f90 | 5 ++-- test/daily/TestTransition1.F90 | 30 ++++++++++++++----- test/daily/TestTransition2.F90 | 38 +++++++++++++++++------- test/daily/TestTransition3.F90 | 36 +++++++++++++++------- test/daily/TestTransition4.F90 | 32 +++++++++++++++----- test/daily/TestTransition5.F90 | 32 +++++++++++++++----- test/daily/TestTransition6.F90 | 46 +++++++++++++++++++---------- 8 files changed, 158 insertions(+), 62 deletions(-) diff --git a/run_tests b/run_tests index 4206a949..1f0db500 100755 --- a/run_tests +++ b/run_tests @@ -20,6 +20,7 @@ tests=( TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition1 TestTransition2 TestTransition3 TestTransition4 TestTransition5 + TestTransition6 ) ./TestThermo12 > test12out.txt diff --git a/src/postprocess/PhaseTransition.f90 b/src/postprocess/PhaseTransition.f90 index 627adfea..9d2220d3 100644 --- a/src/postprocess/PhaseTransition.f90 +++ b/src/postprocess/PhaseTransition.f90 @@ -1,7 +1,7 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file ModuleTesting.F90 - !> \brief Module for testing. + !> \file PhaseTransition.F90 + !> \brief Find Phase Transitions !> \author A.E.F. Fitzsimmons ! !> \todo Input file setup, Return assemblages @@ -36,6 +36,7 @@ subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionT i = 1 iMaxIteration = 50 iTransitions = 0 + dPhaseTransitionTemp = 0D0 dTempLower = dTempMin dTempUpper = dTempMax lCompareAssemblage = .FALSE. diff --git a/test/daily/TestTransition1.F90 b/test/daily/TestTransition1.F90 index f9edd6d7..8f172115 100644 --- a/test/daily/TestTransition1.F90 +++ b/test/daily/TestTransition1.F90 @@ -1,3 +1,22 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition1.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- program TestTransition1 USE ModuleThermoIO @@ -9,12 +28,9 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 dTempTolerance = 1D-1 ! Specify units: @@ -38,14 +54,12 @@ program TestTransition1 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica !Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) - do i = 1, size(dPhaseTransitionTemp) - print *, dPhaseTransitionTemp(i) - end do + if (lPass) then ! The test passed: print *, 'TestTransition1: PASS' diff --git a/test/daily/TestTransition2.F90 b/test/daily/TestTransition2.F90 index 4e35cb1f..ddb9b422 100644 --- a/test/daily/TestTransition2.F90 +++ b/test/daily/TestTransition2.F90 @@ -1,4 +1,23 @@ -program TestTransition1 + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition2.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition2 USE ModuleThermoIO USE ModuleThermo @@ -9,13 +28,10 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 - dTempTolerance = 1D0 + + dTempTolerance = 1D-1 ! Specify units: cInputUnitTemperature = 'K' @@ -26,8 +42,8 @@ program TestTransition1 ! Specify values: dPressure = 1D0 dTemperature = 1000 - dElementMass(44) = 0.55 ! Mo - dElementMass(42) = 0.45 ! Ru + dElementMass(44) = 0.55 ! Ru + dElementMass(42) = 0.45 ! Mo ! Init test values dTempMin = 1000 @@ -38,7 +54,7 @@ program TestTransition1 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica !Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) @@ -58,4 +74,4 @@ program TestTransition1 call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition2 \ No newline at end of file diff --git a/test/daily/TestTransition3.F90 b/test/daily/TestTransition3.F90 index 575319f5..88d8f938 100644 --- a/test/daily/TestTransition3.F90 +++ b/test/daily/TestTransition3.F90 @@ -1,4 +1,23 @@ -program TestTransition1 + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition3.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition3 USE ModuleThermoIO USE ModuleThermo @@ -9,13 +28,10 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 - dTempTolerance = 1D0 + dTempTolerance = 1D-1 ! Specify units: cInputUnitTemperature = 'K' @@ -26,8 +42,8 @@ program TestTransition1 ! Specify values: dPressure = 1D0 dTemperature = 1000 - dElementMass(45) = 0.4 ! Pd - dElementMass(46) = 0.6 ! Rh + dElementMass(45) = 0.4 ! Rh + dElementMass(46) = 0.6 ! Pd ! Init test values dTempMin = 500 @@ -38,7 +54,7 @@ program TestTransition1 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica !Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) @@ -58,4 +74,4 @@ program TestTransition1 call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition3 \ No newline at end of file diff --git a/test/daily/TestTransition4.F90 b/test/daily/TestTransition4.F90 index cd355ce3..07b5acce 100644 --- a/test/daily/TestTransition4.F90 +++ b/test/daily/TestTransition4.F90 @@ -1,4 +1,23 @@ -program TestTransition1 + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition4.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition4 USE ModuleThermoIO USE ModuleThermo @@ -9,12 +28,9 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 dTempTolerance = 1D0 ! Specify units: @@ -33,12 +49,12 @@ program TestTransition1 dTempMin = 300 dTempMax = 1300 iTestTransitions = 3 - dTestTransitionTemp = [735.39D0, 1064.22D0, 1103.52D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] ! 304.99 missing + dTestTransitionTemp = [735.39D0, 1064.22D0, 1103.52D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica ! Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) @@ -58,4 +74,4 @@ program TestTransition1 call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition4 \ No newline at end of file diff --git a/test/daily/TestTransition5.F90 b/test/daily/TestTransition5.F90 index 1c52c708..488b6535 100644 --- a/test/daily/TestTransition5.F90 +++ b/test/daily/TestTransition5.F90 @@ -1,4 +1,23 @@ -program TestTransition1 + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition5.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition5 USE ModuleThermoIO USE ModuleThermo @@ -9,13 +28,10 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 - dTempTolerance = 1D0 + dTempTolerance = 1D-1 ! Specify units: cInputUnitTemperature = 'K' @@ -38,7 +54,7 @@ program TestTransition1 ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica ! Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) @@ -58,4 +74,4 @@ program TestTransition1 call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition5 \ No newline at end of file diff --git a/test/daily/TestTransition6.F90 b/test/daily/TestTransition6.F90 index 13990af7..0f385341 100644 --- a/test/daily/TestTransition6.F90 +++ b/test/daily/TestTransition6.F90 @@ -1,4 +1,23 @@ -program TestTransition1 + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition6.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition6 USE ModuleThermoIO USE ModuleThermo @@ -9,13 +28,10 @@ program TestTransition1 ! Init variables real(8) :: dTempMin, dTempMax, dTempTolerance real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: i, iTransitions, iTestTransitions + integer :: iTransitions, iTestTransitions logical :: lPass - i = 1 - iTransitions = 0 - dPhaseTransitionTemp = 0D0 - dTempTolerance = 1D0 + dTempTolerance = 1D-1 ! Specify units: cInputUnitTemperature = 'K' @@ -26,19 +42,19 @@ program TestTransition1 ! Specify values: dPressure = 1D0 dTemperature = 1000 - dElementMass(52) = 0.75 ! Te - dElementMass(55) = 0.25 ! Cs + dElementMass(52) = 0.25 ! Te + dElementMass(55) = 0.75 ! Cs ! Init test values dTempMin = 300 - dTempMax = 1000 - iTestTransitions = 1 - dTestTransitionTemp = [499.62D0, 501.21D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + dTempMax = 1500 + iTestTransitions = 3 + dTestTransitionTemp = [301.33D0, 850.82D0, 1027.51D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] lPass = .FALSE. ! Parse the ChemSage data-file: call ParseCSDataFile(cThermoFileName) - call Thermochimica ! or I can init hardcode nElements + call Thermochimica ! Test call call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) @@ -47,16 +63,16 @@ program TestTransition1 if (lPass) then ! The test passed: - print *, 'TestTransition4: PASS' + print *, 'TestTransition6: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition4: FAIL <---' + print *, 'TestTransition6: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition6 \ No newline at end of file From 5e89dd7abd0bb0d33bf93e6dc14650280ca2b792 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Thu, 12 Jun 2025 13:53:34 -0400 Subject: [PATCH 25/34] change request --- run_tests | 5 +- src/module/ModuleTesting.f90 | 4 +- src/postprocess/PhaseTransition.f90 | 4 +- test/daily/TestThermo15.F90 | 2 +- test/daily/TestThermo16.F90 | 2 +- test/daily/TestThermo17.F90 | 2 +- test/daily/TestThermo18.F90 | 2 +- test/daily/TestThermo19.F90 | 2 +- test/daily/TestThermo20.F90 | 2 +- test/daily/TestThermo21.F90 | 2 +- test/daily/TestThermo22.F90 | 2 +- test/daily/TestThermo23.F90 | 2 +- test/daily/TestThermo24.F90 | 2 +- test/daily/TestThermo25.F90 | 2 +- test/daily/TestThermo26.F90 | 2 +- test/daily/TestThermo27.F90 | 2 +- test/daily/TestThermo28.F90 | 2 +- test/daily/TestThermo29.F90 | 2 +- test/daily/TestThermo30.F90 | 2 +- test/daily/TestThermo31.F90 | 2 +- test/daily/TestThermo32.F90 | 2 +- test/daily/TestThermo33.F90 | 2 +- test/daily/TestThermo34.F90 | 2 +- test/daily/TestThermo35.F90 | 2 +- test/daily/TestThermo36.F90 | 2 +- test/daily/TestThermo37.F90 | 2 +- test/daily/TestThermo38.F90 | 2 +- test/daily/TestThermo39.F90 | 2 +- test/daily/TestThermo40.F90 | 2 +- test/daily/TestThermo41.F90 | 2 +- test/daily/TestThermo42.F90 | 2 +- test/daily/TestThermo43.F90 | 2 +- test/daily/TestThermo44.F90 | 2 +- test/daily/TestThermo45.F90 | 2 +- test/daily/TestThermo46.F90 | 2 +- test/daily/TestThermo47.F90 | 2 +- test/daily/TestThermo48.F90 | 2 +- test/daily/TestThermo49.F90 | 2 +- test/daily/TestThermo50.F90 | 2 +- test/daily/TestThermo51.F90 | 2 +- test/daily/TestThermo52.F90 | 2 +- test/daily/TestThermo54.F90 | 2 +- test/daily/TestThermo55.F90 | 2 +- test/daily/TestThermo56.F90 | 2 +- test/daily/TestThermo57.F90 | 2 +- test/daily/TestThermo58.F90 | 2 +- test/daily/TestThermo59.F90 | 2 +- test/daily/TestThermo60.F90 | 2 +- test/daily/TestThermo61.F90 | 2 +- test/daily/TestThermo62.F90 | 2 +- test/daily/TestThermo63.F90 | 2 +- test/daily/TestThermo64.F90 | 2 +- ...stTransition1.F90 => TestTransition01.F90} | 0 ...stTransition2.F90 => TestTransition02.F90} | 0 ...stTransition3.F90 => TestTransition03.F90} | 0 ...stTransition4.F90 => TestTransition04.F90} | 0 ...stTransition5.F90 => TestTransition05.F90} | 0 test/daily/TestTransition6.F90 | 78 ------------------- 58 files changed, 55 insertions(+), 134 deletions(-) rename test/daily/{TestTransition1.F90 => TestTransition01.F90} (100%) rename test/daily/{TestTransition2.F90 => TestTransition02.F90} (100%) rename test/daily/{TestTransition3.F90 => TestTransition03.F90} (100%) rename test/daily/{TestTransition4.F90 => TestTransition04.F90} (100%) rename test/daily/{TestTransition5.F90 => TestTransition05.F90} (100%) delete mode 100644 test/daily/TestTransition6.F90 diff --git a/run_tests b/run_tests index 1f0db500..75f311ac 100755 --- a/run_tests +++ b/run_tests @@ -18,9 +18,8 @@ tests=( TestThermo46 TestThermo47 TestThermo48 TestThermo49 TestThermo50 TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 - TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition1 - TestTransition2 TestTransition3 TestTransition4 TestTransition5 - TestTransition6 + TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition01 + TestTransition02 TestTransition03 TestTransition04 TestTransition05 ) ./TestThermo12 > test12out.txt diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 27f9093b..9728a6d7 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -32,7 +32,7 @@ module ModuleTesting contains - subroutine testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + subroutine testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) USE ModuleThermo !Init variables @@ -56,7 +56,7 @@ subroutine testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeci lPass = .TRUE. - end subroutine testMolFraction + end subroutine testProperties subroutine printMolFractions USE ModuleThermo diff --git a/src/postprocess/PhaseTransition.f90 b/src/postprocess/PhaseTransition.f90 index 9d2220d3..d19724ea 100644 --- a/src/postprocess/PhaseTransition.f90 +++ b/src/postprocess/PhaseTransition.f90 @@ -14,8 +14,8 @@ ! ! Purpose: ! ======== - !> \details Using a bisection search, this subroutine will find and record temperatures of which a phase has - !! made a transition. Returning the list of transition temperatures. + !> \details Using a bisection search, this subroutine will find and record phase transition temperatures. + ! ! !------------------------------------------------------------------------------------------------------------- subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) diff --git a/test/daily/TestThermo15.F90 b/test/daily/TestThermo15.F90 index b895bf1d..0f33661a 100644 --- a/test/daily/TestThermo15.F90 +++ b/test/daily/TestThermo15.F90 @@ -72,7 +72,7 @@ program TestThermo15 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo16.F90 b/test/daily/TestThermo16.F90 index b36fde0f..2c9c9bde 100644 --- a/test/daily/TestThermo16.F90 +++ b/test/daily/TestThermo16.F90 @@ -71,7 +71,7 @@ program TestThermo16 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo17.F90 b/test/daily/TestThermo17.F90 index def880dd..1f3d1542 100644 --- a/test/daily/TestThermo17.F90 +++ b/test/daily/TestThermo17.F90 @@ -71,7 +71,7 @@ program TestThermo17 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo18.F90 b/test/daily/TestThermo18.F90 index 2c7c89c5..08335ad4 100644 --- a/test/daily/TestThermo18.F90 +++ b/test/daily/TestThermo18.F90 @@ -72,7 +72,7 @@ program TestThermo18 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo19.F90 b/test/daily/TestThermo19.F90 index 80899697..bf8c3b18 100644 --- a/test/daily/TestThermo19.F90 +++ b/test/daily/TestThermo19.F90 @@ -69,7 +69,7 @@ program TestThermo19 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo20.F90 b/test/daily/TestThermo20.F90 index bdc839ae..9d5e4cd5 100644 --- a/test/daily/TestThermo20.F90 +++ b/test/daily/TestThermo20.F90 @@ -69,7 +69,7 @@ program TestThermo20 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo21.F90 b/test/daily/TestThermo21.F90 index b3eed68d..8444e035 100644 --- a/test/daily/TestThermo21.F90 +++ b/test/daily/TestThermo21.F90 @@ -70,7 +70,7 @@ program TestThermo21 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo22.F90 b/test/daily/TestThermo22.F90 index 0e0120c1..fd28fae8 100644 --- a/test/daily/TestThermo22.F90 +++ b/test/daily/TestThermo22.F90 @@ -69,7 +69,7 @@ program TestThermo22 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo23.F90 b/test/daily/TestThermo23.F90 index 134057ac..d6179849 100644 --- a/test/daily/TestThermo23.F90 +++ b/test/daily/TestThermo23.F90 @@ -69,7 +69,7 @@ program TestThermo23 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo24.F90 b/test/daily/TestThermo24.F90 index 79afeb3d..022158e4 100644 --- a/test/daily/TestThermo24.F90 +++ b/test/daily/TestThermo24.F90 @@ -70,7 +70,7 @@ program TestThermo24 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo25.F90 b/test/daily/TestThermo25.F90 index 49fb9029..f38c5c17 100644 --- a/test/daily/TestThermo25.F90 +++ b/test/daily/TestThermo25.F90 @@ -68,7 +68,7 @@ program TestThermo25 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo26.F90 b/test/daily/TestThermo26.F90 index 5246424c..f99a558d 100644 --- a/test/daily/TestThermo26.F90 +++ b/test/daily/TestThermo26.F90 @@ -70,7 +70,7 @@ program TestThermo26 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo27.F90 b/test/daily/TestThermo27.F90 index 15b95c19..906f6822 100644 --- a/test/daily/TestThermo27.F90 +++ b/test/daily/TestThermo27.F90 @@ -70,7 +70,7 @@ program TestThermo27 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo28.F90 b/test/daily/TestThermo28.F90 index f8ade077..aaf2580e 100644 --- a/test/daily/TestThermo28.F90 +++ b/test/daily/TestThermo28.F90 @@ -70,7 +70,7 @@ program TestThermo28 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo29.F90 b/test/daily/TestThermo29.F90 index ef1644af..319fd87a 100644 --- a/test/daily/TestThermo29.F90 +++ b/test/daily/TestThermo29.F90 @@ -69,7 +69,7 @@ program TestThermo29 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo30.F90 b/test/daily/TestThermo30.F90 index 37c635d7..33444fb7 100644 --- a/test/daily/TestThermo30.F90 +++ b/test/daily/TestThermo30.F90 @@ -69,7 +69,7 @@ program TestThermo30 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo31.F90 b/test/daily/TestThermo31.F90 index eab78beb..e0bae181 100644 --- a/test/daily/TestThermo31.F90 +++ b/test/daily/TestThermo31.F90 @@ -70,7 +70,7 @@ program TestThermo31 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo32.F90 b/test/daily/TestThermo32.F90 index f0d49673..9d9c325b 100644 --- a/test/daily/TestThermo32.F90 +++ b/test/daily/TestThermo32.F90 @@ -70,7 +70,7 @@ program TestThermo32 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo33.F90 b/test/daily/TestThermo33.F90 index ef4c364a..f406ca6f 100644 --- a/test/daily/TestThermo33.F90 +++ b/test/daily/TestThermo33.F90 @@ -70,7 +70,7 @@ program TestThermo33 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo34.F90 b/test/daily/TestThermo34.F90 index 9e51c1e3..beec0b74 100644 --- a/test/daily/TestThermo34.F90 +++ b/test/daily/TestThermo34.F90 @@ -73,7 +73,7 @@ program TestThermo34 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo35.F90 b/test/daily/TestThermo35.F90 index 2f358cd5..1c0bc28c 100644 --- a/test/daily/TestThermo35.F90 +++ b/test/daily/TestThermo35.F90 @@ -72,7 +72,7 @@ program TestThermo35 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo36.F90 b/test/daily/TestThermo36.F90 index 980f6437..9a54bd2a 100644 --- a/test/daily/TestThermo36.F90 +++ b/test/daily/TestThermo36.F90 @@ -72,7 +72,7 @@ program TestThermo36 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo37.F90 b/test/daily/TestThermo37.F90 index bb64ff97..4eaa4d71 100644 --- a/test/daily/TestThermo37.F90 +++ b/test/daily/TestThermo37.F90 @@ -71,7 +71,7 @@ program TestThermo37 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo38.F90 b/test/daily/TestThermo38.F90 index 529dcacc..8885b425 100644 --- a/test/daily/TestThermo38.F90 +++ b/test/daily/TestThermo38.F90 @@ -72,7 +72,7 @@ program TestThermo38 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo39.F90 b/test/daily/TestThermo39.F90 index 7ab917f4..188fb725 100644 --- a/test/daily/TestThermo39.F90 +++ b/test/daily/TestThermo39.F90 @@ -70,7 +70,7 @@ program TestThermo39 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - if (INFOThermo == 0) call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + if (INFOThermo == 0) call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo40.F90 b/test/daily/TestThermo40.F90 index 9b5dbc25..0f2fa632 100644 --- a/test/daily/TestThermo40.F90 +++ b/test/daily/TestThermo40.F90 @@ -70,7 +70,7 @@ program TestThermo40 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo41.F90 b/test/daily/TestThermo41.F90 index 829d796f..915a7028 100644 --- a/test/daily/TestThermo41.F90 +++ b/test/daily/TestThermo41.F90 @@ -41,7 +41,7 @@ program TestThermo41 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo42.F90 b/test/daily/TestThermo42.F90 index 41a8fac1..899681cd 100644 --- a/test/daily/TestThermo42.F90 +++ b/test/daily/TestThermo42.F90 @@ -44,7 +44,7 @@ program TestThermo42 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo43.F90 b/test/daily/TestThermo43.F90 index d1a92315..58622451 100644 --- a/test/daily/TestThermo43.F90 +++ b/test/daily/TestThermo43.F90 @@ -71,7 +71,7 @@ program TestThermo43 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo44.F90 b/test/daily/TestThermo44.F90 index 9704beb6..d87dff56 100644 --- a/test/daily/TestThermo44.F90 +++ b/test/daily/TestThermo44.F90 @@ -71,7 +71,7 @@ program TestThermo44 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo45.F90 b/test/daily/TestThermo45.F90 index cf43c917..96b96bc9 100644 --- a/test/daily/TestThermo45.F90 +++ b/test/daily/TestThermo45.F90 @@ -70,7 +70,7 @@ program TestThermo45 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo46.F90 b/test/daily/TestThermo46.F90 index f419593c..6b20cf5f 100644 --- a/test/daily/TestThermo46.F90 +++ b/test/daily/TestThermo46.F90 @@ -71,7 +71,7 @@ program TestThermo46 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo47.F90 b/test/daily/TestThermo47.F90 index 2e0498fe..77d72151 100644 --- a/test/daily/TestThermo47.F90 +++ b/test/daily/TestThermo47.F90 @@ -75,7 +75,7 @@ program TestThermo47 call HeatCapacity !Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo48.F90 b/test/daily/TestThermo48.F90 index 509f80c7..366d72c3 100644 --- a/test/daily/TestThermo48.F90 +++ b/test/daily/TestThermo48.F90 @@ -75,7 +75,7 @@ program TestThermo48 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo49.F90 b/test/daily/TestThermo49.F90 index 6396e4e0..fefa836c 100644 --- a/test/daily/TestThermo49.F90 +++ b/test/daily/TestThermo49.F90 @@ -73,7 +73,7 @@ program TestThermo49 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo50.F90 b/test/daily/TestThermo50.F90 index d491ba80..430b05f3 100644 --- a/test/daily/TestThermo50.F90 +++ b/test/daily/TestThermo50.F90 @@ -75,7 +75,7 @@ program TestThermo50 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo51.F90 b/test/daily/TestThermo51.F90 index eaf21f03..aaba7e9e 100644 --- a/test/daily/TestThermo51.F90 +++ b/test/daily/TestThermo51.F90 @@ -73,7 +73,7 @@ program TestThermo51 call Thermochimica call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo52.F90 b/test/daily/TestThermo52.F90 index 90619bec..bb5d9aae 100644 --- a/test/daily/TestThermo52.F90 +++ b/test/daily/TestThermo52.F90 @@ -72,7 +72,7 @@ program TestThermo52 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo54.F90 b/test/daily/TestThermo54.F90 index 6c3b79f8..15b7a510 100644 --- a/test/daily/TestThermo54.F90 +++ b/test/daily/TestThermo54.F90 @@ -74,7 +74,7 @@ program TestThermo54 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo55.F90 b/test/daily/TestThermo55.F90 index 0bffdbea..afebdf9c 100644 --- a/test/daily/TestThermo55.F90 +++ b/test/daily/TestThermo55.F90 @@ -74,7 +74,7 @@ program TestThermo55 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo56.F90 b/test/daily/TestThermo56.F90 index edb7b7cc..e4957c55 100644 --- a/test/daily/TestThermo56.F90 +++ b/test/daily/TestThermo56.F90 @@ -74,7 +74,7 @@ program TestThermo56 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo57.F90 b/test/daily/TestThermo57.F90 index 887d2bfc..ed687101 100644 --- a/test/daily/TestThermo57.F90 +++ b/test/daily/TestThermo57.F90 @@ -74,7 +74,7 @@ program TestThermo57 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo58.F90 b/test/daily/TestThermo58.F90 index a1197c09..8a87d77d 100644 --- a/test/daily/TestThermo58.F90 +++ b/test/daily/TestThermo58.F90 @@ -73,7 +73,7 @@ program TestThermo58 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo59.F90 b/test/daily/TestThermo59.F90 index d6cc22d3..0266b6dd 100644 --- a/test/daily/TestThermo59.F90 +++ b/test/daily/TestThermo59.F90 @@ -76,7 +76,7 @@ program TestThermo59 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo60.F90 b/test/daily/TestThermo60.F90 index 18836dc7..47b4da35 100644 --- a/test/daily/TestThermo60.F90 +++ b/test/daily/TestThermo60.F90 @@ -73,7 +73,7 @@ program TestThermo60 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo61.F90 b/test/daily/TestThermo61.F90 index 3276f34d..a19263f4 100644 --- a/test/daily/TestThermo61.F90 +++ b/test/daily/TestThermo61.F90 @@ -78,7 +78,7 @@ program TestThermo61 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo62.F90 b/test/daily/TestThermo62.F90 index 79bfbd12..7494b54a 100644 --- a/test/daily/TestThermo62.F90 +++ b/test/daily/TestThermo62.F90 @@ -78,7 +78,7 @@ program TestThermo62 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo63.F90 b/test/daily/TestThermo63.F90 index 8356101a..24088824 100644 --- a/test/daily/TestThermo63.F90 +++ b/test/daily/TestThermo63.F90 @@ -77,7 +77,7 @@ program TestThermo63 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestThermo64.F90 b/test/daily/TestThermo64.F90 index bea579e3..ac5cdbf3 100644 --- a/test/daily/TestThermo64.F90 +++ b/test/daily/TestThermo64.F90 @@ -70,7 +70,7 @@ program TestThermo64 call HeatCapacity ! Execute the test for mole fractions, gibbs energy and heat capacity - call testMolFraction(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) + call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) ! Deallocation deallocate(iSpeciesIndexTest, dMolFractionTest) diff --git a/test/daily/TestTransition1.F90 b/test/daily/TestTransition01.F90 similarity index 100% rename from test/daily/TestTransition1.F90 rename to test/daily/TestTransition01.F90 diff --git a/test/daily/TestTransition2.F90 b/test/daily/TestTransition02.F90 similarity index 100% rename from test/daily/TestTransition2.F90 rename to test/daily/TestTransition02.F90 diff --git a/test/daily/TestTransition3.F90 b/test/daily/TestTransition03.F90 similarity index 100% rename from test/daily/TestTransition3.F90 rename to test/daily/TestTransition03.F90 diff --git a/test/daily/TestTransition4.F90 b/test/daily/TestTransition04.F90 similarity index 100% rename from test/daily/TestTransition4.F90 rename to test/daily/TestTransition04.F90 diff --git a/test/daily/TestTransition5.F90 b/test/daily/TestTransition05.F90 similarity index 100% rename from test/daily/TestTransition5.F90 rename to test/daily/TestTransition05.F90 diff --git a/test/daily/TestTransition6.F90 b/test/daily/TestTransition6.F90 deleted file mode 100644 index 0f385341..00000000 --- a/test/daily/TestTransition6.F90 +++ /dev/null @@ -1,78 +0,0 @@ - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestTransition6.F90 - !> \brief Testing phase transition subroutine - !> \author A.E.F. Fitzsimmons - ! - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/26/2024 A.E.F. Fitzsimmons Original Code - ! - ! Purpose: - ! ======== - !> \details Testing new Transition function - !! - ! - !------------------------------------------------------------------------------------------------------------- -program TestTransition6 - - USE ModuleThermoIO - USE ModuleThermo - USE ModuleTesting - - implicit none - - ! Init variables - real(8) :: dTempMin, dTempMax, dTempTolerance - real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp - integer :: iTransitions, iTestTransitions - logical :: lPass - - dTempTolerance = 1D-1 - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CsTe-1.dat' - - ! Specify values: - dPressure = 1D0 - dTemperature = 1000 - dElementMass(52) = 0.25 ! Te - dElementMass(55) = 0.75 ! Cs - - ! Init test values - dTempMin = 300 - dTempMax = 1500 - iTestTransitions = 3 - dTestTransitionTemp = [301.33D0, 850.82D0, 1027.51D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] - lPass = .FALSE. - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - call Thermochimica - - ! Test call - call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) - call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) - - - if (lPass) then - ! The test passed: - print *, 'TestTransition6: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestTransition6: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestTransition6 \ No newline at end of file From cc9f63d093dddb1a8195a2bcf84c8acd1d180a7a Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Tue, 24 Jun 2025 09:13:12 -0400 Subject: [PATCH 26/34] Failure return --- src/module/ModuleTesting.f90 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 9728a6d7..3f27986d 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -47,11 +47,20 @@ subroutine testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpecie dToleranceCheck = 1D-3 !Test Gibbs and HeatCapacity - if (DABS((dGibbsEnergySys - dGibbsCheck)/dGibbsCheck) >= dToleranceCheck) return - if (DABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck >= dToleranceCheck) return - + if (DABS((dGibbsEnergySys - dGibbsCheck)/dGibbsCheck) >= dToleranceCheck) then + print *, "Gibbs Energy Test Failed" + return + elseif (DABS(dHeatCapacity - dHeatCapacityCheck)/dHeatCapacityCheck >= dToleranceCheck) then + print *, "Heat Capacity Test Failed" + return + end if + + !Test Mole Fraction do i = 1, nSpeciesTest - if (DABS(dMolFraction(iSpeciesIndexTest(i)) - dMolFractionTest(i))/dMolFractionTest(i) >= dToleranceCheck) return + if (DABS(dMolFraction(iSpeciesIndexTest(i)) - dMolFractionTest(i))/dMolFractionTest(i) >= dToleranceCheck) then + print *, "Mole fraction Test Failed" + return + end if end do lPass = .TRUE. From 53d214e4969fca50523b4d48aaf7ce1fe1e7cb15 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 14 Jul 2025 09:13:53 -0400 Subject: [PATCH 27/34] runtest fix --- run_tests | 4 +- test/daily/TestThermo63.F90 | 99 ------------------------------------- test/daily/TestThermo64.F90 | 92 ---------------------------------- 3 files changed, 2 insertions(+), 193 deletions(-) delete mode 100644 test/daily/TestThermo63.F90 delete mode 100644 test/daily/TestThermo64.F90 diff --git a/run_tests b/run_tests index 75f311ac..f00c86b1 100755 --- a/run_tests +++ b/run_tests @@ -18,8 +18,8 @@ tests=( TestThermo46 TestThermo47 TestThermo48 TestThermo49 TestThermo50 TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 - TestThermo61 TestThermo62 TestThermo63 TestThermo64 TestTransition01 - TestTransition02 TestTransition03 TestTransition04 TestTransition05 + TestThermo61 TestThermo62 TestTransition01 TestTransition02 + TestTransition03 TestTransition04 TestTransition05 ) ./TestThermo12 > test12out.txt diff --git a/test/daily/TestThermo63.F90 b/test/daily/TestThermo63.F90 deleted file mode 100644 index 24088824..00000000 --- a/test/daily/TestThermo63.F90 +++ /dev/null @@ -1,99 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo89.F90 - !> \brief SUBM worst case scenario. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/11/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F. Fitzsimmons Naming convention change - ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results a SUBM phase where everything and the kitchen sink is thrown in. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo63 - - USE ModuleThermoIO - USE ModuleThermo - USE ModuleTesting - - implicit none - - ! Init variables - logical :: lPass - real(8) :: dGibbsCheck, dHeatCapacityCheck - integer :: nSpeciesTest - integer, allocatable :: iSpeciesIndexTest(:) - real(8), allocatable :: dMolFractionTest(:) - - ! Specify units: - cInputUnitTemperature = 'K' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'ZrFeKClNaFOLi.dat' - - ! Specify values: - dTemperature = 1000 - dPressure = 1.0D0 - dElementMass = 0D0 - - dElementMass(3) = 1D0 ! Li - dElementMass(11) = 2D0 ! Na - dElementMass(17) = 2D0 ! Cl - dElementMass(9) = 12D0 ! F - dElementMass(26) = 3D0 ! Fe - dElementMass(8) = 11D0 ! O - dElementMass(19) = 4D0 ! K - dElementMass(40) = 5D0 ! Zr - - ! Init test values - dGibbsCheck = -7.61628D05 - dHeatCapacityCheck = 1198.68 - nSpeciesTest = 7 - iSpeciesIndexTest = [1, 2, 3, 7, 8, 10, 11] !Pd, Pd, Ru - dMolFractionTest = [2.7906D-02, 4.6511D-03, 5.5813D-02, 8.3720D-02, 1.3953D-02, 1.1162D-01, 1.8604D-02] - lPass = .FALSE. - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - call HeatCapacity - - ! Execute the test for mole fractions, gibbs energy and heat capacity - call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - - ! Deallocation - deallocate(iSpeciesIndexTest, dMolFractionTest) - - if (lPass) then - ! The test passed: - print *, 'TestThermo63: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo63: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo63 diff --git a/test/daily/TestThermo64.F90 b/test/daily/TestThermo64.F90 deleted file mode 100644 index ac5cdbf3..00000000 --- a/test/daily/TestThermo64.F90 +++ /dev/null @@ -1,92 +0,0 @@ - - !------------------------------------------------------------------------------------------------------------- - ! - !> \file TestThermo89.F90 - !> \brief SUBM worst case scenario. - !> \author M.H.A. Piro, M. Poschmann - ! - ! DISCLAIMER - ! ========== - ! All of the programming herein is original unless otherwise specified. Details of contributions to the - ! programming are given below. - ! - ! Revisions: - ! ========== - ! Date Programmer Description of change - ! ---- ---------- --------------------- - ! 05/14/2013 M.H.A. Piro Original code - ! 11/11/2022 M. Poschmann SUBM Test Case - ! 04/17/2024 A.E.F Fitzsimmons CsI data bug test - ! 05/06/2024 A.E.F Fitzsimmons Naming convention update - ! 10/28/2024 A.E.F. Fitzsimmons SQA Remodle - ! - ! Purpose: - ! ======== - !> \details The purpose of this application test is to ensure that Thermochimica computes the correct - !! results of CsI at low pressure. This test is consistent with the test in the tutorial manual. - ! - !------------------------------------------------------------------------------------------------------------- - -program TestThermo64 - - USE ModuleThermoIO - USE ModuleThermo - USE ModuleTesting - - implicit none - - ! Init variables - logical :: lPass - real(8) :: dGibbsCheck, dHeatCapacityCheck - integer :: nSpeciesTest - integer, allocatable :: iSpeciesIndexTest(:) - real(8), allocatable :: dMolFractionTest(:) - - ! Specify units: - cInputUnitTemperature = 'C' - cInputUnitPressure = 'atm' - cInputUnitMass = 'moles' - cThermoFileName = DATA_DIRECTORY // 'CsI-Pham.dat' - - ! Specify values: - dTemperature = 400 - dPressure = 1D-5 - dElementMass(53) = 1D0 ! I - dElementMass(55) = 1D0 ! cs - - ! Init test values - dGibbsCheck = -4.41869D05 - dHeatCapacityCheck = 69.8320 - nSpeciesTest = 4 - iSpeciesIndexTest = [1, 3, 5, 6] !Cs, I, CsI, Cs2I2 - dMolFractionTest = [4.2170D-18, 1.0711D-02, 2.5818D-03, 1.9349D-05] - lPass = .FALSE. - - ! Parse the ChemSage data-file: - call ParseCSDataFile(cThermoFileName) - - ! Call Thermochimica: - call Thermochimica - call HeatCapacity - - ! Execute the test for mole fractions, gibbs energy and heat capacity - call testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) - - ! Deallocation - deallocate(iSpeciesIndexTest, dMolFractionTest) - - if (lPass) then - ! The test passed: - print *, 'TestThermo64: PASS' - ! Reset Thermochimica: - call ResetThermo - call EXIT(0) - else - ! The test failed. - print *, 'TestThermo64: FAIL <---' - ! Reset Thermochimica: - call ResetThermo - call EXIT(1) - end if - -end program TestThermo64 From 90a51ff85adc7493f0371b911b7cf2b09d9152d3 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 14 Jul 2025 09:38:21 -0400 Subject: [PATCH 28/34] Added Validation Parser --- run_tests | 2 +- src/module/ModuleTesting.f90 | 4 + src/parser/ParseValidation.f90 | 139 ++++++++++++++++++++++++++ test/daily/TestTransition1.F90 | 77 ++++++++++++++ test/daily/TestValidationParser01.F90 | 56 +++++++++++ 5 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 src/parser/ParseValidation.f90 create mode 100644 test/daily/TestTransition1.F90 create mode 100644 test/daily/TestValidationParser01.F90 diff --git a/run_tests b/run_tests index f00c86b1..c4619f39 100755 --- a/run_tests +++ b/run_tests @@ -19,7 +19,7 @@ tests=( TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestTransition01 TestTransition02 - TestTransition03 TestTransition04 TestTransition05 + TestTransition03 TestTransition04 TestTransition05 ValidationParserTest01 ) ./TestThermo12 > test12out.txt diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 3f27986d..d85c7a35 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -30,6 +30,10 @@ module ModuleTesting implicit none + SAVE + + integer :: nMaxPhaseTransition = 15 + contains subroutine testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpeciesIndexTest, dMolFractionTest, lPass) diff --git a/src/parser/ParseValidation.f90 b/src/parser/ParseValidation.f90 new file mode 100644 index 00000000..57644a26 --- /dev/null +++ b/src/parser/ParseValidation.f90 @@ -0,0 +1,139 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ParseValidation.F90 + !> \brief Parse Validation data and run phase transition tests. + !> \author A.E.F. Fitzsimmons + ! + !> \todo Multiple tolerance check + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 06/17/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details + !! + ! + !------------------------------------------------------------------------------------------------------------- + +subroutine ParseValidation(cTestCSV,lPass) + USE ModuleThermo + USE ModuleThermoIO + USE ModuleTesting + + implicit none + + character(*), intent(in):: cTestCSV + + integer :: INFO, nElementTest, nParamTest, nTestNumber, iTransitions, i, j, iPos, iPos2, iTransCount + integer, allocatable :: iElementIndex(:) + real(8) :: dTempMax, dTempMin, dTempTolerance + real(8), dimension(nMaxPhaseTransition) :: dPhaseTransitionTemp, dTestTransitionTemp, dTestTolerance + real(8), dimension(2 * nMaxPhaseTransition) :: dTransition + real(8), allocatable :: dMass(:) + character(1024) :: cTestCSVLen + character(250) :: cLines + character(3), dimension(0:nElementsPT):: cElementNamePT + character(3), allocatable :: cTestElement(:) + logical, intent(out) :: lPass + + ! Initialize variables: + INFOThermo = 0 + INFO = 0 + nTestNumber = 0 + iTransitions = 0 + iTransCount = 0 + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + dTestTransitionTemp = 0D0 + dTestTolerance = 0D0 + dTransition = 0D0 + dTempTolerance = 1D0 + cTestCSVLen = cTestCSV(1:min(1024,len(cTestCSV))) + + ! Attempt to open the ChemSage datafile: + open (UNIT = 2, FILE = cTestCSVLen, STATUS = 'old', ACTION = 'read', IOSTAT = INFO) + + ! Record an error if there are issues opening the data-file: + if (INFO /= 0) then + INFOThermo = 61 + return + end if + + !Skip Line 1 + read(2, '(A)', IOSTAT = INFO) cLines + + !Read line 2 Get Number of elements and parameters + read(2, *, IOSTAT = INFO) nElementTest, nParamTest + allocate(cTestElement(nElementTest), iElementIndex(nElementTest), dMass(nElementTest)) + nElements = nElementTest + + !Init Arrays + iElementIndex = 0 + dMass = 0D0 + call GetElementName(cElementNamePT) + + !Reading Elements required + read(2, *, IOSTAT = INFO) cTestElement(1:nElementTest) + + !Getting Periodic table index + do j = 1, nElementTest + do i = 1, nElementsPT + if(trim(cTestElement(j)) == trim(cElementNamePT(i))) iElementIndex(j) = i + end do + end do + + !Testing loop + do i = 1, nParamTest + + read (2, *, IOSTAT = INFO) nTestNumber, iTransitions, dMass, dTempMin, dTempMax + backspace(2, IOSTAT = INFO) + read (2, *, IOSTAT = INFO) nTestnumber, iTransitions, dMass, dTempMin, dTempMax, dTransition(1:2 * iTransitions) + + !Minimum temperature is less than 0 + if (dTempMin < 0) then + INFOThermo = 60 + return + endif + + !Set Element mass + do j = 1, nElementTest + dElementMass(iElementIndex(j)) = dMass(j) + end do + + !Seperate dTransition get Temperature and Tolerance + iPos = 1 + iPos2 = 1 + do j = 1, SIZE(dTransition) + if (MOD(j, 2) == 1) then + dTestTransitionTemp(iPos) = dTransition(j) + iPos = iPos + 1 + else + dTestTolerance(iPos2) = dTransition(j) + iPos2 = iPos2 + 1 + end if + end do + + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransCount) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + !Reset test variables + iTransCount = 0 + iPos = 1 + iPos2 = 1 + dPhaseTransitionTemp = 0D0 + dTestTransitionTemp = 0D0 + dTransition = 0D0 + + end do + + deallocate(cTestElement, iElementIndex, dMass) + close (INFO) + +end subroutine ParseValidation + + + diff --git a/test/daily/TestTransition1.F90 b/test/daily/TestTransition1.F90 new file mode 100644 index 00000000..f572580d --- /dev/null +++ b/test/daily/TestTransition1.F90 @@ -0,0 +1,77 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestTransition1.F90 + !> \brief Testing phase transition subroutine + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 05/26/2024 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new Transition function + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestTransition1 + + USE ModuleThermoIO + USE ModuleThermo + USE ModuleTesting + + implicit none + + ! Init variables + real(8) :: dTempMin, dTempMax, dTempTolerance + real(8), dimension(10) :: dPhaseTransitionTemp, dTestTransitionTemp + integer :: iTransitions, iTestTransitions + logical :: lPass + nMaxPhaseTransition = 10 + dTempTolerance = 1D-1 + + ! Specify units: + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + cThermoFileName = DATA_DIRECTORY // 'AlMg-Liang.dat' + + ! Specify values: + dPressure = 1D0 + dTemperature = 1000 + dElementMass(13) = 0.5 ! Al + dElementMass(12) = 0.5 ! Mg + + ! Init test values + dTempMin = 300 + dTempMax = 1000 + iTestTransitions = 4 + dTestTransitionTemp = [523.24D0, 667.39D0, 729.97D0, 735.02D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0] + lPass = .FALSE. + + ! Parse the ChemSage data-file: + call ParseCSDataFile(cThermoFileName) + call Thermochimica + + !Test call + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransitions) + call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + + if (lPass) then + ! The test passed: + print *, 'TestTransition1: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestTransition1: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestTransition1 \ No newline at end of file diff --git a/test/daily/TestValidationParser01.F90 b/test/daily/TestValidationParser01.F90 new file mode 100644 index 00000000..4a7021a9 --- /dev/null +++ b/test/daily/TestValidationParser01.F90 @@ -0,0 +1,56 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/07/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new validation parser, using verification measurements. + !! + ! + !------------------------------------------------------------------------------------------------------------- +program ValidationParserTest01 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'KayeVerification.csv', lPass) + + if (lPass) then + ! The test passed: + print *, 'ValidationParserTest01: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'ValidationParserTest01: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program ValidationParserTest01 From 1a810f496603fe9e0c002abf184b6c299866f3c7 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Thu, 17 Jul 2025 10:14:43 -0400 Subject: [PATCH 29/34] Debug calls and Parse verification --- run_tests | 3 +- src/debug/ThermoDebug.f90 | 16 ++++++++ src/parser/ParseValidation.f90 | 37 +++++++++++++++--- test/daily/TestValidationParser01.F90 | 8 ++-- test/daily/TestValidationParser02.F90 | 56 +++++++++++++++++++++++++++ test/daily/TestValidationParser03.F90 | 56 +++++++++++++++++++++++++++ test/daily/TestValidationParser04.F90 | 56 +++++++++++++++++++++++++++ 7 files changed, 222 insertions(+), 10 deletions(-) create mode 100644 test/daily/TestValidationParser02.F90 create mode 100644 test/daily/TestValidationParser03.F90 create mode 100644 test/daily/TestValidationParser04.F90 diff --git a/run_tests b/run_tests index c4619f39..20876a1a 100755 --- a/run_tests +++ b/run_tests @@ -19,7 +19,8 @@ tests=( TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestTransition01 TestTransition02 - TestTransition03 TestTransition04 TestTransition05 ValidationParserTest01 + TestTransition03 TestTransition04 TestTransition05 TestValidationParser01 + TestValidationParser02 TestValidationParser03 TestValidationParser04 ) ./TestThermo12 > test12out.txt diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index 3a3d9319..d6e46a94 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -171,6 +171,22 @@ subroutine ThermoDEBUG print *, 'DEBUG: No Phase Transitions in given temperature range in PhaseTransition subroutine.' elseif (INFOThermo == 59) then print *, "DEBUG: Phase Transition module needs more than one elements." + elseif (INFOThermo == 60) then + print *, "DEBUG: Error reading validation data." + elseif (INFOThermo == 61) then + print *, "DEBUG: Error reading validation number and elements in CSV." + elseif (INFOThermo == 62) then + print *, "DEBUG: Error reading validation elements." + elseif (INFOThermo == 63) then + print *, "DEBUG: Failed to read validation CSV test entry." + elseif (INFOThermo == 64) then + print *, "DEBUG: Failed to allocate dTransition." + elseif (INFOThermo == 65) then + print *, "DEBUG: Error reading CSV Test Line." + elseif (INFOThermo == 66) then + print *, "DEBUG: Error validation csv unacceptable range" + elseif (INFOThermo == 67) then + print *, "DEBUG: Error validation csv number of elements incorrect" elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 diff --git a/src/parser/ParseValidation.f90 b/src/parser/ParseValidation.f90 index 57644a26..764077a4 100644 --- a/src/parser/ParseValidation.f90 +++ b/src/parser/ParseValidation.f90 @@ -59,7 +59,7 @@ subroutine ParseValidation(cTestCSV,lPass) ! Record an error if there are issues opening the data-file: if (INFO /= 0) then - INFOThermo = 61 + INFOThermo = 60 return end if @@ -68,16 +68,29 @@ subroutine ParseValidation(cTestCSV,lPass) !Read line 2 Get Number of elements and parameters read(2, *, IOSTAT = INFO) nElementTest, nParamTest + if (INFO /= 0) then + INFOThermo = 61 + end if allocate(cTestElement(nElementTest), iElementIndex(nElementTest), dMass(nElementTest)) nElements = nElementTest !Init Arrays iElementIndex = 0 dMass = 0D0 + cTestElement = " " call GetElementName(cElementNamePT) !Reading Elements required read(2, *, IOSTAT = INFO) cTestElement(1:nElementTest) + print *, cTestElement + if (cTestElement(nElementTest) == " ") then + INFOThermo = 67 + return + end if + if (INFO /= 0) then + INFOThermo = 62 + return + end if !Getting Periodic table index do j = 1, nElementTest @@ -90,14 +103,23 @@ subroutine ParseValidation(cTestCSV,lPass) do i = 1, nParamTest read (2, *, IOSTAT = INFO) nTestNumber, iTransitions, dMass, dTempMin, dTempMax + if (INFO /= 0) then + INFOThermo = 63 + return + end if + backspace(2, IOSTAT = INFO) read (2, *, IOSTAT = INFO) nTestnumber, iTransitions, dMass, dTempMin, dTempMax, dTransition(1:2 * iTransitions) - + if (INFO /= 0) then + INFOThermo = 64 + return + end if + !Minimum temperature is less than 0 - if (dTempMin < 0) then - INFOThermo = 60 + if (dTempMin < 0 .OR. dTempMin > dTempMax) then + INFOThermo = 66 return - endif + end if !Set Element mass do j = 1, nElementTest @@ -120,6 +142,11 @@ subroutine ParseValidation(cTestCSV,lPass) call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransCount) call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) + if(.NOT. lPass) then + print *, "Test Number: ", nTestNumber, " failed." + EXIT + end if + !Reset test variables iTransCount = 0 iPos = 1 diff --git a/test/daily/TestValidationParser01.F90 b/test/daily/TestValidationParser01.F90 index 4a7021a9..6c6ae974 100644 --- a/test/daily/TestValidationParser01.F90 +++ b/test/daily/TestValidationParser01.F90 @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program ValidationParserTest01 +program TestValidationParser01 USE ModuleTesting USE ModuleThermoIO @@ -41,16 +41,16 @@ program ValidationParserTest01 if (lPass) then ! The test passed: - print *, 'ValidationParserTest01: PASS' + print *, 'TestValidationParser01: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'ValidationParserTest01: FAIL <---' + print *, 'TestValidationParser01: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program ValidationParserTest01 +end program TestValidationParser01 diff --git a/test/daily/TestValidationParser02.F90 b/test/daily/TestValidationParser02.F90 new file mode 100644 index 00000000..afe890ca --- /dev/null +++ b/test/daily/TestValidationParser02.F90 @@ -0,0 +1,56 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/07/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new validation parser, using verification measurements. + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidationParser02 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'Kaye_Mo-Ru.csv', lPass) + + if (lPass) then + ! The test passed: + print *, 'TestValidationParser02: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidationParser02: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidationParser02 diff --git a/test/daily/TestValidationParser03.F90 b/test/daily/TestValidationParser03.F90 new file mode 100644 index 00000000..782ed532 --- /dev/null +++ b/test/daily/TestValidationParser03.F90 @@ -0,0 +1,56 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/14/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Testing new validation parser, using verification measurements. + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidationParser03 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'Kaye_Pd-Tc.csv', lPass) + + if (lPass) then + ! The test passed: + print *, 'TestValidationParser03: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidationParser03: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidationParser03 diff --git a/test/daily/TestValidationParser04.F90 b/test/daily/TestValidationParser04.F90 new file mode 100644 index 00000000..5720fa60 --- /dev/null +++ b/test/daily/TestValidationParser04.F90 @@ -0,0 +1,56 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/15/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Debug call test to many elements. + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidationParser04 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'IO_CSV-01.csv', lPass) + + if (lPass) then + ! The test passed: + print *, 'TestValidationParser04: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidationParser04: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidationParser04 From 3b525aa9bd15dbb8a82c168efe17aaf3ade7c16c Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 21 Jul 2025 12:30:15 -0400 Subject: [PATCH 30/34] ParseValidation IO tests --- .gitignore | 1 - run_tests | 3 +- src/debug/ThermoDebug.f90 | 10 +++-- src/parser/ParseValidation.f90 | 32 ++++++++------- test/daily/TestValidationParser04.F90 | 5 ++- test/daily/TestValidationParser05.F90 | 57 +++++++++++++++++++++++++++ test/daily/TestValidationParser06.F90 | 57 +++++++++++++++++++++++++++ 7 files changed, 144 insertions(+), 21 deletions(-) create mode 100644 test/daily/TestValidationParser05.F90 create mode 100644 test/daily/TestValidationParser06.F90 diff --git a/.gitignore b/.gitignore index 4a05d1c8..bb57ec20 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ test/doc/ *.so *.0 *.lai -*.csv *.pkl # ignore vscode cache diff --git a/run_tests b/run_tests index 20876a1a..f7ba7148 100755 --- a/run_tests +++ b/run_tests @@ -20,7 +20,8 @@ tests=( TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestTransition01 TestTransition02 TestTransition03 TestTransition04 TestTransition05 TestValidationParser01 - TestValidationParser02 TestValidationParser03 TestValidationParser04 + TestValidationParser02 TestValidationParser04 + TestValidationParser05 TestValidationParser06 ) ./TestThermo12 > test12out.txt diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index d6e46a94..48b5c6e6 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -178,15 +178,19 @@ subroutine ThermoDEBUG elseif (INFOThermo == 62) then print *, "DEBUG: Error reading validation elements." elseif (INFOThermo == 63) then - print *, "DEBUG: Failed to read validation CSV test entry." + print *, "DEBUG: Error number of validation tests." elseif (INFOThermo == 64) then print *, "DEBUG: Failed to allocate dTransition." elseif (INFOThermo == 65) then - print *, "DEBUG: Error reading CSV Test Line." + print *, "DEBUG: Error reading CSV validation test Line." elseif (INFOThermo == 66) then print *, "DEBUG: Error validation csv unacceptable range" elseif (INFOThermo == 67) then - print *, "DEBUG: Error validation csv number of elements incorrect" + print *, "DEBUG: Error validation csv number of elements incorrect." + elseif (INFOThermo == 68) then + print *, "DEBUG: Error Validation CSV contains too many tests." + elseif (INFOThermo == 69) then + print *, "DEBUG: Error Validation CSV incorrect number of transitions ." elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 diff --git a/src/parser/ParseValidation.f90 b/src/parser/ParseValidation.f90 index 764077a4..7e41086f 100644 --- a/src/parser/ParseValidation.f90 +++ b/src/parser/ParseValidation.f90 @@ -70,6 +70,7 @@ subroutine ParseValidation(cTestCSV,lPass) read(2, *, IOSTAT = INFO) nElementTest, nParamTest if (INFO /= 0) then INFOThermo = 61 + return end if allocate(cTestElement(nElementTest), iElementIndex(nElementTest), dMass(nElementTest)) nElements = nElementTest @@ -82,12 +83,11 @@ subroutine ParseValidation(cTestCSV,lPass) !Reading Elements required read(2, *, IOSTAT = INFO) cTestElement(1:nElementTest) - print *, cTestElement + ! Check for too many tests if (cTestElement(nElementTest) == " ") then INFOThermo = 67 - return - end if - if (INFO /= 0) then + return + elseif (INFO /= 0) then INFOThermo = 62 return end if @@ -101,24 +101,31 @@ subroutine ParseValidation(cTestCSV,lPass) !Testing loop do i = 1, nParamTest - + + if (i > nParamTest) then + INFOThermo = 68 + return + end if + read (2, *, IOSTAT = INFO) nTestNumber, iTransitions, dMass, dTempMin, dTempMax if (INFO /= 0) then INFOThermo = 63 return end if - + backspace(2, IOSTAT = INFO) read (2, *, IOSTAT = INFO) nTestnumber, iTransitions, dMass, dTempMin, dTempMax, dTransition(1:2 * iTransitions) if (INFO /= 0) then INFOThermo = 64 return - end if - - !Minimum temperature is less than 0 - if (dTempMin < 0 .OR. dTempMin > dTempMax) then + elseif (dTempMin < 0 .OR. dTempMin > dTempMax) then + !Minimum temperature is less than 0 or wrong min and max INFOThermo = 66 return + elseif (dTransition(2 * iTransitions) == 0) then + ! Missing transition value + INFOThermo = 69 + return end if !Set Element mass @@ -160,7 +167,4 @@ subroutine ParseValidation(cTestCSV,lPass) deallocate(cTestElement, iElementIndex, dMass) close (INFO) -end subroutine ParseValidation - - - +end subroutine ParseValidation \ No newline at end of file diff --git a/test/daily/TestValidationParser04.F90 b/test/daily/TestValidationParser04.F90 index 5720fa60..4599f2c0 100644 --- a/test/daily/TestValidationParser04.F90 +++ b/test/daily/TestValidationParser04.F90 @@ -38,8 +38,9 @@ program TestValidationParser04 call ParseCSDataFile(cThermoFileName) call ParseValidation(DATA_DIRECTORY // 'IO_CSV-01.csv', lPass) - - if (lPass) then + + ! Test for wrong number of elements + if (INFOThermo == 67) then ! The test passed: print *, 'TestValidationParser04: PASS' ! Reset Thermochimica: diff --git a/test/daily/TestValidationParser05.F90 b/test/daily/TestValidationParser05.F90 new file mode 100644 index 00000000..8c1d9621 --- /dev/null +++ b/test/daily/TestValidationParser05.F90 @@ -0,0 +1,57 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/15/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Debug call test to many elements. + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidationParser05 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'IO_CSV-02.csv', lPass) + + ! Too size of test number check + if (INFOThermo == 63) then + ! The test passed: + print *, 'TestValidationParser05: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidationParser05: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidationParser05 diff --git a/test/daily/TestValidationParser06.F90 b/test/daily/TestValidationParser06.F90 new file mode 100644 index 00000000..4f971c56 --- /dev/null +++ b/test/daily/TestValidationParser06.F90 @@ -0,0 +1,57 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file ValidationParserTest01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/15/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Debug call test missing range temperature + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidationParser06 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseValidation(DATA_DIRECTORY // 'IO_CSV-03.csv', lPass) + + ! Test for wrong number of elements + if (INFOThermo == 69) then + ! The test passed: + print *, 'TestValidationParser06: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidationParser06: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidationParser06 From 8f279ae203077de32c0f16724232fb07156d77af Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Mon, 28 Jul 2025 14:40:49 -0400 Subject: [PATCH 31/34] new test folders --- .gitignore | 1 + Makefile | 49 ++++++++++++++++++- src/module/ModuleTesting.f90 | 3 +- .../TestTransition01.F90 | 0 .../TestTransition02.F90 | 0 .../TestTransition03.F90 | 0 .../TestTransition04.F90 | 0 .../TestTransition05.F90 | 0 .../TestTransition06.F90} | 0 .../TestValidationParser01.F90 | 0 .../TestValidationParser02.F90 | 0 .../TestValidationParser03.F90 | 0 .../TestValidationParser04.F90 | 0 .../TestValidationParser05.F90 | 0 .../TestValidationParser06.F90 | 0 15 files changed, 49 insertions(+), 4 deletions(-) rename test/{daily => regression}/TestTransition01.F90 (100%) rename test/{daily => regression}/TestTransition02.F90 (100%) rename test/{daily => regression}/TestTransition03.F90 (100%) rename test/{daily => regression}/TestTransition04.F90 (100%) rename test/{daily => regression}/TestTransition05.F90 (100%) rename test/{daily/TestTransition1.F90 => regression/TestTransition06.F90} (100%) rename test/{daily => validation}/TestValidationParser01.F90 (100%) rename test/{daily => validation}/TestValidationParser02.F90 (100%) rename test/{daily => validation}/TestValidationParser03.F90 (100%) rename test/{daily => validation}/TestValidationParser04.F90 (100%) rename test/{daily => validation}/TestValidationParser05.F90 (100%) rename test/{daily => validation}/TestValidationParser06.F90 (100%) diff --git a/.gitignore b/.gitignore index bb57ec20..4a05d1c8 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ test/doc/ *.so *.0 *.lai +*.csv *.pkl # ignore vscode cache diff --git a/Makefile b/Makefile index 110f296d..ad6448c4 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,10 @@ AR = ar FC = gfortran CC = g++ FFPE_TRAPS ?= zero -FCFLAGS = -Wall -O2 -ffree-line-length-none -fno-automatic -fbounds-check -ffpe-trap=$(FFPE_TRAPS) -cpp -D"DATA_DIRECTORY='$(DATA_DIR)'" +FCFLAGS = -Wall -O2 -ffree-line-length-none -fno-automatic -fbounds-check \ + -ffpe-trap=$(FFPE_TRAPS) -cpp \ + -D"DATA_DIRECTORY='$(DATA_DIR)'" \ + -D"DATA_DIRECTORY2='$(DATA_DIR2)'" CCFLAGS = -std=gnu++17 UNAME_S := $(shell uname -s) @@ -58,10 +61,13 @@ EXE_DIR = $(SRC_DIR)/exec TST_DIR = test LIB_DIR = lib DTST_DIR = $(TST_DIR)/daily +DTSTT_DIR = $(TST_DIR)/regression +DTSVAL_DIR = $(TST_DIR)/validation SHARED_DIR = $(SRC_DIR) SHARED_DIR += $(addprefix $(SRC_DIR)/,$(SRC_SDR)) CURR_DIR = $(shell pwd) DATA_DIR = $(CURR_DIR)/data/ +CSVT_DIR = $(TST_DIR)/csv/ VPATH = $(SHARED_DIR) # Separate modules and non-modules @@ -113,6 +119,22 @@ DTEST_LNK = $(addprefix $(OBJ_DIR)/,$(DTEST_OBJ)) DTST_OBJ = $(basename $(DTEST_SRC)) DTST_BIN = $(addprefix $(BIN_DIR)/,$(DTST_OBJ)) +## =============== +## REGRESSION TESTS +## =============== +RTST_SRC = $(notdir $(wildcard $(DTSTT_DIR)/*.F90)) +RTST_OBJ = $(RTST_SRC:.F90=.o) +RTST_LNK = $(addprefix $(OBJ_DIR)/,$(RTST_OBJ)) +RTST_BIN = $(addprefix $(BIN_DIR)/,$(basename $(RTST_SRC))) + +## =============== +## VALIDATION TESTS +## =============== +VTST_SRC = $(notdir $(wildcard $(DTSVAL_DIR)/*.F90)) +VTST_OBJ = $(VTST_SRC:.F90=.o) +VTST_LNK = $(addprefix $(OBJ_DIR)/,$(VTST_OBJ)) +VTST_BIN = $(addprefix $(BIN_DIR)/,$(basename $(VTST_SRC))) + ## ======= ## COMPILE ## ======= @@ -222,6 +244,7 @@ doctest: cleandoc: rm -r -f $(DOC_DIR)/html; rm -r -f $(TEX_DIR); rm -r -f $(TST_DIR)/$(DOC_DIR)/html; rm -r -f $(TST_DIR)/$(TEX_DIR); rm -r -f $(DOC_DIR)/$(TST_DIR) + ## =========== ## DAILY TESTS ## =========== @@ -230,10 +253,32 @@ dailytest: $(DTEST_LNK) $(SHARED_LNK) $(MODS_LNK) $(DTST_BIN) $(OBJ_DIR)/%.o: $(DTST_DIR)/%.F90 $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ +## =========== +## REGRESSION +## =========== +regressiontest: $(RTST_LNK) $(SHARED_LNK) $(MODS_LNK) $(RTST_BIN) + +$(RTST_LNK): $(OBJ_DIR)/%.o: $(DTSTT_DIR)/%.F90 + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ + +$(RTST_BIN): $(BIN_DIR)/%: $(OBJ_DIR)/%.o $(SHARED_LNK) + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) $(LDFLAGS) -o $@ $< $(SHARED_LNK) $(LDLOC) + +## =========== +## VALIDATION +## =========== +validationtest: $(VTST_LNK) $(SHARED_LNK) $(MODS_LNK) $(VTST_BIN) + +$(VTST_LNK): $(OBJ_DIR)/%.o: $(DTSVAL_DIR)/%.F90 + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) -c $< -o $@ + +$(VTST_BIN): $(BIN_DIR)/%: $(OBJ_DIR)/%.o $(SHARED_LNK) + $(FC) -I$(OBJ_DIR) -J$(OBJ_DIR) $(FCFLAGS) $(LDFLAGS) -o $@ $< $(SHARED_LNK) $(LDLOC) + ## =========== ## ALL TESTS: ## =========== -test: all dailytest +test: all dailytest regressiontest validationtest ## =========== ## DEBUG: diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index d85c7a35..b53fea53 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -83,8 +83,7 @@ end subroutine printMolFractions subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dTolerance, lPass) implicit none - real(8), intent(in) :: dPhaseTransitionTemp(:) - real(8), intent(in) :: dTestTransitionTemp(:) + real(8), intent(in) :: dPhaseTransitionTemp(:), dTestTransitionTemp(:) real(8), intent(in) :: dTolerance logical, intent(out) :: lPass integer :: i, n diff --git a/test/daily/TestTransition01.F90 b/test/regression/TestTransition01.F90 similarity index 100% rename from test/daily/TestTransition01.F90 rename to test/regression/TestTransition01.F90 diff --git a/test/daily/TestTransition02.F90 b/test/regression/TestTransition02.F90 similarity index 100% rename from test/daily/TestTransition02.F90 rename to test/regression/TestTransition02.F90 diff --git a/test/daily/TestTransition03.F90 b/test/regression/TestTransition03.F90 similarity index 100% rename from test/daily/TestTransition03.F90 rename to test/regression/TestTransition03.F90 diff --git a/test/daily/TestTransition04.F90 b/test/regression/TestTransition04.F90 similarity index 100% rename from test/daily/TestTransition04.F90 rename to test/regression/TestTransition04.F90 diff --git a/test/daily/TestTransition05.F90 b/test/regression/TestTransition05.F90 similarity index 100% rename from test/daily/TestTransition05.F90 rename to test/regression/TestTransition05.F90 diff --git a/test/daily/TestTransition1.F90 b/test/regression/TestTransition06.F90 similarity index 100% rename from test/daily/TestTransition1.F90 rename to test/regression/TestTransition06.F90 diff --git a/test/daily/TestValidationParser01.F90 b/test/validation/TestValidationParser01.F90 similarity index 100% rename from test/daily/TestValidationParser01.F90 rename to test/validation/TestValidationParser01.F90 diff --git a/test/daily/TestValidationParser02.F90 b/test/validation/TestValidationParser02.F90 similarity index 100% rename from test/daily/TestValidationParser02.F90 rename to test/validation/TestValidationParser02.F90 diff --git a/test/daily/TestValidationParser03.F90 b/test/validation/TestValidationParser03.F90 similarity index 100% rename from test/daily/TestValidationParser03.F90 rename to test/validation/TestValidationParser03.F90 diff --git a/test/daily/TestValidationParser04.F90 b/test/validation/TestValidationParser04.F90 similarity index 100% rename from test/daily/TestValidationParser04.F90 rename to test/validation/TestValidationParser04.F90 diff --git a/test/daily/TestValidationParser05.F90 b/test/validation/TestValidationParser05.F90 similarity index 100% rename from test/daily/TestValidationParser05.F90 rename to test/validation/TestValidationParser05.F90 diff --git a/test/daily/TestValidationParser06.F90 b/test/validation/TestValidationParser06.F90 similarity index 100% rename from test/daily/TestValidationParser06.F90 rename to test/validation/TestValidationParser06.F90 From 4f8713d91dbbb25a34de3a9875646fd1ede823b2 Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Wed, 30 Jul 2025 10:44:15 -0400 Subject: [PATCH 32/34] sorting tests --- src/module/ModuleTesting.f90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index b53fea53..739dd039 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -41,8 +41,8 @@ subroutine testProperties(dGibbsCheck, dHeatCapacityCheck, nSpeciesTest, iSpecie !Init variables integer, intent(in):: nSpeciesTest - integer, allocatable, intent(in) :: iSpeciesIndexTest(:) - real(8), allocatable, intent(in) :: dMolFractionTest(:) + integer, intent(in) :: iSpeciesIndexTest(:) + real(8), intent(in) :: dMolFractionTest(:) real(8), intent(in) :: dGibbsCheck, dHeatCapacityCheck logical, intent(out) :: lPass real(8) :: dToleranceCheck @@ -83,7 +83,8 @@ end subroutine printMolFractions subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dTolerance, lPass) implicit none - real(8), intent(in) :: dPhaseTransitionTemp(:), dTestTransitionTemp(:) + real(8), intent(in) :: dPhaseTransitionTemp(:) + real(8), intent(in) :: dTestTransitionTemp(:) real(8), intent(in) :: dTolerance logical, intent(out) :: lPass integer :: i, n From 118bbb187f69e4de341470e265c5a2834b55147e Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Fri, 15 Aug 2025 07:24:52 -0400 Subject: [PATCH 33/34] Transition and validation testing --- .gitignore | 11 +- Makefile | 4 +- data/CaMnS2.dat | 578 ++++++++++++++++++ data/Lipkina_LiFCsF.dat | 162 +++++ data/Scuro_KFCsI.dat | 201 ++++++ data/Scuro_KICsI.dat | 151 +++++ data/Scuro_MgCl2SrCl2.dat | 138 +++++ data/Scuro_NaFCsI.dat | 308 ++++++++++ data/Scuro_NaICsI.dat | 108 ++++ data/Scuro_NaIKI.dat | 120 ++++ run_tests | 5 +- src/debug/ThermoDebug.f90 | 4 +- src/module/ModuleTesting.f90 | 25 +- .../{ParseValidation.f90 => ParseCSVFile.f90} | 30 +- src/postprocess/PhaseTransition.f90 | 2 - test/csv/IO_CSV-01.csv | 7 + test/csv/IO_CSV-02.csv | 5 + test/csv/IO_CSV-03.csv | 8 + test/csv/KayeVerification.csv | 4 + test/csv/Kaye_Mo-Ru.csv | 8 + test/csv/Kaye_Pd-Tc.csv | 7 + test/csv/MSTDBTC_KF-CsI.csv | 21 + test/csv/MSTDBTC_KI-CsI.csv | 24 + test/csv/MSTDBTC_LiF-CsF.csv | 11 + test/csv/MSTDBTC_NaF-CsF.csv | 19 + test/csv/MSTDBTC_NaF-KI.csv | 12 + test/csv/MSTDBTC_NaI-CsI.csv | 12 + test/csv/MSTDBTC_SrCl2-MgCl2.csv | 15 + .../TestParserIO01.F90} | 13 +- .../TestParserIO02.F90} | 11 +- .../TestParserIOC03.F90} | 11 +- test/regression/TestTransition01.F90 | 4 +- test/regression/TestTransition02.F90 | 10 +- test/regression/TestTransition03.F90 | 10 +- test/regression/TestTransition04.F90 | 10 +- test/regression/TestTransition05.F90 | 10 +- test/regression/TestTransition06.F90 | 10 +- .../TestTransition07.F90} | 14 +- .../TestTransition08.F90} | 12 +- .../TestTransition09.F90} | 12 +- test/validation/TestValidation01.F90 | 59 ++ test/validation/TestValidation02.F90 | 59 ++ test/validation/TestValidation03.F90 | 59 ++ test/validation/TestValidation04.F90 | 59 ++ test/validation/TestValidation05.F90 | 59 ++ test/validation/TestValidation06.F90 | 59 ++ test/validation/TestValidation07.F90 | 59 ++ 47 files changed, 2453 insertions(+), 87 deletions(-) create mode 100644 data/CaMnS2.dat create mode 100644 data/Lipkina_LiFCsF.dat create mode 100644 data/Scuro_KFCsI.dat create mode 100644 data/Scuro_KICsI.dat create mode 100644 data/Scuro_MgCl2SrCl2.dat create mode 100644 data/Scuro_NaFCsI.dat create mode 100644 data/Scuro_NaICsI.dat create mode 100644 data/Scuro_NaIKI.dat rename src/parser/{ParseValidation.f90 => ParseCSVFile.f90} (84%) create mode 100644 test/csv/IO_CSV-01.csv create mode 100644 test/csv/IO_CSV-02.csv create mode 100644 test/csv/IO_CSV-03.csv create mode 100644 test/csv/KayeVerification.csv create mode 100644 test/csv/Kaye_Mo-Ru.csv create mode 100644 test/csv/Kaye_Pd-Tc.csv create mode 100644 test/csv/MSTDBTC_KF-CsI.csv create mode 100644 test/csv/MSTDBTC_KI-CsI.csv create mode 100644 test/csv/MSTDBTC_LiF-CsF.csv create mode 100644 test/csv/MSTDBTC_NaF-CsF.csv create mode 100644 test/csv/MSTDBTC_NaF-KI.csv create mode 100644 test/csv/MSTDBTC_NaI-CsI.csv create mode 100644 test/csv/MSTDBTC_SrCl2-MgCl2.csv rename test/{validation/TestValidationParser04.F90 => regression/TestParserIO01.F90} (83%) rename test/{validation/TestValidationParser05.F90 => regression/TestParserIO02.F90} (83%) rename test/{validation/TestValidationParser06.F90 => regression/TestParserIOC03.F90} (83%) rename test/{validation/TestValidationParser01.F90 => regression/TestTransition07.F90} (80%) rename test/{validation/TestValidationParser02.F90 => regression/TestTransition08.F90} (81%) rename test/{validation/TestValidationParser03.F90 => regression/TestTransition09.F90} (81%) create mode 100644 test/validation/TestValidation01.F90 create mode 100644 test/validation/TestValidation02.F90 create mode 100644 test/validation/TestValidation03.F90 create mode 100644 test/validation/TestValidation04.F90 create mode 100644 test/validation/TestValidation05.F90 create mode 100644 test/validation/TestValidation06.F90 create mode 100644 test/validation/TestValidation07.F90 diff --git a/.gitignore b/.gitignore index 4a05d1c8..bc16bd6a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,9 @@ test/doc/ # ignore outputs *.out *.txt -*.dat -*.DAT -*.Dat +#*.dat +#*.DAT +#*.Dat *.json *.pdf *.mod @@ -30,14 +30,15 @@ test/doc/ *.so *.0 *.lai -*.csv +#*.csv *.pkl +Thermo-debugging.F90 # ignore vscode cache .vscode/ # some of these will occasionally require manual override -data/ +#data/ python/ private_tests diff --git a/Makefile b/Makefile index ad6448c4..c0f06e76 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ FFPE_TRAPS ?= zero FCFLAGS = -Wall -O2 -ffree-line-length-none -fno-automatic -fbounds-check \ -ffpe-trap=$(FFPE_TRAPS) -cpp \ -D"DATA_DIRECTORY='$(DATA_DIR)'" \ - -D"DATA_DIRECTORY2='$(DATA_DIR2)'" + -D"CSV_DIRECTORY='$(CSVT_DIR)'" CCFLAGS = -std=gnu++17 UNAME_S := $(shell uname -s) @@ -67,7 +67,7 @@ SHARED_DIR = $(SRC_DIR) SHARED_DIR += $(addprefix $(SRC_DIR)/,$(SRC_SDR)) CURR_DIR = $(shell pwd) DATA_DIR = $(CURR_DIR)/data/ -CSVT_DIR = $(TST_DIR)/csv/ +CSVT_DIR = $(CURR_DIR)/$(TST_DIR)/csv/ VPATH = $(SHARED_DIR) # Separate modules and non-modules diff --git a/data/CaMnS2.dat b/data/CaMnS2.dat new file mode 100644 index 00000000..dd274ed3 --- /dev/null +++ b/data/CaMnS2.dat @@ -0,0 +1,578 @@ + System Mn-Ca-S + 3 8 8 6 6 2 3 3 2 2 11 + Mn Ca S + 54.93804500 40.07800000 32.06500000 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + gas_ideal + IDMX + S + 1 4 0.0 0.0 1.0 + 1000.0000 269797.37 2.2810291 -24.704710 0.37513720E-02 + -.54888717E-06 3450.3165 + 3400.0000 273925.00 -38.495866 -18.817480 -.23003530E-03 + -.11870997E-07 -570436.50 + 6000.0000 257401.53 -.94396727 -23.059310 -.59854600E-06 + 0.20296117E-08 9368165.0 + 6000.0000 265379.01 -10.222888 -22.107643 0.00000000 + 0.00000000 0.00000000 + S2 + 1 4 0.0 0.0 2.0 + 1000.0000 117374.55 2.9862956 -33.096780 -.23254640E-02 + 0.18548017E-06 128593.60 + 3400.0000 117352.44 2.5038326 -33.047440 -.21150245E-02 + 0.91660233E-07 175718.45 + 6000.0000 124361.09 14.518290 -35.192300 -.59309250E-03 + -.75425933E-08 -7484105.0 + 6000.0000 91503.559 95.662335 -44.354394 0.00000000 + 0.00000000 0.00000000 + S3 + 1 3 0.0 0.0 3.0 + 1000.0000 126744.32 83.843568 -51.945610 -.43385055E-02 + 0.66830033E-06 276938.30 + 6000.0000 123958.88 118.72044 -57.162420 -.72907900E-05 + 0.24256683E-09 558805.00 + 6000.0000 124278.52 118.68291 -57.166470 0.00000000 + 0.00000000 0.00000000 + S4 + 1 3 0.0 0.0 4.0 + 900.00000 109847.44 203.90496 -71.679660 -.90411550E-02 + 0.14714888E-05 505278.00 + 6000.0000 104526.08 272.79356 -82.050280 -.18281010E-04 + 0.61980333E-09 1023588.5 + 6000.0000 105085.87 272.89038 -82.078909 0.00000000 + 0.00000000 0.00000000 + S5 + 1 4 0.0 0.0 5.0 + 900.00000 106276.07 170.26340 -73.990220 -.35336475E-01 + 0.57687283E-05 227070.60 + 2800.0000 75139.882 544.89105 -129.53700 0.78790150E-02 + -.43261033E-06 3425257.0 + 6000.0000 114904.75 339.94576 -102.98010 0.22587700E-04 + -.79250250E-09 -7832715.0 + 6000.0000 109811.38 343.60084 -103.31538 0.00000000 + 0.00000000 0.00000000 + S6 + 1 4 0.0 0.0 6.0 + 1600.0000 57214.796 523.24074 -129.18380 -.41523560E-03 + -.42713167E-06 779118.50 + 4200.0000 8925.7246 728.50904 -154.33630 0.20311780E-02 + -.17761350E-07 14908280. + 6000.0000 43158.785 657.51185 -146.39350 0.15928905E-02 + -.33460833E-07 -8046775.0 + 6000.0000 66228.167 562.27284 -134.95340 0.00000000 + 0.00000000 0.00000000 + S7 + 1 3 0.0 0.0 7.0 + 1500.0000 59623.003 634.18253 -152.29390 -.31028470E-02 + 0.36615317E-06 940068.00 + 6000.0000 56671.325 666.28811 -156.95910 -.24414170E-05 + 0.72853200E-10 1284129.5 + 6000.0000 57502.465 665.67057 -156.90132 0.00000000 + 0.00000000 0.00000000 + S8 + 1 5 0.0 0.0 8.0 + 800.00000 45619.029 695.99667 -165.19870 -.10988600E-01 + -.13887568E-05 753634.00 + 1500.0000 22301.585 822.41812 -180.00910 -.20252625E-01 + 0.30454300E-05 4785936.0 + 3900.0000 28125.336 992.47020 -207.71990 0.61396350E-02 + -.25797767E-06 -2943090.0 + 6000.0000 82396.411 766.11213 -179.34390 -.25802190E-03 + 0.51717283E-08 -21845450. + 6000.0000 63012.363 795.14989 -182.53671 0.00000000 + 0.00000000 0.00000000 + IONIC_LIQ + SUBI + Ca+2:S-2 + 1 8 0.0 2.0 2.0 + 388.36000 -822557.41 378.05057 -63.635600 -.59467100E-01 + -.49884000E-06 -495038.00 + 428.15000 -11384921. 237121.44 -39557.428 65.563291 + -.20442833E-01 0.52907985E+09 + 432.25000 -17164546. 640050.45 -115247.23 270.58679 + -.10599467 -267148.00 + 453.15000 -1253371.9 15739.951 -2776.3276 5.6678609 + -.20276067E-02 -267148.00 + 500.00000 -629474.54 -2450.4614 373.28840 -.52859210 + 0.10376700E-03 -16671548. + 717.00000 -625486.52 -2538.8332 387.94104 -.55171374 + 0.11044361E-03 -16864786. + 1115.0000 -824346.21 486.60893 -81.974957 -.45330740E-01 + 0.66766060E-05 -460386.00 + 6000.0001 -845333.80 827.85773 -134.00000 0.00000000 + 0.00000000 0.00000000 + Ca+2:Va + 1 3 0.0 1.0 0.0 + 500.00000 5844.8460 62.483800 -16.313800 -.11104550E-01 + 0.00000000 -133574.00 + 1115.0000 7838.8534 18.297880 -8.9874787 -.22665370E-01 + 0.33383030E-05 -230193.00 + 6000.0001 -2654.9392 188.92228 -35.000000 0.00000000 + 0.00000000 0.00000000 + S + 1 6 0.0 0.0 2.0 + 388.36000 -8003.0980 155.77937 -31.008000 -.37258000E-01 + -.49884000E-06 -227890.00 + 428.15000 -10570367. 236899.17 -39524.800 65.585500 + -.20442833E-01 0.52934700E+09 + 432.25000 -16349991. 639828.16 -115214.60 270.60900 + -.10599467 0.00000000 + 453.15000 -438817.60 15517.680 -2743.7000 5.6900700 + -.20276067E-02 0.00000000 + 717.00000 185079.75 -2672.7326 405.91600 -.50638300 + 0.10376700E-03 -16404400. + 6000.0001 -13779.939 352.70963 -64.000000 0.00000000 + 0.00000000 0.00000000 + Mn+2:S-2 + 1 2 2.0 0.0 2.0 + 6000.0000 -408180.00 450.12000 -94.560000 -.88800000E-02 + 0.00000000 0.00000000 + 6000.0001 -727860.01 1377.1403 -201.12000 0.00000000 + 0.00000000 0.00000000 + Mn+2:Va + 1 2 1.0 0.0 0.0 + 1519.0000 -8115.2800 130.05900 -23.458200 -.73476800E-02 + 0.00000000 69827.000 + 6000.0001 -28348.586 312.03679 -48.000000 0.00000000 + 0.00000000 0.00000000 + S + 1 6 0.0 0.0 2.0 + 388.36000 -8003.0980 155.77937 -31.008000 -.37258000E-01 + -.49884000E-06 -227890.00 + 428.15000 -10570367. 236899.17 -39524.800 65.585500 + -.20442833E-01 0.52934700E+09 + 432.25000 -16349991. 639828.16 -115214.60 270.60900 + -.10599467 0.00000000 + 453.15000 -438817.60 15517.680 -2743.7000 5.6900700 + -.20276067E-02 0.00000000 + 717.00000 185079.75 -2672.7326 405.91600 -.50638300 + 0.10376700E-03 -16404400. + 6000.0001 -13779.939 352.70963 -64.000000 0.00000000 + 0.00000000 0.00000000 + 2 3 + Ca+2 Mn+2 + Va Va S + 1 + 2.00000 2.00000 + 1.00000 1.00000 0.000000 + 1 1 1 2 2 2 + 1 2 3 1 2 3 + 3 + 1 2 3 2 + -65000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -40000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 2 4 1 + 47000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 3 4 1 + 17331.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 3 5 1 + 100000.00 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 2 3 4 2 + 137000.00 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -11400.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 2 3 5 2 + 96626.000 -43.614000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -145966.00 49.429000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + IONIC_LIQ + SUBI + Ca+2:S-2 + 1 8 0.0 2.0 2.0 + 388.36000 -822557.41 378.05057 -63.635600 -.59467100E-01 + -.49884000E-06 -495038.00 + 428.15000 -11384921. 237121.44 -39557.428 65.563291 + -.20442833E-01 0.52907985E+09 + 432.25000 -17164546. 640050.45 -115247.23 270.58679 + -.10599467 -267148.00 + 453.15000 -1253371.9 15739.951 -2776.3276 5.6678609 + -.20276067E-02 -267148.00 + 500.00000 -629474.54 -2450.4614 373.28840 -.52859210 + 0.10376700E-03 -16671548. + 717.00000 -625486.52 -2538.8332 387.94104 -.55171374 + 0.11044361E-03 -16864786. + 1115.0000 -824346.21 486.60893 -81.974957 -.45330740E-01 + 0.66766060E-05 -460386.00 + 6000.0001 -845333.80 827.85773 -134.00000 0.00000000 + 0.00000000 0.00000000 + Ca+2:Va + 1 3 0.0 1.0 0.0 + 500.00000 5844.8460 62.483800 -16.313800 -.11104550E-01 + 0.00000000 -133574.00 + 1115.0000 7838.8534 18.297880 -8.9874787 -.22665370E-01 + 0.33383030E-05 -230193.00 + 6000.0001 -2654.9392 188.92228 -35.000000 0.00000000 + 0.00000000 0.00000000 + S + 1 6 0.0 0.0 2.0 + 388.36000 -8003.0980 155.77937 -31.008000 -.37258000E-01 + -.49884000E-06 -227890.00 + 428.15000 -10570367. 236899.17 -39524.800 65.585500 + -.20442833E-01 0.52934700E+09 + 432.25000 -16349991. 639828.16 -115214.60 270.60900 + -.10599467 0.00000000 + 453.15000 -438817.60 15517.680 -2743.7000 5.6900700 + -.20276067E-02 0.00000000 + 717.00000 185079.75 -2672.7326 405.91600 -.50638300 + 0.10376700E-03 -16404400. + 6000.0001 -13779.939 352.70963 -64.000000 0.00000000 + 0.00000000 0.00000000 + Mn+2:S-2 + 1 2 2.0 0.0 2.0 + 6000.0000 -408180.00 450.12000 -94.560000 -.88800000E-02 + 0.00000000 0.00000000 + 6000.0001 -727860.01 1377.1403 -201.12000 0.00000000 + 0.00000000 0.00000000 + Mn+2:Va + 1 2 1.0 0.0 0.0 + 1519.0000 -8115.2800 130.05900 -23.458200 -.73476800E-02 + 0.00000000 69827.000 + 6000.0001 -28348.586 312.03679 -48.000000 0.00000000 + 0.00000000 0.00000000 + S + 1 6 0.0 0.0 2.0 + 388.36000 -8003.0980 155.77937 -31.008000 -.37258000E-01 + -.49884000E-06 -227890.00 + 428.15000 -10570367. 236899.17 -39524.800 65.585500 + -.20442833E-01 0.52934700E+09 + 432.25000 -16349991. 639828.16 -115214.60 270.60900 + -.10599467 0.00000000 + 453.15000 -438817.60 15517.680 -2743.7000 5.6900700 + -.20276067E-02 0.00000000 + 717.00000 185079.75 -2672.7326 405.91600 -.50638300 + 0.10376700E-03 -16404400. + 6000.0001 -13779.939 352.70963 -64.000000 0.00000000 + 0.00000000 0.00000000 + 2 3 + Ca+2 Mn+2 + Va Va S + 1 + 2.00000 2.00000 + 1.00000 1.00000 0.000000 + 1 1 1 2 2 2 + 1 2 3 1 2 3 + 3 + 1 2 3 2 + -65000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -40000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 2 4 1 + 47000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 3 4 1 + 17331.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 1 3 5 1 + 100000.00 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 2 3 4 2 + 137000.00 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -11400.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3 + 2 3 5 2 + 96626.000 -43.614000 0.00000000 0.00000000 0.00000000 + 0.00000000 + -145966.00 49.429000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + ALABANDITE + SUBL + Ca:S + 1 5 0.0 1.0 1.0 + 368.30000 -486184.02 185.41603 -27.320800 -.37633550E-01 + 0.77543330E-05 -133574.00 + 1115.0000 -487468.84 224.69119 -34.255639 -.21999675E-01 + 0.14025580E-05 -93664.000 + 1300.0000 -589818.20 951.87903 -132.23409 0.12838689E-01 + 0.15875800E-06 18285450. + 2000.0000 -554182.49 784.05205 -114.29225 0.23733814E-01 + -.12438000E-05 18245540. + 2000.0001 -462557.75 221.25465 -40.085421 0.00000000 + 0.00000000 0.00000000 + Mn:S + 1 2 1.0 0.0 1.0 + 2000.0000 -230200.00 239.00000 -47.280000 -.44400000E-02 + 0.00000000 0.00000000 + 2000.0001 -247960.00 373.99203 -65.040000 0.00000000 + 0.00000000 0.00000000 + 2 + 1.00000 1.00000 + 2 1 + Ca Mn + S + 1 2 + 1 1 + 3 + 1 2 3 2 + 33480.000 -7.2400000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 3230.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + BCC_A2 + SUBLM + 0.333333 0.280000 + Ca:Va + 13 4 0.0 1.0 0.0 + 716.00000 -7020.8520 142.97016 -28.254100 0.72326000E-02 + -.45002170E-05 60578.000 + 1115.0000 1640.4753 1.9996983 -6.2760000 -.16192100E-01 + 0.00000000 -523000.00 + 3000.0000 -142331.10 1023.5491 -143.87270 0.32543127E-01 + -.17040790E-05 25353771. + 3001.0001 321.63710 189.43306 -35.000000 0.00000000 + 0.00000000 0.00000000 + 0.000000 0.000000 + Mn:Va + 16 3 1.0 0.0 0.0 + 1519.0000 -23188.830 307.70430 -48.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.12651520E+31 -9.00 + 2000.0000 50107.994 -92.162467 0.00000000 0.00000000 + 0.00000000 0.00000000 + 1 -.39169500E+30 -9.00 + 3001.0001 50031.491 -91.862927 -.34426310E-01 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + -580.000 -.270000 + S:Va + 13 3 0.0 0.0 1.0 + 368.30000 99771.044 55.401762 -11.007000 -.26529000E-01 + 0.77543330E-05 0.00000000 + 1301.0000 98486.228 94.676925 -17.941839 -.10895125E-01 + 0.14025580E-05 39910.000 + 3001.0001 92521.980 188.29356 -31.999970 0.00000000 + 0.00000000 0.00000000 + 0.000000 0.000000 + 2 + 1.00000 3.00000 + 3 1 + Ca Mn S + Va + 1 2 3 + 1 1 1 + 0 + 3 + 1 2 4 1 + 60000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + FCC_A1 + SUBLM + 0.333333 0.280000 + Ca:Va + 13 3 0.0 1.0 0.0 + 1115.0000 -4955.0621 72.794266 -16.313800 -.11104550E-01 + 0.00000000 -133574.00 + 3000.0000 -107304.43 799.98209 -114.29225 0.23733814E-01 + -.12438000E-05 18245540. + 3001.0001 -3703.1130 192.63995 -35.000000 0.00000000 + 0.00000000 0.00000000 + 0.000000 0.000000 + Mn:Va + 16 3 1.0 0.0 0.0 + 1519.0000 -26070.100 309.66640 -48.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.38619600E+31 -9.00 + 2000.0000 47226.724 -90.200367 0.00000000 0.00000000 + 0.00000000 0.00000000 + 1 0.22051130E+31 -9.00 + 3001.0001 47657.410 -91.886677 0.19380871 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + -1620.00 -1.86000 + S:Va + 13 3 0.0 0.0 1.0 + 368.30000 99771.044 55.401762 -11.007000 -.26529000E-01 + 0.77543330E-05 0.00000000 + 1301.0000 98486.228 94.676925 -17.941839 -.10895125E-01 + 0.14025580E-05 39910.000 + 3001.0001 92521.980 188.29356 -31.999970 0.00000000 + 0.00000000 0.00000000 + 0.000000 0.000000 + 2 + 1.00000 1.00000 + 3 1 + Ca Mn S + Va + 1 2 3 + 1 1 1 + 0 + 3 + 1 2 4 1 + 60000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + HCP_A3 + SUBLM + 0.333333 0.280000 + Ca:Va + 13 3 0.0 1.0 0.0 + 1115.0000 -4455.0620 73.494266 -16.313800 -.11104550E-01 + 0.00000000 -133574.00 + 3000.0000 -106804.43 800.68209 -114.29225 0.23733814E-01 + -.12438000E-05 18245540. + 3001.0001 -3203.1128 193.33995 -35.000000 0.00000000 + 0.00000000 0.00000000 + 0.000000 0.000000 + Mn:Va + 16 3 1.0 0.0 0.0 + 1519.0000 -4439.3000 133.00700 -24.517700 -.60000000E-02 + 0.00000000 69600.000 + 1 0.00000000 0.00 + 2000.0000 -27070.099 310.78941 -48.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.38619600E+31 -9.00 + 3001.0001 -26315.810 307.83606 -47.660570 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + -1620.00 -1.86000 + 2 + 1.00000 0.500000 + 2 1 + Ca Mn + Va + 1 2 + 1 1 + 0 + 3 + 1 2 3 1 + 60000.000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 + 0 + PYRRHOTITE + SUBL + Mn:S + 1 2 1.0 0.0 1.0 + 6000.0000 -213200.00 239.00000 -47.280000 -.44400000E-02 + 0.00000000 0.00000000 + 6000.0001 -373040.00 702.51015 -100.56000 0.00000000 + 0.00000000 0.00000000 + Va:S + 1 3 0.0 0.0 1.0 + 368.30000 253371.04 55.401762 -11.007000 -.26529000E-01 + 0.77543330E-05 0.00000000 + 6000.0000 252086.22 94.676925 -17.941839 -.10895125E-01 + 0.14025580E-05 39910.000 + 6000.0001 1071698.5 -1554.9744 154.27141 0.00000000 + 0.00000000 0.00000000 + 2 + 1.00000 1.00000 + 2 1 + Mn Va + S + 1 2 + 1 1 + 0 + S_MONOCLINIC(s) + 1 3 0.0 0.0 1.0 + 388.36000 -5725.4220 89.544275 -17.413000 -.99393500E-02 + -.70062000E-07 1250.0000 + 1300.0000 -7455.0072 114.78294 -21.153140 -.85661630E-02 + 0.11124840E-05 122167.00 + 1301.0000 -11779.415 186.69907 -32.000000 0.00000000 + 0.00000000 0.00000000 + S_ORTHORHOMBIC_S(s2) + 1 3 0.0 0.0 1.0 + 368.30000 -5228.9556 55.401762 -11.007000 -.26529000E-01 + 0.77543330E-05 0.00000000 + 1301.0000 -6513.7711 94.676925 -17.941839 -.10895125E-01 + 0.14025580E-05 39910.000 + 1301.0000 -12478.020 188.29356 -31.999970 0.00000000 + 0.00000000 0.00000000 + Mn_CBCC_A12(s) + 4 3 1.0 0.0 0.0 + 1519.0000 -8115.2800 130.05900 -23.458200 -.73476800E-02 + 0.00000000 69827.000 + 1 0.00000000 0.00 + 2000.0000 -28733.410 312.26479 -48.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.16568470E+31 -9.00 + 2000.0000 -28409.807 310.99776 -47.854379 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Mn_CUB_A13(s2) + 4 3 1.0 0.0 0.0 + 1519.0000 -28291.136 311.29311 -48.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.39675700E+31 -9.00 + 2000.0000 45005.688 -88.573655 0.00000000 0.00000000 + 0.00000000 0.00000000 + 1 0.23107230E+31 -9.00 + 2000.0000 45457.001 -90.340729 0.20309089 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + MnS2_PYRITE(s) + 4 4 1.0 0.0 2.0 + 368.30000 -242573.19 237.18752 -45.472200 -.60405680E-01 + 0.15508666E-04 69827.000 + 1 0.00000000 0.00 + 1300.0000 -245142.82 315.73785 -59.341878 -.29137930E-01 + 0.28051160E-05 149647.00 + 1 0.00000000 0.00 + 2000.0000 -266084.56 498.18366 -83.883678 -.21790250E-01 + 0.28051160E-05 79820.000 + 1 0.16568470E+31 -9.00 + 2000.0000 -262998.60 613.68036 -103.53636 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + S_Orthorhombic(s) # + 4 2 0.0 0.0 1.0 + 800.00000 -5324.3626 90.038913 -17.263205 -.10002812E-01 + 0.00000000 0.00000000 + 1 -151.53412 99.00 + 801.00005 -11297.412 184.44035 -31.655000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Ca_Solid_Alpha(s) # + 4 3 0.0 1.0 0.0 + 1100.0000 -20289.826 5.7135695 -7.2407205 -.15879227E-01 + 0.53889390E-06 89714.089 + 1 3437.1206 99.00 + 1500.0000 -90294.540 -138.06623 10.498266 -.18904688E-01 + 0.00000000 2230770.0 + 1 16851.838 99.00 + 1501.0000 -6642.6644 193.69992 -35.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Mn_Solid_Alpha(s) # + 1 3 1.0 0.0 0.0 + 980.00000 -8266.1319 132.82682 -23.849960 -.70703138E-02 + 0.00000000 78527.059 + 1421.0000 -13663.162 204.71326 -34.238469 -.18915344E-02 + 0.00000000 171622.79 + 1422.0000 -26349.386 296.59060 -46.024000 0.00000000 + 0.00000000 0.00000000 + Ca(s) # + 1 1 0.0 1.0 0.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + Mn(s) # + 1 1 1.0 0.0 0.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + S(s) # + 1 1 0.0 0.0 1.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 diff --git a/data/Lipkina_LiFCsF.dat b/data/Lipkina_LiFCsF.dat new file mode 100644 index 00000000..1317cae7 --- /dev/null +++ b/data/Lipkina_LiFCsF.dat @@ -0,0 +1,162 @@ + System Cs-F-Li + 3 2 6 3 9 + Cs F Li + 132.90545190 18.99840320 6.94100000 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + gas_ideal + IDMX + F2 + 4 4 0.0 2.0 0.0 + 1600.0000 -354.82299 222.97867 -56.401419 0.37116482E-02 + -.31811563E-06 -119091.51 + 1 -1777.8761 0.50 + 4000.0000 2556809.6 -2073.9671 142.79475 -.14325127E-02 + 0.00000000 -82061625. + 2 -580689.05 99.00 76067.590 0.50 + 6000.0000 -3352436.1 408.41454 -59.821707 0.00000000 + 0.00000000 0.24958276E+09 + 2 581650.71 99.00 -35316.873 0.50 + 6000.0000 26821.582 -29.344782 -28.913066 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + FLi + 1 2 0.0 1.0 1.0 + 6000.0000 -351581.57 37.441358 -35.397917 -.93533200E-03 + 0.27571767E-07 0.00000000 + 6000.0000 -361431.52 80.296847 -40.666399 0.00000000 + 0.00000000 0.00000000 + F2Li2 + 1 2 0.0 2.0 2.0 + 6000.0000 -967378.47 306.94034 -83.093630 -.50000000E-05 + 0.00000000 1085365.0 + 6000.0000 -966834.89 306.84730 -83.093332 0.00000000 + 0.00000000 0.00000000 + F3Li3 + 1 2 0.0 3.0 3.0 + 6000.0000 -1576798.2 594.65817 -132.92431 -.15000000E-04 + 0.00000000 1873500.3 + 6000.0000 -1576089.2 595.16248 -133.00023 0.00000000 + 0.00000000 0.00000000 + Cs2 + 1 4 2.0 0.0 0.0 + 700.00000 98106.946 -81.822309 -29.201000 -.15828000E-01 + 0.44071667E-05 -87450.000 + 1700.0000 74344.237 233.03999 -76.767000 0.26470000E-01 + -.26440000E-05 2136950.0 + 3000.0000 248415.40 -857.24846 68.836000 -.28085500E-01 + 0.12236667E-05 -37139650. + 3000.0000 78282.370 8.3032661 -41.852254 0.00000000 + 0.00000000 0.00000000 + CsF + 1 2 1.0 1.0 0.0 + 6000.0000 -368198.94 8.2423133 -37.386370 -.28500000E-03 + 0.00000000 78540.795 + 6000.0000 -378406.58 37.950149 -40.802007 0.00000000 + 0.00000000 0.00000000 + LIQUsoln + SUBQ + 2 2 + Li//F + 1 1 0.0 1.0 1.0 + 6000.0001 -617790.20 386.90980 -64.183000 0.00000000 + 0.00000000 0.00000000 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + Cs//F + 1 1 1.0 1.0 0.0 + 6000.0001 -555751.55 364.38864 -70.560000 0.00000000 + 0.00000000 0.00000000 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 1 + Li Cs + F + 1.00000 1.00000 + 1 1 + 1.00000 + 1 + 1 2 + 1 1 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -5062.1700 0.10454800 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 1356.1310 -1.1660600 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + FLi_solid(s) + 1 2 0.0 1.0 1.0 + 2500.0000 -632481.90 262.49310 -43.308980 -.81560840E-02 + -.84117330E-07 284561.80 + 2500.0000 -688259.46 606.96931 -87.152740 0.00000000 + 0.00000000 0.00000000 + CsF_solid(s) + 1 2 1.0 1.0 0.0 + 2500.0000 -562808.12 85.035425 -24.291000 -.32303500E-01 + 0.00000000 -294990.50 + 2500.0000 -765176.98 1349.6359 -185.90290 0.00000000 + 0.00000000 0.00000000 + CsF2Li_S1(s) + 1 2 1.0 2.0 1.0 + 752.00000 -1198264.0 346.98857 -67.599980 -.40459584E-01 + -.84117330E-07 -10428.700 + 6000.0000 -1221342.2 752.31889 -128.77300 0.00000000 + 0.00000000 0.00000000 + CsF2Li_S2(s2) + 1 3 1.0 2.0 1.0 + 752.00000 -1211342.2 739.02102 -128.77300 0.00000000 + 0.00000000 0.00000000 + 770.00000 -1188264.0 333.69070 -67.599980 -.40459584E-01 + -.84117330E-07 -10428.700 + 770.00005 -1212460.3 750.23746 -130.24216 0.00000000 + 0.00000000 0.00000000 + Li_solid(s) # + 4 3 0.0 0.0 1.0 + 453.69000 -3853.5254 46.068939 -9.6044006 -.20498280E-01 + 0.00000000 -124058.57 + 1 0.00000000 0.00 + 1000.0000 -1525604.3 6985.0554 -704.44799 0.50410253E-01 + 0.00000000 19563982. + 2 491701.07 99.00 -129758.32 0.50 + 1001.0000 -7248.2179 157.16855 -28.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + F2(g) # + 4 4 0.0 2.0 0.0 + 1600.0000 -354.82340 222.97867 -56.401419 0.37116482E-02 + -.31811563E-06 -119091.51 + 1 -1777.8761 0.50 + 4000.0000 2556809.6 -2073.9671 142.79475 -.14325127E-02 + 0.00000000 -82061625. + 2 -580689.05 99.00 76067.590 0.50 + 6000.0000 -3352436.1 408.41455 -59.821707 0.00000000 + 0.00000000 0.24958276E+09 + 2 581650.71 99.00 -35316.873 0.50 + 6000.0000 26821.579 -29.344780 -28.913066 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cs_solid(s) # + 4 2 1.0 0.0 0.0 + 500.00000 -48805.930 94.519534 -28.636395 -.18924831E-02 + 0.00000000 958526.28 + 1 7167.4807 99.00 + 501.00005 -8304.9038 120.18039 -31.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsF(s) # + 1 1 1.0 1.0 0.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + LiF(s) # + 1 1 0.0 1.0 1.0 + 6001.0000 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 diff --git a/data/Scuro_KFCsI.dat b/data/Scuro_KFCsI.dat new file mode 100644 index 00000000..8d1e439c --- /dev/null +++ b/data/Scuro_KFCsI.dat @@ -0,0 +1,201 @@ + System Cs-I-K-F + 4 3 0 9 2 9 + Cs I K + F + 132.90545190 126.90447000 39.09830000 + 18.99840320 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + Liquid + SUBQ + 4 5 + KI 0.000000 0.000000 + 4 1 0.00000 1.00000 1.00000 0.00000 + 6000.0000 -329319.14 592.51128 -105.50000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + CsI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -354055.36 365.51911 -74.268000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + CsF 0.000000 0.000000 + 4 1 1.00000 0.00000 0.00000 1.00000 + 6000.0000 -555751.55 364.38864 -70.560000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + KF 0.000000 0.000000 + 4 1 0.00000 0.00000 1.00000 1.00000 + 6000.0000 -575830.74 414.22351 -71.965000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 2 + K Cs + I F + 1.00000 1.00000 + 1 1 + 1.00000 1.00000 + 1 1 + 1 2 2 1 + 1 1 2 2 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 1 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 7909.4016 -14.321594 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1000.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 5182.5389 -5.4795584 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 1 4 20000.000 -10.000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1500.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 2 3 -8000.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + KFCsIsoln + QKTO + KF 0.000000 0.000000 + 4 2 0.00000 0.00000 1.00000 1.00000 + 2000.0000 -589729.49 384.19527 -68.757414 0.28878441E-01 + -.12567476E-04 383359.17 + 1 0.19904689E-08 4.00 + 6000.0001 -588980.71 368.02292 -63.586378 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + CsI 0.000000 0.000000 + 4 2 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6000.0001 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + 2 + 1 2 0 1 25000.000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + KF_solid(s) + 4 2 0.00000 0.00000 1.00000 1.00000 + 2000.0000 -589729.49 384.19527 -68.757414 0.28878441E-01 + -.12567476E-04 383359.17 + 1 0.19904689E-08 4.00 + 2000.0001 -588980.71 368.02291 -63.586378 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + KI_Rocksalt_B1_cF8_(2(s) + 4 2 0.00000 1.00000 1.00000 0.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 2000.0000 -397443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + KI_B2_cP2_(221)_Pm-3(s2) + 4 2 0.00000 1.00000 1.00000 0.00000 + 2000.0000 -324111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 2000.0000 -382443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsF_solid(s) + 4 2 1.00000 0.00000 0.00000 1.00000 + 6000.0000 -562808.12 85.035425 -24.291000 -.32303500E-01 + 0.00000000 -294990.50 + 1 0.00000000 0.00 + 6000.0001 -1725930.8 3457.4999 -411.94939 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsI_solid(s) + 4 2 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6001.0000 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + F2(g) # + 4 4 0.00000 0.00000 0.00000 2.00000 + 1600.0000 -354.82340 222.97867 -56.401419 0.37116482E-02 + -.31811563E-06 -119091.51 + 1 -1777.8761 0.50 + 4000.0000 2556809.6 -2073.9671 142.79475 -.14325127E-02 + 0.00000000 -82061625. + 2 -580689.05 99.00 76067.590 0.50 + 6000.0000 -3352436.1 408.41455 -59.821707 0.00000000 + 0.00000000 0.24958276E+09 + 2 581650.71 99.00 -35316.873 0.50 + 6000.0000 26821.579 -29.344780 -28.913066 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + K_solid(s) # + 4 4 0.00000 0.00000 1.00000 0.00000 + 400.00000 4578938.5 21051.717 -2842.0637 1.2013187 + 0.00000000 -62368327. + 1 -1043329.6 99.00 + 1039.5000 3223.3261 230.66797 -44.375754 0.13402586E-01 + -.25389940E-05 -199697.85 + 1 -2842.2592 99.00 + 1500.0000 1190.0430 44.144047 -17.445403 -.54434916E-02 + 0.00000000 -997310.30 + 1 0.00000000 0.00 + 1501.0000 5276.2559 66.120194 -22.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + I2_solid(s) # + 4 3 0.00000 2.00000 0.00000 0.00000 + 700.00000 1528805.2 -10284.673 1043.2308 -.18591166 + 0.00000000 -16125321. + 2 -555394.03 99.00 171760.27 0.50 + 1000.0000 -23762.336 427.16112 -80.669000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1001.0000 16906.664 105.56062 -40.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cs_solid(s) # + 4 2 1.00000 0.00000 0.00000 0.00000 + 500.00000 -48805.930 94.519534 -28.636395 -.18924831E-02 + 0.00000000 958526.28 + 1 7167.4807 99.00 + 501.00005 -8304.9038 120.18039 -31.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/data/Scuro_KICsI.dat b/data/Scuro_KICsI.dat new file mode 100644 index 00000000..5d8a0f63 --- /dev/null +++ b/data/Scuro_KICsI.dat @@ -0,0 +1,151 @@ + System Cs-I-K + 3 4 0 3 2 2 5 + Cs I K + 132.90545190 126.90447000 39.09830000 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + Liquid + SUBQ + 2 3 + KI 0.000000 0.000000 + 4 1 0.00000 1.00000 1.00000 + 2500.0000 -329319.14 592.51128 -105.50000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + CsI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 + 2500.0000 -354055.47 365.51911 -74.268000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 1 + K Cs + I + 1.00000 1.00000 + 1 1 + 1.00000 + 1 + 1 2 + 1 1 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 7909.4016 -14.321594 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1000.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 5182.5389 -5.4795584 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + s1 + QKTO + KI 0.000000 0.000000 + 4 2 0.00000 1.00000 1.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 6000.0001 -397443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + CsI 0.000000 0.000000 + 4 2 1.00000 1.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6000.0001 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + 2 + 1 2 1 0 14064.620 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + s2 + QKTO + KI 0.000000 0.000000 + 4 2 0.00000 1.00000 1.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 6000.0001 -397443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + CsI 0.000000 0.000000 + 4 2 1.00000 1.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6000.0001 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + 2 + 1 2 0 1 7708.6573 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + K_solid(s) # + 4 4 0.00000 0.00000 1.00000 + 400.00000 4578938.5 21051.717 -2842.0637 1.2013187 + 0.00000000 -62368327. + 1 -1043329.6 99.00 + 1039.5000 3223.3261 230.66797 -44.375754 0.13402586E-01 + -.25389940E-05 -199697.85 + 1 -2842.2592 99.00 + 1500.0000 1190.0430 44.144047 -17.445403 -.54434916E-02 + 0.00000000 -997310.30 + 1 0.00000000 0.00 + 1501.0000 5276.2559 66.120194 -22.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + I2_solid(s) # + 4 3 0.00000 2.00000 0.00000 + 700.00000 1528805.2 -10284.673 1043.2308 -.18591166 + 0.00000000 -16125321. + 2 -555394.03 99.00 171760.27 0.50 + 1000.0000 -23762.336 427.16112 -80.669000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1001.0000 16906.664 105.56062 -40.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cs_solid(s) # + 4 2 1.00000 0.00000 0.00000 + 500.00000 -48805.930 94.519534 -28.636395 -.18924831E-02 + 0.00000000 958526.28 + 1 7167.4807 99.00 + 501.00005 -8304.9038 120.18039 -31.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + KI_Rocksalt_B1_cF8_(2(s)# + 4 2 0.00000 1.00000 1.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 2000.0000 -397443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsI_solid(s) # + 4 2 1.00000 1.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6001.0000 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/data/Scuro_MgCl2SrCl2.dat b/data/Scuro_MgCl2SrCl2.dat new file mode 100644 index 00000000..0fa0b3bc --- /dev/null +++ b/data/Scuro_MgCl2SrCl2.dat @@ -0,0 +1,138 @@ + System Sr-Cl-Mg + 3 2 0 3 9 + Sr Cl Mg + 87.62000000 35.45300000 24.30500000 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + Liquid + SUBQ + 2 3 + SrCl2 0.000000 0.000000 + 4 2 1.00000 2.00000 0.00000 + 6000.0000 -851376.83 482.90436 -88.990000 -.36225000E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 6000.0001 -981786.83 861.07226 -132.46000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 2.00000 0.000000 0.000000 0.000000 + 2.40000 + MgCl2 0.000000 0.000000 + 4 2 0.00000 2.00000 1.00000 + 660.00000 -658788.27 1093.7361 -193.40890 0.18100695 + -.53331183E-04 1894252.0 + 1 0.00000000 0.00 + 6000.0001 -634331.55 499.20330 -92.048000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 2.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 1 + Sr Mg + Cl + 2.00000 2.00000 + 2 2 + 1.00000 + 1 + 1 2 + 1 1 + 1 1 3 3 3.0000000 3.0000000 1.5000000 1.5000000 + 2 2 3 3 3.0000000 3.0000000 1.5000000 1.5000000 + 1 2 3 3 3.0000000 3.0000000 3.0000000 3.0000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 750.00000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1381.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -42000.000 50.000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + Cl2Mg_liquid(liq) + 4 2 0.00000 2.00000 1.00000 + 660.00000 -658788.27 1093.7361 -193.40890 0.18100695 + -.53331183E-04 1894252.0 + 1 0.00000000 0.00 + 2500.0000 -634331.55 499.20330 -92.048000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cl2Mg_liquid2(liq) + 4 1 0.00000 2.00000 1.00000 + 2500.0000 -634331.51 499.20328 -92.048000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + SrCl2_liq(liq) + 4 2 1.00000 2.00000 0.00000 + 6000.0000 -851376.83 482.90436 -88.990000 -.36225000E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 6000.0001 -981786.83 861.07226 -132.46000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cl2Mg_solid(s) + 4 2 0.00000 2.00000 1.00000 + 2000.0000 -676336.86 242.25622 -54.584300 -.10710650E-01 + 0.39278333E-06 556059.50 + 1 1596.7080 0.50 + 2000.0001 -687646.53 583.62500 -96.647939 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + SrCl2_s(s) + 4 2 1.00000 2.00000 0.00000 + 3000.0000 -859427.07 427.15221 -80.082000 -.38085000E-02 + 0.00000000 299950.00 + 1 0.00000000 0.00 + 3000.0001 -893303.64 609.47206 -102.86634 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + SrMgCl4(s) + 4 2 1.00000 4.00000 1.00000 + 853.00000 -1445250.5 717.71743 -135.00000 -.56250000E-01 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 854.00005 -1476827.5 1280.3995 -220.00000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Mg_solid(s) # + 4 2 0.00000 0.00000 1.00000 + 1200.0000 -1136.6244 178.88185 -31.029910 0.34660578E-02 + -.18288137E-05 -21014.508 + 1 -1652.5062 99.00 + 1201.0000 -13841.189 204.46551 -34.309000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cl2(g) # + 4 4 0.00000 2.00000 0.00000 + 1600.0000 12809.016 -120.39923 -20.680767 0.00000000 + 0.00000000 -158356.65 + 3 -.25474356 1.50 2365.0449 0.50 -8299.3704 99.00 + 3800.0000 13434169. -55196.104 6062.5675 0.18893144 + -.48495258E-06 -.25706483E+09 + 3 -100.31370 1.50 952147.59 0.50 -3941479.6 99.00 + 6000.0000 29413795. -19700.928 1734.5976 0.00000000 + 0.00000000 -.14098302E+10 + 3 -8.2020644 1.50 692726.84 0.50 -6110513.9 99.00 + 6000.0000 -1966.4883 27.523866 -37.570456 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Sr_fcc(s) # + 4 3 1.00000 0.00000 0.00000 + 820.00000 -7536.3342 107.26902 -23.918852 -.45941876E-02 + -.17146904E-06 -1871.4450 + 1 0.00000000 0.00 + 1500.0000 -7670.4844 121.63656 -26.359327 -.20919177E-02 + 0.00000000 3.1236523 + 1 0.00000000 0.00 + 1500.0000 -12377.291 167.53250 -32.635077 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/data/Scuro_NaFCsI.dat b/data/Scuro_NaFCsI.dat new file mode 100644 index 00000000..e7eeb900 --- /dev/null +++ b/data/Scuro_NaFCsI.dat @@ -0,0 +1,308 @@ + System Cs-I-Na-F + 4 3 2 9 9 9 + Cs I Na + F + 132.90545190 126.90447000 22.98976928 + 18.99840320 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + gas_ideal + IDMX + NaF + 4 2 0.00000 0.00000 1.00000 1.00000 + 6000.0000 -306220.42 30.431387 -36.982136 -.39465750E-03 + -.21073333E-07 0.00000000 + 1 0.00000000 0.00 + 6001.0000 -338635.45 113.50605 -46.269866 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsI + 4 4 1.00000 1.00000 0.00000 0.00000 + 3000.0000 -164601.41 -21.393897 -37.886000 -.15290000E-04 + -.81883333E-07 0.22675000E-03 + 1 0.00000000 0.00 + 6001.0000 -187316.98 58.186039 -46.977626 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 6001.0000 -747.22434 -612.00595 34.730000 -.14210000E-01 + 0.42866667E-06 -68100000. + 1 0.00000000 0.00 + 6001.0000 -187316.98 58.186038 -46.977626 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Liquid + SUBQ + 4 7 + CsI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -354055.36 365.51911 -74.268000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaF 0.000000 0.000000 + 4 1 0.00000 0.00000 1.00000 1.00000 + 6000.0000 -579491.59 436.09610 -72.989000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaI 0.000000 0.000000 + 4 1 0.00000 1.00000 1.00000 0.00000 + 6000.0000 -289027.77 321.30750 -64.852000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + CsF 0.000000 0.000000 + 4 1 1.00000 0.00000 0.00000 1.00000 + 6000.0000 -555751.55 364.38864 -70.560000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 2 + Cs Na + I F + 1.00000 1.00000 + 1 1 + 1.00000 1.00000 + 1 1 + 1 2 2 1 + 1 2 1 2 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 1 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 4 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 4 4 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -2893.0000 3.5250000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 4 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 283.00000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1987.1899 4.0425938 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -2347.5633 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1493.5399 4.0348806 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 1 3 -20000.000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 1000.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 2 4 20000.000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + Liquid + SUBQ + 4 7 + CsI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -354055.36 365.51911 -74.268000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaF 0.000000 0.000000 + 4 1 0.00000 0.00000 1.00000 1.00000 + 6000.0000 -579491.59 436.09610 -72.989000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaI 0.000000 0.000000 + 4 1 0.00000 1.00000 1.00000 0.00000 + 6000.0000 -289027.77 321.30750 -64.852000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + CsF 0.000000 0.000000 + 4 1 1.00000 0.00000 0.00000 1.00000 + 6000.0000 -555751.55 364.38864 -70.560000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 2 + Cs Na + I F + 1.00000 1.00000 + 1 1 + 1.00000 1.00000 + 1 1 + 1 2 2 1 + 1 2 1 2 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 1 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 4 4 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 4 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 4 4 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -2893.0000 3.5250000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 4 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 283.00000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1987.1899 4.0425938 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -2347.5633 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1493.5399 4.0348806 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 1 3 -20000.000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 1000.0000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 4 + R 1 2 3 4 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 2 4 20000.000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + Na_solid(s) + 4 2 0.00000 0.00000 1.00000 0.00000 + 371.00000 -7508.4102 99.578238 -21.455000 -.10944500E-01 + -.23763333E-05 1900.0000 + 1 0.00000000 0.00 + 371.00005 -9479.7250 160.00960 -31.510696 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + NaF_solid(s) + 4 2 0.00000 0.00000 1.00000 1.00000 + 2500.0000 -593065.52 274.81772 -47.630000 -.73950000E-02 + 0.00000000 232150.00 + 1 0.00000000 0.00 + 2501.0000 -638912.83 563.41916 -84.530712 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + NaI_Rocksalt_B1_cF8_((s) + 4 2 0.00000 1.00000 1.00000 0.00000 + 1577.0000 -302967.79 232.63163 -48.877488 -.60270520E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1577.0000 -317956.64 372.60259 -67.886810 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsF_solid(s) + 4 2 1.00000 0.00000 0.00000 1.00000 + 6000.0000 -562808.12 85.035425 -24.291000 -.32303500E-01 + 0.00000000 -294990.50 + 1 0.00000000 0.00 + 6000.0001 -1725930.8 3457.4999 -411.94939 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsI_solid(s) + 4 2 1.00000 1.00000 0.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6001.0000 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + F2(g) # + 4 4 0.00000 0.00000 0.00000 2.00000 + 1600.0000 -354.82340 222.97867 -56.401419 0.37116482E-02 + -.31811563E-06 -119091.51 + 1 -1777.8761 0.50 + 4000.0000 2556809.6 -2073.9671 142.79475 -.14325127E-02 + 0.00000000 -82061625. + 2 -580689.05 99.00 76067.590 0.50 + 6000.0000 -3352436.1 408.41455 -59.821707 0.00000000 + 0.00000000 0.24958276E+09 + 2 581650.71 99.00 -35316.873 0.50 + 6000.0000 26821.579 -29.344780 -28.913066 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Na_solid(s) # + 4 3 0.00000 0.00000 1.00000 0.00000 + 370.98000 -59594.506 -608.12041 83.612083 -.96523427E-01 + 0.00000000 0.00000000 + 1 16166.384 99.00 + 1000.0000 -460367.57 2193.6121 -233.40572 0.14936660E-01 + 0.00000000 5806510.7 + 2 145943.73 99.00 -38503.267 0.50 + 1001.0000 2124.2258 75.180129 -21.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + I2_solid(s) # + 4 3 0.00000 2.00000 0.00000 0.00000 + 700.00000 1528805.2 -10284.673 1043.2308 -.18591166 + 0.00000000 -16125321. + 2 -555394.03 99.00 171760.27 0.50 + 1000.0000 -23762.336 427.16112 -80.669000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1001.0000 16906.664 105.56062 -40.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cs_solid(s) # + 4 2 1.00000 0.00000 0.00000 0.00000 + 500.00000 -48805.930 94.519534 -28.636395 -.18924831E-02 + 0.00000000 958526.28 + 1 7167.4807 99.00 + 501.00005 -8304.9038 120.18039 -31.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/data/Scuro_NaICsI.dat b/data/Scuro_NaICsI.dat new file mode 100644 index 00000000..8a97619c --- /dev/null +++ b/data/Scuro_NaICsI.dat @@ -0,0 +1,108 @@ + System Cs-I-Na + 3 2 0 3 6 + Cs I Na + 132.90545190 126.90447000 22.98976928 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + Liquid + SUBQ + 2 3 + CsI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 + 2500.0000 -354055.47 365.51911 -74.268000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaI 0.000000 0.000000 + 4 1 0.00000 1.00000 1.00000 + 2500.0000 -289027.77 321.30750 -64.852000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 1 + Cs Na + I + 1.00000 1.00000 + 1 1 + 1.00000 + 1 + 1 2 + 1 1 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 1 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 3 3 1 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1987.1899 4.0425938 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -2347.5633 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 1 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -1493.5399 4.0348806 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + Na_solid(s) + 4 2 0.00000 0.00000 1.00000 + 371.00000 -7508.4102 99.578238 -21.455000 -.10944500E-01 + -.23763333E-05 1900.0000 + 1 0.00000000 0.00 + 371.00005 -9479.7250 160.00960 -31.510696 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + NaI_Rocksalt_B1_cF8_((s) + 4 2 0.00000 1.00000 1.00000 + 1577.0000 -302967.79 232.63163 -48.877488 -.60270520E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1577.0000 -317956.64 372.60259 -67.886810 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + CsI_solid(s) + 4 2 1.00000 1.00000 0.00000 + 6000.0000 -361484.74 176.75167 -43.815000 -.10920000E-01 + -.41600000E-06 -100100.00 + 1 0.00000000 0.00 + 6001.0000 -1114095.5 2143.4244 -264.71656 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Na_solid(s) # + 4 3 0.00000 0.00000 1.00000 + 370.98000 -59594.506 -608.12041 83.612083 -.96523427E-01 + 0.00000000 0.00000000 + 1 16166.384 99.00 + 1000.0000 -460367.57 2193.6121 -233.40572 0.14936660E-01 + 0.00000000 5806510.7 + 2 145943.73 99.00 -38503.267 0.50 + 1001.0000 2124.2258 75.180129 -21.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + I2_solid(s) # + 4 3 0.00000 2.00000 0.00000 + 700.00000 1528805.2 -10284.673 1043.2308 -.18591166 + 0.00000000 -16125321. + 2 -555394.03 99.00 171760.27 0.50 + 1000.0000 -23762.336 427.16112 -80.669000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1001.0000 16906.664 105.56062 -40.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + Cs_solid(s) # + 4 2 1.00000 0.00000 0.00000 + 500.00000 -48805.930 94.519534 -28.636395 -.18924831E-02 + 0.00000000 958526.28 + 1 7167.4807 99.00 + 501.00005 -8304.9038 120.18039 -31.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/data/Scuro_NaIKI.dat b/data/Scuro_NaIKI.dat new file mode 100644 index 00000000..83ffd11b --- /dev/null +++ b/data/Scuro_NaIKI.dat @@ -0,0 +1,120 @@ + System I-K-Na + 3 3 0 3 2 5 + I K Na + 126.90447000 39.09830000 22.98976928 + 6 1 2 3 4 5 6 + 6 1 2 3 4 5 6 + Liquid + SUBQ + 2 2 + KI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 + 1577.0000 -329319.14 592.51128 -105.50000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + NaI 0.000000 0.000000 + 4 1 1.00000 0.00000 1.00000 + 1577.0000 -289027.77 321.30750 -64.852000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1.00000 0.000000 0.000000 0.000000 + 2.40000 + 2 1 + K Na + I + 1.00000 1.00000 + 1 1 + 1.00000 + 1 + 1 2 + 1 1 + 1 1 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 2 2 3 3 6.0000000 6.0000000 6.0000000 6.0000000 + 3 + G 1 2 3 3 0 0 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 -9900.0000 6.0000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 3 + G 1 2 3 3 0 2 0 0 + 0.00000000 1.00 0.00000000 1.00 0.00000000 1.00 + 0.00000000 0.00 0.00000000 0.00 0.00000000 0.00 + 0 0 2000.0000 -1.0000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + NaIKIsoln + QKTO + NaI 0.000000 0.000000 + 4 2 1.00000 0.00000 1.00000 + 1577.0000 -302967.79 232.63163 -48.877488 -.60270520E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 2000.0000 -210899.14 -195.15379 -.10000000E-11 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1.00000 1 + KI 0.000000 0.000000 + 4 1 1.00000 1.00000 0.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 1.00000 1 + 2 + 1 2 0 0 0.00000000 0.00000000 0.00000000 0.00000000 + 0.00000000 0.00000000 + 0 + Na_solid(s) # + 4 3 0.00000 0.00000 1.00000 + 370.98000 -59594.506 -608.12041 83.612083 -.96523427E-01 + 0.00000000 0.00000000 + 1 16166.384 99.00 + 1000.0000 -460367.57 2193.6121 -233.40572 0.14936660E-01 + 0.00000000 5806510.7 + 2 145943.73 99.00 -38503.267 0.50 + 1001.0000 2124.2258 75.180129 -21.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + K_solid(s) # + 4 4 0.00000 1.00000 0.00000 + 400.00000 4578938.5 21051.717 -2842.0637 1.2013187 + 0.00000000 -62368327. + 1 -1043329.6 99.00 + 1039.5000 3223.3261 230.66797 -44.375754 0.13402586E-01 + -.25389940E-05 -199697.85 + 1 -2842.2592 99.00 + 1500.0000 1190.0430 44.144047 -17.445403 -.54434916E-02 + 0.00000000 -997310.30 + 1 0.00000000 0.00 + 1501.0000 5276.2559 66.120194 -22.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + I2_solid(s) # + 4 3 2.00000 0.00000 0.00000 + 700.00000 1528805.2 -10284.673 1043.2308 -.18591166 + 0.00000000 -16125321. + 2 -555394.03 99.00 171760.27 0.50 + 1000.0000 -23762.336 427.16112 -80.669000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1001.0000 16906.664 105.56062 -40.000000 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + NaI_Rocksalt_B1_cF8_((s)# + 4 2 1.00000 0.00000 1.00000 + 1577.0000 -302967.79 232.63163 -48.877488 -.60270520E-02 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + 1577.0000 -317956.64 372.60259 -67.886810 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 + KI_Rocksalt_B1_cF8_(2(s)# + 4 2 1.00000 1.00000 0.00000 + 2000.0000 -339111.28 159.55816 -38.835888 -.14459904E-01 + 0.00000000 -246437.60 + 1 0.00000000 0.00 + 2000.0000 -397443.77 600.31284 -96.798723 0.00000000 + 0.00000000 0.00000000 + 1 0.00000000 0.00 diff --git a/run_tests b/run_tests index f7ba7148..76359a62 100755 --- a/run_tests +++ b/run_tests @@ -19,9 +19,8 @@ tests=( TestThermo51 TestThermo52 TestThermo53 TestThermo54 TestThermo55 TestThermo56 TestThermo57 TestThermo58 TestThermo59 TestThermo60 TestThermo61 TestThermo62 TestTransition01 TestTransition02 - TestTransition03 TestTransition04 TestTransition05 TestValidationParser01 - TestValidationParser02 TestValidationParser04 - TestValidationParser05 TestValidationParser06 + TestTransition03 TestTransition04 TestTransition05 TestTransition06 + TestTransition07 TestTransition08 TestValidation01 ) ./TestThermo12 > test12out.txt diff --git a/src/debug/ThermoDebug.f90 b/src/debug/ThermoDebug.f90 index 48b5c6e6..eac6fb7d 100755 --- a/src/debug/ThermoDebug.f90 +++ b/src/debug/ThermoDebug.f90 @@ -190,7 +190,9 @@ subroutine ThermoDEBUG elseif (INFOThermo == 68) then print *, "DEBUG: Error Validation CSV contains too many tests." elseif (INFOThermo == 69) then - print *, "DEBUG: Error Validation CSV incorrect number of transitions ." + print *, "DEBUG: Error Validation CSV incorrect number of transitions." + elseif (INFOThermo == 70) then + print *, "DEBUG: Error number of tolerances are not equal to the number of transitions" elseif (INFOThermo == 99) then print *, 'DEBUG: The input element masses are not representable in terms of the available species.' ! Check CompThermoData.f90 diff --git a/src/module/ModuleTesting.f90 b/src/module/ModuleTesting.f90 index 739dd039..a162e56f 100644 --- a/src/module/ModuleTesting.f90 +++ b/src/module/ModuleTesting.f90 @@ -83,8 +83,7 @@ end subroutine printMolFractions subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dTolerance, lPass) implicit none - real(8), intent(in) :: dPhaseTransitionTemp(:) - real(8), intent(in) :: dTestTransitionTemp(:) + real(8), intent(in) :: dPhaseTransitionTemp(:), dTestTransitionTemp(:) real(8), intent(in) :: dTolerance logical, intent(out) :: lPass integer :: i, n @@ -106,4 +105,26 @@ subroutine checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, dToler end do end subroutine checkTransitionTest + + subroutine checkTransitionTestIndex(dPhaseTransitionTemp, dTestTransitionTemp, dTolerance, nIndex, lPass) + implicit none + real(8), intent(in) :: dPhaseTransitionTemp(:), dTestTransitionTemp(:) + real(8), intent(in) :: dTolerance + integer, intent(in) :: nIndex + logical, intent(out) :: lPass + real(8) :: dDiff + + lPass = .TRUE. + + if (dTestTransitionTemp(nIndex) > 0D0) then + dDiff = abs(dPhaseTransitionTemp(nIndex) - dTestTransitionTemp(nIndex)) + if (dDiff > dTolerance) then + print *, 'Mismatch at index ', nIndex, ': calculated = ', dPhaseTransitionTemp(nIndex), & + ', expected = ', dTestTransitionTemp(nIndex), ', dDiff = ', dDiff + lPass = .FALSE. + end if + end if + + end subroutine checkTransitionTestIndex + end module ModuleTesting \ No newline at end of file diff --git a/src/parser/ParseValidation.f90 b/src/parser/ParseCSVFile.f90 similarity index 84% rename from src/parser/ParseValidation.f90 rename to src/parser/ParseCSVFile.f90 index 7e41086f..cde26fb7 100644 --- a/src/parser/ParseValidation.f90 +++ b/src/parser/ParseCSVFile.f90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file ParseValidation.F90 + !> \file ParseCSVFile.F90 !> \brief Parse Validation data and run phase transition tests. !> \author A.E.F. Fitzsimmons ! @@ -19,7 +19,7 @@ ! !------------------------------------------------------------------------------------------------------------- -subroutine ParseValidation(cTestCSV,lPass) +subroutine ParseCSVFile(cTestCSV,lPass) USE ModuleThermo USE ModuleThermoIO USE ModuleTesting @@ -27,6 +27,7 @@ subroutine ParseValidation(cTestCSV,lPass) implicit none character(*), intent(in):: cTestCSV + logical, intent(out) :: lPass integer :: INFO, nElementTest, nParamTest, nTestNumber, iTransitions, i, j, iPos, iPos2, iTransCount integer, allocatable :: iElementIndex(:) @@ -38,7 +39,6 @@ subroutine ParseValidation(cTestCSV,lPass) character(250) :: cLines character(3), dimension(0:nElementsPT):: cElementNamePT character(3), allocatable :: cTestElement(:) - logical, intent(out) :: lPass ! Initialize variables: INFOThermo = 0 @@ -146,14 +146,24 @@ subroutine ParseValidation(cTestCSV,lPass) end if end do - call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransCount) - call checkTransitionTest(dPhaseTransitionTemp, dTestTransitionTemp, 1D0, lPass) - - if(.NOT. lPass) then - print *, "Test Number: ", nTestNumber, " failed." - EXIT + if(SIZE(dTestTransitionTemp) /= SIZE(dTestTolerance)) then + INFOThermo = 70 + return end if + ! Thermochimica phase transition calculation + call PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionTemp, iTransCount) + + ! Check by tolerance + do j = 1, SIZE(dTestTolerance(1:iTransitions)) + call checkTransitionTestIndex(dPhaseTransitionTemp, dTestTransitionTemp, dTestTolerance(j), j, lPass) + if(.NOT. lPass) then + print *, "Test Number: ", i, " failed ", "at transition number", j, NEW_LINE(" ") + !EXIT + end if + end do + + if (.NOT. lPass) EXIT !Reset test variables iTransCount = 0 iPos = 1 @@ -167,4 +177,4 @@ subroutine ParseValidation(cTestCSV,lPass) deallocate(cTestElement, iElementIndex, dMass) close (INFO) -end subroutine ParseValidation \ No newline at end of file +end subroutine ParseCSVFile \ No newline at end of file diff --git a/src/postprocess/PhaseTransition.f90 b/src/postprocess/PhaseTransition.f90 index d19724ea..acd6ec3a 100644 --- a/src/postprocess/PhaseTransition.f90 +++ b/src/postprocess/PhaseTransition.f90 @@ -115,6 +115,4 @@ subroutine PhaseTransition(dTempMin, dTempMax, dTempTolerance, dPhaseTransitionT end do - - end subroutine PhaseTransition diff --git a/test/csv/IO_CSV-01.csv b/test/csv/IO_CSV-01.csv new file mode 100644 index 00000000..62fba18d --- /dev/null +++ b/test/csv/IO_CSV-01.csv @@ -0,0 +1,7 @@ +System Pd Tc - this test is intended to fail (too many elements on line 2),,,,,,,,,,, +3 4,,,,,,,,,,, +Pd,Tc,,,,,,,,,, +1,2,0.95,5.00E-02,1000,3000,1900,1,1950,1,, +2,3,0.8,0.2,1000,3000,1900,1,1926,1,2050,1 +3,2,0.55,0.45,1000,3000,1926,1,2300,1,, +4,2,0.2,0.8,1000,3000,2100,1,2400,1,, \ No newline at end of file diff --git a/test/csv/IO_CSV-02.csv b/test/csv/IO_CSV-02.csv new file mode 100644 index 00000000..3173126c --- /dev/null +++ b/test/csv/IO_CSV-02.csv @@ -0,0 +1,5 @@ +System Mo Ru -- this test is intended to fail (too many tests on line 2),,,,,,,,,,,,, +2 6,,,,,,,,,,,,, +Mo,Ru,,,,,,,,,,,, +1,3,0.95,5.00E-02,1000,3000,1201.32,1,2705.97,1,2825,1,, +2,3,0.8,0.2,1000,3000,1415.93,1,1820.72,1,2375.68,1,2561.82,1 diff --git a/test/csv/IO_CSV-03.csv b/test/csv/IO_CSV-03.csv new file mode 100644 index 00000000..80972b44 --- /dev/null +++ b/test/csv/IO_CSV-03.csv @@ -0,0 +1,8 @@ +System Mo Ru - this test is intended to fail (missing temperature on line 4),,,,,,,,,,,,, +2 5,,,,,,,,,,,,, +Mo,Ru,,,,,,,,,,,, +1,3,0.95,5.00E-02,1000,3000,1100,1,2700,1,,,, +2,4,0.8,0.2,1000,3000,1416,1,1850,1,2350,1,2550,1 +3,4,0.55,0.45,1000,3000,1416,1,2188,1,2228,1,2300,1 +4,3,0.35,0.65,1000,3000,1200,1,2400,1,2450,1,, +5,2,0.1,0.9,1000,3000,2500,1,2550,1,,,, \ No newline at end of file diff --git a/test/csv/KayeVerification.csv b/test/csv/KayeVerification.csv new file mode 100644 index 00000000..04941ab0 --- /dev/null +++ b/test/csv/KayeVerification.csv @@ -0,0 +1,4 @@ +System Ru Mo,,,,,,,,,, +2 1,,,,,,,,,, +Ru,Mo,,,,,,,, +1,4,0.55,0.45,1000,2500,1415.93,10,1824.7,10,2295.85,10,2354.94,10 diff --git a/test/csv/Kaye_Mo-Ru.csv b/test/csv/Kaye_Mo-Ru.csv new file mode 100644 index 00000000..b50ce9e9 --- /dev/null +++ b/test/csv/Kaye_Mo-Ru.csv @@ -0,0 +1,8 @@ +System Mo Ru,,,,,,,,,,,,, +2 5,,,,,,,,,,,,, +Mo,Ru,,,,,,,,,,,, +1,3,0.95,5.00E-02,1000,3000,1201.32,1,2705.97,1,2825.42,1,, +2,4,0.8,0.2,1000,3000,1415.93,1,1820.72,1,2375.68,1,2561.82,1 +3,4,0.55,0.45,1000,3000,1415.93,1,2188.2,1,2227.66,1,2275.66,1 +4,3,0.35,0.65,1000,3000,1197.66,1,2373.54,1,2415.93,1,, +5,2,0.1,0.9,1000,3000,2517.41,1,2544.36,1,,,, \ No newline at end of file diff --git a/test/csv/Kaye_Pd-Tc.csv b/test/csv/Kaye_Pd-Tc.csv new file mode 100644 index 00000000..4b6bc02f --- /dev/null +++ b/test/csv/Kaye_Pd-Tc.csv @@ -0,0 +1,7 @@ +System Pd Tc,,,,,,,,,,, +2 4,,,,,,,,,,, +Pd,Tc,,,,,,,,,, +1,2,0.95,5.00E-02,1000,3000,1926.06,1,2185.53,1,, +2,3,0.8,0.2,1000,3000,1905.06,1,1926.06,1,2031.04,1 +3,2,0.55,0.45,1000,3000,1926.06,1,2271.79,1,, +4,2,0.2,0.8,1000,3000,2108.14,1,2376.64,1,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_KF-CsI.csv b/test/csv/MSTDBTC_KF-CsI.csv new file mode 100644 index 00000000..6dbb3f18 --- /dev/null +++ b/test/csv/MSTDBTC_KF-CsI.csv @@ -0,0 +1,21 @@ +System KF-CsI,,,,,,,,,,, +4 18,,,,,,,,,,, +K,F,Cs,I,,,,,,,, +1,1,0.001,1.00E-03,0.999,0.999,500,1500,902.35,10,, +2,2,0.025,2.50E-02,0.975,0.975,500,1500,778.15,5,894.15,10 +3,2,0.05,5.00E-02,0.95,0.95,500,1500,778.15,5,889.05,10 +4,2,0.1,1.00E-01,0.9,0.9,500,1500,784.45,5,872.95,10 +5,2,0.2,2.00E-01,0.8,0.8,500,1500,786.25,5,821.15,10 +6,2,0.25,2.50E-01,0.75,0.75,500,1500,786.85,5,802.95,10 +7,1,0.28,2.80E-01,0.72,0.72,500,1500,787.15,5,, +8,2,0.3,3.00E-01,0.7,0.7,500,1500,787.15,5,801.15,10 +9,2,0.34,3.40E-01,0.66,0.66,500,1500,786.85,5,842.65,10 +10,2,0.5,5.00E-01,0.5,0.5,500,1500,787.15,5,945.15,10 +11,1,0.6,6.00E-01,0.4,0.4,500,1500,787.15,5,, +12,1,0.694,6.94E-01,0.306,0.306,500,1500,1003.15,10,, +13,1,0.7,7.00E-01,0.3,0.3,500,1500,787.35,5,, +14,1,0.8,8.00E-01,0.2,0.2,500,1500,786.85,5,, +15,2,0.9,9.00E-01,0.1,0.1,500,1500,784.95,5,1084.45,10 +16,1,0.97,9.70E-01,0.03,0.03,500,1500,784.95,5,, +17,2,0.985,9.85E-01,0.015,0.015,500,1500,757.15,5,1121.95,10 +18,1,0.9999,1.00E+00,1E-04,1E-04,500,1500,859.2,10,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_KI-CsI.csv b/test/csv/MSTDBTC_KI-CsI.csv new file mode 100644 index 00000000..b62288e9 --- /dev/null +++ b/test/csv/MSTDBTC_KI-CsI.csv @@ -0,0 +1,24 @@ +System KI-CsI -- multiple data-sets provided by Scuro et al. Took lower heating rate values.,,,,,,,,,,,, +3 21,,,,,,,,,,,, +K,Cs,I,,,,,,,,,, +1,3,0.039,9.61E-01,1,500,1500,589.45,5,881.25,5,894.55,10 +2,2,0.07,9.30E-01,1,500,1500,873.15,5,889.75,5,, +3,2,0.11,8.90E-01,1,500,1500,812.85,5,879.15,5,, +4,2,0.15,8.50E-01,1,500,1500,826.75,5,881.25,5,, +5,3,0.195,8.05E-01,1,500,1500,811.35,5,826.75,5,862.45,10 +6,2,0.234,7.66E-01,1,500,1500,826.65,5,852.35,10,, +7,2,0.27,7.30E-01,1,500,1500,812.25,5,832.95,10,, +8,2,0.309,6.91E-01,1,500,1500,827.05,5,835.45,10,, +9,2,0.347,6.53E-01,1,500,1500,828.95,5,834.65,10,, +10,2,0.442,5.58E-01,1,500,1500,828.05,5,837.85,10,, +11,2,0.485,5.15E-01,1,500,1500,812.95,5,841.25,10,, +12,2,0.555,4.45E-01,1,500,1500,830.85,5,854.85,10,, +13,2,0.598,4.02E-01,1,500,1500,832.15,5,861.95,10,, +14,2,0.703,2.97E-01,1,500,1500,831.85,5,886.65,10,, +15,2,0.8,2.00E-01,1,500,1500,849.55,5,911.35,10,, +16,2,0.861,1.39E-01,1,500,1500,896.85,5,921.25,10,, +17,2,0.951,4.90E-02,1,500,1500,929.95,5,944.35,10,, +18,1,0.9999,1.00E-04,1,500,1500,952.15,5,,,, +19,2,0.2,8.00E-01,1,500,1500,830.85,5,864.25,10,, +20,1,0.31,6.90E-01,1,500,1500,832.15,5,,,, +21,2,0.8,2.00E-01,1,500,1500,845.45,5,912.75,10,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_LiF-CsF.csv b/test/csv/MSTDBTC_LiF-CsF.csv new file mode 100644 index 00000000..42a99224 --- /dev/null +++ b/test/csv/MSTDBTC_LiF-CsF.csv @@ -0,0 +1,11 @@ +System Li Cs F,,,,,,,,,,,, +3 9,,,,,,,,,,,, +Li,Cs,F,,,,,,,,,, +1,2,0.48,0.52,1,500,1500,752.7,15,765.5,15,, +2,2,0.445,0.555,1,500,1500,752.6,15,765.2,15,, +3,2,0.15,0.85,1,500,1500,751.9,5,916.8,10,, +4,2,0.523,0.477,1,500,1500,752.7,20,765.8,32,, +5,2,0.48,0.52,1,500,1500,752.7,15,765.5,15,, +6,2,0.425,0.575,1,500,1500,752.2,5,764.7,15,, +7,2,0.349,0.651,1,500,1500,752.2,5,795,25,, +8,2,0.15,0.85,1,500,1500,751.9,5,916.8,10,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_NaF-CsF.csv b/test/csv/MSTDBTC_NaF-CsF.csv new file mode 100644 index 00000000..5859b1e2 --- /dev/null +++ b/test/csv/MSTDBTC_NaF-CsF.csv @@ -0,0 +1,19 @@ +System Na Cs F,,,,,,,,,, +3 16,,,,,,,,,, +Na,Cs,F,,,,,,,, +1,1,0.9999,1.00E-04,1,500,1500,1273.6,2,, +2,2,0.9498,0.0502,1,500,1500,886.4,5,1262.6,5 +3,2,0.8806,0.1194,1,500,1500,890.1,5,1240.7,5 +4,2,0.7022,0.2978,1,500,1500,890.95,5,1177,5 +5,2,0.5878,0.4122,1,500,1500,893.45,5,1140.85,5 +6,2,0.4463,0.5537,1,500,1500,892.2,5,1057.1,5 +7,2,0.4,0.6,1,500,1500,892.35,5,1036.45,5 +8,2,0.3396,0.6604,1,500,1500,891.4,5,971.7,5 +9,2,0.2986,0.7014,1,500,1500,892.95,5,940.6,5 +10,2,0.2952,0.7048,1,500,1500,892.2,5,934.55,5 +11,2,0.2656,0.7344,1,500,1500,891.9,5,893.75,5 +12,1,0.2311,0.7689,1,500,1500,893.75,5,, +13,2,0.1903,0.8097,1,500,1500,892.95,5,905.9,5 +14,2,0.1454,0.8546,1,500,1500,890.9,5,922.95,5 +15,2,0.04,0.96,1,500,1500,886.95,5,966.15,5 +16,1,1E-04,0.9999,1,500,1500,976.95,2,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_NaF-KI.csv b/test/csv/MSTDBTC_NaF-KI.csv new file mode 100644 index 00000000..ef573be5 --- /dev/null +++ b/test/csv/MSTDBTC_NaF-KI.csv @@ -0,0 +1,12 @@ +System NaF-KI,,,,,,,,,,, +4 9,,,,,,,,,,, +Na,F,I,K,,,,,,,, +1,1,0.0001,0.0001,1,0.9999,700,1200,952.95,10,, +2,2,0.1,0.1,1,0.9,700,1200,918.85,5,945.15,10 +3,2,0.3,0.3,1,0.7,700,1200,873.15,5,911.65,10 +4,2,0.4,0.4,1,0.6,700,1200,859.95,5,885.85,10 +5,2,0.475,0.475,1,0.525,700,1200,856.55,5,872.55,10 +6,2,0.715,0.715,1,0.285,700,1200,857.55,5,882.85,10 +7,2,0.8,0.8,1,0.2,700,1200,860.95,5,891.95,10 +8,2,0.9,0.9,1,0.1,700,1200,893.15,5,917.95,10 +9,1,0.999,0.999,1,0.001,700,1200,931.15,10,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_NaI-CsI.csv b/test/csv/MSTDBTC_NaI-CsI.csv new file mode 100644 index 00000000..b74e8abb --- /dev/null +++ b/test/csv/MSTDBTC_NaI-CsI.csv @@ -0,0 +1,12 @@ +System NaI-CsI,,,,,,,,,, +3 7,,,,,,,,,, +Na,Cs,I,,,,,,,, +1,1,0.0001,1.00E+00,1,500,1500,900.25,10,, +2,2,0.213,7.87E-01,1,500,1500,704.75,5,842.95,10 +3,2,0.399,6.01E-01,1,500,1500,705.15,5,753.55,10 +4,2,0.528,4.72E-01,1,500,1500,704.95,5,735.25,10 +5,2,0.602,3.98E-01,1,500,1500,705.15,5,779.95,10 +6,2,0.799,2.01E-01,1,500,1500,705.55,5,867.95,10 +7,1,0.9999,1.00E-04,1,500,1500,931.05,5,, +,,,,,,,,,, +,,,,,,,,,, \ No newline at end of file diff --git a/test/csv/MSTDBTC_SrCl2-MgCl2.csv b/test/csv/MSTDBTC_SrCl2-MgCl2.csv new file mode 100644 index 00000000..37914ddc --- /dev/null +++ b/test/csv/MSTDBTC_SrCl2-MgCl2.csv @@ -0,0 +1,15 @@ +System SrCl2-MgCl2,,,,,,,,,,,,,, +3 12,,,,,,,,,,,,,, +Sr,Cl,Mg,,,,,,,,,,,, +1,2,0.1,2,0.9,500,1500,843.25,15,984.25,15,, +2,2,0.2,2,0.8,500,1550,846.35,10,962.75,35,, +3,2,0.3,2,0.7,500,1500,848.65,10,937.15,10,, +4,2,0.4,2,0.6,500,1500,849.55,5,906.55,10,, +5,2,0.5,2,0.5,500,1500,849.15,5,861.35,10,, +6,1,0.55,2,0.45,500,1500,830.35,5,,,,,, +7,2,0.6,2,0.4,500,1500,830.35,5,840.35,10,,,, +8,2,0.65,2,0.35,500,1500,830.45,5,884.45,10,,,, +9,2,0.7,2,0.3,500,1500,836.65,5,901.95,10,,,, +10,2,0.8,2,0.2,500,1500,837.75,5,1013.15,10,,,, +11,2,0.95,2,0.05,500,1500,835.15,5,1118.35,10,,,, +12,1,0.999,2,0.001,500,1500,1150.25,5,,,,,, \ No newline at end of file diff --git a/test/validation/TestValidationParser04.F90 b/test/regression/TestParserIO01.F90 similarity index 83% rename from test/validation/TestValidationParser04.F90 rename to test/regression/TestParserIO01.F90 index 4599f2c0..e9e3aae4 100644 --- a/test/validation/TestValidationParser04.F90 +++ b/test/regression/TestParserIO01.F90 @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser04 +program TestParserIO01 USE ModuleTesting USE ModuleThermoIO @@ -37,21 +37,22 @@ program TestValidationParser04 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'IO_CSV-01.csv', lPass) + call ParseCSVFile(DATA_DIRECTORY // 'IO_CSV-01.csv', lPass) ! Test for wrong number of elements if (INFOThermo == 67) then ! The test passed: - print *, 'TestValidationParser04: PASS' + print *, 'TestParserIO01: PASS' + !call ThermoDebug ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser04: FAIL <---' + print *, 'TestParserIO01: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if - -end program TestValidationParser04 + +end program TestParserIO01 diff --git a/test/validation/TestValidationParser05.F90 b/test/regression/TestParserIO02.F90 similarity index 83% rename from test/validation/TestValidationParser05.F90 rename to test/regression/TestParserIO02.F90 index 8c1d9621..a85f0a9a 100644 --- a/test/validation/TestValidationParser05.F90 +++ b/test/regression/TestParserIO02.F90 @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser05 +program TestParserIO02 USE ModuleTesting USE ModuleThermoIO @@ -37,21 +37,22 @@ program TestValidationParser05 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'IO_CSV-02.csv', lPass) + call ParseCSVFile(DATA_DIRECTORY // 'IO_CSV-02.csv', lPass) ! Too size of test number check if (INFOThermo == 63) then ! The test passed: - print *, 'TestValidationParser05: PASS' + print *, 'TestParserIO02: PASS' + call ThermoDebug ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser05: FAIL <---' + print *, 'TestParserIO02: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestValidationParser05 +end program TestParserIO02 diff --git a/test/validation/TestValidationParser06.F90 b/test/regression/TestParserIOC03.F90 similarity index 83% rename from test/validation/TestValidationParser06.F90 rename to test/regression/TestParserIOC03.F90 index 4f971c56..cbabc5d5 100644 --- a/test/validation/TestValidationParser06.F90 +++ b/test/regression/TestParserIOC03.F90 @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser06 +program TestParserIOC03 USE ModuleTesting USE ModuleThermoIO @@ -37,21 +37,22 @@ program TestValidationParser06 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'IO_CSV-03.csv', lPass) + call ParseCSVFile(DATA_DIRECTORY // 'IO_CSV-03.csv', lPass) ! Test for wrong number of elements if (INFOThermo == 69) then ! The test passed: - print *, 'TestValidationParser06: PASS' + call ThermoDebug + print *, 'TestParserIOC03: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser06: FAIL <---' + print *, 'TestParserIOC03: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestValidationParser06 +end program TestParserIOC03 diff --git a/test/regression/TestTransition01.F90 b/test/regression/TestTransition01.F90 index 8f172115..a4ea3a76 100644 --- a/test/regression/TestTransition01.F90 +++ b/test/regression/TestTransition01.F90 @@ -62,13 +62,13 @@ program TestTransition1 if (lPass) then ! The test passed: - print *, 'TestTransition1: PASS' + print *, 'TestTransition01: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition1: FAIL <---' + print *, 'TestTransition01: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) diff --git a/test/regression/TestTransition02.F90 b/test/regression/TestTransition02.F90 index ddb9b422..9d1a2114 100644 --- a/test/regression/TestTransition02.F90 +++ b/test/regression/TestTransition02.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestTransition2.F90 + !> \file TestTransition02.F90 !> \brief Testing phase transition subroutine !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestTransition2 +program TestTransition02 USE ModuleThermoIO USE ModuleThermo @@ -62,16 +62,16 @@ program TestTransition2 if (lPass) then ! The test passed: - print *, 'TestTransition2: PASS' + print *, 'TestTransition02: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition2: FAIL <---' + print *, 'TestTransition02: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition2 \ No newline at end of file +end program TestTransition02 \ No newline at end of file diff --git a/test/regression/TestTransition03.F90 b/test/regression/TestTransition03.F90 index 88d8f938..964a8abe 100644 --- a/test/regression/TestTransition03.F90 +++ b/test/regression/TestTransition03.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestTransition3.F90 + !> \file TestTransition03.F90 !> \brief Testing phase transition subroutine !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestTransition3 +program TestTransition03 USE ModuleThermoIO USE ModuleThermo @@ -62,16 +62,16 @@ program TestTransition3 if (lPass) then ! The test passed: - print *, 'TestTransition3: PASS' + print *, 'TestTransition03: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition3: FAIL <---' + print *, 'TestTransition03: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition3 \ No newline at end of file +end program TestTransition03 \ No newline at end of file diff --git a/test/regression/TestTransition04.F90 b/test/regression/TestTransition04.F90 index 07b5acce..288090fe 100644 --- a/test/regression/TestTransition04.F90 +++ b/test/regression/TestTransition04.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestTransition4.F90 + !> \file TestTransition04.F90 !> \brief Testing phase transition subroutine !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestTransition4 +program TestTransition04 USE ModuleThermoIO USE ModuleThermo @@ -62,16 +62,16 @@ program TestTransition4 if (lPass) then ! The test passed: - print *, 'TestTransition4: PASS' + print *, 'TestTransition04: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition4: FAIL <---' + print *, 'TestTransition04: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition4 \ No newline at end of file +end program TestTransition04 \ No newline at end of file diff --git a/test/regression/TestTransition05.F90 b/test/regression/TestTransition05.F90 index 488b6535..29fa1e46 100644 --- a/test/regression/TestTransition05.F90 +++ b/test/regression/TestTransition05.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestTransition5.F90 + !> \file TestTransition05.F90 !> \brief Testing phase transition subroutine !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestTransition5 +program TestTransition05 USE ModuleThermoIO USE ModuleThermo @@ -62,16 +62,16 @@ program TestTransition5 if (lPass) then ! The test passed: - print *, 'TestTransition5: PASS' + print *, 'TestTransition05: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition5: FAIL <---' + print *, 'TestTransition05: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition5 \ No newline at end of file +end program TestTransition05 \ No newline at end of file diff --git a/test/regression/TestTransition06.F90 b/test/regression/TestTransition06.F90 index f572580d..e254cc44 100644 --- a/test/regression/TestTransition06.F90 +++ b/test/regression/TestTransition06.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file TestTransition1.F90 + !> \file TestTransition06.F90 !> \brief Testing phase transition subroutine !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestTransition1 +program TestTransition06 USE ModuleThermoIO USE ModuleThermo @@ -62,16 +62,16 @@ program TestTransition1 if (lPass) then ! The test passed: - print *, 'TestTransition1: PASS' + print *, 'TestTransition06: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestTransition1: FAIL <---' + print *, 'TestTransition06: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestTransition1 \ No newline at end of file +end program TestTransition06 \ No newline at end of file diff --git a/test/validation/TestValidationParser01.F90 b/test/regression/TestTransition07.F90 similarity index 80% rename from test/validation/TestValidationParser01.F90 rename to test/regression/TestTransition07.F90 index 6c6ae974..241528aa 100644 --- a/test/validation/TestValidationParser01.F90 +++ b/test/regression/TestTransition07.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file ValidationParserTest01.F90 + !> \file TestTransition07.F90 !> \brief Testing validation parser !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser01 +program TestTransition07 USE ModuleTesting USE ModuleThermoIO @@ -37,20 +37,20 @@ program TestValidationParser01 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'KayeVerification.csv', lPass) - + call ParseCSVFile(CSV_DIRECTORY // 'KayeVerification.csv', lPass) + if (lPass) then ! The test passed: - print *, 'TestValidationParser01: PASS' + print *, 'TestTransition07: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser01: FAIL <---' + print *, 'TestTransition07: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestValidationParser01 +end program TestTransition07 diff --git a/test/validation/TestValidationParser02.F90 b/test/regression/TestTransition08.F90 similarity index 81% rename from test/validation/TestValidationParser02.F90 rename to test/regression/TestTransition08.F90 index afe890ca..5e0a1e8a 100644 --- a/test/validation/TestValidationParser02.F90 +++ b/test/regression/TestTransition08.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file ValidationParserTest01.F90 + !> \file TestTransition08.F90 !> \brief Testing validation parser !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser02 +program TestTransition08 USE ModuleTesting USE ModuleThermoIO @@ -37,20 +37,20 @@ program TestValidationParser02 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'Kaye_Mo-Ru.csv', lPass) + call ParseCSVFile(CSV_DIRECTORY // 'Kaye_Mo-Ru.csv', lPass) if (lPass) then ! The test passed: - print *, 'TestValidationParser02: PASS' + print *, 'TestTransition08: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser02: FAIL <---' + print *, 'TestTransition08: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestValidationParser02 +end program TestTransition08 diff --git a/test/validation/TestValidationParser03.F90 b/test/regression/TestTransition09.F90 similarity index 81% rename from test/validation/TestValidationParser03.F90 rename to test/regression/TestTransition09.F90 index 782ed532..395f81cd 100644 --- a/test/validation/TestValidationParser03.F90 +++ b/test/regression/TestTransition09.F90 @@ -1,6 +1,6 @@ !------------------------------------------------------------------------------------------------------------- ! - !> \file ValidationParserTest01.F90 + !> \file TestTransition09.F90 !> \brief Testing validation parser !> \author A.E.F. Fitzsimmons ! @@ -17,7 +17,7 @@ !! ! !------------------------------------------------------------------------------------------------------------- -program TestValidationParser03 +program TestTransition09 USE ModuleTesting USE ModuleThermoIO @@ -37,20 +37,20 @@ program TestValidationParser03 cThermoFileName = DATA_DIRECTORY // "MoPdRuRhTc-Kaye.dat" call ParseCSDataFile(cThermoFileName) - call ParseValidation(DATA_DIRECTORY // 'Kaye_Pd-Tc.csv', lPass) + call ParseCSVFile(CSV_DIRECTORY // 'Kaye_Pd-Tc.csv', lPass) if (lPass) then ! The test passed: - print *, 'TestValidationParser03: PASS' + print *, 'TestTransition09: PASS' ! Reset Thermochimica: call ResetThermo call EXIT(0) else ! The test failed. - print *, 'TestValidationParser03: FAIL <---' + print *, 'TestTransition09: FAIL <---' ! Reset Thermochimica: call ResetThermo call EXIT(1) end if -end program TestValidationParser03 +end program TestTransition09 diff --git a/test/validation/TestValidation01.F90 b/test/validation/TestValidation01.F90 new file mode 100644 index 00000000..7d143345 --- /dev/null +++ b/test/validation/TestValidation01.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation01.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 07/30/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation01 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Lipkina_LiFCsF.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_LiF-CsF.csv', lPass) + + !call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation01: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation01: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation01 diff --git a/test/validation/TestValidation02.F90 b/test/validation/TestValidation02.F90 new file mode 100644 index 00000000..ee8656ac --- /dev/null +++ b/test/validation/TestValidation02.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation02.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation02 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_MgCl2SrCl2.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_SrCl2-MgCl2.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation02: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation02: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation02 diff --git a/test/validation/TestValidation03.F90 b/test/validation/TestValidation03.F90 new file mode 100644 index 00000000..6ebbf047 --- /dev/null +++ b/test/validation/TestValidation03.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation03.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation03 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_KFCsI.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_KF-CsI.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation03: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation03: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation03 diff --git a/test/validation/TestValidation04.F90 b/test/validation/TestValidation04.F90 new file mode 100644 index 00000000..eb4b4887 --- /dev/null +++ b/test/validation/TestValidation04.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation04.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation04 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_KICsI.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_KI-CsI.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation04: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation04: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation04 diff --git a/test/validation/TestValidation05.F90 b/test/validation/TestValidation05.F90 new file mode 100644 index 00000000..6522221b --- /dev/null +++ b/test/validation/TestValidation05.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation05.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation05 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_MgCl2SrCl2.dat" ! No Data + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_NaF-KI.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation05: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation05: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation05 diff --git a/test/validation/TestValidation06.F90 b/test/validation/TestValidation06.F90 new file mode 100644 index 00000000..2aa6b71d --- /dev/null +++ b/test/validation/TestValidation06.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation06.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation06 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_NaICsI.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_NaI-CsI.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation06: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation06: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation06 diff --git a/test/validation/TestValidation07.F90 b/test/validation/TestValidation07.F90 new file mode 100644 index 00000000..993ea7c5 --- /dev/null +++ b/test/validation/TestValidation07.F90 @@ -0,0 +1,59 @@ + !------------------------------------------------------------------------------------------------------------- + ! + !> \file TestValidation07.F90 + !> \brief Testing validation parser + !> \author A.E.F. Fitzsimmons + ! + ! + ! Revisions: + ! ========== + ! Date Programmer Description of change + ! ---- ---------- --------------------- + ! 08/11/2025 A.E.F. Fitzsimmons Original Code + ! + ! Purpose: + ! ======== + !> \details Validation of LiF-CsF system. Basked on Lipkina's Project + !! + ! + !------------------------------------------------------------------------------------------------------------- +program TestValidation07 + USE ModuleTesting + USE ModuleThermoIO + + implicit none + real(8), dimension(15) :: dPhaseTransitionTemp + logical :: lPass + + lPass = .FALSE. + dPhaseTransitionTemp = 0D0 + nMaxPhaseTransition = SIZE(dPhaseTransitionTemp) + + cInputUnitTemperature = 'K' + cInputUnitPressure = 'atm' + cInputUnitMass = 'moles' + dPressure = 1D0 + dTemperature = 1000D0 + cThermoFileName = DATA_DIRECTORY // "Scuro_NaFCsI.dat" + + call ParseCSDataFile(cThermoFileName) + call ParseCSVFile(CSV_DIRECTORY // 'MSTDBTC_NaF-CsF.csv', lPass) + + call ThermoDebug + + ! Test for wrong number of elements + if (lPass) then + ! The test passed: + print *, 'TestValidation07: PASS' + ! Reset Thermochimica: + call ResetThermo + call EXIT(0) + else + ! The test failed. + print *, 'TestValidation07: FAIL <---' + ! Reset Thermochimica: + call ResetThermo + call EXIT(1) + end if + +end program TestValidation07 From 0c6cd5412c96c93933f99b2f7f86457bbfe76f4b Mon Sep 17 00:00:00 2001 From: aidanfitz Date: Fri, 15 Aug 2025 07:26:22 -0400 Subject: [PATCH 34/34] git ignore return --- .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bc16bd6a..7428799c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,9 @@ test/doc/ # ignore outputs *.out *.txt -#*.dat -#*.DAT -#*.Dat +*.dat +*.DAT +*.Dat *.json *.pdf *.mod @@ -30,7 +30,7 @@ test/doc/ *.so *.0 *.lai -#*.csv +*.csv *.pkl Thermo-debugging.F90 @@ -38,7 +38,7 @@ Thermo-debugging.F90 .vscode/ # some of these will occasionally require manual override -#data/ +data/ python/ private_tests