GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - feos-org/feos-campd: Computer-aided molecular and process design based on the FeOs framework

BranchesTags
Open more actions menu

Latest commit

 

History

80 Commits
80 Commits

Folders and files

NameName
Last commit message
Last commit date
media
media
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Cargo.toml
Cargo.toml
 
 
README.md
README.md
 
 
license-apache
license-apache
 
 
license-mit
license-mit
 
 

Repository files navigation

FeOs-CAMPD

crate documentation

Computer-aided molecular and process design based on the FeOs framework.

The package provides infrastructure to perform a computer-aided molecular and process design. It consists of

  • Implementation of a custom outer-approximation algorithms to solve the resulting MINLP
  • Molecular representations (group counts (CoMT-CAMD) and molecule superstructures)
  • Property models (PC-SAFT and (heterosegmented) gc-PC-SAFT)

The underlying NLP subproblems are solved using IPOPT via the ipopt-ad crate. For the solution of th MILP master problems, the solver is linked to the good_lp crate that offers a common interface to various open-source MILP solvers.

Installation

Rust

Just add the dependency to your Cargo.toml

feos-campd = "0.3"

Usage

The following sections demonstrates the usage of the framework, for the API details, check out the documentation.

Molecular representation

// define the molecular representation using a molecule superstructure
let molecule = SuperMolecule::alkane(min_size, size);
// or a combination of superstructures
let molecule = SuperMolecule::non_associating(min_size, size);
// or use group and structure definitions for CoMT-CAMD
// (currently not further customizable)
let molecule = CoMTCAMD;

Property model

// The property model for heterosegmented gc-PC-SAFT is not customizable. It does not include association.
let property_model = GcPcSaftPropertyModel;
// For homosegmented PC-SAFT, the group parameters can be passes as arguments
// and it is available as the full model
let property_model = PcSaftPropertyModel::full("rehner2023_homo.json", Some("rehner2023_homo_binary.json"));
// or non-associating (ignoring all associating groups)
let property_model = PcSaftPropertyModel::non_associating("rehner2023_homo.json", Some("rehner2023_homo_binary.json"));

Process model

//To define a process model in Rust, implement the `ProcessModel` trait for your struct.
impl<E: TotalHelmholtzEnergy<N: ...>> ProcessModel<E, N_X: ..., N: ...> for YourModel {
    fn variables(&self) -> [ContinuousVariable; N_X] {
        [
            ContinuousVariable::new(..., ..., ...),
            ...
        ]
    }

    fn constraints(&self) -> Vec<GeneralConstraint> {
        vec![
            GeneralConstraint::Inequality(..., ...),
            GeneralConstraint::Equality(...),
            ...
        ]
    }

    fn evaluate<D: DualNum<f64> + Copy>(
        &self,
        eos: &HelmholtzEnergyWrapper<E, D, N>,
        chemical_records: [&ChemicalRecord<D>; N],
        x: [D; 3],
    ) -> EosResult<(D, Vec<D>)> {
        ...
    }
}

Optimization problem

// combine molecular representation, property model, and process model in an optimization problem
let campd = IntegratedDesign::new(molecule, property_model, process);

// and pass it to the outer approximation solver
let solver = OuterApproximation::new(&campd);

// to determine a ranking of the optimal molecules for a pur component
solver.solve_ranking(y0, highs, runs, options);
// where highs can be replaced with any of the other MILP solvers provided by the good_lp crate.

Molecular representations and property models can be combined according to:

PC-SAFT gc-PC-SAFT
CoMTCAMD yes no
SuperMolecule yes yes

Cite us

If you find FeOs-torch useful for your own research, consider citing our publication from which this library resulted.

@article{rehner2023molecule_superstructures,
  author = {Rehner, Philipp and Schilling, Johannes and Bardow, André},
  title = {Molecule superstructures for computer-aided molecular and process design}
  journal = {Molecular Systems Design & Engineering},
  volume = {8},
  issue = {4},
  number = {12},
  pages = {488-499},
  year = {2023}
}

About

Computer-aided molecular and process design based on the FeOs framework

Resources

Readme
Activity
Custom properties

Stars

5 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.