# source:trunk/sample/miscellaneous/sample_trigonometrics.mso@138

Last change on this file since 138 was 138, checked in by Argimiro Resende Secchi, 16 years ago

Adjust the measurement units of some examples.

File size: 2.1 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.
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 trigonometrics functions.
17*--------------------------------------------------------------------
18* Author: Gerson Balbueno Bicca
19* \$Id: trigonometrics.mso 83 2006-12-14 20:29:34Z bicca \$
20*--------------------------------------------------------------------*#
21using "types";
22
23#++++++++++++++++++++++++++++++++++++++++++++++++++++
24#
25#               EMSO sample file of trigonometric functions
26#
27#      -----------------------------
28#               Function    |  EMSO Built-In
29#      -----------------------------
30#               Sine            |       sin
31#               Cosine          |       cos
32#               Tangent         |       tan
33#               ArcSine         |       asin
34#               ArcCosine       |       acos
35#               ArcTangent      |       atan
36#
37#++++++++++++++++++++++++++++++++++++++++++++++++++++
38
39FlowSheet Trigonometric_Function
40
41        PARAMETERS
42
43        Pi              as constant  (Brief="Pi Number",Default=3.14159265);
44        Theta   as angle     (Brief ="theta angle");
45
46        VARIABLES
47
48        cosine  as Real  (Brief ="cosine function",Default=0.5);
49        sine    as Real  (Brief ="sine function",Default=0.5);
50        tangent as Real  (Brief ="tangent function",Default=0.5);
51
52        arccosine  as angle  (Brief ="arc cosine function",Default=0.5);
53        arcsine    as angle  (Brief ="arc sine function",Default=0.5);
54        arctangent as angle  (Brief ="arc tangent function",Default=0.5);
55
56        SET
57
58        Pi         = 3.14159265;
59        Theta  = 0.6*Pi*"rad";
60
61        EQUATIONS
62
63        sine    = sin(Theta);
64        cosine  = cos(Theta);
65        tangent = tan(Theta);
66
67        arccosine  = acos(cosine);
68        arcsine    = asin(sine);
69        arctangent = atan(tangent);
70
71        OPTIONS
72
73        mode = "steady";
74        relativeAccuracy = 1e-10;
75
76end
Note: See TracBrowser for help on using the repository browser.