Вы находитесь на странице: 1из 23

8/27/2012

1
Advanced COMSOL Multiphysics - WSU
2012 COMSOL. COMSOL and COMSOL Multiphysics are registered trademarks of COMSOL AB. Capture the Concept,
COMSOL Desktop, and LiveLink are trademarks of COMSOL AB. Other product or brand names are trademarks or registered
trademarks of their respective holders.
John Dunec, Ph.D.
COMSOL, Inc.
Agenda Morning Intro
Introduction
Worked Example: Joule Heating
Warmup: 3 Quick Problems
Hot Rod
Capacitor
Wrench
Multiphysics Problems:
Thermal Decomposition
H-Cell Microfluidics
Natural Convection in a Light Bulb
Agenda Afternoon Advanced
Worked Example: Magnetophoresis
Meshing Infinity
Infinite Elements
Perfectly Matched Layers
Meshing and Mesh Control
Basic Mesh Control
Interactive Mesh Control
Swept Meshing
ALE Moving Mesh
Postprocessing: The Results Node
Magnetic
Field
Flow Profile &
Particle Pathlines
Multiphysics: Multiple Interacting Phenomena
Could be simple:
Heat convected by Flow
Could be complex:
Local temperature sets
reaction rates
Multiple exothermic
reactions
Convected by flow in pipes
and porous media
Viscosity strongly
temperature dependent
COMSOL Multiphysics Solves These!
Multiphysics Everything can link to everything.
Flexible You can model just about anything.
Usable You can keep your sanity doing it.
Extensible If its not specifically thereadd it!
Trusted by 80,000+ Users Worldwide
Product Suite
AutoCAD and Inventor are registered trademarks of Autodesk, Inc. LiveLink for AutoCAD and LiveLink for Inventor are not affiliated with, endorsed by, sponsored by, or
supported by Autodesk, Inc. and/or any of its affiliates and/or subsidiaries. CATIA is a registered trademark of Dassault Systmes S.A. or its affiliates or subsidiaries. SolidWorks
is a registered trademark of Dassault Systmes SolidWorks Corporation or its parent, affiliates, or subsidiaries. Creo is a trademark and Pro/ENGINEER is a registered trademark
of Parametric Technology Corporation or its subsidiaries in the U.S and/or in other countries. MATLAB is a registered trademark of The MathWorks, Inc.
8/27/2012
2
Anywhere you can type a number
you can type an equation
Or an interpolation function
And it can depend on anything known in your problem
Example: Concentration-dependant viscosity:
( )
2
2 1 001 . 0 c + =
Low concentration,
High velocity
High concentration,
Low velocity
Add Your Own Equations to COMSOLs
Dont see what you need?
Add your own equation
ODEs
PDEs
Weak form PDEs
Just type them in
No Recompiling
No Programming
Capture the Concept
TM
Magnetophoresis Magnetophoresis
Blood Cell Separation with Magnetophoresis
Key Elements
Simulating a magnetic field from
a permanent magnet
Disturbing the B-field to produce
magnetic gradients
Simulating flow in a microfluidics
lab-on-a-chip set of flow channels
Using Particle Tracing to
concentrate blood cells responding
to magnetophoretic forces
Reference & Key Separation Property
Model Based on Paper Presented at 2009 COMSOL Conference:
G. Schiavone, D. Kavanagh, & M. Desmulliez, Design and Simulation of
a Microscale Magnetophoretic Device for the Separation of Nucleated
Fetal Red Blood Cells from Maternal Blood, Proceedings of the COMSOL
Conference 2009 Milan
Key Material Property:
The magnetic susceptibility
c
of red blood cells depends on the oxidation
state of the hemoglobin molecules. RBCs in a normal state exhibit an
extremely weak diamagnetic behaviour as
c
is negative and quite close to
zero.

