#*--------------------------------------------------------------------- * This file is property of the author and cannot be used, copyed * or modified without permission. * * Copyright (C) 2004 the author *---------------------------------------------------------------------- * File name: eml_template.mso * Author: Rafael de Pelegrini Soares * $Id: tanksmodel.mso 1 2006-06-20 17:33:53Z rafael $ *--------------------------------------------------------------------*# using "types"; Model tank PARAMETERS A as area (Brief="Tank area", Default=2); VARIABLES k as Real (Brief="Valve Constant", Unit = "m^2.5/h", Default=4); h as length(Brief="Tank level"); Fin as flow_vol(Brief="Input flow"); out Fout as flow_vol(Brief="Output flow"); EQUATIONS "Mass balance" diff(A*h) = Fin - Fout; "Valve equation" Fout = k*sqrt(h); end