• No results found

Gambit.mesh.Control Most Important

N/A
N/A
Protected

Academic year: 2021

Share "Gambit.mesh.Control Most Important"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Mesh Control using Size Functions

Mesh Control using Size Functions

and Boundary Layers

and Boundary Layers

(2)

Size Functions and Boundary Layers

Size Functions and Boundary Layers

Size functions and boundary layers are mesh control tools available in

Size functions and boundary layers are mesh control tools available in

GAMBIT.

GAMBIT.

Size functions

Size functions

z

z Can be used to smoothly control the growth in mesh size over a particular Can be used to smoothly control the growth in mesh size over a particular 

region of the geometry starting from a “source,” or origin. region of the geometry starting from a “source,” or origin.

z

z Can also be used to smCan also be used to smoothly toothly transitransition from fion from fine mesh needed tine mesh needed too resolveresolve

flow physics, curved geometry and model flow in thin gaps. flow physics, curved geometry and model flow in thin gaps. 

Boundary layers

Boundary layers

z

z Used to grow layers of cells of desired height from specified boundaries of Used to grow layers of cells of desired height from specified boundaries of 

2D/3D geometry 2D/3D geometry

z

z TypicalTypically used to captuly used to capture near ware near wall phenomell phenomena such as turbuna such as turbulencelence andand

heat transfer. heat transfer. 

Multiple size functions and boundary layers can be used to control

Multiple size functions and boundary layers can be used to control

mesh size distribution.

mesh size distribution.

(3)

Size Functions and Boundary Layers

Size Functions and Boundary Layers

Size functions and boundary layers are mesh control tools available in

Size functions and boundary layers are mesh control tools available in

GAMBIT.

GAMBIT.

Size functions

Size functions

z

z Can be used to smoothly control the growth in mesh size over a particular Can be used to smoothly control the growth in mesh size over a particular 

region of the geometry starting from a “source,” or origin. region of the geometry starting from a “source,” or origin.

z

z Can also be used to smCan also be used to smoothly toothly transitransition from fion from fine mesh needed tine mesh needed too resolveresolve

flow physics, curved geometry and model flow in thin gaps. flow physics, curved geometry and model flow in thin gaps. 

Boundary layers

Boundary layers

z

z Used to grow layers of cells of desired height from specified boundaries of Used to grow layers of cells of desired height from specified boundaries of 

2D/3D geometry 2D/3D geometry

z

z TypicalTypically used to captuly used to capture near ware near wall phenomell phenomena such as turbuna such as turbulencelence andand

heat transfer. heat transfer. 

Multiple size functions and boundary layers can be used to control

Multiple size functions and boundary layers can be used to control

mesh size distribution.

mesh size distribution.

(4)

Size Functions

Size Functions

Size functions control the mesh distribution in a region of space,

Size functions control the mesh distribution in a region of space,

including edges, faces, and volumes similar to the way grading controls

including edges, faces, and volumes similar to the way grading controls

mesh distribution on edges.

mesh distribution on edges.

Size functions are accessed through the Tools menu.

Size functions are accessed through the Tools menu.

Size functions are designed to grade tetrahedral meshes even though

Size functions are designed to grade tetrahedral meshes even though

they can be used with a hex mesh.

they can be used with a hex mesh.

Multiple Size Functions: Curvature and

Multiple Size Functions: Curvature and ProximityProximity

Curvature size function refines the Curvature size function refines the mesh in regions of large curvature mesh in regions of large curvature

Proximity size function ensures a fine Proximity size function ensures a fine

mesh in small gaps. mesh in small gaps.

(5)

Types of Size Functions

Size functions require the specification of the type,

source entities, attachment, and size parameters.

The type of size function dictates the criteria upon

which the mesh will grow.

z Fixed – scope is a fixed region about a source. z Curvature – scope is a region near highly curved

surfaces.

z Proximity – scope is a region within a specified

distance from objects.

z Meshed – ensures that a mesh is propagated in a

controlled manner from premeshed boundaries of  the domain.

(6)

Size Function Definition

Each size function type requires specification of:

z Source entities

 Defines the shape and location of the "origin" of 

the affected region.

z  Attachment entities

 Host the mesh that will be affected. z Parameters

 Three parameters define the characteristics of the

size function (except the meshed size function)

 The two parameters common to all four size

function types are the growth rate and size limit.

 The third (initialization) parameter is different for 

each of the first three size function types.

 The meshed size function does not use an

(7)

Selecting the Source Entity

Source

z Can be vertices, edges, faces, or volumes

z Can be internal or external to attachment entities z Source entity defines shape of scope

(8)

Selecting the Attachment Entity

(9)

Fixed Size Function

Parameters

z Start size: Mesh size adjacent to the source entity z Growth rate: Size ratio of two adjacent mesh elements z Size limit: Maximum allowable mesh size on

attachment entity

Source: edge  Attachment: face

No Size Function (3,684 cells) Fixed Size Function

(1,730 cells)

Same edge mesh (50 intervals)

(10)

Curvature Size Function

Parameters

z  Angle: The maximum allowable angle between

outward pointing normals for any two adjacent mesh elements.

z Growth rate and Size limit – same as for fixed S.F.

θ Large angle θ Small angle Without Curvature S.F. With Curvature S.F.

(11)

Proximity Size Function

Gap defined by two source faces

 Specifies number of cells in face gap (3D)

and edge gap (2D)

z For 3D gaps, the pair of faces bounding the

gap are specified as source entities.

z For 2D gaps, the pair of edges bounding

the gap or the face containing the gap can be specified as sources.

z If a volume is selected as the source, then

all pairs of faces will be evaluated as possible 3D gaps.

 Parameters

z Cells per gap: number of mesh layers in

the gap

z Growth rate and Size limit: same as for 

fixed

 Limitations

z Becomes slow on large models

z Improper use may result in abrupt change

in size

z Solution – increase resolution by changing

the defaults for background grids

 Proximity size functions are useful for both

quad pave and tri meshes in 2D and tet meshes in 3D

(12)

The mesh is grown from the meshed source entities

into the attachment entity.

Parameters:

z No initialization parameter is needed.

z Growth rate and size limit need to be specified.

Limitations

z The source entities must be premeshed. Premeshed

source edges Premeshed source face

(13)

Size Function Utilities

Modify Size Function

z Size function input parameters can be

modified after the size function has been created.

 Source and Attachment entity list

 Size and Growth Rate

z You must press Apply for the changes

(14)

Size Function Utilities

View Size Function

z Select the size function to view z Click the Initialize button

z Use the slider bar to view the range of 

influence in the graphics window.

Initialized size function on aircraft wing

(15)
(16)

Boundary Layers

Boundary layers are layers of elements growing outward from a

boundary into the domain.

z Produces high quality cells near the boundary.

z  Allows resolution of flow field effects with fewer cells than would be required

without them.

In general, boundary layers are attached to:

z Edges for 2D problems z Faces for 3D problems

High quality boundary layer mesh

(17)

Defining a Boundary Layer 

 Algorithm Definition Input Settings Transition Pattern  Attachment Entities

(18)

Boundary Layer Algorithms

Three boundary layer algorithms are available:

z Uniform

z  Aspect Ratio (first) z  Aspect Ratio (last)

Uniform Aspect Ratio (first) row Aspect Ratio (last) row

 Adjacent cells have the same

height

 Aspect ratio of the last layer is specified.

Cells in the last layer have the user-prescribed

aspect ratio  Adjacent cells

have the same aspect ratio

 Aspect ratio is constant within each layer of cells Height is constant within

(19)

Boundary Layer Inputs

Uniform boundary layer – The first three inputs are

required; the fourth is calculated)

z First row Height of first row of elements (a) z Growth factor  Factor for geometric series (b/a)

z Rows Total number of layers

z Depth Boundary layer thickness (D)

 Aspect ratio-based boundary layer inputs are

similar 

z First percent Starting aspect ratio

z Growth factor  Factor for geometric series (b/a) z Number of rows

For aspect ratio (last), inputs are First Row,

(20)

Internal Continuity Option

The Internal Continuity option allows 3D boundary layers to be formed

with no crossover or overlap regions.

ON

(No Overlap at Corner)

OFF

(21)

Wedge Corner Shape Option

The Wedge Corner Shape option is used at corner or reverse vertices

to create a rounded “wedge” of elements for 2D Boundary Layers.

ON

(22)

Boundary Layer Attachments

2D boundary layers are attached to edges.

3D boundary layers are attached to faces.

Temporary Display

z  A boundary layer is initially displayed in orange to

indicate that it is temporary.

z Display updates immediately when changes are

made.

Direction arrow

