Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NTRfC
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
TFD - Institut für Turbomaschinen und Fluid-Dynamik
tools
NTRfC
Commits
f12d3252
Commit
f12d3252
authored
8 months ago
by
many
Browse files
Options
Downloads
Patches
Plain Diff
initial midline optimization commit
parent
a8e811c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Checking pipeline status
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ntrfc/turbo/cascade_case/utils/domain_utils.py
+1
-1
1 addition, 1 deletion
ntrfc/turbo/cascade_case/utils/domain_utils.py
ntrfc/turbo/profile_tele_extraction.py
+3
-9
3 additions, 9 deletions
ntrfc/turbo/profile_tele_extraction.py
with
4 additions
and
10 deletions
ntrfc/turbo/cascade_case/utils/domain_utils.py
+
1
−
1
View file @
f12d3252
...
@@ -75,7 +75,7 @@ class Blade2D:
...
@@ -75,7 +75,7 @@ class Blade2D:
self
.
sortedpointsrolled_pv
=
newSortedPoly
self
.
sortedpointsrolled_pv
=
newSortedPoly
def
extract_sides
(
self
):
def
extract_sides
(
self
):
self
.
ps_pv
,
self
.
ss_pv
=
extractSidePolys
(
self
.
ite
,
self
.
sortedpointsrolled_pv
)
self
.
ps_pv
,
self
.
ss_pv
=
extractSidePolys
(
self
.
ite
,
self
.
ile
,
self
.
sortedpointsrolled_pv
)
def
compute_skeleton
(
self
):
def
compute_skeleton
(
self
):
self
.
skeletonline_pv
=
midline_from_sides
(
self
.
ps_pv
,
self
.
ss_pv
)
self
.
skeletonline_pv
=
midline_from_sides
(
self
.
ps_pv
,
self
.
ss_pv
)
...
...
This diff is collapsed.
Click to expand it.
ntrfc/turbo/profile_tele_extraction.py
+
3
−
9
View file @
f12d3252
...
@@ -11,7 +11,6 @@ from skimage.morphology import skeletonize
...
@@ -11,7 +11,6 @@ from skimage.morphology import skeletonize
from
ntrfc.geometry.line
import
lines_from_points
from
ntrfc.geometry.line
import
lines_from_points
from
ntrfc.turbo.pointcloud_methods
import
extractSidePolys
,
midline_from_sides
from
ntrfc.turbo.pointcloud_methods
import
extractSidePolys
,
midline_from_sides
from
ntrfc.math.vectorcalc
import
findNearest
,
vecDir
from
ntrfc.math.vectorcalc
import
findNearest
,
vecDir
from
tqdm
import
tqdm
def
detect_inliers_tukey
(
data
):
def
detect_inliers_tukey
(
data
):
"""
"""
...
@@ -75,10 +74,6 @@ def clean_sites(voronoi_sites, skeletonize_sites):
...
@@ -75,10 +74,6 @@ def clean_sites(voronoi_sites, skeletonize_sites):
inliers_turkey
=
detect_inliers_tukey
(
min_distances
)
inliers_turkey
=
detect_inliers_tukey
(
min_distances
)
inliers_mad
=
detect_inliers_mad
(
min_distances
)
inliers_mad
=
detect_inliers_mad
(
min_distances
)
inliers_zscore
=
detect_inliers_zscore
(
min_distances
)
inliers_zscore
=
detect_inliers_zscore
(
min_distances
)
# Compute the intersection with the polygon of all rays
intersections_positive
=
[
LineString
([
centers
[
i
],
ray_positive
[
i
]]).
intersection
(
shapelypoly
)
for
i
in
range
(
len
(
centers
))]
intersections_negative
=
[
LineString
([
centers
[
i
],
ray_negative
[
i
]]).
intersection
(
shapelypoly
)
for
i
in
range
(
len
(
centers
))]
inlier_indices
=
np
.
where
(
inliers_turkey
*
inliers_zscore
*
inliers_mad
)[
0
]
inlier_indices
=
np
.
where
(
inliers_turkey
*
inliers_zscore
*
inliers_mad
)[
0
]
...
@@ -96,7 +91,6 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
...
@@ -96,7 +91,6 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
#create sheply polygon from refined pointset
#create sheply polygon from refined pointset
shapelypoly
=
Polygon
(
points_2d_closed_refined_voronoi
)
shapelypoly
=
Polygon
(
points_2d_closed_refined_voronoi
)
raylength
=
1000
raylength
=
1000
# todo; estimate le and te regions, only check combinations of these
min_x
=
np
.
min
(
points_orig
[:,
0
])
min_x
=
np
.
min
(
points_orig
[:,
0
])
max_x
=
np
.
max
(
points_orig
[:,
0
])
max_x
=
np
.
max
(
points_orig
[:,
0
])
...
@@ -116,7 +110,7 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
...
@@ -116,7 +110,7 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
#max_errors = []
#max_errors = []
midsp
=
[]
midsp
=
[]
for
i
,
j
in
tqdm
(
combinations
)
:
for
i
,
j
in
combinations
:
ind_1_start
=
i
ind_1_start
=
i
ind_2_start
=
j
ind_2_start
=
j
...
@@ -169,8 +163,8 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
...
@@ -169,8 +163,8 @@ def extract_vk_hk(sortedPoly: pv.PolyData) -> (int, int):
inds
=
combinations
[
np
.
argmin
(
rms_errors
)]
inds
=
combinations
[
np
.
argmin
(
rms_errors
)]
le_ind
=
inds
[
np
.
argmin
(
points_orig
[
inds
][:,
0
])]
le_ind
=
inds
[
np
.
argmin
(
[
points_orig
[
inds
[
0
]][
0
],
points_orig
[
inds
[
1
]][
0
]
])]
te_ind
=
inds
[
np
.
argmax
(
points_orig
[
inds
][:,
0
])]
te_ind
=
inds
[
np
.
argmax
(
[
points_orig
[
inds
[
0
]][
0
],
points_orig
[
inds
[
1
]][
0
]
])]
return
le_ind
,
te_ind
return
le_ind
,
te_ind
...
...
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