diff --git a/tea/janaf.py b/tea/janaf.py new file mode 100644 index 00000000..adbe7449 --- /dev/null +++ b/tea/janaf.py @@ -0,0 +1,307 @@ +# This file is open-source software under the GNU GENERAL PUBLIC LICENSE +# Version 2, June 1991 + +__all__ = [ + 'get_filenames', + 'read_file', + 'read_stoich', + 'setup_network', +] + +import os +from pathlib import Path + +import more_itertools +import numpy as np +import scipy.interpolate as si +import scipy.constants as sc + + +ROOT = str(Path(__file__).parents[1]) + os.path.sep + + +def get_filenames(species): + """ + Convert species names to their respective JANAF file names. + + Parameters + ---------- + species: String or 1D string iterable + Species to search. + + Returns + ------- + janaf_names: 1D string array + Array of janaf filenames. If a species is not found, + return None in its place. + + Examples + -------- + >>> import tea.janaf as janaf + >>> species = 'H2O CH4 CO CO2 H2 e- H- H+ H2+ Na'.split() + >>> janaf_files = janaf.get_filenames(species) + >>> for mol, jfile in zip(species, janaf_files): + >>> print(f'{mol:5} {jfile}') + H2O H-064.txt + CH4 C-067.txt + CO C-093.txt + CO2 C-095.txt + H2 H-050.txt + e- D-020.txt + H- H-003.txt + H+ H-002.txt + H2+ H-051.txt + Na Na-005.txt + """ + species = np.atleast_1d(species) + + janaf_dict = {} + for line in open(f'{ROOT}tea/janaf_conversion.txt', 'r'): + species_name, janaf_name = line.split() + janaf_dict[species_name] = janaf_name + + janaf_names = [ + janaf_dict[molec] if molec in janaf_dict else None + for molec in species + ] + return janaf_names + + +def read_file(janaf_file): + """ + Read a JANAF file to extract tabulated thermal properties. + + Parameters + ---------- + janaf_file: 1D string array + A JANAF filename. + + Returns + ------- + temps: 1D double array + Tabulated JANAF temperatures (K). + heat_capacity: 1D double array + Tabulated JANAF heat capacity cp/R (unitless). + gibbs_free_energy: 1D double array + Tabulated JANAF Gibbs free energy G/RT (unitless). + + Examples + -------- + >>> import tea.janaf as janaf + >>> janaf_file = 'H-064.txt' # Water + >>> temps, heat, gibbs = janaf.read_file(janaf_file) + >>> for i in range(5): + >>> print(f'{temps[i]:6.2f} {heat[i]:.3f} {gibbs[i]:.3f}') + 100.00 4.005 -317.133 + 200.00 4.011 -168.505 + 298.15 4.040 -120.263 + 300.00 4.041 -119.662 + 400.00 4.121 -95.583 + + >>> janaf_file = 'D-020.txt' # electron + >>> temps, heat, gibbs = janaf.read_file(janaf_file) + >>> for i in range(5): # temperatures with missing values are ignored + >>> print(f'{temps[i]:6.2f} {heat[i]:.3f} {gibbs[i]:.3f}') + 298.15 2.500 -2.523 + 300.00 2.500 -2.523 + 350.00 2.500 -2.554 + 400.00 2.500 -2.621 + 450.00 2.500 -2.709 + """ + janaf_data = np.genfromtxt( + f'{ROOT}/janaf/{janaf_file}', + skip_header=3, usecols=(0,1,3,5), delimiter='\t', + filling_values=np.nan, + unpack=True, + ) + temps = janaf_data[0] + heat_capacity = janaf_data[1] / sc.R + + # https://janaf.nist.gov/pdf/JANAF-FourthEd-1998-1Vol1-Intro.pdf + # Page 15 + df_H298 = janaf_data[3][temps==298.15] + gibbs_free_energy = (-janaf_data[2] + df_H298*1000.0/temps) / sc.R + + idx_valid = np.isfinite(heat_capacity) + return ( + temps[idx_valid], + heat_capacity[idx_valid], + gibbs_free_energy[idx_valid], + ) + + +def read_stoich(species=None, janaf_file=None, formula=None): + """ + Get the stoichiometric data from the JANAF data base for the + requested species. + + Parameters + ---------- + species: String + A species name (takes precedence over janaf_file argument). + janaf_file: String + A JANAF filename. + formula: String + A chemical formula in JANAF format (takes precedence over + species and janaf_file arguments). + + Returns + ------- + stoich: Dictionary + Dictionary containing the stoichiometric values for the + requested species. The dict's keys are the elements/electron + names and their values are the respective stoich values. + + Examples + -------- + >>> import tea.janaf as janaf + >>> # From species name: + >>> for species in 'C H2O e- H2+'.split(): + >>> print(f'{species}: {janaf.read_stoich(species)}') + C: {'C': 1.0} + H2O: {'H': 2.0, 'O': 1.0} + e-: {'e': 1.0} + H2+: {'e': -1, 'H': 2.0} + + >>> # From JANAF filename: + >>> print(janaf.read_stoich(janaf_file='H-064.txt')) + {'H': 2.0, 'O': 1.0} + + >>> # Or directly from the chemical formula: + >>> print(janaf.read_stoich(formula='H3O1+')) + {'e': -1, 'H': 3.0, 'O': 1.0} + """ + # Get chemical formula (JANAF format): + if formula is None and species is not None: + janaf_file = get_filenames(species)[0] + if formula is None and janaf_file is not None: + with open(f'{ROOT}/janaf/{janaf_file}', 'r') as f: + header = f.readline() + formula = header.split('\t')[-1] + formula = formula[0:formula.index('(')] + + if '-' in formula: + stoich = {'e': 1} + elif '+' in formula: + stoich = {'e': -1} + else: + stoich = {} + + previous_type = formula[0].isalpha() + word = '' + groups = [] + for letter in formula.replace('-','').replace('+',''): + if letter.isalpha() != previous_type: + groups.append(word) + word = '' + word += letter + previous_type = letter.isalpha() + groups.append(word) + for e, num in more_itertools.chunked(groups,2): + stoich[e] = float(num) + return stoich + + +def setup_network(input_species): + """ + Extract JANAF thermal data for a requested chemical network. + + Parameters + ---------- + species: 1D string iterable + Species to search in the JANAF data base. + + Returns + ------- + species: 1D string array + Species found in the JANAF database (might differ from input_species). + elements: 1D string array + Elements for this chemical network. + heat_capacity: 1D list of callable objects + Functions that return the species's heat capacity: cp/R. + gibbs_free_energy: 1D list of callable objects + Functions that return the species's Gibbs free energy, G/RT. + stoich_vals: 2D integer array + Array containing the stoichiometric values for the + requested species sorted according to the species and elements + arrays. + + Examples + -------- + >>> import tea.janaf as janaf + >>> molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + >>> + >>> species, elements, heat_capacity, stoich_vals = \ + >>> janaf.setup_network(molecules) + >>> print( + >>> f'species:\n {species}\n' + >>> f'elements:\n {elements}\n' + >>> f'stoichiometric values:\n{stoich_vals}') + species: + ['H2O' 'CH4' 'CO' 'CO2' 'NH3' 'N2' 'H2' 'HCN' 'OH' 'H' 'He' 'C' 'N' 'O'] + elements: + ['C' 'H' 'He' 'N' 'O'] + stoichiometric values: + [[0 2 0 0 1] + [1 4 0 0 0] + [1 0 0 0 1] + [1 0 0 0 2] + [0 3 0 1 0] + [0 0 0 2 0] + [0 2 0 0 0] + [1 1 0 1 0] + [0 1 0 0 1] + [0 1 0 0 0] + [0 0 1 0 0] + [1 0 0 0 0] + [0 0 0 1 0] + [0 0 0 0 1]] + """ + # Find which species exists in data base: + janaf_species = get_filenames(input_species) + nspecies = len(input_species) + idx_missing = np.array([janaf is None for janaf in janaf_species]) + if np.any(idx_missing): + missing_species = np.array(input_species)[idx_missing] + print(f'These input species were not found:\n {missing_species}') + + species = np.array(input_species)[~idx_missing] + janaf_files = np.array(janaf_species)[~idx_missing] + + nspecies = len(species) + heat_capacity = [] + gibbs_free_energy = [] + stoich_data = [] + for i in range(nspecies): + janaf = janaf_files[i] + janaf_data = read_file(janaf) + temp = janaf_data[0] + heat = janaf_data[1] + gibbs = janaf_data[2] + + heat_capacity.append(si.interp1d( + temp, heat, fill_value='extrapolate')) + gibbs_free_energy.append(si.interp1d( + temp, gibbs, kind='cubic', fill_value='extrapolate')) + stoich_data.append(read_stoich(janaf_file=janaf)) + + elements = [] + for s in stoich_data: + elements += list(s.keys()) + elements = sorted(set(elements)) + + nelements = len(elements) + stoich_vals = np.zeros((nspecies, nelements), int) + for i in range(nspecies): + for key,val in stoich_data[i].items(): + j = elements.index(key) + stoich_vals[i,j] = val + elements = np.array(elements) + + return ( + species, + elements, + heat_capacity, + gibbs_free_energy, + stoich_vals, + ) diff --git a/tea/janaf_conversion.txt b/tea/janaf_conversion.txt new file mode 100644 index 00000000..f3a34778 --- /dev/null +++ b/tea/janaf_conversion.txt @@ -0,0 +1,1781 @@ +Al2 Al-080.txt +Al2O2+ Al-095.txt +Al2O3_cr_Alpha Al-096.txt +Al2O3_cr_Delta Al-097.txt +Al2O3_cr_Gamma Al-098.txt +Al2O3_cr_Kappa Al-099.txt +Al2O3_cr-l Al-101.txt +Al2O3_l Al-100.txt +Al2O Al-092.txt +Al2O+ Al-093.txt +Al2S3_cr Al-105.txt +Al2SiO5_cr_Andalusite Al-102.txt +Al2SiO5_cr_Kyanite Al-103.txt +Al2SiO5_cr_Sillimanite Al-104.txt +Al4C3_cr C-139.txt +Al6Si2O13_cr Al-112.txt +AlBO2 Al-008.txt +(AlBr3)2 Al-084.txt +AlBr3_cr-l Al-012.txt +AlBr3_cr Al-010.txt +AlBr3 Al-013.txt +AlBr3_l Al-011.txt +AlBr Al-009.txt +AlC C-006.txt +AlCl2F Al-024.txt +AlCl2 Al-021.txt +AlCl2- Al-023.txt +AlCl2+ Al-022.txt +(AlCl3)2 Al-085.txt +AlCl3_cr-l Al-027.txt +AlCl3_cr Al-025.txt +AlCl3 Al-028.txt +AlCl3_l Al-026.txt +AlClF2 Al-018.txt +AlClF Al-016.txt +AlClF+ Al-017.txt +AlCl Al-014.txt +AlCl+ Al-015.txt +Al_cr-l Al-004.txt +Al_cr Al-002.txt +AlF2 Al-036.txt +AlF2- Al-038.txt +AlF2+ Al-037.txt +(AlF3)2 Al-087.txt +AlF3_cr-l Al-043.txt +AlF3_cr Al-041.txt +AlF3 Al-044.txt +AlF3_l Al-042.txt +AlF4- Al-045.txt +AlF Al-033.txt +AlF+ Al-034.txt +Al Al-005.txt +AlH Al-056.txt +(AlI3)2 Al-088.txt +AlI3_cr-l Al-066.txt +AlI3_cr Al-064.txt +AlI3 Al-067.txt +AlI3_l Al-065.txt +AlI Al-063.txt +Al- Al-007.txt +Al+ Al-006.txt +Al_l Al-003.txt +AlN_cr Al-071.txt +AlN Al-072.txt +AlO2 Al-077.txt +(AlO)2 Al-094.txt +AlO2- Al-078.txt +AlO Al-074.txt +AlOH Al-058.txt +AlOH- Al-060.txt +AlOH+ Al-059.txt +AlO- Al-076.txt +AlO+ Al-075.txt +Al_ref Al-001.txt +AlS Al-079.txt +Ar+ Ar-002.txt +Ar Ar-001.txt +B10H14_cr-l B-138.txt +B10H14_cr B-136.txt +B10H14 B-139.txt +B10H14_l B-137.txt +B2 B-083.txt +B2H6 B-091.txt +B2O3_cr-l B-097.txt +B2O3_cr B-095.txt +B2O3 B-098.txt +B2O3_l B-096.txt +B2O B-093.txt +B3H2O3F B-107.txt +B3H3O3_cr B-111.txt +B3H3O3 B-112.txt +B3H6N3 B-114.txt +B3HO3F2 B-108.txt +B3O3Cl3 B-106.txt +B3O3F3_cr B-109.txt +B3O3F3 B-110.txt +B4C_cr-l C-010.txt +B4C_cr C-008.txt +B4C_l C-009.txt +B5H9 B-127.txt +B5H9_l B-126.txt +BaBr2_cr-l Ba-010.txt +BaBr2_cr Ba-008.txt +BaBr2 Ba-011.txt +BaBr2_l Ba-009.txt +BaBr Ba-007.txt +BaCl2_cr-l Ba-015.txt +BaCl2_cr Ba-013.txt +BaCl2 Ba-016.txt +BaCl2_l Ba-014.txt +BaCl Ba-012.txt +Ba_cr-l Ba-004.txt +Ba_cr Ba-002.txt +BaF2_cr-l Ba-021.txt +BaF2_cr Ba-019.txt +BaF2 Ba-022.txt +BaF2_l Ba-020.txt +BaF Ba-017.txt +BaF+ Ba-018.txt +Ba Ba-005.txt +BaI2_cr-l Ba-032.txt +BaI2_cr Ba-030.txt +BaI2 Ba-033.txt +BaI2_l Ba-031.txt +BaI Ba-029.txt +Ba+ Ba-006.txt +Ba_l Ba-003.txt +BaO_cr-l Ba-036.txt +BaO_cr Ba-034.txt +BaO Ba-037.txt +Ba(OH)2_cr-l Ba-027.txt +Ba(OH)2_cr Ba-025.txt +Ba(OH)2 Ba-028.txt +Ba(OH)2_l Ba-026.txt +BaOH Ba-023.txt +BaOH+ Ba-024.txt +BaO_l Ba-035.txt +Ba_ref Ba-001.txt +BaS_cr Ba-038.txt +BaS Ba-039.txt +BBr2Cl B-016.txt +BBr2F B-017.txt +BBr2 B-015.txt +BBr3 B-020.txt +BBr3_l B-019.txt +BBrCl2 B-011.txt +BBrCl B-010.txt +BBrF2 B-013.txt +BBrF B-012.txt +BBr B-009.txt +BC C-007.txt +(BCl2)2 B-086.txt +BCl2F B-029.txt +BCl2 B-026.txt +BCl2- B-028.txt +BCl2+ B-027.txt +BCl3 B-031.txt +BClF2 B-024.txt +BClF B-023.txt +BCl B-021.txt +BCl+ B-022.txt +B_cr-l B-004.txt +B_cr B-002.txt +Be2C_cr-l C-013.txt +Be2C_cr C-011.txt +Be2C_l C-012.txt +Be2 Be-055.txt +Be2O Be-058.txt +Be2SiO4_cr Be-060.txt +Be3B2O6_cr B-085.txt +Be3N2_cr-l Be-063.txt +Be3N2_cr Be-061.txt +Be3N2_l Be-062.txt +BeAl2O4_cr-l Al-083.txt +BeAl2O4_cr Al-081.txt +BeAl2O4_l Al-082.txt +BeAl6O10_cr-l Al-111.txt +BeAl6O10_cr Al-109.txt +BeAl6O10_l Al-110.txt +Be(BO2)2 B-084.txt +BeBO2 B-008.txt +BeBr2_cr Be-008.txt +BeBr2 Be-009.txt +BeBr Be-007.txt +BeC2 C-115.txt +(BeCl2)2 Be-056.txt +BeCl2_cr_Alpha Be-013.txt +BeCl2_cr_Beta Be-014.txt +BeCl2_cr-l Be-016.txt +BeCl2 Be-017.txt +BeCl2_l Be-015.txt +BeClF Be-012.txt +BeCl Be-010.txt +BeCl+ Be-011.txt +Be_cr-l Be-004.txt +Be_cr Be-002.txt +BeF2_cr-l Be-021.txt +BeF2_cr Be-019.txt +BeF2 Be-022.txt +BeF2_l Be-020.txt +BeF Be-018.txt +Be Be-005.txt +BeH2 Be-034.txt +BeH Be-030.txt +BeH+ Be-031.txt +BeI2_cr-l Be-041.txt +BeI2_cr Be-039.txt +BeI2 Be-042.txt +BeI2_l Be-040.txt +BeI Be-038.txt +Be+ Be-006.txt +Be_l Be-003.txt +BeN Be-043.txt +(BeO)2 Be-059.txt +(BeO)3 Be-064.txt +(BeO)4 Be-065.txt +(BeO)5 Be-066.txt +(BeO)6 Be-067.txt +BeO_cr_Alpha Be-044.txt +BeO_cr_Beta Be-045.txt +BeO_cr-l Be-047.txt +BeO Be-048.txt +Be(OH)2_cr_Alpha Be-035.txt +Be(OH)2_cr_Beta Be-036.txt +Be(OH)2 Be-037.txt +BeOH Be-032.txt +BeOH+ Be-033.txt +BeO_l Be-046.txt +Be_ref Be-001.txt +BeS_cr Be-053.txt +BeS Be-054.txt +BeSO4_cr_Alpha Be-049.txt +BeSO4_cr_Beta Be-050.txt +BeSO4_cr_Gamma Be-051.txt +BeWO4_cr Be-052.txt +(BF2)2 B-087.txt +BF2 B-034.txt +BF2- B-036.txt +BF2+ B-035.txt +BF2OH B-038.txt +BF3 B-040.txt +BF B-032.txt +B B-005.txt +BH2 B-053.txt +BH3 B-055.txt +BHBr2 B-018.txt +BHCl2 B-030.txt +BHF2 B-037.txt +BH B-045.txt +BI2 B-062.txt +BI3 B-063.txt +BI B-061.txt +B- B-007.txt +B+ B-006.txt +B_l B-003.txt +BN_cr B-072.txt +BN B-073.txt +BO2 B-079.txt +(BO)2 B-094.txt +BO2- B-080.txt +BO B-078.txt +(B(OH)2)2_cr B-089.txt +(B(OH)2)2 B-090.txt +B(OH)2 B-054.txt +Br2_cr-l Br-039.txt +Br2 Br-040.txt +Br2_ref Br-038.txt +BrCl Br-005.txt +BrCN C-016.txt +B_ref B-001.txt +BrF3 Br-007.txt +BrF5 Br-008.txt +BrF Br-006.txt +Br Br-001.txt +Br- Br-003.txt +Br+ Br-002.txt +BS B-081.txt +C2Cl2 C-116.txt +C2Cl4 C-117.txt +C2Cl6 C-118.txt +C2F2 C-120.txt +C2F4 C-122.txt +C2F6 C-123.txt +C2 C-113.txt +C2H2 C-127.txt +C2H4 C-128.txt +C2H4O C-129.txt +C2HCl C-125.txt +C2HF C-126.txt +C2H C-124.txt +C2- C-114.txt +C2N C-133.txt +C2O C-136.txt +C3 C-138.txt +C3O2 C-142.txt +C4 C-143.txt +C4N2 C-145.txt +C5 C-148.txt +Ca2 Ca-033.txt +CaBr2_cr-l Br-043.txt +CaBr2_cr Br-041.txt +CaBr2 Br-044.txt +CaBr2_l Br-042.txt +CaBr Br-004.txt +CaCl2_cr-l Ca-011.txt +CaCl2_cr Ca-009.txt +CaCl2 Ca-012.txt +CaCl2_l Ca-010.txt +CaCl Ca-008.txt +Ca_cr_Alpha Ca-002.txt +Ca_cr_Beta Ca-003.txt +Ca_cr-l Ca-005.txt +CaF2_cr-l Ca-016.txt +CaF2_cr Ca-014.txt +CaF2 Ca-017.txt +CaF2_l Ca-015.txt +CaF Ca-013.txt +Ca Ca-006.txt +CaI2_cr-l Ca-025.txt +CaI2_cr Ca-023.txt +CaI2 Ca-026.txt +CaI2_l Ca-024.txt +CaI Ca-022.txt +Ca+ Ca-007.txt +Ca_l Ca-004.txt +CaO_cr-l Ca-029.txt +CaO_cr Ca-027.txt +CaO Ca-030.txt +Ca(OH)2_cr Ca-020.txt +Ca(OH)2 Ca-021.txt +CaOH Ca-018.txt +CaOH+ Ca-019.txt +CaO_l Ca-028.txt +Ca_ref Ca-001.txt +CaS_cr Ca-031.txt +CaS Ca-032.txt +CBr4 C-017.txt +CBrF3 C-015.txt +CBr C-014.txt +CCl2F2 C-024.txt +CCl2 C-023.txt +CCl3F C-027.txt +CCl3 C-026.txt +CCl4 C-028.txt +CClF3 C-020.txt +CCl C-018.txt +CF2 C-034.txt +CF2+ C-035.txt +CF3CN C-121.txt +CF3 C-037.txt +CF3+ C-038.txt +CF3OF C-041.txt +CF3SF5 C-042.txt +CF4 C-040.txt +CF C-030.txt +CF+ C-031.txt +C C-003.txt +CH2Cl2 C-059.txt +CH2ClF C-058.txt +CH2F2 C-060.txt +CH2 C-057.txt +CH3Cl C-063.txt +CH3F C-065.txt +CH3 C-062.txt +CH4 C-067.txt +CHCl2F C-047.txt +CHCl3 C-048.txt +CHClF2 C-046.txt +CHCl C-045.txt +CHF3 C-051.txt +CHF C-049.txt +CH C-043.txt +CH+ C-044.txt +CHP C-056.txt +CIF3 C-039.txt +C- C-005.txt +C+ C-004.txt +Cl2O Cl-103.txt +Cl2 Cl-073.txt +ClCN C-021.txt +ClF3 Cl-021.txt +ClF5 Cl-023.txt +ClF Cl-015.txt +Cl Cl-001.txt +Cl- Cl-003.txt +Cl+ Cl-002.txt +ClO2 Cl-061.txt +ClO3F Cl-019.txt +ClO Cl-059.txt +ClSSCl Cl-117.txt +ClSSCl_l Cl-116.txt +(CN)2 C-134.txt +CN C-080.txt +CNI C-068.txt +CN- C-082.txt +CN+ C-081.txt +CNN C-088.txt +CO2 C-095.txt +CO2- C-096.txt +Co3O4_cr Co-015.txt +(CoCl2)2 Cl-148.txt +CoCl2_cr-l Cl-076.txt +CoCl2_cr Cl-074.txt +CoCl2as Cl-077.txt +COCl2 C-025.txt +CoCl2_l Cl-075.txt +CoCl3 Cl-131.txt +COClF C-019.txt +CoClas Cl-004.txt +COCl C-022.txt +Co_cr-l Co-004.txt +Co_cr Co-002.txt +CoF2_cr-l Co-010.txt +CoF2_cr Co-008.txt +CoF2as Co-011.txt +COF2 C-036.txt +CoF2_l Co-009.txt +CoF3_cr Co-012.txt +COF C-033.txt +Coas Co-005.txt +CO C-093.txt +Co- Co-007.txt +Co+ Co-006.txt +Co_l Co-003.txt +CoO_cr Co-013.txt +Co Co-001.txt +COS C-094.txt +CoSO4_cr Co-014.txt +CP C-097.txt +Cr23C6_cr C-151.txt +Cr2N_cr Cr-013.txt +Cr2O3_cr-l Cr-016.txt +Cr2O3_cr Cr-014.txt +Cr2O3_l Cr-015.txt +Cr3C2_cr C-119.txt +Cr7C3_cr C-140.txt +Cr_cr-l Cr-004.txt +Cr_cr Cr-002.txt +C_ref C-002.txt +Cr Cr-005.txt +Cr- Cr-007.txt +Cr+ Cr-006.txt +Cr_l Cr-003.txt +CrN_cr Cr-008.txt +CrN Cr-009.txt +CrO2 Cr-011.txt +CrO3 Cr-012.txt +CrO Cr-010.txt +Cr_ref Cr-001.txt +Cs2as Cs-018.txt +CS2 C-099.txt +Cs2O Cs-021.txt +Cs2SO4_cr_II Cs-023.txt +Cs2SO4_cr_I Cs-022.txt +Cs2SO4_cr-l Cs-025.txt +Cs2SO4 Cs-026.txt +Cs2SO4_l Cs-024.txt +(CsCl)2 Cl-078.txt +CsCl_cr-l Cl-007.txt +CsCl_cr Cl-005.txt +CsCl Cl-008.txt +CsCl_l Cl-006.txt +Cs_cr-l Cs-004.txt +Cs_cr Cs-002.txt +(CsF)2 Cs-019.txt +CsF_cr-l Cs-010.txt +CsF_cr Cs-008.txt +CsF Cs-011.txt +CsF_l Cs-009.txt +Csas Cs-005.txt +CS C-098.txt +Cs- Cs-007.txt +Cs+ Cs-006.txt +Cs_l Cs-003.txt +CsO Cs-017.txt +(CsOH)2 Cs-020.txt +CsOH_cr-l Cs-014.txt +CsOH_cr Cs-012.txt +CsOH Cs-015.txt +CsOH+ Cs-016.txt +CsOH_l Cs-013.txt +Cs Cs-001.txt +Cu2 Cu-018.txt +Cu2O_cr-l Cu-021.txt +Cu2O_cr Cu-019.txt +Cu2O_l Cu-020.txt +CuCl2_cr Cl-079.txt +(CuCl)3 Cl-132.txt +CuCl_cr-l Cl-011.txt +CuCl_cr Cl-009.txt +CuCl Cl-012.txt +CuCl_l Cl-010.txt +CuCN_cr C-029.txt +Cu_cr-l Cu-004.txt +Cu_cr Cu-002.txt +CuF2_cr-l Cu-012.txt +CuF2_cr Cu-010.txt +CuF2 Cu-013.txt +CuF2_l Cu-011.txt +CuF_cr Cu-008.txt +CuF Cu-009.txt +Cu Cu-005.txt +Cu- Cu-007.txt +Cu+ Cu-006.txt +Cu_l Cu-003.txt +CuO_cr Cu-015.txt +CuO.CuSO4_cr Cu-022.txt +CuO Cu-016.txt +Cu(OH)2_cr Cu-014.txt +Cu_ref Cu-001.txt +CuSO4_cr Cu-017.txt +D2- D-014.txt +D2+ D-013.txt +D2O D-017.txt +D2 D-012.txt +D2S D-018.txt +DCl Cl-013.txt +DF D-004.txt +D D-001.txt +D- D-003.txt +D+ D-002.txt +DNND D-016.txt +DOCl Cl-014.txt +e- D-020.txt +F2 F-054.txt +FCN C-032.txt +Fe2O3_cr Fe-030.txt +Fe2(SO4)3_cr Fe-031.txt +Fe3O4_cr Fe-032.txt +(FeBr2)2 Br-091.txt +FeBr2_cr-l Br-047.txt +FeBr2_cr Br-045.txt +FeBr2 Br-048.txt +FeBr2_l Br-046.txt +(FeCl2)2 Cl-149.txt +FeCl2_cr-l Cl-083.txt +FeCl2_cr Cl-081.txt +FeCl2 Cl-084.txt +FeCl2_l Cl-082.txt +(FeCl3)2 Cl-186.txt +FeCl3_cr-l Cl-136.txt +FeCl3_cr Cl-134.txt +FeCl3 Cl-137.txt +FeCl3_l Cl-135.txt +FeCl Cl-025.txt +Fe(CO)5 C-150.txt +Fe(CO)5_l C-149.txt +Fe_cr_Alpha-Delta Fe-004.txt +Fe_cr_Gamma Fe-005.txt +Fe_cr-l Fe-007.txt +FeF2_cr-l F-057.txt +FeF2_cr F-055.txt +FeF2 F-058.txt +FeF2_l F-056.txt +FeF3_cr F-111.txt +FeF3 F-112.txt +FeF F-004.txt +Fe Fe-008.txt +(FeI2)2 Fe-029.txt +FeI2_cr-l Fe-016.txt +FeI2_cr Fe-014.txt +FeI2 Fe-017.txt +FeI2_l Fe-015.txt +Fe- Fe-010.txt +Fe+ Fe-009.txt +Fe_l Fe-006.txt +FeO_cr-l Fe-020.txt +FeO_cr Fe-018.txt +FeO Fe-021.txt +Fe(OH)2_cr Fe-011.txt +Fe(OH)2 Fe-012.txt +Fe(OH)3_cr Fe-013.txt +FeO_l Fe-019.txt +Fe_ref Fe-003.txt +FeS2_cr_Marcasite Fe-027.txt +FeS2_cr_Pyrite Fe-028.txt +FeS_cr-l Fe-025.txt +FeS_cr Fe-023.txt +FeS Fe-026.txt +FeS_l Fe-024.txt +FeSO4_cr Fe-022.txt +F F-001.txt +F- F-003.txt +F+ F-002.txt +FNNF_Cis F-079.txt +FNNF_Trans F-080.txt +FONO2 F-032.txt +FSSF F-099.txt +Ga_cr-l Ga-004.txt +Ga_cr Ga-002.txt +Ga Ga-005.txt +Ga- Ga-007.txt +Ga+ Ga-006.txt +Ga_l Ga-003.txt +Ga_ref Ga-001.txt +H2CO C-061.txt +H2- H-052.txt +H2+ H-051.txt +H2O H-064.txt +H2O_l-g_Bar H-065.txt +H2O_l H-063.txt +H2 H-050.txt +H2S H-080.txt +H2SO4.2H2O_cr-l H-094.txt +H2SO4.3H2O_cr-l H-095.txt +H2SO4.4H2O_cr-l H-096.txt +H2SO4.H2O_cr-l H-092.txt +H3BO3_cr B-056.txt +H3BO3 B-057.txt +H3F3 F-007.txt +H3O+ H-084.txt +H3PO4_cr-l H-087.txt +H3PO4_cr H-085.txt +H3PO4_l H-086.txt +H4F4 F-008.txt +H5F5 F-009.txt +H6F6 F-010.txt +H7F7 F-011.txt +(HBO2)3 B-113.txt +HBO2_cr B-049.txt +HBO2 B-050.txt +HBO B-046.txt +HBO- B-048.txt +HBO+ B-047.txt +HBr Br-010.txt +HBS B-051.txt +HBS+ B-052.txt +HCl Cl-026.txt +HCN C-052.txt +HCOF C-050.txt +HCO C-054.txt +HCO+ C-055.txt +HD D-005.txt +HD- D-007.txt +HD+ D-006.txt +HDO D-008.txt +He+ He-002.txt +He He-001.txt +(HF)2 F-006.txt +Hf_cr_Alpha Hf-002.txt +Hf_cr_Beta Hf-003.txt +Hf_cr-l Hf-005.txt +Hfas Hf-006.txt +HF F-005.txt +Hf- Hf-008.txt +Hf+ Hf-007.txt +Hf_l Hf-004.txt +Hf Hf-001.txt +Hg2Br2_cr Br-054.txt +Hg2Cl2_cr Cl-090.txt +Hg2F2_cr F-067.txt +Hg2I2_cr-l Hg-014.txt +Hg2I2_cr Hg-012.txt +Hg2I2_l Hg-013.txt +HgBr2_cr-l Br-052.txt +HgBr2_cr Br-050.txt +HgBr2 Br-053.txt +HgBr2_l Br-051.txt +HgBr Br-013.txt +HgCl2_cr-l Cl-088.txt +HgCl2_cr Cl-086.txt +HgCl2 Cl-089.txt +HgCl2_l Cl-087.txt +HgCl Cl-031.txt +Hg_cr-l Hg-002.txt +HgF2_cr-l F-065.txt +HgF2_cr F-063.txt +HgF2 F-066.txt +HgF2_l F-064.txt +HgF F-015.txt +Hg Hg-003.txt +HgH H-004.txt +HgI2_cr-l Hg-008.txt +HgI2_cr Hg-006.txt +HgI2 Hg-009.txt +HgI2_l Hg-007.txt +HgI Hg-005.txt +Hg+ Hg-004.txt +HgO_cr Hg-010.txt +HgO Hg-011.txt +Hg_ref Hg-001.txt +H H-001.txt +HI H-005.txt +H- H-003.txt +H+ H-002.txt +HNCO C-053.txt +HNNH H-061.txt +HNO H-027.txt +HOCl Cl-027.txt +HOF F-012.txt +HONO2 H-030.txt +HONO_Cis H-028.txt +HONO_Trans H-029.txt +HOO H-043.txt +HOOH H-070.txt +HS H-046.txt +HSO3F F-013.txt +I2_cr-l I-026.txt +I2_cr I-024.txt +I2 I-027.txt +I2_l I-025.txt +I2_ref I-023.txt +IBr Br-014.txt +ICl_cr-l Cl-034.txt +ICl_cr Cl-032.txt +ICl Cl-035.txt +ICl_l Cl-033.txt +IF5 F-146.txt +IF7 F-158.txt +IF F-016.txt +I I-001.txt +I- I-003.txt +I+ I-002.txt +K2B4O7_cr-l B-117.txt +K2B4O7_cr B-115.txt +K2B4O7_l B-116.txt +K2B6O10_cr B-128.txt +K2B8O13_cr-l B-134.txt +K2B8O13_cr B-132.txt +K2B8O13_l B-133.txt +K2CO3_cr-l C-075.txt +K2CO3_cr C-073.txt +K2CO3_l C-074.txt +K2 K-011.txt +K2O2_cr K-013.txt +K2O_cr K-012.txt +K2S_cr-l K-024.txt +K2S_cr K-022.txt +K2SiO3_cr-l K-016.txt +K2SiO3_cr K-014.txt +K2SiO3_l K-015.txt +K2S_l K-023.txt +K2SO4_cr_Alpha K-017.txt +K2SO4_cr_Beta K-018.txt +K2SO4_cr-l K-020.txt +K2SO4 K-021.txt +K2SO4_l K-019.txt +K3Al2Cl9_cr Al-086.txt +K3AlCl6_cr Al-031.txt +K3AlF6_cr Al-048.txt +KAlCl4_cr Al-029.txt +KBF4_cr-l B-043.txt +KBF4_cr B-041.txt +KBF4 B-044.txt +KBF4_l B-042.txt +KBH4_cr B-058.txt +KBO2_cr-l B-066.txt +KBO2_cr B-064.txt +KBO2 B-067.txt +KBO2_l B-065.txt +(KBr)2 Br-055.txt +KBr_cr-l Br-017.txt +KBr_cr Br-015.txt +KBr Br-018.txt +KBr_l Br-016.txt +(KCl)2 Cl-091.txt +KCl_cr-l Cl-038.txt +KCl_cr Cl-036.txt +KCl Cl-039.txt +KCl_l Cl-037.txt +KClO4_cr Cl-040.txt +(KCN)2 C-130.txt +KCN_cr-l C-071.txt +KCN_cr C-069.txt +KCN C-072.txt +KCN_l C-070.txt +K_cr-l K-004.txt +K_cr K-002.txt +(KF)2 F-069.txt +KF2- F-068.txt +KF_cr-l F-019.txt +KF_cr F-017.txt +KF F-020.txt +KF_l F-018.txt +K K-005.txt +KH_cr H-007.txt +K(HF2)_cr-l F-061.txt +K(HF2)_cr F-059.txt +K(HF2)_l F-060.txt +KH H-008.txt +(KI)2 I-028.txt +KI_cr-l I-006.txt +KI_cr I-004.txt +KI I-007.txt +KI_l I-005.txt +K- K-007.txt +K+ K-006.txt +K_l K-003.txt +KO2_cr K-010.txt +KO K-008.txt +(KOH)2 H-054.txt +KOH_cr-l H-011.txt +KOH_cr H-009.txt +KOH H-012.txt +KOH+ H-013.txt +KOH_l H-010.txt +KO- K-009.txt +K_ref K-001.txt +Kr+ Kr-002.txt +Kr Kr-001.txt +Li2B4O7_cr-l B-120.txt +Li2B4O7_cr B-118.txt +Li2B4O7_l B-119.txt +Li2B6O10_cr B-129.txt +Li2B8O13_cr B-135.txt +Li2BeF4_cr-l Be-029.txt +Li2BeF4_cr Be-027.txt +Li2BeF4_l Be-028.txt +Li2C2_cr C-131.txt +Li2ClF Cl-016.txt +Li2CO3_cr-l C-078.txt +Li2CO3_cr C-076.txt +Li2CO3_l C-077.txt +Li2 Li-013.txt +Li2O2_cr Li-018.txt +Li2O_cr-l Li-016.txt +Li2O_cr Li-014.txt +Li2O Li-017.txt +Li2O_l Li-015.txt +Li2Si2O5_cr-l Li-033.txt +Li2Si2O5_cr Li-031.txt +Li2Si2O5_l Li-032.txt +Li2SiO3_cr-l Li-022.txt +Li2SiO3_cr Li-020.txt +Li2SiO3_l Li-021.txt +Li2SO4_cr_Alpha Li-026.txt +Li2SO4_cr_Beta Li-027.txt +Li2SO4_cr-l Li-029.txt +Li2SO4 Li-030.txt +Li2SO4_l Li-028.txt +Li2TiO3_cr-l Li-025.txt +Li2TiO3_cr Li-023.txt +Li2TiO3_l Li-024.txt +Li3AlF6_cr-l Al-051.txt +Li3AlF6_cr Al-049.txt +Li3AlF6_l Al-050.txt +Li3N_cr Li-034.txt +LiAlF4 Al-046.txt +LiAlH4_cr Al-062.txt +LiAlO2_cr-l Al-070.txt +LiAlO2_cr Al-068.txt +LiAlO2_l Al-069.txt +LiBeF3_cr-l Be-025.txt +LiBeF3_cr Be-023.txt +LiBeF3 Be-026.txt +LiBeF3_l Be-024.txt +LiBH4_cr B-059.txt +LiBO2_cr-l B-070.txt +LiBO2_cr B-068.txt +LiBO2 B-071.txt +LiBO2_l B-069.txt +(LiBr)2 Br-056.txt +LiBr_cr-l Br-021.txt +LiBr_cr Br-019.txt +LiBr Br-022.txt +LiBr_l Br-020.txt +(LiCl)2 Cl-092.txt +(LiCl)3 Cl-139.txt +LiCl_cr-l Cl-043.txt +LiCl_cr Cl-041.txt +LiCl Cl-044.txt +LiCl_l Cl-042.txt +LiClO4_cr-l Cl-048.txt +LiClO4_cr Cl-046.txt +LiClO4_l Cl-047.txt +Li_cr-l Li-004.txt +Li_cr Li-002.txt +(LiF)2 F-071.txt +LiF2- F-070.txt +(LiF)3 F-114.txt +LiF_cr-l F-023.txt +LiF_cr F-021.txt +LiF F-024.txt +LiF_l F-022.txt +Li Li-005.txt +LiH_cr-l H-016.txt +LiH_cr H-014.txt +LiH H-017.txt +LiH_l H-015.txt +(LiI)2 I-029.txt +LiI_cr-l I-010.txt +LiI_cr I-008.txt +LiI I-011.txt +LiI_l I-009.txt +Li- Li-007.txt +Li+ Li-006.txt +Li_l Li-003.txt +LiN Li-008.txt +(LiO)2 Li-019.txt +LiOCl Cl-045.txt +LiOF F-025.txt +LiO Li-011.txt +(LiOH)2 H-055.txt +LiOH_cr-l H-020.txt +LiOH_cr H-018.txt +LiOH H-021.txt +LiOH+ H-022.txt +LiOH_l H-019.txt +LiO- Li-012.txt +LiONa Li-010.txt +LiON Li-009.txt +Li_ref Li-001.txt +Mg2C3_cr C-141.txt +Mg2 Mg-027.txt +Mg2Si_cr-l Mg-036.txt +Mg2Si_cr Mg-034.txt +Mg2Si_l Mg-035.txt +Mg2SiO4_cr-l Mg-030.txt +Mg2SiO4_cr Mg-028.txt +Mg2SiO4_l Mg-029.txt +Mg2TiO4_cr-l Mg-033.txt +Mg2TiO4_cr Mg-031.txt +Mg2TiO4_l Mg-032.txt +Mg3N2_cr Mg-037.txt +Mg3P2O8_cr-l Mg-040.txt +Mg3P2O8_cr Mg-038.txt +Mg3P2O8_l Mg-039.txt +MgAl2O4_cr-l Al-091.txt +MgAl2O4_cr Al-089.txt +MgAl2O4_l Al-090.txt +MgB2_cr B-092.txt +MgB4_cr B-121.txt +(MgBr2)2 Br-092.txt +MgBr2_cr-l Br-059.txt +MgBr2_cr Br-057.txt +MgBr2 Br-060.txt +MgBr2+ Br-061.txt +MgBr2_l Br-058.txt +MgBr Br-023.txt +MgC2_cr C-132.txt +(MgCl2)2 Cl-150.txt +MgCl2_cr-l Cl-095.txt +MgCl2_cr Cl-093.txt +MgCl2 Cl-096.txt +MgCl2_l Cl-094.txt +MgClF Cl-017.txt +MgCl Cl-049.txt +MgCl+ Cl-050.txt +MgCO3_cr C-079.txt +Mg_cr-l Mg-004.txt +Mg_cr Mg-002.txt +(MgF2)2 F-129.txt +MgF2_cr-l F-074.txt +MgF2_cr F-072.txt +MgF2 F-075.txt +MgF2+ F-076.txt +MgF2_l F-073.txt +MgF F-026.txt +MgF+ F-027.txt +Mg Mg-005.txt +MgH2_cr H-056.txt +MgH H-023.txt +MgI2_cr-l I-032.txt +MgI2_cr I-030.txt +MgI2 I-033.txt +MgI2_l I-031.txt +MgI I-012.txt +Mg+ Mg-006.txt +Mg_l Mg-003.txt +MgN Mg-007.txt +MgO_cr-l Mg-010.txt +MgO_cr Mg-008.txt +MgO Mg-011.txt +Mg(OH)2_cr H-057.txt +Mg(OH)2 H-058.txt +MgOH H-024.txt +MgOH+ H-025.txt +MgO_l Mg-009.txt +Mg_ref Mg-001.txt +MgS_cr Mg-025.txt +MgS Mg-026.txt +MgSiO3_cr-l Mg-014.txt +MgSiO3_cr Mg-012.txt +MgSiO3_l Mg-013.txt +MgSO4_cr-l Mg-020.txt +MgSO4_cr Mg-018.txt +MgSO4_l Mg-019.txt +MgTi2O5_cr-l Mg-024.txt +MgTi2O5_cr Mg-022.txt +MgTi2O5_l Mg-023.txt +MgTiO3_cr-l Mg-017.txt +MgTiO3_cr Mg-015.txt +MgTiO3_l Mg-016.txt +MgWO4_cr Mg-021.txt +Mn_cr-l Mn-004.txt +Mn_cr Mn-002.txt +Mn Mn-005.txt +Mn+ Mn-006.txt +Mn_l Mn-003.txt +Mn_ref Mn-001.txt +Mo2S3_cr-l Mo-021.txt +Mo2S3_cr Mo-019.txt +Mo2S3_l Mo-020.txt +MoBr2_cr Br-062.txt +MoBr2 Br-063.txt +MoBr3_cr Br-081.txt +MoBr3 Br-082.txt +MoBr4_cr Br-093.txt +MoBr4 Br-094.txt +MoBr Br-024.txt +MoCl4_cr-l Cl-153.txt +MoCl4_cr Cl-151.txt +MoCl4 Cl-154.txt +MoCl4_l Cl-152.txt +MoCl5_cr-l Cl-171.txt +MoCl5_cr Cl-169.txt +MoCl5 Cl-172.txt +MoCl5_l Cl-170.txt +MoCl6_cr Cl-187.txt +MoCl6 Cl-188.txt +Mo_cr-l Mo-004.txt +Mo_cr Mo-002.txt +MoF2 F-077.txt +MoF3 F-115.txt +MoF4 F-130.txt +MoF4O F-131.txt +(MoF5)2 F-159.txt +(MoF5)3 F-161.txt +MoF5 F-147.txt +MoF6 F-153.txt +MoF6_l F-152.txt +MoF F-028.txt +Mo Mo-005.txt +MoI2_cr I-034.txt +MoI2 I-035.txt +MoI3_cr I-051.txt +MoI3 I-052.txt +MoI4_cr I-058.txt +MoI4 I-059.txt +MoI I-013.txt +Mo- Mo-007.txt +Mo+ Mo-006.txt +Mo_l Mo-003.txt +MoO2Cl2 Cl-097.txt +MoO2_cr Mo-009.txt +MoO2 Mo-010.txt +MoO3_cr-l Mo-016.txt +MoO3_cr Mo-014.txt +MoO3 Mo-017.txt +MoO3_l Mo-015.txt +MoO Mo-008.txt +Mo_ref Mo-001.txt +MoS2_cr Mo-018.txt +N2F4 F-132.txt +N2H4 H-091.txt +N2H4_l H-090.txt +N2- N-025.txt +N2+ N-024.txt +N2O3 N-028.txt +N2O4_cr-l N-031.txt +N2O4_cr N-029.txt +N2O4 N-032.txt +N2O4_l N-030.txt +N2O5 N-033.txt +N2O N-026.txt +N2O+ N-027.txt +N2 N-023.txt +N3 N-034.txt +Na2B4O7_cr-l B-124.txt +Na2B4O7_cr B-122.txt +Na2B4O7_l B-123.txt +Na2B6O10_cr B-130.txt +Na2CO3_cr C-090.txt +Na2CO3_l C-091.txt +Na2 Na-011.txt +Na2O2_cr Na-015.txt +Na2O_cr-l Na-014.txt +Na2O_cr Na-012.txt +Na2O_l Na-013.txt +Na2S2_cr-l Na-036.txt +Na2S2_cr Na-034.txt +Na2S2_l Na-035.txt +Na2S_cr-l Na-033.txt +Na2S_cr Na-031.txt +Na2Si2O5_cr-l Na-030.txt +Na2Si2O5_cr Na-028.txt +Na2Si2O5_l Na-029.txt +Na2SiO3_cr-l Na-018.txt +Na2SiO3_cr Na-016.txt +Na2SiO3_l Na-017.txt +Na2S_l Na-032.txt +Na2SO4_cr_Delta Na-019.txt +Na2SO4_cr_III Na-021.txt +Na2SO4_cr_I Na-020.txt +Na2SO4_cr_IV Na-022.txt +Na2SO4_cr-l Na-025.txt +Na2SO4_cr_V Na-023.txt +Na2SO4 Na-026.txt +Na2SO4_l Na-024.txt +Na2WO4_cr Na-027.txt +Na3AlCl6_cr Al-032.txt +Na3AlF6_cr_Alpha Al-052.txt +Na3AlF6_cr_Beta Al-053.txt +Na3AlF6_cr-l Al-055.txt +Na3AlF6_l Al-054.txt +Na5Al3F14_cr-l Al-108.txt +Na5Al3F14_cr Al-106.txt +Na5Al3F14_l Al-107.txt +NaAlCl4_cr Al-030.txt +NaAlF4 Al-047.txt +NaAlO2_cr Al-073.txt +NaBH4_cr B-060.txt +NaBO2_cr-l B-076.txt +NaBO2_cr B-074.txt +NaBO2 B-077.txt +NaBO2_l B-075.txt +(NaBr)2 Br-064.txt +NaBr_cr-l Br-029.txt +NaBr_cr Br-027.txt +NaBr Br-030.txt +NaBr_l Br-028.txt +(NaCl)2 Cl-098.txt +NaCl_cr-l Cl-055.txt +NaCl_cr Cl-053.txt +NaCl Cl-056.txt +NaCl_l Cl-054.txt +NaClO4_cr Cl-057.txt +(NaCN)2 C-135.txt +NaCN_cr-l C-085.txt +NaCN_cr C-083.txt +NaCN C-086.txt +NaCN_l C-084.txt +NaCO3_cr-l C-092.txt +Na_cr-l Na-004.txt +Na_cr Na-002.txt +(NaF)2 F-082.txt +NaF2- F-081.txt +NaF_cr-l F-035.txt +NaF_cr F-033.txt +NaF F-036.txt +NaF_l F-034.txt +Na Na-005.txt +NaH_cr H-031.txt +NaH H-032.txt +NaI_cr-l I-017.txt +NaI_cr I-015.txt +NaI_l I-016.txt +Na- Na-007.txt +Na+ Na-006.txt +Na_l Na-003.txt +NaO2_cr Na-010.txt +NaO Na-008.txt +(NaOH)2 H-062.txt +NaOH_cr-l H-035.txt +NaOH_cr H-033.txt +NaOH H-036.txt +NaOH+ H-037.txt +NaOH_l H-034.txt +NaO- Na-009.txt +Na_ref Na-001.txt +Nb2O5_cr-l Nb-018.txt +Nb2O5_cr Nb-016.txt +Nb2O5_l Nb-017.txt +NbBr5_cr-l Br-106.txt +NbBr5_cr Br-104.txt +NbBr5 Br-107.txt +NbBr5_l Br-105.txt +NbCl5_cr-l Cl-175.txt +NbCl5_cr Cl-173.txt +NbCl5 Cl-176.txt +NbCl5_l Cl-174.txt +Nb_cr-l Nb-004.txt +Nb_cr Nb-002.txt +Nb Nb-005.txt +Nb- Nb-007.txt +Nb+ Nb-006.txt +Nb_l Nb-003.txt +NbO2_cr-l Nb-014.txt +NbO2_cr Nb-012.txt +NbO2 Nb-015.txt +NbO2_l Nb-013.txt +NbO_cr-l Nb-010.txt +NbO_cr Nb-008.txt +NbO Nb-011.txt +NbO_l Nb-009.txt +Nb_ref Nb-001.txt +NBr Br-025.txt +NC101 C-087.txt +NCN C-089.txt +ND2 D-015.txt +ND3 D-019.txt +ND D-009.txt +Ne+ Ne-002.txt +Ne Ne-001.txt +NF2 F-078.txt +NF3 F-116.txt +NF3O F-117.txt +NF F-029.txt +N N-002.txt +NH2 H-060.txt +NH3 H-083.txt +NH4Br_cr Br-012.txt +NH4Cl_cr Cl-029.txt +NH4ClO4_cr Cl-030.txt +NH4I_cr H-089.txt +NH H-026.txt +Ni3S2_cr-l Ni-017.txt +Ni3S2_cr Ni-015.txt +Ni3S2_l Ni-016.txt +Ni3S4_cr Ni-018.txt +NiCl2_cr-l Cl-101.txt +NiCl2_cr Cl-099.txt +NiCl2 Cl-102.txt +NiCl2_l Cl-100.txt +NiCl Cl-058.txt +Ni(CO)4 C-147.txt +Ni(CO)4_l C-146.txt +Ni_cr-l Ni-004.txt +Ni_cr Ni-002.txt +Ni Ni-005.txt +Ni- Ni-007.txt +Ni+ Ni-006.txt +Ni_l Ni-003.txt +N- N-004.txt +N+ N-003.txt +Ni_ref Ni-001.txt +NiS2_cr-l Ni-014.txt +NiS2_cr Ni-012.txt +NiS2_l Ni-013.txt +NiS_cr-l Ni-010.txt +NiS_cr Ni-008.txt +NiS Ni-011.txt +NiS_l Ni-009.txt +NO2Cl Cl-052.txt +NO2F F-031.txt +NO2 N-007.txt +NO3 N-009.txt +NO N-005.txt +NO+ N-006.txt +NS N-011.txt +O2F F-039.txt +O2- O-031.txt +O2+ O-030.txt +O2Mo(OH)2 H-059.txt +O2 O-029.txt +O2S(OH)2_cr-l H-075.txt +O2S(OH)2 H-076.txt +O2W(OH)2_cr H-077.txt +O2W(OH)2 H-078.txt +O3 O-056.txt +OAlCl_cr Al-019.txt +OAlCl Al-020.txt +OAlF2 Al-039.txt +OAlF2- Al-040.txt +OAlF Al-035.txt +OAlH Al-057.txt +OAlOH Al-061.txt +OBBr B-014.txt +OBCl B-025.txt +O(BeF)2 Be-057.txt +O(BF2)2 B-088.txt +OBF2 B-039.txt +OBF B-033.txt +OD D-010.txt +OF2 F-083.txt +OF F-037.txt +O O-001.txt +OH H-038.txt +OH- H-040.txt +OH+ H-039.txt +O- O-003.txt +O+ O-002.txt +ONBr Br-026.txt +ONCl Cl-051.txt +ONF F-030.txt +ONI I-014.txt +ONO- N-008.txt +OPCl3 Cl-140.txt +OSF2 F-084.txt +OSiF2 F-085.txt +OTiCl Cl-060.txt +OTiF2 F-086.txt +OTiF F-038.txt +OWCl4_cr-l Cl-157.txt +OWCl4_cr Cl-155.txt +OWCl4 Cl-158.txt +OWCl4_l Cl-156.txt +P2 P-012.txt +(P2O3)2 O-087.txt +(P2O5)2_cr O-094.txt +(P2O5)2 O-095.txt +P3N5_cr N-036.txt +P4 P-013.txt +P4S3_cr-l P-016.txt +P4S3_cr P-014.txt +P4S3 P-017.txt +P4S3_l P-015.txt +Pb2B10O17_cr B-140.txt +Pb2 Pb-012.txt +Pb2SiO4_cr O-069.txt +Pb3O4_cr O-070.txt +PbB2O4_cr B-099.txt +PbB4O7_cr B-125.txt +PbB6O10_cr B-131.txt +PbBr2_cr-l Br-067.txt +PbBr2_cr Br-065.txt +PbBr2 Br-068.txt +PbBr2_l Br-066.txt +PbBr4 Br-095.txt +PbBr Br-032.txt +PbCl2_cr-l Cl-110.txt +PbCl2_cr Cl-108.txt +PbCl2 Cl-111.txt +PbCl2+ Cl-112.txt +PbCl2_l Cl-109.txt +PbCl4 Cl-159.txt +PbCl Cl-063.txt +PbCl+ Cl-064.txt +Pb_cr-l Pb-004.txt +Pb_cr Pb-002.txt +PbF2_cr_Alpha F-091.txt +PbF2_cr_Beta F-092.txt +PbF2_cr-l F-094.txt +PbF2 F-095.txt +PbF2_l F-093.txt +PbF4 F-137.txt +PbF F-044.txt +Pb Pb-005.txt +PbH H-045.txt +PbI2_cr-l I-038.txt +PbI2_cr I-036.txt +PbI2 I-039.txt +PbI2_l I-037.txt +PbI4 I-060.txt +PbI I-018.txt +Pb- Pb-007.txt +Pb+ Pb-006.txt +Pb_l Pb-003.txt +PbO2_cr O-033.txt +PbO_cr-l O-008.txt +PbO_cr_Red O-005.txt +PbO_cr_Yellow O-006.txt +PbO O-009.txt +PbO_l O-007.txt +PBr3 Br-084.txt +Pb_ref Pb-001.txt +PBr Br-031.txt +PbS_cr-l Pb-010.txt +PbS_cr Pb-008.txt +PbS Pb-011.txt +PbSiO3_cr O-057.txt +PbS_l Pb-009.txt +PCl3 Cl-141.txt +PCl5 Cl-177.txt +PCl Cl-062.txt +P_cr_Black P-007.txt +P_cr_IV P-005.txt +P_cr-l P-004.txt +P_cr_V P-006.txt +P_cr_White P-002.txt +PF2 F-088.txt +PF2- F-090.txt +PF2+ F-089.txt +PF3 F-119.txt +PF5 F-148.txt +PF F-040.txt +PF- F-042.txt +PF+ F-041.txt +P P-008.txt +PH2 H-079.txt +PH3 H-088.txt +PH H-044.txt +P- P-010.txt +P+ P-009.txt +P_l P-003.txt +PN N-010.txt +PO2 O-032.txt +POBr3 Br-083.txt +POCl2F Cl-080.txt +POClF2 Cl-020.txt +POF3 F-118.txt +PO O-004.txt +P_ref P-001.txt +PSBr3 Br-085.txt +PSF3 F-120.txt +PSF F-043.txt +PS P-011.txt +Rb2 Rb-008.txt +Rb_cr-l Rb-004.txt +Rb_cr Rb-002.txt +Rb Rb-005.txt +Rb- Rb-007.txt +Rb+ Rb-006.txt +Rb_l Rb-003.txt +Rb_ref Rb-001.txt +Rn+ Rn-002.txt +Rn Rn-001.txt +S2Cl Cl-067.txt +S2F10 F-160.txt +S2 S-012.txt +S3 S-016.txt +S4 S-017.txt +S5 S-018.txt +S6 S-019.txt +S7 S-020.txt +S8 S-021.txt +SBrF5 Br-009.txt +SCl2 Cl-114.txt +SCl2+ Cl-115.txt +SCl2_l Cl-113.txt +SClF5 Cl-024.txt +SCl Cl-065.txt +SCl+ Cl-066.txt +S_cr-l S-005.txt +S_cr_Monoclinic S-003.txt +S_cr_Orthorhombic S-002.txt +SD D-011.txt +SF2 F-096.txt +SF2- F-098.txt +SF2+ F-097.txt +SF3 F-121.txt +SF3- F-123.txt +SF3+ F-122.txt +SF4 F-138.txt +SF4- F-140.txt +SF4+ F-139.txt +SF5 F-149.txt +SF5- F-151.txt +SF5+ F-150.txt +SF6 F-154.txt +SF6- F-155.txt +SF F-045.txt +SF- F-047.txt +SF+ F-046.txt +S S-006.txt +Si2C C-103.txt +Si2 Si-008.txt +Si2N N-013.txt +Si3 Si-009.txt +Si3N4_cr N-035.txt +SiBr2 Br-069.txt +SiBr3 Br-086.txt +SiBr4 Br-097.txt +SiBr4_l Br-096.txt +SiBr Br-033.txt +SiC2 C-137.txt +SiC_cr_Alpha C-100.txt +SiC_cr_Beta C-101.txt +SiC C-102.txt +Si(CH3)4 C-144.txt +SiCH3Cl3 C-064.txt +SiCH3F3 C-066.txt +SiCl2 Cl-118.txt +SiCl3F Cl-133.txt +SiCl3 Cl-143.txt +SiCl4 Cl-160.txt +SiClF3 Cl-022.txt +SiCl Cl-068.txt +Si_cr-l Si-004.txt +Si_cr Si-002.txt +SiF2 F-101.txt +SiF3 F-124.txt +SiF4 F-141.txt +SiF F-048.txt +Si Si-005.txt +SiH2Br2 Br-049.txt +SiH2Cl2 Cl-085.txt +SiH2F2 F-062.txt +SiH2I2 H-053.txt +SiH3Br Br-011.txt +SiH3Cl Cl-028.txt +SiH3F F-014.txt +SiH3I H-082.txt +SiH4 H-093.txt +SiHBr3 Br-080.txt +SiHCl3 Cl-138.txt +SiHF3 F-113.txt +SiH H-047.txt +SiHI3 H-006.txt +SiH+ H-048.txt +SiI2 I-040.txt +SiI3 I-053.txt +SiI4_cr-l I-063.txt +SiI4_cr I-061.txt +SiI4 I-064.txt +SiI4_l I-062.txt +SiI I-019.txt +Si- Si-007.txt +Si+ Si-006.txt +Si_l Si-003.txt +SiN N-012.txt +SiO2_cr_High O-035.txt +SiO2_cr_Low O-036.txt +SiO2_cr-l O-039.txt +SiO2_cr_Quartz O-037.txt +SiO2 O-040.txt +SiO2_l O-038.txt +SiO O-012.txt +S- S-008.txt +S+ S-007.txt +Si_ref Si-001.txt +SiS2_cr-l S-015.txt +SiS2_cr S-013.txt +SiS2_l S-014.txt +SiS S-009.txt +S_l S-004.txt +SO2Cl2 Cl-105.txt +SO2ClF Cl-018.txt +SO2F2 F-087.txt +SO2 O-034.txt +SO3 O-058.txt +SO O-010.txt +SPCl3 Cl-142.txt +SrBr2_cr-l Br-072.txt +SrBr2_cr Br-070.txt +SrBr2 Br-073.txt +SrBr2_l Br-071.txt +SrBr Br-034.txt +SrCl2_cr-l Cl-121.txt +SrCl2_cr Cl-119.txt +SrCl2 Cl-122.txt +SrCl2_l Cl-120.txt +SrCl Cl-069.txt +Sr_cr_Alpha Sr-002.txt +Sr_cr_Beta Sr-003.txt +Sr_cr-l Sr-005.txt +S_ref S-001.txt +SrF2_cr-l F-104.txt +SrF2_cr F-102.txt +SrF2 F-105.txt +SrF2_l F-103.txt +SrF F-049.txt +SrF+ F-050.txt +Sr Sr-006.txt +SrI2_cr-l I-043.txt +SrI2_cr I-041.txt +SrI2 I-044.txt +SrI2_l I-042.txt +SrI I-020.txt +Sr+ Sr-007.txt +Sr_l Sr-004.txt +SrO_cr-l O-015.txt +SrO_cr O-013.txt +SrO O-016.txt +Sr(OH)2_cr-l H-073.txt +Sr(OH)2_cr H-071.txt +Sr(OH)2 H-074.txt +Sr(OH)2_l H-072.txt +SrOH H-041.txt +SrOH+ H-042.txt +SrO_l O-014.txt +Sr_ref Sr-001.txt +SrS_cr S-010.txt +SrS S-011.txt +SSF2 F-100.txt +SSO O-011.txt +Ta2O5_cr-l O-079.txt +Ta2O5_cr O-077.txt +Ta2O5_l O-078.txt +TaC_cr-l C-106.txt +TaC_cr C-104.txt +TaCl5_cr-l Cl-180.txt +TaCl5_cr Cl-178.txt +TaCl5 Cl-181.txt +TaCl5_l Cl-179.txt +TaC_l C-105.txt +Ta_cr-l Ta-004.txt +Ta_cr Ta-002.txt +Ta Ta-005.txt +Ta- Ta-007.txt +Ta+ Ta-006.txt +Ta_l Ta-003.txt +TaO2 O-041.txt +TaO O-017.txt +Ta_ref Ta-001.txt +Ti2O3_cr-l O-061.txt +Ti2O3_cr O-059.txt +Ti2O3_l O-060.txt +Ti3O5_cr_Alpha O-080.txt +Ti3O5_cr_Beta O-081.txt +Ti3O5_cr-l O-083.txt +Ti3O5_l O-082.txt +Ti4O7_cr-l O-091.txt +Ti4O7_cr O-089.txt +Ti4O7_l O-090.txt +TiB2_cr-l B-102.txt +TiB2_cr B-100.txt +TiB2_l B-101.txt +TiB_cr B-082.txt +TiBr2_cr Br-074.txt +TiBr2 Br-075.txt +TiBr3_cr Br-087.txt +TiBr3 Br-088.txt +TiBr4_cr-l Br-100.txt +TiBr4_cr Br-098.txt +TiBr4 Br-101.txt +TiBr4_l Br-099.txt +TiBr Br-035.txt +TiC_cr-l C-109.txt +TiC_cr C-107.txt +TiCl2_cr Cl-123.txt +TiCl2 Cl-124.txt +TiCl3_cr Cl-144.txt +TiCl3 Cl-145.txt +TiCl4_cr-l Cl-163.txt +TiCl4_cr Cl-161.txt +TiCl4 Cl-164.txt +TiCl4_l Cl-162.txt +TiCl Cl-070.txt +TiC_l C-108.txt +Ti_cr_Alpha Ti-002.txt +Ti_cr_Beta Ti-003.txt +Ti_cr-l Ti-005.txt +TiF2 F-106.txt +TiF3_cr F-125.txt +TiF3 F-126.txt +TiF4_cr F-142.txt +TiF4 F-143.txt +TiF F-051.txt +Ti Ti-006.txt +TiH2_cr H-081.txt +TiI2_cr I-045.txt +TiI2 I-046.txt +TiI3_cr I-054.txt +TiI3 I-055.txt +TiI4_cr-l I-067.txt +TiI4_cr I-065.txt +TiI4 I-068.txt +TiI4_l I-066.txt +TiI I-021.txt +Ti- Ti-008.txt +Ti+ Ti-007.txt +Ti_l Ti-004.txt +TiN_cr-l N-016.txt +TiN_cr N-014.txt +TiN_l N-015.txt +TiO2_cr_Anatase O-042.txt +TiO2_cr-l O-045.txt +TiO2_cr_Rutile O-043.txt +TiO2 O-046.txt +TiO2_l O-044.txt +TiOCl2 Cl-104.txt +TiO_cr_Alpha O-018.txt +TiO_cr_Beta O-019.txt +TiO_cr-l O-021.txt +TiO O-022.txt +TiO_l O-020.txt +Ti_ref Ti-001.txt +V2O3_cr-l O-064.txt +V2O3_cr O-062.txt +V2O3_l O-063.txt +V2O4_cr-l O-075.txt +V2O4_cr O-073.txt +V2O4_l O-074.txt +V2O5_cr-l O-086.txt +V2O5_cr O-084.txt +V2O5_l O-085.txt +V_cr-l V-004.txt +V_cr V-002.txt +V V-005.txt +V- V-007.txt +V+ V-006.txt +V_l V-003.txt +VN_cr N-017.txt +VN N-018.txt +VO2 O-076.txt +VO_cr-l O-025.txt +VO_cr O-023.txt +VO O-026.txt +VO_l O-024.txt +V_ref V-001.txt +W3O8 O-092.txt +WBr5_cr-l Br-110.txt +WBr5_cr Br-108.txt +WBr5 Br-111.txt +WBr5_l Br-109.txt +WBr6_cr Br-112.txt +WBr6 Br-113.txt +WBr Br-036.txt +WCl2_cr Cl-125.txt +WCl2 Cl-126.txt +WCl4_cr Cl-165.txt +WCl4 Cl-166.txt +(WCl5)2 Cl-194.txt +WCl5_cr-l Cl-184.txt +WCl5_cr Cl-182.txt +WCl5 Cl-185.txt +WCl5_l Cl-183.txt +WCl6_cr_Alpha Cl-189.txt +WCl6_cr_Beta Cl-190.txt +WCl6_cr-l Cl-192.txt +WCl6 Cl-193.txt +WCl6_l Cl-191.txt +WCl Cl-071.txt +W_cr-l W-004.txt +W_cr W-002.txt +WF4O_cr-l F-135.txt +WF4O_cr F-133.txt +WF4O F-136.txt +WF4O_l F-134.txt +WF6 F-157.txt +WF6_l F-156.txt +WF F-052.txt +W W-005.txt +W- W-007.txt +W+ W-006.txt +W_l W-003.txt +WO2Cl2_cr Cl-106.txt +WO2Cl2 Cl-107.txt +WO2_cr O-047.txt +WO2 O-048.txt +(WO3)2 O-088.txt +(WO3)3 O-093.txt +(WO3)4 O-096.txt +WO3_cr-l O-067.txt +WO3_cr O-065.txt +WO3 O-068.txt +WO3_l O-066.txt +WO O-027.txt +W_ref W-001.txt +Xe+ Xe-002.txt +Xe Xe-001.txt +Zn_cr-l Zn-004.txt +Zn_cr Zn-002.txt +Zn Zn-005.txt +Zn- Zn-007.txt +Zn+ Zn-006.txt +Zn_l Zn-003.txt +Zn_ref Zn-001.txt +ZnSO4_cr O-071.txt +ZrB2_cr-l B-105.txt +ZrB2_cr B-103.txt +ZrB2_l B-104.txt +ZrBr2_cr-l Br-078.txt +ZrBr2_cr Br-076.txt +ZrBr2 Br-079.txt +ZrBr2_l Br-077.txt +ZrBr3_cr Br-089.txt +ZrBr3 Br-090.txt +ZrBr4_cr Br-102.txt +ZrBr4 Br-103.txt +ZrBr Br-037.txt +ZrC_cr-l C-112.txt +ZrC_cr C-110.txt +ZrCl2_cr-l Cl-129.txt +ZrCl2_cr Cl-127.txt +ZrCl2 Cl-130.txt +ZrCl2_l Cl-128.txt +ZrCl3_cr Cl-146.txt +ZrCl3 Cl-147.txt +ZrCl4_cr Cl-167.txt +ZrCl4 Cl-168.txt +ZrCl Cl-072.txt +ZrC_l C-111.txt +Zr_cr_Alpha Zr-002.txt +Zr_cr_Beta Zr-003.txt +Zr_cr-l Zr-005.txt +ZrF2_cr-l F-109.txt +ZrF2_cr F-107.txt +ZrF2 F-110.txt +ZrF2_l F-108.txt +ZrF3_cr F-127.txt +ZrF3 F-128.txt +ZrF4_cr F-144.txt +ZrF4 F-145.txt +ZrF F-053.txt +Zr Zr-006.txt +ZrH H-049.txt +ZrI2_cr-l I-049.txt +ZrI2_cr I-047.txt +ZrI2 I-050.txt +ZrI2_l I-048.txt +ZrI3_cr I-056.txt +ZrI3 I-057.txt +ZrI4_cr I-069.txt +ZrI4 I-070.txt +ZrI I-022.txt +Zr- Zr-008.txt +Zr+ Zr-007.txt +Zr_l Zr-004.txt +ZrN_cr-l N-021.txt +ZrN_cr N-019.txt +ZrN N-022.txt +ZrN_l N-020.txt +ZrO2_cr-l O-054.txt +ZrO2_cr O-052.txt +ZrO2 O-055.txt +ZrO2_l O-053.txt +ZrO O-028.txt +Zr_ref Zr-001.txt +ZrSiO4_cr O-072.txt diff --git a/tea/thermal_properties.py b/tea/thermal_properties.py new file mode 100644 index 00000000..d2c8573a --- /dev/null +++ b/tea/thermal_properties.py @@ -0,0 +1,152 @@ +# This file (thermal_properties.py) is open-source software under the +# GNU GENERAL PUBLIC LICENSE Version 2, June 1991 + +__all__ = [ + 'ROOT', + 'Tea_Network', + 'thermo_eval', +] + +import os +from pathlib import Path +import warnings + +import numpy as np + +from . import janaf + + +ROOT = str(Path(__file__).parents[1]) + os.path.sep + + +class Tea_Network(object): + r""" + TEA chemical network. + + Examples + -------- + >>> # (First, make sure you added the path to the TEA package) + >>> import tea.thermal_properties as tea + >>> import numpy as np + + >>> nlayers = 81 + >>> temperature = np.tile(1200.0, nlayers) + >>> pressure = np.logspace(-8, 3, nlayers) + >>> HCNO_molecules = ( + >>> 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O').split() + >>> tea_net = tea.Tea_Network(pressure, temperature, HCNO_molecules) + + >>> # Compute heat capacity at current temperature profile: + >>> cp = tea_net.heat_capacity() + >>> print(f'Heat capacity (cp/R):\n{cp[0]}') + Heat capacity (cp/R): + [5.26408044 9.48143057 4.11030773 6.77638503 7.34238673 4.05594463 + 3.72748083 6.3275286 3.79892261 2.49998117 2.49998117 2.50082308 + 2.49998117 2.51092596] + """ + def __init__(self, pressure, temperature, input_species, + source='janaf'): + """Tea_Network init.""" + self.pressure = pressure + self.temperature = temperature + self.input_species = input_species + + if source == 'janaf': + network_data = janaf.setup_network(input_species) + self.species = network_data[0] + self.elements = network_data[1] + self._heat_capacity = network_data[2] + self._gibbs_free_energy = network_data[3] + + + def heat_capacity(self, temperature=None): + if temperature is None: + temperature = self.temperature + return thermo_eval(temperature, self._heat_capacity) + + + def gibbs_free_energy(self, temperature=None): + if temperature is None: + temperature = self.temperature + return thermo_eval(temperature, self._gibbs_free_energy) + + +def thermo_eval(temperature, thermo_func): + """ + Compute the thermochemical property specified by thermo_func at + at the requested temperature(s). These can be, e.g., the + heat_capacity or gibbs_free_energy functions returned by + setup_network(). + + Parameters + ---------- + temperature: float or 1D float iterable + Temperature (Kelvin). + thermo_func: 1D iterable of callable functions + Functions that return the thermochemical property. + + Returns + ------- + thermo_prop: 1D or 2D float array + The provided thermochemical property evaluated at the requested + temperature(s). + The shape of the output depends on the shape of the + temperature input. + + Examples + -------- + >>> # (First, make sure you added the path to the TEA package) + >>> import tea.thermal_properties as tea + >>> import tea.janaf as janaf + >>> import matplotlib.pyplot as plt + >>> import numpy as np + + >>> molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + >>> janaf_data = janaf.setup_network(molecules) + >>> species = janaf_data[0] + >>> heat_funcs = janaf_data[2] + + >>> temperature = 1500.0 + >>> temperatures = np.arange(100.0, 4501.0, 10) + >>> cp1 = tea.thermo_eval(temperature, heat_funcs) + >>> cp2 = tea.thermo_eval(temperatures, heat_funcs) + + >>> cols = { + >>> 'H': 'blue', + >>> 'H2': 'deepskyblue', + >>> 'He': 'olive', + >>> 'H2O': 'navy', + >>> 'CH4': 'orange', + >>> 'CO': 'limegreen', + >>> 'CO2': 'red', + >>> 'NH3': 'magenta', + >>> 'HCN': '0.55', + >>> 'N2': 'gold', + >>> 'OH': 'steelblue', + >>> 'C': 'salmon', + >>> 'N': 'darkviolet', + >>> 'O': 'greenyellow', + >>> } + >>> nspecies = len(species) + >>> plt.figure('Heat capacity', (6.5, 4.5)) + >>> plt.clf() + >>> plt.subplot(111) + >>> for j in range(nspecies): + >>> label = species[j] + >>> plt.plot(temperatures, cp2[:,j], label=label, c=cols[label]) + >>> plt.xlim(np.amin(temperatures), np.amax(temperatures)) + >>> plt.plot(np.tile(temperature,nspecies), cp1, 'ob', ms=4, zorder=-1) + >>> plt.xlabel('Temperature (K)') + >>> plt.ylabel('Heat capacity / R') + >>> plt.legend(loc=(1.01, 0.01), fontsize=8) + >>> plt.tight_layout() + """ + temp = np.atleast_1d(temperature) + ntemp = np.shape(temp)[0] + nspecies = len(thermo_func) + thermo_prop= np.zeros((ntemp, nspecies)) + for j in range(nspecies): + thermo_prop[:,j] = thermo_func[j](temp) + if np.shape(temperature) == (): + return thermo_prop[0] + return thermo_prop diff --git a/tests/test_janaf.py b/tests/test_janaf.py new file mode 100644 index 00000000..4342a4f9 --- /dev/null +++ b/tests/test_janaf.py @@ -0,0 +1,268 @@ +# This file is open-source software under the GNU GENERAL PUBLIC LICENSE +# Version 2, June 1991 + +import os +from pathlib import Path +import sys +import numpy as np + +ROOT = str(Path(__file__).parents[1]) + os.path.sep +sys.path.append(ROOT) +import tea.janaf as janaf + + +def test_get_janaf_filenames_single(): + janaf_species = janaf.get_filenames('H2O') + assert len(janaf_species) == 1 + assert janaf_species[0] == 'H-064.txt' + + +def test_get_janaf_filenames_multiple(): + species = 'H2O e- H+'.split() + janaf_species = janaf.get_filenames(species) + assert len(janaf_species) == len(species) + assert janaf_species[0] == 'H-064.txt' + assert janaf_species[1] == 'D-020.txt' + assert janaf_species[2] == 'H-002.txt' + + +def test_get_janaf_names_gas_over_ref(): + janaf_species = janaf.get_filenames('Na') + assert janaf_species[0] == 'Na-005.txt' + + +def test_get_janaf_names_ref_when_no_gas(): + janaf_species = janaf.get_filenames('H2') + assert janaf_species[0] == 'H-050.txt' + + +def test_get_janaf_names_missing(): + species = 'H2O H2O+'.split() + janaf_species = janaf.get_filenames(species) + assert janaf_species[0] == 'H-064.txt' + assert janaf_species[1] is None + + +def test_read_janaf(): + janaf_file = 'H-064.txt' # Water + janaf_data = janaf.read_file(janaf_file) + + expected_temp = np.array([ + 100. , 200. , 298.15, 300. , 400. , 500. , 600. , + 700. , 800. , 900. , 1000. , 1100. , 1200. , 1300. , + 1400. , 1500. , 1600. , 1700. , 1800. , 1900. , 2000. , + 2100. , 2200. , 2300. , 2400. , 2500. , 2600. , 2700. , + 2800. , 2900. , 3000. , 3100. , 3200. , 3300. , 3400. , + 3500. , 3600. , 3700. , 3800. , 3900. , 4000. , 4100. , + 4200. , 4300. , 4400. , 4500. , 4600. , 4700. , 4800. , + 4900. , 5000. , 5100. , 5200. , 5300. , 5400. , 5500. , + 5600. , 5700. , 5800. , 5900. , 6000. ]) + expected_heat = np.array([ + 4.00494915, 4.01096277, 4.03994841, 4.04067004, 4.12077143, + 4.23671398, 4.3688933 , 4.50961195, 4.65706586, 4.80933066, + 4.96339955, 5.11590489, 5.26408044, 5.405641 , 5.53902304, + 5.6636252 , 5.77908666, 5.88552769, 5.98342939, 6.07327284, + 6.15553913, 6.23287426, 6.30323358, 6.36806038, 6.42783574, + 6.48316103, 6.53427678, 6.58166409, 6.62568377, 6.66669664, + 6.70494325, 6.74054387, 6.77409985, 6.80537067, 6.83483739, + 6.86250003, 6.88871941, 6.91325497, 6.93670808, 6.95883819, + 6.97976558, 6.99973079, 7.01873382, 7.03677468, 7.05397362, + 7.07045094, 7.08620661, 7.10136093, 7.11579361, 7.12914385, + 7.14297517, 7.15728758, 7.17159999, 7.18579212, 7.19998426, + 7.2141764 , 7.22836854, 7.24256068, 7.25663254, 7.27082468, + 7.28501682, + ]) + expected_gibbs = np.array([ + -317.13342415, -168.5046965 , -120.2630193 , -119.66157194, + -95.58332709, -81.34464379, -71.99422991, -65.41982799, + -60.56969923, -56.86231056, -53.94984867, -51.61209304, + -49.70275118, -48.12096925, -46.79482908, -45.67190338, + -44.71296187, -43.88805447, -43.17402029, -42.55270104, + -42.00957008, -41.53271883, -41.11268819, -40.74174781, + -40.41317506, -40.12170303, -39.86246799, -39.63180789, + -39.42641198, -39.24333909, -39.08005623, -38.93449306, + -38.80486807, -38.68952461, -38.58701504, -38.49619122, + -38.41581874, -38.34491693, -38.28262098, -38.22828742, + -38.18112061, -38.14052282, -38.10584443, -38.07673679, + -38.05266426, -38.03313884, -38.01795547, -38.0067065 , + -37.99913851, -37.99478805, -37.99357992, -37.99522317, + -37.99944921, -38.00613 , -38.01515589, -38.02619341, + -38.03916486, -38.05400644, -38.07042649, -38.0885058 , + -38.10809524]) + + assert len(janaf_data) == 3 + np.testing.assert_allclose(janaf_data[0], expected_temp) + np.testing.assert_allclose(janaf_data[1], expected_heat) + np.testing.assert_allclose(janaf_data[2], expected_gibbs) + + +def test_read_janaf_missing_cp_values(): + janaf_file = 'D-020.txt' # electron + janaf_data = janaf.read_file(janaf_file) + expected_temp = np.array([ + 298.15, 300. , 350. , 400. , 450. , 500. , 600. , + 700. , 800. , 900. , 1000. , 1100. , 1200. , 1300. , + 1400. , 1500. , 1600. , 1700. , 1800. , 1900. , 2000. , + 2100. , 2200. , 2300. , 2400. , 2500. , 2600. , 2700. , + 2800. , 2900. , 3000. , 3100. , 3200. , 3300. , 3400. , + 3500. , 3600. , 3700. , 3800. , 3900. , 4000. , 4100. , + 4200. , 4300. , 4400. , 4500. , 4600. , 4700. , 4800. , + 4900. , 5000. , 5100. , 5200. , 5300. , 5400. , 5500. , + 5600. , 5700. , 5800. , 5900. , 6000. ]) + expected_heat = np.array([ + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117, 2.49998117, 2.49998117, 2.49998117, 2.49998117, + 2.49998117]) + expected_gibbs = np.array([ + -2.52319374, -2.52319374, -2.55362264, -2.62121571, -2.70865371, + -2.80643513, -3.01378467, -3.2216153 , -3.42234986, -3.61334236, + -3.79387117, -3.96441737, -4.12546205, -4.27784712, -4.42217395, + -4.55916416, -4.68941912, -4.81354019, -4.93212874, -5.04542529, + -5.15403123, -5.25830736, -5.35849423, -5.45483239, -5.54780292, + -5.63740583, -5.72400192, -5.80771148, -5.88877505, -5.9673129 , + -6.04356557, -6.11741279, -6.18933566, -6.2592139 , -6.32716778, + -6.39343785, -6.45790383, -6.52080627, -6.58214517, -6.64204081, + -6.70061344, -6.75774281, -6.81366946, -6.86839338, -6.92191458, + -6.97435332, -7.02570962, -7.07598346, -7.12529513, -7.17376489, + -7.2211522 , -7.26781787, -7.31352137, -7.35838295, -7.40252291, + -7.44594123, -7.48851764, -7.53049269, -7.57162584, -7.6122779 , + -7.65208805]) + + assert len(janaf_data) == 3 + np.testing.assert_allclose(janaf_data[0], expected_temp) + np.testing.assert_allclose(janaf_data[1], expected_heat) + np.testing.assert_allclose(janaf_data[2], expected_gibbs) + + +def test_read_janaf_stoich_from_species_neutral(): + stoich = janaf.read_stoich('H') + assert len(stoich) == 1 + assert stoich['H'] == 1.0 + + stoich = janaf.read_stoich('H2') + assert len(stoich) == 1 + assert stoich['H'] == 2.0 + + stoich = janaf.read_stoich('H2O') + assert len(stoich) == 2 + assert stoich['H'] == 2.0 + assert stoich['O'] == 1.0 + + +def test_read_janaf_stoich_from_species_ions(): + stoich = janaf.read_stoich('e-') + assert len(stoich) == 1 + assert stoich['e'] == 1.0 + + stoich = janaf.read_stoich('H-') + assert len(stoich) == 2 + assert stoich['H'] == 1.0 + assert stoich['e'] == 1.0 + + stoich = janaf.read_stoich('H+') + assert len(stoich) == 2 + assert stoich['H'] == 1.0 + assert stoich['e'] == -1.0 + + stoich = janaf.read_stoich('H3O+') + assert len(stoich) == 3 + assert stoich['H'] == 3.0 + assert stoich['O'] == 1.0 + assert stoich['e'] == -1.0 + + +def test_read_janaf_stoich_from_janaf(): + stoich = janaf.read_stoich(janaf_file='H-064.txt') + assert len(stoich) == 2 + assert stoich['H'] == 2.0 + assert stoich['O'] == 1.0 + + +def test_read_janaf_stoich_from_formula(): + stoich = janaf.read_stoich(formula='H3O1+') + assert len(stoich) == 3 + assert stoich['H'] == 3.0 + assert stoich['O'] == 1.0 + assert stoich['e'] == -1.0 + + +def test_setup_janaf_network_neutrals(): + molecules = 'H2O CH4 CO CO2 H2 C2H2 C2H4 OH H He'.split() + janaf_data = janaf.setup_network(molecules) + + expected_elements = ['He', 'C', 'H', 'O'] + expected_stoich_vals = np.array([ + [0, 2, 0, 1], + [1, 4, 0, 0], + [1, 0, 0, 1], + [1, 0, 0, 2], + [0, 2, 0, 0], + [2, 2, 0, 0], + [2, 4, 0, 0], + [0, 1, 0, 1], + [0, 1, 0, 0], + [0, 0, 1, 0] + ]) + + assert len(janaf_data) == 5 + np.testing.assert_equal(janaf_data[0], molecules) + np.testing.assert_equal(janaf_data[1], ['C', 'H', 'He', 'O']) + np.testing.assert_equal(janaf_data[4], expected_stoich_vals) + + +def test_setup_janaf_network_ions(): + molecules = 'H2O CH4 CO CO2 H2 C2H2 C2H4 OH H He e- H- H+ H2+ He+'.split() + janaf_data = janaf.setup_network(molecules) + + expected_stoich_vals = np.array([ + [ 0, 2, 0, 1, 0], + [ 1, 4, 0, 0, 0], + [ 1, 0, 0, 1, 0], + [ 1, 0, 0, 2, 0], + [ 0, 2, 0, 0, 0], + [ 2, 2, 0, 0, 0], + [ 2, 4, 0, 0, 0], + [ 0, 1, 0, 1, 0], + [ 0, 1, 0, 0, 0], + [ 0, 0, 1, 0, 0], + [ 0, 0, 0, 0, 1], + [ 0, 1, 0, 0, 1], + [ 0, 1, 0, 0, -1], + [ 0, 2, 0, 0, -1], + [ 0, 0, 1, 0, -1] + ]) + + assert len(janaf_data) == 5 + np.testing.assert_equal(janaf_data[0], molecules) + np.testing.assert_equal(janaf_data[1], ['C', 'H', 'He', 'O', 'e']) + np.testing.assert_equal(janaf_data[4], expected_stoich_vals) + + +def test_setup_janaf_network_missing_species(): + molecules = 'Ti Ti+ TiO TiO2 TiO+'.split() + janaf_data = janaf.setup_network(molecules) + + expected_stoich_vals = np.array([ + [ 0, 1, 0], + [ 0, 1, -1], + [ 1, 1, 0], + [ 2, 1, 0] + ]) + + assert len(janaf_data) == 5 + np.testing.assert_equal(janaf_data[0], ['Ti', 'Ti+', 'TiO', 'TiO2']) + np.testing.assert_equal(janaf_data[1], ['O', 'Ti', 'e']) + np.testing.assert_equal(janaf_data[4], expected_stoich_vals) + + + diff --git a/tests/test_tea.py b/tests/test_tea.py new file mode 100644 index 00000000..56f8400b --- /dev/null +++ b/tests/test_tea.py @@ -0,0 +1,217 @@ +# This file is open-source software under the GNU GENERAL PUBLIC LICENSE +# Version 2, June 1991 + +import os +from pathlib import Path +import sys +import numpy as np + +ROOT = str(Path(__file__).parents[1]) + os.path.sep +sys.path.append(ROOT) +import tea.janaf as janaf +import tea.thermal_properties as tea + + +def test_setup_janaf_network_missing_species(): + molecules = 'Ti Ti+ TiO TiO2 TiO+'.split() + janaf_data = janaf.setup_network(molecules) + + expected_stoich_vals = np.array([ + [ 0, 1, 0], + [ 0, 1, -1], + [ 1, 1, 0], + [ 2, 1, 0] + ]) + + assert len(janaf_data) == 5 + np.testing.assert_equal(janaf_data[0], ['Ti', 'Ti+', 'TiO', 'TiO2']) + np.testing.assert_equal(janaf_data[1], ['O', 'Ti', 'e']) + np.testing.assert_equal(janaf_data[4], expected_stoich_vals) + + +def test_heat_capacity_single_temp(): + molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + janaf_data = janaf.setup_network(molecules) + heat_capacity = janaf_data[2] + temperature = 1500.0 + cp = tea.thermo_eval(temperature, heat_capacity) + + expected_cp = np.array([ + 5.6636252 , 10.41029396, 4.23563153, 7.02137982, 8.00580904, + 4.19064967, 3.88455652, 6.65454913, 3.95900511, 2.49998117, + 2.49998117, 2.5033488 , 2.49998117, 2.50707724]) + np.testing.assert_allclose(cp, expected_cp) + + +def test_heat_capacity_temp_array(): + molecules = 'H2O CH4 CO C He'.split() + janaf_data = janaf.setup_network(molecules) + heat_capacity = janaf_data[2] + temperatures = np.arange(100.0, 4501.0, 200.0) + cp = tea.thermo_eval(temperatures, heat_capacity) + + expected_cp = np.array([ + [ 4.00494915, 4.00001798, 3.50040662, 2.55831326, 2.49998117], + [ 4.04067004, 4.29468525, 3.50497697, 2.50623533, 2.49998117], + [ 4.23671398, 5.57366148, 3.58339455, 2.50214607, 2.49998117], + [ 4.50961195, 6.95102049, 3.74900958, 2.50106362, 2.49998117], + [ 4.80933066, 8.13053147, 3.91811251, 2.50070281, 2.49998117], + [ 5.11590489, 9.0840507 , 4.05438109, 2.50058253, 2.49998117], + [ 5.405641 , 9.83154339, 4.15805586, 2.5011839 , 2.49998117], + [ 5.6636252 , 10.41029396, 4.23563153, 2.5033488 , 2.49998117], + [ 5.88552769, 10.85854903, 4.2949258 , 2.5076786 , 2.49998117], + [ 6.07327284, 11.20794022, 4.34074957, 2.51513549, 2.49998117], + [ 6.23287426, 11.48324364, 4.37695154, 2.52559918, 2.49998117], + [ 6.36806038, 11.70262042, 4.40617773, 2.53894941, 2.49998117], + [ 6.48316103, 11.87954105, 4.43035247, 2.55470509, 2.49998117], + [ 6.58166409, 12.02374761, 4.45043795, 2.57226486, 2.49998117], + [ 6.66669664, 12.14269697, 4.46811799, 2.59090707, 2.49998117], + [ 6.74054387, 12.24156084, 4.48363312, 2.61003038, 2.49998117], + [ 6.80537067, 12.32478931, 4.4972239 , 2.62903341, 2.49998117], + [ 6.86250003, 12.39526891, 4.50937141, 2.64743508, 2.49998117], + [ 6.91325497, 12.45540509, 4.52091755, 2.66511512, 2.49998117], + [ 6.95883819, 12.5071222 , 4.53102043, 2.68183297, 2.49998117], + [ 6.99973079, 12.55198379, 4.54100304, 2.69722783, 2.49998117], + [ 7.03677468, 12.5910723 , 4.55014374, 2.71141997, 2.49998117], + [ 7.07045094, 12.62522965, 4.55868307, 2.72440939, 2.49998117]]) + np.testing.assert_allclose(cp, expected_cp) + + +def test_gibbs_free_energy_temp_array(): + molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + janaf_data = janaf.setup_network(molecules) + gibbs_funcs = janaf_data[3] + temperatures = np.arange(100.0, 4101.0, 500.0) + gibbs = tea.thermo_eval(temperatures, gibbs_funcs) + + expected_gibbs = np.array([ + [-3.17133424e+02, -1.16088681e+02, -1.59818988e+02, + -5.02592674e+02, -8.20487182e+01, -2.61580345e+01, + -1.86912862e+01, 1.34767459e+02, 2.15155216e+01, + 2.46172614e+02, -1.73952313e+01, 8.40705686e+02, + 5.47846591e+02, 2.77901183e+02], + [-7.19942299e+01, -3.83538117e+01, -4.66207721e+01, + -1.05556070e+02, -3.32912275e+01, -2.37361101e+01, + -1.64041870e+01, 1.90286902e+00, -1.49815655e+01, + 2.94108805e+01, -1.56631891e+01, 1.24152943e+02, + 7.58228197e+01, 3.00677680e+01], + [-5.16120930e+01, -3.38239976e+01, -3.79394442e+01, + -7.17936083e+01, -3.11258185e+01, -2.51133488e+01, + -1.77460657e+01, -1.23649275e+01, -1.98927195e+01, + 8.59717728e+00, -1.66138218e+01, 5.79016593e+01, + 3.18033564e+01, 6.39222419e+00], + [-4.47129619e+01, -3.34225599e+01, -3.52753255e+01, + -6.01006070e+01, -3.13341056e+01, -2.62131192e+01, + -1.87902703e+01, -1.86146276e+01, -2.22838364e+01, + 4.23524064e-01, -1.73388235e+01, 3.26889136e+01, + 1.49277086e+01, -2.85681422e+00], + [-4.15327188e+01, -3.40086693e+01, -3.42015976e+01, + -5.45090464e+01, -3.20565745e+01, -2.71075847e+01, + -1.96337403e+01, -2.23952165e+01, -2.38381927e+01, + -4.04703875e+00, -1.79077118e+01, 1.92925792e+01, + 5.89877483e+00, -7.89133267e+00], + [-3.98624680e+01, -3.48977825e+01, -3.37428163e+01, + -5.14044786e+01, -3.29091716e+01, -2.78585653e+01, + -2.03446702e+01, -2.50470695e+01, -2.49885061e+01, + -6.91376381e+00, -1.83734063e+01, 1.09318319e+01, + 2.26972437e-01, -1.11052554e+01], + [-3.89344931e+01, -3.58722619e+01, -3.35705245e+01, + -4.95326757e+01, -3.37755811e+01, -2.85049090e+01, + -2.09616674e+01, -2.70695166e+01, -2.59028825e+01, + -8.93367922e+00, -1.87669375e+01, 5.18817306e+00, + -3.69351747e+00, -1.33607688e+01], + [-3.84158187e+01, -3.68512157e+01, -3.35468397e+01, + -4.83493264e+01, -3.46155197e+01, -2.90721134e+01, + -2.15080647e+01, -2.86960551e+01, -2.66629713e+01, + -1.04488680e+01, -1.91073082e+01, 9.81302145e-01, + -6.58180440e+00, -1.50464658e+01], + [-3.81405228e+01, -3.78024079e+01, -3.36057563e+01, + -4.75832286e+01, -3.54147523e+01, -2.95772573e+01, + -2.19996178e+01, -3.00526088e+01, -2.73143300e+01, + -1.16368930e+01, -1.94072675e+01, -2.24469576e+00, + -8.80940438e+00, -1.63642684e+01]]) + np.testing.assert_allclose(gibbs, expected_gibbs) + + +def test_tea_network_init(): + nlayers = 81 + temperature = np.tile(1200.0, nlayers) + pressure = np.logspace(-8, 3, nlayers) + molecules = 'H2O CH4 CO CO2 H2 H C O'.split() + tea_net = tea.Tea_Network(pressure, temperature, molecules) + + expected_stoich_vals = np.array([ + [0, 2, 1], + [1, 4, 0], + [1, 0, 1], + [1, 0, 2], + [0, 2, 0], + [0, 1, 0], + [1, 0, 0], + [0, 0, 1]]) + + np.testing.assert_equal(tea_net.pressure, pressure) + np.testing.assert_equal(tea_net.temperature, temperature) + np.testing.assert_equal(tea_net.input_species, molecules) + np.testing.assert_equal(tea_net.species, molecules) + np.testing.assert_equal(tea_net.elements, ['C', 'H', 'O']) + + +def test_tea_network_cp_default_temp(): + nlayers = 81 + temperature = np.tile(1200.0, nlayers) + pressure = np.logspace(-8, 3, nlayers) + molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + tea_net = tea.Tea_Network(pressure, temperature, molecules) + cp = tea_net.heat_capacity() + + expected_cp = np.array([ + 5.26408044, 9.48143057, 4.11030773, 6.77638503, 7.34238673, + 4.05594463, 3.72748083, 6.3275286 , 3.79892261, 2.49998117, + 2.49998117, 2.50082308, 2.49998117, 2.51092596]) + assert np.shape(cp) == (nlayers, len(tea_net.species)) + np.testing.assert_allclose(cp[0], expected_cp) + + +def test_tea_network_cp_input_temp(): + nlayers = 81 + temperature = np.tile(1200.0, nlayers) + pressure = np.logspace(-8, 3, nlayers) + molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + tea_net = tea.Tea_Network(pressure, temperature, molecules) + + temps = [100.0, 600.0, 1200.0] + cp = tea_net.heat_capacity(temps) + + expected_cp = np.array([ + [4.00494915, 4.00001798, 3.50040662, 3.51291495, 4.00314507, + 3.50040662, 3.38614788, 3.50798378, 3.92412613, 2.49998117, + 2.49998117, 2.55831326, 2.49998117, 2.85081563], + [4.3688933 , 6.28146429, 3.6614513 , 5.69140811, 5.44749578, + 3.62140061, 3.52722736, 5.26865079, 3.55128183, 2.49998117, + 2.49998117, 2.50154471, 2.49998117, 2.54063323], + [5.26408044, 9.48143057, 4.11030773, 6.77638503, 7.34238673, + 4.05594463, 3.72748083, 6.3275286 , 3.79892261, 2.49998117, + 2.49998117, 2.50082308, 2.49998117, 2.51092596]]) + + assert np.shape(cp) == (len(temps), len(tea_net.species)) + np.testing.assert_allclose(cp, expected_cp) + np.testing.assert_equal(tea_net.temperature, temperature) + + +def test_tea_network_gibbs_default_temp(): + nlayers = 81 + temperature = np.tile(1200.0, nlayers) + pressure = np.logspace(-8, 3, nlayers) + molecules = 'H2O CH4 CO CO2 NH3 N2 H2 HCN OH H He C N O'.split() + tea_net = tea.Tea_Network(pressure, temperature, molecules) + gibbs = tea_net.gibbs_free_energy() + + expected_gibbs = np.array([ + -49.70275118, -33.59076581, -37.17544326, -68.58699428, + -31.08382889, -25.35365299, -17.97578591, -13.94856633, + -20.48067821, 6.44982554, -16.77498672, 51.21052551, + 27.33544072, 3.95818325]) + assert np.shape(gibbs) == (nlayers, len(tea_net.species)) + np.testing.assert_allclose(gibbs[0], expected_gibbs) +