/[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 1766 - (hide 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 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 jpye 1766 Gb_expr:Gb = G - Gd;
43 johnpye 811
44 jpye 1766 E1 IS_A solver_var;
45     E1_expr:E1 = E + 1;
46    
47 johnpye 812 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 johnpye 813 E.ode_id := 1; E.ode_type := 1;
58     G.ode_id := 1; G.ode_type := 2;
59    
60     t.ode_type :=-1;
61 johnpye 812 FIX t;
62     END specify;
63    
64     METHOD values;
65     t := 0 {s};
66 johnpye 819 E := 0;
67 johnpye 812 END values;
68    
69 johnpye 811 END testtmy;

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