Merge pull request #1 from aselimov/table-parsing

Table parsing
This commit is contained in:
Alex Selimov 2026-03-29 00:55:40 -04:00 committed by GitHub
commit 44061bf9ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 17334 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/target
cea

54
Cargo.lock generated Normal file
View file

@ -0,0 +1,54 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "aho-corasick"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
dependencies = [
"memchr",
]
[[package]]
name = "cea-rs"
version = "0.1.0"
dependencies = [
"regex",
]
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "regex"
version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"

View file

@ -4,3 +4,4 @@ version = "0.1.0"
edition = "2024" edition = "2024"
[dependencies] [dependencies]
regex = "1"

View file

@ -17,6 +17,25 @@ Below are the list of solvers in CEA and whether they are currently supported or
- [ ] shock - [ ] shock
- [ ] rocket - [ ] rocket
## Overview
```
.
├── Cargo.toml
├── LICENSE
├── README.md
└── src
├── properties/ # Thermodynamic input data and polynomial calculations
├── models/ # Basic Gas and GasMixture structs
├── equilibrium/ # Iterative solvers for TP, HP, SP, UV, TV, SV
├── rocket/ # Rocket solver functions
├── cj/ # Cj detonation functions
├── shock/ # shock solver functions
├── inputs.rs # input file parsing
└── main.rs
```
## License ## License
This project is licensed under the [MIT License](LICENSE). This project is licensed under the [MIT License](LICENSE).

36
src/lib.rs Normal file
View file

@ -0,0 +1,36 @@
pub mod properties;
#[macro_export]
macro_rules! assert_delta {
($left:expr, $right:expr, $delta:expr) => {{
let diff = ($left - $right).abs();
assert!(
diff <= $delta,
"|{} - {}| = {} > {}",
$left, $right, diff, $delta
);
}};
}
#[macro_export]
macro_rules! assert_vec_delta {
($left:expr, $right:expr, $delta:expr) => {{
let left = &$left;
let right = &$right;
assert_eq!(
left.len(),
right.len(),
"slice lengths differ: {} != {}",
left.len(),
right.len()
);
for (i, (l, r)) in left.iter().zip(right.iter()).enumerate() {
let diff = (*l - *r).abs();
assert!(
diff <= $delta,
"element {} not within delta: |{} - {}| = {} > {}",
i, l, r, diff, $delta
);
}
}};
}

2
src/properties/data.rs Normal file
View file

@ -0,0 +1,2 @@
const THERMO_DB: &str = include_str!("./thermo.inp");
const TRANSPORT_DB: &str = include_str!("./trans.inp");

34
src/properties/error.rs Normal file
View file

@ -0,0 +1,34 @@
use std::fmt;
#[derive(Debug)]
pub enum PropertiesError {
ParseError(String, String, String),
InvalidFormat(String),
InvalidFile,
InvalidLine(String),
}
impl fmt::Display for PropertiesError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
PropertiesError::ParseError(var, var_type, line) => {
write!(
f,
"Failed to parse {} with type {}\nline is\n{}",
var, var_type, line
)
}
PropertiesError::InvalidFormat(msg) => write!(f, "invalid format: {}", msg),
PropertiesError::InvalidLine(msg) => {
write!(f, "Failed to split line when parsing {}", msg)
}
PropertiesError::InvalidFile => write!(f, "Not enough lines in file"),
}
}
}
impl std::error::Error for PropertiesError {}
pub fn make_parse_error(var_name: &str, var_type: &str, line: &str) -> PropertiesError {
PropertiesError::ParseError(var_name.to_string(), var_type.to_string(), line.to_string())
}

9
src/properties/mod.rs Normal file
View file

@ -0,0 +1,9 @@
mod data;
mod error;
pub mod thermo_db;
mod thermo_fit;
pub mod transport_db;
mod transport_fit;
mod utils;
pub use error::PropertiesError;

View file

@ -0,0 +1,29 @@
thermo
200.00 1000.00 6000.00 20000. 1/1/2024
! Simple test thermo file with H2, O2, and H2O
H2 Hydrogen gas
2 test H 2.00 0.00 0.00 0.00 0.00 0 2.01588000 0.000
200.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8468.102
4.078323210D+04-8.009186040D+02 8.214701670D+00-1.269714457D-02 1.753605076D-05
-1.202860270D-08 3.368093490D-12 2.682484665D+03-3.043788844D+01
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8468.102
5.608128010D+05-8.371504740D+02 2.975364532D+00 1.252249124D-03-3.740716190D-07
5.936625200D-11-3.606994100D-15 5.339824410D+03-2.202774769D+00
O2 Oxygen gas
2 test O 2.00 0.00 0.00 0.00 0.00 0 31.99880000 0.000
200.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8680.104
-3.425563420D+04 4.847000970D+02 1.119010961D+00 4.293889240D-03-6.836300520D-07
-2.023372700D-09 1.039040018D-12 -3.391454870D+03 1.849699470D+01
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8680.104
-1.037939022D+06 2.344830282D+03 1.819732036D+00 1.267847582D-03-2.188067988D-07
2.053719572D-11-8.193467050D-16 -1.689010929D+04 1.738716506D+01
H2O Water vapor
2 test H 2.00 O 1.00 0.00 0.00 0.00 0 18.01528000 -241826.000
200.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 9904.092
-3.947960830D+04 5.755731020D+02 9.317826530D-01 7.222712860D-03-7.342557370D-06
4.955043490D-09-1.336933246D-12 -3.303974310D+04 1.724205775D+01
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 9904.092
1.034972096D+06-2.412698562D+03 4.646110780D+00 2.291998307D-03-6.836830480D-07
9.426468930D-11-4.822380530D-15 -1.384286509D+04-7.978148510D+00
END PRODUCTS
END REACTANTS

15802
src/properties/thermo.inp Normal file

File diff suppressed because it is too large Load diff

472
src/properties/thermo_db.rs Normal file
View file

