0% found this document useful (0 votes)
56 views

Qasim Khan .Lab Report .Optimization

University of engineering and technology, Peshawar submitted a lab report to Dr. Muazzam Arshad on optimization. The report discussed defining optimization problems, including design variables, constraints, objective functions and process models. It provided examples of optimization applications in chemical processes and outlined general procedures for solving optimization problems. The scope of optimization problems was also defined, including the need for an objective function, predictive model, constraints and variables.

Uploaded by

Qasim Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Qasim Khan .Lab Report .Optimization

University of engineering and technology, Peshawar submitted a lab report to Dr. Muazzam Arshad on optimization. The report discussed defining optimization problems, including design variables, constraints, objective functions and process models. It provided examples of optimization applications in chemical processes and outlined general procedures for solving optimization problems. The scope of optimization problems was also defined, including the need for an objective function, predictive model, constraints and variables.

Uploaded by

Qasim Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

University of engineering and technology, Peshawar

Lab Report

Semester spring-2022

Name: Qasim Khan

Registration ID: 18pwche1301

Date: 20 January 2022

Department: Chemical engineering

Submitted to
Dr. Muazzam Arshad
Lab Report #01
Introduction to optimization

Optimization:
It is an act, process, or methodology of making something (such as a design, system, or decision)
as fully perfect, functional, or effective as possible specifically the mathematical procedures (such
as finding the maximum of a function) involved in this.

OR

“Finding the best option(candidate) from a set of alternatives without explicitly enumerating
and evaluating all possible alternatives.”

The main goal of process optimization is to reduce or eliminate time and resource wastage, unnecessary
costs, bottlenecks, and mistakes while achieving the process objective.

Examples of applications of optimization:


Optimization can be applied in numerous ways to chemical processes and plants. Typical
projects in which optimization has been used include:
1. Scheduling maintenance and equipment replacement.
2. Evaluating plant data to construct a model of a process
3. Sizing and layout of a pipeline.
4. Designing equipment and an entire plant.
5. Determining the best sites for plant location
6. Operating equipment, such as tubular reactors, columns, and absorbers.
7. . Routing tankers for the distribution of crude and refined products.
8. Minimizing inventory charges.
9. Allocating resources or services among several processes.
10. Planning and scheduling construction.

Statement of an Optimization Problem:


All optimization problems are stated in some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model

General procedure for solving optimization problems:


No single method or algorithm of optimization can be applied efficiently to all problems. The
method chosen for any particular case depends primarily on:
1) The character of the objective function and whether it is known explicitly.
2) the nature of the constraints.
3) the number of independent and dependent variables.

Scope of Optimization:
Scope of Optimization Problems From a practical standpoint, we define the optimization task as
follows

Objective function:

An objective function is needed that provides a scalar quantitative performance measure that
needs to be minimized or maximized. This can be the system’s cost, yield, profit, etc.
Predictive model:

A predictive model is required that describes the behavior of the system. For the optimization
problem this translates into a set of equations and inequalities.

Constraint and Variables:


The constraints comprise a feasible region that defines limits of performance for the system.
Variables that appear in the predictive model must be adjusted to satisfy the constraints. This
can usually be accomplished with multiple instances of variable values, leading to a feasible
region that is determined by a subspace of these variables. In many engineering problems, this
subspace can be characterized by a set of decision variables that can be interpreted as degrees
of freedom in the process.

Conclusion:
Hence, we concluded that optimization is an integral part of every field, without optimizationit
would be very informal and less probable to reach to a point, where the efficiency and
effectiveness is at its peak. That is why, engineering projects are deal with proper channel,
which is known as optimization.
Lab Report # 02
To apply the degree of freedom analysis.
Problem Statement:
A defined amount of two components (A - stream1, B – stream 2) are mixed before cooled
down in a heat exchanger (utility cooling water) to a specific Temperature T4.
The heat capacities cpA, cpB and cpW can be considered as constant.

 List the known and unknown variables

 How many equations do we need to solve the problem?

 Set up the equations needed for a complete balance (mass balance and energy balance)
of the process.

Abstract:
In this experiment, we have determined the number of unknown variables for an optimization
problem using degree of freedom analysis. These unknown then altered to optimize the given
reaction system.

Theory:
Degree of Freedom:
The degree of freedom analysis gives us the number of decision variables that can be changed
during optimization process to obtain the optimal solution.
DOF = (No. of variables) – (No. of linearly independent equation)

 DOF = 0 unique solution exists, no optimization possible.


 DOF > 0 under determined system, infinite solution exists, optimization possible.
 DOF < 0 over determined system. No solution exists, least square analysis possible.

