python-aspen-plus-connected-model-for-the-calculation-of-equipment-costs

Python code packages for the calculation of CAPEX (using cost correlations of Seider et al. (2009)) of equipment pieces (e.g. reactor, heat exchangers, distillation columns, etc.) that were simulated in Aspen Plus (connected python and aspen plus model).

https://github.com/a-jminor/python-aspen-plus-connected-model-for-the-calculation-of-equipment-costs

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Python code packages for the calculation of CAPEX (using cost correlations of Seider et al. (2009)) of equipment pieces (e.g. reactor, heat exchangers, distillation columns, etc.) that were simulated in Aspen Plus (connected python and aspen plus model).

Basic Info
  • Host: GitHub
  • Owner: A-JMinor
  • Language: Python
  • Default Branch: main
  • Size: 4.92 MB
Statistics
  • Stars: 14
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 1
Created about 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Citation

README.md

Python Aspen Plus Connected Model for the Calculation of Equipment Costs

Python model for the calculation of equipment costs (e.g. for the CSTR reactor, heat exchangers, RADFRAC distillation columns, etc.) that were simulated in Aspen Plus. The python code retrieves data from Aspen Plus, applies cost correlations of Seider et al. (2008)[^1] using this data, feeds input variables to Aspen Plus (if necessary), runs the simulation (if necessary) and gives the dimensions as well as equipment costs as output.

Prerequisites

In this repo, the prerequisites are just mentioned or shortly explained here. There is a detailed example providing an entire python and aspen plus file at @edgarsmdn. There, a sensitivity analysis is performed where the python code is feeding / retrieving data to / from Aspen Plus.

Connection between Aspen Plus and Python

The connection between Aspen Plus and Python is first required, which is done by pywin32 to provide access, control and automation of Aspen Plus from python. Hence, each package starts with this connection, and an example code for assessing an aspen plus backup file with the name "simulation" can be found below.

```ruby

0) Import packages

import os # Import operating system interface import win32com.client as win32 # Import COM

1) Get path to Aspen Plus backup file called simulation

filename = 'simulation.bkp' aspenpath = os.path.abspath(file)

2) Initiate Aspen Plus application and file

Application = win32.Dispatch('Apwn.Document') # Registered name of Aspen Plus Application.InitFromArchive2(aspen_path)

3) Application becomes visible with

Application.visible = 1 ```

Obtain an input/output Variable from Aspen Plus

To be able to use Aspen Plus as a blackbox model, and control its variables from Python (e.g. change the input variables of or get the results of an Aspen Plus simulation process), the "path" of the required Aspen Plus variables are needed. Those path IDs can be found at the Customize tab at Variable Explorer in Aspen Plus and need to be copy pasted to python. A screenshot explaining how to obtain a certain variable such as the value of the mole fraction of heptane is shown in the Aspen Plus Python Connection Example. An example python command to save this molefraction of stream "C7" as variable x is shown below.

ruby x = Application.Tree.FindNode("\Data\Streams\C7\Output\MOLEFRAC\MIXED\HEPTANE").Value

Equipment Cost Correlations

To obtain the CAPEX of a chemical process, e.g. through Lang factor method, equipment costs are often required. Those equipment costs can be computed by cost correlation functions, that were established in the past by correlating the costs to a certain size factor. For example, to compute the costs of a heat exchanger, the area is required as size factor, and a cost function to compute the purchase costs ($) in terms of the area A can be found in the literature[^1] dependent on the different types of heat exchangers:

copied from Seider et al. (2008)[^1]

Hence, this cost correlation is implemented in the python code, which retrieves the value for the heat exchanger area from the Aspen Plus simulation. This python package can be found at the subfolder Heat Exchanger.

Included Packages

The costs of the following equipment were computed using the connected python Aspen Plus model:

Heat Exchangers

Distillation Columns, Reflux Drums, Reboilers, Condensers

Reactors

Pumps

Vacuum Systems

Evaporators

References

[^1]: W.D. Seider, J.D. Seader, D.R. Lewin, Product and Process Design Principles: Synthesis, Analysis and Design, 3rd Edition, Wiley New York, 2008.

Owner

  • Name: Ann-Joelle Minor
  • Login: A-JMinor
  • Kind: user
  • Company: Max Planck Institute

PhD Candidate at Max Planck Institute for Dynamics and Complex Technical Systems

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  Python Aspen Plus Connected Model for the Calculation of
  Equipment Costs
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Ann-Joelle
    family-names: Minor
    email: aminor@mpi-magdeburg.mpg.de
    name-particle: Ann-Joelle
    affiliation: >-
      Max-Planck-Institut für Dynamik komplexer technischer
      Systeme Magdeburg
    orcid: 'https://orcid.org/0000-0001-5673-8221'
repository-code: >-
  https://github.com/A-JMinor/Python-Aspen-Plus-Connected-Model-for-the-Calculation-of-Equipment-Costs
abstract: >-
  Python model for the calculation of equipment costs (e.g.
  for the CSTR reactor, heat exchangers, RADFRAC
  distillation columns, etc.) that were simulated in Aspen
  Plus.
keywords:
  - python
  - aspen plus
  - purchase costs
date-released: '2023-04-18'

GitHub Events

Total
  • Release event: 1
  • Watch event: 4
  • Fork event: 1
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 4
  • Fork event: 1
  • Create event: 1