@ -0,0 +1,472 @@
use crate::properties::{
PropertiesError,
error::make_parse_error,
thermo_fit::{Phase, SpeciesElement, SpeciesThermoData, ThermoPolynomial},
utils::parse_fields,
};
pub struct ThermoDB {
pub products: Vec<SpeciesThermoData>,
pub reactants: Vec<SpeciesThermoData>,
}
/// Parse a thermo formatted db
impl ThermoDB {
pub fn parse(thermo_inp: &str) -> Result<Self, PropertiesError> {
let mut lines = thermo_inp.lines();
let mut products = Vec::new();
let mut reactants = Vec::new();
let mut parse_products = true;
// Skip comments
while let Some(line) = lines.next() {
if line.trim().is_empty() || line.starts_with("!") {
continue;
} else if line.contains("thermo") {
_ = lines.next().ok_or(PropertiesError::InvalidFile)?;
continue;
} else if line.contains("END PRODUCTS") {
parse_products = false;
} else if line.contains("END REACTANTS") {
break;
} else if parse_products {
products.push(parse_species(line, &mut lines)?);
} else {
reactants.push(parse_species(line, &mut lines)?);
}
}
Ok(ThermoDB {
products,
reactants,
})
}
}
fn parse_species<'a>(
line: &str,
lines: &mut impl Iterator<Item = &'a str>,
) -> Result<SpeciesThermoData, PropertiesError> {
// Parsing a fortran generated file which means we used fixed column width parsing. Define the
// fixed column widths used
const SPECIES_LINE_2_WIDTHS: &[usize] = &[3, 7, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 13, 15];
let name = line
.get(0..16)
.ok_or(PropertiesError::InvalidLine("name".to_string()))?
.trim()
.to_string();
// line 2
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
let split = parse_fields(line, SPECIES_LINE_2_WIDTHS);
let intervals: usize = split[0]
.parse()
.map_err(|_| make_parse_error("intervals", "usize", &split[0]))?;
let mut elements = vec![];
for i in (2..=10).step_by(2) {
let element = split[i].to_string();
let count: f64 = split[i + 1]
.parse()
.map_err(|_| make_parse_error("species_count", "f64", &split[i + 1]))?;
if count.abs() > 1e-8 {
elements.push(SpeciesElement { element, count })
}
}
let phase = match split[12]
.parse::<i32>()
.map_err(|_| make_parse_error("phase", "i32", &split[12]))?
{
0 => Phase::Gas,
_ => Phase::Condensed,
};
let molecular_weight = split[13]
.parse()
.map_err(|_| make_parse_error("molecular_weight", "f64", &split[13]))?;
let h_formation = split[14]
.parse()
.map_err(|_| make_parse_error("h_formation", "f64", &split[14]))?;
let polynomials = parse_polynomials_block(lines, intervals)?;
// 0-interval species still have one reference state line (298.15 K data) that must be consumed
if intervals == 0 {
lines.next().ok_or(PropertiesError::InvalidFile)?;
}
Ok(SpeciesThermoData {
name,
polynomials,
elements,
phase,
molecular_weight,
h_formation,
})
}
fn parse_polynomials_block<'a>(
lines: &mut impl Iterator<Item = &'a str>,
intervals: usize,
) -> Result<Vec<ThermoPolynomial>, PropertiesError> {
// Now parse the actual polynomial intervals
(0..intervals)
.map(|_| parse_polynomial_block(lines))
.collect()
}
fn parse_polynomial_block<'a>(
lines: &mut impl Iterator<Item = &'a str>,
) -> Result<ThermoPolynomial, PropertiesError> {
// Ignore the coefficients since they are the same
const SPECIES_INTERVAL_1_WIDTHS: &[usize] = &[11, 11];
const SPECIES_INTERVAL_2_WIDTHS: &[usize] = &[16; 5];
const SPECIES_INTERVAL_3_WIDTHS: &[usize] = &[16; 5];
// Parse only the temps from first line
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
let splits = parse_fields(line, SPECIES_INTERVAL_1_WIDTHS);
let temp_lo: f64 = splits[0]
.parse()
.map_err(|_| make_parse_error("temp_lo", "f64", &splits[0]))?;
let temp_hi: f64 = splits[1]
.parse()
.map_err(|_| make_parse_error("temp_hi", "f64", &splits[1]))?;
// Now parse the first 5 coefficients
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
let splits = parse_fields(line, SPECIES_INTERVAL_2_WIDTHS);
let mut a: Vec<f64> = splits
.iter()
.map(|val| val.parse().map_err(|_| make_parse_error("a", "f64", val)))
.collect::<Result<Vec<f64>, PropertiesError>>()?;
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
let splits = parse_fields(line, SPECIES_INTERVAL_3_WIDTHS);
for i in [0, 1, 3, 4] {
a.push(
splits[i]
.parse()
.map_err(|_| make_parse_error("a", "f64", &splits[i]))?,
);
}
Ok(ThermoPolynomial {
a,
temp_range: (temp_lo, temp_hi),
})
}
#[cfg(test)]
mod test {
use crate::{
assert_delta, assert_vec_delta,
properties::{
thermo_db::{ThermoDB, parse_polynomial_block, parse_polynomials_block, parse_species},
thermo_fit::Phase,
},
};
#[test]
fn test_parse_polynomial_block() {
let polynomial_block = r#" 1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 6197.428
-4.181183250D+03-9.948557270D+00 2.548615878D+00-5.878760040D-05 3.132291294D-08
-7.748894630D-12 7.274447690D-16 1.091011485D+05 3.488667290D+00"#;
let mut lines = polynomial_block.lines();
let polynomial = parse_polynomial_block(&mut lines).unwrap();
let real = [
-4.181183250e+03,
-9.948557270e+00,
2.548615878e+00,
-5.878760040e-05,
3.132291294e-08,
-7.748894630e-12,
7.274447690e-16,
1.091011485e+05,
3.488667290e+00,
];
assert_vec_delta!(real, polynomial.a, 1e-9);
assert_delta!(polynomial.temp_range.0, 1000.000, 1e-3);
assert_delta!(polynomial.temp_range.1, 6000.000, 1e-3);
}
#[test]
fn test_parse_polynomials_block() {
let polynomials_block = r#" 300.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 6918.671
5.006608890D+03 1.861304407D+01 2.412531111D+00 1.987604647D-04-2.432362152D-07
1.538281506D-10-3.944375734D-14 3.887412680D+04 6.086585765D+00
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 6918.671
-2.920820938D+04 1.167751876D+02 2.356906505D+00 7.737231520D-05-1.529455262D-08
-9.971670260D-13 5.053278264D-16 3.823288650D+04 6.600920155D+00
6000.000 20000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 6918.671
-5.040682320D+08 3.802322650D+05-1.082347159D+02 1.549444292D-02-1.070103856D-06
3.592110900D-11-4.696039394D-16 -2.901050501D+06 9.491883160D+02"#;
let mut lines = polynomials_block.lines();
let polynomials = parse_polynomials_block(&mut lines, 3).unwrap();
let real_coeff_1 = [
5.006608890e+03,
1.861304407e+01,
2.412531111e+00,
1.987604647e-04,
-2.432362152e-07,
1.538281506e-10,
-3.944375734e-14,
3.887412680e+04,
6.086585765e+00,
];
assert_vec_delta!(real_coeff_1, polynomials[0].a, 1e-9);
assert_delta!(polynomials[0].temp_range.0, 300.000, 1e-3);
assert_delta!(polynomials[0].temp_range.1, 1000.000, 1e-3);
let real_coeff_2 = [
-2.920820938e+04,
1.167751876e+02,
2.356906505e+00,
7.737231520e-05,
-1.529455262e-08,
-9.971670260e-13,
5.053278264e-16,
3.823288650e+04,
6.600920155e+00,
];
assert_vec_delta!(real_coeff_2, polynomials[1].a, 1e-9);
assert_delta!(polynomials[1].temp_range.0, 1000.000, 1e-3);
assert_delta!(polynomials[1].temp_range.1, 6000.000, 1e-3);
let real_coeff_3 = [
-5.040682320e+08,
3.802322650e+05,
-1.082347159e+02,
1.549444292e-02,
-1.070103856e-06,
3.592110900e-11,
-4.696039394e-16,
-2.901050501e+06,
9.491883160e+02,
];
assert_vec_delta!(real_coeff_3, polynomials[2].a, 1e-9);
assert_delta!(polynomials[2].temp_range.0, 6000.000, 1e-3);
assert_delta!(polynomials[2].temp_range.1, 20000.000, 1e-3);
}
#[test]
fn test_parse_species() {
let species = r#"ALBr2 Gurvich,1996a pt1 p186 pt2 p149.
2 tpis96 AL 1.00BR 2.00 0.00 0.00 0.00 0 186.7895380 -140662.125
300.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 13397.875
3.199375870D+04-7.119178970D+02 9.478258110D+00-4.875531670D-03 5.516512990D-06
-3.340053040D-09 8.368476840D-13 -1.540591306D+04-1.742171366D+01
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 13397.875
-3.523782900D+05 4.671544170D+02 7.111908190D+00-5.551709200D-04 3.166301130D-07
-5.521028330D-11 3.176725950D-15 -2.265004078D+04-2.695610360D+00"#;
let mut lines = species.lines();
let line = lines.next().unwrap();
let species = parse_species(line, &mut lines).unwrap();
assert_eq!(species.name, "ALBr2");
assert_eq!(species.elements.len(), 2);
assert_eq!(species.elements[0].element, "AL");
assert_eq!(species.elements[0].count, 1.0);
assert_eq!(species.elements[1].element, "BR");
assert_eq!(species.elements[1].count, 2.0);
assert!(matches!(species.phase, Phase::Gas));
assert_delta!(species.molecular_weight, 186.7895380, 1e-7);
assert_delta!(species.h_formation, -140662.125, 1e-3);
let real_coeff_1 = [
3.199375870e+04,
-7.119178970e+02,
9.478258110e+00,
-4.875531670e-03,
5.516512990e-06,
-3.340053040e-09,
8.368476840e-13,
-1.540591306e+04,
-1.742171366e+01,
];
assert_vec_delta!(species.polynomials[0].a, real_coeff_1, 1e-9);
assert_delta!(species.polynomials[0].temp_range.0, 300.000, 1e-3);
assert_delta!(species.polynomials[0].temp_range.1, 1000.000, 1e-3);
let real_coeff_2 = [
-3.523782900e+05,
4.671544170e+02,
7.111908190e+00,
-5.551709200e-04,
3.166301130e-07,
-5.521028330e-11,
3.176725950e-15,
-2.265004078e+04,
-2.695610360e+00,
];
assert_vec_delta!(species.polynomials[1].a, real_coeff_2, 1e-9);
assert_delta!(species.polynomials[1].temp_range.0, 1000.000, 1e-3);
assert_delta!(species.polynomials[1].temp_range.1, 6000.000, 1e-3);
}
#[test]
fn test_parse_thermo_db() {
let thermo_file_contents = r#"!
! Some pointless header lines
!
thermo
200.00 1000.00 6000.00 20000. 9/8/2021
ALCL3 Gurvich,1996a pt1 p173 pt2 p134.
2 tpis96 AL 1.00CL 3.00 0.00 0.00 0.00 0 133.3405380 -584678.863
300.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 16400.803
7.750600970D+04-1.440779717D+03 1.401744141D+01-6.381631240D-03 5.871674720D-06
-2.908872278D-09 5.994050890D-13 -6.579343180D+04-4.494017799D+01
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 16400.803
-1.378630916D+05-5.579207290D+01 1.004190387D+01-1.682165339D-05 3.724664660D-09
-4.275526780D-13 1.982341329D-17 -7.343407470D+04-2.045130429D+01
END PRODUCTS
Air Mole%:N2 78.084,O2 20.9476,Ar .9365,CO2 .0319.Gordon,1982.Reac
2 g 9/95 N 1.5617O .41959AR.00937C .00032 .00000 0 28.9651159 -125.530
300.000 1000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8649.264
1.009950160D+04-1.968275610D+02 5.009155110D+00-5.761013730D-03 1.066859930D-05
-7.940297970D-09 2.185231910D-12 -1.767967310D+02-3.921504225D+00
1000.000 6000.0007 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 0.0 8649.264
2.415214430D+05-1.257874600D+03 5.144558670D+00-2.138541790D-04 7.065227840D-08
-1.071483490D-11 6.577800150D-16 6.462263190D+03-8.147411905D+00
n-Butanol ANL's Active Thermochemical Tables (ATcT). React.
0 g 5/23 C 4.00H 10.00O 1.00 0.00 0.00 1 74.1216000 -278510.000
298.150 0.0000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000
END REACTANTS
"#;
let thermo_db = ThermoDB::parse(thermo_file_contents).unwrap();
assert_eq!(thermo_db.products.len(), 1);
assert_eq!(thermo_db.reactants.len(), 2);
// --- ALCL3 (product) ---
let alcl3 = &thermo_db.products[0];
assert_eq!(alcl3.name, "ALCL3");
assert_eq!(alcl3.elements.len(), 2);
assert_eq!(alcl3.elements[0].element, "AL");
assert_delta!(alcl3.elements[0].count, 1.0, 1e-9);
assert_eq!(alcl3.elements[1].element, "CL");
assert_delta!(alcl3.elements[1].count, 3.0, 1e-9);
assert!(matches!(alcl3.phase, Phase::Gas));
assert_delta!(alcl3.molecular_weight, 133.3405380, 1e-7);
assert_delta!(alcl3.h_formation, -584678.863, 1e-3);
assert_eq!(alcl3.polynomials.len(), 2);
assert_vec_delta!(
alcl3.polynomials[0].a,
[
7.750600970e+04,
-1.440779717e+03,
1.401744141e+01,
-6.381631240e-03,
5.871674720e-06,
-2.908872278e-09,
5.994050890e-13,
-6.579343180e+04,
-4.494017799e+01,
],
1e-9
);
assert_delta!(alcl3.polynomials[0].temp_range.0, 300.0, 1e-3);
assert_delta!(alcl3.polynomials[0].temp_range.1, 1000.0, 1e-3);
assert_vec_delta!(
alcl3.polynomials[1].a,
[
-1.378630916e+05,
-5.579207290e+01,
1.004190387e+01,
-1.682165339e-05,
3.724664660e-09,
-4.275526780e-13,
1.982341329e-17,
-7.343407470e+04,
-2.045130429e+01,
],
1e-9
);
assert_delta!(alcl3.polynomials[1].temp_range.0, 1000.0, 1e-3);
assert_delta!(alcl3.polynomials[1].temp_range.1, 6000.0, 1e-3);
// --- Air (reactant 0) ---
let air = &thermo_db.reactants[0];
assert_eq!(air.name, "Air");
assert_eq!(air.elements.len(), 4);
assert_eq!(air.elements[0].element, "N");
assert_delta!(air.elements[0].count, 1.5617, 1e-9);
assert_eq!(air.elements[1].element, "O");
assert_delta!(air.elements[1].count, 0.41959, 1e-9);
assert_eq!(air.elements[2].element, "AR");
assert_delta!(air.elements[2].count, 0.00937, 1e-9);
assert_eq!(air.elements[3].element, "C");
assert_delta!(air.elements[3].count, 0.00032, 1e-9);
assert!(matches!(air.phase, Phase::Gas));
assert_delta!(air.molecular_weight, 28.9651159, 1e-7);
assert_delta!(air.h_formation, -125.530, 1e-3);
assert_eq!(air.polynomials.len(), 2);
assert_vec_delta!(
air.polynomials[0].a,
[
1.009950160e+04,
-1.968275610e+02,
5.009155110e+00,
-5.761013730e-03,
1.066859930e-05,
-7.940297970e-09,
2.185231910e-12,
-1.767967310e+02,
-3.921504225e+00,
],
1e-9
);
assert_delta!(air.polynomials[0].temp_range.0, 300.0, 1e-3);
assert_delta!(air.polynomials[0].temp_range.1, 1000.0, 1e-3);
assert_vec_delta!(
air.polynomials[1].a,
[
2.415214430e+05,
-1.257874600e+03,
5.144558670e+00,
-2.138541790e-04,
7.065227840e-08,
-1.071483490e-11,
6.577800150e-16,
6.462263190e+03,
-8.147411905e+00,
],
1e-9
);
assert_delta!(air.polynomials[1].temp_range.0, 1000.0, 1e-3);
assert_delta!(air.polynomials[1].temp_range.1, 6000.0, 1e-3);
// --- n-Butanol (reactant 1) ---
let butanol = &thermo_db.reactants[1];
assert_eq!(butanol.name, "n-Butanol");
assert_eq!(butanol.elements.len(), 3);
assert_eq!(butanol.elements[0].element, "C");
assert_delta!(butanol.elements[0].count, 4.0, 1e-9);
assert_eq!(butanol.elements[1].element, "H");
assert_delta!(butanol.elements[1].count, 10.0, 1e-9);
assert_eq!(butanol.elements[2].element, "O");
assert_delta!(butanol.elements[2].count, 1.0, 1e-9);
assert!(matches!(butanol.phase, Phase::Condensed));
assert_delta!(butanol.molecular_weight, 74.1216000, 1e-7);
assert_delta!(butanol.h_formation, -278510.000, 1e-3);
assert_eq!(butanol.polynomials.len(), 0);
}
}