Procedure:

Solution:

Conclusion:
From this experiment, we have concluded that for some specific optimization we will find the
number of unknowns using the degree of freedom analysis and by altering these unknowns we
will optimize the required problem.
Lab Report # 03
To find the maximum profit of process using MS excel:

Abstract:

In this experiment, we have determined the maximum profit of a process using MS Excel. Input
data points were given, by using them in a given function, output data points were generated.
The points were then graphically displayed, and we located the point where the profit for given
scenario was maximum.

Theory:

All optimization problems are stated in some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model

Software used:

 MS Excel.

Procedure:

 Function of dependent and independent variables was given, as well as the domain
values of the input variable was also given.
 From the excel operation, the values were used in the required formula(f(x)=297-
2x*210-2x*x/1000) to get the output values of the dependent variable.
 Via ‘insert’ command, the graph was plotted.
 As our objective was to locate the value in graph, the maximum value point of
dependent variable, we did so and got value of 40(x-axis), where f(x) has maximum
value.

Results:
1200

1000

800
f(X)

600

400

200

0
0 20 40 60 80 100 120
X

From this experiment, we have concluded that the optimum point is at x = 40, that is we have
the maximum profit at this point. Hence, for practical approach this point would be prefer
because it is relative maximum point.
Lab Report # 04
To find the maximum profit of a process using solver in MS excel
Abstract:
The maximum profit of a process is determined using solver in MS Excel. The objective function,
variables and constraints are defined in solver. The solver tool itself optimized the process and
an optimum value is obtained at the end of experiment.

Theory:
All optimization problems are stated in some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model.
Solver (MS Excel):
Solver is a Microsoft Excel add-in program you can use for what-if analysis. It is used find an
optimal (maximum or minimum) value for a given optimization problem.

Software used:

 MS Excel.

Procedure:

 In this optimization problem, the data was given and we have to calculate the maximum
profit of the manufacturing company.
 First, the formula for objective function and constraints were defined in their respective
cells.
 Using solver, the objective function, the constraints and variables were defined.
 The optimum results were obtained by Linear programming (LP) in solver.
 From the answer sheet and other sheets like sensitivity report the optimum value of the
process is obtained which is the required value of maximum profit of the given problem.

Results:
Conclusion:
From this experiment we have concluded that to solve an optimization problem, the use of the
software makes it easy and time saving to solve given optimization problem. The constraints,
objective function, design variables are defined in software which makes it’s easy to find a
solution of optimization problems.
Lab Report # 05
To solve an optimization problem for the maximization the give objective function
(profit):

Abstract:
The maximum profit of a process is determined using solver in MS Excel. The objective function,
variables and constraints are defined in solver. The solver tool itself optimized the process and
an optimum value is obtained at the end of experiment.

Theory:
All optimization problems are stated in some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model.
Solver (MS Excel):
Solver is a Microsoft Excel add-in program you can use for what-if analysis. It is used find an
optimal (maximum or minimum) value for a given optimization problem.

Software used:

 MS Excel.

Procedure:

 In this optimization problem, the data was given and we have to calculate the maximum
profit of the manufacturing company.
 First, the formula for objective function and constraints were defined in their respective
cells.
 Using solver, the objective function, the constraints and variables were defined.
 The optimum results were obtained by Linear programming (LP) in solver.
 From the answer sheet and other sheets like sensitivity report the optimum value of the
process is obtained which is the required value of maximum profit of the given problem.

Results:
Conclusion:
From this experiment we have concluded that to solve an optimization problem, the use of the
software makes it easy and time saving to solve given optimization problem. The constraints,
objective function, design variables are defined in software which makes it’s easy to find a
solution of optimization problems.
Lab Report # 06

To solve non-linear optimization problem using solver in MS excel.

Abstract:
In this experiment, we solved a non-linear optimization problem using solver in MS Excel. The
objective function, variables and constraints are defined in solver. The solver tool itself
optimized the process and an optimum value is obtained at the end of experiment.

Theory:
All optimization problems are state some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model.
Solver (MS Excel):
Solver is a Microsoft Excel add-in program you can use for what-if analysis. It is used find an
optimal (maximum or minimum) value for a given optimization problem.

Software used:

 MS Excel.

Procedure:

 In this optimization problem, the data was given and we have to calculate the minimum
value of the given optimization problem.
 First, the formula for objective function and constraints were defined in their respective
cells.
 Using solver, the objective function, the constraints and variables were defined.
 The optimum results were obtained by GRG Non-Linear programming in solver.
 From the answer sheet and other sheets like sensitivity report the optimum value of the
