source: branches/gui/sample/electrical/sample_electrical.mso @ 841

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

Adapted the electrical sample for the new language

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
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*
15*--------------------------------------------------------------------
16* Sample file RC electrical circuit.
17*--------------------------------------------------------------------
18* Author: Paula Bettio Staudt and Rafael de Pelegrini Soares
19* $Id: sample_electrical.mso 195 2007-03-07 20:30:12Z rafael $
20*-------------------------------------------------------------------*#
21
22using "electrical/electrical";
23
24FlowSheet RCCircuit
25        DEVICES
26        V as Supply;
27        R as Resistor;
28        C as Capacitor;
29
30        CONNECTIONS
31        V.outlet to R.inlet;
32        R.outlet to C.inlet;
33        C.outlet to V.inlet;
34
35        SET
36        V.V = 1.5 * 'V';
37        R.R = 500 * 'ohm';
38        C.C = 5e-6 * 'F';
39       
40        INITIAL
41        C.q = 0 * 'C';
42       
43        OPTIONS
44        TimeStep = 0.001;
45        TimeEnd = 0.01;
46end
Note: See TracBrowser for help on using the repository browser.