#*--------------------------------------------------------------------- * This file is property of the author and cannot be used, copyed * or modified without permission. * * Copyright (C) 2002-2004 the author *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: ThreeTank1.mso 843 2009-09-03 18:36:47Z bicca $ *---------------------------------------------------------------------- * * Arquivo de exemplo do EMSO * *-------------------------------------------------------------------*# Model tank_simplified PARAMETERS pi as Real (Brief="pi number",Default=3.141592); k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4); Dh as Real (Brief="Hydraulic diameter", Unit = 'm', Default=2); A as Real (Brief="Tank area", Unit = 'm^2'); SET pi = 3.141592; A = (pi*Dh^2)/4; VARIABLES V as Real (Brief="Tank Volume", Lower = 0, Unit='m^3'); Level as Real (Brief="Tank level", Lower = 0, Unit='m'); in Fin as Real (Brief="Input flow", Lower = 0, Unit='m^3/h'); out Fout as Real (Brief="Output flow",Lower = 0, Unit='m^3/h'); EQUATIONS "Mass balance" diff(V) = Fin - Fout; "Valve equation" Fout = k*sqrt(Level); "Tank volume" V = A*Level; end FlowSheet ThreeTank DEVICES Feed as Real (Brief="Feed Stream", Unit='m^3/h'); Tank1 as tank_simplified (Brief="First Tank"); Tank2 as tank_simplified (Brief="Second Tank"); Tank3 as tank_simplified (Brief="Third Tank"); CONNECTIONS Feed to Tank1.Fin; Tank1.Fout to Tank2.Fin; Tank2.Fout to Tank3.Fin; end