process is obtained.
Results:
Conclusion:
From this experiment we have concluded that to solve an optimization problem, the use of the
software makes it easy and time saving to solve given optimization problem. The constraints,
objective function, design variables are defined in software which makes it’s easy to find a
solution of optimization problems.
Lab Report # 07
To optimize (minimize) the cost of given optimization problem using
APMONITOR:

Abstract:

In this experiment, an optimization problem was solved using a software i.e. AP Monitor. The
given frame of interest was to minimize the objective function(cost). The appropriate procedure
was fallowed as for the solution of optimization problem i.e. objective function, state variables
and constraints were defined properly, at the end the point where the cost of a objective function
was minimum was obtained.

Theory:

All optimization problems are state some standard format. Essential information needs to be
extracted from the problem statement and write them in mathematical form. Essential parts of
an optimization problem statement:
1. The Design/Decision variables.
2. The Constraints.
3. The Objective function
4. The Process Model.

No single method or algorithm of optimization can be applied efficiently to all problems. The
method chosen for any particular case depends primarily on:

1. The character of the objective function and whether it is known explicitly.

2. the nature of the constraints.

3. the number of independent and dependent variables.


Problem statement:

A refinery must produce 100 gallons of gasoline and 160 gallons of diesel to meet customer
demands. The refinery would like to minimize the cost of crude and two crude options exist. The
less expensive crude costs $80 USD per barrel while a more expensive crude costs $95 USD per
barrel. Each barrel of the less expensive crude produces 10 gallons of gasoline and 20 gallons of
diesel. Each barrel of the more expensive crude produces 15 gallons of both gasoline and diesel.
Find the number of barrels of each crude that will minimize the refinery cost while satisfying the
customer demands?

Procedure:

 Theory line for description in Ap Monitor was illustrated with exclamation mark(!).
 Statement scenario was written in the form of equation i.e. indicating constraints and
the relationship of objective function with the state variables (decision variables).

 The problem was treated as steady state problem.


 APOPT mode was selected for the solution of the problem.
 Through solve button, problem was solved and display button was used to display the
solution.
Solution:
Conclusion:

From this experiment we have concluded that to solve an optimization problem, the use of the
software makes it easy and time saving to solve given optimization problem. The constraints,
objective function, design variables are defined in software which makes it’s easy to find a
solution of optimization problems.
Lab Report # 08
Optimization of Refinery using AP-Monitor
Problem statement

Software
AP-Monitor (Online)
Procedure
 First of all, formulate the problem statement.
 There are two decision variable crude 1 and crude 2.
 Objective function is to maximize profit.
 Constraints are shown below.
 Write code in AP-Monitor command window.
 At last run your code and observe results.

Results

𝑏𝑏𝑙
𝑥1 = 𝑐𝑟𝑢𝑑𝑒. 1 ( )
𝑑𝑎𝑦
𝑏𝑏𝑙
𝑥2 = 𝑐𝑟𝑢𝑑𝑒. 2 ( )
𝑑𝑎𝑦
max 𝑦 = 𝑖𝑛𝑐𝑜𝑚𝑒 − 𝑟𝑎𝑤 𝑚𝑎𝑡𝑒𝑟𝑖𝑎𝑙 𝑐𝑜𝑠𝑡 − 𝑝𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔 𝑐𝑜𝑠𝑡
Amount of each Product Produced
Gasoline 𝑥3 = 0.80𝑥1 + 0.44𝑥2
Kerosene 𝑥4 = 0.05𝑥1 + 0.10𝑥2
Fuel oil 𝑥5 = 0.10𝑥1 + 0.36𝑥2
Residual 𝑥6 = 0.05𝑥1 + 0.10𝑥2
Income
Gasoline: (36)0.80𝑥1 + 0.44𝑥2
Kerosene: (24)0.05𝑥1 + 0.10𝑥2
Fuel oil: (21)0.10𝑥1 + 0.36𝑥2
Residual: (10)0.05𝑥1 + 0.10𝑥2
So if,
Income = 32.6𝑥1 + 26.8𝑥2
Raw material cost = 24𝑥1 + 15𝑥2
Processing cost = 0.5𝑥1 + 𝑥2
The objective function is = 𝑓 = 8.1𝑥1 + 10.8𝑥2
Constraints
0.80𝑥1 + 0.44𝑥2 ≤ 24000 (Gasoline)
0.05𝑥1 + 0.10𝑥2 ≤ 2000 (Kerosene)
0.10𝑥1 + 0.36𝑥2 ≤ 6000 (Fuel oil)
𝑥1 ≥ 0
𝑥2 ≥ 0
Solver Output

apm 128.187.56.207_online_684

APMonitor, Version 0.9.2


APMonitor Optimization Suite

--------- APM Model Size ------------


Each time step contains
Objects : 0
Constants : 0
Variables : 10
Intermediates: 0
Connections : 0
Equations : 9
Residuals : 9

Number of state variables: 10


Number of total equations: - 8
Number of slack variables: - 0

Degrees of freedom : 2

Steady State Optimization with APOPT Solver

Iter Objective Convergence


0 -6.75112E-01 2.81250E+00
1 -2.86759E+05 3.74700E-16
2 -2.86759E+05 2.22045E-16
3 -2.86759E+05 2.22045E-16
Successful solution
Solver : APOPT (v1.0)
Solution time : 6.300000008195639E-003 sec
Objective : -286758.620689655
Successful solution

Successful Solution
Objective Value = -286758.621

Solution Results

Main Config Info Dashboard Oper FVs MVs SVs CVs Vars Sens Start Refresh (20m)

128.187.56.207_onli Color Intermedi Parame Varia Overri Active Objective Slack


ne_684 Key ate ter ble de Constraint Variable Variable

Name Lower Value Upper


ss.crude[1] 0.0000E+00 2.6207E+04 ---
ss.crude[2] 0.0000E+00 6.8966E+03 ---
ss.gasoline 0.0000E+00 2.4000E+04 2.4000E+04
ss.kerosene 0.0000E+00 2.0000E+03 2.0000E+03
ss.fuel_oil 0.0000E+00 5.1034E+03 6.0000E+03
ss.residual 0.0000E+00 2.0000E+03 ---
ss.income --- 1.0392E+06 ---
ss.raw_matl_cost --- 7.3241E+05 ---
ss.proc_cost --- 2.0000E+04 ---
ss.profit --- 2.8676E+05 ---
Lab Report # 09
Introduction to Optimization Tool in Aspen plus

In optimization our target is to find optimal parameters for a process. There are many software
through which we can solve optimization problems. Aspen plus is one of them and especially
for chemical engineers. First we have to introduce a little about aspen plus which is given
below;

Aspen plus
Aspen Plus is a market-leading process modeling tool for conceptual design, optimization, and
performance monitoring for the chemical, polymer, specialty chemical, metals and minerals,
and coal power industries.

What aspen plus provides?


 Physical Property Models
–World’s largest database of pure component and phase equilibrium data for conventional
chemicals, electrolytes, solids, and polymers
–Regularly updated with data from U. S. National Institute of Standards and Technology (NIST)
 Comprehensive Library of Unit Operation Models
–Addresses a wide range of solid, liquid, and gas processing equipment
–Extends steady-state simulation to dynamic simulation for safety and controllability studies,
sizing relief valves, and optimizing transition, startup, and shutdown policies
–Enables you build your own libraries using Aspen Custom Modeler or programming
languages (User-defined models)
 Properties analysis
–Properties of pure component and mixtures (Enthalpy, density, viscosity, heat capacity,…etc)
–Phase equilibrium (VLE, VLLE, azeotrope calculation…etc)
–Parameters estimation for properties models (UNIFAC method for binary parameters, Joback
method for boiling points…etc)
–Data regression from experimental data.
 Process simulation
–pump, compressor, valve, tank, heat exchanger, CSTR, PFR, distillation column, extraction
column, absorber, filter, crystallizer…etc
Optimization Methods
Aspen Plus solves optimization problems iteratively. By default, Aspen Plus generates and
Sequences a convergence block for the optimization problem. It can override the convergence
defaults, by entering convergence specifications on Convergence forms. It uses the sequential
quadratic programming (SQP) and complex methods to converge optimization problems. The
value of the manipulated variable that is provided in the Stream or Block input is used as the
initial estimate. Providing a good estimate for the manipulated variable helps the optimization
problem to converge in fewer iterations. This is especially important for optimization problems
with a large number of manipulated variables and constraints.
There are no results associated directly with an optimization problem, except the objective
function and the convergence status of the constraints. The final value of the manipulated
and/or sampled variables are either reported directly on the appropriate Stream or Block
results sheets or summarized on the Results—Manipulated Variables sheet of the convergence
block. To find the summary and iteration history of the convergence block, select the Results
form of the appropriate Convergence block.
The objective function can be any valid FORTRAN expression involving one or more flowsheet
quantities. The tolerance of the objective function is the tolerance of the convergence block
associated with the optimization problem. There is the possibility of imposing equality or
inequality constraints on the optimization. Equality constraints within an optimization are
similar to design specifications. The constraints can be any function of flowsheet variables
computed using FORTRAN expressions or in-line FORTRAN statements. Moreover, the
tolerance of the constraint must also be specified.