c
= -3.9e-6 Therefore permeability = (1 3.9e-6)
3 Physics: Magnetics, Flow, & Particle Tracing
Magnetics Fluid Flow Particle Tracing
Particles respond to both Drag and Magnetophoretic Forces
8/27/2012
3
COMSOL Products Used This Tutorial
AutoCAD and Inventor are registered trademarks of Autodesk, Inc. LiveLink for AutoCAD and LiveLink for Inventor are not affiliated with, endorsed by, sponsored by, or
supported by Autodesk, Inc. and/or any of its affiliates and/or subsidiaries. CATIA is a registered trademark of Dassault Systmes S.A. or its affiliates or subsidiaries. SolidWorks
is a registered trademark of Dassault Systmes SolidWorks Corporation or its parent, affiliates, or subsidiaries. Creo is a trademark and Pro/ENGINEER is a registered trademark
of Parametric Technology Corporation or its subsidiaries in the U.S and/or in other countries. MATLAB is a registered trademark of The MathWorks, Inc.
COMSOL Multiphysics, AC/DC Module, Microfluidics Module
Along with the Particle Tracing Module
Tutorial Roadmap
First: Setup and Solve Magnetics & Flow
Choose two physics
Import geometry sequence
Define materials (Glass, Soft Iron, Water)
Set up Permanent Magnet
Set Flow Boundary Conditions
Mesh
Solve
Finally: Add Particle Tracing
Magnetic Field
Surrounding Neodymium
Magnets
Geometry
Glass Substrate
Two Neodymium
Permanent Magnets
Microfluidics Flow
Channel with 3 Outlets
Passive Array of Soft
Iron Patches
(Creates Field
Concentrators)
Array of Soft Iron Patches
Magnet
Flow Channel
Magnet
Magnetic Equations
Solve Magnetics based on the Scalar Magnetic Potential, V
m
Amperes Law relates H and B
In Permanent Magnets H related to B through Magnetism M
0 = V
V =
B
H
m
V
H B
r

0
=
M H B + =
0

Lets do this in COMSOL


