Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HAWC Reference Models
dtu-10mw-rwt
Commits
d697073b
Commit
d697073b
authored
Sep 04, 2020
by
Jenni Rinker
Browse files
Merge branch 'develop' into 'master'
Switching git workflows, merging develop in See merge request
!6
parents
978f8d52
5e01a811
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d697073b
...
...
@@ -8,6 +8,7 @@
*.dll
*_hs2.htc
*_step.htc
*_turb.htc
# latex stuff to ignore
*.pdf
...
...
@@ -17,5 +18,5 @@
# other stuff to ignore
**/control-win32/**
dtu-10mw-rwt
/git_version.txt
**
/git_version.txt
*.zip
\ No newline at end of file
.gitlab-ci.yml
View file @
d697073b
...
...
@@ -3,13 +3,19 @@ make_32bit_zip:
script
:
-
pip install git+https://gitlab.windenergy.dtu.dk/hawc-reference-models/reference-utilities.git
-
cd utils
-
python3 prepare_zip_file.py
-
python3 prepare_zip_file.py
$CI_COMMIT_REF_NAME
artifacts
:
paths
:
-
dtu-10mw-rwt.zip
-
dtu-10mw-rwt
-$CI_COMMIT_REF_NAME
.zip
tags
:
# - CPAV_old
-
python
only
:
-
tags
-
release*
-
make_zip
# see deepwind repo for configuring report/zip compilation
# (later) make the report
# - git clone git@gitlab.windenergy.dtu.dk:HAWC2/hawc2-binary/hawc2-win32.git
...
...
dtu-10mw-rwt/htc/DTU_10MW_RWT.htc
View file @
d697073b
; DTU 10MW RWT. https://gitlab.windenergy.dtu.dk/hawc-reference-models/dtu-10-mw
;
begin simulation;
time_stop
7
00.0; total time to simulate
time_stop
1
00.0; total time to simulate
solvertype 1 ; 1=dense newmark, 2= sparse newmark (12.7+)
on_no_convergence continue ;
convergence_limits 1E3 1.0 1E-7 ;
...
...
@@ -290,26 +290,16 @@ end new_htc_structure;
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
begin wind ; wind input to structure
density 1.225 ;
wsp
24
.0 ;
tint 0.
157
; iec: i_ref*(0.75*U+5.6)/U
wsp
8
.0 ;
tint 0.
0
; iec: i_ref*(0.75*U+5.6)/U
horizontal_input 1 ;
windfield_rotations 0.0 0.0 0.0 ; yaw, tilt, rotation
center_pos0 0.0 0.0 -119 ; hub height
shear_format 3 0.2 ; 0=no mean wind, 1=constant, 2=log, 3=power, 4=linear
turb_format
1
; 0=none, 1=mann,2=flex
tower_shadow_method
3
; 0=none, 1=potential flow, 2=jet, 3=potential flow 2
turb_format
0
; 0=none, 1=mann,2=flex
tower_shadow_method
0
; 0=none, 1=potential flow, 2=jet, 3=potential flow 2
wind_ramp_factor 0.0 40.0 0.5 1.0 ; ramp wind from 50% to 100% starting at 0s and ending at 40s
;
begin mann; mann turbulence parameters
create_turb_parameters 29.4 1.0 3.9 1001 0 ;
filename_u ./turb/DTU_10MW_RWT_turb_u.bin ;
filename_v ./turb/DTU_10MW_RWT_turb_v.bin ;
filename_w ./turb/DTU_10MW_RWT_turb_w.bin ;
box_dim_u 8192 1.7578125 ; U*T/n_u
box_dim_v 32 5.80645 ; wid/(n_v-1)
box_dim_w 32 5.80645 ; ht/(n_w-1)
end mann;
;
begin tower_shadow_potential_2;
tower_mbdy_link tower;
nsec 2;
...
...
utils/prepare_zip_file.py
View file @
d697073b
...
...
@@ -4,14 +4,18 @@
import
os
import
shutil
import
subprocess
from
refutils
import
(
turb_to_hs2
,
turb_to_step
,
delete_dlls
,
clone_repo
,
get_repo_info
)
import
sys
from
refutils
import
(
base_to_hs2
,
base_to_step
,
base_to_turb
,
delete_dlls
,
clone_repo
,
get_repo_info
)
if
__name__
==
'__main__'
:
# get ref name
ci_ref
=
sys
.
argv
[
1
]
print
(
f
'Preparing zip file for
{
ci_ref
}
...'
)
# script inputs
mod_dir
=
'../dtu-10mw-rwt/'
# must end with slash
zip_name
=
'../dtu-10mw-rwt'
zip_name
=
f
'../dtu-10mw-rwt
-
{
ci_ref
}
'
basename
=
'DTU_10MW_RWT'
dll_git_url
=
'https://gitlab.windenergy.dtu.dk/OpenLAC/control-binary/control-win32.git'
dll_branch
=
'ref_models'
...
...
@@ -23,15 +27,23 @@ if __name__ == '__main__':
# ======= make hawcstab2 and step-wind files =======
htc_base
=
mod_dir
+
f
'htc/
{
basename
}
.htc'
kwargs
=
{}
# default kwargs in functions are for DTU 10 MW, no need to update
kwargs
=
dict
(
pitch_f
=
100
,
pitch_z
=
0.7
,
cut_in
=
4
,
cut_out
=
25
,
n_wsp
=
22
,
gen_min
=
299.85
,
gen_max
=
479.56567
,
gbr
=
50
,
pitch_min
=
0
,
opt_lambda
=
7.5
,
rate_pow
=
10000
,
gen_eff
=
0.94
,
p1_f
=
0.05
,
p1_z
=
0.7
,
p2_f
=
0.06
,
p2_z
=
0.7
,
gs
=
2
,
constant_power
=
1
,
dt
=
40
,
tstart
=
100
,
wsp
=
24
,
tint
=
0.157
,
tb_wid
=
180
,
tb_ht
=
180
)
# turbulent file
turb_path
=
mod_dir
+
f
'htc/
{
basename
}
_turb.htc'
base_to_turb
(
htc_base
,
turb_path
,
**
kwargs
)
# hawcstab2
hs2_path
=
mod_dir
+
f
'
{
basename
}
_hs2.htc'
turb
_to_hs2
(
htc_base
,
hs2_path
,
**
kwargs
)
base
_to_hs2
(
htc_base
,
hs2_path
,
**
kwargs
)
# step wind
step_path
=
mod_dir
+
f
'htc/
{
basename
}
_step.htc'
turb
_to_step
(
htc_base
,
step_path
,
**
kwargs
)
base
_to_step
(
htc_base
,
step_path
,
**
kwargs
)
# ======= clone dll repo and copy in the ones we need =======
control_dir
=
mod_dir
+
'control/'
# must end with slash!
...
...
@@ -50,21 +62,21 @@ if __name__ == '__main__':
for
t
in
dll_list
]
# delete control binaries
shutil
.
rmtree
(
'./control-win32/'
)
# doesn't work on WINDOWS >:(
#
shutil.rmtree('./control-win32/') # doesn't work on WINDOWS >:(
#subprocess.run(['rmdir', '/s', '/q', 'control-win32'], shell=True, check=True)
# write the git branch and commit to file
url
,
branch
,
commit
,
date
=
get_repo_info
()
with
open
(
mod_dir
+
'git_version.txt'
,
'w'
)
as
f
:
f
.
write
(
f
'Git info for
{
basename
}
zip file
\n
'
)
f
.
write
(
'------------------------------------
\n
'
)
f
.
write
(
'Automatically generated using CI on following repo.
\n\n
'
)
f
.
write
(
f
'Repo url:
{
url
}
\n
'
)
f
.
write
(
f
'Branch:
{
branch
}
\n
'
)
f
.
write
(
f
'Commit:
{
commit
}
made on
{
date
}
\n
'
)
#
url, branch, commit, date = get_repo_info()
#
with open(mod_dir + 'git_version.txt', 'w') as f:
#
f.write(f'Git info for {basename} zip file\n')
#
f.write('------------------------------------\n')
#
f.write('Automatically generated using CI on following repo.\n\n')
#
f.write(f'Repo url: {url}\n')
#
f.write(f'Branch: {branch}\n')
#
f.write(f'Commit: {commit} made on {date}\n')
# ======= make the archive =======
shutil
.
make_archive
(
mod_dir
,
'zip'
,
zip_name
)
shutil
.
make_archive
(
zip_name
,
'zip'
,
mod_dir
)
#%%
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment