#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * Sample file for trigonometrics functions. *-------------------------------------------------------------------- * Author: Gerson Balbueno Bicca * $Id: trigonometrics.mso 83 2006-12-14 20:29:34Z bicca $ *--------------------------------------------------------------------*# using "types"; #++++++++++++++++++++++++++++++++++++++++++++++++++++ # # EMSO sample file of trigonometric functions # # ----------------------------- # Function | EMSO Built-In # ----------------------------- # Sine | sin # Cosine | cos # Tangent | tan # ArcSine | asin # ArcCosine | acos # ArcTangent | atan # #++++++++++++++++++++++++++++++++++++++++++++++++++++ FlowSheet Trigonometric_Function PARAMETERS Pi as constant (Brief="Pi Number",Default=3.14159265); Theta as angle (Brief ="theta angle"); VARIABLES cosine as Real (Brief ="cosine function",Default=0.5); sine as Real (Brief ="sine function",Default=0.5); tangent as Real (Brief ="tangent function",Default=0.5); arccosine as Real (Brief ="arc cosine function",Default=0.5); arcsine as Real (Brief ="arc sine function",Default=0.5); arctangent as Real (Brief ="arc tangent function",Default=0.5); SET Pi = 3.14159265; Theta = 0.6*Pi*'rad'; EQUATIONS sine = sin(Theta); cosine = cos(Theta); tangent = tan(Theta); arccosine = acos(cosine); arcsine = asin(sine); arctangent = atan(tangent); OPTIONS Dynamic = false; NLASolver( RelativeAccuracy = 1e-10 ); end