Many optimization problems in chemical engineering involve integer variables and trade-off objective. One approach to address this type of problem is using algorithms that handle continuous and integer variables, for example, BARON algorithm (deterministic) or NSGA II (Stochastic).This matlab code is an example of Multi-Objective optimization of Aspen Plus distillation column using NSGA II algorithm.Simulation of distillation column was carried out in Aspen Plus V8.8, because simulation time of each interation in version V9 or 10 was 10 times more than in version V8.8.Optimization Problem Statement:Objective Functions (2) : [min{CAPEX}, min{OPEX}]Optimization Variables (3): [x1=Column Stages Number, x2=Reflux Ratio, x3: Normalized Column Feed Stage]Constraints: Cons 1=Ethanol Mole Recovery > 99%; Cons 2=Ethanol Mole Purity > 80%NSGA II SetupGenerations: 20Population: 20Note: Please, refer to code "Opt_EthanolColumn.m" for better understanding of NSGA algorithm parameters.Run the code: Put all files in the same folder and run script "Opt_EthanolColumn.m"Simulation file "ETHANOLColumn_v8.8" (Aspen Plus V.8.8) in: https://drive.google.com/file/d/1LaTGf3_yY98TsxdwVbVIWvNt8wr3etOx/view?usp=sharingPlease let me know any questions.Regards, Andrés Abril.

GUI model has been prepared for Distillation Column using FUG method. This is a part of post graduate work and I need support from all the users. Users can run the Distillation.fig file but make sure to open Distillation.m file first. Please share your views, ideas and suggestion. You can send me your queries, views, ideas and suggestion on samidhab1@yahoo.co.in.

Fenske's Equation is used to calculate the minimum number of stages at infinite reflux, Underwood's Equation is used to calculate the minimum reflux at infinite stages, Gilliland's Correlation (Eduljee's Equation) is used to calculate the number of stages at given reflux whereas Kirkbride's equation identifies feed stage location.

My first attempt at making a McCabe-Thiele program. This program accepts user inputs on stream compositions & flow rates, stream enthalpies, fractional recovery & feed quality and returns a McCabe-Thiele plot for a binary column diistillation with the optimum feed stage and number of ideal stages. There are a lot of features which do not work in this version but will be modified in future versions, the energy balance feature is somewhat buggy as well. At first I tried to make the program create & solve a system of non-linear equations based on user-inputs but I could not make that work correctly. A friend suggested I publish the initial version and get community feedback before continuing as progress has somewhat stagnated. Eventually the scope of the application will include other types of chemical process separations which use the McCabe-Thiele method as well as non-ideal separation equipment. Any feedback would be much appreciated.

Solve for the transient stage compositons in an ideal binary distillation column using ode45.Source: (c) 1997 B. Wayne Bequette - 24 Jan 1997 revised 31 Dec 96http://www.rpi.edu/dept/chem-eng/WWW/faculty/bequette/books/Process_Dynamics/MATLAB/mod_10/ Modified by Giovani Tonel (giovani.tonel@ufrgs.br) October 2006

This GUI uses a constant relative volatility (alpha) to estimate the equilibrium curve. From there, the GUI uses the "McCabe and Thiele Graphical Method" to estimate the ideal number of plates in the column.A reference is provided in the GUI: look in Help/About.Comments, suggestions or bugs, please write to cgelmiREMOVE@gmail.com

This is a simple code I came up with to analyze Distillation. It gives you the Theoretical number of trays, E_overall, R_min and the optimum feed tray location using the McCabe-Thiele method. Hope it works for you guys.Cheers

Distillation column model found in a few chemical engineering papers on the topics of nonlinear model reduction, nonlinear model predictive control, and nonlinear differential equation models.Download additional models and documentation at:http://www.hedengren.net/research/models.htm

The program computes the composition of benzene, toluene and p-xylene versus time in all column plates. The steady state values are plotted versus the plate number for all three components. This MATLAB program is adapted from an example given in Chemical Engineering Dynamics by Ingham et al., Wiley-VCH, 2000.

