Meshing with COMSOL Multiphysics 4 - Michelsen · PDF file• Automatic mesh generation...

Post on 06-Feb-2018

214 views 0 download

Transcript of Meshing with COMSOL Multiphysics 4 - Michelsen · PDF file• Automatic mesh generation...

Meshing with

COMSOL Multiphysics 4.3a

General Introduction

© 2012 COMSOL. All rights reserved.

• Meshing Techniques

• Mesh Elements

• Creating Meshes

• Importing Meshes

• Virtual Geometry and Mesh Control Operations

• Mesh Adaptation During Solving

Contents

Meshing Techniques

• Automatic mesh generation adapted to the physics settings in the model

• Tuned for – Fluid flow

– Plasma

– General physics

Model of an ICP reactor created with the Plasma Module

Physics-Controlled Meshing

• Nine predefined mesh size settings

ranging from ”Extremely fine” to

”Extremely coarse”

• Starting point for manual mesh

generation

ICP reactor geometry meshed

with “Extra Fine” setting

ICP reactor geometry meshed

with “Extra Coarse” setting

Physics-Controlled Meshing

• Manually add mesh operations to

generate a mesh

• Mesh operations are saved in a

meshing sequence

• Several meshing sequences may be

saved in a model

• Nine predefined mesh size settings

• Manual control over mesh size

User-Controlled Meshing

• Add, delete, disable, move, or edit

mesh operations

• Mesh operations can be

parameterized – Use expressions with variables for mesh size

parameters

• Enables automatic regeneration of

mesh for geometric parametric sweeps

The Meshing Sequence

Mesh Elements

Triangles

Quadrilaterals

Tetrahedrons Hexahedrons

Prisms Pyramids

2D and 3D Elements

Creating Meshes

• Generate triangular, quadrilateral, or

tetrahedral meshes

• Robustness ensured by automatic or

manual choice of Delaunay and

advancing front triangulation methods

• Fully automatic meshing with 9

predefined mesh size parameters

• Manual adjustment of mesh size

parameters

Meshed geometry of a

continuous velocity (CV) joint.

The model is courtesy of Fabio Gatelli, Metelli S.p.A., Italy

Creating Unstructured Meshes

• Maximum element size

• Minimum element size

• Curvature

• Element growth

• Resolution of narrow regions

• Explicit sizing on edges

Element Size Control

Handling Small Features

• Built-in detection for small features

and narrow regions in geometry

• Automatic element size adjustment to

small features, narrow regions and

curved boundaries

• Detected edges and faces are

highlighted in the geometry and can be

used as input for further CAD

defeaturing or virtual geometry

operations

Model of a Li-Ion battery pack Swept, hexahedral mesh

Mapped mesh on end

surfaces

Tetrahedral mesh by conversion

Working with Structured Meshes

• Create mapped meshes in 2D, or 3D surfaces

• Create swept meshes, hexahedral or prismatic, in 3D

• Use a sequence of map, sweep, and convert operations to

create structured triangular or tetrahedral meshes

• Possible to sweep a source side with

N faces to a destination side with M

faces, where N≥M

• Control element distribution in the

sweep direction

• Supports triangular, quadrilateral and

mixed meshes on end surfaces

• Create sweepable domains by – Hiding geometry features with virtual

geometry operations

– Partitioning domains with geometry

operations

Partitioned source face with mixed

triangular and quadrilateral mesh

Swept mesh with prism and

hexahedron elements

Swept Meshes

• Possible to create a

continuous mesh while

keeping separate regions

(parts are bonded)

• Possible to mesh parts

individually with

compatible/incompatible

mesh on touching surfaces Continuous mesh

Incompatible mesh Compatible mesh

Meshing Several Parts (Assemblies)

• Use – In fluid flow applications to resolve boundary layers along the no-slip boundaries

– In heat transfer applications to resolve large temperature gradients close to heated surfaces

– In low-frequency electromagnetics to resolve the skin effect

• Boundary layer mesh is created automatically when needed for fluid flow

applications

Benchmark model of turbulent flow

field around a car-like object

Prism elements in the boundary

layer mesh of the above model

Boundary Layer Meshes

• The boundary layer mesh consists of – Layered quadrilateral elements in 2D

– Layered prism or hexahedron elements in 3D

• Automatic detection and treatment of

sharp corners

• Can be created for any mesh

• Manual control of boundary layer

properties

• Smooth transition to the interior mesh

• Support for boundary layers on

isolated boundaries

Creating Boundary Layer Meshes

New

New

• Use for applying periodic boundary

conditions with high accuracy

requirements, such as – Cyclic symmetry in structural mechanics

applications

– Floquet boundary condition for

electromagnetic wave propagation

• Available for domains, faces and

edges

• Automatic orientation of source mesh

on destination

• Supports copy to multiple destinations – Quick mesh generation for large periodic

geometries

Copying Meshes

• Use when creating meshes for geometric multigrid solver

• Use for convergence studies or to verify whether the solution is mesh dependent

• Different physics may have different meshes over the same region

• Duplicate, then edit mesh sequences

• Link meshing sequences by using the reference operation

– Apply scaling to the referenced mesh to create coarser or finer mesh

– Break the link to edit the meshes separately

• Use multiple imported meshes when preparing the mesh in other software

Multiple Meshes

• Quick overview of the mesh

• Minimum and maximum quality

• Histogram plot of element quality

Mesh Statistics

• Mesh plot to aid in creating good quality meshes – Plot various element types separately

– Color elements according to quality

– Show elements based on logical expressions

– Shrink elements for better visualization

Mesh Visualization

• Export the triangular surface mesh of the geometry, mesh, or deformed mesh to the

STL format (.stl)

• Create or modify designs in CAD programs based on the exported STL surface mesh

Large deformation analysis of a snap

hook. The deformed geometry can be

exported to STL format

STL Export

Importing Meshes

• Import mesh and materials

• Automatic split into domains

based on material data

• Automatic split into domains

based on element type

• Automatic or manual control

of parameters for face

partitioning

Imported Nastran

mesh of a crankshaft

Importing Nastran (.nas) Meshes

• .mphbin, .mphtxt mesh format

• Model with COMSOL Multiphysics on

meshes based on MRI and scanned

data

• The following software support export

to COMSOL mesh format • Mimics by Materialise, read more on

www.materialise.com

• +ScanFE by Simpleware, read more on

www.simpleware.com

Imported mesh, generated with

+ScanFE software by Simpleware,

of a scanned pork (bacon) side

The model is courtesy of Simpleware.

Importing COMSOL Meshes

• Create new boundaries and domains on imported meshes for assigning boundary

conditions and material properties

• Group existing mesh elements using one of the following operations:

– Ball

– Box

– Join Entities

– Delete Entities

– Create Vertex

– Logical Expression New

Partitioning Imported Meshes

Virtual Geometry and

Mesh Control Operations

• Complements CAD defeaturing and repair operations on the imported geometry

• ”Hides” geometry features from the mesher

• Use to get rid of – Sliver faces

– Short edges

– Small faces

– Undesired surface partitioning

– Small domains due to overlapping solids

• Difference from geometry defeaturing – Works on the geometry that is seen by the mesher

– Keeps the underlying shape of the geometry

Virtual Geometry Operations

• Gain precise control over mesh layout and density in regions of known rapid changes

or steep gradients, which may occur for example in CFD simulations

• Selected geometry features are available exclusively to control local mesh properties

and do not affect the subdivision of edges, faces, or domains when applying physics

settings

Domain for mesh control in benchmark model of turbulent flow field around a car-like object

Mesh Control Operations

Mesh Adaptation during Solving

Plot of sound pressure level

after shape optimization of an

initially cone shaped horn

• Automatic or manual choice of shape

function and element order

• Available shape functions include – Lagrange

– Hermite

– Argyris

– Discontinuous Lagrange

– Curl (vector) elements, etc.

• Automatic or manual choice of

geometry shape order

Model of an antenna implemented with

the Electromagnetic Wave interface

utilizing curl elements

Shape functions and Element Order

• Improve solution accuracy by adapting

the mesh to the problem’s physical

behavior

• The solver minimizes the error

according to an error criterion by

adding mesh elements to refine the

mesh

• Available for stationary, eigenvalue,

eigenfrequency or time dependent

studies

Ink droplet ejected through a nozzle

modeled with the help of transient

mesh adaptation

Adaptive Mesh Refinement

• Study the behavior of different shape

of an original object by enabling mesh

movement

• Model a process which removes or

adds material from the original

geometry, for example electrochemical

polishing or electrodeposition

• Perform optimization and sensitivity

analyses

Model of electrodeposition of

copper

Sensitivity analysis of a

structural member to

determine the effect of small

design modifications

Deformed Geometry

• Study deformation of solid

objects

• Model fluid-solid interaction,

or for example movement of

solids under electric fields

Model illustrating the principles of a MEMS

flow meter. Due to the fluid flow the

obstacle in the channel is bending, which

results in considerable change of the

shape of the flow domain

Moving Mesh

• Available for Moving Mesh

and Deformed Geometry

• Automatic remeshing,

based on user-defined

mesh quality threshold

• The simulation is

automatically continued

starting from the new

mesh

Mesh elements before and after an automatic remesh,

during the solution of a model for electrodeposition of

copper

Automatic Remeshing