/[ascend]/trunk/models/solar/test_sunpos.a4c
ViewVC logotype

Annotation of /trunk/models/solar/test_sunpos.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2594 - (hide annotations) (download) (as text)
Fri Apr 13 20:20:33 2012 UTC (7 years, 7 months ago) by jpye
File MIME type: text/x-ascend
File size: 690 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 jpye 2573 REQUIRE "atoms.a4l";
2    
3 jpye 2594 REQUIRE "johnpye/sunpos_db.a4c";
4 jpye 2573
5    
6 jpye 2594 MODEL example REFINES sunpos_db;
7 jpye 2573
8     beta = 1.0* theta_z;
9    
10     METHODS
11    
12     METHOD specify;
13     FIX L_st, L_loc, phi; (* time and location *)
14     FIX gamma; (* surface orientation *)
15     FIX t_solar;
16     END specify;
17    
18     METHOD values;
19     (*RUN sunpos::values;*)
20    
21     t_solar := 43{d} + 15{h} + 30{min};
22    
23     gamma := 90 {deg};
24    
25    
26     L_st := -90{deg}; (* USA Central time*)
27     L_loc := -89.4{deg};
28     phi := +43{deg};
29     END values;
30    
31     METHOD self_test;
32     ASSERT abs(theta-35.0{deg}) < 0.15{deg};
33     ASSERT abs(delta-(-13.80{deg})) < 0.02{deg};
34     END self_test;
35    
36     METHOD onload;
37     RUN specify;
38     RUN values;
39     END onload;
40    
41     END example;

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