Capture the Concept
TM
Step-by-step
Flow & Magnetics
Step-by-step
Flow & Magnetics
8/27/2012
4
First Solve for Magnetic Field and Flow
Choose File > New , 2D
Rt Click on AC/DC >
Magnetic Fields, No Currents
Add to Model
Rt Click on Fluid Flow
> Single- Phase Flow
> Creeping Flow
Add to Model
Choose Stationary
Units Meters
Highlight Geometry1
Leave units as m
Import Geometry Sequence
Right click on Geometry
Choose Import Sequence
from File
Navigate to File Location
Choose:
Magnetophoresis_GEOM_
SEQUENCE
Choose Build All
Limit Where Flow is Calculated
Do this before adding materials to
avoid unnecessary stop signs!
Highlight Creeping Flow
Clear ALL selections with broom
Select the flow channels (be sure
to include the small rectangle)
Materials Soft Iron
Rt Click on Materials
Choose Material Browser
Expand AC/DC
Rt click on
Soft Iron (without losses)
Add material to Model
Set mur to 4000
Materials Water and Glass
Pick Material Browser tab
Expand Built-in
Rt click on Water, liquid
Add material to Model
Select the flow channels (be sure
to include the small rectangle)
Set mur to 1
Pick Material Browser tab
Rt click on Glass (quartz)
Add material to Model
Select the outer circular domain
8/27/2012
5
Create a Material: NeodymiumMagnet
Rt Click on Materials
Choose Material
Name Material
Rt Click on Material 4
Rename to NeodymiumMagnet
Set Material Properties
Select the two magnet domains
Set mur as 1.05
Magnetize the Permanent Magnet
Rt Click on Magnetic Fields, No Currents
Choose Magnetic Flux Conservation
(This adds a 2
nd
Mag Flux Conserv. Node)
Select both Neodymium Magnet domains
Locate the Magnetic Field section
change Relative permeability to
Magnetization
Enter y component of M as 5.97e5
Avoid Field Distortion by Outer Boundary
Add Infinite Element Geometry
Expand Geometry 1
Highlight Circle 1 Overall
Expand Layers Section
Enter Layer Thickness as 0.005
Build all
Add Infinite Element Domains
Rt Click on Definitions
Choose Infinite Element Domains
Select the new outer layers
Change the Type to Cylindrical
Magnetic Potential Needs One Known Point
Set the magnetic value somewhere:
Rt Click on Magnetic Fields, No Currents
Choose Points > Zero Magnetic Scalar
Potential
Select the Leftmost Point to right of infinite
element domains
Flow Boundary Conditions: Inlet
Rt Click on Creeping Flow
Choose Inlet
Select the leftmost vertical flow
boundary
Change Boundary Condition
to Velocity
Enter Velocity as 0.5e-3
Flow Boundary Conditions: Outlet
Rt Click on Creeping Flow
Choose Outlet
Select the three right-most
vertical flow boundaries
Leave Boundary Condition
as Pressure,
Leave Pressure as 0
8/27/2012
6
Set Channel Depth
Highlight Creeping Flow
Change Compressibility to
Incompressible flow
Select Use shallow channel
approximation
Enter d
z
as 50e-6
Mesh the Infinite Element Domain
Rt Click on Mesh 1
Choose Mapped
Select the 4 Infinite Element domains
Rt Click on Mapped 1
Choose Distribution
Select the top vertical boundary
Number of Elements: 3
Rt Click on Mapped 1
Choose Distribution
Select the outer circle boundaries
Number of Elements: 15
Mesh the Inlet Flow Channel
Rt Click on Mesh 1
Choose Mapped
Select the inlet flow domain
Rt Click on Mapped 2
Choose Distribution
Select right vertical boundary
Number of Elements: 10
Rt Click on Mapped 2
Choose Distribution
Select top inlet channel boundary
Number of Elements: 1500
Mesh the Small Flow Rectangle
Rt Click on Mesh 1
Choose Mapped
Select the small flow domain
Rt Click on Mapped 3
Choose Distribution
Select top rectangle boundary
Number of Elements: 10
Build All
Mesh the Outlet Channels
Rt Click on Mesh 1
Choose Mapped
Select the 3 outlet flow domains
Build All
Distribution Upper Outlet
Rt Click on Mapped 4
Choose Distribution
Select BOTH the long upper outlet
boundaries
Change to Predefined distribution
Number of Elements: 70
Element Ratio: 10
Distribution method: Arithmetic seq
Build All
8/27/2012
7
Distribution Lower Outlet
Rt Click on Mapped 4
Choose Distribution
Select BOTH the long lower outlet
boundaries
Change to Predefined distribution
Number of Elements: 70
Element Ratio: 10
Distribution method: Arithmetic seq
Choose Reverse direction
Build All
Distribution Middle Outlet
Rt Click on Mapped 4
Choose Distribution
Select BOTH the long middle outlet
boundaries
Change to Predefined distribution
Number of Elements: 70
Element Ratio: 10
Distribution method: Arithmetic seq
Choose Reverse direction
Build All
Mesh the Remaining Glass
Rt Click on Mesh 1
Choose Free Triangular
Leave as Remaining
Rt Click on Free Triangular 1
Choose Size
Select ONLY the Glass Domain
Calibrate for General Physics
Set Size as Extra Coarse
Build All
Set up Two-Step Study
Rt Click on Study 1
Choose Study Steps
Choose Stationary
Highlight Step 1: Stationary
Deselect Calculating Flow
Highlight Step 2: Stationary 2
Deselect Calculating Magnetics
Rt Click on Study 1
Rename to Study 1 Flow and Magnetic Field
Solve for Flow and Magnetic Field
Rt Click on Study 1
Hit Compute
Magnetic Field
Magnetic Field
Flow Velocity
Solution Should be Done
164,000 Degrees of Freedom
37 seconds on my desktop
8/27/2012
8
Add Arrows for Magnetic Flux
Expand Results
Rt Click on Magnetic Flux Density
Choose Arrow Surface
Plot Magnetic Flux Density
X-points: 25
Y-points: 20
Scale Factor: 0.006
Color: Cyan
Capture the Concept
TM
Forces on Particles Forces on Particles
Next Add Particle Tracing for Blood Cells
Add 2
nd
Physics:
Particle Tracing, Transient
Define Particle Physics
Define the Particle Properties
Add the Drag Force, Link to velocity field
Add the Magnetophoretic Force, Link to B field
Create an Inlet (100 cells, velocity = V_inlet)
Set up Transient Study
Time Stepping
Link Transient Particle Tracing to Previous Study
Forces on the Blood Cells
Newtons Law recast to change in momentum
The magnetophoretic force is based on the gradient magnetic field
The fluid dynamic drag will be that predicted by Stokes law:
( ) ( ) v a F F F m
dt
d
m
D M
= = + =
2
, 0
3
2 H F V = K r
f r p M
t
( )
p p
p p
D
m
d
v u F =
2
18