We use a batch column with four theoretical plates to separate a binary mixture of water and methanol at 1 bar. Temperature and concentration profiles versus time are obtained for a reflux ratio equal to 10. In addition, the total moles in the still and distillate are plotted versus time. This demo shows how one can use ode15s to treat a complex system of 13 differential algebraic equations very easily. This problem is solve using Berkeley-Madonna Language in the reference indicated below. We get the same results as Ingham et al. (2000).Reference: Example BUBBLE in page 559 by J. Ingham, I. J. Dunn, E. Heinzle and J. E. Prenosil, Chemical Engineering Dynamics, Wiley-VCH, Weinheim, Second Edition, 2000.For a similar treatment using Mathematica 5.2, please visit:http://library.wolfram.com/infocenter/MathSource/5929/A Mathematica demonstration using version 6.0 is available at:http://demonstrations.wolfram.com/StudyOfAFourStageBatchDistillationColumn/

Solving simple flash distillation column by 4 components

This GUI calculates and represents the stages of a distillation column using the McCabe method.

Flash distillation,Temperature,Liquid and vapour composition,Binary system

Works well for Binary Systems which form nearly Ideal Mixtures.Got good results for Benzene-Toluene System.Works for Feed with different Vapor Fraction.Works for Different Reflux Ratio.

This application was developed for the Separation Laboratory course at UNIMET to simulate the distillation of an isopropanol-water mixture through a batch distillation process. Starting with the creation of a calibration curve to operate within a range of 10 - 25% V/V of isopropanol alcohol (IPA) for a distillation column equipped with 10 DN50 bubble cap trays, each approximately 5 cm in diameter, and a 10 L boiling flask, which was heated to a fluctuating temperature between 200-250 ºC. The refractive index was measured in 100 mL samples, collecting approximately 7 distillate samples over a period from 40-60 minutes.It allows to calculate:• The necessary time to achieve a specific distillate concentration.• The percentage of IPA recovery.• The volume and concentration of the residue after distillation.• The volume and concentration of the obtained distillate.Calculations are based on the following user-provided input data:• The initial concentration in the feed.• The desired concentration of the distillate.• The total volume of the feed.• The target concentration in the residue.However, an error was identified from the IPA concentration established by the supplier, which affects the accuracy of the results. Consequently, the MATLAB application requires recalibration based on an accurate value of the alcohol concentration to successfully emulate a simulation result that is faithful to the theoretical distillation process.

This tells how to verify linear and nonlinear model of distillation

Using this people will be able to calculate the number of theoretical stages required for desired distillate composition. Input to the model will be relative volatality, reflux ratio, feed composition as well as feed rate, desired distillate and bottom composition.

System: Binary Design method: McCabe-ThieleCondition: Distillation with Constant Relative VolatilityRequired User inputs:-Feed amount (in mol)-Mole fraction of More Volatile Component (MVC) in Feed, Distillate, and Bottoms-Relative volatility of system-External Reflux Ratio (R or Lo/D)-q value for q lineOutputs:-number of plates required at the given reflux ratio-optimal feed plate-minimum number of plates at total reflux-McCabe-Thiele Plot at the given reflux ratio-McCabe-Thiele Plot at total refluxSpecial Contributors: (for validating the computed values and contributing to the documentation file)-Ms. Maegan Gwyneth T. Alcaraz-Ms. Sofia Isabella D. Dimalanta-Mr. Piolo Gabriel N. GervacioSpecial thanks to: (our professor who gave the task to us and taught us the fundamentals of binary distillation)-Dr. Nathaniel P. Dugos

We solve a binary distillation problem using the solution of a Riccati equation. We find that four plates are needed to achieve the desired product purity. We also compute the number of stages with the classical approach by stepping off stages using the equilibrium curve and the operating line. With this second approach, we find four plates too I agreement with the Riccati equation method.

This is an mfile for LqG/LTR method in multivariable control for distillation column which is in 'Neil Munro with help from Igor Bakshee, Polynomial Control Sytems , July 2006'

