Skip to content

Commit

Permalink
Update README for PC-SAFT parameters and add new binary record files (#…
Browse files Browse the repository at this point in the history
…200)

* Update README for PC-SAFT parameters

* Fix benchmarks that broke some time along the way

* Align how binary segment records are treated in Rust and Python

* Add GC parameters from new study

* Updated binary interaction parameters

* print group count in markdown representation of `GcPcSaftEosParameters`

* add SMARTS file and update README

* Small formatting changes to README, updated parameter tutorial notebook (k_ij getter returns None of not specified)

---------

Co-authored-by: Gernot Bauer <[email protected]>
  • Loading branch information
prehner and g-bauer authored Nov 23, 2023
1 parent c79c5b4 commit b946c0e
Show file tree
Hide file tree
Showing 16 changed files with 152,047 additions and 112 deletions.
16 changes: 10 additions & 6 deletions benches/dft_pore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn fmt(c: &mut Criterion) {
);
let bulk = State::new_pure(&func, KELVIN, 0.75 / NAV / ANGSTROM.powi::<P3>()).unwrap();
group.bench_function("liquid", |b| {
b.iter(|| pore.initialize(&bulk, None, None).solve(None))
b.iter(|| pore.initialize(&bulk, None, None).unwrap().solve(None))
});
}

Expand Down Expand Up @@ -54,11 +54,11 @@ fn pcsaft(c: &mut Criterion) {
let vle = PhaseEquilibrium::pure(&func, 300.0 * KELVIN, None, Default::default()).unwrap();
let bulk = vle.liquid();
group.bench_function("butane_liquid", |b| {
b.iter(|| pore.initialize(bulk, None, None).solve(None))
b.iter(|| pore.initialize(bulk, None, None).unwrap().solve(None))
});
let bulk = State::new_pure(&func, 300.0 * KELVIN, vle.vapor().density * 0.2).unwrap();
group.bench_function("butane_vapor", |b| {
b.iter(|| pore.initialize(&bulk, None, None).solve(None))
b.iter(|| pore.initialize(&bulk, None, None).unwrap().solve(None))
});

let parameters = PcSaftParameters::from_json(
Expand All @@ -80,15 +80,15 @@ fn pcsaft(c: &mut Criterion) {
.unwrap();
let bulk = vle.liquid();
group.bench_function("butane_pentane_liquid", |b| {
b.iter(|| pore.initialize(bulk, None, None).solve(None))
b.iter(|| pore.initialize(bulk, None, None).unwrap().solve(None))
});
let bulk = StateBuilder::new(&func)
.temperature(300.0 * KELVIN)
.partial_density(&(&vle.vapor().partial_density * 0.2))
.build()
.unwrap();
group.bench_function("butane_pentane_vapor", |b| {
b.iter(|| pore.initialize(&bulk, None, None).solve(None))
b.iter(|| pore.initialize(&bulk, None, None).unwrap().solve(None))
});
}

Expand Down Expand Up @@ -122,7 +122,11 @@ fn gc_pcsaft(c: &mut Criterion) {
.picard_iteration(None, None, Some(1e-5), None)
.anderson_mixing(None, None, None, None, None);
group.bench_function("butane_liquid", |b| {
b.iter(|| pore.initialize(bulk, None, None).solve(Some(&solver)))
b.iter(|| {
pore.initialize(bulk, None, None)
.unwrap()
.solve(Some(&solver))
})
});
}

Expand Down
Loading

0 comments on commit b946c0e

Please sign in to comment.