[90] | 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 trigonometrics functions. |
---|
| 17 | *-------------------------------------------------------------------- |
---|
| 18 | * Author: Gerson Balbueno Bicca |
---|
| 19 | * $Id: trigonometrics.mso 83 2006-12-14 20:29:34Z bicca $ |
---|
| 20 | *--------------------------------------------------------------------*# |
---|
| 21 | using "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 | |
---|
| 39 | FlowSheet 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 Real (Brief ="arc cosine function",Default=0.5); |
---|
| 53 | arcsine as Real (Brief ="arc sine function",Default=0.5); |
---|
| 54 | arctangent as Real (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 | |
---|
| 76 | end |
---|