Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
finstripwrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Malo Rosemeier
finstripwrapper
Commits
b9a2765d
Commit
b9a2765d
authored
7 years ago
by
Malo Rosemeier
Browse files
Options
Downloads
Patches
Plain Diff
verification of becas with farob succesful, all test i.o
parent
16a6cfd0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
finstrip_wrapper/core/test/test_blade.py
+102
-10
102 additions, 10 deletions
finstrip_wrapper/core/test/test_blade.py
finstrip_wrapper/omdao/test/test_finstrip_bladestability.py
+5
-5
5 additions, 5 deletions
finstrip_wrapper/omdao/test/test_finstrip_bladestability.py
with
107 additions
and
15 deletions
finstrip_wrapper/core/test/test_blade.py
+
102
−
10
View file @
b9a2765d
...
...
@@ -11,15 +11,24 @@ NUM_CORES = instance.get_physical_cores_count()
main_dir
=
'
test_data
'
test_dirs
=
[
'
finstrip_sec000
'
,
'
finstrip_sec001
'
,
'
finstrip_sec002
'
,
'
finstrip_sec003
'
,
]
test_dirs
=
[
'
becas_finstrip_sec000
'
,
'
becas_finstrip_sec001
'
,
'
becas_finstrip_sec002
'
,
'
becas_finstrip_sec003
'
,
'
farob_finstrip_DTU10MW
'
,
'
finstrip_sec000
'
]
class
FINSTRIPWrapperBladeTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
pass
def
tearDown
(
self
):
pass
def
test_run_finstrip
(
self
):
self
.
work_dir
=
os
.
getcwd
()
cfg
=
{}
...
...
@@ -30,11 +39,6 @@ class FINSTRIPWrapperBladeTestCase(unittest.TestCase):
self
.
finstrip
=
FINSTRIPWrapperBlade
(
**
cfg
)
def
tearDown
(
self
):
pass
def
test_run_finstrip
(
self
):
os
.
chdir
(
os
.
path
.
join
(
main_dir
,
test_dirs
[
1
]))
self
.
finstrip
.
execute
()
self
.
finstrip
.
post
()
...
...
@@ -46,12 +50,100 @@ class FINSTRIPWrapperBladeTestCase(unittest.TestCase):
for
case
in
range
(
ncase
):
f_eig_min
[
case
]
=
np
.
min
(
f_eig
[
case
,
:,
1
])
f_eig_min_exp
=
np
.
array
([
[
0.833
],
[
3.066
]
])
f_eig_min_exp
=
np
.
array
([
2.251
,
1.281
])
for
case
in
range
(
ncase
):
self
.
assertAlmostEqual
(
f_eig_min
[
case
],
f_eig_min_exp
[
case
],
places
=
3
)
def
test_verification_becas_finstrip
(
self
):
self
.
work_dir
=
os
.
getcwd
()
# fused-wind parametrisation with becas3.3
cfg
=
{}
cfg
[
'
name
'
]
=
'
blade
'
cfg
[
'
nmode
'
]
=
20
cfg
[
'
ncase
'
]
=
2
cfg
[
'
spanpos
'
]
=
000
self
.
finstrip
=
FINSTRIPWrapperBlade
(
**
cfg
)
os
.
chdir
(
os
.
path
.
join
(
main_dir
,
test_dirs
[
0
]))
self
.
finstrip
.
execute
()
self
.
finstrip
.
post
()
f_eig_becas
=
self
.
finstrip
.
f_eig
os
.
chdir
(
self
.
work_dir
)
ncase
=
len
(
f_eig_becas
[:,
0
,
0
])
f_eig_min_becas
=
np
.
zeros
((
ncase
))
for
case
in
range
(
ncase
):
f_eig_min_becas
[
case
]
=
np
.
min
(
f_eig_becas
[
case
,
:,
1
])
# focus parametrisation with finstrip
self
.
finstrip
=
FINSTRIPWrapperBlade
(
**
cfg
)
os
.
chdir
(
os
.
path
.
join
(
main_dir
,
test_dirs
[
5
]))
self
.
finstrip
.
execute
()
self
.
finstrip
.
post
()
f_eig_finstrip
=
self
.
finstrip
.
f_eig
os
.
chdir
(
self
.
work_dir
)
ncase
=
len
(
f_eig_finstrip
[:,
0
,
0
])
f_eig_min_finstrip
=
np
.
zeros
((
ncase
))
for
case
in
range
(
ncase
):
f_eig_min_finstrip
[
case
]
=
np
.
min
(
f_eig_finstrip
[
case
,
:,
1
])
case
=
0
dev_becas_finstrip
=
0.94493608652900696
self
.
assertAlmostEqual
(
f_eig_min_becas
[
case
]
/
f_eig_min_finstrip
[
case
],
dev_becas_finstrip
,
places
=
3
)
def
test_verification_farob_becas_finstrip
(
self
):
self
.
work_dir
=
os
.
getcwd
()
# fused-wind parametrisation with becas3.3
cfg
=
{}
cfg
[
'
name
'
]
=
'
blade
'
cfg
[
'
nmode
'
]
=
20
cfg
[
'
ncase
'
]
=
2
cfg
[
'
spanpos
'
]
=
000
self
.
finstrip
=
FINSTRIPWrapperBlade
(
**
cfg
)
os
.
chdir
(
os
.
path
.
join
(
main_dir
,
test_dirs
[
0
]))
self
.
finstrip
.
execute
()
self
.
finstrip
.
post
()
f_eig_becas
=
self
.
finstrip
.
f_eig
os
.
chdir
(
self
.
work_dir
)
ncase
=
len
(
f_eig_becas
[:,
0
,
0
])
f_eig_min_becas
=
np
.
zeros
((
ncase
))
for
case
in
range
(
ncase
):
f_eig_min_becas
[
case
]
=
np
.
min
(
f_eig_becas
[
case
,
:,
1
])
# focus parametrisation with farob
cfg
=
{}
cfg
[
'
name
'
]
=
'
finstrip_2800
'
cfg
[
'
nmode
'
]
=
20
cfg
[
'
ncase
'
]
=
1
cfg
[
'
spanpos
'
]
=
2800
self
.
finstrip
=
FINSTRIPWrapperBlade
(
**
cfg
)
os
.
chdir
(
os
.
path
.
join
(
main_dir
,
test_dirs
[
4
]))
self
.
finstrip
.
execute
()
self
.
finstrip
.
post
()
f_eig_farob
=
self
.
finstrip
.
f_eig
os
.
chdir
(
self
.
work_dir
)
ncase
=
len
(
f_eig_farob
[:,
0
,
0
])
f_eig_min_farob
=
np
.
zeros
((
ncase
))
for
case
in
range
(
ncase
):
f_eig_min_farob
[
case
]
=
np
.
min
(
f_eig_farob
[
case
,
:,
1
])
case
=
0
dev_becas_farob
=
0.99896049896049899
self
.
assertAlmostEqual
(
f_eig_min_becas
[
case
]
/
f_eig_min_farob
[
case
],
dev_becas_farob
,
places
=
3
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
finstrip_wrapper/omdao/test/test_finstrip_bladestability.py
+
5
−
5
View file @
b9a2765d
...
...
@@ -252,7 +252,7 @@ class FINSTRIPBeamStructureTestCase(unittest.TestCase):
def
tearDown
(
self
):
pass
@unittest.skip
(
"
skipping
"
)
#
@unittest.skip("skipping")
def
test_finstrip
(
self
):
p
=
configure_FINSTRIPBladeStability
(
4
,
'
octave
'
,
'
data
'
,
...
...
@@ -274,8 +274,8 @@ class FINSTRIPBeamStructureTestCase(unittest.TestCase):
f_eig_min_idx
[
case
,
sec
]
=
p
[
'
blade_f_eig
'
][
case
,
sec
,
:,
1
].
argmin
()
f_eig_min_exp
=
np
.
array
([[
2.03
8
,
2.5
97
,
2.936
,
1.
],
[
1.0
2
1
,
1.
36
7
,
1.34
6
,
1.
]])
f_eig_min_exp
=
np
.
array
([[
2.03
4
,
2.5
35
,
2.936
,
1.
],
[
1.01
9
,
1.
45
7
,
1.34
9
,
1.
]])
for
case
in
range
(
ncase
):
for
i
,
f
in
enumerate
(
f_eig_min
[
case
,
:]):
self
.
assertAlmostEqual
(
...
...
@@ -305,8 +305,8 @@ class FINSTRIPBeamStructureTestCase(unittest.TestCase):
f_eig_min
[
case
,
sec
]
=
np
.
min
(
p
[
'
blade_f_eig
'
][
case
,
sec
,
:,
1
])
f_eig_min_exp
=
np
.
array
([[
1.
559
,
1.04
,
1.442
,
1.
],
[
0.
781
,
0.576
,
0.75
2
,
1.
]])
f_eig_min_exp
=
np
.
array
([[
1.
922
,
2.251
,
2.197
,
1.
],
[
0.
963
,
1.281
,
1.14
2
,
1.
]])
for
case
in
range
(
ncase
):
for
i
,
f
in
enumerate
(
f_eig_min
[
case
,
:]):
self
.
assertAlmostEqual
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment