Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • toolbox/WindEnergyToolbox
  • tlbl/WindEnergyToolbox
  • cpav/WindEnergyToolbox
  • frza/WindEnergyToolbox
  • borg/WindEnergyToolbox
  • mmpe/WindEnergyToolbox
  • ozgo/WindEnergyToolbox
  • dave/WindEnergyToolbox
  • mmir/WindEnergyToolbox
  • wluo/WindEnergyToolbox
  • welad/WindEnergyToolbox
  • chpav/WindEnergyToolbox
  • rink/WindEnergyToolbox
  • shfe/WindEnergyToolbox
  • shfe1/WindEnergyToolbox
  • acdi/WindEnergyToolbox
  • angl/WindEnergyToolbox
  • wliang/WindEnergyToolbox
  • mimc/WindEnergyToolbox
  • wtlib/WindEnergyToolbox
  • cmos/WindEnergyToolbox
  • fabpi/WindEnergyToolbox
22 results
Show changes
Showing
with 373 additions and 0 deletions
# Tutorial 3: Creating htc and PBS files
The Wind Energy Toolbox has a workflow for automatically running design load
bases (DLBs) on Gorm.
This workflow has the following steps:
1. [Create a master Excel sheet defining each case in the DLB](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/blob/master/docs/tutorials/1-creating-master-excel.md)
2. [Create subordinate Excel sheets from each tab in the master Excel sheet](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/blob/master/docs/tutorials/2-creating-subordinate-excels.md)
3. Create htc files and PBS job scripts for each requisite simulation using
the subordinate Excel files and a master htc file.
4. Submit all PBS job scripts to the cluster
5. Post-process results
6. Visualize results
This tutorial presents how to accomplish Step 3.
Note that it is possible to customize your simulations by skipping/modifying
steps.
Such a procedure will be discussed in a later tutorial.
If there are any problems with this tutorial, please [submit an issue](
https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues).
## 1. Background: htc and PBS file creation
The main function used in this tutorial is [dlctemplate.py](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/blob/master/wetb/prepost/dlctemplate.py),
which creates all htc and PBS job scripts for the cases specified in the
subordinate Excel file folder.
The htc files are the main input files for HAWC2 simulations.
They are created by copying the master htc file in the ```_master/``` folder in
your htc directory and replacing all of the tags with the values specified in
the subordinate Excel files.
All of htc files for a single case are saved in a case-specific folder in your
htc folder.
Thus, if you were running a standard DLB calculation for IEC 61400-1, your
folder structure after generating your htc files might look like this:
```
|-- $TURB_NAME/
| |-- $SET_ID/
| | |-- DLCs.xlsx
| | |-- _master/
| | | |-- $MASTER_NAME.htc
| | |-- DLCs/
| | |-- htc/
| | | |-- dlc12_iec61400-1ed3/
| | | | |-- dlc12_wsp04_wdir000_s2001.htc
| | | | |-- dlc12_wsp04_wdir000_s2002.htc
| | | | |-- ...
| | | |-- dlc13_iec61400-1ed3/
| | | |-- ...
```
The PBS job scripts are a series of text files that are used to tell the job
scheduler on the high-performance computing (HPC) cluster how to run each job.
These files end with ".p", and are saved to a folder ```pbs_in/``` that is
created in the main set ID folder on Gorm.
## 2. Tutorial
There are two ways to call ```dlctemplate.py```.
The first is to call the function directly.
The second is to wrap it in a job scheduler to submit the job to the HPC cluster.
The first option is fine if you have only a few htc files or if the job
scheduler is not working for some reason.
The second option is generally preferred.
### 2.1 Directly generate htc files
The htc and PBS files can be directly generated by running the following
commands from the set ID directory:
```
export PATH=/home/python/miniconda3/bin:$PATH
source activate py36-wetb
python /home/MET/repositories/toolbox/WindEnergyToolbox/wetb/prepost/dlctemplate.py --prep
source deactivate
```
The ```export PATH``` command adds the miniconda bin directory to the path,
which is necessary for the toolbox.
The ```source activate py36-wetb``` and ```source deactivate``` are
Gorm-specific commands to activate the Wind Energy Toolbox Python environment.
The ```--prep``` option tells the script to run in preparation mode, in which
case it creates the htc and pbs files.
After running the commands in the above box on Gorm, you should have all of your
PBS input files in ```pbs_in/``` and all of your htc files in ```htc```.
### 2.2 Generate files using job scheduler
From the set ID folder, run the following code:
```
qsub-wrap.py -f /home/MET/repositories/toolbox/WindEnergyToolbox/wetb/prepost/dlctemplate.py --prep
```
## 3. Issues
If there are any problems with this tutorial, please [submit an issue](
https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/issues).
We will try to fix it as soon as possible.
C F V V V F
[Case folder] [Case id.] [wdir] [seed] [wsp] [TI]
DLC12_IEC61400-1Ed3 """DLC12_wsp[wsp]_wdir[wdir]_s[seed]""" 0 6 4 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]"
350 6
10 8
10
12
14
16
18
20
22
24
26
C F V V V F
[Case folder] [Case id.] [wdir] [seed] [wsp] [TI]
DLC13_IEC61400-1Ed3 """DLC13_wsp[wsp]_wdir[wdir]_s[seed]""" 0 6 4 "2*[ref_ti]*(0,072*(0,2*[ref_wind_speed]/2+3)*([wsp]/2-4)+10)/[wsp]"
350 6
10 8
10
12
14
16
18
20
22
24
26
C C F V V C C F C C C C F C
[sim_time] [Case folder] [Case id.] [wdir] [wsp] [seed] [turb_format] [TI] [gust] [gust_type] [G_A] [G_t0] [G_phi0] [G_T]
100 DLC14_IEC61400-1Ed3 """DLC14_wsp[wsp]_wdir[wdir]_s[seed]""" 0 10 1 0 "2*[ref_ti]*(0,072*(0,2*[ref_wind_speed]/2+3)*([wsp]/2-4)+10)/[wsp]" ecd 15 110 720/[wsp] 10
12
14
F C F V V V C C F C C F C C
[sim_time] [Case folder] [Case id.] [wdir] [G_phi0] [wsp] [seed] [turb_format] [TI] [gust] [gust_type] [G_A] [G_T] [G_t0]
100 DLC15_IEC61400-1Ed3 """DLC15_wsp[wsp]_wdir[wdir]_s[seed]_phi[G_phi0]""" 0 0 4 1 0 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" ews "(2,5+0,2*6,4*[TI]*[wsp]*([diameter]/[long_scale_param])**0,25)/[diameter]" 12 110
90 6
180 8
270 10
12
14
16
18
20
22
24
26
F C F V V V F C
[sim_time] [Case folder] [Case id.] [wdir] [seed] [wsp] [TI] [Grid loss time]
100 DLC21_IEC61400-1Ed3 """DLC21_wsp[wsp]_wdir[wdir]_s[seed]""" 0 4 4 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" 110
350 6
10 8
10
12
14
16
18
20
22
24
26
C F V V V F C C
[Case folder] [Case id.] [wdir] [seed] [wsp] [TI] [Pitch 1 DLC22b] [Time stuck DLC22b]
DLC22b_IEC61400-1Ed3 """DLC22b_wsp[wsp]_wdir[wdir]_s[seed]""" 0 12 4 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" 0 0.1
6
8
10
12
14
16
18
20
22
24
26
C F V V V F C
[Case folder] [Case id.] [wdir] [seed] [wsp] [TI] [dis_setbeta]
DLC22y_IEC61400-1Ed3 """DLC22y_wsp[wsp]_wdir[wdir]_s[seed]""" 15 1 4 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" ;
30 6
45 8
60 10
75 12
90 14
105 16
120 18
135 20
150 22
165 24
180 26
195
210
225
240
255
270
285
300
315
330
345
F C F V V C C F C C F C C C F
[sim_time] [Case folder] [Case id.] [wsp] [Grid loss time] [seed] [turb_format] [TI] [gust] [gust_type] [G_A] [G_phi0] [G_T] [G_t0] [grid_gust_delay]
100 DLC23_IEC61400-1Ed3 """DLC23_wsp[wsp]_wdir[wdir]_s[seed]_tgl[grid_gust_delay]""" 10 122.5 1 0 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" eog "min([1,35*(0,8*1,4*[ref_wind_speed]-[wsp]);3,3*[TI]*[wsp]/(1+0,1*[diameter]/[long_scale_param])])" 0 10.5 120 ([Grid loss time]-[G_t0])*10
14 124
26 125.25
C F V V V C F
[Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI]
DLC24_IEC61400-1Ed3 """DLC24_wsp[wsp]_wdir[wdir]_s[seed]""" 340 3 4 1 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]"
20 6
8
10
12
14
16
18
20
22
24
26
F C F V C C C C
[sim_time] [Case folder] [Case id.] [wsp] [seed] [turb_format] [TI] [cutin_t0]
250 DLC31_IEC61400-1Ed3 """DLC31_wsp[wsp]_wdir[wdir]_s[seed]""" 4 1 0 0.0000 110
12
25
F C F V C C F C C F C F C V F
[sim_time] [Case folder] [Case id.] [wsp] [seed] [turb_format] [TI] [gust] [gust_type] [G_A] [G_phi0] [G_t0] [G_T] [cutin_t0] [grid_gust_delay]
200 DLC32_IEC61400-1Ed3 """DLC32_wsp[wsp]_wdir[wdir]_s[seed]_tci[grid_gust_delay]""" 4 1 0 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" eog "min([1,35*(0,8*1,4*[ref_wind_speed]-[wsp]);3,3*[TI]*[wsp]/(1+0,1*[diameter]/[long_scale_param])])" 0 [wsp]/(0.01813228 *[wsp] - 0.04811716) 10.5 50.1 ([cutin_t0]-[G_t0])*10
10 52.5
14 54
26 55.25
F C F V C C C C
[sim_time] [Case folder] [Case id.] [wsp] [seed] [turb_format] [TI] [Cut-out time]
100 DLC41_IEC61400-1Ed3 """DLC41_wsp[wsp]_wdir[wdir]_s[seed]""" 4 1 0 0 110
12
26
F C F V C C F C C F C C C V F
[sim_time] [Case folder] [Case id.] [wsp] [seed] [turb_format] [TI] [gust] [gust_type] [G_A] [G_phi0] [G_t0] [G_T] [Cut-out time] [grid_gust_delay]
100 DLC42_IEC61400-1Ed3 """DLC42_wsp[wsp]_wdir[wdir]_s[seed]_tco[grid_gust_delay]""" 10 1 0 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" eog "min([1,35*(0,8*1,4*[ref_wind_speed]-[wsp]);3,3*[TI]*[wsp]/(1+0,1*[diameter]/[long_scale_param])])" 0 120 10.5 120.1 ([Cut-out time]-[G_t0])
14 122.5
26 124
125
128
130
F C F V V V C F C C
[sim_time] [Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI] [Cut-out time] [Stop type]
100 DLC51_IEC61400-1Ed3 """DLC51_wsp[wsp]_wdir[wdir]_s[seed]""" 0 12 10 1 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" 110 2
12
14
C F V V V C C C C C
[Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI] [shear_exp] [cutin_t0] [Induction]
DLC61_IEC61400-1Ed3 """DLC61_wsp[wsp]_wdir[wdir]_s[seed]""" 352 6 50 1 0.1100 0.11 1000 0
8
C F V V V C C C C C C
[Case folder] [Case id.] [wsp] [wdir] [seed] [turb_format] [TI] [shear_exp] [cutin_t0] [Induction] [dis_setbeta]
DLC62_IEC61400-1Ed3 """DLC62_wsp[wsp]_wdir[wdir]_s[seed]""" 50 0 1 1 0.1100 0.11 1000 0 ;
15
30
45
60
75
90
105
120
135
150
165
180
195
210
225
240
255
270
285
300
315
330
345
C F V V V C C C C C
[Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI] [shear_exp] [cutin_t0] [Induction]
DLC63_IEC61400-1Ed3 """DLC63_wsp[wsp]_wdir[wdir]_s[seed]""" 340 6 40 1 0.1100 0.11 1000 0
20
C F V V V C F C C
[Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI] [cutin_t0] [Induction]
DLC64_IEC61400-1Ed3 """DLC64_wsp[wsp]_wdir[wdir]_s[seed]""" 352 6 4 1 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" 1000 0
8 6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
C F V V V C F C C C C C
[Case folder] [Case id.] [wdir] [seed] [wsp] [turb_format] [TI] [cutin_t0] [Induction] [Rotor azimuth] [Free shaft rot] [Rotor locked]
DLC81_IEC61400-1Ed3 """DLC81_wsp[wsp]_wdir[wdir]_s[seed]""" 352 6 18 1 "([ref_ti]*(0,75*[wsp]+5,6))/[wsp]" 1000 0 180 ;
8