source: mso/sample/controllers/tanksmodel.mso @ 1

Last change on this file since 1 was 1, checked in by Rafael de Pelegrini Soares, 16 years ago

Initial import of the library

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 808 bytes
RevLine 
[1]1#*---------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2004  the author
6*----------------------------------------------------------------------
7* File name: eml_template.mso
8* Author: Rafael de Pelegrini Soares
9* $Id: tanksmodel.mso 1 2006-06-20 17:33:53Z rafael $
10*--------------------------------------------------------------------*#
11
12using "types";
13
14Model tank
15        PARAMETERS
16        A as area (Brief="Tank area", Default=2);
17
18        VARIABLES
19        k    as Real (Brief="Valve Constant", Unit = "m^2.5/h", Default=4);
20    h    as length(Brief="Tank level");
21        Fin  as flow_vol(Brief="Input flow");
22out     Fout as flow_vol(Brief="Output flow");
23
24        EQUATIONS
25        "Mass balance"
26        diff(A*h) = Fin - Fout;
27       
28        "Valve equation"
29        Fout = k*sqrt(h);               
30end
Note: See TracBrowser for help on using the repository browser.