This app computes the number of theoretical plates,minimum reflux ratio, optimum feedplate, product recovery and flow rates for user-specified conditions. Output consists of a McCabe Thiele plot of the separation and an Output tab containg many particulars of the simulation. Equilibrium data choices include: constant relative volatility, Raoult's law with the Antoine vapor pressure equation, experimental ethanol-water data, isopropanol-water data or user supplied experimental data. Murphree tray efficiency can also be specified. The IPA-water data can be replaced with new data. The new data should always include 0 and 1 values for the mole fraction in the liquid and vapor with intermediate values increasing monotonically. Entries should be concentrated in region of high slope of the XY equilibrium curve. If the new data has less than 12 rows, entry of 1 in the X or Y column will signal the end of the new data. X and Y entries of the remaining rows will all change to 1. These rows will be disregarded in the computation.

The McCabe-Thiele method provides a simplified graphical approach to estimate the number of stages required for distillation, assuming idealized conditions. It serves as a starting point for initial column design and can help optimize the process based on various factors such as reflux ratio, feed location, and desired product purity. It's worth noting that the McCabe-Thiele method assumes idealized behavior and does not account for factors like non-idealities, pressure changes, heat effects, and column internals. Therefore, more rigorous methods and simulations are often employed for detailed design and analysis of distillation columns in practical applications. The code is written in such a manner such that it is applicable for all types of data. For finding out equilibrium data, the equation y = alpha*x/(1-alpha*x) is used and the no. of stages were found individually for both top section and bottom section. The code will work only if the value of relative volatility is greater than 1 (minimum a value of 1.5 is required for smooth operation). The efficiency of the column is to be assumed but in future I try to include the calculation of Murphree's efficiency concept too in it.

The control of both bottom and distillate compositions is achieved by using conventional two point feedback control (WoodandBerry1) and non-interacting control (WoodandBerry2). Because of coupling, conventional control has a poorer performance when compared to the non interacting control system. Feed is regarded as a perturbation that is properly rejected by the non interacting control system. Transfer functions are taken from the book of Jean-Pierre Corriou (Commande des Procédés, Génie des Procédés de l?Ecole de Nancy, 1996) or in R. K. WOOD and M. W. BERRY, Terminal composition control of a binary distillation column, Chemical Engineering Science, 1973, Vol. 28, pp. 1707-1717.

The program computes the residue curve map for the ternary mixture benzene-toluene-p-xylene. When you change the mouse's position, a new residue curve is computed and displayed. Residue curve maps play an important role in the conceptual design of distillation columns. The pointer's position gives an initial point from which the simulation runs forward and backward in warped time. The lightest (benzene) and the heaviest (p-xylene) components are the unstable and stable nodes. The distillation gets richer in the heavy components until there is only p-xylene left. The intermediate component (toluene) is a saddle point. All three components are extreme points of the system of differential equations. If the pointer is outside the triangle then the point does not correspond to a realistic mixture (i.e., it has mole fractions that are negative or greater than 1). If the user chooses a mouse’s location inside the triangle, its two coordinates correspond to the mole fractions of benzene (x) and p-xylene (y). The third (toluene’s) mole fraction is 1-x-y. The plot is the residue curve of the ternary mixture that represents the composition of the distillation still versus warped time.For more information, see: M. F. Doherty and M. F. Malone, Conceptual Design of Distillation Systems, New York: McGraw-Hill, 2001.

Included in the zipped file you find the prsrk.m routine to calculate molar volume, compressibility factor, fugacity coefficient, Helmholtz energy, entropy, enthalpy, internal energy, and Gibbs energy of vapor and liquid mixtures. The other Matlab functions/scripts are part of a steady-state distillation example as depicted in Fig. 15.6 (pp. 568) of Henley, E. J. and Seader, J. D., "Equilibrium-Stage Separation Operations in Chemical Engineering", 1981, John Wiley & Sons. The files include:1 ) main_dist.m is the main script containing input data and the call to fmincon.2 ) feed_dist.m performes BP, DP and flash calculations for the feed conditions.3 ) model_dist.m is the vectorized distillation column model.4 ) nonlcon_dist.m is the nonlinear function argument of fmincon.5 ) parameters_dist.m includes all the parameters needed for the simulation such as tehrmodynamic parameters and pressure drop along the stages.The results of the simulation in Matlab agree perfectly with those found by simulating the same system in Aspen Plus 2006.

Uses the produce from a distillation plant and sells/buys ethanol based on the moving averages.

This function creates McCabe-Thiele Diagrams from various user inputs. It also displays some key distillation parameters such as the reflux and boilup ratios and the feed conditions. Additionally, it determines the total number of EQ stages required and shows the "step-down" process. Also, it performs the infinite reflux (for given concentration) and minimum reflux (for given/calculated feed condition) analyses and plots those data in separate figures. Finally, it creates a simple column diagram illustrating the feed location and number of stages (assumes total condenser and partial reboiler).

The two programs computes residue curve maps for the methyl acetate and isopropyl acetate chemistries at atmospheric pressure. These calculations involve solving a complex system of differential algebraic equations (DAEs). This can be readily achieved using the built-in function of MatLab, ode15s. The governing equations, which depend on transformed compositions, can be found in the pioneering paper by Barbosa, D., and M. F. Doherty, Chemical Engineering Science, 3 (43), 541-550, 1988. Appropriate equations must be used to compute vapor-liquid equilibrium when there is dimerization in the gas phase. These equations have been derived by 1/ Marek, J.& Standart, G., Colln Czech. Chem. Commun., Engl. Edn, (19) 1074-1084, 1954; 2/ Marek, J. Colln Czech. Chem. Commun., Engl. Edn, (20) 1490-1502, 1955. Acetic acid, the associating component, is present in both quaternary mixtures. The occurrence of a chemical reaction leads to the disappearance of an azeotrope in the methyl acetate chemistry. On the other hand, a reactive azeotrope appears in the isopropyl acetate chemistry. Transformed compositions of these azeotropes are provided. All results found using MatLab are in agreement with those given in the book by Doherty, M. F., and M. F. Malone, Conceptual Design of Distillation Systems, McGraw-Hill, New York, 2001.Please visit these links for the paper by Housam Binous concerning this problem:http://library.wolfram.com/infocenter/Articles/6718/http://www3.interscience.wiley.com/cgi-bin/abstract/114219203/ABSTRACT

Simulation of chemical process is essential to develop sustainable designs. Nowadays, with the competitiveness in the markets, it demands the optimal operation of any chemical plant. In the new designs of chemical processes, design optimization is mandatory.Matlab is a program widely used and accepted by the academic community. Academics daily load codes with advanced numerical methods of great application for engineering. Advanced optimization methods must be taken into account to apply them in the optimal design of chemical processes. Therefore, the connection between chemical process simulation programs (Aspen Plus, Hysys, Pro II, etc.) and tools such as Matlab are very useful.Also, several people have written me to the email requesting an example. See post in ResearchGate: https://www.researchgate.net/post/How_can_I_integrate_Aspen_Plus_and_Matlab_for_optimization_proposeI present an example of connection between Aspen Plus V.10.0 and Matlab. The simulation corresponds to a reactive distillation column. As an application of the connection, a sensitivity analysis is done using Matlab (for loop).Its only necessary to place the two files in a folder and run the AspenPlus_Matlab.mSimulation file (Aspen Plus V.10.0) in: https://drive.google.com/drive/folders/1QptxJkpG9D1sQRw73Ixr6MDsSQPGOx2rRequires Aspen Plus V.10.0 software

Calculation of the Partial Relative Gain defined by K.E. Haeggblom (1997) in the paper titled: "Partial relative gain: a new tool for control structure selection"Illustrative examples with a Petlyuk distillation column are included. The examples reproduce the ones used by K.E. Haeggblom (1997).

