1 |
REQUIRE "atoms.a4l"; |
2 |
REQUIRE "solar/solar_types.a4l"; |
3 |
REQUIRE "johnpye/thermo_types.a4c"; |
4 |
REQUIRE "johnpye/sunpos.a4c"; |
5 |
|
6 |
|
7 |
MODEL sunpos_wrapper REFINES sunpos; |
8 |
|
9 |
METHODS |
10 |
METHOD specify; |
11 |
FIX t, L_st, L_loc, phi; (* time and location *) |
12 |
FIX beta, gamma; (* surface orientation *) |
13 |
END specify; |
14 |
|
15 |
END sunpos_wrapper; |
16 |
|
17 |
MODEL sunpos_tracker_type1; |
18 |
(* The collector is rotated about a horizontal east-west axis with single daily adjustment such that the solar beam is normal to the collector aperture plane at solar noon *) |
19 |
|
20 |
sp IS_A sunpos_wrapper; |
21 |
|
22 |
cos(sp.beta) * cos(sp.phi - sp.delta) + cos(sp.gamma) * sin(sp.beta) * sin(sp.phi - sp.delta) = 1; |
23 |
|
24 |
METHODS |
25 |
METHOD specify; |
26 |
RUN sp.specify; |
27 |
FREE sp.beta; |
28 |
END specify; |
29 |
|
30 |
METHOD bound_self; |
31 |
sp.beta.lower_bound := -90 {deg}; |
32 |
sp.beta.upper_bound := 90 {deg}; |
33 |
END bound_self; |
34 |
|
35 |
|
36 |
METHOD values; |
37 |
sp.L_st := -90{deg}; (* USA Central time*) |
38 |
sp.L_loc := -89.4{deg}; |
39 |
sp.phi := +43{deg}; (* t := 32.4375 {d}; *) |
40 |
sp.t := 32{d} + 10{h}+30{min}; |
41 |
|
42 |
(* surface orientation *) |
43 |
sp.gamma := 15{deg}; |
44 |
|
45 |
(* Assumption *) |
46 |
sp.beta := 45{deg}; |
47 |
END values; |
48 |
|
49 |
METHOD on_load; |
50 |
RUN specify; |
51 |
RUN bound_self; |
52 |
RUN values; |
53 |
END on_load; |
54 |
|
55 |
END sunpos_tracker_type1; |
56 |
|
57 |
|
58 |
|
59 |
|
60 |
MODEL sunpos_tracker_type2 REFINES sunpos; |
61 |
(* The collector is rotated about a horizontal east-west axis with single daily adjustment such that the solar beam is normal to the collector aperture plane at solar noon *) |
62 |
|
63 |
cos(beta) * cos(phi - delta) + cos(gamma) * sin(beta) * sin(phi - delta) = 1; |
64 |
|
65 |
METHODS |
66 |
METHOD specify; |
67 |
FIX t, L_st, L_loc, phi; (* time and location *) |
68 |
FIX beta, gamma; (* surface orientation *) |
69 |
|
70 |
FREE beta; |
71 |
END specify; |
72 |
|
73 |
METHOD bound_self; |
74 |
beta.lower_bound := 0 {deg}; |
75 |
beta.upper_bound := 90 {deg}; |
76 |
END bound_self; |
77 |
|
78 |
METHOD values; |
79 |
L_st := -90{deg}; (* USA Central time*) |
80 |
L_loc := -89.4{deg}; |
81 |
phi := +43{deg}; (* t := 32.4375 {d}; *) |
82 |
t := 32{d} + 10{h}+30{min}; |
83 |
|
84 |
(* surface orientation *) |
85 |
gamma := 15{deg}; |
86 |
|
87 |
(* Assumption *) |
88 |
beta := 45{deg}; |
89 |
END values; |
90 |
|
91 |
METHOD on_load; |
92 |
RUN specify; |
93 |
RUN bound_self; |
94 |
RUN values; |
95 |
END on_load; |
96 |
END sunpos_tracker_type2; |