ASCEND/C2/Simulating-flowsheet/English
Tutorial 5: Model a Flowsheet
|
|
Slide number 1
Title slide |
Welcome to the tutorial on how to model a Flowsheet in ASCEND |
Show Slide 2 | In this tutorial,we will learn how to
|
Slide number 3
System Requirement |
Here I am using
|
Slide number 4
Pre-requisites |
To follow this tutorial, user must have basic knowledge of
To know more about ASCEND please visit ascend4.org
|
Slide number 5
Show the complete Flowsheet |
Let's begin the tutorial with the example problem 10.32 from the book 'Elementary Principles of Chemical Processes by Felder and Rousseau.'
|
We will model the 3 components of this Flowsheet- mixer, reactor and separator.
| |
Slide number 6
Reactions |
Here Ethane is dehydrogenated to ethylene and acetylene in the following pair of reactions.
|
Slide number 7
Flowsheet |
Let's now model the mixer in ASCEND.
|
Slide number 8
Equations for Mixer |
Thus the equation for mixer is
n0+n6 =100 |
I already have the code formixer in a text file.
Let me explain the code. | |
Open code file in text editor | Open the file flowsheet.a4c in a text editor. |
REQUIRE "atoms.a4l";
MODEL mixer; |
Here we require atoms.a4l library to use the variable type 'mole'.
I have named the model as mixer. |
n_0, n_6 and n_tot.
IS_A mole; |
Let’s name the three streams of mixer as:
n_0 (n knot), n_6 and n_tot.
Define the streams as a mole. |
n_0+n_6=n_tot; | Now we define the equation for mixer by simple mole balance as :
n_0+n_6 = n_tot; |
Note that label like 'equation 1' is not necessary to write.
| |
METHOD specify;
FIX n_tot ; END specify; |
Let's now define METHODS for solving the mixer.
|
METHOD values;
n_tot := 100.0 {mole}; END values; |
Under METHOD values, n_tot is assigned the value 100 mole. |
METHOD seqmod;
RUN clear; RUN specify; RUN values; END seqmod; END mixer; |
METHOD seqmod signifies setting the model in sequential modular simulation.
This signifies that given feed stream and unit operations specification, ASCEND will calculate the intermediate and outlet streams. |
Highlight as per narration. | Under this method,
RUN specify and RUN values |
Highlight as per narration. | Now END the model mixer
|
Slide number 9
Flowsheet |
Let us now model the second component of the flowsheet i.e. the reactor |
Point as per narration. | As you can see, there is one stream entering the reactor and four streams leaving it.
|
Slide number 10
Equations for Reactor |
These are the set of equations to be used for modelling the reactor.
|
Open flowsheet.a4c in a text editor and highlight the code text sequentially | I have named the model as reactor.
|
Highlight as per narration. | The reaction extent ksi1 and ksi2 is also defined as mole |
Highlight as per narration. | Equations 2-6 are defined as shown in the slide |
Highlight as per narration. | Note that equations 7 and 8 are written as
We don’t use division to avoid a poor initialization for solving the problem. |
Highlight as per narration. | Now under METHODS section, we define methods in a similar way as that for mixer. |
Highlight as per narration. | Under values section, instead of giving a direct value, we initialize the value of the reaction extent ksi1 and ksi2.
We thus give a nominal value of ksi1 and ksi2 |
Highlight as per narration. | We also set upper bound for ksi1 and ksi2.
For assigning the nominal value, we write ksi_1.nominal is equal to ksi_1 |
Highlight as per narration. | Similarly, for assigning the upper bound, we write
ksi_1.upper_bound is equal to n_tot into 2 |
Highlight as per narration. | Now, END the Method values.
|
Slide 11
Assignment: Equations for Separator |
Now these are the set of equations for separation process. |
Highlight as per narration. | Using these, model the separator on similar lines as that of mixer. |
Highlight as per narration. | Once we have modelled each component of the flowsheet, let’s now wire them together.
Let me explain the logic of connecting different components via code. |
Open flowsheet.a4c in a text editor and highlight the code text sequentially | I have named the model as flowsheet
m1 IS_A mixer; r1 IS_A reactor; and s1 IS_A separator; |
Note that the variable mixer, reactor and separator is used by ASCEND from the models defined before. | |
Highlight as per narration. | Now let us state that
|
Highlight as per narration. | We equate the two by the help of the operator
ARE underscore THE underscore SAME |
Highlight as per narration. | ARE_THE_SAME is a merging operator.
m1.n_tot,r1.n_tot ARE_THE_SAME;
|
Highlight as per narration. | Under METHODS section, we will again write the same methods as specify, values and seqmod. |
Highlight as per narration. | Note that under METHODS specify and values, we run methods for each individual component under each method.
RUN m1.specify and RUN r1.specify This command will execute the specify method for mixer under the METHODS specify for flowsheet |
Highlight as per narration. | Now define the method seqmod and END the flowsheet |
Open the model in ASCEND | Open this model in ASCEND.
You will see ASCEND has assigned some default values to the streams n_0, n_6 and n_tot |
Highlight as per narration. | Now under METHODS section, click on seqmod, then click on RUN
Now click on the Solve icon. |
Highlight as per narration. | You will see the message converged in the panel below.
|
Highlight as per narration. | Now click on m1 mixer.
You will see ASCEND has calculated the values for the streams n_0 (n knot) and n_6. It is also satisfying the equation n_0 (n knot) +n_6 = n_tot |
We encourage the learner to observe the values of remaining two components before and after solving the flowsheet for better understanding. | |
Open slide number 12
Summary |
Let’s summarize. In this tutorial, we have learnt, how to
|
Slide Number 13
About the spoken tutorial project |
Information on spoken tutorial project is available on our website http://spoken-tutorial.org |
Slide number 14
Spoken Tutorial Workshops |
Details of the workshops based on spoken tutorials is also available on the website |
Slide number 15
Acknowledgements |
Spoken Tutorial Project is funded by NMEICT,MHRD. |
Slide number 16
Thanks you |
This is Priya Bagde from IIT Bombay signing off. Thank you for joining. |