Last change
on this file since 182 was
176,
checked in by Argimiro Resende Secchi, 16 years ago
|
Fix some new language syntax.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Rev | Line | |
---|
[83] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
[1] | 3 | * |
---|
[83] | 4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
| 5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
| 6 | * http://www.enq.ufrgs.br/alsoc. |
---|
| 7 | * |
---|
| 8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
| 9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
| 10 | * All rights reserved. |
---|
| 11 | * |
---|
| 12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
| 13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
| 14 | * |
---|
[1] | 15 | *---------------------------------------------------------------------- |
---|
| 16 | * Author: Rafael de Pelegrini Soares |
---|
| 17 | * Paula Bettio Staudt |
---|
| 18 | * $Id: sample_arrays.mso 176 2007-03-04 04:56:54Z arge $ |
---|
| 19 | *--------------------------------------------------------------------*# |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | Model Arrays |
---|
| 23 | PARAMETERS |
---|
| 24 | Dimension as Integer(Brief="Integer dimension", Default=3); |
---|
| 25 | Scalar as Real(Default=1); |
---|
| 26 | |
---|
| 27 | VARIABLES |
---|
| 28 | Var1(Dimension,Dimension) as Real(Default=1); |
---|
| 29 | Var2(Dimension,Dimension) as Real(Default=1); |
---|
| 30 | |
---|
| 31 | EQUATIONS |
---|
| 32 | for i in [1 : Dimension] |
---|
[176] | 33 | diff(Var1(1,i)) = Var2(1,i)/'s'; |
---|
[1] | 34 | end |
---|
| 35 | |
---|
[176] | 36 | diff(Var1(2:Dimension,:)) * 's' = Scalar*Var2(2:Dimension,:); |
---|
[1] | 37 | |
---|
[176] | 38 | exp(Scalar)*Var2 = sin(time * '180*grad/s'); |
---|
[1] | 39 | end |
---|
| 40 | |
---|
| 41 | FlowSheet SampleArrays |
---|
| 42 | DEVICES |
---|
| 43 | dev1 as Arrays; |
---|
| 44 | |
---|
| 45 | INITIAL |
---|
| 46 | dev1.Var1 = -1; |
---|
| 47 | |
---|
| 48 | OPTIONS |
---|
[125] | 49 | TimeStep = 0.1; |
---|
| 50 | TimeEnd = 3.1415; |
---|
[1] | 51 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.