Sensitivity analysis tool in aspen plus


Sensitivity analysis is a tool helpful to determine how a process reacts to varying key operating
and design variables. It can be used to vary one or more flowsheet variables and to study the
effect of that variation on other flowsheet variables. It is a valuable tool for performing “what-
if” studies, and it can be observed as a very basic method to optimize a given equipment.
The flowsheet variables that are varied must be inputs to the flowsheet. They cannot be
variables that are calculated during the simulation. Sensitivity analysis can be used to verify
whether the solution to a design specification lies within the range of the manipulated variable.
It can use sensitivity blocks to generate tables and/or plots of simulation results as functions of
feed stream, block input, or other input variables. Sensitivity analysis results are reported in a
table on the Sensitivity Results Summary sheet. The first n columns of the table list the values
of the variables that are varied, where n is the number of manipulated flowsheet variables
entered on the Sensitivity Input Vary sheet. The remaining columns in the table contain the
values of variables that are tabulated on the tabulate sheet.
Lab Report # 10

Optimization of Energy consumption of a column using aspen plus

Problem
Minimization of energy consumption in column, variation of reflux ratio.
Constraints: Purity of bottom product is equal to 99.9%.

Flow sheet

Let the Components be water and ethanol.

Software
Aspen Plus
Procedure
 Define components which is ethanol and water in this case.
 Select process type and base method.
 Draw flow sheet in Process flow sheet window.
 Insert inputs for flow sheet (Temperature, Pressure, Mass flow and etc.)
 In data browser there is model analysis tool in which we should select the optimization and
create new.
 Define sampled variables, objective function (mini or max), variable (reflux ratio) also set
variable limits.
 Select on constraint option in data browser and create new constraint.
 Associate constraint with optimization.
 At last run simulation and see results in optimization.
Lab Report # 11
Optimization of Methyl Ethyl Ketone (MEK) Using Aspen Plus

Process description/Problem Statement


Software
Aspen plus

Procedure
 Define components which is MEK in this case.
 Select process type and base method.
 Draw flow sheet in Process flow sheet window.
 Insert inputs for flow sheet (Temperature, Pressure, Mass flow and etc.)
 In data browser there is model analysis tool in which we should select the optimization and
create new.
 Define sampled variables, objective function (mini or max), variable (reflux ratio) also set
variable limits.
 Select on constraint option in data browser and create new constraint.
 Associate constraint with optimization.
 At last run simulation and see results in optimization.

Results
 Objective function
 𝑀𝑎𝑥 𝑦𝑖𝑒𝑙𝑑 = 𝑀𝐸𝐾 𝑖𝑛 𝐷𝑖𝑠𝑡𝑖𝑙𝑙𝑎𝑡𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡/𝑓𝑒𝑒𝑑 𝑡𝑜 𝑐𝑜𝑙𝑢𝑚𝑛
 Constraint
 99.7% 𝑝𝑢𝑟𝑖𝑡𝑦 𝑜𝑓 𝑀𝐸𝐾 𝑖𝑛 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑜𝑟 0.997 𝑚𝑜𝑙𝑒 𝑓𝑟𝑎𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑀𝐸𝐾 𝑖𝑛 𝑡𝑜𝑝 𝑝𝑟𝑜𝑑𝑢𝑐𝑡
 Sampled variable
 𝑀𝑜𝑙𝑎𝑟 𝑓𝑙𝑜𝑤 𝑜𝑓 𝑀𝐸𝐾 𝑓𝑒𝑒𝑑 𝑡𝑜 𝑐𝑜𝑙𝑢𝑚𝑛
 𝑀𝑜𝑙𝑎𝑟 𝑓𝑙𝑜𝑤 𝑜𝑓 𝑀𝐸𝐾 𝑖𝑛 𝑝𝑟𝑜𝑑𝑢𝑐𝑡
 Manipulated variable
 𝑅𝑒𝑓𝑙𝑢𝑥 𝑟𝑎𝑡𝑖𝑜𝑛
 𝐷𝑖𝑠𝑡𝑖𝑙𝑙𝑎𝑡𝑒 𝑡𝑜 𝑓𝑒𝑒𝑑 𝑟𝑎𝑡𝑖𝑜

You might also like