/[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 2594 - (show annotations) (download) (as text)
Fri Apr 13 20:20:33 2012 UTC (10 years, 2 months ago) by jpye
File MIME type: text/x-ascend
File size: 784 byte(s)
Renaming sunpos.a4c to sunpos_db.a4c. 
Changing angle convention for NREL SPA to accord with DB & Grena.
Adding model to compare the three sunpos models.
Updating files depending on sunpos_db.a4c.
1 IMPORT "johnpye/grena/sunpos";
2
3 REQUIRE "atoms.a4l";
4
5 MODEL location_grena;
6 latitude IS_A angle_constant;
7 longitude IS_A angle_constant;
8 timezone IS_A time_constant;
9 END location_grena;
10
11 MODEL sunpos_grena;
12 loc IS_A location_grena;
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_grena_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_grena_test;

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