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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1353 - (hide annotations) (download) (as text)
Sun Mar 18 01:48:40 2007 UTC (13 years, 7 months ago) by jpye
File MIME type: text/x-ascend
File size: 1311 byte(s)
Removed some redundant #include statments.
Added some explanation of testtmy.a4c (although currently broken with IDA).

1 johnpye 813 REQUIRE "ivpsystem.a4l";
2 johnpye 811 REQUIRE "atoms.a4l";
3    
4 johnpye 813 IMPORT "johnpye/datareader/datareader";
5    
6 johnpye 812 MODEL drconf;
7     filename IS_A symbol_constant;
8     format IS_A symbol_constant;
9     format :== 'TMY2';
10     END drconf;
11    
12 johnpye 811 MODEL testtmy;
13     t IS_A time;
14 johnpye 812 G IS_A solver_var;
15     Gbn IS_A solver_var;
16 johnpye 819 Gd IS_A solver_var;
17     T IS_A solver_var;
18     v_wind IS_A solver_var;
19 johnpye 813 E IS_A solver_var; (* total radiation *)
20 johnpye 819 Gb IS_A solver_var;
21 johnpye 814
22 jpye 1353 (*
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 johnpye 812 tmydata IS_A drconf;
34 johnpye 842 tmydata.filename :== 'johnpye/datareader/23161.tm2';
35 johnpye 811
36     filereader:datareader(
37     t : INPUT;
38 johnpye 819 G, Gbn, Gd, T, v_wind : OUTPUT;
39 johnpye 812 tmydata : DATA
40 johnpye 811 );
41    
42 johnpye 819 Gb = G - Gd;
43 johnpye 811
44 johnpye 812 METHODS
45    
46     METHOD default_self;
47     END default_self;
48    
49     METHOD on_load;
50     RUN default_self; RUN specify; RUN values;
51     END on_load;
52    
53     METHOD specify;
54 johnpye 813 E.ode_id := 1; E.ode_type := 1;
55     G.ode_id := 1; G.ode_type := 2;
56    
57     t.ode_type :=-1;
58 johnpye 812 FIX t;
59     END specify;
60    
61     METHOD values;
62     t := 0 {s};
63 johnpye 819 E := 0;
64 johnpye 812 END values;
65    
66 johnpye 811 END testtmy;

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