-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
34 lines (27 loc) · 1.04 KB
/
example.py
File metadata and controls
34 lines (27 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
rectipy module by
@author: Bob Walter
This file provides an example of usage.
To design a rectification process, this is the simplest way to do so.
"""
import rectipy as rp
# first, we create the components, our mixture will be made of
# the argument is a string of the lowercase name of the component
# for available components and their exact spelling, check the README
water = rp.Component('water')
ethanol = rp.Component('ethanol')
# then, we mix them together
# it is important in which order you pass the components,
# as the first one will be reference to concentration
# values in the following procedure
mixture = rp.Mixture(ethanol, water)
# and now initialize the rectification process
# the required arguments are:
# mixture: the created Mixture object
# xA: concentration of the swamp
# xF: concentration of the feed
# xD: concentration of the product
rectification = rp.Rectification(mixture, 0.12, 0.4, 0.78)
# with this, we get the McCabe-Thile plot of our mixture
# with operation lines and rectification steps drawn in
rectification.plot()