Commit 262a788a authored by Frederik Zahle's avatar Frederik Zahle

fix bladecap so it has ni_root cells at the base again

parent 8a936b2c
Pipeline #11882 passed with stage
in 6 minutes and 24 seconds
......@@ -110,14 +110,13 @@ class RootCap(object):
self.domain = Domain()
p = CoonsPatch(ni=self.patch_cons[0].ni, nj=self.patch_cons[3].ni, block_name='cap_base-0000')
p.add_edge(0, self.patch_cons[0].copy())
p.add_edge(1, self.patch_cons[2].copy())
p.add_edge(2, self.patch_cons[3].copy())
p.add_edge(3, self.patch_cons[1].copy())
p.add_edge(0, self.patch_cons[3].copy())
p.add_edge(1, self.patch_cons[1].copy())
p.add_edge(2, self.patch_cons[0].copy())
p.add_edge(3, self.patch_cons[2].copy())
p.update()
self.patches = []
self.patches.append(p)
p.P._flip_block()
self.domain.add_blocks(p.P.split(33))
for i in [0, 1]:
p = CoonsPatch(ni=self.collar_ps[i].ni, nj=self.base_cons[i].ni, block_name = 'cap-%04d' % i)
......@@ -126,7 +125,6 @@ class RootCap(object):
p.add_edge(2, self.base_cons[i].copy())
p.add_edge(3, self.patch_cons[i].copy())
p.update()
p.P._flip_block()
self.patches.append(p)
self.domain.add_blocks(p.P)
for i in [2, 3]:
......@@ -138,8 +136,6 @@ class RootCap(object):
p.update()
self.patches.append(p)
self.domain.add_blocks(p.P)
if self.direction == -1:
self.domain.flip_all()
self.domain.join_blocks('cap-0000', 'cap-0001', newname='root')
self.domain.join_blocks('root', 'cap-0002', newname='root')
self.domain.join_blocks('root', 'cap-0003', newname='root')
......
......@@ -305,10 +305,8 @@ class BladeMesher(object):
self.pf['y'][0],
self.pf['z'][0]])
if self.ni_root > 0:
if self.root_type in ['cylinder', 'nacelle']:
if self.root_type in ['cylinder', 'nacelle', 'cap']:
self.root.tip_con = self.main_section.surface[:, self.ni_root-1, :]
elif self.root_type == 'cap':
self.root.tip_con = self.main_section.surface[:, 0, :]
self.root.update()
self.tip.main_section = self.main_section.surface
self.tip.update()
......@@ -316,10 +314,8 @@ class BladeMesher(object):
# assemble mesh and join blocks
x = self.main_section.surface
self.domain = Domain()
if self.root_type in ['cylinder', 'nacelle', 'tip']:
if self.root_type in ['cylinder', 'nacelle', 'tip', 'cap']:
ni_root = self.ni_root
elif self.root_type == 'cap':
ni_root = 0
self.domain.add_blocks(Block(x[:, np.maximum(0, ni_root-1):self.itip_start+1, 0],
x[:, np.maximum(0, ni_root-1):self.itip_start+1, 1],
x[:, np.maximum(0, ni_root-1):self.itip_start+1, 2],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment