#*---------------------------------------------------------------------
* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
*
* This LIBRARY is free software; you can distribute it and/or modify
* it under the therms of the ALSOC FREE LICENSE as available at
* http://www.enq.ufrgs.br/alsoc.
*
* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
* from http://www.rps.eng.br Copyright (C) 2002-2004.
* All rights reserved.
*
* EMSO is distributed under the therms of the ALSOC LICENSE as
* available at http://www.enq.ufrgs.br/alsoc.
*
*----------------------------------------------------------------------
* 8. Binary batch distillation
*----------------------------------------------------------------------
*
* Description:
* This problem is part of a collection of 10 representative
* problems in Chemical Engineering for solution by numerical methods
* developed for Cutlip (1998).
*
* Subject:
* * Separation Processes
*
* Concepts utilized:
* Batch distillation of an ideal binary mixture.
*
* Numerical method:
* * System of ODEs and NLA equations
*
* Reference:
* * CUTLIP et al. A collection of 10 numerical problems in
* chemical engineering solved by various mathematical software
* packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998.
* * More informations and a detailed description of all problems
* is available online in http://www.polymath-software.com/ASEE
*
*----------------------------------------------------------------------
* Author: Rodolfo Rodrigues
* GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation,
* Control, and Optimization of Processes
* $Id$
*--------------------------------------------------------------------*#
using "types";
FlowSheet batch_distillation
PARAMETERS
NComp as Integer (Brief="Number of chemical components", Upper=2);
A(NComp) as Real (Brief="Antoin equation constant");
B(NComp) as Real (Brief="Antoin equation constant");
C(NComp) as Real (Brief="Antoin equation constant");
Pt as pressure (Brief="Total pressure");
VARIABLES
L as mol (Brief="Mole of liquid remaining", DisplayUnit='mol');
x(NComp) as fraction (Brief="Mole fraction");
k(NComp) as Real (Brief="Vapor-liquid equilibrium ratio", Lower=0);
P(NComp) as pressure (Brief="Vapor pressure");
T as temperature;
EQUATIONS
"Change time in x(2)"
x(2) = time/'s';
"Mole of liquid remaining"
diff(L) = L/(x(2)*(k(2) - 1))/'s';
"Vapor-liquid equilibrium ratio"
k = P/Pt;
"Vapor pressure" # Antoine equation
log(P/'mmHg') = A - B/((T/'K'-273.15) + C);
"Bubble point"
sum(k*x) = 1;
"Mole fraction normalisation"
sum(x) = 1;
SET
NComp = 2; # benzene, toluene
# Antoin equation constants
A = [6.90565, 6.95464];
B = [1211.033, 1344.8];
C = [220.790, 219.482];
Pt = 1.2*'atm';
INITIAL
L = 100*'mol';
OPTIONS
TimeStart = 0.4;
TimeStep = 1e-3;
TimeEnd = 0.8;
end