/[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 1766 - (show annotations) (download) (as text)
Mon Apr 7 09:06:56 2008 UTC (12 years, 6 months ago) by jpye
File MIME type: text/x-ascend
File size: 1363 byte(s)
Fixed heading numbers in book.pdf, some tinkering to expose bug in IDA when there are derivs with out undiff vars.
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 END drconf;
11
12 MODEL testtmy;
13 t IS_A time;
14 G IS_A solver_var;
15 Gbn IS_A solver_var;
16 Gd IS_A solver_var;
17 T IS_A solver_var;
18 v_wind IS_A solver_var;
19 E IS_A solver_var; (* total radiation *)
20 Gb IS_A solver_var;
21
22 (*
23 You will need to download the following TMY (.tm2) file
24 which corresponds to a 'typical meteorological year' in
25 Daggett, California, site of the world's largest
26 solar thermal power station, which has been generating
27 354 MW electrical since the 1980s.
28
29 This file must me unzipped -- use 'gzip' on linux or '7-zip' on windows.
30
31 http://rredc.nrel.gov/solar/old_data/nsrdb/tmy2/unix/23161.tm2.Z
32 *)
33 tmydata IS_A drconf;
34 tmydata.filename :== 'johnpye/datareader/23161.tm2';
35
36 filereader:datareader(
37 t : INPUT;
38 G, Gbn, Gd, T, v_wind : OUTPUT;
39 tmydata : DATA
40 );
41
42 Gb_expr:Gb = G - Gd;
43
44 E1 IS_A solver_var;
45 E1_expr:E1 = E + 1;
46
47 METHODS
48
49 METHOD default_self;
50 END default_self;
51
52 METHOD on_load;
53 RUN default_self; RUN specify; RUN values;
54 END on_load;
55
56 METHOD specify;
57 E.ode_id := 1; E.ode_type := 1;
58 G.ode_id := 1; G.ode_type := 2;
59
60 t.ode_type :=-1;
61 FIX t;
62 END specify;
63
64 METHOD values;
65 t := 0 {s};
66 E := 0;
67 END values;
68
69 END testtmy;

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