GithubHelp home page GithubHelp logo

giecli / chemengdp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weepctxb/chemengdp

0.0 1.0 0.0 45 KB

MATLAB code for mechanical design, sizing & capex/opex calculations for chemical plant equipment

License: GNU General Public License v3.0

MATLAB 100.00%

chemengdp's Introduction

ChemEngDP

MATLAB / Python (U/C) code for mechanical design, sizing & capex/opex calculations

The intention is to use these quickly as "black-box" functions for the purposes for TAC optimization in the second half of the detail design of the main equipment (e.g. PFR length, selection of pumps/compressors etc.)

  • QUICK START:

    • Download the required .m files under \lib directly to your project path; or

    • Download the entire \lib to path, then right click \lib > Add to Path > Selected Folders in MATLAB

To use, download the required .m files into the same folder as your existing code, and call the following functions depending on your situation:

Quick tip: Always use help to check the required units to avoid unit conversion errors!


Mechanical Design & Ancillary Equipment Sizing - dsg

help dsg - retrieves help documentation on functions, inputs and arguments

Functions:

  • dsg.designhorzpres - perform entire mechanical design for horizontal pressure vessels

  • dsg.designvertpres - perform entire mechanical design for vertical pressure vessels

  • dsg.designvac - perform entire mechanical design for vacuum vessels

  • dsg.sizecompressor - conducts compressor sizing

  • dsg.sizepump - conducts pump sizing

  • dsg.sizeHE_heater - conducts heat exchanger sizing for heating stream

  • dsg.sizeHE_cooler - conducts heat exchanger sizing for cooling stream

To call intermediate functions (e.g. calculate shell thickness, calculate max. allowable stress, calculate wind allowance etc.), refer to documentation (call help dsg).


CAPEX Calculation - capex

help capex - retrieves help documentation on functions, inputs and arguments

Constants:

  • capex.CEPCIyy - retrieves annual CEPCI index for 20yy (where yy = 01, 18 or 19)

  • capex.USSGyy - retrieves USD:SGD forex rate for 20yy year-average

  • capex.CPIzzyy - retrieves country zz's consumer price index (CPI) for 20yy year-average (where zz = 'SG' or 'US')

    • Reference year for CAPCOST = 2001 (as of Turton et al. 5th Ed.)

    • Reference year for utilities cost = 2018 (as of Turton et al. 5th Ed.)

Functions:

  • capex.eqptpurcost - calculates purchased equipment cost

  • capex.pressurefacves - calculates pressure factor for vessels

  • capex.pressurefacanc - calculates pressure factor for anciliary equipment

  • capex.baremodfac - calculates bare module factor

  • capex.baremodcost - calculates bare module cost

  • capex.totmodcost - calculates total module cost

  • capex.grasscost - calculates grassroots cost

To do: Import relevant data on constants for MOC and pressure factors as needed, only if there are significant benefits of doing so.


OPEX Calculation - opex

help opex - retrieves help documentation on functions, inputs and arguments

Constants:

  • opex.CEPCIyy - retrieves annual CEPCI index for 20yy (where yy = 01, 18 or 19)

  • opex.USSGyy - retrieves USD:SGD forex rate for 20yy year-average

  • opex.CPIzzyy - retrieves country zz's consumer price index (CPI) for 20yy year-average (where zz = 'SG' or 'US')

    • Reference year for CAPCOST = 2001 (as of Turton et al. 5th Ed.)

    • Reference year for utilities cost = 2018 (as of Turton et al. 5th Ed.)

  • opex.SF - retrieves stream factor for plant operation

  • opex.runtime - retrieves operational runtime per annum

  • opex.shiftdur - retrieves duration of one workshift

  • opex.shiftperweek - retrieves number of shifts per year

  • opex.yearww - retrieves number of work weeks per year after leave entitlements

  • opex.utilxxx - utility cost for xxx (USD/GJ basis), where xxx =

    • "HPS" for high-pressure steam (41 barg, 254 degC)

    • "MPS" for medium-pressure steam (10 barg, 184 degC)

    • "LPS" for low-pressure steam (5 barg, 160 degC)

    • "CW" for cooling water (30-45 degC)

    • "ChW" for chilled water (5 degC)

    • "LTR" for low temperature refrigerant (-20 degC)

    • "VLTR" for very low temperature refrigerant (-50 degC)

    • "elec" for electricity (110-440 V)

Functions:

  • opex.operatorspershift - calculates # operators per shift

  • opex.labourcost - calculates annualised labour cost

  • opex.costofutil - calculates cost of utilities

  • opex.costofmanfc - calculates all components of annualised total cost of manufacture (COM)

chemengdp's People

Contributors

weepctxb avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.