/[ascend]/trunk/models/johnpye/grena/sunpos_test.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/grena/sunpos_test.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2499 - (show annotations) (download) (as text)
Wed Aug 31 07:18:03 2011 UTC (10 years, 10 months ago) by jpye
File MIME type: text/x-ascend
File size: 754 byte(s)
Grena sunpos model not with fixed location.
1 IMPORT "johnpye/grena/sunpos";
2
3 REQUIRE "atoms.a4l";
4
5 MODEL location;
6 latitude IS_A angle_constant;
7 longitude IS_A angle_constant;
8 timezone IS_A time_constant;
9 END location;
10
11 MODEL sunpos_grena;
12 loc IS_A location;
13
14 p IS_A pressure;
15 T IS_A temperature;
16 zenith, azimuth IS_A angle;
17 t_UTC IS_A time;
18 t IS_A time;
19 t = t_UTC + loc.timezone;
20
21 solar: sunpos(
22 t_UTC, p, T : INPUT;
23 zenith, azimuth : OUTPUT;
24 loc : DATA
25 );
26
27 altitude IS_A angle;
28 altitude = 0.5{PI} - zenith;
29
30 END sunpos_grena;
31
32
33 MODEL sunpos_test REFINES sunpos_grena;
34 loc.latitude :== -35 {deg};
35 loc.longitude :== 149 {deg};
36 loc.timezone :== 10 {h};
37 METHODS
38 METHOD on_load;
39 FIX p, T, t;
40 p := 1 {atm};
41 T := 20 {K} + 273.15 {K};
42 t := 5 {d};
43 END on_load;
44 END sunpos_test;

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