A Graphical User Interface (GUI) is developed in MATLAB as a tutorial for understanding the PCA-based MSPC strategy. It uses a nonlinear model of a binary distillation column implemented in Simulink. The nonlinear model has four manipulated variables, four controlled variables and three input measured disturbances, plus 41 molar fractions corresponding to every column stage. The methodology for PCA-based MSPC is implemented in two phases. During Phase I, the user can simulate the distillation column under normal operating conditions at three different operating points. When the simulation is finished, the GUI obtains the corresponding PCA model automatically. In Phase II, the user can simulate several scenarios with different combinations of disturbances and failures and monitorize them through Squared Prediction Error (SPE) and T2 control charts. Contribution plots are used in conjunction with these control charts to check the original variables responsible of such abnormal situations.The application allows starting a new benchmark from scratch or opening a previously saved one. User can save its progress at any time as well as export simulation results to an Excel file. Each sheet in this Excel file corresponds to a test in the benchmark. If Excel is not present, the software will attempt to write file in CSV format.This work is part of a Master Thesis available at http://mseg.webs.upv.es/App%20Data/VillalbaT.pdf. It includes a tutorial for this software.To start the GUI run "MSPC_main.m".Note that, the first time the software is run, the simulation may take some time to run.

Simulation of chemical process is essential to develop sustainable designs. Nowadays, with the competitiveness in the markets, it demands the optimal operation of any chemical plant. Matlab is a program widely used and accepted by the academic community. Academics daily load codes with advanced numerical methods of great application for engineering. Advanced optimization methods must be taken into account to apply them in the optimal design of chemical processes. Therefore, the connection between chemical process simulation programs (Aspen Plus, Hysys, Pro II, etc.) and tools such as Matlab are very useful.I present an example of connection between Aspen HYSYS V.10.0 and Matlab. The simulation corresponds to a distillation column. As an application of the connection, a sensitivity analysis is done using Matlab (for loop).Its only necessary to place the two files in the same folder and run the Hysys_Matlab_Example.mSimulation file "Distill_Example.hsc" (Aspen HYSYS V.10.0) in: https://drive.google.com/open?id=1oSqqMj11h3NJlHPlhzCeok9baaH4PHnCRequires Aspen Plus V.10.0 software

function [CC,criteria]=findICI(G)Returns in CC all the pairings which satisfy the necessary condition for integrity (ICI) derived fron the Niederlinski Index. This function can be applied to square systems with a maximum size of 8x8. The input "G" must be a square matrix of real values which represents the dc-gain of the system. "CC" is a matrix, where each of the rows represents a pairing. For a given row, the value of the i-th element is the index of the input which is paired with the i-th output (see example below). "criteria" is a quantification of the level of the interaction of the pairings. The k-th element in the criteria vector is associated to the pairing represented by the k-th row of CC. For each pairing, the quantification used is the sum of all the considered elements in the Relative Interaction Array accumulated for all the possible partially controlled systems. Example: Consider the following DC-gain system fot a Petlyuk distillation column used in by K.E. Haeggblom (1997)with four inputs u1,u2,u3,u4 and four outputs y1,y2,y3,y4. G=[153.45, -179.34, 0.23, 0.03; -157.67, 184.75, -0.10, 21.63; 24.63, -28.97, -0.23, -0.1; -4.8, 6.09, 0.13, -2.41];Calling to these function returns the calue of "CC": CC= [3 4 1 2; 1 2 3 4]The first row of CC represents the paring y1-u3, y2-u4, y3-u1, y4-u2. The second row of CC represents the diagonal pairing y1-u1, y2-u2, y3-u3, y4-u4. The returned value of criteria is: criteria= [29.2847, 117.7139], indicating that the first pairing is preferred, since the second pairing presents a larger amount of interaction.

This function creates multiple McCabe Thiele Diagrams from user inputs to show the effects of changing parameters on the possible separation for a given binary distillation column.

In the programs, we perform flash calculations of a mixture of hydrocarbons (ethane, propane, n-butane and n-pentane) using the Rachford-Rice equation. The phi-phi method, based on the SRK equation of state, is used to compute the equilibrium constants. We also find the True Vapor Pressure. All results are in agreement with those given by HYSYS 3.2 as well as the thesis of Privat from the Ecole Nationale Supérieure des Industries Chimiques de Nancy under the supervision of J-P Corriou.A paper on the SRK EOS is available at these links:http://www.jstage.jst.go.jp/article/jcej/40/6/40_534/_articlehttp://library.wolfram.com/infocenter/Articles/6871/

