///|
fn main raise {
let comps = @vle.benzene_toluene()
let point = @vle.bubble_temperature_k(
comps,
[0.45, 0.55],
1.01325,
low_k=340.0,
high_k=390.0,
)
println("moonbit-vle demo")
println("system: benzene / toluene")
println("bubble temperature K: \{point.temperature_k}")
println("pressure bar: \{point.pressure_bar}")
println("vapor y1: \{point.vapor[0]}")
let flash = @vle.flash_isothermal_activity(
comps,
[0.5, 0.5],
370.0,
1.01325,
@vle.MulticomponentActivityModel::Ideal,
)
println("ideal flash vapor fraction: \{flash.vapor_fraction}")
let audit = @vle.audit_activity_flash(flash, [0.5, 0.5])
println("flash audit valid: \{audit.is_valid}")
let benchmark = @vle.pressure_catalog_summary()
println("pure-pressure benchmarks: \{benchmark.passed}/\{benchmark.total}")
println("maximum benchmark error bar: \{benchmark.max_error}")
}