z Points from the attachment entity toward the centroid

of the parent entity.

z This can be misleading, especially in 3D!

The boundary layer is displayed in white

(23)

View 3D Boundary Layers

The View 3D Boundary Layers tool allows users to examine a 3D

boundary layer mesh prior to volume meshing.

z Resolves many mesh quality issues

(24)

Boundary Layers and Vertex Types

E E E S C E E E R E

2-D Boundary layers in regions near vertices

are defined by the vertex type.

z End: mesh overlaps

z Corner : angle trisected

z Reverse: angle divided into fourths. z Side: angle bisected

The vertex type for Boundary Layers can be

changed in the Set Face Vertex Form in the

Face meshing menu with the Boundary layer 

only option turned on.

Vertex types are also important for imprinting

(25)

Imprinting Adjacent Faces with 3D Boundary Layers

 A 3D boundary layer attached to a face may imprint the adjoining faces,

depending on the vertex type of the vertices at the intersection of the

boundary layer attachment face and adjoining faces.

z If the vertex is an “End” type vertex, an imprint is created and displayed.

If 3D boundary layers are also attached to the adjoining faces, then the

Internal Continuity toggle will determine the crossover region and

imprint.

Imprint of 3D boundary layer on adjacent faces with 3D boundary layer attached to bottom face

(26)

Imprinting 3D Boundary Layers by Modifying Vertex Types

When the angle between adjacent and attachment faces in greater than

120°, a vertex type change to End can cause the 3D boundary layer to

imprint.

140°

Vertex types changed to End closes the gap and imprints 3D boundary layer 

E E

E

No imprinting of 3D boundary layer  and gaps due to side vertices at

the face intersections  Attachment face

(27)
(28)

How Do Size Functions Work?

Size functions work by generating a

discrete map of mesh size on a

background Cartesian grid that overlays

the attachment geometry.

z This map is used by the meshing

algorithms in growing mesh with a size distribution.

z Multiple size functions can be integrated

into a single global size function on the entire domain.

Size functions work in two steps:

z Size function initialization wherein a size

distribution is computed on the source entities.

z Background grid generation on the

attachment entity, which resolves the

variation of the mesh size as a function of  the distance from the source. entity.

Typical background grid for an automotive manifold

(29)

How Do Size Functions Work?

 Size function initialization:

z  A constant “fixed” mesh size is used for the

fixed size function.

z For the curvature size function and proximity

size functions, the source entity is successively divided into smaller “facets” and a size is

computed on each facet.

 Each facet meets the angle criterion for the curvature size function.

 Each facet meets a criterion on the gap distance between opposite facets for the proximity size function.

 This can be computationally intensive for  complex surfaces.

 The Initialize Size Function button allows you

to visualize the size function variation radiating from the source entity.

Initialized size function on aircraft wing

(30)

How Do Size Functions Work?

 Background grid generation:

z  A set of Cartesian boxes forming a grid that bounds the attachment geometry are

generated and refined into smaller boxes.

z This successive refinement of the background grid is carried out until a maximum

number of levels of refinement (or “tree depth”) is reached or the size variation in all boxes is less than a specified tolerance.

 Background grid refinement:

z  A size is calculated in each box at the nodes and the center, as a function of the

distance from the source entity.

z The box is divided along the X,Y and Z axes If the size at the center is greater than the

average of the size at the nodes by a tolerance (nonlinear error percent).

Source entity Boundary of  attachment entity Sc – (Savg) > ε (tolerance) SC S1 S3 S2 S4

(31)

Background Grid Generation

Use of the background grid default parameters is

key to obtaining the desired meshes!

z TOOLS.SFUNCTION.BGRID_MAX_TREE_DEPTH

controls the maximum refinement of the background grid

 Increase the default value (16 in GAMBIT 2.2) until

no cells hit the tree depth.

  A value of –1 puts no limit on the background tree

depth, but makes size functions too slow for large models

z TOOLS.SFUNCTION.NONLINEAR_ERR_PERCENT

controls the allowable deviation of the local mesh from the prescribed mesh size

 Default is 25%, can vary between 3 and 25%

 Number of cells above the prescribed tolerance are

reported in the transcript window

z TOOLS.SFUNCTION.REPORT_BGRID_INFO = 1

(32)

Increasing Background Tree Depth

Ideal background grid Size Function not sufficiently resolved Background grid level reached maximum value specified

References

Related documents