View file

@ -0,0 +1,22 @@
pub enum Phase {
Gas,
Condensed,
}
pub struct SpeciesThermoData {
pub name: String,
pub elements: Vec<SpeciesElement>,
pub phase: Phase,
pub polynomials: Vec<ThermoPolynomial>,
pub molecular_weight: f64,
pub h_formation: f64,
}
pub struct ThermoPolynomial {
pub a: Vec<f64>,
pub temp_range: (f64, f64),
}
pub struct SpeciesElement {
pub element: String,
pub count: f64,
}

488
src/properties/trans.inp Normal file
View file

@ -0,0 +1,488 @@
transport property coefficients
Ar V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.61205763E 00-0.67714354E 02 0.19040660E 03 0.21588272E 01
V 1000.0 5000.0 0.69357334E 00 0.70953943E 02-0.28386007E 05 0.14856447E 01
V 5000.0 15000.0 0.76608935E+00 0.67867215E+03-0.84991417E+06 0.77935167E+00
C 200.0 1000.0 0.60968928E 00-0.70892249E 02 0.58420624E 03 0.19337152E 01
C 1000.0 5000.0 0.69075463E 00 0.62676058E 02-0.25667413E 05 0.12664189E 01
C 5000.0 15000.0 0.76269502E+00 0.62341752E+03-0.71899552E+06 0.56927918E+00
BCL3 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.52572590E 00-0.27803504E 03 0.19159256E 05 0.24373790E 01
V 1000.0 5000.0 0.62929553E 00-0.60723560E 02-0.37711618E 05 0.15615047E 01
C 300.0 1000.0 0.41518585E 00-0.48149960E 03 0.30788060E 05 0.33168239E 01
C 1000.0 5000.0 0.61148589E 00-0.18167042E 03-0.20976969E 05 0.17127671E 01
BF3 V2C2 SVEHLA (1962,1994)
V 300.0 1000.0 0.58778079E 00-0.96213686E 02-0.37660007E 03 0.21035273E 01
V 1000.0 5000.0 0.64430285E 00 0.73362845E 01-0.23890605E 05 0.16330508E 01
C 300.0 1000.0 0.39288181E 00-0.53781426E 03 0.39023491E 05 0.42287006E 01
C 1000.0 5000.0 0.60695214E 00-0.19889031E 03-0.23403767E 05 0.24734586E 01
Br2 V2C2 SVEHLA (1962,1994)
V 300.0 1000.0 0.45241871E 00-0.52542766E 03 0.61354230E 05 0.35322870E 01
V 1000.0 5000.0 0.60111079E 00-0.22499274E 03-0.14517179E 05 0.22805949E 01
C 300.0 1000.0 0.13579199E 00-0.80137295E 03 0.83046621E 05 0.48052172E 01
C 1000.0 5000.0 0.13602376E 00-0.21904601E 04 0.77769913E 06 0.54980508E 01
C V2C2 BIOLSI (1982)
V 1000.0 5000.0 0.80124735E+00 0.17261643E+03-0.69940019E+05 0.88364870E-01
V 5000.0 15000.0 0.10344416E+01 0.31310924E+04-0.45512020E+07-0.23102402E+01
C 1000.0 5000.0 0.80224051E+00 0.17739617E+03-0.72350849E+05 0.10329911E+01
C 5000.0 15000.0 0.10355137E+01 0.31489830E+04-0.45854028E+07-0.13676372E+01
C O V1C0 CAPITELLI & FICOCELLI (1973)
V 4000.0 15000.0 0.12635466E+01 0.46866528E+04-0.59789292E+07-0.43066246E+01
CCLF3 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.57775962E 00-0.11595656E 03 0.13894846E 04 0.20719367E 01
V 1000.0 5000.0 0.64278913E 00 0.18533422E 01-0.25000775E 05 0.15313091E 01
C 300.0 1000.0 0.30701673E 00-0.58621120E 03 0.37562739E 05 0.45977739E 01
C 1000.0 5000.0 0.59447897E 00-0.25405493E 03 0.15214514E 05 0.23022470E 01
CCL2F2 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.55188576E 00-0.18084616E 03 0.74399094E 04 0.22089157E 01
V 1000.0 5000.0 0.63820813E 00-0.16395245E 02-0.31624406E 05 0.14872353E 01
C 300.0 1000.0 0.37505967E 00-0.45975338E 03 0.13246268E 05 0.38355232E 01
C 1000.0 5000.0 0.59226968E 00-0.25988712E 03 0.21916978E 05 0.21265525E 01
CCL3F V2C2 SVEHLA (1994)
V 300.0 1000.0 0.52599241E 00-0.27466441E 03 0.18699061E 05 0.23965367E 01
V 1000.0 5000.0 0.62963969E 00-0.58775545E 02-0.37421689E 05 0.15207986E 01
C 300.0 1000.0 0.25082525E 00-0.69236016E 03 0.58465610E 05 0.46480202E 01
C 1000.0 5000.0 0.58847038E 00-0.29613903E 03 0.29176214E 05 0.19487185E 01
CCL4 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.52914726E 00-0.26173707E 03 0.16983586E 05 0.22508228E 01
V 1000.0 5000.0 0.63117223E 00-0.50873987E 02-0.37435436E 05 0.13896152E 01
C 300.0 1000.0 0.39796301E 00-0.45970713E 03 0.25887539E 05 0.32182809E 01
C 1000.0 5000.0 0.60345477E 00-0.22665258E 03 0.12105253E 05 0.15795218E 01
CF4 V2C2 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 300.0 1000.0 0.62364242E 00-0.15734540E 02-0.11268526E 05 0.17826560E 01
V 1000.0 5000.0 0.52895824E 00-0.34441290E 03 0.10572786E 06 0.26483931E 01
C 300.0 1000.0 0.29102001E 00-0.62544847E 03 0.40137545E 05 0.50559989E 01
C 1000.0 5000.0 0.46958735E 00-0.71864138E 03 0.17601542E 06 0.37798145E 01
CHCLF2 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.55518512E 00-0.19151112E 03 0.92302454E 04 0.22465942E 01
V 1000.0 5000.0 0.63832814E 00-0.18642363E 02-0.35632589E 05 0.15442566E 01
C 300.0 1000.0 0.57111784E 00-0.40344356E 03 0.76841854E 04 0.26855196E 01
C 1000.0 5000.0 0.57237181E 00-0.42144805E 03 0.17313314E 05 0.26852328E 01
CHCL2F V2C2 SVEHLA (1994)
V 300.0 1000.0 0.54261029E 00-0.23693132E 03 0.14722387E 05 0.22950603E 01
V 1000.0 5000.0 0.63322050E 00-0.43091499E 02-0.36892355E 05 0.15269221E 01
C 300.0 1000.0 0.64554399E 00-0.29614334E 03-0.34305973E 04 0.18524599E 01
C 1000.0 5000.0 0.58133799E 00-0.38461009E 03 0.86999769E 04 0.23723154E 01
CHCL3 V2C2 SVEHLA (1962,1994)
V 300.0 1000.0 0.52563815E 00-0.28025371E 03 0.19479241E 05 0.23475804E 01
V 1000.0 5000.0 0.62913497E 00-0.61794789E 02-0.38001753E 05 0.14716717E 01
C 300.0 1000.0 0.43704658E 00-0.53648192E 03 0.29187663E 05 0.32672103E 01
C 1000.0 5000.0 0.55383193E 00-0.51059645E 03 0.74636570E 05 0.23891512E 01
CHF3 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.58092199E 00-0.11862927E 03 0.25039931E 04 0.20948315E 01
V 1000.0 5000.0 0.64363521E 00-0.70920001E 00-0.25099472E 05 0.15713073E 01
C 300.0 1000.0 0.73882642E 00-0.17058713E 03-0.32698111E 05 0.16126977E 01
C 1000.0 5000.0 0.58787951E 00-0.35203256E 03-0.17448254E 05 0.28215977E 01
CH2CL2 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.57185884E 00-0.34599168E 03 0.32975791E 05 0.21786059E 01
V 1000.0 5000.0 0.60922943E 00-0.18784625E 03-0.27411214E 05 0.18227006E 01
C 300.0 1000.0 0.25979341E 00-0.10510041E 04 0.11078850E 06 0.51956543E 01
C 1000.0 5000.0 0.48080771E 00-0.95120530E 03 0.17139452E 06 0.35085367E 01
CH3CL V2C2 MONCHICK & MASON (1961) SVEHLA (1994)
V 300.0 1000.0 0.58181268E 00-0.30714376E 03 0.27516618E 05 0.20941516E 01
V 1000.0 5000.0 0.61479454E 00-0.16327574E 03-0.27926072E 05 0.17778956E 01
C 300.0 1000.0 0.43048390E 00-0.96586387E 03 0.91616260E 05 0.44424192E 01
C 1000.0 5000.0 0.44418462E 00-0.11573896E 04 0.19422838E 06 0.44366915E 01
CH4 V2C2 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.57643622E 00-0.93704079E 02 0.86992395E 03 0.17333347E 01
V 1000.0 5000.0 0.66400044E 00 0.10860843E 02-0.76307841E 04 0.10323984E 01
C 200.0 1000.0 0.10238177E 01-0.31092375E 03 0.32944309E 05 0.67787437E 00
C 1000.0 5000.0 0.77485028E 00-0.40089627E 03-0.46551082E 05 0.25671481E 01
CH4 O2 V2C0 SVEHLA (1994)
V 300.0 1000.0 0.68971658E 00-0.82884483E 00-0.47557575E 04 0.11497470E 01
V 1000.0 5000.0 0.69426262E 00-0.17685146E 02 0.59452784E 04 0.11244994E 01
CH3OH V2C2 MONCHICK & MASON (1961) SVEHLA (1994)
V 300.0 1000.0 0.58408390E 00-0.30677174E 03 0.27569892E 05 0.19794348E 01
V 1000.0 5000.0 0.61454903E 00-0.16540203E 03-0.27881995E 05 0.16830713E 01
C 300.0 1000.0 0.33374512E 00-0.11617154E 04 0.10894211E 06 0.57684124E 01
C 1000.0 5000.0 0.42733576E 00-0.12682528E 04 0.20900463E 06 0.51283860E 01
CO V3C3 SVEHLA (1994)
V 200.0 1000.0 0.62526577E 00-0.31779652E 02-0.16407983E 04 0.17454992E 01
V 1000.0 5000.0 0.87395209E 00 0.56152222E 03-0.17394809E 06-0.39335958E 00
V 5000.0 15000.0 0.88503551E+00 0.90902171E+03-0.73129061E+06-0.53503838E+00
C 200.0 1000.0 0.85439436E+00 0.10573224E+03-0.12347848E+05 0.47793128E+00
C 1000.0 5000.0 0.88407146E+00 0.13357293E+03-0.11429640E+05 0.24417019E+00
C 5000.0 15000.0 0.24175411E+01 0.80462671E+04 0.31090740E+07-0.14516932E+02
CO CO2 V3C0 SVEHLA (1995)
V 300.0 1000.0 0.68926185E 00-0.13796096E 01-0.46847568E 04 0.13060681E 01
V 1000.0 5000.0 0.69417954E 00-0.18021840E 02 0.60950694E 04 0.12779603E 01
V 5000.0 10000.0 0.61979004E+00-0.79830067E+03 0.11130858E+07 0.20233248E+01
CO N2 V3C0 SVEHLA (1994)
V 200.0 1000.0 0.62526577E 00-0.31779652E 02-0.16407983E 04 0.17454992E 01
V 1000.0 5000.0 0.87395209E 00 0.56152222E 03-0.17394809E 06-0.39335958E 00
V 5000.0 15000.0 0.88503551E+00 0.90902171E+03-0.73129061E+06-0.53503838E+00
CO O2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.70122551E 00 0.51717887E 01-0.14240838E 04 0.12895991E 01
V 1000.0 5000.0 0.66744478E 00-0.86348036E 02 0.27445341E 05 0.15855986E 01
V 5000.0 15000.0 0.21151565E+00-0.91881544E+04 0.18253525E+08 0.65600002E+01
COS V2C2 SVEHLA (1962)
V 300.0 1000.0 0.52573161E 00-0.27668290E 03 0.18982511E 05 0.25359860E 01
V 1000.0 5000.0 0.62947137E 00-0.59744762E 02-0.37616630E 05 0.16590382E 01
C 300.0 1000.0 0.56172985E 00-0.42167958E 03 0.28198920E 05 0.26921796E 01
C 1000.0 5000.0 0.65503267E 00-0.17103349E 03-0.50472397E 05 0.18756918E 01
CO2 V3C3 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.51137258E 00-0.22951321E 03 0.13710678E 05 0.27075538E 01
V 1000.0 5000.0 0.63978285E 00-0.42637076E 02-0.15522605E 05 0.16628843E 01
V 5000.0 10000.0 0.72150912E+00 0.75012895E+03-0.11825507E+07 0.85493645E+00
C 200.0 1000.0 0.48056568E+00-0.50786720E+03 0.35088811E+05 0.36747794E+01
C 1000.0 5000.0 0.69857277E+00-0.11830477E+03-0.50688859E+05 0.18650551E+01
C 5000.0 10000.0 0.10518358E+01-0.42555944E+04 0.14288688E+08-0.88950473E+00
CO2 H2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.66101867E 00-0.40651732E 02-0.42877325E 04 0.74444661E 00
V 1000.0 5000.0 0.70351908E 00 0.19946369E 02-0.13336698E 05 0.39931502E 00
V 5000.0 10000.0 0.66401272E+00-0.33671205E+03 0.41670634E+06 0.78993145E+00
CO2 H2O V3C0 SVEHLA (1994)
V 300.0 1000.0 0.56499100E 00-0.32219550E 03 0.26301733E 05 0.26351165E 01
V 1000.0 5000.0 0.68455483E 00-0.33114757E 02-0.58456473E 05 0.16048763E 01
V 5000.0 10000.0 0.70748069E+00 0.11586070E+03-0.22772841E+06 0.13865863E+01
CO2 N2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.68926185E 00-0.13796096E 01-0.46847568E 04 0.13060681E 01
V 1000.0 5000.0 0.69417954E 00-0.18021840E 02 0.60950694E 04 0.12779603E 01
V 5000.0 10000.0 0.61979004E+00-0.79830067E+03 0.11130858E+07 0.20233248E+01
CO2 O2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.55753165E 00-0.17140020E 03 0.72594450E 04 0.24603725E 01
V 1000.0 5000.0 0.66011947E 00 0.25362441E 02-0.39828007E 05 0.16020458E 01
V 5000.0 10000.0 0.66564107E+00 0.13062608E+03-0.27519463E+06 0.15433736E+01
CS2 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.54573740E 00-0.36042852E 03 0.33177885E 05 0.23235206E 01
V 1000.0 5000.0 0.61427787E 00-0.15337427E 03-0.36078656E 05 0.17122621E 01
C 300.0 1000.0 0.52603181E 00-0.50780062E 03 0.41502601E 05 0.26684257E 01
C 1000.0 5000.0 0.66331137E 00-0.15058989E 03-0.68462565E 05 0.14728865E 01
C2H2,acetylene V2C2 SVEHLA (1962,1994)
V 300.0 1000.0 0.56299896E 00-0.15304865E 03 0.46019734E 04 0.18854528E 01
V 1000.0 5000.0 0.64038318E 00-0.72360229E 01-0.29612277E 05 0.12393032E 01
C 300.0 1000.0 0.84030505E 00-0.10051610E 03-0.26171483E 05 0.11926036E 01
C 1000.0 5000.0 0.62672572E 00-0.58147342E 03 0.10751724E 06 0.30152260E 01
C2H4 V2C2 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.59136053E 00-0.14088938E 03 0.30012800E 04 0.17018932E 01
V 1000.0 5000.0 0.66000894E 00 0.39114999E 02-0.52676489E 05 0.11033601E 01
C 200.0 1000.0 0.24736650E 00-0.10589987E 04 0.89911568E 05 0.64456092E 01
C 1000.0 5000.0 0.51616035E 00-0.92486351E 03 0.15723887E 06 0.43873845E 01
C2H6 V2C2 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.59089348E 00-0.13994405E 03 0.29868374E 04 0.15988866E 01
V 1000.0 5000.0 0.66061323E 00 0.41062220E 02-0.52656212E 05 0.99191640E 00
C 200.0 1000.0 0.70867490E 00-0.63016563E 03 0.50951026E 05 0.29508724E 01
C 1000.0 5000.0 0.57947247E 00-0.64990228E 03-0.37806714E 04 0.39178395E 01
C2H5OH V2C2 SVEHLA (1994)
V 300.0 1000.0 0.54586031E 00-0.31382676E 03 0.26089200E 05 0.21078504E 01
V 1000.0 5000.0 0.61957901E 00-0.11935847E 03-0.34285357E 05 0.14645259E 01
C 300.0 1000.0 0.22185435E 00-0.12251941E 04 0.11716632E 06 0.65571580E 01
C 1000.0 5000.0 0.42915840E 00-0.12128199E 04 0.21462928E 06 0.50153152E 01
C2N2 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.52471007E 00-0.28839713E 03 0.20625913E 05 0.23625791E 01
V 1000.0 5000.0 0.62832879E 00-0.66440897E 02-0.38542772E 05 0.14840188E 01
C 300.0 1000.0 0.76361743E 00-0.24078764E 03 0.11152243E 05 0.13726624E 01
C 1000.0 5000.0 0.66495585E 00-0.19733792E 03-0.59902201E 05 0.20817971E 01
CL2 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.53516134E 00-0.23624735E 03 0.13738454E 05 0.24970463E 01
V 1000.0 5000.0 0.63348430E 00-0.38786240E 02-0.35830615E 05 0.16699633E 01
C 300.0 1000.0 0.34156262E 00-0.46059166E 03 0.34712872E 05 0.37412367E 01
C 1000.0 5000.0 0.87392526E 00 0.19876120E 03-0.28784264E 05-0.53204988E 00
D2 V2C2 SVEHLA (1994)
V 200.0 1000.0 0.74566381E 00 0.43611949E 02-0.32396252E 04 0.48064872E 00
V 1000.0 5000.0 0.96835229E 00 0.68241861E 03-0.21129775E 06-0.14883773E 01
C 200.0 1000.0 0.11180891E 01 0.29771761E 03-0.23323095E 05 0.94208300E-01
C 1000.0 5000.0 0.10670411E 01 0.49811245E 03-0.14904299E 06 0.37216028E 00
D2O V2C2 MATSUNAGA & NAGASHIMA(1983) SVEHLA(1994)
V 300.0 1000.0 0.51773336E 00-0.66413680E 03 0.82973607E 05 0.29575078E 01
V 1000.0 5000.0 0.58703537E 00-0.55101540E 03 0.61063786E 05 0.23875750E 01
C 300.0 1000.0 0.74656939E 00-0.10592831E 04 0.17838377E 06 0.26602773E 01
C 1000.0 5000.0 0.50642285E 00-0.16925317E 04 0.37493403E 06 0.47558493E 01
e- V1C1 MASON ET AL (1967)
V 2000.0 5000.0 0.59319174E 01 0.56594215E 04-0.22576125E 07-0.53458874E 02
C 2000.0 5000.0 0.59320964E 01 0.56601476E 04-0.22577332E 07-0.42512600E 02
e- H V2C0 CAPITELLI ET AL (1976)
V 2000.0 8000.0 0.12996657E+01 0.29049200E+04-0.19315880E+07-0.96081497E+01
V 8000.0 15000.0 0.13439163E+01 0.62981265E+04-0.14088393E+08-0.10240040E+02
e- H2 V2C0 CAPITELLI ET AL (1976)
V 1000.0 8000.0 0.13682927E+01 0.70665102E+04-0.56748561E+07-0.10480386E+02
V 8000.0 15000.0 0.20875514E+01 0.27345700E+05-0.63775336E+08-0.18571585E+02
e- N V2C0 CAPITELLI & DEVOTO (1973)
V 5000.0 10000.0 0.14373966E+01 0.18230345E+05-0.27492090E+08-0.96279246E+01
V10000.0 15000.0 0.22566004E+01 0.48916050E+05-0.13996043E+09-0.19116958E+02
e- NO V2C0 GUPTA ET AL (1990)
V 2000.0 6000.0 0.61252493E+00 0.46768585E+04-0.30292080E+07-0.30467956E+01
V 6000.0 15000.0 -0.31058569E+01-0.69841116E+05 0.15359384E+09 0.37370344E+02
e- N2 V2C0 CAPITELLI & DEVOTO (1973)
V 5000.0 10000.0 0.22167522E+01 0.22078280E+05-0.26142843E+08-0.18975334E+02
V10000.0 15000.0 0.14276153E+01 0.81306835E+04 0.41382925E+07-0.10615166E+02
e- O V2C0 GUPTA ET AL (1990)
V 2000.0 6000.0 -0.36876460E+00-0.19261587E+04 0.72235159E+06 0.82699294E+01
V 6000.0 15000.0 0.12858415E+00 0.88173340E+04-0.22555849E+08 0.27992711E+01
e- O2 V2C0 GUPTA ET AL (1990)
V 2000.0 6000.0 -0.12686144E+01-0.64961158E+04 0.37615998E+07 0.15676996E+02
V 6000.0 15000.0 0.44642126E+01 0.65553833E+05-0.10919736E+09-0.43066392E+02
F2 V2C2 SVEHLA (1962,1994)
V 200.0 1000.0 0.61198519E 00-0.39647960E 02-0.17294474E 04 0.21237710E 01
V 1000.0 5000.0 0.64406091E 00-0.58273377E 00-0.52243255E 04 0.18666294E 01
C 200.0 1000.0 0.46767823E 00-0.26624115E 03 0.18169657E 05 0.36165585E 01
C 1000.0 5000.0 -0.19981248E 00-0.25129092E 04 0.80775379E 06 0.96845049E 01
H V2C2 VANDERSLICE ET AL (1962)
V 1000.0 5000.0 0.74226149E+00-0.40132865E+03 0.18554165E+06 0.46741844E-01
V 5000.0 15000.0 0.87486623E+00-0.25022902E+04 0.70955048E+07-0.93888455E+00
C 1000.0 5000.0 0.74166119E+00-0.40487203E+03 0.18775642E+06 0.34843121E+01
C 5000.0 15000.0 0.87447639E+00-0.25089452E+04 0.71081294E+07 0.24970991E+01
H H+ V2C0 CAPITELLI ET AL (1976)
V 2000.0 8000.0 0.65497943E+00 0.43620326E+03-0.20032290E+06-0.15933989E+01
V 8000.0 15000.0 0.35775595E+00-0.56298406E+04 0.14552701E+08 0.16055465E+01
H H2 V2C0 TANG & WEI (1974) SVEHLA (1994)
V 1000.0 5000.0 0.91735768E+00 0.22052887E+03-0.57464994E+05-0.93741490E+00
V 5000.0 15000.0 0.94056210E+00-0.17266834E+02 0.82707957E+06-0.11228741E+01
H Li V2C0 KRUPENIE ET AL (1963)
V 1000.0 5000.0 0.88870800E+00 0.25460216E+03-0.71635951E+05-0.24355021E+01
V 5000.0 10000.0 0.96451195E+00 0.78151762E+03-0.44137515E+06-0.31717326E+01
H N V2C0 STALLCOP ET AL (1992b)
V 1000.0 6000.0 0.75455738E+00-0.15697085E+03 0.97258456E+05-0.48331565E-01
V 6000.0 16000.0 0.15653364E+01 0.87404680E+04-0.12001036E+08-0.82485581E+01
H N2 V2C0 STALLCOP ET AL (1992a)
V 600.0 3000.0 0.10228384E+01 0.53349114E+03-0.11365313E+06-0.23880331E+01
V 3000.0 10000.0 0.13275932E+01 0.14701554E+04-0.14725296E+06-0.51365002E+01
H O V2C0 KRUPENIE ET AL (1963)
V 1000.0 5000.0 0.85479480E+00 0.18680077E+03-0.46790687E+05-0.11272657E+01
V 5000.0 10000.0 0.88515794E+00 0.64127280E+02 0.63943230E+06-0.13887887E+01
HBr V2C2 ZELEZNIK & SVEHLA (1970) SVEHLA (1994)
V 300.0 1000.0 0.54286515E 00-0.32909036E 03 0.28143861E 05 0.29266732E 01
V 1000.0 5000.0 0.61904039E 00-0.12370443E 03-0.36461217E 05 0.22596924E 01
C 300.0 1000.0 0.91269760E 00-0.15456150E 03 0.21177636E 05-0.43914664E 00
C 1000.0 5000.0 0.63722827E 00-0.35434488E 03-0.16663585E 05 0.17013527E 01
HCN V2C2 ZELEZNIK & SVEHLA (1970) SVEHLA (1994)
V 300.0 1000.0 0.94863717E 00-0.14891490E 03 0.15258721E 05-0.72592817E 00
V 1000.0 5000.0 0.57370725E 00-0.85239973E 03 0.17953641E 06 0.24032031E 01
C 300.0 1000.0 0.11749061E 01-0.19100307E 03 0.15714065E 05-0.13488014E 01
C 1000.0 5000.0 0.50543688E 00-0.13891056E 04 0.28003144E 06 0.42095130E 01
HCL V2C2 SVEHLA (1994)
V 300.0 1000.0 0.54302009E 00-0.27882979E 03 0.20927618E 05 0.25895500E 01
V 1000.0 5000.0 0.62673906E 00-0.81516979E 02-0.35869154E 05 0.18707238E 01
C 300.0 1000.0 0.90670645E 00-0.13561693E 03 0.18563886E 05 0.60312859E-01
C 1000.0 5000.0 0.62521138E 00-0.43742347E 03 0.28720932E 05 0.22964614E 01
HF V2C2 SVEHLA (1994)
V 300.0 1000.0 0.81674828E 00-0.23635428E 03 0.22759084E 05 0.70625888E 00
V 1000.0 5000.0 0.58742532E 00-0.55543347E 03 0.67637899E 05 0.25645661E 01
C 300.0 1000.0 0.12590294E 01 0.11896441E 01-0.47558763E 03-0.19367617E 01
C 1000.0 5000.0 0.51518587E 00-0.14932469E 04 0.37482086E 06 0.43206676E 01
HF H6F6 V2C0 SVEHLA (1994)
V 300.0 1000.0 0.52633473E 00-0.32896634E 03 0.26842682E 05 0.22132195E 01
V 1000.0 5000.0 0.62213454E 00-0.10239431E 03-0.38543254E 05 0.13902717E 01
HI V2C2 SVEHLA (1962)
V 300.0 1000.0 0.53718504E 00-0.22504609E 03 0.12416876E 05 0.27888146E 01
V 1000.0 5000.0 0.63448421E 00-0.33714923E 02-0.34599137E 05 0.19723806E 01
C 300.0 1000.0 0.83653272E 00-0.10434645E 03 0.90075923E 04-0.38982280E 00
C 1000.0 5000.0 0.65866010E 00-0.18846822E 03-0.37866478E 05 0.96987360E 00
H2 V3C3 ASSAEL ET AL (1986) SVEHLA (1994)
V 200.0 1000.0 0.74553182E 00 0.43555109E 02-0.32579340E 04 0.13556243E 00
V 1000.0 5000.0 0.96730605E 00 0.67931897E 03-0.21025179E 06-0.18251697E 01
V 5000.0 15000.0 0.10126129E+01 0.14973739E+04-0.14428484E+07-0.23254928E+01
C 200.0 1000.0 0.10059461E+01 0.27951262E+03-0.29792018E+05 0.11996252E+01
C 1000.0 5000.0 0.10582450E+01 0.24875372E+03 0.11736907E+05 0.82758695E+00
C 5000.0 15000.0 -0.22364420E+00-0.69650442E+04-0.77771313E+05 0.13189369E+02
H2 H2O V3C0 SVEHLA (1964)
V 300.0 1000.0 0.60085490E 00-0.67691161E 02-0.21319326E 04 0.14199776E 01
V 1000.0 5000.0 0.64550551E 00 0.10165601E 02-0.18735061E 05 0.10502885E 01
V 5000.0 10000.0 0.66153255E+00 0.22389456E+03-0.37073622E+06 0.88511419E+00
H2 N2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.66038264E 00 0.35574798E 01-0.95778014E 03 0.70536614E 00
V 1000.0 5000.0 0.62938039E 00-0.69072207E 02 0.19855881E 05 0.97133819E 00
V 5000.0 8000.0 -0.77818660E-01-0.82764842E+04 0.11699769E+08 0.81689807E+01
H2 O2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.69018087E 00-0.23876092E 00-0.48432502E 04 0.66856355E 00
V 1000.0 5000.0 0.69427291E 00-0.17583177E 02 0.58748504E 04 0.64692305E 00
V 5000.0 10000.0 0.62089983E+00-0.78264233E+03 0.10864044E+07 0.13816401E+01
H2O V3C3 SENGERS & WATSON (1986) SVEHLA (1994)
V 373.2 1073.2 0.50019557E+00-0.69712796E+03 0.88163892E+05 0.30836508E+01
V 1073.2 5000.0 0.58988538E+00-0.53769814E+03 0.54263513E+05 0.23386375E+01
V 5000.0 15000.0 0.64330087E+00-0.95668913E+02-0.37742283E+06 0.18125190E+01
C 373.2 1073.2 0.10966389E+01-0.55513429E+03 0.10623408E+06-0.24664550E+00
C 1073.2 5000.0 0.39367933E+00-0.22524226E+04 0.61217458E+06 0.58011317E+01
C 5000.0 15000.0 -0.41858737E+00-0.14096649E+05 0.19179190E+08 0.14345613E+02
H2O N2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.57304553E 00-0.14853813E 03 0.39029324E 04 0.23462780E 01
V 1000.0 5000.0 0.64243064E 00 0.25018380E 01-0.36924430E 05 0.17567700E 01
V 5000.0 10000.0 0.64420052E+00 0.10592615E+01-0.34300588E+05 0.17418827E+01
H2O O2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.64727375E 00-0.42110733E 01-0.45255490E 04 0.16510807E 01
V 1000.0 5000.0 0.65299406E 00-0.17723412E 02 0.50906530E 04 0.16154623E 01
V 5000.0 10000.0 0.60614671E+00-0.45218012E+03 0.56149352E+06 0.20791053E+01
H2S V2C2 ZELEZNIK & SVEHLA (1970) SVEHLA (1994)
V 300.0 1000.0 0.54078516E 00-0.30304377E 03 0.24073168E 05 0.24952022E 01
V 1000.0 5000.0 0.62320319E 00-0.98355396E 02-0.37061803E 05 0.17823252E 01
C 300.0 1000.0 0.99442135E 00-0.19849376E 03 0.18380943E 05-0.19947763E 00
C 1000.0 5000.0 0.60597875E 00-0.56357581E 03 0.67027311E 04 0.28605490E 01
H6F6 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.59712969E 00-0.36775006E 03 0.38256100E 05 0.15811495E 01
V 1000.0 5000.0 0.60263706E 00-0.23619918E 03-0.24765049E 05 0.14745761E 01
C 300.0 1000.0 0.82019209E 00-0.29783007E 03 0.17372752E 05 0.94706680E 00
C 1000.0 5000.0 0.53249125E 00-0.75921725E 03 0.10421649E 06 0.33089772E 01
He V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.75015944E 00 0.35763243E 02-0.22121291E 04 0.92126352E 00
V 1000.0 5000.0 0.83394166E 00 0.22082656E 03-0.52852591E 05 0.20809361E 00
V 5000.0 15000.0 0.86316349E+00 0.96205176E+03-0.12498705E+07-0.14115714E+00
C 200.0 1000.0 0.75007833E 00 0.36577987E 02-0.23636600E 04 0.29766475E 01
C 1000.0 5000.0 0.83319259E 00 0.22157417E 03-0.53304530E 05 0.22684592E 01
C 5000.0 15000.0 0.85920953E+00 0.89873206E+03-0.11069262E+07 0.19535742E+01
He N2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.70332377E 00 0.77412205E 01-0.17715400E 04 0.11440787E 01
V 1000.0 5000.0 0.66785742E 00-0.84659628E 02 0.26695708E 05 0.14530051E 01
V 5000.0 15000.0 0.16804077E+01 0.15615203E+05-0.28112833E+08-0.91877596E+01
I2 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.54929498E 00-0.36186119E 03 0.33655931E 05 0.26154108E 01
V 1000.0 5000.0 0.61338027E 00-0.15938416E 03-0.35539572E 05 0.20394438E 01
C 300.0 1000.0 0.29817264E 00-0.62470054E 03 0.63289228E 05 0.30234067E 01
C 1000.0 5000.0 -0.15544742E 00-0.28843448E 04 0.96629457E 06 0.75135419E 01
Kr V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.58597795E 00-0.12924832E 03 0.47495759E 04 0.25793650E 01
V 1000.0 5000.0 0.68985845E 00 0.56296306E 02-0.36082600E 05 0.17170715E 01
V 5000.0 15000.0 0.76582939E+00 0.68610377E+03-0.82537190E+06 0.97565128E+00
C 200.0 1000.0 0.58008139E 00-0.13792556E 03 0.60771460E 04 0.16420039E 01
C 1000.0 5000.0 0.68859431E 00 0.51765647E 02-0.34512131E 05 0.74332130E 00
C 5000.0 15000.0 0.76365443E+00 0.65175847E+03-0.73589800E+06 0.12112126E-01
Li V2C2 HOLLAND ET AL (1986)
V 1000.0 3000.0 0.11808900E+01 0.10427008E+04-0.42642819E+06-0.40060038E+01
V 3000.0 10000.0 0.13061758E+01 0.10446775E+04 0.13439272E+06-0.50720601E+01
C 1000.0 3000.0 0.11802957E+01 0.10408710E+04-0.42655445E+06-0.24982084E+01
C 3000.0 10000.0 0.13086032E+01 0.10695497E+04 0.10781083E+06-0.35944181E+01
N V2C2 LEVIN ET AL (1990)
V 1000.0 5000.0 0.83724737E+00 0.43997150E+03-0.17450753E+06 0.10365689E+00
V 5000.0 15000.0 0.89986588E+00 0.14112801E+04-0.18200478E+07-0.55811716E+00
C 1000.0 5000.0 0.83771661E+00 0.44243270E+03-0.17578446E+06 0.89942915E+00
C 5000.0 15000.0 0.90001710E+00 0.14141175E+04-0.18262403E+07 0.24048513E+00
N N+ V2C0 STALLCOP ET AL (1991)
V 1000.0 5000.0 0.81904143E+00-0.59239089E+02 0.21722555E+05-0.14759287E+00
V 5000.0 15000.0 0.14065434E+01 0.52447258E+04-0.58944155E+07-0.59756079E+01
N NO V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.79891098E+00 0.16929386E+03-0.49068896E+05 0.47986716E+00
V 5000.0 15000.0 0.85695322E+00 0.70223546E+03-0.65589491E+06-0.96805084E-01
N N2 V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.84730498E+00 0.22158858E+03-0.65003723E+05 0.51991532E-01
V 5000.0 15000.0 0.92821273E+00 0.97122155E+03-0.92773923E+06-0.75253261E+00
N O V2C0 LEVIN ET AL (1990)
V 1000.0 5000.0 0.70857405E+00-0.14025530E+03 0.76739975E+05 0.13001914E+01
V 5000.0 15000.0 0.98622236E+00 0.23653200E+04-0.27165945E+07-0.14539746E+01
N O+ V2C0 PARTRIDGE ET AL (1991)
V 1000.0 5000.0 0.71806621E+00-0.22692123E+03 0.63051343E+03 0.88739853E+00
V 5000.0 15000.0 0.12913413E+01 0.49522731E+04-0.57814165E+07-0.47998532E+01
N O2 V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.76538325E+00 0.13624746E+03-0.39083438E+05 0.80110069E+00
V 5000.0 15000.0 0.81011289E+00 0.54373468E+03-0.49868094E+06 0.35701613E+00
N+ O V2C0 PARTRIDGE ET AL (1991)
V 1000.0 5000.0 0.11462863E+01 0.12410378E+04-0.56794094E+06-0.29071183E+01
V 5000.0 15000.0 0.10155522E+01-0.32731184E+03 0.17187573E+07-0.15714289E+01
NH3 V2C2 ZELEZNIK & SVEHLA (1970) SVEHLA (1994)
V 200.0 1000.0 0.56652403E 00-0.36718083E 03 0.31663844E 05 0.22647443E 01
V 1000.0 5000.0 0.59761003E 00-0.28027339E 03 0.37532457E 04 0.19910129E 01
C 200.0 1000.0 0.17498387E 01 0.29195254E 03-0.33033738E 05-0.50944985E 01
C 1000.0 5000.0 0.64477673E 00-0.91294723E 03 0.16890182E 05 0.36939751E 01
NO V3C3 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.60262029E 00-0.62017783E 02-0.13954524E 03 0.20268332E 01
V 1000.0 5000.0 0.78009050E 00 0.30486891E 03-0.94847722E 05 0.52873381E 00
V 5000.0 15000.0 0.80580582E+00 0.62427878E+03-0.57879210E+06 0.26516450E+00
C 200.0 1000.0 0.95028758E+00 0.76667058E+02-0.99894764E+04-0.62776717E-02
C 1000.0 5000.0 0.86215238E+00 0.44568223E+03-0.23856466E+06 0.46209876E+00
C 5000.0 15000.0 -0.10377865E+01-0.34486864E+05 0.67451187E+08 0.20928749E+02
NO O V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.75990752E+00 0.13133851E+03-0.37679635E+05 0.87807540E+00
V 5000.0 15000.0 0.80259080E+00 0.51991196E+03-0.47557226E+06 0.45433467E+00
NOCL V2C2 SVEHLA (1994)
V 300.0 1000.0 0.60503640E 00-0.30599542E 03 0.28616290E 05 0.20637208E 01
V 1000.0 5000.0 0.60958727E 00-0.19972327E 03-0.22243863E 05 0.19768724E 01
C 300.0 1000.0 0.52036442E 00-0.53758642E 03 0.52600561E 05 0.29380096E 01
C 1000.0 5000.0 0.92835992E 00 0.13511240E 03-0.79751817E 05-0.42066992E 00
NO2 V2C2 SVEHLA (1966)
V 300.0 1000.0 0.57379100E 00-0.12636034E 03 0.21566823E 04 0.22287492E 01
V 1000.0 5000.0 0.64239645E 00 0.60012144E 00-0.27020876E 05 0.16570566E 01
C 300.0 1000.0 0.48574998E 00-0.50702110E 03 0.46605820E 05 0.36444556E 01
C 1000.0 5000.0 0.97660465E 00 0.72760751E 03-0.32527989E 06-0.60899123E 00
N2 V3C3 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.62526577E 00-0.31779652E 02-0.16407983E 04 0.17454992E 01
V 1000.0 5000.0 0.87395209E 00 0.56152222E 03-0.17394809E 06-0.39335958E 00
V 5000.0 15000.0 0.88503551E+00 0.90902171E+03-0.73129061E+06-0.53503838E+00
C 200.0 1000.0 0.85439436E+00 0.10573224E+03-0.12347848E+05 0.47793128E+00
C 1000.0 5000.0 0.88407146E+00 0.13357293E+03-0.11429640E+05 0.24417019E+00
C 5000.0 15000.0 0.24176185E+01 0.80477749E+04 0.31055802E+07-0.14517761E+02
N2 O V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.79176378E+00 0.16226176E+03-0.47001647E+05 0.58989646E+00
V 5000.0 15000.0 0.84676036E+00 0.66685159E+03-0.62101896E+06 0.43522696E-01
N2 O2 V3C0 SVEHLA (1994)
V 300.0 1000.0 0.70122551E 00 0.51717887E 01-0.14240838E 04 0.12895991E 01
V 1000.0 5000.0 0.66744478E 00-0.86348036E 02 0.27445341E 05 0.15855986E 01
V 5000.0 15000.0 0.21151565E+00-0.91881544E+04 0.18253525E+08 0.65600002E+01
N2O V2C2 BOUSHEHRI ET AL(1987) URIBE ET AL(1990)
V 200.0 1000.0 0.58959112E 00-0.15565178E 03 0.37630431E 04 0.21223853E 01
V 1000.0 5000.0 0.64571469E 00-0.88806585E 01-0.41560559E 05 0.16332498E 01
C 200.0 1000.0 0.65165376E 00-0.34373058E 03 0.15090399E 05 0.24242359E 01
C 1000.0 5000.0 0.64720604E 00-0.78680195E 02-0.11965729E 06 0.23246569E 01
N2O4 V2C2 SVEHLA (1966)
V 300.0 1000.0 0.52508683E 00-0.28652689E 03 0.20354406E 05 0.25287873E 01
V 1000.0 5000.0 0.62841605E 00-0.65798081E 02-0.38345315E 05 0.16529852E 01
C 300.0 1000.0 0.33364942E 00-0.68702644E 03 0.52625318E 05 0.47685793E 01
C 1000.0 5000.0 0.59441359E 00-0.26239268E 03-0.29309960E 05 0.26245858E 01
Na V2C2 HOLLAND & BIOLSI (1987)
V 500.0 2000.0 0.91803855E+00 0.22790517E+03-0.63721828E+05-0.12813410E+01
V 2000.0 10000.0 0.11882599E+01 0.48628768E+03 0.21833835E+06-0.35349734E+01
C 500.0 2000.0 0.91834808E+00 0.22837346E+03-0.63906051E+05-0.97901956E+00
C 2000.0 10000.0 0.11900946E+01 0.49842922E+03 0.20953120E+06-0.32479254E+01
Ne V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.68398511E 00 0.18732366E 02-0.23663189E 04 0.18284755E 01
V 1000.0 5000.0 0.72333495E 00 0.10420872E 03-0.25429545E 05 0.14942434E 01
V 5000.0 15000.0 0.77549350E+00 0.59414850E+03-0.69670786E+06 0.97885712E+00
C 200.0 1000.0 0.68509965E 00 0.19794924E 02-0.24525539E 04 0.22586136E 01
C 1000.0 5000.0 0.72278122E 00 0.10528290E 03-0.26355706E 05 0.19367337E 01
C 5000.0 15000.0 0.77589413E+00 0.61283778E+03-0.74015705E+06 0.14114011E+01
O V2C2 LEVIN ET AL (1990)
V 1000.0 5000.0 0.77269241E+00 0.83842977E+02-0.58502098E+05 0.85100827E+00
V 5000.0 15000.0 0.87669586E+00 0.10158420E+04-0.10884566E+07-0.18001077E+00
C 1000.0 5000.0 0.77271664E+00 0.83989100E+02-0.58580966E+05 0.15179900E+01
C 5000.0 15000.0 0.87676666E+00 0.10170744E+04-0.10906690E+07 0.48644232E+00
O O+ V2C0 STALLCOP ET AL (1991)
V 1000.0 5000.0 0.96270522E+00 0.57916036E+03-0.28549938E+06-0.12297154E+01
V 5000.0 15000.0 0.99113919E+00-0.80815595E+02 0.17198651E+07-0.14201124E+01
O O2 V2C0 CUBLEY & MASON (1975)
V 1000.0 5000.0 0.73493993E+00 0.10911663E+03-0.31057767E+05 0.10998186E+01
V 5000.0 15000.0 0.76924754E+00 0.42004937E+03-0.37954441E+06 0.75936688E+00
OH V2C2 SVEHLA (1994)
V 1000.0 5000.0 0.59711536E+00-0.46100678E+03 0.37606286E+05 0.24041761E+01
V 5000.0 15000.0 0.64287721E+00-0.18173747E+03-0.88543767E+05 0.19636057E+01
C 1000.0 5000.0 0.68627561E+00-0.74033274E+03 0.27559033E+05 0.28308741E+01
C 5000.0 15000.0 -0.47918112E+00-0.93769908E+04 0.70509952E+07 0.14203688E+02
O2 V3C3 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 200.0 1000.0 0.60916180E 00-0.52244847E 02-0.59974009E 03 0.20410801E 01
V 1000.0 5000.0 0.72216486E 00 0.17550839E 03-0.57974816E 05 0.10901044E 01
V 5000.0 15000.0 0.73981127E+00 0.39194906E+03-0.37833168E+06 0.90931780E+00
C 200.0 1000.0 0.77229167E+00 0.68463210E+01-0.58933377E+04 0.12210365E+01
C 1000.0 5000.0 0.90917351E+00 0.29124182E+03-0.79650171E+05 0.64851631E-01
C 5000.0 15000.0 -0.11218262E+01-0.19286378E+05 0.23295011E+08 0.20342043E+02
SF6 V2C2 BOUSHEHRI ET AL (1987) SVEHLA (1994)
V 300.0 1000.0 0.49748474E 00-0.21864084E 03 0.14509989E 05 0.27631958E 01
V 1000.0 5000.0 0.60769589E 00-0.14230978E 03 0.31449312E 05 0.19086137E 01
C 300.0 1000.0 0.41857258E 00-0.19733612E 03-0.25661949E 05 0.34555207E 01
C 1000.0 5000.0 0.60633905E 00 0.44458129E 02-0.52676509E 05 0.19436963E 01
SO2 V2C2 ZELEZNIK & SVEHLA (1970) SVEHLA (1994)
V 300.0 1000.0 0.53157084E 00-0.29589873E 03 0.21224840E 05 0.25975549E 01
V 1000.0 5000.0 0.60783098E 00-0.19283581E 03 0.78232002E 04 0.19811072E 01
C 300.0 1000.0 0.61476551E 00-0.56409295E 03 0.49580787E 05 0.23940064E 01
C 1000.0 5000.0 0.53617558E 00-0.69413085E 03 0.75304908E 05 0.30412002E 01
SiCL4 V2C2 SVEHLA (1994)
V 300.0 1000.0 0.52724861E 00-0.26992512E 03 0.18062726E 05 0.22413435E 01
V 1000.0 5000.0 0.63025696E 00-0.55616232E 02-0.37587506E 05 0.13711284E 01
C 300.0 1000.0 0.48928637E 00-0.34031669E 03 0.15336652E 05 0.23608171E 01
C 1000.0 5000.0 0.62189282E 00-0.14644974E 03-0.15293955E 05 0.12815679E 01
SiF4 V2C2 SVEHLA (1962,1994)
V 300.0 1000.0 0.59609697E 00-0.79178529E 02-0.15915012E 04 0.19580540E 01
V 1000.0 5000.0 0.64527457E 00 0.10348180E 02-0.21766101E 05 0.15489951E 01
C 300.0 1000.0 0.44281914E 00-0.38082561E 03 0.16794039E 05 0.35456135E 01
C 1000.0 5000.0 0.62544021E 00-0.11192686E 03-0.26345285E 05 0.20583524E 01
SiH4 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.57519423E 00-0.12326162E 03 0.18824028E 04 0.18761319E 01
V 1000.0 5000.0 0.64257687E 00 0.12846016E 01-0.26699436E 05 0.13147047E 01
C 300.0 1000.0 0.55408670E 00-0.64339630E 03 0.55747611E 05 0.37641386E 01
C 1000.0 5000.0 0.56234379E 00-0.44931035E 03-0.37165926E 05 0.36059282E 01
UF6 V2C0 SVEHLA (1962)
V 300.0 1000.0 0.56019928E 00-0.15978215E 03 0.52866529E 04 0.24249812E 01
V 1000.0 5000.0 0.63981806E 00-0.95366264E 01-0.30026765E 05 0.17600620E 01
Xe V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.57988418E 00-0.18806666E 03 0.10508723E 05 0.26502107E 01
V 1000.0 5000.0 0.68506945E 00 0.47671749E 02-0.54767718E 05 0.17531546E 01
V 5000.0 15000.0 0.75436414E+00 0.69100248E+03-0.75140593E+06 0.10621747E+01
C 200.0 1000.0 0.57308328E 00-0.19991432E 03 0.12872027E 05 0.12718931E 01
C 1000.0 5000.0 0.68319650E 00 0.40020092E 02-0.52038474E 05 0.33623407E 00
C 5000.0 15000.0 0.75593640E+00 0.72923858E+03-0.82407834E+06-0.39025477E+00
end

