Last change
on this file since 4 was
1,
checked in by Rafael de Pelegrini Soares, 17 years ago
|
Initial import of the library
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
986 bytes
|
Line | |
---|
1 | #*--------------------------------------------------------------------- |
---|
2 | * This file is property of the author and cannot be used, copyed |
---|
3 | * or modified without permission. |
---|
4 | * |
---|
5 | * Copyright (C) 2002-2005 the author |
---|
6 | *---------------------------------------------------------------------- |
---|
7 | * Author: Rafael de Pelegrini Soares |
---|
8 | * Paula Bettio Staudt |
---|
9 | * $Id: sample_arrays.mso 1 2006-06-20 17:33:53Z rafael $ |
---|
10 | *--------------------------------------------------------------------*# |
---|
11 | |
---|
12 | |
---|
13 | Model Arrays |
---|
14 | PARAMETERS |
---|
15 | Dimension as Integer(Brief="Integer dimension", Default=3); |
---|
16 | Scalar as Real(Default=1); |
---|
17 | |
---|
18 | VARIABLES |
---|
19 | Var1(Dimension,Dimension) as Real(Default=1); |
---|
20 | Var2(Dimension,Dimension) as Real(Default=1); |
---|
21 | |
---|
22 | EQUATIONS |
---|
23 | for i in [1 : Dimension] |
---|
24 | diff(Var1(1,i)) = Var2(1,i)/"s"; |
---|
25 | end |
---|
26 | |
---|
27 | diff(Var1(2:Dimension,:)) * "s" = Scalar*Var2(2:Dimension,:); |
---|
28 | |
---|
29 | exp(Scalar)*Var2 = sin(time * "180*grad/s"); |
---|
30 | end |
---|
31 | |
---|
32 | FlowSheet SampleArrays |
---|
33 | |
---|
34 | DEVICES |
---|
35 | dev1 as Arrays; |
---|
36 | |
---|
37 | INITIAL |
---|
38 | dev1.Var1 = -1; |
---|
39 | |
---|
40 | OPTIONS |
---|
41 | time = [0:0.1:2*3.1415]; |
---|
42 | outputLevel = "high"; |
---|
43 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.