source: trunk/sample/miscellaneous/sample_mathematicals.mso @ 394

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

Updated solver options for the new language

File size: 1.7 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 for some math functions.
17*--------------------------------------------------------------------
18* Author: Gerson Balbueno Bicca
19* $Id: Math_Function.mso 83 2006-12-14 20:29:34Z bicca $
20*--------------------------------------------------------------------*#
21using "types";
22 
23#++++++++++++++++++++++++++++++++++++++++++++++++++++
24#
25#               EMSO sample file of Mathematical functions
26#
27#      --------------------------------------------
28#               Function                |         EMSO Built-In
29#      --------------------------------------------
30#               exponential             |       exp
31#               Logarithmic             |       log 
32#               Natural Logarithmic |   ln
33#               Square root         |   sqrt
34#
35#++++++++++++++++++++++++++++++++++++++++++++++++++++
36
37FlowSheet Math_Function
38
39        VARIABLES
40       
41        exponential     as Real  (Brief ="exponential function");
42        log10                   as Real  (Brief ="log function");
43        NatLog                  as Real  (Brief ="Natural log function");
44        squareRoot      as Real  (Brief ="square root function");
45       
46        EQUATIONS
47       
48        exponential     = exp(time/'s');
49        log10                   = log(time/'s');
50        NatLog                  = ln(time/'s');
51        squareRoot      = sqrt(time/'s');
52
53        OPTIONS
54        TimeStart = 0.001;
55        TimeStep = 0.001;
56        TimeEnd = 1;
57end
Note: See TracBrowser for help on using the repository browser.