Esempio n. 1
0
#genMesh=False
vessel = 'wigley'
genMesh = True
#vessel = None
#genMesh=True
boundaryTags = {
    'bottom': 1,
    'front': 2,
    'right': 3,
    'back': 4,
    'left': 5,
    'top': 6,
    'obstacle': 7
}
if vessel is 'wigley-gmsh':
    domain = Domain.MeshTetgenDomain(fileprefix="mesh")
    domain.boundaryTags = boundaryTags
else:
    vertices = [
        [x_ll[0], x_ll[1], x_ll[2]],  #0
        [x_ll[0] + L[0], x_ll[1], x_ll[2]],  #1
        [x_ll[0] + L[0], x_ll[1] + L[1], x_ll[2]],  #2
        [x_ll[0], x_ll[1] + L[1], x_ll[2]],  #3
        [x_ll[0], x_ll[1], x_ll[2] + L[2]],  #4
        [x_ll[0] + L[0], x_ll[1], x_ll[2] + L[2]],  #5
        [x_ll[0] + L[0], x_ll[1] + L[1], x_ll[2] + L[2]],  #6
        [x_ll[0], x_ll[1] + L[1], x_ll[2] + L[2]]
    ]  #7
    vertexFlags = [
        boundaryTags['left'], boundaryTags['right'], boundaryTags['right'],
        boundaryTags['left'], boundaryTags['left'], boundaryTags['right'],
Esempio n. 2
0
if spaceOrder == 1:
    hFactor = 1.0
    basis = C0_AffineLinearOnSimplexWithNodalBasis
    elementQuadrature = SimplexGaussQuadrature(nd, 2)
    elementBoundaryQuadrature = SimplexGaussQuadrature(nd - 1, 2)
elif spaceOrder == 2:
    hFactor = 0.5
    basis = C0_AffineQuadraticOnSimplexWithNodalBasis
    elementQuadrature = SimplexGaussQuadrature(nd, 4)
    elementBoundaryQuadrature = SimplexGaussQuadrature(nd - 1, 4)

#----------------------------------------------------
# Domain and mesh
#----------------------------------------------------
he = 0.05  #guess level 0
domain = Domain.MeshTetgenDomain(fileprefix="jet_domain3d")
boundaryTags = {
    'inflow': 5,
    'top_walls': 6,
    'outlet': 7,
    'outer_walls': 8,
    'bottom_walls': 9
}
wall_boundaries = [
    boundaryTags['top_walls'], boundaryTags['outer_walls'],
    boundaryTags['bottom_walls']
]
domain.boundaryTags = boundaryTags

L = (14.1, 30., 30)
x_ll = (0., -15., -15.)