source: mso/sample/miscellaneous/sample_pend.mso @ 30

Last change on this file since 30 was 30, checked in by Argimiro Resende Secchi, 16 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
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-2004  the author
6*----------------------------------------------------------------------
7* Author: Rafael de Pelegrini Soares
8* $Id: sample_pend.mso 30 2006-09-22 23:54:17Z arge $
9*----------------------------------------------------------------------
10*
11* EMSO sample file.
12*
13* FlowSheet with the Model for the index three pendulum
14* in Cartesian coordinates.
15*
16*--------------------------------------------------------------------*#
17
18using "types.mso";
19
20FlowSheet pend
21        PARAMETERS
22        g     as acceleration (Brief = "Gravity acceleration");
23        L     as length (Brief = "Pendulum cable length");
24       
25        VARIABLES
26        x   as length_delta(Brief="Position x");
27        y   as length_delta(Brief="Position y");
28        w   as velocity(Brief = "Velocity for x");
29        z   as velocity(Brief = "Velocity for y");
30        T   as Real(Brief = "Tension on cable",Default=10,Unit="1/s^2");
31       
32        EQUATIONS
33        "Velocity on x"
34        diff(x)=w;
35       
36        "Velocity on y"
37        diff(y)=z;
38       
39        "Tension on x"
40        diff(w)=T*x;
41       
42        "Tension on y"
43        diff(z)=T*y-g;
44       
45        "Position Constraint"
46        x^2+y^2=L^2;
47       
48        SET
49        g     = 9.8 * "m/s^2";
50        L     = 1 * "m";
51
52        INITIAL
53        "Initial Position x"
54        x = -1 * "m";
55
56        "Initial x Velocity"
57        w = 0 * "m/s";
58       
59        #"Initial Position y"  y = 0 * "m";
60        #"Initial y Velocity"  z = 0 * "m/s";
61
62        OPTIONS
63       
64        time = [0:0.1:30];
65        integration = "original"; # original, index0 or index1
66        accuracyType = "scalar"; # scalar or vector     
67        relativeAccuracy = 1e-8;
68        absoluteAccuracy = 1e-9;
69        indVarAccuracy = 1e-3;
70        LASolver = "dense"; # dense or sparse
71        DAESolver = "mebdf"; # mebdf, dasslc, dassl, or sundials
72end
Note: See TracBrowser for help on using the repository browser.