MyNixOS website logo
Description

Bayesian Data Reconciliation of Separation Processes.

Bayesian tools that can be used to reconcile, or mass balance, mass flow rate data collected from chemical or particulate separation processes aided by constraints governed by the conservation of mass. Functions included in the package aid the user in organizing and constraining data, using Markov chain Monte Carlo methods to obtain samples from Bayesian models, and in computation of the marginal likelihood of the data, given a particular model, for model selection. Marginal likelihood is approximated by methods in Chib S (1995) <doi:10.2307/2291521>.

BayesMassBal

Travis buildstatus AppVeyor buildstatus Codecov testcoverage

The goal of BayesMassBal is to allow users to easily conduct Bayesian data reconciliation for a linearly constrained chemical or particulate process at steady state.

Samples taken from a chemical process are always observed with noise. Using data reconciliation, or mass balance methods, it is possible to use the principle of conservation of mass to filter the noise. This technique is common in chemical engineering and mineral processing engineering applications.

Typically, a mass balance produces point estimates of true mass flow rates. However, using Bayesian methods one can obtain a more granular view of process uncertainty. The BayesMassBal package provides functions allowing the user to easily specify conservation of mass constraints, organize collected data, conduct a Bayesian mass balance using various error structures, and select the best model for their data using Bayes Factors.

The Bayesian mass balance uses Markov chain Monte Carlo methods to obtain random samples from the distributions of constrained mass flow rates. These samples can be used to generate plots, or for other applications where sampling from such a distribution is useful.

Installation

You can install the released version of BayesMassBal from CRAN with:

install.packages("BayesMassBal")

Using BayesMassBal

After loading the package

library(BayesMassBal)

Functions are available to aid in Bayesian data reconciliation.

  • The importObservations() function can be used to import mass flow rate data from a *.csv file into R and organize it for use with the BayesMassBal package.
  • Toy data sets can be simulated using the twonodeSim() function for educational purposes, or for comparing the performance of Bayesian data reconciliation methods to other methods.
  • Using the constrainProcess() function, one can specify linear constraints in R or import them from a *.csv file.
  • The Bayesian Mass Balance function, BMB(), then can be used to generate samples from target distributions and approximate the log marginal likelihood for a specified model.
  • A summary table can be viewed in the console and saved using summary.BayesMassBal().
  • The output from BMB() is a "BayesMassBal" object, which can be fed to plot.BayesMassBal() to easily plot the results.
  • A "BayesMassBal" object can also be used with the BayesMassBal function mainEff() to inspect how the main effect of a random variable and uncertainty in process performance are related.

An overview of a suggested workflow, including importing data into R, specifying model constraints, using the BMB function, and making a main effects plot, is available as a vignette: vignette("Two_Node_Process").

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows