/[ascend]/trunk/models/johnpye/datareader/testtmy.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/datareader/testtmy.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2071 - (show annotations) (download) (as text)
Fri Aug 28 02:42:47 2009 UTC (11 years, 2 months ago) by jose
File MIME type: text/x-ascend
File size: 1589 byte(s)
MERGE Jose's branch [2274]:[2584] into trunk
1 REQUIRE "ivpsystem.a4l";
2 REQUIRE "atoms.a4l";
3
4 IMPORT "johnpye/datareader/datareader";
5
6 MODEL drconf;
7 filename IS_A symbol_constant;
8 format IS_A symbol_constant;
9 format :== 'TMY2';
10 parameters IS_A symbol_constant;
11 parameters :== '2:linear,2:cubic,2:default';
12 END drconf;
13
14 MODEL testtmy;
15 t IS_A time;
16 G IS_A solver_var;
17 Gbnl,Gbnc,Gbns IS_A solver_var;
18 Gd IS_A solver_var;
19 T IS_A temperature;
20 v_wind IS_A solver_var;
21 E IS_A solver_var; (* total radiation *)
22 Gb IS_A solver_var;
23
24 (*
25 You will need to download the following TMY (.tm2) file
26 which corresponds to a 'typical meteorological year' in
27 Daggett, California, site of the world's largest
28 solar thermal power station, which has been generating
29 354 MW electrical since the 1980s.
30
31 This file must me unzipped -- use 'gzip' on linux or '7-zip' on windows.
32
33 http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z
34 *)
35 tmydata IS_A drconf;
36 tmydata.filename :== 'johnpye/datareader/23161.tm2';
37
38 filereader:datareader(
39 t : INPUT;
40 (*G,Gbn,Gd,T,v_wind: OUTPUT;*)
41 Gbnl,Gbnc,Gbns :OUTPUT;
42 tmydata : DATA
43 );
44
45 Gb_expr:Gb = G - Gd;
46
47 E1 IS_A solver_var;
48 E1_expr:E1 = E + 1;
49
50 METHODS
51 (*
52 METHOD default_self;
53 END default_self;
54 *)
55 METHOD on_load;
56 RUN default_self; RUN specify; RUN values;
57 RUN ode_init;
58 END on_load;
59
60 METHOD ode_init;
61 E.ode_id := 1; E.ode_type := 1;
62 G.ode_id := 1; G.ode_type := 2;
63
64 Gbnl.obs_id := 1;
65 Gbnc.obs_id := 2;
66 Gbns.obs_id := 3;
67
68 t.ode_type :=-1;
69 END ode_init;
70
71 METHOD specify;
72 FIX t;
73 END specify;
74
75 METHOD values;
76 t := 8 {h};
77 E := 0;
78 END values;
79
80 END testtmy;

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