This collection contains M-files intended for design of the Mass/Damper/Spring control system using the newly available functions from Robust Control Toolbox,version 3. Description of the system and version of the files using functions from mu-toolbox can be found in the book ?Robust Control Design with MATLAB? by Da-Wei Gu, Petko H. Petkov and Mihail M. Konstantinov, Springer-Verlag, London, 2005(http://www.springer.com/sgw/cda/frontpage/0,11855,4-192-22-46383093-0,00.html?changeHeader=true).The book also presents other 5 case studies including robust control systems design of a triple inverted pendulum, a hard disk drive, a distillation column, a rocket system and a flexible-link manipulator. New codes of those designs exploiting Robust Control Toolbox, version 3.0 are available upon request.These M-files should be used in the environment of MATLAB, version 7.1, Service Pack 3, together with the Robust Control Toolbox, version 3.0 and Control System Toolbox, version 6.2.List of the files:olp_mds.m Creates model of the uncertain open loop systemhin_mds.m Design of Hinf controllerlsh_mds.m Design of Hinf loop shaping controllerms_mds.m Design of mu-controllerred_mds.m Obtains controller of 4th orderrob_mds.m Robust stability analysisnrp_mds.m Nominal performance and robust performance analysiswcp_mds.m Determination of the worst case performancefrs_mds.m Frequency responses of the closed loop system with nominal parametersclp_mds.m Transient responses of the closed loop system with nominal parameterspfr_mds.m Frequency responses of the uncertain plant modelspcf_mds.m Bode plot of the uncertain closed loop systemsen_mds.m Sensitivity function of the closed loop systemppf_mds.m Singular values of the perturbed performancemcs_mds.m Transient responses for random values of the uncertain parameterskf_mds.m Frequency responses of the three controllersclf_mds.m Frequency responses of the three closed loop systemsprf_mds.m Nominal performance of the three closed loop systemsrbs_mds.m Robust stability of the three closed loop systemsrbp_mds.m Robust performance of the three closed loop systemsmod_mds.m Creates the uncertainty system modelwts_mds.m Sets the performance weighting functionssim_mds.m Creates the simulation model of the closed loop system

The program computes the number of equilibrium stages for a binary ideal mixture with relative volatility equal to 2.45. The feed is a two phase mixture with a feed quality is equal to 0.85. The distillate, feed and bottom mole fractions are 0.9, 0.5 and 0.1, respectively. The reflux ratio is taken to be 1.51435 . We draw the McCabe and Thiele Diagram and get the number of theoretical plates equal to 9. A similar code using Mathematica 6.0 is available at the following link:http://demonstrations.wolfram.com/McCabeThieleGraphicalMethod/

This program generates T-x-y Diagram for Methanol/Methyl Acetate system. It also generates a video file to record the iterations as an animation.It is a very important data required in distillation calculations when nonideal components are of interest.

The files residu.m and residue2.m contain two functions called by the main program: calresd.m . The objective is to compute the residue curve map for the ternary system chloroform-acetone-methanol at 760 mmHg using the Wilson model to compute activity coefficients.Similar computations can be easily handled using Mathematica 6.0. Please visit the following link for a demonstration:http://demonstrations.wolfram.com/ResidueCurveMapForTernaryMixturesTheCaseOfABenzeneToluenePXy/

Computation of the residue curve map for the MTBE chemistry is presented in the program. The equilibrium, taking place in the liquid phase, transforms methanol and isobutene into MTBE with n-butane being an inert component. Thermodynamic data can be found in the excellent paper by Niang and Mikitenko, Revue de l?Institut Francais du Petrole, Vol. 53, N° 4, Juillet-Aout, p. 439-462, 1998. This mixture presents a non reactive azeotrope and a pseudo-reactive azeotrope. The same problem was solved using Mathematica and is available at the Wolfram Research Information Center (http://library.wolfram.com/infocenter/search/?search_results=1;search_person_id=1536).

Process IntegrationTable of contentsIntroductionPrerequisitesUsageDescription of FilesBugsAcknowledgmentsContactLicenseIntroductionThis project was made as part of the course "Process Design II" at the School of Chemical Engineering of the National Technical University of Athens. It uses a csv or excel spreadsheet file as input, and it generates:The Grand Composite Curve of the processThe Enthalpy - Temperature diagramThe standard grid diagram for heat exchanger networksAn alternative graphical version of the grid diagramAn output cvs or excel spreadsheet file with the same information as the input file, but sorted to be like the grid diagram streamsPrerequisitesThe project was developed in MATLAB 2020b. If you have earlier versions of MATLAB, you may have some compatibility issues (see Bugs-Notes).Basic knowledge of process integration.UsageIt is reasonably simple to us the program if you do not want to make further changes. First, you need to make a spreadheet with 4 columns:The first column will be the ID of each stream. You can name each stream however you want.The second column will be the inlet temperature of each stream in degrees Celius.The third column will be the outlet temperature of each stream in degrees Celius.The fourth column will be the CP of each stream in kW per degree Celius.Then, you just have to run the importfromexcel.m file and put the name of the input file and the name of the output file.Important notes:It is advised that the first row will have the names of each column variable.The hot streams must be in the top rows and the cold streams in the bottom rows. An empty row must be left between them.The input file must be in the same folder as the m files.When you put the names of the input and output files, you must also include the extension (e.g. 'ExcelData.xlsx').Short Description of Each Fileimportfromexcel.mThis is probably the only file you will have to explicitly run. It reads the data form the input file and it generates the output file. The minimum temperature difference is 10 K by default, but you can change that as you wish.thermocascade.mThis is the main function of the project. It applies the problem table algorith and it generates the Grand Composite Curve and the Enthalpy-Temperature diagram. It does not need the IDs in order to run.networkdesign.mThis function generates the grid diagrams of the process, which can be used to make a heat exchanger network. It calls the thermocascade.m file to get the pinch.distillation.mThis function must be called independently, after the Grand Composite Curve has been generated by the thermocascade.m function. As arguments, you must give the temperatures and heat duties of the condenser and the reboiler. Then, the distillation columns are generated in the Grand Composite Curve figure. It may be used to integrate the columns in the process.Excel_Template.xlsxThis is just an empty spreadheet that can be used as a template for the input file.Bugs-NotesThe only problem that has been noted so far is that in some earlier versions of MATLAB, there is an error in the readtable and writetable functions. A universal solution is not applicable, as it depends on the version of MATLAB that you are using.The program has been tested for pinch problems and threshold problems with no hot utility, but not for threshold problems with no cold utility. However, no bugs are expected for this kind of problems as well.AcknowledgmentsThis project was created as part of a Process Design course and the methodology is based on the lectures.The project was tested and improved by my team for this course.ContactCreated by @dimos99 - feel free to contact me! (also found in dimos99@gmail.com)LicenseThis project is licensed under the MIT License

This script computes and plots required number of stages in distillation column. The values of reflux ratio, boilup ratio as well as percentage of LK in distillate in bottoms are needed to run this script. Optionally, if you have Murphree's efficiency values, a second graph, based on this parameter will appear as well. There is no need to input these values in code itself, just run the script and follow directions. Please let me know how I could improve this script/make it more user friendly.

Process Dynamics and Control in MATLABThis course focuses on a complete start to finish process of physics-based modeling, data driven methods, and controller design. Although some knowledge of computer programming is required, students are led through several introductory topics that develop an understanding of numerical methods in process control. Students should start with the Begin MATLAB Short Course that takes 2-3 hours to complete. View MathWorks WebinarThis course focuses on methods that are used in practice for simple or complex systems. It is divided into three main parts including (1) data driven modeling and controller development, (2) physics-based modeling and controller development, and (3) advanced controls with optimization. Example problems are provided throughout in the MATLAB programming language.ProfessorJohn Hedengren leads the BYU PRISM group with interests in combining data science, optimization, and automation with current projects in hybrid nuclear energy system design and unmanned aerial vehicle photogrammetry. He earned a doctoral degree at the University of Texas at Austin and worked 5 years with ExxonMobil Chemical prior to joining BYU in 2011.Teaching AssistantJoshua Hammond is an experienced researcher in Process Systems Engineering leveraging Data Science, Machine Learning, Optimization, and domain knowledge to achieve optimal solutions. Joshua developed the MATLAB dynamics and control course from the Process Dynamics and Control Course with technical support from Colin Anderson and Nathanael Nelson. Assignment solution videos are published to the Horizon PSE YouTube Channel.Course ObjectivesIt is the intent of this course to help the student to:Understand and be able to describe quantitatively the dynamic behavior of process systems.Learn the fundamental principles of classical control theory, including different types of controllers and control strategies.Develop the ability to describe quantitatively the behavior of simple control systems and to design control systems.Develop the ability to use computer software to help describe and design control systems.Learn how to tune a control loop and to apply this knowledge in the laboratory.Gain a brief exposure to advanced control strategies.Course ScheduleClassTopicAssignmentTCLab ActivityL01Course IntroductionBegin MATLABBegin MATLAB (Continued)L02Simulate Dynamics in MATLABSimulate HIV InfectionStep Test SimulationL03Physics-based Dynamic ModelingDerive Balance EquationsConvective Heat TransferL04Transient Balance EquationsTank Blending SimulationRadiative Heat TransferL05Linearize Balance EquationsLinearize Differential EquationsLinearize Energy BalanceL06First-Order Linear Dynamics with Dead Time using Graphical Fitting MethodsGraphical FOPDT FitTCLab Graphical FOPDT FitL07Optimize Model Parameter FitParameter RegressionRegression FOPDTL08Exam Review on Modeling and DynamicsPractice ExamL09Exam on Dynamic ModelingClassTopicAssignmentTCLab ActivityL10Control DesignController Design ExerciseTCLab Controller DesignL11Proportional-only (P-only) ControlTank LevelP-only ControlL12Proportional Integral (PI) ControlAuto Cruise ControlPI ControlL13Proportional Integral Derivative (PID) ControlBlending ControlPID ControlL14Case Study: Level ControlLevel ControlPI Control TuningL15Case Study: Nonlinear System ControlExothermic ReactorPID Control TuningL16Case Study: DisturbancesType-I Diabetic Blood GlucosePID with FeedforwardL17Valve Design PrinciplesValve Design ExerciseHeater ActuatorL18Sensors and Data AcquisitionSensor Design ExerciseTemperature SensorL19Exam Review on Sensors, Actuators, and ControllersPractice ExamL20Exam on Sensors, Actuators, and ControllersClassTopicAssignmentTCLab ActivityL21Single Heater ModelingTCLab Project OverviewDual Heater Modeling 2L22Single Heater RegressionDual Heater Regression 2L23Single Heater Control2 Page ReportDual Heater Control 2L24Laplace TransformsLaplace Transform ApplicationsImpulse ResponseL25Transfer FunctionsBlock Diagrams with Transfer FunctionsBlock DiagramL26State Space ModelsReactor State SpaceState Space SimulationL27Second Order Systems with Graphical FittingSecond Order Estimation: GraphicalOn/Off ControlL28Second Order OptimizationSecond Order Estimation: OptimizationSecond Order RegressionL29Simulation of FOPDT, SOPDT, and Higher Order SystemsDistillation ControlHigher Order RegressionL30Stability AnalysisController Stability LimitsP-Only Stability AnalysisL31Cascade Control and Feedforward ControlCascade or Feedforward Control DesignCascade ControlL32Exam Review on Dynamic Systems AnalysisPractice ExamL33Exam on Dynamic Systems AnalysisClassTopicAssignmentTCLab ActivityL34Control Project IntroductionControl ProjectL35Optimization IntroductionControl ProjectL36Linear ProgrammingControl ProjectL37Scheduling OptimizationControl ProjectL38Nonlinear ProgrammingControl ProjectL39Machine Learning ClassificationControl ProjectL40Model Predictive ControlControl ProjectL41Project Help SessionControl ProjectL42Final Exam ReviewPractice ExamFinalProject Report (2 pages) and Presentation (5 min) Final Exam MATLAB and Python Repository on Github Course Web-site and Schedule View the Repository on MATLAB Drive Temperature Control Lab View MathWorks WebinarThe materials in this archive are released under the MIT License. The financial assistance of MathWorks is gratefully acknowledged with technical assistance of Melda Ulusoy and others at MathWorks.