Particle Properties
Density: 2200[kg/m^3]
Diameter: 6e-6[m]
Charge Number: 0
Permeability: (1 3.9e-6)
Red Blood Cells are somewhat donut shaped with a major
diameter of about 9 microns and a thickness of about 3 microns.
An equivalent sphere is roughly 6 microns in diameter.
Lets do this in COMSOL
8/27/2012
9
Capture the Concept
TM
Step-by-step
Particle Tracing
Step-by-step
Particle Tracing
Add Particle Tracing
Rt click on Model 1
Choose Add Physics
Choose Fluid Flow >
Particle Tracing for Fluid Flow
Choose the blue Next arrow
Choose Time Dependant
Deselect Solve For the other physics
Pick Finish Flag
Note: You need an additional study since particle tracing is transient
whereas the magnetic analysis was stationary.
Create Flow Channel Selection
Expand Materials
Highlight Water, Liquid
Choose the Create Selection
button
Name the Selection:
Flow Channels
Particles only in Fluid Domains
Highlight Particle Tracing for Fluid Flow
Go to Domain section
Pick Clear Selection button (the broom)
Choose Flow Channels domains in the
selection list
Walls Change to Bounce
Under Particle Tracing for Fluid
Flow
Highlight Wall 1
Change Wall Condition to
Bounce
Cells bounce back into main flow
Set Particle Properties
Under Particle Tracing for Fluid Flow
Highlight Particle Properties 1
Set to Specify particle density and
diameter
Enter Values:
Particle density: 2200[kg/m^3]
Particle diameter: 6e-6[m]
Charge Number: 0
Red Blood Cells are somewhat donut shaped with a major
diameter of about 9 microns and a thickness of about 3 microns.
This is an equivalent sphere.
8/27/2012
10
Add Fluid Drag Forces
Rt Click on Particle Tracing for Fluid Flow
Choose Drag Force
In Domain Selection section, choose
Flow Channels
In the Drag Force section, change velocity
field entry, u, to Velocity field (spf/fp1)
Add Magnetophoretic Forces
Rt Click on Particle Tracing for Fluid Flow
Choose Magnetophoretic Force
In Domain Selection section, choose Flow
Channels
In the Magnetophoretic Force section, change
Magnetic field, H, to Magnetic field (spf/fp1)
Enter values:
Particle relative permeability: 1-3.9e-6
(-3.9e-6 is the susceptibility)
Fluid relative permeability: 1
Boundary Cond: Particle Inlet
Rt Click on Particle Tracing for Fluid Flow
Choose Inlet
Select the left-most vertical flow boundary
Change Initial position to Uniform
Set N to 100
Set Velocity field to Velocity field (spf/fp1)
Boundary Cond: Particle Outlets
Rt Click on Particle Tracing for Fluid Flow
Choose Outlet
Select the 3 right-most vertical flow boundaries
Leave Wall Condition as Freeze
Assign Stationary Solver to Flow & Magnetics
Expand Study 1
Note: Both of the following are likely to
have been done for you already
Highlight Step 1: Stationary
In the Physics Selection:
Deselect Charged Particle Tracing
Highlight Step 2: Stationary 2
In the Physics Selection:
Deselect Charged Particle Tracing
Assign Transient Solver to Particle Tracing
Expand Study 2
Highlight Step 1: Time Dependant
In the Physics Selection:
Make sure Magnetic Fields is deactivated
Make sure Creeping Flow is deactivated
Rename Study
Rt Click on Study 2
Choose Rename
Change name to Study 2 Blood Cells
8/27/2012
11
Use Magnetics & Flow Solution from Study 1
Under Step 1: Time Dependant
Expand the Values of Dependent
Variables section
Select Values of variables not solve for
Method: Solution
Study: Study 1, Stationary
Stationary: Automatic
Set Times and Solve
Highlight Step 1: Time Dependant
Choose the Range button
Leave entry method as Step
Start: 0
Step: 0.1
Stop: 60
Pick Replace
Rt Click on Study 2
> Hit Compute
(Takes about 27 seconds)
Plot Particles as 3x Actual Size
Expand Particle Trajectories (cpt)
Highlight Particle Trajectories 1
Leave Type as Point
Change Radius expression to 6e-6
Select Radius Scale Factor
Enter Radius Scale Factor as 3
Plot
Zoom in on Y-Transition
Add Lines to Trajectories
Highlight Particle Trajectories 1
Change Type to Line
Plot
Add Arrow Plot
Expand Results
Rt Click on Particle Trajectories (fpt)
Choose Arrow Surface
Plot Flow Velocity (u, v)
Change x-Method to Coordinates
Set x coord to 0.0104
Change y-Method to Coordinates
Range: -0.0006 to 0.0006 in 65 steps
Scale Factor: 1
Compare with NO Magnetophoretic Force
Expand Particle Tracing For Fluid Flow
Rt Click on Magnetophoretic Force
Choose Disable
Rt Click on Study 2
Hit Compute
WITHOUT
Magnetophoretic Force
With
Magnetophoretic Force
8/27/2012
12
Capture the Concept
TM
PMLs & Infinite
Elements
PMLs & Infinite
Elements
You cannot model everything
You can never model the
entire universe
Boundary conditions
represent the outside
Two types: physical walls and
artificial boundaries
Use artificial boundaries to
model only the region of
interest
Model
Everything else
BC
BC
BC BC
Something else
Infinite Elements
Currently in AC/DC, Soon Throughout
Draw Rectangle, 2 Large Circles
Subdomain > Make Circles Not Active
Rectangle Boundaries ZeroCharge
Left Circle: V = 5 Right Circle V = -5
Solve; Contour Plot > 30 Contours
Geom Add Outer Inf Elem Geom
Subdomain Inf Elem Tab Match Matls
Inf Elems >Cartesian, Stretch in Proper Dir
Solve Hide Inf Element Subdomains
Perfectly Matched Layers
Absorbing Subdomain
Absorbs incident waves without reflection
Artificial boundary for non-enclosed spaces
Used instead of radiation boundary condition
Make thickness at least one wavelength
PML
Quick Example
Circle 1: R= 8 Center: (0,2)
Circle 2: R= 4 Center: (0,0)
f =100 Hz c =343 m/sec (air)
L=c/f = 3.4 Mesh Size = 3.4/5
Inner Circle Acceleration BC, a0=1
Add PML Circle 3: R=12 Center: (0,2)
Sound Hard Wall Radiation - Cylindrical PML - Cylindrical
Make PML at least one wavelength thick
Capture the Concept
TM
FEA Mesh
Descretization
FEA Mesh
Descretization
8/27/2012
13
The Machinery of the FE method

