5.50. WRFILE¶

Purpose
Write values to a file.
Mathematical description
None
Parameters
Parameter |
input |
unit |
range |
default |
remarks |
---|---|---|---|---|---|
CASE_O###.csv |
integer |
[-] |
[0,999] |
Number which gets appended to the casename |
|
Time unit |
ms/ s/ min/ hr |
||||
Output incr |
integer |
[-] |
Output written every ‘output incr’ time-steps to the file |
Remarks
The WRFILE component can be used to write results to a file, which can be read into a WANDA model or spreadsheet program at a later stage. The comment field of the WRFILE component will be used as a header in the output file.
The output file will be placed in the same directory as the Wanda case files. The name of the file will have the following format: <casename>_O###.csv. Where <casename> is the full name of the Wanda casefiles (without extension) and ### is the number entered in the component properties.
Examples
Figure 1 presents an example where the WRFILE component is used. The product of two different signals (a sine and a polynome) is written to a case related file with output number 48. The simulation time step is 1 s.

Fig. 5.50.1 Control scheme¶
The input of the WRFILE component is:
Name: W1
Comment: product sine*poly
CASE_O###.csv: 48
Time unit: s
Output incr: 5
The WRFILE component writes the result of the multiplication of the two input signals to a file named “MyCase_O048.csv”. This file can be opened with any text editor or spreadsheet.

Fig. 5.50.2 Input signals¶

Fig. 5.50.3 Input signals after multiplication¶
The created file “MyCase_048.csv” contains two columns: The first column specifies the time, while the second column specifies the values given to the WRFILE component. The complete contents of the file “MyCase_048.csv” is shown below:
# Time [s] |
product sine*poly |
0.0000000E+00 |
0.0000000E+00 |
5.000000 |
42.07355 |
10.00000 |
-280.6266 |
15.00000 |
-1131.633 |
20.00000 |
7825.173 |