Last change
on this file since 78 was
14,
checked in by Rafael de Pelegrini Soares, 17 years ago
|
Updated the model templates
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Rev | Line | |
---|
[1] | 1 | #* |
---|
[14] | 2 | * EMSO template file for new models. |
---|
| 3 | * |
---|
| 4 | * The user should edit the contents of this file in order |
---|
| 5 | * to develop a new model. |
---|
| 6 | * |
---|
| 7 | * $Id: model.mso 14 2006-08-26 20:15:39Z rafael $ |
---|
| 8 | *# |
---|
[1] | 9 | |
---|
| 10 | |
---|
| 11 | #* |
---|
[14] | 12 | * The using command makes available entities declared in another files. |
---|
| 13 | * |
---|
| 14 | * With this command the user can make use of the EML types |
---|
| 15 | *# |
---|
[1] | 16 | using "types"; |
---|
| 17 | |
---|
[14] | 18 | #* |
---|
| 19 | * A new model is declared with the Model keyword and a name. |
---|
| 20 | * A model can have several sections presented above: |
---|
| 21 | *# |
---|
[1] | 22 | Model CustomModel |
---|
| 23 | |
---|
[14] | 24 | #* |
---|
| 25 | * In the PARAMETERS section we can define the constants of the |
---|
| 26 | * model. |
---|
| 27 | * A parameter will never be the result of the simulation its value |
---|
| 28 | * need to be specified by the user. |
---|
| 29 | *# |
---|
[1] | 30 | PARAMETERS |
---|
[14] | 31 | V as volume(Brief="The model volume"); |
---|
| 32 | A as area(Brief="Cross section area"); |
---|
| 33 | |
---|
[1] | 34 | #* |
---|
[14] | 35 | * In the VARIABLE section we declare the variables of the model. |
---|
| 36 | * The values of the variables will be calculated by the system |
---|
| 37 | * in order to respect the model equations. |
---|
| 38 | *# |
---|
[1] | 39 | VARIABLES |
---|
[14] | 40 | h as length(Brief="The level"); |
---|
| 41 | |
---|
[1] | 42 | #* |
---|
[14] | 43 | * In the EQUATIONS section we declare equality expressions involving |
---|
| 44 | * the any previously declared parameter or variable. |
---|
| 45 | * The equations will be used to determine the value of the variables. |
---|
| 46 | *# |
---|
| 47 | EQUATIONS |
---|
| 48 | A * h = V; |
---|
[1] | 49 | |
---|
| 50 | #* |
---|
[14] | 51 | * Additionally, in the case of dynamic models we can declare initial |
---|
| 52 | * conditions exactly as in the EQUATIONS section. |
---|
| 53 | * Equations declared on the INITIAL section will be used to determine |
---|
| 54 | * the initial condition of dynamic models. |
---|
| 55 | *# |
---|
[1] | 56 | INITIAL |
---|
| 57 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.