Strong
Form
Weak
Form
Galerkin
Form
Algebraic
Form
S W G A

Ax = b
( ) F b
t
a
t
b + V + I V =
c
c
+
c
c


u
2
2
Discretize in
time,
Linearize with
Newton-
Raphson
Shape Functions Approximate Solution
Assume a Shape of the answer inside an element
Equate flux out of one element to flux into neighboring element
( ) Q T k
t
T
C
p
= V V +
c
c

2
nd
or 3
rd
order elements
capture curvature inside
elements
Linear
elements
no curvature
Linearize with Newton Raphson
Here solution to f(x) = x
2
- 4 = 0
What kind of meshes can we use?
Tetrahedral
Most general, any 3D part
can be tet meshed. Use
this as much as possible.
Hexahedral Prismatic
- Only appropriate for certain geometries
- When solution is known to vary slowly in one axis
- Large deformations of the mesh
- Contact problems
Hybrid mesh
Boundary Layer Meshing
A semi-automatic hybrid approach between
prismatic and tetrahedral meshing.
It is meant for situations when you know
that there will be high gradients normal to
some surfaces, but you want the flexibility
of the tetrahedral mesh in the remainder of
the domains.
2
nd
Order Elements are more Efficient than 1st
A finite element basis function can only
approximately represent a true solution.
The error can be minimized by using smaller
elements, or increasing element order.
This is MESH or DISCRETIZATION error
10 1
st
order elements
16 1
st
order elements
4 2
nd
order elements
u
exact
-u
model
8/27/2012
14
When to use linear elements?
COMSOL uses linear elements by default for:
Fluid flow
Plasmas
Contact pressure in Solid mechanics
Temperature in Thermal stress
If you already have a very fine mesh due to geometric complexity
Very large models where you can only get low accuracy
Transient problems
Magnetic field with nonlinear material
2
nd
or 3
rd
order elements
capture curvature inside
elements
Linear
elements
no curvature
When To Use Higher Order Elements
Use for quick Accuracy Improvement Watch Out Though!
Can produce large (erroneous) numerical overshoots
Can make model size very large
Use higher order elements when calculating higher order derivatives
Field represented by 2
nd
order Shape Functions in Element
1
st
Spatial Derivative Linear Function in Element
2
nd
Spatial Derivative Constant in Element
3
rd
Spatial Derivative ZERO!
4
th
Spatial Derivative ZERO!
Linear
elements
no curvature
How to Change Element Order
Buttons at Top of Model Builder:
Turn On Visibility of Discretization
Highlight Individual Physics Nodes
Expand Discretization
Change order of elements
Sometimes, the geometry should be
adjusted to improve the model
1. Geometric Singularities
2. Fillets
3. Thin Regions & High
Aspect Ratios
4. Glancing Contact
5. Sliver Faces
6. Too Much Detail
7. Symmetry
8. Infinitely extended region
1. Geometric Singularities
Plate in tension with a sharp notch
The stresses at the notch will be
infinite, although the displacements
will be correct
Adding a small, physically realistic fillet,
will remove the singularity, but it will
increase the number of elements
2. Fillets
Overly detailed geometry
Sharp corner = singularity Compromise between lower
element count & accuracy
8/27/2012
15
3. Thin regions
t < L/100
Thin domains can often be represented
via boundary conditions that do not
require a volumetric mesh
3. High Aspect Ratios
L >> d
t << W, H
Aspect ratios > 1,000:1 require extreme care
Aspect ratios > 1,000,000:1 may require a different approach
4. Glancing contact
Instead, try:
Small Gap
Small Overlap
Perform convergence study
on gap/overlap size
5. Sliver faces
Small elements and high aspect
ratio elements are present
This usually requires re-drawing the CAD geometry
6. Too much detail
Remove as many of the small features as reasonable
Consider using Virtual
Operations on geometry
7. Use symmetry
Use symmetry planes
Model on reduced geometry
- Less mesh
- Less memory
- Less time
Consider using:
- 2D if there is no variation in
geometry and solution out-of-plane
- 2D axisymmetry if there is no
variation in geometry and solution
about an axis of revolution
8/27/2012
16
8. Infinitely Extended Region
Infinite Elements
Currently available for:
- Electrostatics and Magnetostatics
- Heat transfer
- Diffusion
- Structural Mechanics
Models an infinitely extended
region for time-invariant problems
Perfectly Matched Layer
Applicable to wave-type models:
Elastic waves in structures
Pressure waves in fluids (acoustics)
EM waves (RF)
Models an infinitely extended
region where the waves are
absorbed without reflection
Capture the Concept
TM
Meshing &
Mesh Control
Meshing &
Mesh Control
Simple Mesh Control Here 2D
Draw the Following Shapes
Explore Custom Parameters under Size Node
Predefined mesh options
9 options from Extremely Coarse to Extremely Fine
Custom mesh: Element Size Parameters
Maximum element size
Minimum element size
Maximum element growth rate
Resolution of curvature
Resolution of narrow regions
Maximum element size
This sets the maximum length of the edge of any element
Needs to be a positive number
If you do not pick a value, COMSOL uses L/10, where L is the maximum
dimension of the model
8/27/2012
17
Minimum element size
This sets the minimum length of the edge of any element
Needs to be a positive number
Useful to ensure that too many elements are not generated around
small curved parts
Maximum element growth rate
Rate at which the element size can grow from a region with small
elements to a region with larger elements
Needs to be a number between 1 and 2
Resolution of curvature
Determines the size of boundary elements compared to the curvature of
the geometric boundary
Max element size along boundary = curvature radius x resolution of
curvature
Needs to be a positive number
Smaller value gives finer mesh
Radius
Resolution of narrow regions
Control the number of layers of elements that are created in
narrow regions
A value between 0 to 1 produces anisotropic element
Needs to be a positive number
Resolution = 1
Resolution = 3
Interactive Meshing Piston Head Boundary Layer Meshing
Best for things that have boundary layer
details
New > 3D Geometry > Finish
Right Click on Geometry > Cylinder > Build
Right Click on Mesh > Boundary Layers
Right Click on Boundary Layers >
Boundary Layer Properties
Select the boundaries to have the boundary
details on (all the curved boundaries)
Build all
Change Stretching Factor to 1.1 (or 1.3)
Build all
8/27/2012
18
Interactive Meshing Chip and Solderballs
New > 3D > Finish Flag
Geom > Import > SolderJoints
Mesh with Default Tets (Size Coarse)
Delete Tets
Mesh Surface with Triangles
Sweep Solderballs
(Add Distribution > 5 layer)
Mesh IC Bottom with Free Triangles
Sweep IC (Distribution > 3 Layers)
Sweep Circuit Board
Boundary Layer Mesh Air Rectangle
Boundary Layer Props on Bottom of
Circuit Board Boundary > Mesh
Swept Meshing Exercise
Mesh All (Free)
Delete Mesh
Mesh Selected Faces
Undo Mesh
Increase Mesh Size
+ Mesh Selected (Swept)
Mesh Remaining (Free)
Mesh Selected (Swept)
Mixing Hex Meshes with Tet Meshes
New > 3D > Finish Flag
Geom > Block > 1x1x1
Geom > Block > 1x1x0.5
(Corner at 0,0,1)
Mesh Top Surface with Mapped
Sweep Top (Distribution: 5 layers)
Mesh Remaining Tets > ERROR
Remove last step
Mesh > More Operatns > Convert
Level = Boundary (Pick Shared)
Mesh Remaining Tets > WORKS
Capture the Concept
TM
ALE Moving
Mesh
ALE Moving
Mesh
ALE Moving Mesh
Think of the mesh as a bed of springs
As the boundary moves, the springs stretch
NOTE: Need special
effort to insure front
boundary of valve seat
block does not move
8/27/2012
19
ALE Moving Mesh
Think of the mesh as a bed of springs
As the boundary moves, the springs stretch
Two Coordinate Systems using Moving Mesh
Material Coordinate System: X,Y,Z (upper case)
This is the original (non-moving) system
Use this one to specify boundary motion
Spatial Coordinate System: x,y,z (lower case)
This one stretches and moves with mesh
It is used by the non-structural physics (here, flow)
X, Y, Z
x, y, z
Deformed mesh requires mesh smoothing
The smoothing equations try to keep the mesh elements
reasonably well-shaped
Option for Automatic Remeshing
Original mesh Deformed mesh
Smoothing algorithms in COMSOL
COMSOL solves additional equations to find the coordinates of
the moving mesh
Laplace
Default
Least computation expensive
Winslow
Nonlinear
More robust
Hyperelastic
Nonlinear
Smoother result than Winslow if mesh is stretched
Capture the Concept
TM
FSI Cantilever FSI Cantilever
Predefined: Fluid Solid Interaction
8/27/2012
20
PREDEFINED Moving Mesh: FSI
New > 2D
Fluid Flow > Fluid Solid Interaction
Stationary
Review Model Tree
Much is set up for you
Simply indicate what is elastic
Geometry
Geometry > Set units to mm
Rectangle
Width 300
Height 100
Corner (0,0)
Rectangle
Width 5
Height 50
Corner (100, 0)
Declare What is Solid in Fluid-Solid
Default is ALL fluid
Open Fluid-Structure Interaction
Highlight Linear Elastic Material
Choose the Flap
Everything is taken care of for you:
Moving Mesh in Solid
Free Mesh in Fluid
Linkage of Fluid Force on Structure
Boundary Conditions on ALE Mesh
Materials
Rt Click on Materials > Open Material Browser
Built-in: Water (Add to model)
Rt Click on Materials > Material
Rename to Flap
Choose Vertical Flap
Youngs Modulus = 1000
Poissons Ratio = 0.33
Density = 1000
Boundary Conditions
Structure: Rt Click on Fluid-Solid Interaction
Choose Solid Mech > Fixed Constraint
Pick Bottom Horiz Boundary of Flap
Fluid Inlet: Rt Click on Fluid-Solid Interaction
Choose Fluid Flow > Inlet
Choose Leftmost vertical inlet boundary
V = 0.010
Fluid Outlet: Rt Click on Fluid-Solid Interaction
Choose Fluid Flow > Outlet
Choose Rightmost vertical inlet boundary
P = 0
Mesh + Solve
Rt Click on Mesh
Free Triangular
Pick Size > Coarse
Build
Rt Click on Study
Compute
2D Plot 1 > Surface
Change to Total Velocity
Add Contour, Velocity
8/27/2012
21
Capture the Concept
TM
Data Sets,
Postprocessing
Data Sets,
Postprocessing
Results
Results = Postprocessing section
Working with Data Sets
Getting Derived Values
Creating plots
Export = Exporting numerical
data and images
Report = Generate HTML report
of the model
Data Sets Solution and Selection
Choose desired
geometric level
Select the desired
geometric entities
Results can be
visualized only on
the desired
geometric entities
1
2
3
Derived Values
Results > Derived Values
Allows you to evaluate and visualize numerical data
Automatically creates table under Results > Table
Evaluates a variable at a point
or geometric vertices
Evaluates global variables,
lumped parameters and built-in
physical constants
Menubar options
Point evaluation Cut lines Cut planes Slice
Isosurface
Volume
Surface
Line (edge)
Arrow (in volume)
Streamline
Animate
Exploring the Results Node
Define 3D Heat Transfer Problem
CAD Import > Piston for FEA
Top: T = 700
Bottom: T= 450
Bearing Surf: T = 400
Explore different plot types
Surface
Contour
Arrow 3D
Isosurfaces
Cut Planes
8/27/2012
22
Plot on a 2D Cut Plane
Right Click Data Sets
Add Cut Plane
x-y Plane z = -0.025 Plot
Add 2D Plot Group
Use Cut Plane 1
Add Surface T Plot
Right Click Data Sets
Add Mirror 2D
Select 2D Plot Group > Dataset Mirror 2D
Add Contours
Export Cut-Plane Data to File
(Same method could export 3D data to file)
Go to Data Sets Node
Right Click on the Dataset you want to export
Pick Add to Report
Go to Report Node > Data x
Choose the Variable (expression) to export
Set the filename path for a .txt file > Export
Open Text File with Excel (or equivalent)
Put a Cut-Line through the Cut Plane
Highlight 2D Plot Node
Pick Start Point
Pick End Point
Highlight 1D Plot Group
To Export Data:
Under Datasets:
Highlight 1D Cut Line
Right Click: Add to Report
Highlight: Data1 under
Report Export to Excel
Put a Cut-Line Through the 3D Object
Highlight Plot Group 1
Again Pick Start and End points
(This attach to the nearest surface)
Another Dataset Appears: Cut Line 3D
Can Plot it like any other 1D Dataset
Can Export it like any other Dataset
Axisymetric to 3D Visualization
Open Model Library > Acoustics Module >
Tutorial Models > PiezoAcoustic Transducer
View Plot Group 1
Right Click on Datasets Node
Add Revolution 2D
Open Revolution Layers: Change 360 to 135
Right Click on Results > Add 3D Plotgroup
Add Isosurface to 3D Plotgroup > Plot
Pressure (Increase to 10 levels)
Add a Slice Plot, Quick, xy-planes, 1
Plot Pressure
3D Slices in Time
Open Model Library > COMSOL
Multiphysics > Fluid Dynamics >
Cylindrical Flow
View Plot Group 1
Right Click on Datasets Node
Add Parametric Extrusion 2D
Change to Interpolated times
Start: 0, End: 7, Step: 1
Add 3D Plot Group
Add Surface Plot of Velocity
8/27/2012
23
Data Export: Value vs Time
Results vs Time
Model Library > Heat Transfer > Process &
Manufacturing > Disk Brake
Highlight Plot Group 1
Right Click Derived Values > Point Evaluation
Choose Point 5, Change units to degF
Choose Orange = sign creates table
Toggle Precision Button
Then the Plot Symbol
Open Excel (or equivalent)
Pick Copy table to Clipboard
Paste in Excel
Evaluate Average Disk Pad Temp vs Time
Open Model1 Node
Right Click on Definitions
Add Model Couplings > Average
Choose Brake Pad Domain
Operator Name: BreakPad_Ave
Update Solution
Add 1D Plot > Global Plot
Plot BreakPad_Ave(T)

Вам также может понравиться