View file

@ -0,0 +1,329 @@
use crate::properties::{
PropertiesError,
error::make_parse_error,
transport_fit::{SpeciesTransportData, TransportFit},
utils::parse_fields,
};
enum ViscosityOrConductivity {
Viscosity,
Conductivity,
}
pub struct TransportDB {
data: Vec<SpeciesTransportData>,
}
impl TransportDB {
pub fn parse(transport_file_contents: &str) -> Result<Self, PropertiesError> {
let mut lines = transport_file_contents.lines().peekable();
let mut data = vec![];
// Ignore header line
_ = lines.next();
loop {
data.push(parse_species_transport_block(&mut lines)?);
if let Some(line) = lines.peek() {
if line.to_lowercase().contains("end") {
break;
}
} else {
break;
}
}
Ok(TransportDB { data })
}
}
fn parse_species_transport_block<'a>(
mut lines: impl Iterator<Item = &'a str>,
) -> Result<SpeciesTransportData, PropertiesError> {
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
let mut viscosities = vec![];
let mut conductivities = vec![];
let (name, viscosity_count, conductivity_count) = parse_species_header_line(line)?;
for _ in 0..viscosity_count + conductivity_count {
let line = lines.next().ok_or(PropertiesError::InvalidFile)?;
match parse_coefficients(line)? {
(ViscosityOrConductivity::Viscosity, fit) => viscosities.push(fit),
(ViscosityOrConductivity::Conductivity, fit) => conductivities.push(fit),
}
}
Ok(SpeciesTransportData {
name,
viscosities,
conductivities,
})
}
fn parse_species_header_line(line: &str) -> Result<(String, usize, usize), PropertiesError> {
const HEADER_WIDTHS: &[usize] = &[34, 1, 1, 1, 1];
let splits = parse_fields(line, HEADER_WIDTHS);
let name = splits[0].to_string();
let viscosity_count: usize = splits[2]
.parse()
.map_err(|_| make_parse_error("V", "usize", &splits[2]))?;
let conductivity_count: usize = splits[4]
.parse()
.map_err(|_| make_parse_error("C", "usize", &splits[4]))?;
Ok((name, viscosity_count, conductivity_count))
}
fn parse_coefficients(
line: &str,
) -> Result<(ViscosityOrConductivity, TransportFit), PropertiesError> {
const COEFFICIENTS_WIDTH: &[usize] = &[2, 7, 11, 15, 15, 15, 15];
let splits = parse_fields(line, COEFFICIENTS_WIDTH);
let transport_type = if splits[0].contains("V") {
ViscosityOrConductivity::Viscosity
} else {
ViscosityOrConductivity::Conductivity
};
Ok((
transport_type,
TransportFit {
temp_range: (
splits[1]
.parse()
.map_err(|_| make_parse_error("tlo", "f64", &splits[1]))?,
splits[2]
.parse()
.map_err(|_| make_parse_error("tlo", "f64", &splits[2]))?,
),
a: splits[3]
.parse()
.map_err(|_| make_parse_error("a", "f64", &splits[3]))?,
b: splits[4]
.parse()
.map_err(|_| make_parse_error("a", "f64", &splits[4]))?,
c: splits[5]
.parse()
.map_err(|_| make_parse_error("a", "f64", &splits[5]))?,
d: splits[6]
.parse()
.map_err(|_| make_parse_error("a", "f64", &splits[6]))?,
},
))
}
#[cfg(test)]
pub mod test {
use crate::{
assert_delta,
properties::transport_db::{
TransportDB, ViscosityOrConductivity, parse_coefficients, parse_species_header_line,
parse_species_transport_block,
},
};
#[test]
fn test_parse_species_transport_header() {
let line = "Ar V3C1 BICH ET AL (1990)";
let (name, viscosity_count, conductivity_count) = parse_species_header_line(line).unwrap();
assert_eq!(name, "Ar");
assert_eq!(viscosity_count, 3);
assert_eq!(conductivity_count, 1);
}
#[test]
fn test_parse_coefficients() {
let line =
" V 200.0 1000.0 0.61205763E 00-0.67714354E 02 0.19040660E 03 0.21588272E 01";
let (transport_type, fit) = parse_coefficients(line).unwrap();
assert!(matches!(transport_type, ViscosityOrConductivity::Viscosity));
assert_delta!(fit.temp_range.0, 200.0, 1e-1);
assert_delta!(fit.temp_range.1, 1000.0, 1e-1);
assert_delta!(fit.a, 0.61205763e00, 1e-8);
assert_delta!(fit.b, -0.67714354E02, 1e-8);
assert_delta!(fit.c, 0.19040660e03, 1e-8);
assert_delta!(fit.d, 0.21588272E01, 1e-8);
let line =
" C 5000.0 15000.0 0.76269502E+00 0.62341752E+03-0.71899552E+06 0.56927918E+00";
let (transport_type, fit) = parse_coefficients(line).unwrap();
assert!(matches!(
transport_type,
ViscosityOrConductivity::Conductivity
));
assert_delta!(fit.temp_range.0, 5000.0, 1e-1);
assert_delta!(fit.temp_range.1, 15000.0, 1e-1);
assert_delta!(fit.a, 0.76269502E+00, 1e-8);
assert_delta!(fit.b, 0.62341752E+03, 1e-8);
assert_delta!(fit.c, -0.71899552E+06, 1e-8);
assert_delta!(fit.d, 0.56927918E+00, 1e-8);
}
#[test]
fn test_parse_transport_species_block() {
let species_block = r#"Ar V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.61205763E 00-0.67714354E 02 0.19040660E 03 0.21588272E 01
V 1000.0 5000.0 0.69357334E 00 0.70953943E 02-0.28386007E 05 0.14856447E 01
V 5000.0 15000.0 0.76608935E+00 0.67867215E+03-0.84991417E+06 0.77935167E+00
C 200.0 1000.0 0.60968928E 00-0.70892249E 02 0.58420624E 03 0.19337152E 01
C 1000.0 5000.0 0.69075463E 00 0.62676058E 02-0.25667413E 05 0.12664189E 01
C 5000.0 15000.0 0.76269502E+00 0.62341752E+03-0.71899552E+06 0.56927918E+00"#;
let lines = species_block.lines();
let species_data = parse_species_transport_block(lines).unwrap();
assert_eq!(species_data.name, "Ar");
assert_eq!(species_data.viscosities.len(), 3);
assert_eq!(species_data.conductivities.len(), 3);
// Viscosity fits
assert_delta!(species_data.viscosities[0].temp_range.0, 200.0, 1e-1);
assert_delta!(species_data.viscosities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(species_data.viscosities[0].a, 0.61205763e00, 1e-8);
assert_delta!(species_data.viscosities[0].b, -0.67714354e02, 1e-8);
assert_delta!(species_data.viscosities[0].c, 0.19040660e03, 1e-8);
assert_delta!(species_data.viscosities[0].d, 0.21588272e01, 1e-8);
assert_delta!(species_data.viscosities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(species_data.viscosities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(species_data.viscosities[1].a, 0.69357334e00, 1e-8);
assert_delta!(species_data.viscosities[1].b, 0.70953943e02, 1e-8);
assert_delta!(species_data.viscosities[1].c, -0.28386007e05, 1e-8);
assert_delta!(species_data.viscosities[1].d, 0.14856447e01, 1e-8);
assert_delta!(species_data.viscosities[2].temp_range.0, 5000.0, 1e-1);
assert_delta!(species_data.viscosities[2].temp_range.1, 15000.0, 1e-1);
assert_delta!(species_data.viscosities[2].a, 0.76608935e00, 1e-8);
assert_delta!(species_data.viscosities[2].b, 0.67867215e03, 1e-8);
assert_delta!(species_data.viscosities[2].c, -0.84991417e06, 1e-8);
assert_delta!(species_data.viscosities[2].d, 0.77935167e00, 1e-8);
// Conductivity fits
assert_delta!(species_data.conductivities[0].temp_range.0, 200.0, 1e-1);
assert_delta!(species_data.conductivities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(species_data.conductivities[0].a, 0.60968928e00, 1e-8);
assert_delta!(species_data.conductivities[0].b, -0.70892249e02, 1e-8);
assert_delta!(species_data.conductivities[0].c, 0.58420624e03, 1e-8);
assert_delta!(species_data.conductivities[0].d, 0.19337152e01, 1e-8);
assert_delta!(species_data.conductivities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(species_data.conductivities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(species_data.conductivities[1].a, 0.69075463e00, 1e-8);
assert_delta!(species_data.conductivities[1].b, 0.62676058e02, 1e-8);
assert_delta!(species_data.conductivities[1].c, -0.25667413e05, 1e-8);
assert_delta!(species_data.conductivities[1].d, 0.12664189e01, 1e-8);
assert_delta!(species_data.conductivities[2].temp_range.0, 5000.0, 1e-1);
assert_delta!(species_data.conductivities[2].temp_range.1, 15000.0, 1e-1);
assert_delta!(species_data.conductivities[2].a, 0.76269502e00, 1e-8);
assert_delta!(species_data.conductivities[2].b, 0.62341752e03, 1e-8);
assert_delta!(species_data.conductivities[2].c, -0.71899552e06, 1e-8);
assert_delta!(species_data.conductivities[2].d, 0.56927918e00, 1e-8);
}
#[test]
fn test_parse_transport_file() {
let trans_input = r#"transport property coefficients
Ar V3C3 BICH ET AL (1990)
V 200.0 1000.0 0.61205763E 00-0.67714354E 02 0.19040660E 03 0.21588272E 01
V 1000.0 5000.0 0.69357334E 00 0.70953943E 02-0.28386007E 05 0.14856447E 01
V 5000.0 15000.0 0.76608935E+00 0.67867215E+03-0.84991417E+06 0.77935167E+00
C 200.0 1000.0 0.60968928E 00-0.70892249E 02 0.58420624E 03 0.19337152E 01
C 1000.0 5000.0 0.69075463E 00 0.62676058E 02-0.25667413E 05 0.12664189E 01
C 5000.0 15000.0 0.76269502E+00 0.62341752E+03-0.71899552E+06 0.56927918E+00
BCL3 V2C2 SVEHLA (1962)
V 300.0 1000.0 0.52572590E 00-0.27803504E 03 0.19159256E 05 0.24373790E 01
V 1000.0 5000.0 0.62929553E 00-0.60723560E 02-0.37711618E 05 0.15615047E 01
C 300.0 1000.0 0.41518585E 00-0.48149960E 03 0.30788060E 05 0.33168239E 01
C 1000.0 5000.0 0.61148589E 00-0.18167042E 03-0.20976969E 05 0.17127671E 01
end"#;
let db = TransportDB::parse(trans_input).unwrap();
assert_eq!(db.data.len(), 2);
// Ar species (V3C3)
let ar = &db.data[0];
assert_eq!(ar.name, "Ar");
assert_eq!(ar.viscosities.len(), 3);
assert_eq!(ar.conductivities.len(), 3);
assert_delta!(ar.viscosities[0].temp_range.0, 200.0, 1e-1);
assert_delta!(ar.viscosities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(ar.viscosities[0].a, 0.61205763e00, 1e-8);
assert_delta!(ar.viscosities[0].b, -0.67714354e02, 1e-8);
assert_delta!(ar.viscosities[0].c, 0.19040660e03, 1e-8);
assert_delta!(ar.viscosities[0].d, 0.21588272e01, 1e-8);
assert_delta!(ar.viscosities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(ar.viscosities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(ar.viscosities[1].a, 0.69357334e00, 1e-8);
assert_delta!(ar.viscosities[1].b, 0.70953943e02, 1e-8);
assert_delta!(ar.viscosities[1].c, -0.28386007e05, 1e-8);
assert_delta!(ar.viscosities[1].d, 0.14856447e01, 1e-8);
assert_delta!(ar.viscosities[2].temp_range.0, 5000.0, 1e-1);
assert_delta!(ar.viscosities[2].temp_range.1, 15000.0, 1e-1);
assert_delta!(ar.viscosities[2].a, 0.76608935e00, 1e-8);
assert_delta!(ar.viscosities[2].b, 0.67867215e03, 1e-8);
assert_delta!(ar.viscosities[2].c, -0.84991417e06, 1e-8);
assert_delta!(ar.viscosities[2].d, 0.77935167e00, 1e-8);
assert_delta!(ar.conductivities[0].temp_range.0, 200.0, 1e-1);
assert_delta!(ar.conductivities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(ar.conductivities[0].a, 0.60968928e00, 1e-8);
assert_delta!(ar.conductivities[0].b, -0.70892249e02, 1e-8);
assert_delta!(ar.conductivities[0].c, 0.58420624e03, 1e-8);
assert_delta!(ar.conductivities[0].d, 0.19337152e01, 1e-8);
assert_delta!(ar.conductivities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(ar.conductivities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(ar.conductivities[1].a, 0.69075463e00, 1e-8);
assert_delta!(ar.conductivities[1].b, 0.62676058e02, 1e-8);
assert_delta!(ar.conductivities[1].c, -0.25667413e05, 1e-8);
assert_delta!(ar.conductivities[1].d, 0.12664189e01, 1e-8);
assert_delta!(ar.conductivities[2].temp_range.0, 5000.0, 1e-1);
assert_delta!(ar.conductivities[2].temp_range.1, 15000.0, 1e-1);
assert_delta!(ar.conductivities[2].a, 0.76269502e00, 1e-8);
assert_delta!(ar.conductivities[2].b, 0.62341752e03, 1e-8);
assert_delta!(ar.conductivities[2].c, -0.71899552e06, 1e-8);
assert_delta!(ar.conductivities[2].d, 0.56927918e00, 1e-8);
// BCL3 species (V2C2)
let bcl3 = &db.data[1];
assert_eq!(bcl3.name, "BCL3");
assert_eq!(bcl3.viscosities.len(), 2);
assert_eq!(bcl3.conductivities.len(), 2);
assert_delta!(bcl3.viscosities[0].temp_range.0, 300.0, 1e-1);
assert_delta!(bcl3.viscosities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(bcl3.viscosities[0].a, 0.52572590e00, 1e-8);
assert_delta!(bcl3.viscosities[0].b, -0.27803504e03, 1e-8);
assert_delta!(bcl3.viscosities[0].c, 0.19159256e05, 1e-8);
assert_delta!(bcl3.viscosities[0].d, 0.24373790e01, 1e-8);
assert_delta!(bcl3.viscosities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(bcl3.viscosities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(bcl3.viscosities[1].a, 0.62929553e00, 1e-8);
assert_delta!(bcl3.viscosities[1].b, -0.60723560e02, 1e-8);
assert_delta!(bcl3.viscosities[1].c, -0.37711618e05, 1e-8);
assert_delta!(bcl3.viscosities[1].d, 0.15615047e01, 1e-8);
assert_delta!(bcl3.conductivities[0].temp_range.0, 300.0, 1e-1);
assert_delta!(bcl3.conductivities[0].temp_range.1, 1000.0, 1e-1);
assert_delta!(bcl3.conductivities[0].a, 0.41518585e00, 1e-8);
assert_delta!(bcl3.conductivities[0].b, -0.48149960e03, 1e-8);
assert_delta!(bcl3.conductivities[0].c, 0.30788060e05, 1e-8);
assert_delta!(bcl3.conductivities[0].d, 0.33168239e01, 1e-8);
assert_delta!(bcl3.conductivities[1].temp_range.0, 1000.0, 1e-1);
assert_delta!(bcl3.conductivities[1].temp_range.1, 5000.0, 1e-1);
assert_delta!(bcl3.conductivities[1].a, 0.61148589e00, 1e-8);
assert_delta!(bcl3.conductivities[1].b, -0.18167042e03, 1e-8);
assert_delta!(bcl3.conductivities[1].c, -0.20976969e05, 1e-8);
assert_delta!(bcl3.conductivities[1].d, 0.17127671e01, 1e-8);
}
}

View file

@ -0,0 +1,13 @@
pub struct SpeciesTransportData {
pub name: String,
pub viscosities: Vec<TransportFit>,
pub conductivities: Vec<TransportFit>,
}
pub struct TransportFit {
pub temp_range: (f64, f64),
pub a: f64,
pub b: f64,
pub c: f64,
pub d: f64,
}

22
src/properties/utils.rs Normal file
View file

@ -0,0 +1,22 @@
use std::sync::LazyLock;
use regex::Regex;
// Matches Fortran D exponent (1.23D+04, 1.23D-04, 1.23D 04) and E exponent with a space
// (1.23E 04). Captures: digit before, optional sign, digit after — drops any space.
static FORTRAN_EXP: LazyLock<Regex> = LazyLock::new(|| {
Regex::new(r"([0-9])[DE]([+\-]?) ?([0-9])").unwrap()
});
pub fn parse_fields(line: &str, widths: &[usize]) -> Vec<String> {
let mut fields = Vec::new();
let mut pos = 0;
for &width in widths {
if let Some(field) = line.get(pos..pos + width) {
fields.push(FORTRAN_EXP.replace_all(field.trim(), "${1}E${2}${3}").into_owned());
}
pos += width;
}
fields
}