#*--------------------------------------------------------------------- * 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. * *---------------------------------------------------------------------- * 6. Heat exchange in a series of tanks *---------------------------------------------------------------------- * * 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: * * Heat Transfer * * Concepts utilized: * Unsteady-state energy balances, dynamic response of well mixed * heated tanks in series. * * Numerical method: * * Simultaneous first order ODEs * * 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"; #*--------------------------------------------------------------------- * Model of a stream *--------------------------------------------------------------------*# Model oil_stream PARAMETERS W as flow_mass (Brief="Mass flow rate", DisplayUnit='kg/min'); cp as cp_mass (Brief="Heat capacity of the oil", DisplayUnit='kJ/kg/K'); VARIABLES T as temperature; SET cp = 2*'kJ/kg/K'; W = 100*'kg/min'; end Model tank_source ATTRIBUTES Pallete = true; Brief = "Simple inlet stream"; Icon = "icon/tank_source"; VARIABLES out Outlet as oil_stream (Brief="Outlet stream", PosX=1, PosY=0.5); end Model tank_sink ATTRIBUTES Pallete = true; Brief = "Simple outlet stream"; Icon = "icon/tank_sink"; VARIABLES in Inlet as oil_stream (Brief="Inlet stream", PosX=0, PosY=0.5); end Model heat_stream VARIABLES T as temperature; end Model steam ATTRIBUTES Pallete = true; Brief = "Simple inlet stream"; Icon = "icon/tank_source"; VARIABLES out Outlet as heat_stream(Brief="Outlet stream", PosX=1, PosY=0.5); end #*--------------------------------------------------------------------- * Model of one tank *--------------------------------------------------------------------*# Model heated_tank ATTRIBUTES Pallete = true; Brief = "Simple model of a steady-state CSTR"; Icon = "icon/heated_tank"; PARAMETERS UA as Real (Brief="Product of the heat transfer coefficient and the area", Unit='kJ/min/K'); VARIABLES in Inlet as oil_stream (Brief="Inlet stream", PosX=0.51, PosY=0); out Outlet as oil_stream (Brief="Outlet stream", PosX=1, PosY=0.975); in InletQ as heat_stream (Brief="Rate of heat supply", PosX=0, PosY=0.715); M as mass (Brief="Mass in tank"); Q as heat_rate (Brief="Rate of heat transferred", DisplayUnit='kJ/min'); SET UA = 10*'kJ/min/K'; EQUATIONS "Energy balance" (M*Outlet.cp)*diff(Outlet.T) = Inlet.W*Inlet.cp*(Inlet.T - Outlet.T) + Q; "Rate of heat transferred" Q = UA*(InletQ.T - Outlet.T); end #*--------------------------------------------------------------------- * Three tanks in series *--------------------------------------------------------------------*# FlowSheet series_of_tanks VARIABLES feed as oil_stream; DEVICES steam1 as steam; steam2 as steam; steam3 as steam; tank1 as heated_tank; tank2 as heated_tank; tank3 as heated_tank; CONNECTIONS feed to tank1.Inlet; tank1.Outlet to tank2.Inlet; tank2.Outlet to tank3.Inlet; steam1.Outlet to tank1.InletQ; steam2.Outlet to tank2.InletQ; steam3.Outlet to tank3.InletQ; SPECIFY feed.T = (20 + 273.15)*'K'; steam1.Outlet.T = (250 + 273.15)*'K'; steam2.Outlet.T = (250 + 273.15)*'K'; steam3.Outlet.T = (250 + 273.15)*'K'; tank1.M = 1000*'kg'; tank2.M = tank1.M; tank3.M = tank2.M; INITIAL tank1.Outlet.T = (20 + 273.15)*'K'; tank2.Outlet.T = tank1.Outlet.T; tank3.Outlet.T = tank2.Outlet.T; OPTIONS # Dynamic = false; # steady-state TimeStart = 0; TimeStep = 1; TimeEnd = 90; TimeUnit = 'min'; end