/[ascend]/trunk/models/testTrig.a4c
ViewVC logotype

Contents of /trunk/models/testTrig.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 908 - (show annotations) (download) (as text)
Thu Oct 26 10:18:53 2006 UTC (17 years, 7 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2597 byte(s)
first attempt at merging with Ben's changes on the trunk
1 REQUIRE "atoms.a4l";
2
3 MODEL testTrig;
4 (* dependent variables *)
5 yArccosh,yArcsinh,yArctanh,
6 yCos,yCosh,
7 yExp,yLn,yLnm,
8 ySin,ySinh,
9 yTan,yTanh IS_A factor;
10
11 yArcsin,yArccos,
12 yArctan IS_A angle;
13
14 (* fixed variables *)
15 xArccos,xArccosh,
16 xArcsin,xArcsinh,
17 xArctan,xArctanh,
18 xCosh,
19 xExp,xLn,xLnm,
20 xSinh,
21 xTanh IS_A factor;
22
23 xCos,xSin,
24 xTan IS_A angle;
25
26 (* equations *)
27 arccosEqn: yArccos = arccos(xArccos);
28 arccoshEqn: yArccosh = arccosh(xArccosh);
29 arcsinEqn: yArcsin = arcsin(xArcsin);
30 arcsinhEqn: yArcsinh = arcsinh(xArcsinh);
31 arctanEqn: yArctan = arctan(xArctan);
32 arctanhEqn: yArctanh = arctanh(xArctanh);
33 cosEqn: yCos = cos(xCos);
34 coshEqn: yCosh = cosh(xCosh);
35 expEqn: yExp = exp(xExp);
36 lnEqn: yLn = ln(xLn);
37 lnmEqn: yLnm = lnm(xLnm);
38 sinEqn: ySin = sin(xSin);
39 sinhEqn: ySinh = sinh(xSinh);
40 tanEqn: yTan = tan(xTan);
41 tanhEqn: yTanh = tanh(xTanh);
42
43 METHODS
44
45 METHOD default_self;
46 END default_self;
47
48 METHOD specify;
49 FIX xExp,xLn;
50 FIX xSin,xCos,xTan;
51 FIX xArcsin,xArccos,xArctan;
52 FIX xSinh,xCosh,xTanh;
53 FIX xArccosh,xArcsinh,xArctanh;
54 FIX xLnm;
55 END specify;
56
57 METHOD values;
58 xArccos := 0.10; (* magnitude must not exceed 1.0 *)
59 xArccosh := 2.0; (* value must be 1.0 or greater *)
60 xArcsin := 0.11; (* magnitude must not exceed 1.0 *)
61 xArcsinh := 2.1;
62 xArctan := 2.2;
63 xArctanh := 0.12; (* magnitude must not exceed 1.0 *)
64 xCos := 0.13 {radian};
65 xCosh := 0.14;
66 xExp := 0.15;
67 xLn := 0.16; (* value must be greater than 0 *)
68 xLnm := 0.16;
69 xSin := 0.17 {radian};
70 xSinh := 0.18;
71 xTan := 0.19 {radian};
72 xTanh := 0.2;
73 END values;
74
75
76 (* set up to recover original x values. Note mapping
77 after solving. *)
78
79 METHOD valuesRecover;
80 xArccos := yCos; (* yArccos becomes xCos orig value *)
81 xArccosh := yCosh; (* yArccosh becomes xCosh orig value *)
82 xArcsin := ySin; (* etc *)
83 xArcsinh := ySinh;
84 xArctan := yTan;
85 xArctanh := yTanh;
86 xCos := yArccos;
87 xCosh := yArccosh;
88 xExp := yLn;
89 xLn := yExp;
90 xLnm := yExp;
91 xSin := yArcsin;
92 xSinh := yArcsinh;
93 xTan := yArctan;
94 xTanh := yArctanh;
95 END valuesRecover;
96
97 END testTrig;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22