Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Frederik Zahle
PGL
Commits
38764150
Commit
38764150
authored
Feb 04, 2021
by
alrf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added TE/LE alignment option
parent
b601b2d3
Pipeline
#20141
failed with stage
in 3 minutes and 44 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
24 deletions
+45
-24
.vscode/settings.json
.vscode/settings.json
+3
-0
PGL/components/bladetip.py
PGL/components/bladetip.py
+1
-1
PGL/components/bladewingletmesher.py
PGL/components/bladewingletmesher.py
+21
-21
PGL/components/winglet.py
PGL/components/winglet.py
+20
-2
No files found.
.vscode/settings.json
0 → 100644
View file @
38764150
{
"python.pythonPath"
:
"home/alrf/environments/pye3dopt/bin/python"
}
\ No newline at end of file
PGL/components/bladetip.py
View file @
38764150
...
...
@@ -93,7 +93,7 @@ class CoonsBladeTip(object):
self
.
nj_LE
=
20
self
.
ibase
=
0
self
.
Ptip
=
np
.
array
([])
self
.
axis
=
None
self
.
axis
=
None
self
.
main_section
=
np
.
array
([])
self
.
shear_sweep
=
False
...
...
PGL/components/bladewingletmesher.py
View file @
38764150
...
...
@@ -214,7 +214,9 @@ class BladeWingletMesher(object):
self
.
wl_tw
=
np
.
array
([
10
,
15
,
30
])
self
.
wl_th
=
0.18
self
.
wl_ni_rat
=
np
.
array
([
1
,
4
,
2
])
self
.
wl_enforce_h
=
False
self
.
wl_enforce_h
=
False
self
.
wl_nextra
=
5
self
.
wl_falign
=
0.
self
.
connectors
=
[]
self
.
domain
=
Domain
()
...
...
@@ -250,8 +252,8 @@ class BladeWingletMesher(object):
self
.
pf
[
'y'
]
*=
scaler
#-------- winglet start ---------
# Generate planform including the additional points used for discretizing
# the winglet.
# Generate planform including the additional points used for discretizing
# the winglet.
smax_nowinglet
=
self
.
pf
[
'smax'
]
self
.
smax_nowinglet
=
smax_nowinglet
self
.
pf_spline
=
RedistributedPlanform
(
**
self
.
__dict__
)
...
...
@@ -262,15 +264,15 @@ class BladeWingletMesher(object):
self
.
ds_winglet_start
,
self
.
ni_winglet_start
+
1
)
self
.
pf_spline
.
update
()
# Get the redistributed planform
# Get the redistributed planform
self
.
pf
=
self
.
pf_spline
.
pf_out
# Create the winglet planform, cut the blade and attach the winglet
self
.
winglet
=
Winglet
(
**
self
.
__dict__
)
self
.
winglet
.
update
()
# Planform including winglet
# Create the winglet planform, cut the blade and attach the winglet
self
.
winglet
=
Winglet
(
**
self
.
__dict__
)
self
.
winglet
.
update
()
# Planform including winglet
self
.
pf
=
self
.
winglet
.
pf_new
# Determine the ratio of the curve lengths
# Determine the ratio of the curve lengths
smax_winglet
=
self
.
pf
[
'smax'
]
smax_rat
=
smax_nowinglet
/
smax_winglet
# Redistribute points on the planform with the winglet
...
...
@@ -280,7 +282,7 @@ class BladeWingletMesher(object):
# Use the same procedure as standard only with the scaling factor
self
.
itip_start
=
self
.
ni_span
-
self
.
ni_tip
# Add grid control points
# Keep the blade defintions the same
# Keep the blade defintions the same
self
.
pf_spline
.
add_dist_point
(
0.
,
self
.
ds_root_start
*
smax_rat
,
1
)
if
self
.
ni_root
>
0
:
self
.
pf_spline
.
add_dist_point
(
self
.
s_root_end
*
smax_rat
,
self
.
ds_root_end
*
smax_rat
,
self
.
ni_root
)
...
...
@@ -292,28 +294,28 @@ class BladeWingletMesher(object):
ni_winglet_seg
=
np
.
ceil
((
srat_winglet
*
self
.
wl_ni_rat
)
/
(
srat_winglet
*
self
.
wl_ni_rat
).
sum
()
*
self
.
ni_winglet
)
ni_winglet_seg
[
ni_winglet_seg
<
4
]
=
4
# Make sure the sum of all segments is the same as ni_winglet
ni_winglet_seg
[
ni_winglet_seg
.
argmax
()]
-=
(
ni_winglet_seg
.
sum
()
-
self
.
ni_winglet
)
ni_winglet_seg
[
ni_winglet_seg
.
argmax
()]
-=
(
ni_winglet_seg
.
sum
()
-
self
.
ni_winglet
)
# Grid spacing
ds_winglet
=
s_winglet
/
(
ni_winglet_seg
-
1
)
/
smax_winglet
# Grid definition
# The winglet consists of three segments. Grid spacing defining points are placed in three
# locations. One where the main blade is cut and the new winglet part starts and one at each
# end of the curved transition piece connecting the actual winglet and the mainly horizontal
# end of the curved transition piece connecting the actual winglet and the mainly horizontal
# segment. Grid spacing is uniform over the transition segment and equals that of the main blade
# without cut at the start of the new winglet.
# Start of winglet
self
.
pf_spline
.
add_dist_point
(
self
.
winglet
.
s_P1
,
self
.
ds_winglet_start
*
smax_rat
,
self
.
ni_winglet_start
+
1
)
self
.
ni_winglet_start
+
1
)
# Start of transition
self
.
pf_spline
.
add_dist_point
(
self
.
winglet
.
s_P2
,
ds_winglet
[
1
],
self
.
ni_winglet_start
+
ni_winglet_seg
[
0
]
+
1
)
# End of transition
self
.
ni_winglet_start
+
ni_winglet_seg
[
0
]
+
1
)
# End of transition
self
.
pf_spline
.
add_dist_point
(
self
.
winglet
.
s_P3
,
ds_winglet
[
1
],
self
.
ni_winglet_start
+
ni_winglet_seg
[:
2
].
sum
()
+
1
)
self
.
ni_winglet_start
+
ni_winglet_seg
[:
2
].
sum
()
+
1
)
# Tip closing the blade and bringing it to zero thickness
self
.
pf_spline
.
add_dist_point
(
self
.
s_tip_start
,
self
.
ds_tip_start
,
self
.
itip_start
+
1
)
self
.
pf_spline
.
add_dist_point
(
1.
,
self
.
ds_tip
,
self
.
ni_span
+
self
.
n_refined_tip
+
1
)
...
...
@@ -323,7 +325,7 @@ class BladeWingletMesher(object):
# Final planform with winglet
self
.
pf
=
self
.
pf_spline
.
pf_out
#-------- winglet end ---------
if
not
self
.
user_surface_file
and
not
self
.
user_surface
.
shape
[
0
]
>
0
:
ax
=
Curve
(
points
=
np
.
array
([
self
.
pf
[
'x'
],
self
.
pf
[
'y'
],
self
.
pf
[
'z'
]]).
T
)
ax
.
rotate_x
(
self
.
cone_angle
)
...
...
@@ -416,7 +418,7 @@ class BladeWingletMesher(object):
self
.
domain
.
add_domain
(
self
.
tip
.
domain
)
self
.
domain
.
join_blocks
(
'tip-base'
,
'main_section'
,
newname
=
'main_section'
)
if
self
.
pitch_setting
!=
0.
:
self
.
domain
.
rotate_z
(
self
.
pitch_setting
)
...
...
@@ -434,8 +436,6 @@ class BladeWingletMesher(object):
self
.
domain
.
add_group
(
'blade1'
,
list
(
self
.
domain
.
blocks
.
keys
()))
#self.domain.write_plot3d('test.xyz')
#sys.exit()
if
self
.
build_rotor
:
self
.
domain
.
rotate_x
(
-
90
)
...
...
PGL/components/winglet.py
View file @
38764150
...
...
@@ -98,6 +98,7 @@ class Winglet(object):
self
.
tw
=
np
.
array
([
10
,
15
,
30
])
self
.
th
=
0.18
*
np
.
ones
(
3
)
self
.
nextra
=
5
self
.
falign
=
0.
self
.
frac_t12
=
0.5
self
.
frac_tl
=
0.7
...
...
@@ -116,7 +117,7 @@ class Winglet(object):
def
update
(
self
):
# Run winglet planform creation
# Cut the main blade at s_start
self
.
cut_blade
()
# Winglet max z extension
...
...
@@ -125,6 +126,8 @@ class Winglet(object):
self
.
build_winglet_axis
()
# Create chord, twist and thickness distribution of the winglet
self
.
build_winglet_distributions
()
# Shear sweep blade axis
self
.
shear_sweep_winglet
()
# Connect the winglet with the main blade and create new planform
self
.
connect_winglet
()
...
...
@@ -402,6 +405,21 @@ class Winglet(object):
varq
=
np
.
interp
(
sq
,
bez
.
points
[:,
0
],
bez
.
points
[:,
1
])
return
varq
,
bez
.
CPs
def
shear_sweep_winglet
(
self
):
# Shear sweep the winglet planform axis in the direction of the LE or TE.
if
(
self
.
falign
<
0.
):
fc
=
1.
-
self
.
ple_cut
else
:
fc
=
self
.
ple_cut
# change in chord
dchord
=
self
.
chord
-
self
.
c_cut
#dchord[1:] = self.chord[1:]-self.chord[:-1]
# move the axis according to a fraction of the chord reduction
dx
=
-
(
self
.
falign
*
fc
*
dchord
)
#print(self.dx)
#self.ax_dx = np.cumsum(dx)
self
.
ax_dx
=
dx
def
rotate_winglet
(
self
):
# Store the winglet shape in the winglet coordiante system
self
.
sc
.
points_norot
=
self
.
sc
.
points
.
copy
()
...
...
@@ -418,7 +436,7 @@ class Winglet(object):
# All variables which are not acted on are assumed to be continous from
# the cut outwards ie: rot_x, rot_y, p_le and dy
pf_new
=
self
.
pf
.
copy
()
pf_new
[
'x'
]
=
np
.
append
(
self
.
pf
[
'x'
][:
self
.
i_cut
],
self
.
sc
.
points
[:,
0
]
+
self
.
x_cut
)
pf_new
[
'x'
]
=
np
.
append
(
self
.
pf
[
'x'
][:
self
.
i_cut
],
self
.
sc
.
points
[:,
0
]
+
self
.
x_cut
+
self
.
ax_dx
)
pf_new
[
'y'
]
=
np
.
append
(
self
.
pf
[
'y'
][:
self
.
i_cut
],
self
.
sc
.
points
[:,
1
]
+
self
.
y_cut
)
pf_new
[
'z'
]
=
np
.
append
(
self
.
pf
[
'z'
][:
self
.
i_cut
],
self
.
sc
.
points
[:,
2
])
pf_new
[
'rot_x'
]
=
np
.
append
(
self
.
pf
[
'rot_x'
][:
self
.
i_cut
],
np
.
zeros
(
self
.
chord
.
shape
[
0
])
+
self
.
xrot_cut
)
...
...
Write
Preview
Markdown
is supported
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